@qwik.dev/core 2.0.0-beta.19 → 2.0.0-beta.21
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 +175 -94
- package/dist/core.min.mjs +2 -1
- package/dist/core.mjs +969 -935
- package/dist/core.mjs.map +1 -1
- package/dist/core.prod.mjs +620 -666
- package/dist/loader/index.mjs +2 -2
- package/dist/loader/package.json +1 -1
- package/dist/optimizer.mjs +841 -842
- package/dist/qwikloader.debug.js +144 -144
- package/dist/qwikloader.js +1 -1
- package/dist/server.mjs +55 -23
- package/dist/testing/index.d.ts +28 -20
- package/dist/testing/index.mjs +3547 -3572
- package/dist/testing/package.json +1 -1
- package/package.json +2 -2
- package/public.d.ts +2 -2
package/dist/testing/index.d.ts
CHANGED
|
@@ -56,6 +56,7 @@ declare const enum ChoreBits {
|
|
|
56
56
|
*/
|
|
57
57
|
declare type Consumer = Task | VNode | SignalImpl | ISsrNode;
|
|
58
58
|
|
|
59
|
+
/** @internal */
|
|
59
60
|
declare interface Container {
|
|
60
61
|
readonly $version$: string;
|
|
61
62
|
readonly $storeProxyMap$: ObjToProxyMap;
|
|
@@ -289,20 +290,15 @@ declare type HostElement = VNode | ISsrNode;
|
|
|
289
290
|
|
|
290
291
|
/** The shared state during an invoke() call */
|
|
291
292
|
declare interface InvokeContext {
|
|
292
|
-
$url$: URL | undefined;
|
|
293
293
|
/** The Virtual parent component for the current component code */
|
|
294
294
|
$hostElement$: HostElement | undefined;
|
|
295
295
|
/** The event we're currently handling */
|
|
296
296
|
$event$: PossibleEvents | undefined;
|
|
297
|
-
/** The QRL function we're currently executing */
|
|
298
|
-
$qrl$: QRL | undefined;
|
|
299
297
|
$effectSubscriber$: EffectSubscription | undefined;
|
|
300
298
|
$locale$: string | undefined;
|
|
301
299
|
$container$: Container | undefined;
|
|
302
300
|
}
|
|
303
301
|
|
|
304
|
-
declare type InvokeTuple = [Element, Event, URL?];
|
|
305
|
-
|
|
306
302
|
declare interface ISsrNode {
|
|
307
303
|
id: string;
|
|
308
304
|
flags: SsrNodeFlags;
|
|
@@ -458,7 +454,7 @@ declare type Props = Record<string, unknown>;
|
|
|
458
454
|
*
|
|
459
455
|
* ```
|
|
460
456
|
* <div q:base="/build/">
|
|
461
|
-
* <button
|
|
457
|
+
* <button q-e:click="./chunk-abc.js#onClick">...</button>
|
|
462
458
|
* </div>
|
|
463
459
|
* ```
|
|
464
460
|
*
|
|
@@ -481,7 +477,7 @@ declare type Props = Record<string, unknown>;
|
|
|
481
477
|
*/
|
|
482
478
|
declare type QRL<TYPE = unknown> = {
|
|
483
479
|
__qwik_serializable__?: any;
|
|
484
|
-
__brand__QRL__
|
|
480
|
+
__brand__QRL__?: TYPE;
|
|
485
481
|
/** Resolve the QRL and return the actual value. */
|
|
486
482
|
resolve(): Promise<TYPE>;
|
|
487
483
|
/** The resolved value, once `resolve()` returns. */
|
|
@@ -508,16 +504,22 @@ declare type QRLInternalMethods<TYPE> = {
|
|
|
508
504
|
readonly $chunk$: string | null;
|
|
509
505
|
readonly $symbol$: string;
|
|
510
506
|
readonly $hash$: string;
|
|
511
|
-
|
|
512
|
-
$
|
|
507
|
+
/** If it's a string it's serialized */
|
|
508
|
+
$captures$: Readonly<unknown[]> | string | null;
|
|
513
509
|
dev: QRLDev | null;
|
|
510
|
+
resolve(container?: Container): Promise<TYPE>;
|
|
514
511
|
resolved: undefined | TYPE;
|
|
515
|
-
resolve(containerEl?: Element): Promise<TYPE>;
|
|
516
512
|
getSymbol(): string;
|
|
517
513
|
getHash(): string;
|
|
518
514
|
getCaptured(): unknown[] | null;
|
|
519
|
-
getFn(currentCtx?: InvokeContext
|
|
520
|
-
|
|
515
|
+
getFn(currentCtx?: InvokeContext, beforeFn?: () => void): TYPE extends (...args: any) => any ? (...args: Parameters<TYPE>) => ValueOrPromise<ReturnType<TYPE>> : unknown;
|
|
516
|
+
/**
|
|
517
|
+
* Needed for deserialization and importing. We don't always have the container while creating
|
|
518
|
+
* qrls in async sections of code
|
|
519
|
+
*/
|
|
520
|
+
$container$: Container | null;
|
|
521
|
+
/** Only in dev mode */
|
|
522
|
+
$symbolRef$?: null | ValueOrPromise<TYPE>;
|
|
521
523
|
};
|
|
522
524
|
|
|
523
525
|
declare type QrlReturn<T> = T extends (...args: any) => infer R ? Awaited<R> : unknown;
|
|
@@ -592,8 +594,8 @@ declare interface SerializationContext {
|
|
|
592
594
|
}
|
|
593
595
|
|
|
594
596
|
declare const enum SerializationSignalFlags {
|
|
595
|
-
SERIALIZATION_STRATEGY_NEVER =
|
|
596
|
-
SERIALIZATION_STRATEGY_ALWAYS =
|
|
597
|
+
SERIALIZATION_STRATEGY_NEVER = 8,
|
|
598
|
+
SERIALIZATION_STRATEGY_ALWAYS = 16
|
|
597
599
|
}
|
|
598
600
|
|
|
599
601
|
/**
|
|
@@ -640,6 +642,8 @@ declare class SignalImpl<T = any> implements Signal<T> {
|
|
|
640
642
|
};
|
|
641
643
|
}
|
|
642
644
|
|
|
645
|
+
declare type SimpleSsrAttrValue = string | Signal<SimpleSsrAttrValue> | boolean | object | null;
|
|
646
|
+
|
|
643
647
|
declare interface SimplifiedServerRequestEvent<T = unknown> {
|
|
644
648
|
url: URL;
|
|
645
649
|
locale: string | undefined;
|
|
@@ -650,7 +654,7 @@ declare type SsrAttrKey = string;
|
|
|
650
654
|
|
|
651
655
|
declare type SsrAttrs = Array<SsrAttrKey | SsrAttrValue>;
|
|
652
656
|
|
|
653
|
-
declare type SsrAttrValue =
|
|
657
|
+
declare type SsrAttrValue = SimpleSsrAttrValue | Promise<SimpleSsrAttrValue>;
|
|
654
658
|
|
|
655
659
|
/** A selection of attributes of the real thing */
|
|
656
660
|
declare type SsrNode = {
|
|
@@ -737,6 +741,8 @@ declare interface TestPlatform extends CorePlatform {
|
|
|
737
741
|
* Trigger an event in unit tests on an element. Needs to be kept in sync with the Qwik Loader event
|
|
738
742
|
* dispatching.
|
|
739
743
|
*
|
|
744
|
+
* Events can be either case sensitive element-scoped events or scoped kebab-case.
|
|
745
|
+
*
|
|
740
746
|
* Future deprecation candidate.
|
|
741
747
|
*
|
|
742
748
|
* @public
|
|
@@ -849,12 +855,14 @@ declare const enum VNodeFlags {
|
|
|
849
855
|
Inflated = 8,
|
|
850
856
|
Resolved = 16,
|
|
851
857
|
Deleted = 32,
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
858
|
+
HasIterationItems = 64,
|
|
859
|
+
InflatedIterationItems = 128,
|
|
860
|
+
Cursor = 256,
|
|
861
|
+
NAMESPACE_MASK = 1536,
|
|
862
|
+
NEGATED_NAMESPACE_MASK = -1537,
|
|
855
863
|
NS_html = 0,// http://www.w3.org/1999/xhtml
|
|
856
|
-
NS_svg =
|
|
857
|
-
NS_math =
|
|
864
|
+
NS_svg = 512,// http://www.w3.org/2000/svg
|
|
865
|
+
NS_math = 1024
|
|
858
866
|
}
|
|
859
867
|
|
|
860
868
|
/**
|