@qwik.dev/core 2.0.0-beta.10 → 2.0.0-beta.11
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.cjs +2 -2
- package/dist/core-internal.d.ts +55 -101
- package/dist/core.cjs +6498 -6393
- package/dist/core.cjs.map +1 -1
- package/dist/core.min.mjs +1 -1
- package/dist/core.mjs +6498 -6389
- package/dist/core.mjs.map +1 -1
- package/dist/core.prod.cjs +2458 -2413
- package/dist/core.prod.mjs +4227 -4174
- package/dist/loader/package.json +1 -1
- package/dist/optimizer.cjs +31 -24
- package/dist/optimizer.d.ts +1 -1
- package/dist/optimizer.mjs +889 -836
- package/dist/server.cjs +22 -22
- package/dist/server.d.ts +1 -1
- package/dist/server.mjs +5 -9
- package/dist/starters/features/csr/package.json +1 -1
- package/dist/testing/index.cjs +2628 -2535
- package/dist/testing/index.d.ts +59 -82
- package/dist/testing/index.mjs +2587 -2501
- package/dist/testing/package.json +1 -1
- package/package.json +3 -3
- package/server.d.ts +2 -0
package/dist/build/package.json
CHANGED
package/dist/cli.cjs
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.11-dev+d7daca3
|
|
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
|
|
@@ -7804,7 +7804,7 @@ async function printHelp(app) {
|
|
|
7804
7804
|
await runCommand2(Object.assign(app, { task: args[0], args }));
|
|
7805
7805
|
}
|
|
7806
7806
|
function printVersion() {
|
|
7807
|
-
console.log("2.0.0-beta.
|
|
7807
|
+
console.log("2.0.0-beta.11-dev+d7daca3");
|
|
7808
7808
|
}
|
|
7809
7809
|
// Annotate the CommonJS export names for ESM import in node:
|
|
7810
7810
|
0 && (module.exports = {
|
package/dist/core-internal.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ import { isBrowser } from './build';
|
|
|
4
4
|
import { isDev } from './build';
|
|
5
5
|
import { isServer } from './build';
|
|
6
6
|
import { QRL as QRL_2 } from './qrl.public';
|
|
7
|
-
import type { StreamWriter as StreamWriter_2 } from '.';
|
|
8
7
|
|
|
9
8
|
/**
|
|
10
9
|
* Qwik Optimizer marker function.
|
|
@@ -449,6 +448,11 @@ declare interface Chore<T extends ChoreType = ChoreType> {
|
|
|
449
448
|
$returnValue$: ValueOrPromise<ChoreReturnValue<T>>;
|
|
450
449
|
}
|
|
451
450
|
|
|
451
|
+
declare class ChoreArray extends Array<Chore> {
|
|
452
|
+
add(value: Chore): number;
|
|
453
|
+
delete(value: Chore): number;
|
|
454
|
+
}
|
|
455
|
+
|
|
452
456
|
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;
|
|
453
457
|
|
|
454
458
|
declare enum ChoreState {
|
|
@@ -935,10 +939,10 @@ export declare const createComputedQrl: <T>(qrl: QRL<() => T>, options?: Compute
|
|
|
935
939
|
*/
|
|
936
940
|
export declare const createContextId: <STATE = unknown>(name: string) => ContextId<STATE>;
|
|
937
941
|
|
|
938
|
-
declare const createScheduler: (container: Container, journalFlush: () => void, choreQueue
|
|
942
|
+
declare const createScheduler: (container: Container, journalFlush: () => void, choreQueue: ChoreArray, blockedChores: Set<Chore>, runningChores: Set<Chore>) => {
|
|
939
943
|
(type: ChoreType.QRL_RESOLVE, ignore: null, target: ComputeQRL<any> | AsyncComputeQRL<any>): Chore<ChoreType.QRL_RESOLVE>;
|
|
940
944
|
(type: ChoreType.WAIT_FOR_QUEUE): Chore<ChoreType.WAIT_FOR_QUEUE>;
|
|
941
|
-
(type: ChoreType.RECOMPUTE_AND_SCHEDULE_EFFECTS, host: HostElement | null, target: Signal |
|
|
945
|
+
(type: ChoreType.RECOMPUTE_AND_SCHEDULE_EFFECTS, host: HostElement | null, target: Signal<unknown> | StoreTarget, effects: Set<EffectSubscription> | null): Chore<ChoreType.RECOMPUTE_AND_SCHEDULE_EFFECTS>;
|
|
942
946
|
(type: ChoreType.TASK | ChoreType.VISIBLE, task: Task): Chore<ChoreType.TASK | ChoreType.VISIBLE>;
|
|
943
947
|
(type: ChoreType.RUN_QRL, host: HostElement, target: QRLInternal<(...args: unknown[]) => unknown>, args: unknown[]): Chore<ChoreType.RUN_QRL>;
|
|
944
948
|
(type: ChoreType.COMPONENT, host: HostElement, qrl: QRLInternal<OnRenderFn<unknown>>, props: Props | null): Chore<ChoreType.COMPONENT>;
|
|
@@ -1052,10 +1056,10 @@ declare class DomContainer extends _SharedContainer implements ClientContainer {
|
|
|
1052
1056
|
constructor(element: _ContainerElement);
|
|
1053
1057
|
$setRawState$(id: number, vParent: _ElementVNode | _VirtualVNode): void;
|
|
1054
1058
|
parseQRL<T = unknown>(qrl: string): QRL<T>;
|
|
1055
|
-
handleError(err: any, host:
|
|
1056
|
-
setContext<T>(host:
|
|
1057
|
-
resolveContext<T>(host:
|
|
1058
|
-
getParentHost(host:
|
|
1059
|
+
handleError(err: any, host: _VNode | null): void;
|
|
1060
|
+
setContext<T>(host: _VNode, context: ContextId<T>, value: T): void;
|
|
1061
|
+
resolveContext<T>(host: _VNode, contextId: ContextId<T>): T | undefined;
|
|
1062
|
+
getParentHost(host: _VNode): _VNode | null;
|
|
1059
1063
|
setHostProp<T>(host: HostElement, name: string, value: T): void;
|
|
1060
1064
|
getHostProp<T>(host: HostElement, name: string): T | null;
|
|
1061
1065
|
ensureProjectionResolved(vNode: _VirtualVNode): void;
|
|
@@ -1148,25 +1152,13 @@ _SubscriptionData | null
|
|
|
1148
1152
|
];
|
|
1149
1153
|
|
|
1150
1154
|
/** @internal */
|
|
1151
|
-
export declare
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
_VNode | null,
|
|
1157
|
-
|
|
1158
|
-
_VNode | null,
|
|
1159
|
-
/////////////// 3 - Next sibling
|
|
1160
|
-
_VNode | null | undefined,
|
|
1161
|
-
/// 4 - First child - undefined if children need to be materialize
|
|
1162
|
-
_VNode | null | undefined,
|
|
1163
|
-
Element,
|
|
1164
|
-
//////////////////// 6 - Element
|
|
1165
|
-
string | undefined,
|
|
1166
|
-
(string | null)[]
|
|
1167
|
-
] & {
|
|
1168
|
-
__brand__: 'ElementVNode';
|
|
1169
|
-
};
|
|
1155
|
+
export declare class _ElementVNode extends _VNode {
|
|
1156
|
+
firstChild: _VNode | null | undefined;
|
|
1157
|
+
lastChild: _VNode | null | undefined;
|
|
1158
|
+
element: Element;
|
|
1159
|
+
elementName: string | undefined;
|
|
1160
|
+
constructor(flags: _VNodeFlags, parent: _ElementVNode | _VirtualVNode | null, previousSibling: _VNode | null | undefined, nextSibling: _VNode | null | undefined, firstChild: _VNode | null | undefined, lastChild: _VNode | null | undefined, element: Element, elementName: string | undefined);
|
|
1161
|
+
}
|
|
1170
1162
|
|
|
1171
1163
|
/** @internal */
|
|
1172
1164
|
export declare const _EMPTY_ARRAY: any[];
|
|
@@ -1970,6 +1962,8 @@ declare type PropsProxy = {
|
|
|
1970
1962
|
[_CONST_PROPS]: Props | null;
|
|
1971
1963
|
};
|
|
1972
1964
|
|
|
1965
|
+
declare type PropType<T extends object, P extends keyof T> = P extends keyof T ? T[P] : 'value' extends keyof T ? T['value'] : never;
|
|
1966
|
+
|
|
1973
1967
|
/**
|
|
1974
1968
|
* Extends the defined component PROPS, adding the default ones (children and q:slot) and allowing
|
|
1975
1969
|
* plain functions to QRL arguments.
|
|
@@ -2504,6 +2498,8 @@ export declare const RenderOnce: FunctionComponent<{
|
|
|
2504
2498
|
key?: string | number | null | undefined;
|
|
2505
2499
|
}>;
|
|
2506
2500
|
|
|
2501
|
+
/** @internal */
|
|
2502
|
+
/** @internal */
|
|
2507
2503
|
/** @public */
|
|
2508
2504
|
export declare interface RenderOptions {
|
|
2509
2505
|
serverData?: Record<string, any>;
|
|
@@ -2720,7 +2716,7 @@ declare interface SerializationContext {
|
|
|
2720
2716
|
$addSyncFn$($funcStr$: string | null, argsCount: number, fn: Function): number;
|
|
2721
2717
|
$isSsrNode$: (obj: unknown) => obj is SsrNode;
|
|
2722
2718
|
$isDomRef$: (obj: unknown) => obj is DomRef;
|
|
2723
|
-
$writer$:
|
|
2719
|
+
$writer$: StreamWriter;
|
|
2724
2720
|
$syncFns$: string[];
|
|
2725
2721
|
$eventQrls$: Set<QRL>;
|
|
2726
2722
|
$eventNames$: Set<string>;
|
|
@@ -2739,14 +2735,6 @@ declare const enum SerializationSignalFlags {
|
|
|
2739
2735
|
/** @public */
|
|
2740
2736
|
export declare type SerializationStrategy = 'never' | 'always';
|
|
2741
2737
|
|
|
2742
|
-
declare class SerializationWeakRef {
|
|
2743
|
-
$obj$: unknown;
|
|
2744
|
-
constructor($obj$: unknown);
|
|
2745
|
-
}
|
|
2746
|
-
|
|
2747
|
-
/** @internal */
|
|
2748
|
-
export declare const _serializationWeakRef: (obj: unknown) => SerializationWeakRef;
|
|
2749
|
-
|
|
2750
2738
|
/**
|
|
2751
2739
|
* Serialize data to string using SerializationContext.
|
|
2752
2740
|
*
|
|
@@ -3303,28 +3291,6 @@ declare type StopPropagation = {
|
|
|
3303
3291
|
[K in keyof HTMLElementEventMap as `stoppropagation:${K}`]?: boolean;
|
|
3304
3292
|
};
|
|
3305
3293
|
|
|
3306
|
-
declare const enum StoreFlags {
|
|
3307
|
-
NONE = 0,
|
|
3308
|
-
RECURSIVE = 1,
|
|
3309
|
-
IMMUTABLE = 2
|
|
3310
|
-
}
|
|
3311
|
-
|
|
3312
|
-
declare class StoreHandler implements ProxyHandler<StoreTarget> {
|
|
3313
|
-
$flags$: StoreFlags;
|
|
3314
|
-
$container$: Container | null;
|
|
3315
|
-
$effects$: null | Map<string | symbol, Set<EffectSubscription>>;
|
|
3316
|
-
constructor($flags$: StoreFlags, $container$: Container | null);
|
|
3317
|
-
toString(): string;
|
|
3318
|
-
force(prop: keyof StoreTarget): void;
|
|
3319
|
-
get(target: StoreTarget, prop: string | symbol): any;
|
|
3320
|
-
/** In the case of oldValue and value are the same, the effects are not triggered. */
|
|
3321
|
-
set(target: StoreTarget, prop: string | symbol, value: any): boolean;
|
|
3322
|
-
deleteProperty(target: StoreTarget, prop: string | symbol): boolean;
|
|
3323
|
-
has(target: StoreTarget, prop: string | symbol): boolean;
|
|
3324
|
-
ownKeys(target: StoreTarget): ArrayLike<string | symbol>;
|
|
3325
|
-
getOwnPropertyDescriptor(target: StoreTarget, prop: string | symbol): PropertyDescriptor | undefined;
|
|
3326
|
-
}
|
|
3327
|
-
|
|
3328
3294
|
declare type StoreTarget = Record<string | symbol, any>;
|
|
3329
3295
|
|
|
3330
3296
|
/** @internal */
|
|
@@ -3680,20 +3646,11 @@ declare const TaskEvent = "qTask";
|
|
|
3680
3646
|
export declare type TaskFn = (ctx: TaskCtx) => ValueOrPromise<void | (() => void)>;
|
|
3681
3647
|
|
|
3682
3648
|
/** @internal */
|
|
3683
|
-
export declare
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
_VNode | null,
|
|
3687
|
-
|
|
3688
|
-
_VNode | null,
|
|
3689
|
-
///////////////// 2 - Previous sibling
|
|
3690
|
-
_VNode | null,
|
|
3691
|
-
///////////////// 3 - Next sibling
|
|
3692
|
-
Text | null | undefined,
|
|
3693
|
-
string
|
|
3694
|
-
] & {
|
|
3695
|
-
__brand__: 'TextVNode';
|
|
3696
|
-
};
|
|
3649
|
+
export declare class _TextVNode extends _VNode {
|
|
3650
|
+
textNode: Text | null;
|
|
3651
|
+
text: string | undefined;
|
|
3652
|
+
constructor(flags: _VNodeFlags, parent: _ElementVNode | _VirtualVNode | null, previousSibling: _VNode | null | undefined, nextSibling: _VNode | null | undefined, textNode: Text | null, text: string | undefined);
|
|
3653
|
+
}
|
|
3697
3654
|
|
|
3698
3655
|
/**
|
|
3699
3656
|
* Used to signal to Qwik which state should be watched for changes.
|
|
@@ -4402,42 +4359,43 @@ export declare const _VAR_PROPS: unique symbol;
|
|
|
4402
4359
|
export declare const _verifySerializable: <T>(value: T, preMessage?: string) => T;
|
|
4403
4360
|
|
|
4404
4361
|
/**
|
|
4405
|
-
* 2.0.0-beta.
|
|
4362
|
+
* 2.0.0-beta.11-dev+d7daca3
|
|
4406
4363
|
*
|
|
4407
4364
|
* @public
|
|
4408
4365
|
*/
|
|
4409
4366
|
export declare const version: string;
|
|
4410
4367
|
|
|
4411
4368
|
/** @internal */
|
|
4412
|
-
export declare
|
|
4413
|
-
|
|
4414
|
-
|
|
4415
|
-
_VNode | null,
|
|
4416
|
-
|
|
4417
|
-
_VNode | null,
|
|
4418
|
-
/////////////// 2 - Previous sibling
|
|
4419
|
-
_VNode | null,
|
|
4420
|
-
/////////////// 3 - Next sibling
|
|
4421
|
-
_VNode | null,
|
|
4422
|
-
/////////////// 4 - First child
|
|
4423
|
-
_VNode | null,
|
|
4424
|
-
(string | null | boolean)[]
|
|
4425
|
-
] & {
|
|
4426
|
-
__brand__: 'FragmentNode' & 'HostElement';
|
|
4427
|
-
};
|
|
4369
|
+
export declare class _VirtualVNode extends _VNode {
|
|
4370
|
+
firstChild: _VNode | null | undefined;
|
|
4371
|
+
lastChild: _VNode | null | undefined;
|
|
4372
|
+
constructor(flags: _VNodeFlags, parent: _ElementVNode | _VirtualVNode | null, previousSibling: _VNode | null | undefined, nextSibling: _VNode | null | undefined, firstChild: _VNode | null | undefined, lastChild: _VNode | null | undefined);
|
|
4373
|
+
}
|
|
4428
4374
|
|
|
4429
4375
|
/** @public */
|
|
4430
4376
|
export declare type VisibleTaskStrategy = 'intersection-observer' | 'document-ready' | 'document-idle';
|
|
4431
4377
|
|
|
4432
4378
|
/** @internal */
|
|
4433
|
-
export declare
|
|
4379
|
+
export declare abstract class _VNode extends BackRef {
|
|
4380
|
+
flags: _VNodeFlags;
|
|
4381
|
+
parent: _ElementVNode | _VirtualVNode | null;
|
|
4382
|
+
previousSibling: _VNode | null | undefined;
|
|
4383
|
+
nextSibling: _VNode | null | undefined;
|
|
4384
|
+
props: unknown[] | null;
|
|
4385
|
+
slotParent: _VNode | null;
|
|
4386
|
+
chores: ChoreArray | null;
|
|
4387
|
+
blockedChores: ChoreArray | null;
|
|
4388
|
+
constructor(flags: _VNodeFlags, parent: _ElementVNode | _VirtualVNode | null, previousSibling: _VNode | null | undefined, nextSibling: _VNode | null | undefined);
|
|
4389
|
+
getProp<T>(key: string, getObject: ((id: string) => any) | null): T | null;
|
|
4390
|
+
setProp(key: string, value: any): void;
|
|
4391
|
+
getAttr(key: string): string | null;
|
|
4392
|
+
setAttr(key: string, value: string | null | boolean, journal: VNodeJournal | null): void;
|
|
4393
|
+
toString(): string;
|
|
4394
|
+
}
|
|
4434
4395
|
|
|
4435
4396
|
/** @internal */
|
|
4436
4397
|
export declare const _vnode_ensureElementInflated: (vnode: _VNode) => void;
|
|
4437
4398
|
|
|
4438
|
-
/** @internal */
|
|
4439
|
-
export declare const _vnode_getAttr: (vnode: _VNode, key: string) => string | null;
|
|
4440
|
-
|
|
4441
4399
|
/** @internal */
|
|
4442
4400
|
export declare const _vnode_getAttrKeys: (vnode: _ElementVNode | _VirtualVNode) => string[];
|
|
4443
4401
|
|
|
@@ -4445,13 +4403,7 @@ export declare const _vnode_getAttrKeys: (vnode: _ElementVNode | _VirtualVNode)
|
|
|
4445
4403
|
export declare const _vnode_getFirstChild: (vnode: _VNode) => _VNode | null;
|
|
4446
4404
|
|
|
4447
4405
|
/** @internal */
|
|
4448
|
-
export declare const
|
|
4449
|
-
|
|
4450
|
-
/** @internal */
|
|
4451
|
-
export declare const _vnode_getProps: (vnode: _VNode) => unknown[];
|
|
4452
|
-
|
|
4453
|
-
/** @internal */
|
|
4454
|
-
export declare const _vnode_getPropStartIndex: (vnode: _VNode) => number;
|
|
4406
|
+
export declare const _vnode_getProps: (vnode: _ElementVNode | _VirtualVNode) => unknown[];
|
|
4455
4407
|
|
|
4456
4408
|
/** @internal */
|
|
4457
4409
|
export declare const _vnode_isMaterialized: (vNode: _VNode) => boolean;
|
|
@@ -4579,6 +4531,8 @@ export declare function _walkJSX(ssr: SSRContainer, value: JSXOutput, options: {
|
|
|
4579
4531
|
*/
|
|
4580
4532
|
export declare function withLocale<T>(locale: string, fn: () => T): T;
|
|
4581
4533
|
|
|
4534
|
+
declare type WrappedProp<T extends object, P extends keyof T> = T extends Signal ? WrappedSignalImpl<PropType<T, P>> : PropType<T, P>;
|
|
4535
|
+
|
|
4582
4536
|
declare const enum WrappedSignalFlags {
|
|
4583
4537
|
UNWRAP = 4
|
|
4584
4538
|
}
|
|
@@ -4614,9 +4568,9 @@ declare class WrappedSignalImpl<T> extends SignalImpl<T> implements BackRef {
|
|
|
4614
4568
|
*
|
|
4615
4569
|
* @internal
|
|
4616
4570
|
*/
|
|
4617
|
-
export declare const _wrapProp: <T extends
|
|
4571
|
+
export declare const _wrapProp: <T extends object, P extends keyof T>(...args: [T, P?]) => WrappedProp<T, P>;
|
|
4618
4572
|
|
|
4619
4573
|
/** @internal @deprecated v1 compat */
|
|
4620
|
-
export declare const _wrapSignal: <T extends
|
|
4574
|
+
export declare const _wrapSignal: <T extends object, P extends keyof T>(obj: T, prop: P) => T[P] | WrappedProp<T, P>;
|
|
4621
4575
|
|
|
4622
4576
|
export { }
|