@qwik.dev/core 2.0.0-alpha.9 → 2.0.0-beta.10
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/bindings/qwik.darwin-arm64.node +0 -0
- package/bindings/qwik.darwin-x64.node +0 -0
- package/bindings/qwik.linux-x64-gnu.node +0 -0
- package/bindings/qwik.wasm.cjs +27 -27
- package/bindings/qwik.wasm.mjs +27 -27
- package/bindings/qwik.win32-x64-msvc.node +0 -0
- package/bindings/qwik_wasm_bg.wasm +0 -0
- package/dist/backpatch/index.cjs +6 -0
- package/dist/backpatch/index.d.ts +2 -0
- package/dist/backpatch/index.mjs +5 -0
- package/dist/{prefetch → backpatch}/package.json +2 -2
- package/dist/backpatch-executor.debug.js +34 -0
- package/dist/backpatch-executor.js +1 -0
- package/dist/build/index.cjs +3 -3
- package/dist/build/index.d.ts +22 -22
- package/dist/build/package.json +1 -1
- package/dist/cli.cjs +3035 -767
- package/dist/core-internal.d.ts +4622 -4153
- package/dist/core.cjs +7327 -6169
- package/dist/core.cjs.map +1 -1
- package/dist/core.min.mjs +1 -1
- package/dist/core.mjs +7294 -6163
- package/dist/core.mjs.map +1 -1
- package/dist/core.prod.cjs +3209 -2612
- package/dist/core.prod.mjs +3932 -3294
- package/dist/insights/index.qwik.cjs +1 -4142
- package/dist/insights/index.qwik.mjs +63 -4133
- package/dist/insights/vite/index.cjs +1 -82
- package/dist/insights/vite/index.mjs +65 -37
- package/dist/insights/vite.d.ts +22 -0
- package/dist/{insights/insights.d.ts → insights.d.ts} +33 -22
- package/dist/loader/index.cjs +2 -2
- package/dist/loader/index.mjs +2 -2
- package/dist/loader/package.json +1 -1
- package/dist/optimizer.cjs +201 -3817
- package/dist/optimizer.d.ts +754 -707
- package/dist/optimizer.mjs +2605 -3628
- package/dist/preloader.cjs +266 -0
- package/dist/preloader.mjs +195 -0
- package/dist/qwikloader.debug.js +228 -222
- package/dist/qwikloader.js +1 -3
- package/dist/server.cjs +915 -621
- package/dist/server.d.ts +519 -402
- package/dist/server.mjs +900 -615
- package/dist/starters/adapters/aws-lambda/adapters/aws-lambda/vite.config.mts +1 -1
- package/dist/starters/adapters/aws-lambda/package.json +1 -1
- package/dist/starters/adapters/aws-lambda/serverless.yml +15 -0
- package/dist/starters/adapters/aws-lambda/src/entry_aws-lambda.tsx +2 -8
- package/dist/starters/adapters/azure-swa/adapters/azure-swa/vite.config.mts +1 -1
- package/dist/starters/adapters/azure-swa/package.json +1 -1
- package/dist/starters/adapters/azure-swa/public/staticwebapp.config.json +7 -0
- package/dist/starters/adapters/azure-swa/src/entry.azure-swa.tsx +2 -4
- package/dist/starters/adapters/bun/adapters/bun/vite.config.mts +2 -2
- package/dist/starters/adapters/bun/package.json +1 -1
- package/dist/starters/adapters/bun/src/entry.bun.ts +3 -4
- package/dist/starters/adapters/cloud-run/adapters/cloud-run/vite.config.mts +1 -1
- package/dist/starters/adapters/cloud-run/package.json +1 -1
- package/dist/starters/adapters/cloud-run/src/entry.cloud-run.tsx +2 -6
- package/dist/starters/adapters/cloudflare-pages/adapters/cloudflare-pages/vite.config.mts +1 -1
- package/dist/starters/adapters/cloudflare-pages/package.json +1 -1
- package/dist/starters/adapters/cloudflare-pages/public/_headers +2 -0
- package/dist/starters/adapters/cloudflare-pages/src/entry.cloudflare-pages.tsx +2 -4
- package/dist/starters/adapters/deno/adapters/deno/vite.config.mts +1 -1
- package/dist/starters/adapters/deno/package.json +1 -1
- package/dist/starters/adapters/deno/src/entry.deno.ts +3 -4
- package/dist/starters/adapters/express/adapters/express/vite.config.mts +1 -1
- package/dist/starters/adapters/express/package.json +1 -1
- package/dist/starters/adapters/express/src/entry.express.tsx +6 -5
- package/dist/starters/adapters/fastify/adapters/fastify/vite.config.mts +1 -1
- package/dist/starters/adapters/fastify/package.json +1 -1
- package/dist/starters/adapters/fastify/src/entry.fastify.tsx +3 -2
- package/dist/starters/adapters/fastify/src/plugins/fastify-qwik.ts +10 -3
- package/dist/starters/adapters/firebase/adapters/firebase/vite.config.mts +1 -1
- package/dist/starters/adapters/firebase/firebase.json +12 -1
- package/dist/starters/adapters/firebase/functions/index.js +2 -3
- package/dist/starters/adapters/firebase/package.json +1 -1
- package/dist/starters/adapters/firebase/src/entry-firebase.tsx +2 -4
- package/dist/starters/adapters/netlify-edge/adapters/netlify-edge/vite.config.mts +1 -1
- package/dist/starters/adapters/netlify-edge/package.json +1 -1
- package/dist/starters/adapters/netlify-edge/public/_headers +2 -0
- package/dist/starters/adapters/netlify-edge/src/entry.netlify-edge.tsx +2 -4
- package/dist/starters/adapters/node-server/adapters/node-server/vite.config.mts +1 -1
- package/dist/starters/adapters/node-server/package.json +1 -1
- package/dist/starters/adapters/node-server/src/entry.node-server.tsx +3 -4
- package/dist/starters/adapters/ssg/README.md +9 -0
- package/dist/starters/adapters/{static/adapters/static → ssg/adapters/ssg}/vite.config.mts +2 -2
- package/dist/starters/adapters/ssg/package.json +19 -0
- package/dist/starters/adapters/vercel-edge/adapters/vercel-edge/vite.config.mts +1 -1
- package/dist/starters/adapters/vercel-edge/package.json +1 -1
- package/dist/starters/adapters/vercel-edge/src/entry.vercel-edge.tsx +2 -4
- package/dist/starters/adapters/vercel-edge/vercel.json +1 -1
- package/dist/starters/features/auth/package.json +1 -1
- package/dist/starters/features/bootstrap/src/routes/bootstrap/layout.tsx +0 -11
- package/dist/starters/features/csr/index.html +23 -0
- package/dist/starters/features/csr/package.json +29 -0
- package/dist/starters/features/csr/src/root.tsx +15 -0
- package/dist/starters/features/csr/vite.config.mts +13 -0
- package/dist/starters/features/localize/package.json +3 -3
- package/dist/starters/features/localize/src/entry.ssr.tsx +17 -23
- package/dist/starters/features/localize/src/routes/[locale]/i18n-utils.ts +1 -1
- package/dist/starters/features/pandacss/package.json +1 -1
- package/dist/starters/features/partytown/package.json +4 -4
- package/dist/starters/features/partytown/src/components/partytown/partytown.tsx +2 -2
- package/dist/starters/features/playwright/playwright-report/index.html +953 -911
- package/dist/starters/features/postcss/postcss.config.js +2 -2
- package/dist/starters/features/service-worker/package.json +13 -0
- package/dist/starters/features/service-worker/src/routes/service-worker.ts +14 -0
- package/dist/starters/features/styled-vanilla-extract/package.json +2 -1
- package/dist/starters/features/tailwind/package.json +4 -3
- package/dist/starters/features/tailwind/prettier.config.js +10 -0
- package/dist/starters/features/tailwind/src/global.css +1 -1
- package/dist/starters/features/tailwind-v3/package.json +1 -1
- package/dist/starters/features/tailwind-v3/prettier.config.js +10 -0
- package/dist/starters/features/tailwind-v3/tailwind.config.js +2 -2
- package/dist/testing/index.cjs +14313 -11732
- package/dist/testing/index.d.ts +1112 -141
- package/dist/testing/index.mjs +14225 -11661
- package/dist/testing/package.json +1 -1
- package/package.json +28 -14
- package/public.d.ts +5 -0
- package/server.d.ts +1 -0
- package/dist/insights/index.d.ts +0 -1
- package/dist/insights/vite/index.d.ts +0 -1
- package/dist/insights/vite/insights-plugin.d.ts +0 -10
- package/dist/prefetch/index.cjs +0 -4
- package/dist/prefetch/index.d.ts +0 -2
- package/dist/prefetch/index.mjs +0 -3
- package/dist/qwik-prefetch.debug.js +0 -244
- package/dist/qwik-prefetch.js +0 -1
- package/dist/starters/adapters/static/README.md +0 -5
- package/dist/starters/adapters/static/package.json +0 -19
- package/dist/starters/features/tailwind/.prettierrc.js +0 -3
package/dist/server.d.ts
CHANGED
|
@@ -1,404 +1,521 @@
|
|
|
1
1
|
/// <reference path="./server-modules.d.ts" />
|
|
2
2
|
|
|
3
|
-
import type { QwikManifest } from './optimizer';
|
|
4
|
-
import type { ResolvedManifest } from './optimizer';
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
7
|
-
import type {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
* @public
|
|
33
|
-
*/
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Provides the `
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
/** @
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
/** @public */
|
|
150
|
-
export declare interface
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
/** @public */
|
|
156
|
-
declare interface
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
/**
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
*/
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
/**
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
/** @public */
|
|
248
|
-
export declare
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
/**
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
/**
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
/**
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
/**
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
/**
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
/**
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
3
|
+
import type { QwikManifest } from './optimizer';
|
|
4
|
+
import type { ResolvedManifest } from './optimizer';
|
|
5
|
+
import type { ServerQwikManifest } from './optimizer';
|
|
6
|
+
import type { SnapshotResult } from '.';
|
|
7
|
+
import type { StreamWriter } from '.';
|
|
8
|
+
import type { SymbolMapperFn } from './optimizer';
|
|
9
|
+
|
|
10
|
+
/** @public */
|
|
11
|
+
declare interface ComponentEntryStrategy {
|
|
12
|
+
type: 'component';
|
|
13
|
+
manual?: Record<string, string>;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/** @public */
|
|
17
|
+
declare interface DevJSX {
|
|
18
|
+
fileName: string;
|
|
19
|
+
lineNumber: number;
|
|
20
|
+
columnNumber: number;
|
|
21
|
+
stack?: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** @public */
|
|
25
|
+
declare type EntryStrategy = InlineEntryStrategy | HoistEntryStrategy | SingleEntryStrategy | HookEntryStrategy | SegmentEntryStrategy | ComponentEntryStrategy | SmartEntryStrategy;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Any function taking a props object that returns JSXOutput.
|
|
29
|
+
*
|
|
30
|
+
* The `key`, `flags` and `dev` parameters are for internal use.
|
|
31
|
+
*
|
|
32
|
+
* @public
|
|
33
|
+
*/
|
|
34
|
+
declare type FunctionComponent<P = unknown> = {
|
|
35
|
+
renderFn(props: P, key: string | null, flags: number, dev?: DevJSX): JSXOutput;
|
|
36
|
+
}['renderFn'];
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Provides the `backpatch-executor.js` executor script as a string.
|
|
40
|
+
*
|
|
41
|
+
* @public
|
|
42
|
+
*/
|
|
43
|
+
export declare function getQwikBackpatchExecutorScript(opts?: {
|
|
44
|
+
debug?: boolean;
|
|
45
|
+
}): string;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Provides the `qwikloader.js` file as a string. Useful for tooling to inline the qwikloader script
|
|
49
|
+
* into HTML.
|
|
50
|
+
*
|
|
51
|
+
* @public
|
|
52
|
+
*/
|
|
53
|
+
export declare function getQwikLoaderScript(opts?: {
|
|
54
|
+
debug?: boolean;
|
|
55
|
+
}): string;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Provides the `qwik-prefetch-service-worker.js` file as a string. Useful for tooling to inline the
|
|
59
|
+
* qwik-prefetch-service-worker script into HTML.
|
|
60
|
+
*
|
|
61
|
+
* @public
|
|
62
|
+
*/
|
|
63
|
+
export declare function getQwikPrefetchWorkerScript(opts?: {
|
|
64
|
+
debug?: boolean;
|
|
65
|
+
}): string;
|
|
66
|
+
|
|
67
|
+
/** @public */
|
|
68
|
+
declare interface GlobalInjections {
|
|
69
|
+
tag: string;
|
|
70
|
+
attributes?: {
|
|
71
|
+
[key: string]: string;
|
|
72
|
+
};
|
|
73
|
+
location: 'head' | 'body';
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/** @public */
|
|
77
|
+
declare interface HoistEntryStrategy {
|
|
78
|
+
type: 'hoist';
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/** @deprecated Use SegmentStrategy instead */
|
|
82
|
+
declare interface HookEntryStrategy {
|
|
83
|
+
type: 'hook';
|
|
84
|
+
manual?: Record<string, string>;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/** @public */
|
|
88
|
+
declare interface InlineEntryStrategy {
|
|
89
|
+
type: 'inline';
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/** @public */
|
|
93
|
+
export declare interface InOrderAuto {
|
|
94
|
+
strategy: 'auto';
|
|
95
|
+
maximumInitialChunk?: number;
|
|
96
|
+
maximumChunk?: number;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/** @public */
|
|
100
|
+
declare interface InOrderDirect {
|
|
101
|
+
strategy: 'direct';
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/** @public */
|
|
105
|
+
export declare interface InOrderDisabled {
|
|
106
|
+
strategy: 'disabled';
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/** @public */
|
|
110
|
+
export declare type InOrderStreaming = InOrderAuto | InOrderDisabled | InOrderDirect;
|
|
111
|
+
|
|
112
|
+
/** @public */
|
|
113
|
+
declare type JSXChildren = string | number | boolean | null | undefined | Function | RegExp | JSXChildren[] | Promise<JSXChildren> | Signal<JSXChildren> | JSXNode;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* A JSX Node, an internal structure. You probably want to use `JSXOutput` instead.
|
|
117
|
+
*
|
|
118
|
+
* @public
|
|
119
|
+
*/
|
|
120
|
+
declare interface JSXNode<T extends string | FunctionComponent | unknown = unknown> {
|
|
121
|
+
type: T;
|
|
122
|
+
props: T extends FunctionComponent<infer P> ? P : Record<any, unknown>;
|
|
123
|
+
children: JSXChildren | null;
|
|
124
|
+
key: string | null;
|
|
125
|
+
dev?: DevJSX;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Any valid output for a component
|
|
130
|
+
*
|
|
131
|
+
* @public
|
|
132
|
+
*/
|
|
133
|
+
declare type JSXOutput = JSXNode | string | number | boolean | null | undefined | JSXOutput[];
|
|
134
|
+
|
|
135
|
+
/** @public @deprecated Use `preloader` instead */
|
|
136
|
+
export declare interface PrefetchImplementation {
|
|
137
|
+
/** @deprecated No longer used. */
|
|
138
|
+
linkRel?: 'prefetch' | 'preload' | 'modulepreload' | null;
|
|
139
|
+
/** @deprecated No longer used. */
|
|
140
|
+
linkFetchPriority?: 'auto' | 'low' | 'high' | null;
|
|
141
|
+
/** @deprecated No longer used. */
|
|
142
|
+
linkInsert?: 'js-append' | 'html-append' | null;
|
|
143
|
+
/** @deprecated No longer used. */
|
|
144
|
+
workerFetchInsert?: 'always' | 'no-link-support' | null;
|
|
145
|
+
/** @deprecated No longer used. */
|
|
146
|
+
prefetchEvent?: 'always' | null;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/** @public */
|
|
150
|
+
export declare interface PrefetchResource {
|
|
151
|
+
url: string;
|
|
152
|
+
imports: PrefetchResource[];
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/** @public */
|
|
156
|
+
export declare interface PrefetchStrategy {
|
|
157
|
+
implementation?: PrefetchImplementation;
|
|
158
|
+
symbolsToPrefetch?: SymbolsToPrefetch;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/** @public */
|
|
162
|
+
export declare interface PreloaderOptions {
|
|
163
|
+
/**
|
|
164
|
+
* Maximum number of preload links to add during SSR. These instruct the browser to preload likely
|
|
165
|
+
* bundles before the preloader script is active. This most likely includes the core and the
|
|
166
|
+
* preloader script itself. Setting this to 0 will disable all preload links.
|
|
167
|
+
*
|
|
168
|
+
* Preload links can delay LCP, which is a Core Web Vital, but it can increase TTI, which is not a
|
|
169
|
+
* Core Web Vital but more noticeable to the user.
|
|
170
|
+
*
|
|
171
|
+
* Defaults to `5`
|
|
172
|
+
*/
|
|
173
|
+
ssrPreloads?: number;
|
|
174
|
+
/**
|
|
175
|
+
* The minimum probability for a bundle to be added as a preload link during SSR.
|
|
176
|
+
*
|
|
177
|
+
* Defaults to `0.7` (70% probability)
|
|
178
|
+
*
|
|
179
|
+
* This makes sure that the most likely bundles are preloaded ahead of time.
|
|
180
|
+
*/
|
|
181
|
+
ssrPreloadProbability?: number;
|
|
182
|
+
/**
|
|
183
|
+
* Log preloader debug information to the console.
|
|
184
|
+
*
|
|
185
|
+
* Defaults to `false`
|
|
186
|
+
*/
|
|
187
|
+
debug?: boolean;
|
|
188
|
+
/**
|
|
189
|
+
* Maximum number of simultaneous preload links that the preloader will maintain. If you set this
|
|
190
|
+
* higher, the browser will have all JS files in memory sooner, but it will contend with other
|
|
191
|
+
* resource downloads. Furthermore, if a bundle suddenly becomes more likely, it will have to wait
|
|
192
|
+
* longer to be preloaded.
|
|
193
|
+
*
|
|
194
|
+
* Bundles that reach 100% probability (static imports of other bundles) will always be preloaded
|
|
195
|
+
* immediately, no limit.
|
|
196
|
+
*
|
|
197
|
+
* Defaults to `25`
|
|
198
|
+
*/
|
|
199
|
+
maxIdlePreloads?: number;
|
|
200
|
+
/**
|
|
201
|
+
* @deprecated The minimum probability for a bundle to be added to the preload queue.
|
|
202
|
+
*
|
|
203
|
+
* Defaulted to `0.35` (35% probability).
|
|
204
|
+
*
|
|
205
|
+
* Deprecated because this could cause performance issues with bundles fetched on on click instead
|
|
206
|
+
* of being preloaded ahead of time.
|
|
207
|
+
*/
|
|
208
|
+
preloadProbability?: number;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/** @public */
|
|
212
|
+
declare interface QwikAsset {
|
|
213
|
+
/** Name of the asset */
|
|
214
|
+
name: string | undefined;
|
|
215
|
+
/** Size of the asset */
|
|
216
|
+
size: number;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/** @public */
|
|
220
|
+
declare interface QwikBundle {
|
|
221
|
+
/** Size of the bundle */
|
|
222
|
+
size: number;
|
|
223
|
+
/** Total size of this bundle's static import graph */
|
|
224
|
+
total: number;
|
|
225
|
+
/** Interactivity score of the bundle */
|
|
226
|
+
interactivity?: number;
|
|
227
|
+
/** Symbols in the bundle */
|
|
228
|
+
symbols?: string[];
|
|
229
|
+
/** Direct imports */
|
|
230
|
+
imports?: string[];
|
|
231
|
+
/** Dynamic imports */
|
|
232
|
+
dynamicImports?: string[];
|
|
233
|
+
/** Source files of the bundle */
|
|
234
|
+
origins?: string[];
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Bundle graph.
|
|
239
|
+
*
|
|
240
|
+
* Format: [ 'bundle-a.js', 3, 5 // Depends on 'bundle-b.js' and 'bundle-c.js' 'bundle-b.js', 5, //
|
|
241
|
+
* Depends on 'bundle-c.js' 'bundle-c.js', ]
|
|
242
|
+
*
|
|
243
|
+
* @public
|
|
244
|
+
*/
|
|
245
|
+
declare type QwikBundleGraph = Array<string | number>;
|
|
246
|
+
|
|
247
|
+
/** @public */
|
|
248
|
+
export declare interface QwikLoaderOptions {
|
|
249
|
+
/**
|
|
250
|
+
* Whether to include the qwikloader script in the document. Normally you don't need to worry
|
|
251
|
+
* about this, but in case of multi-container apps using different Qwik versions, you might want
|
|
252
|
+
* to only enable it on one of the containers.
|
|
253
|
+
*
|
|
254
|
+
* Defaults to `'auto'`.
|
|
255
|
+
*/
|
|
256
|
+
include?: 'always' | 'never' | 'auto';
|
|
257
|
+
/** @deprecated No longer used, the qwikloader is always loaded as soon as possible */
|
|
258
|
+
position?: 'top' | 'bottom';
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* The metadata of the build. One of its uses is storing where QRL symbols are located.
|
|
263
|
+
*
|
|
264
|
+
* @public
|
|
265
|
+
*/
|
|
266
|
+
declare interface QwikManifest_2 {
|
|
267
|
+
/** Content hash of the manifest, if this changes, the code changed */
|
|
268
|
+
manifestHash: string;
|
|
269
|
+
/** QRL symbols */
|
|
270
|
+
symbols: {
|
|
271
|
+
[symbolName: string]: QwikSymbol;
|
|
272
|
+
};
|
|
273
|
+
/** Where QRLs are located. The key is the symbol name, the value is the bundle fileName */
|
|
274
|
+
mapping: {
|
|
275
|
+
[symbolName: string]: string;
|
|
276
|
+
};
|
|
277
|
+
/**
|
|
278
|
+
* All code bundles, used to know the import graph. The key is the bundle fileName relative to
|
|
279
|
+
* "build/"
|
|
280
|
+
*/
|
|
281
|
+
bundles: {
|
|
282
|
+
[fileName: string]: QwikBundle;
|
|
283
|
+
};
|
|
284
|
+
/** All assets. The key is the fileName relative to the rootDir */
|
|
285
|
+
assets?: {
|
|
286
|
+
[fileName: string]: QwikAsset;
|
|
287
|
+
};
|
|
288
|
+
/** All bundles in a compact graph format with probabilities */
|
|
289
|
+
bundleGraph?: QwikBundleGraph;
|
|
290
|
+
/** The bundle graph fileName */
|
|
291
|
+
bundleGraphAsset?: string;
|
|
292
|
+
/** The preloader bundle fileName */
|
|
293
|
+
preloader?: string;
|
|
294
|
+
/** The Qwik core bundle fileName */
|
|
295
|
+
core?: string;
|
|
296
|
+
/** The Qwik loader bundle fileName */
|
|
297
|
+
qwikLoader?: string;
|
|
298
|
+
/** CSS etc to inject in the document head */
|
|
299
|
+
injections?: GlobalInjections[];
|
|
300
|
+
/** The version of the manifest */
|
|
301
|
+
version: string;
|
|
302
|
+
/** The options used to build the manifest */
|
|
303
|
+
options?: {
|
|
304
|
+
target?: string;
|
|
305
|
+
buildMode?: string;
|
|
306
|
+
entryStrategy?: {
|
|
307
|
+
type: EntryStrategy['type'];
|
|
308
|
+
};
|
|
309
|
+
};
|
|
310
|
+
/** The platform used to build the manifest */
|
|
311
|
+
platform?: {
|
|
312
|
+
[name: string]: string;
|
|
313
|
+
};
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
/** @public */
|
|
317
|
+
declare interface QwikSymbol {
|
|
318
|
+
origin: string;
|
|
319
|
+
displayName: string;
|
|
320
|
+
hash: string;
|
|
321
|
+
canonicalFilename: string;
|
|
322
|
+
ctxKind: 'function' | 'eventHandler';
|
|
323
|
+
ctxName: string;
|
|
324
|
+
/** Whether the symbol captures a variable */
|
|
325
|
+
captures: boolean;
|
|
326
|
+
parent: string | null;
|
|
327
|
+
loc: [number, number];
|
|
328
|
+
/** The parameter names if it's a function with parameters */
|
|
329
|
+
paramNames?: string[];
|
|
330
|
+
/** The transformed names of scoped variables, if any */
|
|
331
|
+
captureNames?: string[];
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
/** @public */
|
|
335
|
+
declare interface ReadonlySignal<T = unknown> {
|
|
336
|
+
readonly value: T;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
/** @public */
|
|
340
|
+
export declare type Render = RenderToString | RenderToStream;
|
|
341
|
+
|
|
342
|
+
/** @public */
|
|
343
|
+
export declare interface RenderOptions extends SerializeDocumentOptions {
|
|
344
|
+
/** Defaults to `true` */
|
|
345
|
+
snapshot?: boolean;
|
|
346
|
+
/**
|
|
347
|
+
* Specifies the root of the JS files of the client build. Setting a base, will cause the render
|
|
348
|
+
* of the `q:base` attribute in the `q:container` element.
|
|
349
|
+
*/
|
|
350
|
+
base?: string | ((options: RenderOptions) => string);
|
|
351
|
+
/** Language to use when rendering the document. */
|
|
352
|
+
locale?: string | ((options: RenderOptions) => string);
|
|
353
|
+
/**
|
|
354
|
+
* Specifies if the Qwik Loader script is added to the document or not.
|
|
355
|
+
*
|
|
356
|
+
* Defaults to `{ include: true }`.
|
|
357
|
+
*/
|
|
358
|
+
qwikLoader?: QwikLoaderOptions;
|
|
359
|
+
preloader?: PreloaderOptions | false;
|
|
360
|
+
/** @deprecated Use `preloader` instead */
|
|
361
|
+
prefetchStrategy?: PrefetchStrategy | null;
|
|
362
|
+
/**
|
|
363
|
+
* When set, the app is serialized into a fragment. And the returned html is not a complete
|
|
364
|
+
* document. Defaults to `html`
|
|
365
|
+
*/
|
|
366
|
+
containerTagName?: string;
|
|
367
|
+
containerAttributes?: Record<string, string>;
|
|
368
|
+
/** Metadata that can be retrieved during SSR with `useServerData()`. */
|
|
369
|
+
serverData?: Record<string, any>;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
/** @public */
|
|
373
|
+
export declare interface RenderResult {
|
|
374
|
+
snapshotResult: SnapshotResult | undefined;
|
|
375
|
+
isStatic: boolean;
|
|
376
|
+
manifest?: ServerQwikManifest;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
/** @public */
|
|
380
|
+
export declare type RenderToStream = (opts: RenderToStreamOptions) => Promise<RenderToStreamResult>;
|
|
381
|
+
|
|
382
|
+
/**
|
|
383
|
+
* Creates a server-side `document`, renders to root node to the document, then serializes the
|
|
384
|
+
* document to a string.
|
|
385
|
+
*
|
|
386
|
+
* @public
|
|
387
|
+
*/
|
|
388
|
+
export declare const renderToStream: (jsx: JSXOutput, opts: RenderToStreamOptions) => Promise<RenderToStreamResult>;
|
|
389
|
+
|
|
390
|
+
/** @public */
|
|
391
|
+
export declare interface RenderToStreamOptions extends RenderOptions {
|
|
392
|
+
stream: StreamWriter;
|
|
393
|
+
streaming?: StreamingOptions;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
/** @public */
|
|
397
|
+
export declare interface RenderToStreamResult extends RenderResult {
|
|
398
|
+
flushes: number;
|
|
399
|
+
size: number;
|
|
400
|
+
timing: {
|
|
401
|
+
firstFlush: number;
|
|
402
|
+
render: number;
|
|
403
|
+
snapshot: number;
|
|
404
|
+
};
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
/** @public */
|
|
408
|
+
export declare type RenderToString = (opts: RenderToStringOptions) => Promise<RenderToStringResult>;
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* Creates a server-side `document`, renders to root node to the document, then serializes the
|
|
412
|
+
* document to a string.
|
|
413
|
+
*
|
|
414
|
+
* @public
|
|
415
|
+
*/
|
|
416
|
+
export declare const renderToString: (jsx: JSXOutput, opts?: RenderToStringOptions) => Promise<RenderToStringResult>;
|
|
417
|
+
|
|
418
|
+
/** @public */
|
|
419
|
+
export declare interface RenderToStringOptions extends RenderOptions {
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
/** @public */
|
|
423
|
+
export declare interface RenderToStringResult extends RenderResult {
|
|
424
|
+
html: string;
|
|
425
|
+
timing: {
|
|
426
|
+
firstFlush: number;
|
|
427
|
+
render: number;
|
|
428
|
+
snapshot: number;
|
|
429
|
+
};
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
/** @public */
|
|
433
|
+
declare interface ResolvedManifest_2 {
|
|
434
|
+
mapper: SymbolMapper;
|
|
435
|
+
manifest: ServerQwikManifest_2;
|
|
436
|
+
injections?: GlobalInjections[];
|
|
437
|
+
bundleGraph?: QwikBundleGraph;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* Merges a given manifest with the built manifest and provides mappings for symbols.
|
|
442
|
+
*
|
|
443
|
+
* @public
|
|
444
|
+
*/
|
|
445
|
+
export declare function resolveManifest(manifest?: Partial<QwikManifest | ResolvedManifest_2> | undefined): ResolvedManifest_2 | undefined;
|
|
446
|
+
|
|
447
|
+
/** @public */
|
|
448
|
+
declare interface SegmentEntryStrategy {
|
|
449
|
+
type: 'segment';
|
|
450
|
+
manual?: Record<string, string>;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
/** @public */
|
|
454
|
+
export declare interface SerializeDocumentOptions {
|
|
455
|
+
manifest?: Partial<QwikManifest | ResolvedManifest>;
|
|
456
|
+
symbolMapper?: SymbolMapperFn;
|
|
457
|
+
debug?: boolean;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
/**
|
|
461
|
+
* The manifest values that are needed for SSR.
|
|
462
|
+
*
|
|
463
|
+
* @public
|
|
464
|
+
*/
|
|
465
|
+
declare type ServerQwikManifest_2 = Pick<QwikManifest_2, 'manifestHash' | 'injections' | 'bundleGraph' | 'bundleGraphAsset' | 'mapping' | 'preloader' | 'core' | 'qwikLoader'>;
|
|
466
|
+
|
|
467
|
+
/** @public */
|
|
468
|
+
export declare function setServerPlatform(manifest?: Partial<QwikManifest | ResolvedManifest>): Promise<void>;
|
|
469
|
+
|
|
470
|
+
/**
|
|
471
|
+
* A signal is a reactive value which can be read and written. When the signal is written, all tasks
|
|
472
|
+
* which are tracking the signal will be re-run and all components that read the signal will be
|
|
473
|
+
* re-rendered.
|
|
474
|
+
*
|
|
475
|
+
* Furthermore, when a signal value is passed as a prop to a component, the optimizer will
|
|
476
|
+
* automatically forward the signal. This means that `return <div title={signal.value}>hi</div>`
|
|
477
|
+
* will update the `title` attribute when the signal changes without having to re-render the
|
|
478
|
+
* component.
|
|
479
|
+
*
|
|
480
|
+
* @public
|
|
481
|
+
*/
|
|
482
|
+
declare interface Signal<T = any> extends ReadonlySignal<T> {
|
|
483
|
+
value: T;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
/** @public */
|
|
487
|
+
declare interface SingleEntryStrategy {
|
|
488
|
+
type: 'single';
|
|
489
|
+
manual?: Record<string, string>;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
/** @public */
|
|
493
|
+
declare interface SmartEntryStrategy {
|
|
494
|
+
type: 'smart';
|
|
495
|
+
manual?: Record<string, string>;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
/** @public */
|
|
499
|
+
export declare interface StreamingOptions {
|
|
500
|
+
inOrder?: InOrderStreaming;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
/** @public */
|
|
504
|
+
declare type SymbolMapper = Record<string, readonly [symbol: string, chunk: string]>;
|
|
505
|
+
|
|
506
|
+
/**
|
|
507
|
+
* Auto: Prefetch all possible QRLs used by the document. Default
|
|
508
|
+
*
|
|
509
|
+
* @public
|
|
510
|
+
*/
|
|
511
|
+
export declare type SymbolsToPrefetch = 'auto' | ((opts: {
|
|
512
|
+
manifest: ServerQwikManifest;
|
|
513
|
+
}) => PrefetchResource[]);
|
|
514
|
+
|
|
515
|
+
/** @public */
|
|
516
|
+
export declare const versions: {
|
|
517
|
+
readonly qwik: string;
|
|
518
|
+
readonly qwikDom: string;
|
|
519
|
+
};
|
|
520
|
+
|
|
521
|
+
export { }
|