@qwik.dev/core 2.0.0-beta.15 → 2.0.0-beta.17
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/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 +70 -131
- package/dist/core.min.mjs +1 -1
- package/dist/core.mjs +5941 -6110
- package/dist/core.mjs.map +1 -1
- package/dist/core.prod.mjs +3273 -3305
- package/dist/loader/package.json +1 -1
- package/dist/optimizer.mjs +1 -1
- package/dist/server.mjs +447 -414
- package/dist/testing/index.d.ts +28 -263
- package/dist/testing/index.mjs +4807 -4966
- package/dist/testing/package.json +1 -1
- package/package.json +3 -3
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.17-dev+c34c237
|
|
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
|
|
@@ -5625,7 +5625,7 @@ async function printHelp(app) {
|
|
|
5625
5625
|
await runCommand2(Object.assign(app, { task: args[0], args }));
|
|
5626
5626
|
}
|
|
5627
5627
|
function printVersion() {
|
|
5628
|
-
console.log("2.0.0-beta.
|
|
5628
|
+
console.log("2.0.0-beta.17-dev+c34c237");
|
|
5629
5629
|
}
|
|
5630
5630
|
export {
|
|
5631
5631
|
runCli,
|
package/dist/core-internal.d.ts
CHANGED
|
@@ -409,7 +409,7 @@ declare class AsyncComputedSignalImpl<T> extends ComputedSignalImpl<T | undefine
|
|
|
409
409
|
private setValue;
|
|
410
410
|
}
|
|
411
411
|
|
|
412
|
-
declare type AsyncComputeQRL<T> =
|
|
412
|
+
declare type AsyncComputeQRL<T> = _QRLInternal<AsyncComputedFn<T>>;
|
|
413
413
|
|
|
414
414
|
/**
|
|
415
415
|
* Replace given element's props with custom types and return all props specific to the element. Use
|
|
@@ -421,7 +421,7 @@ declare type Augmented<E, A = {}> = Prettify<Filtered<E, A> & A>;
|
|
|
421
421
|
|
|
422
422
|
/** Class for back reference to the EffectSubscription */
|
|
423
423
|
declare abstract class BackRef {
|
|
424
|
-
[_EFFECT_BACK_REF]: Map<
|
|
424
|
+
[_EFFECT_BACK_REF]: Map<any, any> | undefined;
|
|
425
425
|
}
|
|
426
426
|
|
|
427
427
|
declare type BivariantQrlFn<ARGS extends any[], RETURN> = {
|
|
@@ -444,51 +444,16 @@ declare type Booleanish = boolean | `${boolean}`;
|
|
|
444
444
|
*/
|
|
445
445
|
export declare const _chk: (_: any, element: HTMLInputElement) => void;
|
|
446
446
|
|
|
447
|
-
declare
|
|
448
|
-
$type$: T;
|
|
449
|
-
$idx$: number | string;
|
|
450
|
-
$host$: HostElement;
|
|
451
|
-
$target$: ChoreTarget | null;
|
|
452
|
-
$payload$: unknown;
|
|
453
|
-
$state$: ChoreState;
|
|
454
|
-
$blockedChores$: ChoreArray | null;
|
|
455
|
-
$startTime$: number | undefined;
|
|
456
|
-
$endTime$: number | undefined;
|
|
457
|
-
$resolve$: ((value: any) => void) | undefined;
|
|
458
|
-
$reject$: ((reason?: any) => void) | undefined;
|
|
459
|
-
$returnValue$: ValueOrPromise<ChoreReturnValue<T>>;
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
declare class ChoreArray extends Array<Chore> {
|
|
463
|
-
add(value: Chore): number;
|
|
464
|
-
delete(value: Chore): number;
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
declare type ChoreReturnValue<T extends ChoreType = ChoreType> = T extends ChoreType.RECOMPUTE_AND_SCHEDULE_EFFECTS | ChoreType.WAIT_FOR_QUEUE | ChoreType.NODE_PROP ? void : T extends ChoreType.NODE_DIFF | ChoreType.COMPONENT ? JSXOutput : unknown;
|
|
468
|
-
|
|
469
|
-
declare enum ChoreState {
|
|
447
|
+
declare const enum ChoreBits {
|
|
470
448
|
NONE = 0,
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
MACRO = 240,
|
|
480
|
-
MICRO = 15,
|
|
481
|
-
/** Ensure that the QRL promise is resolved before processing next chores in the queue */
|
|
482
|
-
QRL_RESOLVE = 1,
|
|
483
|
-
RUN_QRL = 2,
|
|
484
|
-
TASK = 3,
|
|
485
|
-
NODE_DIFF = 4,
|
|
486
|
-
NODE_PROP = 5,
|
|
487
|
-
COMPONENT = 6,
|
|
488
|
-
RECOMPUTE_AND_SCHEDULE_EFFECTS = 7,
|
|
489
|
-
VISIBLE = 16,
|
|
490
|
-
CLEANUP_VISIBLE = 32,
|
|
491
|
-
WAIT_FOR_QUEUE = 255
|
|
449
|
+
TASKS = 1,
|
|
450
|
+
NODE_DIFF = 2,
|
|
451
|
+
COMPONENT = 4,
|
|
452
|
+
NODE_PROPS = 8,
|
|
453
|
+
COMPUTE = 16,
|
|
454
|
+
CHILDREN = 32,
|
|
455
|
+
CLEANUP = 64,
|
|
456
|
+
DIRTY_MASK = 127
|
|
492
457
|
}
|
|
493
458
|
|
|
494
459
|
/**
|
|
@@ -511,9 +476,7 @@ export declare interface ClientContainer extends Container {
|
|
|
511
476
|
$locale$: string;
|
|
512
477
|
qManifestHash: string;
|
|
513
478
|
rootVNode: _ElementVNode;
|
|
514
|
-
$journal$: VNodeJournal;
|
|
515
479
|
$forwardRefs$: Array<number> | null;
|
|
516
|
-
$flushEpoch$: number;
|
|
517
480
|
parseQRL<T = unknown>(qrl: string): QRL<T>;
|
|
518
481
|
$setRawState$(id: number, vParent: _ElementVNode | _VirtualVNode): void;
|
|
519
482
|
}
|
|
@@ -646,7 +609,7 @@ export declare interface ComputedSignal<T> extends ReadonlySignal<T> {
|
|
|
646
609
|
*
|
|
647
610
|
* The value is available synchronously, but the computation is done lazily.
|
|
648
611
|
*/
|
|
649
|
-
declare class ComputedSignalImpl<T, S extends
|
|
612
|
+
declare class ComputedSignalImpl<T, S extends _QRLInternal = ComputeQRL<T>> extends SignalImpl<T> implements BackRef {
|
|
650
613
|
/**
|
|
651
614
|
* The compute function is stored here.
|
|
652
615
|
*
|
|
@@ -669,7 +632,7 @@ declare class ComputedSignalImpl<T, S extends QRLInternal = ComputeQRL<T>> exten
|
|
|
669
632
|
get value(): any;
|
|
670
633
|
}
|
|
671
634
|
|
|
672
|
-
declare type ComputeQRL<T> =
|
|
635
|
+
declare type ComputeQRL<T> = _QRLInternal<ComputedFn<T>>;
|
|
673
636
|
|
|
674
637
|
/** @internal */
|
|
675
638
|
export declare const _CONST_PROPS: unique symbol;
|
|
@@ -683,17 +646,19 @@ export declare const _CONST_PROPS: unique symbol;
|
|
|
683
646
|
* - `VNode` and `ISsrNode`: Either a component or `<Signal>`
|
|
684
647
|
* - `Signal2`: A derived signal which contains a computation function.
|
|
685
648
|
*/
|
|
686
|
-
declare type Consumer = Task | _VNode |
|
|
649
|
+
declare type Consumer = Task | _VNode | SignalImpl | ISsrNode;
|
|
687
650
|
|
|
688
651
|
declare interface Container {
|
|
689
652
|
readonly $version$: string;
|
|
690
|
-
readonly $scheduler$: Scheduler;
|
|
691
653
|
readonly $storeProxyMap$: ObjToProxyMap;
|
|
692
654
|
readonly $locale$: string;
|
|
693
655
|
readonly $getObjectById$: (id: number | string) => any;
|
|
694
656
|
readonly $serverData$: Record<string, any>;
|
|
695
657
|
$currentUniqueId$: number;
|
|
696
658
|
$buildBase$: string | null;
|
|
659
|
+
$renderPromise$: Promise<void> | null;
|
|
660
|
+
$resolveRenderPromise$: (() => void) | null;
|
|
661
|
+
$cursorCount$: number;
|
|
697
662
|
handleError(err: any, $host$: HostElement | null): void;
|
|
698
663
|
getParentHost(host: HostElement): HostElement | null;
|
|
699
664
|
setContext<T>(host: HostElement, context: ContextId<T>, value: T): void;
|
|
@@ -950,18 +915,6 @@ export declare const createComputedQrl: <T>(qrl: QRL<() => T>, options?: Compute
|
|
|
950
915
|
*/
|
|
951
916
|
export declare const createContextId: <STATE = unknown>(name: string) => ContextId<STATE>;
|
|
952
917
|
|
|
953
|
-
declare const createScheduler: (container: Container, journalFlush: () => void, choreQueue: ChoreArray, blockedChores: ChoreArray, runningChores: Set<Chore>) => {
|
|
954
|
-
(type: ChoreType.QRL_RESOLVE, ignore: null, target: ComputeQRL<any> | AsyncComputeQRL<any>): Chore<ChoreType.QRL_RESOLVE>;
|
|
955
|
-
(type: ChoreType.WAIT_FOR_QUEUE): Chore<ChoreType.WAIT_FOR_QUEUE>;
|
|
956
|
-
(type: ChoreType.RECOMPUTE_AND_SCHEDULE_EFFECTS, host: HostElement | undefined, target: Signal<unknown> | StoreTarget, effects: Set<EffectSubscription> | undefined): Chore<ChoreType.RECOMPUTE_AND_SCHEDULE_EFFECTS>;
|
|
957
|
-
(type: ChoreType.TASK | ChoreType.VISIBLE, task: Task): Chore<ChoreType.TASK | ChoreType.VISIBLE>;
|
|
958
|
-
(type: ChoreType.RUN_QRL, host: HostElement, target: QRLInternal<(...args: unknown[]) => unknown>, args: unknown[]): Chore<ChoreType.RUN_QRL>;
|
|
959
|
-
(type: ChoreType.COMPONENT, host: HostElement, qrl: QRLInternal<OnRenderFn<unknown>>, props: Props | null): Chore<ChoreType.COMPONENT>;
|
|
960
|
-
(type: ChoreType.NODE_DIFF, host: HostElement, target: HostElement, value: JSXOutput | Signal): Chore<ChoreType.NODE_DIFF>;
|
|
961
|
-
(type: ChoreType.NODE_PROP, host: HostElement, prop: string, value: any): Chore<ChoreType.NODE_PROP>;
|
|
962
|
-
(type: ChoreType.CLEANUP_VISIBLE, task: Task): Chore<ChoreType.CLEANUP_VISIBLE>;
|
|
963
|
-
};
|
|
964
|
-
|
|
965
918
|
/**
|
|
966
919
|
* Create a signal that holds a custom serializable value. See {@link useSerializer$} for more
|
|
967
920
|
* details.
|
|
@@ -1004,7 +957,7 @@ declare interface DescriptorBase<T = unknown, B = unknown> extends BackRef {
|
|
|
1004
957
|
$flags$: number;
|
|
1005
958
|
$index$: number;
|
|
1006
959
|
$el$: HostElement;
|
|
1007
|
-
$qrl$:
|
|
960
|
+
$qrl$: _QRLInternal<T>;
|
|
1008
961
|
$state$: B | undefined;
|
|
1009
962
|
$destroy$: NoSerialize<() => void> | null;
|
|
1010
963
|
}
|
|
@@ -1025,7 +978,6 @@ declare interface DeserializeContainer {
|
|
|
1025
978
|
$state$?: unknown[];
|
|
1026
979
|
$storeProxyMap$: ObjToProxyMap;
|
|
1027
980
|
$forwardRefs$: Array<number> | null;
|
|
1028
|
-
readonly $scheduler$: Scheduler | null;
|
|
1029
981
|
}
|
|
1030
982
|
|
|
1031
983
|
/** @public */
|
|
@@ -1052,7 +1004,6 @@ declare class DomContainer extends _SharedContainer implements ClientContainer {
|
|
|
1052
1004
|
qManifestHash: string;
|
|
1053
1005
|
rootVNode: _ElementVNode;
|
|
1054
1006
|
document: _QDocument;
|
|
1055
|
-
$journal$: VNodeJournal;
|
|
1056
1007
|
$rawStateData$: unknown[];
|
|
1057
1008
|
$storeProxyMap$: ObjToProxyMap;
|
|
1058
1009
|
$qFuncs$: Array<(...args: unknown[]) => unknown>;
|
|
@@ -1062,7 +1013,16 @@ declare class DomContainer extends _SharedContainer implements ClientContainer {
|
|
|
1062
1013
|
private $stateData$;
|
|
1063
1014
|
private $styleIds$;
|
|
1064
1015
|
constructor(element: _ContainerElement);
|
|
1065
|
-
|
|
1016
|
+
/**
|
|
1017
|
+
* The first time we render we need to hoist the styles. (Meaning we need to move all styles from
|
|
1018
|
+
* component inline to <head>)
|
|
1019
|
+
*
|
|
1020
|
+
* We bulk move all of the styles, because the expensive part is for the browser to recompute the
|
|
1021
|
+
* styles, (not the actual DOM manipulation.) By moving all of them at once we can minimize the
|
|
1022
|
+
* reflow.
|
|
1023
|
+
*/
|
|
1024
|
+
$hoistStyles$(): void;
|
|
1025
|
+
$setRawState$(id: number, vParent: _VNode): void;
|
|
1066
1026
|
parseQRL<T = unknown>(qrl: string): QRL<T>;
|
|
1067
1027
|
handleError(err: any, host: _VNode | null): void;
|
|
1068
1028
|
setContext<T>(host: _VNode, context: ContextId<T>, value: T): void;
|
|
@@ -1143,11 +1103,12 @@ _SubscriptionData | null
|
|
|
1143
1103
|
|
|
1144
1104
|
/** @internal */
|
|
1145
1105
|
export declare class _ElementVNode extends _VNode {
|
|
1106
|
+
key: string | null;
|
|
1146
1107
|
firstChild: _VNode | null | undefined;
|
|
1147
1108
|
lastChild: _VNode | null | undefined;
|
|
1148
|
-
|
|
1109
|
+
node: Element;
|
|
1149
1110
|
elementName: string | undefined;
|
|
1150
|
-
constructor(flags: _VNodeFlags, parent:
|
|
1111
|
+
constructor(key: string | null, flags: _VNodeFlags, parent: _VNode | null, previousSibling: _VNode | null | undefined, nextSibling: _VNode | null | undefined, props: Props | null, firstChild: _VNode | null | undefined, lastChild: _VNode | null | undefined, node: Element, elementName: string | undefined);
|
|
1151
1112
|
}
|
|
1152
1113
|
|
|
1153
1114
|
/** @internal */
|
|
@@ -1188,6 +1149,9 @@ declare type EventQRL<T extends string = AllEventKeys> = QRL<EventHandler<EventF
|
|
|
1188
1149
|
/** @internal */
|
|
1189
1150
|
export declare const eventQrl: <T>(qrl: QRL<T>) => QRL<T>;
|
|
1190
1151
|
|
|
1152
|
+
/** @internal */
|
|
1153
|
+
export declare function _executeSsrChores(container: SSRContainer, ssrNode: ISsrNode): ValueOrPromise<void>;
|
|
1154
|
+
|
|
1191
1155
|
declare type FilterBase<T> = {
|
|
1192
1156
|
[K in keyof T as K extends string ? K extends Uppercase<K> ? never : any extends T[K] ? never : false extends IsAcceptableDOMValue<T[K]> ? never : IsReadOnlyKey<T, K> extends true ? never : K extends UnwantedKeys ? never : K : never]?: T[K];
|
|
1193
1157
|
};
|
|
@@ -1237,7 +1201,7 @@ export declare const _getContextElement: () => unknown;
|
|
|
1237
1201
|
export declare const _getContextEvent: () => unknown;
|
|
1238
1202
|
|
|
1239
1203
|
/** @public */
|
|
1240
|
-
declare function getDomContainer(element: Element
|
|
1204
|
+
declare function getDomContainer(element: Element): ClientContainer;
|
|
1241
1205
|
export { getDomContainer as _getDomContainer }
|
|
1242
1206
|
export { getDomContainer }
|
|
1243
1207
|
|
|
@@ -1266,7 +1230,7 @@ export declare function getLocale(defaultLocale?: string): string;
|
|
|
1266
1230
|
export declare const getPlatform: () => CorePlatform;
|
|
1267
1231
|
|
|
1268
1232
|
/** @internal */
|
|
1269
|
-
export declare function _getQContainerElement(element: Element
|
|
1233
|
+
export declare function _getQContainerElement(element: Element): Element | null;
|
|
1270
1234
|
|
|
1271
1235
|
/** Used by the optimizer for spread props operations @internal */
|
|
1272
1236
|
export declare const _getVarProps: (props: PropsProxy | Record<string, unknown> | null | undefined) => Props | null;
|
|
@@ -1465,8 +1429,6 @@ declare interface InvokeContext {
|
|
|
1465
1429
|
$url$: URL | undefined;
|
|
1466
1430
|
/** The Virtual parent component for the current component code */
|
|
1467
1431
|
$hostElement$: HostElement | undefined;
|
|
1468
|
-
/** The current DOM element */
|
|
1469
|
-
$element$: Element | undefined;
|
|
1470
1432
|
/** The event we're currently handling */
|
|
1471
1433
|
$event$: PossibleEvents | undefined;
|
|
1472
1434
|
/** The QRL function we're currently executing */
|
|
@@ -1516,6 +1478,7 @@ export declare interface ISsrComponentFrame {
|
|
|
1516
1478
|
declare interface ISsrNode {
|
|
1517
1479
|
id: string;
|
|
1518
1480
|
flags: SsrNodeFlags;
|
|
1481
|
+
dirty: ChoreBits;
|
|
1519
1482
|
parentComponent: ISsrNode | null;
|
|
1520
1483
|
vnodeData: VNodeData;
|
|
1521
1484
|
currentFile: string | null;
|
|
@@ -1548,7 +1511,11 @@ export declare const _isTask: (value: any) => value is Task;
|
|
|
1548
1511
|
*/
|
|
1549
1512
|
export declare const jsx: <T extends string | FunctionComponent<any>>(type: T, props: T extends FunctionComponent<infer PROPS> ? PROPS : Props, key?: string | number | null, _isStatic?: boolean, dev?: JsxDevOpts) => JSXNode<T>;
|
|
1550
1513
|
|
|
1551
|
-
/**
|
|
1514
|
+
/**
|
|
1515
|
+
* @deprecated
|
|
1516
|
+
* @internal
|
|
1517
|
+
* No longer used since v2
|
|
1518
|
+
*/
|
|
1552
1519
|
export declare const _jsxBranch: <T>(input?: T) => T | undefined;
|
|
1553
1520
|
|
|
1554
1521
|
/** @internal @deprecated v1 compat */
|
|
@@ -2062,11 +2029,6 @@ export declare interface _QDocument extends Document {
|
|
|
2062
2029
|
qVNodeData: WeakMap<Element, string>;
|
|
2063
2030
|
}
|
|
2064
2031
|
|
|
2065
|
-
declare interface QElement extends Element {
|
|
2066
|
-
qDispatchEvent?: (event: Event, scope: QwikLoaderEventScope) => ValueOrPromise<unknown>;
|
|
2067
|
-
vNode?: _VNode;
|
|
2068
|
-
}
|
|
2069
|
-
|
|
2070
2032
|
/**
|
|
2071
2033
|
* The `QRL` type represents a lazy-loadable AND serializable resource.
|
|
2072
2034
|
*
|
|
@@ -2235,7 +2197,8 @@ export declare const qrlDEV: <T = any>(chunkOrFn: string | (() => Promise<any>),
|
|
|
2235
2197
|
*/
|
|
2236
2198
|
export declare type QRLEventHandlerMulti<EV extends Event, EL> = QRL<EventHandler<EV, EL>> | undefined | null | QRLEventHandlerMulti<EV, EL>[];
|
|
2237
2199
|
|
|
2238
|
-
|
|
2200
|
+
/** @internal */
|
|
2201
|
+
export declare type _QRLInternal<TYPE = unknown> = QRL<TYPE> & QRLInternalMethods<TYPE>;
|
|
2239
2202
|
|
|
2240
2203
|
declare type QRLInternalMethods<TYPE> = {
|
|
2241
2204
|
readonly $chunk$: string | null;
|
|
@@ -2431,8 +2394,6 @@ declare type QwikKnownEventsPlain<EL> = {
|
|
|
2431
2394
|
[K in keyof QwikJSXEvents]?: QRLEventHandlerMulti<QwikJSXEvents[K], EL> | EventHandler<QwikJSXEvents[K], EL>;
|
|
2432
2395
|
};
|
|
2433
2396
|
|
|
2434
|
-
declare type QwikLoaderEventScope = '-document' | '-window' | '';
|
|
2435
|
-
|
|
2436
2397
|
/**
|
|
2437
2398
|
* The metadata of the build. One of its uses is storing where QRL symbols are located.
|
|
2438
2399
|
*
|
|
@@ -2768,6 +2729,7 @@ declare interface ResourceReturnInternal<T> {
|
|
|
2768
2729
|
_error: Error | undefined;
|
|
2769
2730
|
_cache: number;
|
|
2770
2731
|
_timeout: number;
|
|
2732
|
+
_generation: number;
|
|
2771
2733
|
value: Promise<T>;
|
|
2772
2734
|
loading: boolean;
|
|
2773
2735
|
}
|
|
@@ -2782,8 +2744,6 @@ export declare const _restProps: (props: PropsProxy, omit?: string[], target?: P
|
|
|
2782
2744
|
*/
|
|
2783
2745
|
export declare const _run: (...args: unknown[]) => ValueOrPromise<unknown>;
|
|
2784
2746
|
|
|
2785
|
-
declare type Scheduler = ReturnType<typeof createScheduler>;
|
|
2786
|
-
|
|
2787
2747
|
/** Stores the location of an object. If no parent, it's a root. */
|
|
2788
2748
|
declare type SeenRef = {
|
|
2789
2749
|
$index$: number;
|
|
@@ -2915,7 +2875,7 @@ declare interface SerializerSignal<T> extends ComputedSignal<T> {
|
|
|
2915
2875
|
* @public
|
|
2916
2876
|
*/
|
|
2917
2877
|
declare class SerializerSignalImpl<T, S> extends ComputedSignalImpl<T> {
|
|
2918
|
-
constructor(container: Container | null, argQrl:
|
|
2878
|
+
constructor(container: Container | null, argQrl: _QRLInternal<SerializerArg<T, S>>);
|
|
2919
2879
|
$didInitialize$: boolean;
|
|
2920
2880
|
$computeIfNeeded$(): void;
|
|
2921
2881
|
}
|
|
@@ -2960,7 +2920,6 @@ export declare const setPlatform: (plt: CorePlatform) => CorePlatform;
|
|
|
2960
2920
|
/** @internal */
|
|
2961
2921
|
export declare abstract class _SharedContainer implements Container {
|
|
2962
2922
|
readonly $version$: string;
|
|
2963
|
-
readonly $scheduler$: Scheduler;
|
|
2964
2923
|
readonly $storeProxyMap$: ObjToProxyMap;
|
|
2965
2924
|
readonly $locale$: string;
|
|
2966
2925
|
readonly $getObjectById$: (id: number | string) => any;
|
|
@@ -2968,8 +2927,10 @@ export declare abstract class _SharedContainer implements Container {
|
|
|
2968
2927
|
$currentUniqueId$: number;
|
|
2969
2928
|
$instanceHash$: string | null;
|
|
2970
2929
|
$buildBase$: string | null;
|
|
2971
|
-
$
|
|
2972
|
-
|
|
2930
|
+
$renderPromise$: Promise<void> | null;
|
|
2931
|
+
$resolveRenderPromise$: (() => void) | null;
|
|
2932
|
+
$cursorCount$: number;
|
|
2933
|
+
constructor(serverData: Record<string, any>, locale: string);
|
|
2973
2934
|
trackSignalValue<T>(signal: Signal, subscriber: HostElement, property: string, data: _SubscriptionData): T;
|
|
2974
2935
|
serializationCtxFactory(NodeConstructor: {
|
|
2975
2936
|
new (...rest: any[]): {
|
|
@@ -3334,7 +3295,7 @@ declare interface SSRContainer extends Container {
|
|
|
3334
3295
|
write(text: string): void;
|
|
3335
3296
|
openContainer(): void;
|
|
3336
3297
|
closeContainer(): ValueOrPromise<void>;
|
|
3337
|
-
openElement(elementName: string, varAttrs: SsrAttrs | null, constAttrs?: SsrAttrs | null, currentFile?: string | null): string | undefined;
|
|
3298
|
+
openElement(elementName: string, key: string | null, varAttrs: SsrAttrs | null, constAttrs?: SsrAttrs | null, currentFile?: string | null): string | undefined;
|
|
3338
3299
|
closeElement(): ValueOrPromise<void>;
|
|
3339
3300
|
openFragment(attrs: SsrAttrs): void;
|
|
3340
3301
|
closeFragment(): void;
|
|
@@ -3356,6 +3317,7 @@ declare interface SSRContainer extends Container {
|
|
|
3356
3317
|
emitQwikLoaderAtTopIfNeeded(): void;
|
|
3357
3318
|
emitPatchDataIfNeeded(): void;
|
|
3358
3319
|
addBackpatchEntry(ssrNodeId: string, attrName: string, serializedValue: string | boolean | null): void;
|
|
3320
|
+
executeChores(): ValueOrPromise<void>;
|
|
3359
3321
|
}
|
|
3360
3322
|
|
|
3361
3323
|
/** @public */
|
|
@@ -3728,10 +3690,10 @@ declare class Task<T = unknown, B = T> extends BackRef implements DescriptorBase
|
|
|
3728
3690
|
$flags$: number;
|
|
3729
3691
|
$index$: number;
|
|
3730
3692
|
$el$: HostElement;
|
|
3731
|
-
$qrl$:
|
|
3693
|
+
$qrl$: _QRLInternal<T>;
|
|
3732
3694
|
$state$: Signal<B> | ResourceReturnInternal<B> | undefined;
|
|
3733
3695
|
$destroy$: NoSerialize<() => void> | null;
|
|
3734
|
-
constructor($flags$: number, $index$: number, $el$: HostElement, $qrl$:
|
|
3696
|
+
constructor($flags$: number, $index$: number, $el$: HostElement, $qrl$: _QRLInternal<T>, $state$: Signal<B> | ResourceReturnInternal<B> | undefined, $destroy$: NoSerialize<() => void> | null);
|
|
3735
3697
|
}
|
|
3736
3698
|
|
|
3737
3699
|
/**
|
|
@@ -3760,9 +3722,9 @@ export declare interface TaskOptions {
|
|
|
3760
3722
|
|
|
3761
3723
|
/** @internal */
|
|
3762
3724
|
export declare class _TextVNode extends _VNode {
|
|
3763
|
-
|
|
3725
|
+
node: Text | null;
|
|
3764
3726
|
text: string | undefined;
|
|
3765
|
-
constructor(flags: _VNodeFlags, parent:
|
|
3727
|
+
constructor(flags: _VNodeFlags, parent: _VNode | null, previousSibling: _VNode | null | undefined, nextSibling: _VNode | null | undefined, props: Props | null, node: Text | null, text: string | undefined);
|
|
3766
3728
|
}
|
|
3767
3729
|
|
|
3768
3730
|
/**
|
|
@@ -4485,7 +4447,7 @@ export declare const _VAR_PROPS: unique symbol;
|
|
|
4485
4447
|
export declare const _verifySerializable: <T>(value: T, preMessage?: string) => T;
|
|
4486
4448
|
|
|
4487
4449
|
/**
|
|
4488
|
-
* 2.0.0-beta.
|
|
4450
|
+
* 2.0.0-beta.17-dev+c34c237
|
|
4489
4451
|
*
|
|
4490
4452
|
* @public
|
|
4491
4453
|
*/
|
|
@@ -4493,9 +4455,10 @@ export declare const version: string;
|
|
|
4493
4455
|
|
|
4494
4456
|
/** @internal */
|
|
4495
4457
|
export declare class _VirtualVNode extends _VNode {
|
|
4458
|
+
key: string | null;
|
|
4496
4459
|
firstChild: _VNode | null | undefined;
|
|
4497
4460
|
lastChild: _VNode | null | undefined;
|
|
4498
|
-
constructor(flags: _VNodeFlags, parent: _ElementVNode | _VirtualVNode | null, previousSibling: _VNode | null | undefined, nextSibling: _VNode | null | undefined, firstChild: _VNode | null | undefined, lastChild: _VNode | null | undefined);
|
|
4461
|
+
constructor(key: string | null, flags: _VNodeFlags, parent: _ElementVNode | _VirtualVNode | null, previousSibling: _VNode | null | undefined, nextSibling: _VNode | null | undefined, props: Props | null, firstChild: _VNode | null | undefined, lastChild: _VNode | null | undefined);
|
|
4499
4462
|
}
|
|
4500
4463
|
|
|
4501
4464
|
/** @public */
|
|
@@ -4504,18 +4467,15 @@ export declare type VisibleTaskStrategy = 'intersection-observer' | 'document-re
|
|
|
4504
4467
|
/** @internal */
|
|
4505
4468
|
export declare abstract class _VNode extends BackRef {
|
|
4506
4469
|
flags: _VNodeFlags;
|
|
4507
|
-
parent:
|
|
4470
|
+
parent: _VNode | null;
|
|
4508
4471
|
previousSibling: _VNode | null | undefined;
|
|
4509
4472
|
nextSibling: _VNode | null | undefined;
|
|
4510
|
-
props:
|
|
4473
|
+
props: Props | null;
|
|
4511
4474
|
slotParent: _VNode | null;
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
setProp(key: string, value: any): void;
|
|
4517
|
-
getAttr(key: string): string | null;
|
|
4518
|
-
setAttr(key: string, value: string | null | boolean, journal: VNodeJournal | null): void;
|
|
4475
|
+
dirty: ChoreBits;
|
|
4476
|
+
dirtyChildren: _VNode[] | null;
|
|
4477
|
+
nextDirtyChildIndex: number;
|
|
4478
|
+
constructor(flags: _VNodeFlags, parent: _VNode | null, previousSibling: _VNode | null | undefined, nextSibling: _VNode | null | undefined, props: Props | null);
|
|
4519
4479
|
toString(): string;
|
|
4520
4480
|
}
|
|
4521
4481
|
|
|
@@ -4528,9 +4488,6 @@ export declare const _vnode_getAttrKeys: (vnode: _ElementVNode | _VirtualVNode)
|
|
|
4528
4488
|
/** @internal */
|
|
4529
4489
|
export declare const _vnode_getFirstChild: (vnode: _VNode) => _VNode | null;
|
|
4530
4490
|
|
|
4531
|
-
/** @internal */
|
|
4532
|
-
export declare const _vnode_getProps: (vnode: _ElementVNode | _VirtualVNode) => unknown[];
|
|
4533
|
-
|
|
4534
4491
|
/** @internal */
|
|
4535
4492
|
export declare const _vnode_isMaterialized: (vNode: _VNode) => boolean;
|
|
4536
4493
|
|
|
@@ -4616,30 +4573,12 @@ export declare const enum _VNodeFlags {
|
|
|
4616
4573
|
Inflated = 8,
|
|
4617
4574
|
Resolved = 16,
|
|
4618
4575
|
Deleted = 32,
|
|
4619
|
-
|
|
4620
|
-
|
|
4576
|
+
Cursor = 64,
|
|
4577
|
+
NAMESPACE_MASK = 384,
|
|
4578
|
+
NEGATED_NAMESPACE_MASK = -385,
|
|
4621
4579
|
NS_html = 0,// http://www.w3.org/1999/xhtml
|
|
4622
|
-
NS_svg =
|
|
4623
|
-
NS_math =
|
|
4624
|
-
}
|
|
4625
|
-
|
|
4626
|
-
declare type VNodeJournal = Array<VNodeJournalOpCode | Document | Element | Text | string | boolean | null>;
|
|
4627
|
-
|
|
4628
|
-
/**
|
|
4629
|
-
* Fundamental DOM operations are:
|
|
4630
|
-
*
|
|
4631
|
-
* - Insert new DOM element/text
|
|
4632
|
-
* - Remove DOM element/text
|
|
4633
|
-
* - Set DOM element attributes
|
|
4634
|
-
* - Set text node value
|
|
4635
|
-
*/
|
|
4636
|
-
declare const enum VNodeJournalOpCode {
|
|
4637
|
-
SetText = 1,// ------ [SetAttribute, target, text]
|
|
4638
|
-
SetAttribute = 2,// - [SetAttribute, target, ...(key, values)]]
|
|
4639
|
-
HoistStyles = 3,// -- [HoistStyles, document]
|
|
4640
|
-
Remove = 4,// ------- [Remove, target(parent), ...nodes]
|
|
4641
|
-
RemoveAll = 5,// ------- [RemoveAll, target(parent)]
|
|
4642
|
-
Insert = 6
|
|
4580
|
+
NS_svg = 128,// http://www.w3.org/2000/svg
|
|
4581
|
+
NS_math = 256
|
|
4643
4582
|
}
|
|
4644
4583
|
|
|
4645
4584
|
/** @internal */
|