@nativescript/vite 8.0.0-alpha.29 → 8.0.0-alpha.30
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/hmr/server/angular-root-component.d.ts +79 -0
- package/hmr/server/angular-root-component.js +149 -0
- package/hmr/server/angular-root-component.js.map +1 -0
- 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/index.js +1 -0
- package/hmr/server/index.js.map +1 -1
- package/hmr/server/ns-rt-route.d.ts +5 -0
- package/hmr/server/ns-rt-route.js +35 -0
- package/hmr/server/ns-rt-route.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/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 +12 -0
- package/hmr/server/server-origin.js +66 -0
- package/hmr/server/server-origin.js.map +1 -0
- package/hmr/server/websocket-core-bridge.js +0 -11
- package/hmr/server/websocket-core-bridge.js.map +1 -1
- package/hmr/server/websocket-device-transform.d.ts +21 -0
- package/hmr/server/websocket-device-transform.js +1570 -0
- package/hmr/server/websocket-device-transform.js.map +1 -0
- package/hmr/server/websocket-hot-update.d.ts +51 -0
- package/hmr/server/websocket-hot-update.js +1160 -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 +44 -0
- package/hmr/server/websocket-import-map-route.js.map +1 -0
- package/hmr/server/websocket-ns-core.d.ts +21 -0
- package/hmr/server/websocket-ns-core.js +305 -0
- package/hmr/server/websocket-ns-core.js.map +1 -0
- package/hmr/server/websocket-ns-entry.d.ts +22 -0
- package/hmr/server/websocket-ns-entry.js +150 -0
- package/hmr/server/websocket-ns-entry.js.map +1 -0
- package/hmr/server/websocket-ns-m.d.ts +34 -0
- package/hmr/server/websocket-ns-m.js +853 -0
- package/hmr/server/websocket-ns-m.js.map +1 -0
- package/hmr/server/websocket-served-module-helpers.d.ts +1 -1
- package/hmr/server/websocket-served-module-helpers.js +1 -1
- package/hmr/server/websocket-served-module-helpers.js.map +1 -1
- package/hmr/server/websocket-sfc.d.ts +24 -0
- package/hmr/server/websocket-sfc.js +1223 -0
- package/hmr/server/websocket-sfc.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.js +2 -8
- package/hmr/server/websocket-vendor-unifier.js.map +1 -1
- package/hmr/server/websocket.d.ts +1 -44
- package/hmr/server/websocket.js +588 -6691
- package/hmr/server/websocket.js.map +1 -1
- package/hmr/shared/runtime/root-placeholder-view.d.ts +19 -0
- package/hmr/shared/runtime/root-placeholder-view.js +310 -0
- package/hmr/shared/runtime/root-placeholder-view.js.map +1 -0
- package/hmr/shared/runtime/root-placeholder.js +1 -309
- package/hmr/shared/runtime/root-placeholder.js.map +1 -1
- package/hmr/shared/vendor/manifest-collect.d.ts +32 -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.d.ts +1 -35
- package/hmr/shared/vendor/manifest.js +3 -914
- 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/package.json +1 -1
- package/hmr/server/websocket-vue-sfc.d.ts +0 -26
- package/hmr/server/websocket-vue-sfc.js +0 -1053
- package/hmr/server/websocket-vue-sfc.js.map +0 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type PlaceholderCtors = {
|
|
2
|
+
Page: any;
|
|
3
|
+
Label: any;
|
|
4
|
+
Image: any;
|
|
5
|
+
ActivityIndicator: any | null;
|
|
6
|
+
StackLayout: any | null;
|
|
7
|
+
GridLayout: any | null;
|
|
8
|
+
ContentView: any | null;
|
|
9
|
+
Color: any | null;
|
|
10
|
+
verbose?: boolean;
|
|
11
|
+
};
|
|
12
|
+
export type PlaceholderRefs = {
|
|
13
|
+
page: any;
|
|
14
|
+
statusLabel: any;
|
|
15
|
+
detailLabel: any | null;
|
|
16
|
+
progressFill: any | null;
|
|
17
|
+
activityIndicator: any | null;
|
|
18
|
+
};
|
|
19
|
+
export declare function buildPlaceholderPage(ctors: PlaceholderCtors): PlaceholderRefs;
|
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
import { BOOT_PLACEHOLDER_MOTION, computeBootProgressFillScale, getBootPlaceholderPalette } from './boot-placeholder-ui.js';
|
|
2
|
+
// Official NativeScript wordmark, dark slate on transparent. Hosted
|
|
3
|
+
// remotely so we don't have to ship the asset with @nativescript/vite;
|
|
4
|
+
// fetched once per cold boot, NS's Image element handles caching.
|
|
5
|
+
const NATIVESCRIPT_LOGO_URL = 'https://raw.githubusercontent.com/NativeScript/artwork/main/logo/export/NativeScript_Logo_Dark_Transparent.png';
|
|
6
|
+
const BRAND_MARK_SIZE = 44;
|
|
7
|
+
function makeColor(Color, value) {
|
|
8
|
+
if (!Color)
|
|
9
|
+
return value;
|
|
10
|
+
try {
|
|
11
|
+
return new Color(value);
|
|
12
|
+
}
|
|
13
|
+
catch {
|
|
14
|
+
return value;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
// iOS layer-level shadow. Soft + offset down so the card reads as
|
|
18
|
+
// "slightly lifted off the page" without a heavy, dated drop.
|
|
19
|
+
function applyIosCardShadow(card, shadowHex, ColorCtor) {
|
|
20
|
+
const ios = card.ios;
|
|
21
|
+
const layer = ios?.layer;
|
|
22
|
+
if (!layer)
|
|
23
|
+
return;
|
|
24
|
+
if (ColorCtor) {
|
|
25
|
+
const shadowColor = new ColorCtor(shadowHex);
|
|
26
|
+
const uiColor = shadowColor.ios;
|
|
27
|
+
if (uiColor && typeof uiColor.CGColor !== 'undefined') {
|
|
28
|
+
layer.shadowColor = uiColor.CGColor;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
layer.shadowOpacity = 0.18;
|
|
32
|
+
layer.shadowRadius = 16;
|
|
33
|
+
layer.shadowOffset = { width: 0, height: 6 };
|
|
34
|
+
layer.masksToBounds = false;
|
|
35
|
+
}
|
|
36
|
+
// Pre-load setup: keep the card invisible + slightly down-scaled so
|
|
37
|
+
// it doesn't flash at full opacity before the loaded handler can
|
|
38
|
+
// kick off the entrance animation. Called once at construction.
|
|
39
|
+
function primeCardForEntrance(card) {
|
|
40
|
+
if (!card)
|
|
41
|
+
return;
|
|
42
|
+
try {
|
|
43
|
+
card.opacity = 0;
|
|
44
|
+
card.scaleX = BOOT_PLACEHOLDER_MOTION.entranceFromScale;
|
|
45
|
+
card.scaleY = BOOT_PLACEHOLDER_MOTION.entranceFromScale;
|
|
46
|
+
}
|
|
47
|
+
catch { }
|
|
48
|
+
}
|
|
49
|
+
// One-shot fade + scale on attach. Triggered from `loaded` so we run
|
|
50
|
+
// after the view has been measured and committed to the visual tree.
|
|
51
|
+
// Primed via `primeCardForEntrance` to avoid a pre-animation flash.
|
|
52
|
+
function animateCardIn(card) {
|
|
53
|
+
if (!card || typeof card.animate !== 'function')
|
|
54
|
+
return;
|
|
55
|
+
try {
|
|
56
|
+
card
|
|
57
|
+
.animate({
|
|
58
|
+
opacity: 1,
|
|
59
|
+
scale: { x: 1, y: 1 },
|
|
60
|
+
duration: BOOT_PLACEHOLDER_MOTION.entranceDurationMs,
|
|
61
|
+
curve: 'easeOut',
|
|
62
|
+
})
|
|
63
|
+
.catch(() => {
|
|
64
|
+
try {
|
|
65
|
+
card.opacity = 1;
|
|
66
|
+
card.scaleX = 1;
|
|
67
|
+
card.scaleY = 1;
|
|
68
|
+
}
|
|
69
|
+
catch { }
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
catch { }
|
|
73
|
+
}
|
|
74
|
+
// Slow opacity pulse on the brand mark to give the otherwise-static
|
|
75
|
+
// card a heartbeat. Loops until boot completes (the `__NS_HMR_BOOT_COMPLETE__`
|
|
76
|
+
// gate) or the view is detached (animate rejects and the .catch swallows it).
|
|
77
|
+
function pulseBrandMark(badge) {
|
|
78
|
+
if (!badge || typeof badge.animate !== 'function')
|
|
79
|
+
return;
|
|
80
|
+
const g = globalThis;
|
|
81
|
+
if (g.__NS_HMR_BOOT_COMPLETE__)
|
|
82
|
+
return;
|
|
83
|
+
try {
|
|
84
|
+
badge
|
|
85
|
+
.animate({
|
|
86
|
+
opacity: BOOT_PLACEHOLDER_MOTION.brandPulseMinOpacity,
|
|
87
|
+
duration: BOOT_PLACEHOLDER_MOTION.brandPulseDurationMs,
|
|
88
|
+
curve: 'easeInOut',
|
|
89
|
+
})
|
|
90
|
+
.then(() => badge.animate({
|
|
91
|
+
opacity: 1,
|
|
92
|
+
duration: BOOT_PLACEHOLDER_MOTION.brandPulseDurationMs,
|
|
93
|
+
curve: 'easeInOut',
|
|
94
|
+
}))
|
|
95
|
+
.then(() => pulseBrandMark(badge))
|
|
96
|
+
.catch(() => { });
|
|
97
|
+
}
|
|
98
|
+
catch { }
|
|
99
|
+
}
|
|
100
|
+
export function buildPlaceholderPage(ctors) {
|
|
101
|
+
const { Page, Label, ActivityIndicator, StackLayout, GridLayout, ContentView, Image, Color } = ctors;
|
|
102
|
+
const palette = getBootPlaceholderPalette('info');
|
|
103
|
+
const page = new Page();
|
|
104
|
+
page.actionBarHidden = true;
|
|
105
|
+
try {
|
|
106
|
+
page.backgroundColor = makeColor(Color, palette.pageBackground);
|
|
107
|
+
}
|
|
108
|
+
catch { }
|
|
109
|
+
const titleLabel = new Label();
|
|
110
|
+
titleLabel.text = 'NativeScript Vite preparing dev session...';
|
|
111
|
+
titleLabel.textAlignment = 'center';
|
|
112
|
+
titleLabel.textWrap = true;
|
|
113
|
+
titleLabel.fontSize = 18;
|
|
114
|
+
titleLabel.fontWeight = '700';
|
|
115
|
+
try {
|
|
116
|
+
titleLabel.color = makeColor(Color, palette.titleText);
|
|
117
|
+
}
|
|
118
|
+
catch { }
|
|
119
|
+
titleLabel.marginTop = 18;
|
|
120
|
+
const statusLabel = new Label();
|
|
121
|
+
statusLabel.text = 'Preparing the HTTP HMR bootstrap (4%)';
|
|
122
|
+
statusLabel.textAlignment = 'center';
|
|
123
|
+
statusLabel.textWrap = true;
|
|
124
|
+
statusLabel.fontSize = 13;
|
|
125
|
+
try {
|
|
126
|
+
statusLabel.color = makeColor(Color, palette.phaseText);
|
|
127
|
+
}
|
|
128
|
+
catch { }
|
|
129
|
+
statusLabel.marginTop = 10;
|
|
130
|
+
const detailLabel = new Label();
|
|
131
|
+
detailLabel.text = '';
|
|
132
|
+
detailLabel.textAlignment = 'center';
|
|
133
|
+
detailLabel.textWrap = true;
|
|
134
|
+
detailLabel.fontSize = 11;
|
|
135
|
+
try {
|
|
136
|
+
detailLabel.color = makeColor(Color, palette.detailText);
|
|
137
|
+
}
|
|
138
|
+
catch { }
|
|
139
|
+
detailLabel.marginTop = 12;
|
|
140
|
+
const activityIndicator = ActivityIndicator
|
|
141
|
+
? (() => {
|
|
142
|
+
const indicator = new ActivityIndicator();
|
|
143
|
+
indicator.busy = true;
|
|
144
|
+
indicator.marginTop = 14;
|
|
145
|
+
indicator.width = 22;
|
|
146
|
+
indicator.height = 22;
|
|
147
|
+
indicator.horizontalAlignment = 'center';
|
|
148
|
+
try {
|
|
149
|
+
indicator.color = makeColor(Color, palette.activityIndicator);
|
|
150
|
+
}
|
|
151
|
+
catch { }
|
|
152
|
+
return indicator;
|
|
153
|
+
})()
|
|
154
|
+
: null;
|
|
155
|
+
let progressFill = null;
|
|
156
|
+
let progressTrack = null;
|
|
157
|
+
if (GridLayout && ContentView) {
|
|
158
|
+
try {
|
|
159
|
+
progressTrack = new GridLayout();
|
|
160
|
+
progressTrack.height = 6;
|
|
161
|
+
progressTrack.marginTop = 16;
|
|
162
|
+
progressTrack.marginLeft = 4;
|
|
163
|
+
progressTrack.marginRight = 4;
|
|
164
|
+
try {
|
|
165
|
+
progressTrack.backgroundColor = makeColor(Color, palette.progressTrack);
|
|
166
|
+
}
|
|
167
|
+
catch { }
|
|
168
|
+
try {
|
|
169
|
+
progressTrack.borderRadius = 3;
|
|
170
|
+
}
|
|
171
|
+
catch { }
|
|
172
|
+
progressTrack.horizontalAlignment = 'stretch';
|
|
173
|
+
progressFill = new ContentView();
|
|
174
|
+
progressFill.height = 6;
|
|
175
|
+
progressFill.horizontalAlignment = 'stretch';
|
|
176
|
+
progressFill.verticalAlignment = 'middle';
|
|
177
|
+
try {
|
|
178
|
+
progressFill.backgroundColor = makeColor(Color, palette.progressFill);
|
|
179
|
+
}
|
|
180
|
+
catch { }
|
|
181
|
+
try {
|
|
182
|
+
progressFill.borderRadius = 3;
|
|
183
|
+
}
|
|
184
|
+
catch { }
|
|
185
|
+
// Anchor the scale transform at the left edge so the fill
|
|
186
|
+
// grows rightward like a real progress bar. Starting scale
|
|
187
|
+
// matches `computeBootProgressFillScale(0)` = 0.01 — visible
|
|
188
|
+
// sliver of accent that telegraphs "we're starting".
|
|
189
|
+
try {
|
|
190
|
+
progressFill.originX = 0;
|
|
191
|
+
}
|
|
192
|
+
catch { }
|
|
193
|
+
progressFill.scaleX = computeBootProgressFillScale(0);
|
|
194
|
+
progressTrack.addChild(progressFill);
|
|
195
|
+
}
|
|
196
|
+
catch {
|
|
197
|
+
progressTrack = null;
|
|
198
|
+
progressFill = null;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
const brandMark = new Image();
|
|
202
|
+
brandMark.src = NATIVESCRIPT_LOGO_URL;
|
|
203
|
+
brandMark.stretch = 'aspectFit';
|
|
204
|
+
brandMark.width = BRAND_MARK_SIZE;
|
|
205
|
+
brandMark.height = BRAND_MARK_SIZE;
|
|
206
|
+
brandMark.horizontalAlignment = 'center';
|
|
207
|
+
brandMark.on?.('loaded', () => pulseBrandMark(brandMark));
|
|
208
|
+
let card = null;
|
|
209
|
+
if (StackLayout) {
|
|
210
|
+
try {
|
|
211
|
+
card = new StackLayout();
|
|
212
|
+
card.padding = '24 28 22 28';
|
|
213
|
+
try {
|
|
214
|
+
card.backgroundColor = makeColor(Color, palette.cardBackground);
|
|
215
|
+
}
|
|
216
|
+
catch { }
|
|
217
|
+
try {
|
|
218
|
+
card.borderRadius = 18;
|
|
219
|
+
}
|
|
220
|
+
catch { }
|
|
221
|
+
card.width = 320;
|
|
222
|
+
card.horizontalAlignment = 'center';
|
|
223
|
+
if (brandMark)
|
|
224
|
+
card.addChild(brandMark);
|
|
225
|
+
card.addChild(titleLabel);
|
|
226
|
+
card.addChild(statusLabel);
|
|
227
|
+
if (progressTrack)
|
|
228
|
+
card.addChild(progressTrack);
|
|
229
|
+
card.addChild(detailLabel);
|
|
230
|
+
if (activityIndicator)
|
|
231
|
+
card.addChild(activityIndicator);
|
|
232
|
+
primeCardForEntrance(card);
|
|
233
|
+
card.on?.('loaded', () => {
|
|
234
|
+
try {
|
|
235
|
+
const ios = card.ios;
|
|
236
|
+
if (ios && ios.layer) {
|
|
237
|
+
ios.layer.cornerRadius = 18;
|
|
238
|
+
ios.layer.masksToBounds = false;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
catch { }
|
|
242
|
+
applyIosCardShadow(card, palette.cardShadow, Color);
|
|
243
|
+
animateCardIn(card);
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
catch {
|
|
247
|
+
card = null;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
if (card && GridLayout) {
|
|
251
|
+
try {
|
|
252
|
+
const root = new GridLayout();
|
|
253
|
+
root.horizontalAlignment = 'stretch';
|
|
254
|
+
root.verticalAlignment = 'stretch';
|
|
255
|
+
try {
|
|
256
|
+
root.backgroundColor = makeColor(Color, palette.pageBackground);
|
|
257
|
+
}
|
|
258
|
+
catch { }
|
|
259
|
+
card.verticalAlignment = 'middle';
|
|
260
|
+
card.horizontalAlignment = 'center';
|
|
261
|
+
root.addChild(card);
|
|
262
|
+
page.content = root;
|
|
263
|
+
}
|
|
264
|
+
catch {
|
|
265
|
+
page.content = card;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
else if (card) {
|
|
269
|
+
card.verticalAlignment = 'middle';
|
|
270
|
+
page.content = card;
|
|
271
|
+
}
|
|
272
|
+
else if (StackLayout) {
|
|
273
|
+
// StackLayout exists but card creation failed — fall back to the
|
|
274
|
+
// minimal three-child layout the older placeholder used so the
|
|
275
|
+
// dev-overlay's fallback `findBootStatusLabel` walk still works.
|
|
276
|
+
try {
|
|
277
|
+
const root = new StackLayout();
|
|
278
|
+
root.padding = 24;
|
|
279
|
+
root.verticalAlignment = 'middle';
|
|
280
|
+
root.horizontalAlignment = 'center';
|
|
281
|
+
root.addChild(titleLabel);
|
|
282
|
+
root.addChild(statusLabel);
|
|
283
|
+
if (activityIndicator)
|
|
284
|
+
root.addChild(activityIndicator);
|
|
285
|
+
page.content = root;
|
|
286
|
+
}
|
|
287
|
+
catch {
|
|
288
|
+
titleLabel.verticalAlignment = 'middle';
|
|
289
|
+
titleLabel.horizontalAlignment = 'center';
|
|
290
|
+
titleLabel.width = 280;
|
|
291
|
+
titleLabel.padding = 12;
|
|
292
|
+
page.content = titleLabel;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
else {
|
|
296
|
+
titleLabel.verticalAlignment = 'middle';
|
|
297
|
+
titleLabel.horizontalAlignment = 'center';
|
|
298
|
+
titleLabel.width = 280;
|
|
299
|
+
titleLabel.padding = 12;
|
|
300
|
+
page.content = titleLabel;
|
|
301
|
+
}
|
|
302
|
+
return {
|
|
303
|
+
page,
|
|
304
|
+
statusLabel,
|
|
305
|
+
detailLabel: card ? detailLabel : null,
|
|
306
|
+
progressFill,
|
|
307
|
+
activityIndicator,
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
//# sourceMappingURL=root-placeholder-view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"root-placeholder-view.js","sourceRoot":"","sources":["../../../../../../packages/vite/hmr/shared/runtime/root-placeholder-view.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,4BAA4B,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAyB5H,oEAAoE;AACpE,uEAAuE;AACvE,kEAAkE;AAClE,MAAM,qBAAqB,GAAG,gHAAgH,CAAC;AAC/I,MAAM,eAAe,GAAG,EAAE,CAAC;AAU3B,SAAS,SAAS,CAAC,KAAU,EAAE,KAAa;IAC3C,IAAI,CAAC,KAAK;QAAE,OAAO,KAAK,CAAC;IACzB,IAAI,CAAC;QACJ,OAAO,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC;IACzB,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,KAAK,CAAC;IACd,CAAC;AACF,CAAC;AAED,kEAAkE;AAClE,8DAA8D;AAC9D,SAAS,kBAAkB,CAAC,IAAS,EAAE,SAAiB,EAAE,SAAc;IACvE,MAAM,GAAG,GAAI,IAAY,CAAC,GAAG,CAAC;IAC9B,MAAM,KAAK,GAAG,GAAG,EAAE,KAAK,CAAC;IACzB,IAAI,CAAC,KAAK;QAAE,OAAO;IACnB,IAAI,SAAS,EAAE,CAAC;QACf,MAAM,WAAW,GAAG,IAAI,SAAS,CAAC,SAAS,CAAC,CAAC;QAC7C,MAAM,OAAO,GAAI,WAAmB,CAAC,GAAG,CAAC;QACzC,IAAI,OAAO,IAAI,OAAO,OAAO,CAAC,OAAO,KAAK,WAAW,EAAE,CAAC;YACvD,KAAK,CAAC,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC;QACrC,CAAC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pC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;YAC1B,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;YAC3B,IAAI,iBAAiB;gBAAE,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC;YACxD,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACrB,CAAC;QAAC,MAAM,CAAC;YACR,UAAU,CAAC,iBAAiB,GAAG,QAAQ,CAAC;YACxC,UAAU,CAAC,mBAAmB,GAAG,QAAQ,CAAC;YAC1C,UAAU,CAAC,KAAK,GAAG,GAAG,CAAC;YACvB,UAAU,CAAC,OAAO,GAAG,EAAE,CAAC;YACxB,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC;QAC3B,CAAC;IACF,CAAC;SAAM,CAAC;QACP,UAAU,CAAC,iBAAiB,GAAG,QAAQ,CAAC;QACxC,UAAU,CAAC,mBAAmB,GAAG,QAAQ,CAAC;QAC1C,UAAU,CAAC,KAAK,GAAG,GAAG,CAAC;QACvB,UAAU,CAAC,OAAO,GAAG,EAAE,CAAC;QACxB,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC;IAC3B,CAAC;IAED,OAAO;QACN,IAAI;QACJ,WAAW;QACX,WAAW,EAAE,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI;QACtC,YAAY;QACZ,iBAAiB;KACjB,CAAC;AACH,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BOOT_PLACEHOLDER_MOTION, computeBootProgressFillScale, formatBootDetailLine, formatBootPrimaryLine, getBootPlaceholderPalette } from './boot-placeholder-ui.js';
|
|
2
1
|
import { setHmrBootStage } from './dev-overlay.js';
|
|
2
|
+
import { buildPlaceholderPage } from './root-placeholder-view.js';
|
|
3
3
|
function isPlaceholderView(view, placeholderRoot) {
|
|
4
4
|
if (!view) {
|
|
5
5
|
return false;
|
|
@@ -121,314 +121,6 @@ function clearPlaceholderGlobals(g) {
|
|
|
121
121
|
}
|
|
122
122
|
delete g['__NS_DEV_PLACEHOLDER_RESTORE_TIMER__'];
|
|
123
123
|
}
|
|
124
|
-
// Official NativeScript wordmark, dark slate on transparent. Hosted
|
|
125
|
-
// remotely so we don't have to ship the asset with @nativescript/vite;
|
|
126
|
-
// fetched once per cold boot, NS's Image element handles caching.
|
|
127
|
-
const NATIVESCRIPT_LOGO_URL = 'https://raw.githubusercontent.com/NativeScript/artwork/main/logo/export/NativeScript_Logo_Dark_Transparent.png';
|
|
128
|
-
const BRAND_MARK_SIZE = 44;
|
|
129
|
-
function makeColor(Color, value) {
|
|
130
|
-
if (!Color)
|
|
131
|
-
return value;
|
|
132
|
-
try {
|
|
133
|
-
return new Color(value);
|
|
134
|
-
}
|
|
135
|
-
catch {
|
|
136
|
-
return value;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
// iOS layer-level shadow. Soft + offset down so the card reads as
|
|
140
|
-
// "slightly lifted off the page" without a heavy, dated drop.
|
|
141
|
-
function applyIosCardShadow(card, shadowHex, ColorCtor) {
|
|
142
|
-
const ios = card.ios;
|
|
143
|
-
const layer = ios?.layer;
|
|
144
|
-
if (!layer)
|
|
145
|
-
return;
|
|
146
|
-
if (ColorCtor) {
|
|
147
|
-
const shadowColor = new ColorCtor(shadowHex);
|
|
148
|
-
const uiColor = shadowColor.ios;
|
|
149
|
-
if (uiColor && typeof uiColor.CGColor !== 'undefined') {
|
|
150
|
-
layer.shadowColor = uiColor.CGColor;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
layer.shadowOpacity = 0.18;
|
|
154
|
-
layer.shadowRadius = 16;
|
|
155
|
-
layer.shadowOffset = { width: 0, height: 6 };
|
|
156
|
-
layer.masksToBounds = false;
|
|
157
|
-
}
|
|
158
|
-
// Pre-load setup: keep the card invisible + slightly down-scaled so
|
|
159
|
-
// it doesn't flash at full opacity before the loaded handler can
|
|
160
|
-
// kick off the entrance animation. Called once at construction.
|
|
161
|
-
function primeCardForEntrance(card) {
|
|
162
|
-
if (!card)
|
|
163
|
-
return;
|
|
164
|
-
try {
|
|
165
|
-
card.opacity = 0;
|
|
166
|
-
card.scaleX = BOOT_PLACEHOLDER_MOTION.entranceFromScale;
|
|
167
|
-
card.scaleY = BOOT_PLACEHOLDER_MOTION.entranceFromScale;
|
|
168
|
-
}
|
|
169
|
-
catch { }
|
|
170
|
-
}
|
|
171
|
-
// One-shot fade + scale on attach. Triggered from `loaded` so we run
|
|
172
|
-
// after the view has been measured and committed to the visual tree.
|
|
173
|
-
// Primed via `primeCardForEntrance` to avoid a pre-animation flash.
|
|
174
|
-
function animateCardIn(card) {
|
|
175
|
-
if (!card || typeof card.animate !== 'function')
|
|
176
|
-
return;
|
|
177
|
-
try {
|
|
178
|
-
card
|
|
179
|
-
.animate({
|
|
180
|
-
opacity: 1,
|
|
181
|
-
scale: { x: 1, y: 1 },
|
|
182
|
-
duration: BOOT_PLACEHOLDER_MOTION.entranceDurationMs,
|
|
183
|
-
curve: 'easeOut',
|
|
184
|
-
})
|
|
185
|
-
.catch(() => {
|
|
186
|
-
try {
|
|
187
|
-
card.opacity = 1;
|
|
188
|
-
card.scaleX = 1;
|
|
189
|
-
card.scaleY = 1;
|
|
190
|
-
}
|
|
191
|
-
catch { }
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
catch { }
|
|
195
|
-
}
|
|
196
|
-
// Slow opacity pulse on the brand mark to give the otherwise-static
|
|
197
|
-
// card a heartbeat. Loops until boot completes (the `__NS_HMR_BOOT_COMPLETE__`
|
|
198
|
-
// gate) or the view is detached (animate rejects and the .catch swallows it).
|
|
199
|
-
function pulseBrandMark(badge) {
|
|
200
|
-
if (!badge || typeof badge.animate !== 'function')
|
|
201
|
-
return;
|
|
202
|
-
const g = globalThis;
|
|
203
|
-
if (g.__NS_HMR_BOOT_COMPLETE__)
|
|
204
|
-
return;
|
|
205
|
-
try {
|
|
206
|
-
badge
|
|
207
|
-
.animate({
|
|
208
|
-
opacity: BOOT_PLACEHOLDER_MOTION.brandPulseMinOpacity,
|
|
209
|
-
duration: BOOT_PLACEHOLDER_MOTION.brandPulseDurationMs,
|
|
210
|
-
curve: 'easeInOut',
|
|
211
|
-
})
|
|
212
|
-
.then(() => badge.animate({
|
|
213
|
-
opacity: 1,
|
|
214
|
-
duration: BOOT_PLACEHOLDER_MOTION.brandPulseDurationMs,
|
|
215
|
-
curve: 'easeInOut',
|
|
216
|
-
}))
|
|
217
|
-
.then(() => pulseBrandMark(badge))
|
|
218
|
-
.catch(() => { });
|
|
219
|
-
}
|
|
220
|
-
catch { }
|
|
221
|
-
}
|
|
222
|
-
function buildPlaceholderPage(ctors) {
|
|
223
|
-
const { Page, Label, ActivityIndicator, StackLayout, GridLayout, ContentView, Image, Color } = ctors;
|
|
224
|
-
const palette = getBootPlaceholderPalette('info');
|
|
225
|
-
const page = new Page();
|
|
226
|
-
page.actionBarHidden = true;
|
|
227
|
-
try {
|
|
228
|
-
page.backgroundColor = makeColor(Color, palette.pageBackground);
|
|
229
|
-
}
|
|
230
|
-
catch { }
|
|
231
|
-
const titleLabel = new Label();
|
|
232
|
-
titleLabel.text = 'NativeScript Vite preparing dev session...';
|
|
233
|
-
titleLabel.textAlignment = 'center';
|
|
234
|
-
titleLabel.textWrap = true;
|
|
235
|
-
titleLabel.fontSize = 18;
|
|
236
|
-
titleLabel.fontWeight = '700';
|
|
237
|
-
try {
|
|
238
|
-
titleLabel.color = makeColor(Color, palette.titleText);
|
|
239
|
-
}
|
|
240
|
-
catch { }
|
|
241
|
-
titleLabel.marginTop = 18;
|
|
242
|
-
const statusLabel = new Label();
|
|
243
|
-
statusLabel.text = 'Preparing the HTTP HMR bootstrap (4%)';
|
|
244
|
-
statusLabel.textAlignment = 'center';
|
|
245
|
-
statusLabel.textWrap = true;
|
|
246
|
-
statusLabel.fontSize = 13;
|
|
247
|
-
try {
|
|
248
|
-
statusLabel.color = makeColor(Color, palette.phaseText);
|
|
249
|
-
}
|
|
250
|
-
catch { }
|
|
251
|
-
statusLabel.marginTop = 10;
|
|
252
|
-
const detailLabel = new Label();
|
|
253
|
-
detailLabel.text = '';
|
|
254
|
-
detailLabel.textAlignment = 'center';
|
|
255
|
-
detailLabel.textWrap = true;
|
|
256
|
-
detailLabel.fontSize = 11;
|
|
257
|
-
try {
|
|
258
|
-
detailLabel.color = makeColor(Color, palette.detailText);
|
|
259
|
-
}
|
|
260
|
-
catch { }
|
|
261
|
-
detailLabel.marginTop = 12;
|
|
262
|
-
const activityIndicator = ActivityIndicator
|
|
263
|
-
? (() => {
|
|
264
|
-
const indicator = new ActivityIndicator();
|
|
265
|
-
indicator.busy = true;
|
|
266
|
-
indicator.marginTop = 14;
|
|
267
|
-
indicator.width = 22;
|
|
268
|
-
indicator.height = 22;
|
|
269
|
-
indicator.horizontalAlignment = 'center';
|
|
270
|
-
try {
|
|
271
|
-
indicator.color = makeColor(Color, palette.activityIndicator);
|
|
272
|
-
}
|
|
273
|
-
catch { }
|
|
274
|
-
return indicator;
|
|
275
|
-
})()
|
|
276
|
-
: null;
|
|
277
|
-
let progressFill = null;
|
|
278
|
-
let progressTrack = null;
|
|
279
|
-
if (GridLayout && ContentView) {
|
|
280
|
-
try {
|
|
281
|
-
progressTrack = new GridLayout();
|
|
282
|
-
progressTrack.height = 6;
|
|
283
|
-
progressTrack.marginTop = 16;
|
|
284
|
-
progressTrack.marginLeft = 4;
|
|
285
|
-
progressTrack.marginRight = 4;
|
|
286
|
-
try {
|
|
287
|
-
progressTrack.backgroundColor = makeColor(Color, palette.progressTrack);
|
|
288
|
-
}
|
|
289
|
-
catch { }
|
|
290
|
-
try {
|
|
291
|
-
progressTrack.borderRadius = 3;
|
|
292
|
-
}
|
|
293
|
-
catch { }
|
|
294
|
-
progressTrack.horizontalAlignment = 'stretch';
|
|
295
|
-
progressFill = new ContentView();
|
|
296
|
-
progressFill.height = 6;
|
|
297
|
-
progressFill.horizontalAlignment = 'stretch';
|
|
298
|
-
progressFill.verticalAlignment = 'middle';
|
|
299
|
-
try {
|
|
300
|
-
progressFill.backgroundColor = makeColor(Color, palette.progressFill);
|
|
301
|
-
}
|
|
302
|
-
catch { }
|
|
303
|
-
try {
|
|
304
|
-
progressFill.borderRadius = 3;
|
|
305
|
-
}
|
|
306
|
-
catch { }
|
|
307
|
-
// Anchor the scale transform at the left edge so the fill
|
|
308
|
-
// grows rightward like a real progress bar. Starting scale
|
|
309
|
-
// matches `computeBootProgressFillScale(0)` = 0.01 — visible
|
|
310
|
-
// sliver of accent that telegraphs "we're starting".
|
|
311
|
-
try {
|
|
312
|
-
progressFill.originX = 0;
|
|
313
|
-
}
|
|
314
|
-
catch { }
|
|
315
|
-
progressFill.scaleX = computeBootProgressFillScale(0);
|
|
316
|
-
progressTrack.addChild(progressFill);
|
|
317
|
-
}
|
|
318
|
-
catch {
|
|
319
|
-
progressTrack = null;
|
|
320
|
-
progressFill = null;
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
const brandMark = new Image();
|
|
324
|
-
brandMark.src = NATIVESCRIPT_LOGO_URL;
|
|
325
|
-
brandMark.stretch = 'aspectFit';
|
|
326
|
-
brandMark.width = BRAND_MARK_SIZE;
|
|
327
|
-
brandMark.height = BRAND_MARK_SIZE;
|
|
328
|
-
brandMark.horizontalAlignment = 'center';
|
|
329
|
-
brandMark.on?.('loaded', () => pulseBrandMark(brandMark));
|
|
330
|
-
let card = null;
|
|
331
|
-
if (StackLayout) {
|
|
332
|
-
try {
|
|
333
|
-
card = new StackLayout();
|
|
334
|
-
card.padding = '24 28 22 28';
|
|
335
|
-
try {
|
|
336
|
-
card.backgroundColor = makeColor(Color, palette.cardBackground);
|
|
337
|
-
}
|
|
338
|
-
catch { }
|
|
339
|
-
try {
|
|
340
|
-
card.borderRadius = 18;
|
|
341
|
-
}
|
|
342
|
-
catch { }
|
|
343
|
-
card.width = 320;
|
|
344
|
-
card.horizontalAlignment = 'center';
|
|
345
|
-
if (brandMark)
|
|
346
|
-
card.addChild(brandMark);
|
|
347
|
-
card.addChild(titleLabel);
|
|
348
|
-
card.addChild(statusLabel);
|
|
349
|
-
if (progressTrack)
|
|
350
|
-
card.addChild(progressTrack);
|
|
351
|
-
card.addChild(detailLabel);
|
|
352
|
-
if (activityIndicator)
|
|
353
|
-
card.addChild(activityIndicator);
|
|
354
|
-
primeCardForEntrance(card);
|
|
355
|
-
card.on?.('loaded', () => {
|
|
356
|
-
try {
|
|
357
|
-
const ios = card.ios;
|
|
358
|
-
if (ios && ios.layer) {
|
|
359
|
-
ios.layer.cornerRadius = 18;
|
|
360
|
-
ios.layer.masksToBounds = false;
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
catch { }
|
|
364
|
-
applyIosCardShadow(card, palette.cardShadow, Color);
|
|
365
|
-
animateCardIn(card);
|
|
366
|
-
});
|
|
367
|
-
}
|
|
368
|
-
catch {
|
|
369
|
-
card = null;
|
|
370
|
-
}
|
|
371
|
-
}
|
|
372
|
-
if (card && GridLayout) {
|
|
373
|
-
try {
|
|
374
|
-
const root = new GridLayout();
|
|
375
|
-
root.horizontalAlignment = 'stretch';
|
|
376
|
-
root.verticalAlignment = 'stretch';
|
|
377
|
-
try {
|
|
378
|
-
root.backgroundColor = makeColor(Color, palette.pageBackground);
|
|
379
|
-
}
|
|
380
|
-
catch { }
|
|
381
|
-
card.verticalAlignment = 'middle';
|
|
382
|
-
card.horizontalAlignment = 'center';
|
|
383
|
-
root.addChild(card);
|
|
384
|
-
page.content = root;
|
|
385
|
-
}
|
|
386
|
-
catch {
|
|
387
|
-
page.content = card;
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
else if (card) {
|
|
391
|
-
card.verticalAlignment = 'middle';
|
|
392
|
-
page.content = card;
|
|
393
|
-
}
|
|
394
|
-
else if (StackLayout) {
|
|
395
|
-
// StackLayout exists but card creation failed — fall back to the
|
|
396
|
-
// minimal three-child layout the older placeholder used so the
|
|
397
|
-
// dev-overlay's fallback `findBootStatusLabel` walk still works.
|
|
398
|
-
try {
|
|
399
|
-
const root = new StackLayout();
|
|
400
|
-
root.padding = 24;
|
|
401
|
-
root.verticalAlignment = 'middle';
|
|
402
|
-
root.horizontalAlignment = 'center';
|
|
403
|
-
root.addChild(titleLabel);
|
|
404
|
-
root.addChild(statusLabel);
|
|
405
|
-
if (activityIndicator)
|
|
406
|
-
root.addChild(activityIndicator);
|
|
407
|
-
page.content = root;
|
|
408
|
-
}
|
|
409
|
-
catch {
|
|
410
|
-
titleLabel.verticalAlignment = 'middle';
|
|
411
|
-
titleLabel.horizontalAlignment = 'center';
|
|
412
|
-
titleLabel.width = 280;
|
|
413
|
-
titleLabel.padding = 12;
|
|
414
|
-
page.content = titleLabel;
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
else {
|
|
418
|
-
titleLabel.verticalAlignment = 'middle';
|
|
419
|
-
titleLabel.horizontalAlignment = 'center';
|
|
420
|
-
titleLabel.width = 280;
|
|
421
|
-
titleLabel.padding = 12;
|
|
422
|
-
page.content = titleLabel;
|
|
423
|
-
}
|
|
424
|
-
return {
|
|
425
|
-
page,
|
|
426
|
-
statusLabel,
|
|
427
|
-
detailLabel: card ? detailLabel : null,
|
|
428
|
-
progressFill,
|
|
429
|
-
activityIndicator,
|
|
430
|
-
};
|
|
431
|
-
}
|
|
432
124
|
export function tryFinalizeBootPlaceholder(reason, verbose) {
|
|
433
125
|
const g = globalThis;
|
|
434
126
|
const placeholderRoot = g['__NS_DEV_PLACEHOLDER_ROOT_VIEW__'] || null;
|