@qwik.dev/core 2.0.0-beta.28 → 2.0.0-beta.29
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.linux-x64-gnu.node +0 -0
- package/bindings/qwik.win32-x64-msvc.node +0 -0
- package/bindings/qwik_wasm_bg.wasm +0 -0
- 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 +81 -10
- package/dist/core.min.mjs +1 -1
- package/dist/core.mjs +431 -201
- package/dist/core.mjs.map +1 -1
- package/dist/core.prod.mjs +2440 -2309
- package/dist/loader/package.json +1 -1
- package/dist/optimizer.mjs +2 -2
- package/dist/server.mjs +2 -2
- package/dist/server.prod.mjs +254 -254
- package/dist/testing/index.d.ts +42 -8
- package/dist/testing/index.mjs +407 -291
- package/dist/testing/package.json +1 -1
- package/package.json +2 -2
- package/public.d.ts +1 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
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.29-dev+bc61b71
|
|
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
|
|
@@ -12908,7 +12908,7 @@ async function printHelp(app) {
|
|
|
12908
12908
|
await runCommand2(Object.assign(app, { task: args[0], args }));
|
|
12909
12909
|
}
|
|
12910
12910
|
function printVersion() {
|
|
12911
|
-
console.log("2.0.0-beta.
|
|
12911
|
+
console.log("2.0.0-beta.29-dev+bc61b71");
|
|
12912
12912
|
}
|
|
12913
12913
|
export {
|
|
12914
12914
|
runCli,
|
package/dist/core-internal.d.ts
CHANGED
|
@@ -79,6 +79,19 @@ import { isServer } from './build';
|
|
|
79
79
|
*/
|
|
80
80
|
export declare const $: <T>(expression: T) => QRL<T>;
|
|
81
81
|
|
|
82
|
+
/**
|
|
83
|
+
* Register an external projection on a parent component VNode.
|
|
84
|
+
*
|
|
85
|
+
* Creates a new VirtualVNode that will render the given component QRL with the given props. The
|
|
86
|
+
* VNode is stored as a projection on the parent, and a low-priority cursor is added so the cursor
|
|
87
|
+
* walker will process it.
|
|
88
|
+
*
|
|
89
|
+
* Use `_setProjectionTarget` to set the DOM target element before the cursor fires.
|
|
90
|
+
*
|
|
91
|
+
* @internal
|
|
92
|
+
*/
|
|
93
|
+
export declare function _addProjection(container: _Container, parentVNode: _VirtualVNode, componentQRL: QRL<any>, props: Record<string, unknown>, slotName: string): _VirtualVNode;
|
|
94
|
+
|
|
82
95
|
declare interface AddRootFn {
|
|
83
96
|
(obj: unknown, returnRef?: never): number;
|
|
84
97
|
(obj: unknown, returnRef: true): SeenRef;
|
|
@@ -1076,7 +1089,7 @@ export declare const createContextId: <STATE = unknown>(name: string) => Context
|
|
|
1076
1089
|
*
|
|
1077
1090
|
* @internal
|
|
1078
1091
|
*/
|
|
1079
|
-
export declare const _createQRL: <TYPE>(chunk: string | null, symbol: string, symbolRef?: null | ValueOrPromise<TYPE>, symbolFn?: null | (() => Promise<Record<string, TYPE>>), captures?: Readonly<unknown[]> | string | null) => _QRLInternal<TYPE>;
|
|
1092
|
+
export declare const _createQRL: <TYPE>(chunk: string | null, symbol: string, symbolRef?: null | ValueOrPromise<TYPE>, symbolFn?: null | (() => Promise<Record<string, TYPE>>), captures?: Readonly<unknown[]> | string | null, container?: _Container) => _QRLInternal<TYPE>;
|
|
1080
1093
|
|
|
1081
1094
|
/**
|
|
1082
1095
|
* Create a signal that holds a custom serializable value. See {@link useSerializer$} for more
|
|
@@ -1864,6 +1877,25 @@ declare type JSXWindowEvents = {
|
|
|
1864
1877
|
*/
|
|
1865
1878
|
export declare type KnownEventNames = LiteralUnion<AllEventKeys, string>;
|
|
1866
1879
|
|
|
1880
|
+
/**
|
|
1881
|
+
* Shared lazy-loading reference that holds module loading metadata. Multiple QRLs pointing to the
|
|
1882
|
+
* same chunk+symbol can share a single LazyRef, differing only in their captured scope.
|
|
1883
|
+
*/
|
|
1884
|
+
declare class LazyRef<TYPE = unknown> {
|
|
1885
|
+
readonly $chunk$: string | null;
|
|
1886
|
+
readonly $symbol$: string;
|
|
1887
|
+
readonly $symbolFn$: undefined | null | (() => Promise<Record<string, TYPE>>);
|
|
1888
|
+
$ref$?: (null | ValueOrPromise<TYPE>) | undefined;
|
|
1889
|
+
$container$: _Container | undefined;
|
|
1890
|
+
dev?: QRLDev | null | undefined;
|
|
1891
|
+
constructor($chunk$: string | null, $symbol$: string, $symbolFn$: undefined | null | (() => Promise<Record<string, TYPE>>), $ref$?: (null | ValueOrPromise<TYPE>) | undefined, container?: _Container | null);
|
|
1892
|
+
/** We don't read hash very often so let's not allocate a string for every QRL */
|
|
1893
|
+
get $hash$(): string;
|
|
1894
|
+
$setRef$(ref: ValueOrPromise<TYPE>): void;
|
|
1895
|
+
/** Load the raw module export without capture binding. */
|
|
1896
|
+
$load$(): ValueOrPromise<TYPE>;
|
|
1897
|
+
}
|
|
1898
|
+
|
|
1867
1899
|
declare type LcEvent<T extends string, C extends string = Lowercase<T>> = C extends keyof AllEventsMap ? AllEventsMap[C] : Event;
|
|
1868
1900
|
|
|
1869
1901
|
declare type LcEventNameMap = {
|
|
@@ -2379,21 +2411,35 @@ declare type QRLInternalMethods<TYPE> = {
|
|
|
2379
2411
|
readonly $symbol$: string;
|
|
2380
2412
|
readonly $hash$: string;
|
|
2381
2413
|
/** If it's a string it's serialized */
|
|
2382
|
-
$captures
|
|
2383
|
-
dev
|
|
2414
|
+
readonly $captures$?: Readonly<unknown[]> | string | null;
|
|
2415
|
+
dev?: QRLDev | null;
|
|
2384
2416
|
resolve(container?: _Container): Promise<TYPE>;
|
|
2385
2417
|
resolved: undefined | TYPE;
|
|
2386
2418
|
getSymbol(): string;
|
|
2387
2419
|
getHash(): string;
|
|
2388
2420
|
getCaptured(): unknown[] | null;
|
|
2389
|
-
getFn(currentCtx?: InvokeContext,
|
|
2421
|
+
getFn(currentCtx?: InvokeContext,
|
|
2422
|
+
/** If this returns false, the function execution will be skipped */
|
|
2423
|
+
beforeFn?: () => void | false): TYPE extends (...args: any) => any ? (...args: Parameters<TYPE>) => ValueOrPromise<ReturnType<TYPE> | undefined> : unknown;
|
|
2424
|
+
$callFn$(withThis: unknown, ...args: QrlArgs<TYPE>): ValueOrPromise<QrlReturn<TYPE>>;
|
|
2425
|
+
/**
|
|
2426
|
+
* "with captures" - Get a new QRL for these captures, reusing the lazy ref. It's an internal
|
|
2427
|
+
* method but we need to have a stable name because it gets called in user code by the optimizer,
|
|
2428
|
+
* after the $name$ props are mangled
|
|
2429
|
+
*/
|
|
2430
|
+
w(captures: Readonly<unknown[]> | string | null): _QRLInternal<TYPE>;
|
|
2431
|
+
/**
|
|
2432
|
+
* "set ref" - Set the ref of the QRL. It's an internal method but we need to have a stable name
|
|
2433
|
+
* because it gets called in user code by the optimizer, after the $name$ props are mangled
|
|
2434
|
+
*/
|
|
2435
|
+
s(ref: ValueOrPromise<TYPE>): void;
|
|
2390
2436
|
/**
|
|
2391
2437
|
* Needed for deserialization and importing. We don't always have the container while creating
|
|
2392
2438
|
* qrls in async sections of code
|
|
2393
2439
|
*/
|
|
2394
|
-
$container
|
|
2395
|
-
/**
|
|
2396
|
-
$
|
|
2440
|
+
readonly $container$?: _Container | null;
|
|
2441
|
+
/** The shared lazy-loading reference */
|
|
2442
|
+
readonly $lazy$: LazyRef<TYPE>;
|
|
2397
2443
|
};
|
|
2398
2444
|
|
|
2399
2445
|
declare type QrlReturn<T> = T extends (...args: any) => infer R ? Awaited<R> : unknown;
|
|
@@ -2738,6 +2784,13 @@ declare type RefFnInterface<EL> = {
|
|
|
2738
2784
|
*/
|
|
2739
2785
|
export declare const _regSymbol: (symbol: any, hash: string) => any;
|
|
2740
2786
|
|
|
2787
|
+
/**
|
|
2788
|
+
* Remove an external projection from its parent and clean up.
|
|
2789
|
+
*
|
|
2790
|
+
* @internal
|
|
2791
|
+
*/
|
|
2792
|
+
export declare function _removeProjection(container: _Container, parentVNode: _VirtualVNode, vnode: _VirtualVNode, slotName: string): void;
|
|
2793
|
+
|
|
2741
2794
|
/**
|
|
2742
2795
|
* Render JSX.
|
|
2743
2796
|
*
|
|
@@ -3102,6 +3155,16 @@ export declare function _setEvent(serializationCtx: SerializationContext, key: s
|
|
|
3102
3155
|
*/
|
|
3103
3156
|
export declare const setPlatform: (plt: CorePlatform) => CorePlatform;
|
|
3104
3157
|
|
|
3158
|
+
/**
|
|
3159
|
+
* Set the DOM target element for an external projection VNode.
|
|
3160
|
+
*
|
|
3161
|
+
* When the cursor walker processes this VNode, DOM operations will target this element instead of
|
|
3162
|
+
* walking the parent chain.
|
|
3163
|
+
*
|
|
3164
|
+
* @internal
|
|
3165
|
+
*/
|
|
3166
|
+
export declare function _setProjectionTarget(vnode: _VirtualVNode, targetElement: Element): void;
|
|
3167
|
+
|
|
3105
3168
|
/** @internal */
|
|
3106
3169
|
export declare abstract class _SharedContainer implements _Container {
|
|
3107
3170
|
readonly $version$: string;
|
|
@@ -3172,7 +3235,7 @@ declare class SignalImpl<T = any> implements Signal<T> {
|
|
|
3172
3235
|
$effects$: undefined | Set<EffectSubscription>;
|
|
3173
3236
|
$container$: _Container | null;
|
|
3174
3237
|
$wrappedSignal$: WrappedSignalImpl<T> | null;
|
|
3175
|
-
constructor(container: _Container | null, value: T);
|
|
3238
|
+
constructor(container: _Container | null | undefined, value: T);
|
|
3176
3239
|
/**
|
|
3177
3240
|
* Use this to trigger running subscribers, for example when the calculated value has mutated but
|
|
3178
3241
|
* remained the same object
|
|
@@ -4039,6 +4102,13 @@ declare type UnwantedKeys = keyof HTMLAttributesBase | keyof DOMAttributes<any>
|
|
|
4039
4102
|
*/
|
|
4040
4103
|
export declare const unwrapStore: <T>(value: T) => T;
|
|
4041
4104
|
|
|
4105
|
+
/**
|
|
4106
|
+
* Update the props on an external projection VNode and trigger re-rendering.
|
|
4107
|
+
*
|
|
4108
|
+
* @internal
|
|
4109
|
+
*/
|
|
4110
|
+
export declare function _updateProjectionProps(container: _Container, vnode: _VirtualVNode, newProps: Record<string, unknown>): void;
|
|
4111
|
+
|
|
4042
4112
|
/**
|
|
4043
4113
|
* Creates an AsyncSignal which holds the result of the given async function. If the function uses
|
|
4044
4114
|
* `track()` to track reactive state, and that state changes, the AsyncSignal is recalculated, and
|
|
@@ -4703,7 +4773,7 @@ export declare const _VAR_PROPS: unique symbol;
|
|
|
4703
4773
|
export declare const _verifySerializable: <T>(value: T, preMessage?: string) => T;
|
|
4704
4774
|
|
|
4705
4775
|
/**
|
|
4706
|
-
* 2.0.0-beta.
|
|
4776
|
+
* 2.0.0-beta.29-dev+bc61b71
|
|
4707
4777
|
*
|
|
4708
4778
|
* @public
|
|
4709
4779
|
*/
|
|
@@ -4837,7 +4907,8 @@ export declare const enum _VNodeFlags {
|
|
|
4837
4907
|
NEGATED_NAMESPACE_MASK = -1537,
|
|
4838
4908
|
NS_html = 0,// http://www.w3.org/1999/xhtml
|
|
4839
4909
|
NS_svg = 512,// http://www.w3.org/2000/svg
|
|
4840
|
-
NS_math = 1024
|
|
4910
|
+
NS_math = 1024,// http://www.w3.org/1998/Math/MathML
|
|
4911
|
+
HasTargetElement = 2048
|
|
4841
4912
|
}
|
|
4842
4913
|
|
|
4843
4914
|
/** @internal */
|