@qwik.dev/core 2.0.0-beta.45 → 2.0.0-beta.47
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/build.d.ts +1 -1
- package/dist/backpatch/package.json +1 -1
- package/dist/build/package.json +1 -1
- package/dist/cli.mjs +2 -2
- package/dist/core-internal.d.ts +177 -108
- package/dist/core.min.mjs +10 -11
- package/dist/core.mjs +2354 -2126
- package/dist/core.mjs.map +1 -1
- package/dist/core.prod.mjs +4191 -4007
- package/dist/error-swap-executor.debug.js +2 -2
- package/dist/error-swap-executor.js +1 -1
- package/dist/insights.d.ts +2 -2
- package/dist/jsx-runtime/index.d.ts +1 -1
- package/dist/loader/package.json +1 -1
- package/dist/optimizer.d.ts +14 -4
- package/dist/optimizer.mjs +492 -446
- package/dist/out-of-order-executor.debug.js +2 -2
- package/dist/preloader.mjs +77 -69
- package/dist/server-modules.d.ts +7 -7
- package/dist/server.d.ts +17 -17
- package/dist/server.mjs +93 -62
- package/dist/server.prod.mjs +419 -384
- package/dist/starters/adapters/bun/adapters/bun/vite.config.ts +0 -1
- package/dist/testing/index.d.ts +23 -22
- package/dist/testing/index.mjs +7484 -7364
- package/dist/testing/package.json +1 -1
- package/dist/ts-optimizer.mjs +1095 -1068
- package/dist/worker/index.mjs +2 -2
- package/dist/worker/package.json +1 -1
- package/dist/worker/worker.shared.js +3 -3
- package/handlers.mjs +6 -6
- package/jsx-dev-runtime.d.ts +1 -1
- package/jsx-runtime.d.ts +1 -1
- package/loader.d.ts +1 -1
- package/optimizer.d.ts +1 -1
- package/package.json +3 -2
- package/public.d.ts +6 -6
- package/server.d.ts +1 -1
- package/testing.d.ts +1 -1
package/build.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// re-export for typescript in old resolution mode
|
|
2
|
-
export * from './dist/build';
|
|
2
|
+
export * from './dist/build/index.js';
|
package/dist/build/package.json
CHANGED
package/dist/cli.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* @qwik.dev/core/cli 2.0.0-beta.
|
|
3
|
+
* @qwik.dev/core/cli 2.0.0-beta.47-dev+919c91b
|
|
4
4
|
* Copyright QwikDev. All Rights Reserved.
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
6
|
* found in the LICENSE file at https://github.com/QwikDev/qwik/blob/main/LICENSE
|
|
@@ -12987,7 +12987,7 @@ async function printHelp(app) {
|
|
|
12987
12987
|
await runCommand2(Object.assign(app, { task: args[0], args }));
|
|
12988
12988
|
}
|
|
12989
12989
|
function printVersion() {
|
|
12990
|
-
console.log("2.0.0-beta.
|
|
12990
|
+
console.log("2.0.0-beta.47-dev+919c91b");
|
|
12991
12991
|
}
|
|
12992
12992
|
export {
|
|
12993
12993
|
runCli,
|
package/dist/core-internal.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type * as CSS_2 from 'csstype';
|
|
2
|
-
import { getAsyncLocalStorage as _getAsyncLocalStorage } from './async-local-storage';
|
|
3
|
-
import { isBrowser } from './build';
|
|
4
|
-
import { isDev } from './build';
|
|
5
|
-
import { isServer } from './build';
|
|
6
|
-
import { ResolvedManifest } from './optimizer';
|
|
7
|
-
import type { ServerQwikManifest } from './optimizer';
|
|
2
|
+
import { getAsyncLocalStorage as _getAsyncLocalStorage } from './async-local-storage.js';
|
|
3
|
+
import { isBrowser } from './build/index.js';
|
|
4
|
+
import { isDev } from './build/index.js';
|
|
5
|
+
import { isServer } from './build/index.js';
|
|
6
|
+
import { ResolvedManifest } from './optimizer.js';
|
|
7
|
+
import type { ServerQwikManifest } from './optimizer.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Qwik Optimizer marker function.
|
|
@@ -453,19 +453,91 @@ declare type BivariantQrlFn<ARGS extends any[], RETURN> = {
|
|
|
453
453
|
/** @public */
|
|
454
454
|
declare type Booleanish = boolean | `${boolean}`;
|
|
455
455
|
|
|
456
|
+
/** @internal */
|
|
457
|
+
export declare const _caC: (props: CatchProps) => JSXOutput;
|
|
458
|
+
|
|
456
459
|
declare type Capture = {
|
|
457
460
|
[K in keyof HTMLElementEventMap as `capture:${K}`]?: boolean;
|
|
458
461
|
};
|
|
459
462
|
|
|
460
463
|
/**
|
|
461
|
-
*
|
|
462
|
-
*
|
|
463
|
-
* module scope.
|
|
464
|
+
* Legacy binding for libraries built before `_capturesObj`; their segments read `_captures[N]` from
|
|
465
|
+
* their own copy of core, so this live binding is kept in sync.
|
|
464
466
|
*
|
|
467
|
+
* @deprecated Use `_capturesObj._` instead.
|
|
465
468
|
* @internal
|
|
466
469
|
*/
|
|
467
470
|
export declare let _captures: Readonly<unknown[]> | null;
|
|
468
471
|
|
|
472
|
+
/**
|
|
473
|
+
* Holder for the current captured scope during QRL invocation. This is used to provide the lexical
|
|
474
|
+
* scope for QRL functions. It is used one time per invocation, synchronously, so it is safe to
|
|
475
|
+
* store it in one place.
|
|
476
|
+
*
|
|
477
|
+
* It is an object (instead of a `let` binding) registered as a singleton, so that duplicated Qwik
|
|
478
|
+
* modules (e.g. an externalized library and the app both bundling core) share the same holder.
|
|
479
|
+
* Generated segment code reads captures as `_capturesObj._[N]`.
|
|
480
|
+
*
|
|
481
|
+
* @internal
|
|
482
|
+
*/
|
|
483
|
+
export declare const _capturesObj: {
|
|
484
|
+
_: Readonly<unknown[]> | null;
|
|
485
|
+
};
|
|
486
|
+
|
|
487
|
+
/** @internal */
|
|
488
|
+
export declare const _caR: () => void;
|
|
489
|
+
|
|
490
|
+
/** Renders `fallback$` instead of its children when a descendant throws. @public @experimental */
|
|
491
|
+
export declare const Catch: Component<CatchProps>;
|
|
492
|
+
|
|
493
|
+
/** Structured metadata about a caught error, passed to `onError$`. @public @experimental */
|
|
494
|
+
export declare interface CatchInfo {
|
|
495
|
+
/** Where the caught error originated. */
|
|
496
|
+
phase: CatchPhase;
|
|
497
|
+
/**
|
|
498
|
+
* Identifies the boundary within the page. Allocated in render order and kept across a resume, so
|
|
499
|
+
* every report from one boundary shares it — but it shifts when render order changes.
|
|
500
|
+
*/
|
|
501
|
+
boundaryId: string;
|
|
502
|
+
/**
|
|
503
|
+
* The code a production fallback shows for a server-origin error, so a user's bug report matches
|
|
504
|
+
* your logs. An error caught during SSR reports a second, different digest if the client
|
|
505
|
+
* re-derives it — the stacks differ.
|
|
506
|
+
*/
|
|
507
|
+
digest: string;
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
/** Identifies where an error caught by an error boundary originated. @public @experimental */
|
|
511
|
+
export declare const enum CatchPhase {
|
|
512
|
+
Render = "render",
|
|
513
|
+
Event = "event",
|
|
514
|
+
Hook = "hook"
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
/** @public @experimental */
|
|
518
|
+
export declare interface CatchProps {
|
|
519
|
+
/**
|
|
520
|
+
* Rendered when a descendant throws. The error is always an `Error`, so `{error.message}` is
|
|
521
|
+
* safe: a non-Error throw is wrapped, and production redacts server-origin errors to a generic
|
|
522
|
+
* message plus `digest`. Client-origin errors render as thrown — their messages already live in
|
|
523
|
+
* the browser bundle.
|
|
524
|
+
*
|
|
525
|
+
* Wrap `reset` in a handler — `onClick$={() => reset()}`, not `onClick$={reset}` — so it stays
|
|
526
|
+
* wired in a streamed fallback.
|
|
527
|
+
*/
|
|
528
|
+
fallback$: QRL<(error: Error & {
|
|
529
|
+
digest?: string;
|
|
530
|
+
}, reset: QRL<() => void>) => JSXOutput>;
|
|
531
|
+
/**
|
|
532
|
+
* Side effect only; never affects rendering. Receives the original `Error` — a non-Error throw
|
|
533
|
+
* arrives wrapped, with `cause` set to the raw value.
|
|
534
|
+
*
|
|
535
|
+
* An error caught during SSR fires again when the client re-derives it, so dedupe in your
|
|
536
|
+
* reporter.
|
|
537
|
+
*/
|
|
538
|
+
onError$?: QRL<(error: Error, info: CatchInfo) => void>;
|
|
539
|
+
}
|
|
540
|
+
|
|
469
541
|
/**
|
|
470
542
|
* Handles events for bind:checked
|
|
471
543
|
*
|
|
@@ -684,6 +756,19 @@ export declare type ComputedReturnType<T> = ComputedSignal<Awaited<T>>;
|
|
|
684
756
|
* @public
|
|
685
757
|
*/
|
|
686
758
|
export declare interface ComputedSignal<T> extends Signal<T> {
|
|
759
|
+
/**
|
|
760
|
+
* Whether the signal is currently loading. Reading it starts a lazy computation if needed.
|
|
761
|
+
*
|
|
762
|
+
* @experimental
|
|
763
|
+
*/
|
|
764
|
+
pending: boolean;
|
|
765
|
+
/**
|
|
766
|
+
* The computation error, if any. Reading it starts a lazy computation if needed. While set,
|
|
767
|
+
* reading `.value` throws the error.
|
|
768
|
+
*
|
|
769
|
+
* @experimental
|
|
770
|
+
*/
|
|
771
|
+
error: Error | undefined;
|
|
687
772
|
/** @deprecated Use `trigger()` instead */
|
|
688
773
|
force(): void;
|
|
689
774
|
/** Use this to force recalculation. */
|
|
@@ -833,16 +918,6 @@ declare class ComputedSignalImpl<T, S extends _QRLInternal = ComputeQRL<T>> exte
|
|
|
833
918
|
* @internal
|
|
834
919
|
*/
|
|
835
920
|
export declare interface _ComputedSignalInternal<T> extends ComputedSignal<T> {
|
|
836
|
-
/**
|
|
837
|
-
* Whether the signal is currently loading. This will trigger lazy computation of the signal, so
|
|
838
|
-
* you can use it like this:
|
|
839
|
-
*
|
|
840
|
-
* ```tsx
|
|
841
|
-
* signal.pending ? <Loading /> : signal.error ? <Error /> : <Component
|
|
842
|
-
* value={signal.value} />
|
|
843
|
-
* ```
|
|
844
|
-
*/
|
|
845
|
-
pending: boolean;
|
|
846
921
|
/**
|
|
847
922
|
* Lets you read the pending state without subscribing to `.pending` updates. It also triggers
|
|
848
923
|
* lazy computation of the signal.
|
|
@@ -854,12 +929,6 @@ export declare interface _ComputedSignalInternal<T> extends ComputedSignal<T> {
|
|
|
854
929
|
loading: boolean;
|
|
855
930
|
/** @deprecated Use `untrackedPending` instead */
|
|
856
931
|
untrackedLoading: boolean;
|
|
857
|
-
/**
|
|
858
|
-
* The error that occurred while computing the signal, if any, including synchronous throws. This
|
|
859
|
-
* will be cleared when the signal is successfully computed. It also triggers lazy computation of
|
|
860
|
-
* the signal. While the error is set, reading `.value` throws it.
|
|
861
|
-
*/
|
|
862
|
-
error: Error | undefined;
|
|
863
932
|
/**
|
|
864
933
|
* Lets you read the error state without subscribing to `.error` updates. It also triggers lazy
|
|
865
934
|
* computation of the signal.
|
|
@@ -901,7 +970,7 @@ export declare interface _Container {
|
|
|
901
970
|
$resolveRenderPromise$: (() => void) | null;
|
|
902
971
|
$pendingCount$: number;
|
|
903
972
|
$checkPendingCount$(): void;
|
|
904
|
-
handleError(err: any, $host$: _HostElement | null, phase?:
|
|
973
|
+
handleError(err: any, $host$: _HostElement | null, phase?: CatchPhase): void;
|
|
905
974
|
getParentHost(host: _HostElement): _HostElement | null;
|
|
906
975
|
setContext<T>(host: _HostElement, context: ContextId<T>, value: T): void;
|
|
907
976
|
resolveContext<T>(host: _HostElement, contextId: ContextId<T>): T | undefined;
|
|
@@ -1296,7 +1365,7 @@ declare class DomContainer extends _SharedContainer implements ClientContainer {
|
|
|
1296
1365
|
$hoistStyles$(): void;
|
|
1297
1366
|
$setRawState$(id: number, vParent: _VNode): void;
|
|
1298
1367
|
parseQRL<T = unknown>(qrlStr: string): QRL<T>;
|
|
1299
|
-
handleError(err: any, host: _VNode | null, phase?:
|
|
1368
|
+
handleError(err: any, host: _VNode | null, phase?: CatchPhase): void;
|
|
1300
1369
|
setContext<T>(host: _VNode, context: ContextId<T>, value: T): void;
|
|
1301
1370
|
resolveContext<T>(host: _VNode, contextId: ContextId<T>): T | undefined;
|
|
1302
1371
|
resolveContextHost(host: _VNode, contextId: ContextId<unknown>): _VNode | null;
|
|
@@ -1338,12 +1407,6 @@ declare interface EachProps<T, ITEM extends JSXOutput = JSXOutput> {
|
|
|
1338
1407
|
/** @internal */
|
|
1339
1408
|
export declare const _eaT: ({ track }: TaskCtx) => Promise<void>;
|
|
1340
1409
|
|
|
1341
|
-
/** @internal */
|
|
1342
|
-
export declare const _ebC: (props: ErrorBoundaryProps) => JSXOutput;
|
|
1343
|
-
|
|
1344
|
-
/** @internal */
|
|
1345
|
-
export declare const _ebR: () => void;
|
|
1346
|
-
|
|
1347
1410
|
/** @internal */
|
|
1348
1411
|
export declare const _EFFECT_BACK_REF: unique symbol;
|
|
1349
1412
|
|
|
@@ -1415,57 +1478,6 @@ export declare const _EMPTY_ARRAY: any[];
|
|
|
1415
1478
|
/** @internal */
|
|
1416
1479
|
export declare const _EMPTY_OBJ: Record<string, any>;
|
|
1417
1480
|
|
|
1418
|
-
/** Renders `fallback$` instead of its children when a descendant throws. @public @experimental */
|
|
1419
|
-
export declare const ErrorBoundary: Component<ErrorBoundaryProps>;
|
|
1420
|
-
|
|
1421
|
-
/** Structured metadata about a caught error, passed to `onError$`. @public @experimental */
|
|
1422
|
-
export declare interface ErrorBoundaryInfo {
|
|
1423
|
-
/** Where the caught error originated. */
|
|
1424
|
-
phase: ErrorBoundaryPhase;
|
|
1425
|
-
/**
|
|
1426
|
-
* Identifies the boundary within the page. Allocated in render order and kept across a resume, so
|
|
1427
|
-
* every report from one boundary shares it — but it shifts when render order changes.
|
|
1428
|
-
*/
|
|
1429
|
-
boundaryId: string;
|
|
1430
|
-
/**
|
|
1431
|
-
* The code a production fallback shows for a server-origin error, so a user's bug report matches
|
|
1432
|
-
* your logs. An error caught during SSR reports a second, different digest if the client
|
|
1433
|
-
* re-derives it — the stacks differ.
|
|
1434
|
-
*/
|
|
1435
|
-
digest: string;
|
|
1436
|
-
}
|
|
1437
|
-
|
|
1438
|
-
/** Identifies where an error caught by an error boundary originated. @public @experimental */
|
|
1439
|
-
export declare const enum ErrorBoundaryPhase {
|
|
1440
|
-
Render = "render",
|
|
1441
|
-
Event = "event",
|
|
1442
|
-
Hook = "hook"
|
|
1443
|
-
}
|
|
1444
|
-
|
|
1445
|
-
/** @public @experimental */
|
|
1446
|
-
export declare interface ErrorBoundaryProps {
|
|
1447
|
-
/**
|
|
1448
|
-
* Rendered when a descendant throws. The error is always an `Error`, so `{error.message}` is
|
|
1449
|
-
* safe: a non-Error throw is wrapped, and production redacts server-origin errors to a generic
|
|
1450
|
-
* message plus `digest`. Client-origin errors render as thrown — their messages already live in
|
|
1451
|
-
* the browser bundle.
|
|
1452
|
-
*
|
|
1453
|
-
* Wrap `reset` in a handler — `onClick$={() => reset()}`, not `onClick$={reset}` — so it stays
|
|
1454
|
-
* wired in a streamed fallback.
|
|
1455
|
-
*/
|
|
1456
|
-
fallback$: QRL<(error: Error & {
|
|
1457
|
-
digest?: string;
|
|
1458
|
-
}, reset: QRL<() => void>) => JSXOutput>;
|
|
1459
|
-
/**
|
|
1460
|
-
* Side effect only; never affects rendering. Receives the original `Error` — a non-Error throw
|
|
1461
|
-
* arrives wrapped, with `cause` set to the raw value.
|
|
1462
|
-
*
|
|
1463
|
-
* An error caught during SSR fires again when the client re-derives it, so dedupe in your
|
|
1464
|
-
* reporter.
|
|
1465
|
-
*/
|
|
1466
|
-
onError$?: QRL<(error: Error, info: ErrorBoundaryInfo) => void>;
|
|
1467
|
-
}
|
|
1468
|
-
|
|
1469
1481
|
/** @public */
|
|
1470
1482
|
export declare const event$: <T>(qrl: T) => QRL<T>;
|
|
1471
1483
|
|
|
@@ -1586,6 +1598,13 @@ export declare const getPlatform: () => CorePlatform;
|
|
|
1586
1598
|
/** @internal */
|
|
1587
1599
|
export declare function _getQContainerElement(element: Element): Element | null;
|
|
1588
1600
|
|
|
1601
|
+
/**
|
|
1602
|
+
* Read a singleton registered with `registerSingleton`, if any.
|
|
1603
|
+
*
|
|
1604
|
+
* @internal
|
|
1605
|
+
*/
|
|
1606
|
+
export declare const _getSingleton: <T>(key: string) => T | undefined;
|
|
1607
|
+
|
|
1589
1608
|
/** @internal */
|
|
1590
1609
|
export declare function _getSubscriber(effect: Consumer, prop: _EffectProperty | string, data?: _SubscriptionData): EffectSubscription;
|
|
1591
1610
|
|
|
@@ -1603,7 +1622,10 @@ export { h as createElement }
|
|
|
1603
1622
|
export { h }
|
|
1604
1623
|
|
|
1605
1624
|
/** @internal */
|
|
1606
|
-
export declare function _handleSSRError(container: SSRContainer, err: any, host: ISsrNode | null, phase:
|
|
1625
|
+
export declare function _handleSSRError(container: SSRContainer, err: any, host: ISsrNode | null, phase: CatchPhase): void;
|
|
1626
|
+
|
|
1627
|
+
/** @internal */
|
|
1628
|
+
export declare function _hasSlotProps(props: Props | null | undefined): boolean;
|
|
1607
1629
|
|
|
1608
1630
|
/**
|
|
1609
1631
|
* @returns True if the store has effects for the given prop
|
|
@@ -1616,7 +1638,7 @@ export declare const _hasStoreEffects: (value: StoreTarget, prop: keyof StoreTar
|
|
|
1616
1638
|
*
|
|
1617
1639
|
* When called by the qwikloader or the test dispatch, `this` is the serialized captures string
|
|
1618
1640
|
* which we deserialize to get the host VNode. When called through `_qDispatch` (client-rendered),
|
|
1619
|
-
* `
|
|
1641
|
+
* `_capturesObj._` is already set by `ensureQrlCaptures` in the QRL call chain.
|
|
1620
1642
|
*
|
|
1621
1643
|
* @internal
|
|
1622
1644
|
*/
|
|
@@ -1868,6 +1890,7 @@ declare interface ISsrNode {
|
|
|
1868
1890
|
readonly [_EFFECT_BACK_REF]: Map<_EffectProperty | string, EffectSubscription> | null;
|
|
1869
1891
|
setProp(name: string, value: any): void;
|
|
1870
1892
|
getProp(name: string): any;
|
|
1893
|
+
hasSlotProps(): boolean;
|
|
1871
1894
|
removeProp(name: string): void;
|
|
1872
1895
|
addChild(child: ISsrNode): void;
|
|
1873
1896
|
setTreeNonUpdatable(): void;
|
|
@@ -2349,6 +2372,21 @@ declare type Passive = {
|
|
|
2349
2372
|
[K in keyof HTMLElementEventMap as `passive:${K}`]?: boolean;
|
|
2350
2373
|
};
|
|
2351
2374
|
|
|
2375
|
+
/** @internal */
|
|
2376
|
+
export declare const _peC: (props: PendingProps) => JSXNodeInternal<string>[];
|
|
2377
|
+
|
|
2378
|
+
/** @public @experimental */
|
|
2379
|
+
export declare const Pending: Component<PendingProps>;
|
|
2380
|
+
|
|
2381
|
+
/** @public @experimental */
|
|
2382
|
+
export declare type PendingProps = {
|
|
2383
|
+
fallback$?: QRL<() => JSXOutput>;
|
|
2384
|
+
delay?: number;
|
|
2385
|
+
};
|
|
2386
|
+
|
|
2387
|
+
/** @internal */
|
|
2388
|
+
export declare const _peT: ({ track, cleanup }: TaskCtx) => void;
|
|
2389
|
+
|
|
2352
2390
|
declare type PopoverTargetAction = 'hide' | 'show' | 'toggle';
|
|
2353
2391
|
|
|
2354
2392
|
declare type PossibleEvents = Event | typeof TaskEvent | typeof RenderEvent;
|
|
@@ -2380,6 +2418,8 @@ export declare const PrefetchServiceWorker: (opts: {
|
|
|
2380
2418
|
nonce?: string;
|
|
2381
2419
|
}) => JSXOutput;
|
|
2382
2420
|
|
|
2421
|
+
declare type Preload = (item: string | string[], probability?: number) => void;
|
|
2422
|
+
|
|
2383
2423
|
/**
|
|
2384
2424
|
* Preprocess the state data to:
|
|
2385
2425
|
*
|
|
@@ -2516,7 +2556,7 @@ export declare interface _QDocument extends Document {
|
|
|
2516
2556
|
qVNodeDataProcessed?: boolean;
|
|
2517
2557
|
/** Processes one vnode patch script. */
|
|
2518
2558
|
qProcessVNodeDataPatch?: (script: Element | null) => void;
|
|
2519
|
-
/** Processes an out-of-order
|
|
2559
|
+
/** Processes an out-of-order Pending segment after its resolved HTML is swapped in. */
|
|
2520
2560
|
qProcessOOOS?: (boundaryId: number, revealNode: Element | null) => void;
|
|
2521
2561
|
/** Routes `qerror` to the owning container; installed once per document, shared by all bundles. */
|
|
2522
2562
|
qErrorHandler?: (e: Event) => void;
|
|
@@ -2913,6 +2953,14 @@ export declare type QwikSVGElements = {
|
|
|
2913
2953
|
[K in keyof Omit<SVGElementTagNameMap, keyof HTMLElementTagNameMap>]: SVGProps<SVGElementTagNameMap[K]>;
|
|
2914
2954
|
};
|
|
2915
2955
|
|
|
2956
|
+
/**
|
|
2957
|
+
* A marker symbol shared by every copy of this Qwik version. `Symbol.for` keys are global to the
|
|
2958
|
+
* realm, so the version keeps markers apart when several Qwik versions share a page.
|
|
2959
|
+
*
|
|
2960
|
+
* @internal
|
|
2961
|
+
*/
|
|
2962
|
+
export declare const _qwikSymbol: <S extends symbol = symbol>(name: string) => S;
|
|
2963
|
+
|
|
2916
2964
|
/** Emitted by qwik-loader on document when a module was lazily loaded @public */
|
|
2917
2965
|
export declare type QwikSymbolEvent = CustomEvent<{
|
|
2918
2966
|
symbol: string;
|
|
@@ -2975,6 +3023,22 @@ declare type RefFnInterface<EL> = {
|
|
|
2975
3023
|
(el: EL): void;
|
|
2976
3024
|
};
|
|
2977
3025
|
|
|
3026
|
+
/**
|
|
3027
|
+
* Registers the function of an inlined QRL by its hash, so the server can call it by hash. The
|
|
3028
|
+
* router uses it for the `server$` functions of a library kept external on the server, whose build
|
|
3029
|
+
* inlines its QRLs instead of emitting segments.
|
|
3030
|
+
*
|
|
3031
|
+
* @internal
|
|
3032
|
+
*/
|
|
3033
|
+
export declare const _regInlinedQrl: (qrl: QRL) => void;
|
|
3034
|
+
|
|
3035
|
+
/**
|
|
3036
|
+
* Get or create a singleton shared by all Qwik module instances in this process/version.
|
|
3037
|
+
*
|
|
3038
|
+
* @internal
|
|
3039
|
+
*/
|
|
3040
|
+
export declare const _registerSingleton: <T>(key: string, factory: () => T) => T;
|
|
3041
|
+
|
|
2978
3042
|
/**
|
|
2979
3043
|
* Register a QRL symbol globally for lookup by its hash. This is used by the optimizer to register
|
|
2980
3044
|
* the names passed in `reg_ctx_name`.
|
|
@@ -3040,6 +3104,9 @@ export declare interface RenderSSROptions {
|
|
|
3040
3104
|
manifestHash: string;
|
|
3041
3105
|
}
|
|
3042
3106
|
|
|
3107
|
+
/** @internal */
|
|
3108
|
+
export declare const _requestPreload: Preload;
|
|
3109
|
+
|
|
3043
3110
|
/** @internal */
|
|
3044
3111
|
export declare const _reR: () => boolean;
|
|
3045
3112
|
|
|
@@ -3247,7 +3314,7 @@ declare interface SerializationContext {
|
|
|
3247
3314
|
$setSyncFnOffset$(offset: number, existingFns?: string[]): void;
|
|
3248
3315
|
$isSsrNode$: (obj: unknown) => obj is ISsrNode;
|
|
3249
3316
|
$isDomRef$: (obj: unknown) => obj is DomRef;
|
|
3250
|
-
$markSsrNodeForSerialization$: (node: ISsrNode, flags: number) => void;
|
|
3317
|
+
$markSsrNodeForSerialization$: (node: ISsrNode, flags: number, isStateRoot?: boolean) => void;
|
|
3251
3318
|
$writer$: SSRInternalStreamWriter;
|
|
3252
3319
|
$setWriter$(writer: SSRInternalStreamWriter): void;
|
|
3253
3320
|
$syncFns$: string[];
|
|
@@ -3442,7 +3509,7 @@ export declare abstract class _SharedContainer implements _Container {
|
|
|
3442
3509
|
} | null, symbolToChunkResolver: SymbolToChunkResolver, writer?: StreamWriter): SerializationContext;
|
|
3443
3510
|
$checkPendingCount$(): void;
|
|
3444
3511
|
abstract ensureProjectionResolved(host: _HostElement): void;
|
|
3445
|
-
abstract handleError(err: any, $host$: _HostElement | null, phase?:
|
|
3512
|
+
abstract handleError(err: any, $host$: _HostElement | null, phase?: CatchPhase): void;
|
|
3446
3513
|
abstract getParentHost(host: _HostElement): _HostElement | null;
|
|
3447
3514
|
abstract setContext<T>(host: _HostElement, context: ContextId<T>, value: T): void;
|
|
3448
3515
|
abstract resolveContext<T>(host: _HostElement, contextId: ContextId<T>): T | undefined;
|
|
@@ -3795,9 +3862,9 @@ declare interface SSRContainer extends _Container {
|
|
|
3795
3862
|
additionalHeadNodes: Array<JSXNodeInternal>;
|
|
3796
3863
|
additionalBodyNodes: Array<JSXNodeInternal>;
|
|
3797
3864
|
$noScriptHere$: number;
|
|
3798
|
-
/** Innermost open
|
|
3865
|
+
/** Innermost open Catch content host, so the walker can skip an errored subtree. */
|
|
3799
3866
|
$errorContentHost$: ISsrNode | null;
|
|
3800
|
-
/** Set when
|
|
3867
|
+
/** Set when a Catch caught during this container's render. */
|
|
3801
3868
|
$hasBoundaryError$?: boolean;
|
|
3802
3869
|
/**
|
|
3803
3870
|
* Lets the container place a root-level `useOn` placeholder `<script>` itself when injecting it
|
|
@@ -3978,21 +4045,6 @@ export declare class _SubscriptionPatch {
|
|
|
3978
4045
|
constructor(rootId?: number, subscriptions?: Set<EffectSubscription> | Map<string | symbol, Set<EffectSubscription>>);
|
|
3979
4046
|
}
|
|
3980
4047
|
|
|
3981
|
-
/** @internal */
|
|
3982
|
-
export declare const _suC: (props: SuspenseProps) => JSXNodeInternal<string>[];
|
|
3983
|
-
|
|
3984
|
-
/** @public @experimental */
|
|
3985
|
-
export declare const Suspense: typeof _suC;
|
|
3986
|
-
|
|
3987
|
-
/** @public @experimental */
|
|
3988
|
-
export declare type SuspenseProps = {
|
|
3989
|
-
fallback?: JSXOutput;
|
|
3990
|
-
delay?: number;
|
|
3991
|
-
};
|
|
3992
|
-
|
|
3993
|
-
/** @internal */
|
|
3994
|
-
export declare const _suT: ({ track, cleanup }: TaskCtx) => void;
|
|
3995
|
-
|
|
3996
4048
|
/**
|
|
3997
4049
|
* The TS types don't include the SVG attributes so we have to define them ourselves
|
|
3998
4050
|
*
|
|
@@ -4644,7 +4696,7 @@ export declare const useId: () => string;
|
|
|
4644
4696
|
* NOTE: `useLexicalScope` method can only be used in the synchronous portion of the callback
|
|
4645
4697
|
* (before any `await` statements.)
|
|
4646
4698
|
*
|
|
4647
|
-
* @deprecated Use `
|
|
4699
|
+
* @deprecated Use `_capturesObj._` instead.
|
|
4648
4700
|
* @internal
|
|
4649
4701
|
*/
|
|
4650
4702
|
export declare const useLexicalScope: <VARS extends any[]>() => VARS;
|
|
@@ -5029,6 +5081,12 @@ export declare const useStylesScopedQrl: (styles: QRL<string>) => UseStylesScope
|
|
|
5029
5081
|
* function to wrap property reads. This creates subscriptions that will trigger the `taskFn` to
|
|
5030
5082
|
* rerun.
|
|
5031
5083
|
*
|
|
5084
|
+
* Cleanup callbacks registered with `cleanup()` or returned from the task may be async. When a task
|
|
5085
|
+
* reruns, Qwik waits for the previous cleanup to finish before starting the next invocation.
|
|
5086
|
+
*
|
|
5087
|
+
* During SSR, the cleanup function is called immediately after SSR completes. Therefore, it is not
|
|
5088
|
+
* called on the client side after resuming, but only the second time the task runs on the client.
|
|
5089
|
+
*
|
|
5032
5090
|
* @param task - Function which should be re-executed when changes to the inputs are detected
|
|
5033
5091
|
* @public
|
|
5034
5092
|
*
|
|
@@ -5102,6 +5160,14 @@ export declare const useTaskQrl: (qrl: QRL<TaskFn>, opts?: TaskOptions) => void;
|
|
|
5102
5160
|
* });
|
|
5103
5161
|
* ```
|
|
5104
5162
|
*
|
|
5163
|
+
* Visible Tasks are a variant of Tasks that only run in the browser, and are registered but not
|
|
5164
|
+
* executed during SSR. They are useful for running code that should only execute in the browser,
|
|
5165
|
+
* such as code that interacts with the DOM or browser APIs.
|
|
5166
|
+
*
|
|
5167
|
+
* Cleanup callbacks registered with `cleanup()` or returned from the task may be async. When a
|
|
5168
|
+
* visible task reruns, Qwik waits for the previous cleanup to finish before starting the next
|
|
5169
|
+
* invocation.
|
|
5170
|
+
*
|
|
5105
5171
|
* @public
|
|
5106
5172
|
*/
|
|
5107
5173
|
export declare const useVisibleTask$: (fn: TaskFn, opts?: OnVisibleTaskOptions) => void;
|
|
@@ -5130,7 +5196,7 @@ export declare const _VAR_PROPS: unique symbol;
|
|
|
5130
5196
|
export declare const _verifySerializable: <T>(value: T, preMessage?: string) => T;
|
|
5131
5197
|
|
|
5132
5198
|
/**
|
|
5133
|
-
* 2.0.0-beta.
|
|
5199
|
+
* 2.0.0-beta.47-dev+919c91b
|
|
5134
5200
|
*
|
|
5135
5201
|
* @public
|
|
5136
5202
|
*/
|
|
@@ -5304,6 +5370,9 @@ export declare const _waitUntilRendered: (container: _Container) => Promise<void
|
|
|
5304
5370
|
/** @internal */
|
|
5305
5371
|
export declare function _walkJSX(ssr: SSRContainer, value: JSXOutput, options: SSRRenderJSXOptions): Promise<void>;
|
|
5306
5372
|
|
|
5373
|
+
/** @internal */
|
|
5374
|
+
export declare const _whenContainerDataReady: <T>(container: ClientContainer, callback: () => T | Promise<T>) => T | Promise<T>;
|
|
5375
|
+
|
|
5307
5376
|
/**
|
|
5308
5377
|
* Override the `getLocale` with `lang` within the `fn` execution.
|
|
5309
5378
|
*
|