@qwik.dev/core 2.0.0-beta.40 → 2.0.0-beta.42
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 +97 -72
- package/dist/core.min.mjs +11 -9
- package/dist/core.mjs +733 -144
- package/dist/core.mjs.map +1 -1
- package/dist/core.prod.mjs +3895 -3334
- package/dist/error-swap-executor.debug.js +37 -0
- package/dist/error-swap-executor.js +1 -0
- package/dist/loader/index.mjs +2 -2
- package/dist/loader/package.json +1 -1
- package/dist/optimizer.d.ts +3 -7
- package/dist/optimizer.mjs +52 -68
- package/dist/out-of-order-executor.debug.js +12 -12
- package/dist/qwikloader.debug.js +1 -1
- package/dist/qwikloader.js +1 -1
- package/dist/server.d.ts +27 -0
- package/dist/server.mjs +100 -40
- package/dist/server.prod.mjs +853 -785
- package/dist/starters/adapters/cloudflare-workers/adapters/cloudflare-workers/vite.config.ts +3 -3
- package/dist/starters/adapters/cloudflare-workers/src/entry.cloudflare-pages.tsx +4 -5
- package/dist/starters/features/compiled-i18n/src/components/locale-selector/locale-selector.tsx +1 -1
- package/dist/starters/features/compiled-i18n/src/routes/plugin@compiled-i18n.ts +1 -1
- package/dist/starters/features/cypress/src/actions/example.action.ts +1 -1
- package/dist/starters/features/cypress/src/components/example/example.cy.tsx +4 -4
- package/dist/starters/features/cypress/src/loaders/example.loader.ts +1 -1
- package/dist/testing/index.d.ts +11 -2
- package/dist/testing/index.mjs +6568 -6298
- package/dist/testing/package.json +1 -1
- package/dist/worker/package.json +1 -1
- package/handlers.mjs +3 -0
- package/package.json +3 -3
- package/public.d.ts +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.42-dev+3473a49
|
|
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
|
|
@@ -12966,7 +12966,7 @@ async function printHelp(app) {
|
|
|
12966
12966
|
await runCommand2(Object.assign(app, { task: args[0], args }));
|
|
12967
12967
|
}
|
|
12968
12968
|
function printVersion() {
|
|
12969
|
-
console.log("2.0.0-beta.
|
|
12969
|
+
console.log("2.0.0-beta.42-dev+3473a49");
|
|
12970
12970
|
}
|
|
12971
12971
|
export {
|
|
12972
12972
|
runCli,
|
package/dist/core-internal.d.ts
CHANGED
|
@@ -367,17 +367,13 @@ declare interface AriaAttributes {
|
|
|
367
367
|
declare type AriaRole = 'alert' | 'alertdialog' | 'application' | 'article' | 'banner' | 'button' | 'cell' | 'checkbox' | 'columnheader' | 'combobox' | 'complementary' | 'contentinfo' | 'definition' | 'dialog' | 'directory' | 'document' | 'feed' | 'figure' | 'form' | 'grid' | 'gridcell' | 'group' | 'heading' | 'img' | 'link' | 'list' | 'listbox' | 'listitem' | 'log' | 'main' | 'marquee' | 'math' | 'menu' | 'menubar' | 'menuitem' | 'menuitemcheckbox' | 'menuitemradio' | 'navigation' | 'none' | 'note' | 'option' | 'presentation' | 'progressbar' | 'radio' | 'radiogroup' | 'region' | 'row' | 'rowgroup' | 'rowheader' | 'scrollbar' | 'search' | 'searchbox' | 'separator' | 'slider' | 'spinbutton' | 'status' | 'switch' | 'tab' | 'table' | 'tablist' | 'tabpanel' | 'term' | 'textbox' | 'timer' | 'toolbar' | 'tooltip' | 'tree' | 'treegrid' | 'treeitem' | (string & {});
|
|
368
368
|
|
|
369
369
|
/**
|
|
370
|
-
*
|
|
371
|
-
* type of the resource correctly. The type is only used for the `previous` property, which is not
|
|
372
|
-
* commonly used, and can be easily cast if needed.
|
|
373
|
-
*
|
|
374
|
-
* @deprecated Use `useComputed$` with an async function instead.
|
|
370
|
+
* @deprecated Use `ComputedFn` instead.
|
|
375
371
|
* @public
|
|
376
372
|
*/
|
|
377
|
-
export declare type AsyncFn<T> =
|
|
373
|
+
export declare type AsyncFn<T> = ComputedFn<T>;
|
|
378
374
|
|
|
379
375
|
/** @deprecated Use `ComputeQRL` instead. */
|
|
380
|
-
declare type AsyncQRL<T> =
|
|
376
|
+
declare type AsyncQRL<T> = ComputeQRL<T>;
|
|
381
377
|
|
|
382
378
|
/**
|
|
383
379
|
* An AsyncSignal holds the result of the given async function. If the function uses `track()` to
|
|
@@ -844,9 +840,9 @@ declare class ComputedSignalImpl<T, S extends _QRLInternal = ComputeQRL<T>> exte
|
|
|
844
840
|
/** Run the computation if needed */
|
|
845
841
|
$computeIfNeeded$(): void;
|
|
846
842
|
/**
|
|
847
|
-
* Invoke the compute fn with the ComputeCtx argument. CTX_ARG signals (
|
|
848
|
-
* only track via its explicit track(). Computeds auto-track every synchronous read
|
|
849
|
-
* the first await they must use the explicit track() too.
|
|
843
|
+
* Invoke the compute fn with the ComputeCtx argument. CTX_ARG signals (createAsyncQrl,
|
|
844
|
+
* useResource$) only track via its explicit track(). Computeds auto-track every synchronous read
|
|
845
|
+
* instead; after the first await they must use the explicit track() too.
|
|
850
846
|
*/
|
|
851
847
|
$invokeComputeFn$(fn: Function, job: Job<T>): T | Promise<T>;
|
|
852
848
|
/** Start an async computation (the async engine; assumes the INVALID flag is set) */
|
|
@@ -901,7 +897,7 @@ export declare interface _Container {
|
|
|
901
897
|
$resolveRenderPromise$: (() => void) | null;
|
|
902
898
|
$pendingCount$: number;
|
|
903
899
|
$checkPendingCount$(): void;
|
|
904
|
-
handleError(err: any, $host$: _HostElement | null): void;
|
|
900
|
+
handleError(err: any, $host$: _HostElement | null, phase?: ErrorBoundaryPhase): void;
|
|
905
901
|
getParentHost(host: _HostElement): _HostElement | null;
|
|
906
902
|
setContext<T>(host: _HostElement, context: ContextId<T>, value: T): void;
|
|
907
903
|
resolveContext<T>(host: _HostElement, contextId: ContextId<T>): T | undefined;
|
|
@@ -1083,17 +1079,8 @@ export declare interface CorrectedToggleEvent extends Event {
|
|
|
1083
1079
|
readonly prevState: 'open' | 'closed';
|
|
1084
1080
|
}
|
|
1085
1081
|
|
|
1086
|
-
/**
|
|
1087
|
-
* Create a signal holding a `.value` which is calculated from the given async function (QRL). The
|
|
1088
|
-
* standalone version of `useAsync$`.
|
|
1089
|
-
*
|
|
1090
|
-
* @deprecated Use `createComputed$` instead, it has async support now.
|
|
1091
|
-
* @public
|
|
1092
|
-
*/
|
|
1093
|
-
export declare const createAsync$: <T>(qrl: (arg: ComputeCtx<T>) => Promise<T>, options?: AsyncSignalOptions<T>) => AsyncSignal<T>;
|
|
1094
|
-
|
|
1095
1082
|
/** @internal */
|
|
1096
|
-
export declare const createAsyncQrl: <T>(qrl: QRL<
|
|
1083
|
+
export declare const createAsyncQrl: <T>(qrl: QRL<ComputedFn<T>>, options?: AsyncSignalOptions<T>) => _AsyncSignalImpl<T>;
|
|
1097
1084
|
|
|
1098
1085
|
/**
|
|
1099
1086
|
* Create a computed signal which is calculated from the given QRL. A computed signal is a signal
|
|
@@ -1305,9 +1292,10 @@ declare class DomContainer extends _SharedContainer implements ClientContainer {
|
|
|
1305
1292
|
$hoistStyles$(): void;
|
|
1306
1293
|
$setRawState$(id: number, vParent: _VNode): void;
|
|
1307
1294
|
parseQRL<T = unknown>(qrlStr: string): QRL<T>;
|
|
1308
|
-
handleError(err: any, host: _VNode | null): void;
|
|
1295
|
+
handleError(err: any, host: _VNode | null, phase?: ErrorBoundaryPhase): void;
|
|
1309
1296
|
setContext<T>(host: _VNode, context: ContextId<T>, value: T): void;
|
|
1310
1297
|
resolveContext<T>(host: _VNode, contextId: ContextId<T>): T | undefined;
|
|
1298
|
+
resolveContextHost(host: _VNode, contextId: ContextId<unknown>): _VNode | null;
|
|
1311
1299
|
getParentHost(host: _VNode): _VNode | null;
|
|
1312
1300
|
setHostProp<T>(host: _HostElement, name: string, value: T): void;
|
|
1313
1301
|
getHostProp<T>(host: _HostElement, name: string): T | null;
|
|
@@ -1346,6 +1334,12 @@ declare interface EachProps<T, ITEM extends JSXOutput = JSXOutput> {
|
|
|
1346
1334
|
/** @internal */
|
|
1347
1335
|
export declare const _eaT: ({ track }: TaskCtx) => Promise<void>;
|
|
1348
1336
|
|
|
1337
|
+
/** @internal */
|
|
1338
|
+
export declare const _ebC: (props: ErrorBoundaryProps) => JSXOutput;
|
|
1339
|
+
|
|
1340
|
+
/** @internal */
|
|
1341
|
+
export declare const _ebR: () => void;
|
|
1342
|
+
|
|
1349
1343
|
/** @internal */
|
|
1350
1344
|
export declare const _EFFECT_BACK_REF: unique symbol;
|
|
1351
1345
|
|
|
@@ -1417,9 +1411,55 @@ export declare const _EMPTY_ARRAY: any[];
|
|
|
1417
1411
|
/** @internal */
|
|
1418
1412
|
export declare const _EMPTY_OBJ: Record<string, any>;
|
|
1419
1413
|
|
|
1420
|
-
/** @public */
|
|
1421
|
-
export declare
|
|
1422
|
-
|
|
1414
|
+
/** Renders `fallback$` instead of its children when a descendant throws. @public @experimental */
|
|
1415
|
+
export declare const ErrorBoundary: Component<ErrorBoundaryProps>;
|
|
1416
|
+
|
|
1417
|
+
/** Structured metadata about a caught error, passed to `onError$`. @public @experimental */
|
|
1418
|
+
export declare interface ErrorBoundaryInfo {
|
|
1419
|
+
/** Where the caught error originated. */
|
|
1420
|
+
phase: ErrorBoundaryPhase;
|
|
1421
|
+
/**
|
|
1422
|
+
* Identifies the boundary within the page. Allocated in render order and kept across a resume, so
|
|
1423
|
+
* every report from one boundary shares it — but it shifts when render order changes.
|
|
1424
|
+
*/
|
|
1425
|
+
boundaryId: string;
|
|
1426
|
+
/**
|
|
1427
|
+
* The code a production fallback shows for a server-origin error, so a user's bug report matches
|
|
1428
|
+
* your logs. An error caught during SSR reports a second, different digest if the client
|
|
1429
|
+
* re-derives it — the stacks differ.
|
|
1430
|
+
*/
|
|
1431
|
+
digest: string;
|
|
1432
|
+
}
|
|
1433
|
+
|
|
1434
|
+
/** Identifies where an error caught by an error boundary originated. @public @experimental */
|
|
1435
|
+
export declare const enum ErrorBoundaryPhase {
|
|
1436
|
+
Render = "render",
|
|
1437
|
+
Event = "event",
|
|
1438
|
+
Hook = "hook"
|
|
1439
|
+
}
|
|
1440
|
+
|
|
1441
|
+
/** @public @experimental */
|
|
1442
|
+
export declare interface ErrorBoundaryProps {
|
|
1443
|
+
/**
|
|
1444
|
+
* Rendered when a descendant throws. The error is always an `Error`, so `{error.message}` is
|
|
1445
|
+
* safe: a non-Error throw is wrapped, and production redacts server-origin errors to a generic
|
|
1446
|
+
* message plus `digest`. Client-origin errors render as thrown — their messages already live in
|
|
1447
|
+
* the browser bundle.
|
|
1448
|
+
*
|
|
1449
|
+
* Wrap `reset` in a handler — `onClick$={() => reset()}`, not `onClick$={reset}` — so it stays
|
|
1450
|
+
* wired in a streamed fallback.
|
|
1451
|
+
*/
|
|
1452
|
+
fallback$: QRL<(error: Error & {
|
|
1453
|
+
digest?: string;
|
|
1454
|
+
}, reset: QRL<() => void>) => JSXOutput>;
|
|
1455
|
+
/**
|
|
1456
|
+
* Side effect only; never affects rendering. Receives the original `Error` — a non-Error throw
|
|
1457
|
+
* arrives wrapped, with `cause` set to the raw value.
|
|
1458
|
+
*
|
|
1459
|
+
* An error caught during SSR fires again when the client re-derives it, so dedupe in your
|
|
1460
|
+
* reporter.
|
|
1461
|
+
*/
|
|
1462
|
+
onError$?: QRL<(error: Error, info: ErrorBoundaryInfo) => void>;
|
|
1423
1463
|
}
|
|
1424
1464
|
|
|
1425
1465
|
/** @public */
|
|
@@ -1559,6 +1599,9 @@ declare function h<TYPE extends string | FunctionComponent<PROPS>, PROPS extends
|
|
|
1559
1599
|
export { h as createElement }
|
|
1560
1600
|
export { h }
|
|
1561
1601
|
|
|
1602
|
+
/** @internal */
|
|
1603
|
+
export declare function _handleSSRError(container: SSRContainer, err: any, host: ISsrNode | null, phase: ErrorBoundaryPhase): void;
|
|
1604
|
+
|
|
1562
1605
|
/**
|
|
1563
1606
|
* @returns True if the store has effects for the given prop
|
|
1564
1607
|
* @internal
|
|
@@ -1773,6 +1816,9 @@ declare interface InvokeContext {
|
|
|
1773
1816
|
$container$: _Container | undefined;
|
|
1774
1817
|
}
|
|
1775
1818
|
|
|
1819
|
+
declare class InvokeJSXFunction {
|
|
1820
|
+
}
|
|
1821
|
+
|
|
1776
1822
|
declare type IsAcceptableDOMValue<T> = T extends boolean | number | string | null | undefined ? ((...args: any[]) => any) extends T ? false : true : false;
|
|
1777
1823
|
|
|
1778
1824
|
declare type IsAny<T> = 0 extends T & 1 ? true : false;
|
|
@@ -2468,7 +2514,9 @@ export declare interface _QDocument extends Document {
|
|
|
2468
2514
|
/** Processes one vnode patch script. */
|
|
2469
2515
|
qProcessVNodeDataPatch?: (script: Element | null) => void;
|
|
2470
2516
|
/** Processes an out-of-order Suspense segment after its resolved HTML is swapped in. */
|
|
2471
|
-
qProcessOOOS?: (boundaryId: number,
|
|
2517
|
+
qProcessOOOS?: (boundaryId: number, revealNode: Element | null) => void;
|
|
2518
|
+
/** Routes `qerror` to the owning container; installed once per document, shared by all bundles. */
|
|
2519
|
+
qErrorHandler?: (e: Event) => void;
|
|
2472
2520
|
}
|
|
2473
2521
|
|
|
2474
2522
|
/**
|
|
@@ -2903,10 +2951,10 @@ export declare interface ReadonlySignal<T = unknown> {
|
|
|
2903
2951
|
}
|
|
2904
2952
|
|
|
2905
2953
|
/** @internal */
|
|
2906
|
-
export declare const _reC: (props: RevealProps) => JSXNodeInternal<
|
|
2954
|
+
export declare const _reC: (props: RevealProps) => JSXNodeInternal<FunctionComponent< {
|
|
2907
2955
|
name?: string;
|
|
2908
2956
|
children?: JSXChildren;
|
|
2909
|
-
}>>;
|
|
2957
|
+
}>> | JSXNodeInternal<InternalServerComponent<SSRRevealSlotProps>>;
|
|
2910
2958
|
|
|
2911
2959
|
/**
|
|
2912
2960
|
* A ref can be either a signal or a function. Note that the type of Signal is Element so that it
|
|
@@ -3008,7 +3056,7 @@ export declare const _resolveContextWithoutSequentialScope: <STATE>(context: Con
|
|
|
3008
3056
|
* const Cmp = component$(() => {
|
|
3009
3057
|
* const city = useSignal('');
|
|
3010
3058
|
*
|
|
3011
|
-
* const weather =
|
|
3059
|
+
* const weather = useComputed$(async ({ track, cleanup, abortSignal }) => {
|
|
3012
3060
|
* const cityName = track(city);
|
|
3013
3061
|
* const res = await fetch(`http://weatherdata.com?city=${cityName}`, {
|
|
3014
3062
|
* signal: abortSignal,
|
|
@@ -3022,7 +3070,7 @@ export declare const _resolveContextWithoutSequentialScope: <STATE>(context: Con
|
|
|
3022
3070
|
* <input name="city" bind:value={city} />
|
|
3023
3071
|
* <div>
|
|
3024
3072
|
* Temperature:{' '}
|
|
3025
|
-
* {weather.
|
|
3073
|
+
* {weather.pending
|
|
3026
3074
|
* ? 'Loading...'
|
|
3027
3075
|
* : weather.error
|
|
3028
3076
|
* ? `Error: ${weather.error.message}`
|
|
@@ -3033,8 +3081,8 @@ export declare const _resolveContextWithoutSequentialScope: <STATE>(context: Con
|
|
|
3033
3081
|
* });
|
|
3034
3082
|
* ```
|
|
3035
3083
|
*
|
|
3036
|
-
* @deprecated Use `
|
|
3037
|
-
*
|
|
3084
|
+
* @deprecated Use `useComputed$` instead. Read the `pending` and `error` properties from the
|
|
3085
|
+
* returned signal to determine the status.
|
|
3038
3086
|
* @public
|
|
3039
3087
|
*/
|
|
3040
3088
|
export declare const Resource: <T>({ value, onResolved, onPending, onRejected, }: ResourceProps<T>) => JSXOutput;
|
|
@@ -3095,7 +3143,7 @@ declare interface ResourceReturnInternal<T> {
|
|
|
3095
3143
|
}
|
|
3096
3144
|
|
|
3097
3145
|
/** @internal */
|
|
3098
|
-
export declare const _restProps: (props:
|
|
3146
|
+
export declare const _restProps: (props: unknown, omit?: string[], target?: Props) => Props;
|
|
3099
3147
|
|
|
3100
3148
|
/** @internal */
|
|
3101
3149
|
export declare const _reT: ({ cleanup }: TaskCtx) => void;
|
|
@@ -3399,7 +3447,7 @@ export declare abstract class _SharedContainer implements _Container {
|
|
|
3399
3447
|
} | null, symbolToChunkResolver: SymbolToChunkResolver, writer?: StreamWriter): SerializationContext;
|
|
3400
3448
|
$checkPendingCount$(): void;
|
|
3401
3449
|
abstract ensureProjectionResolved(host: _HostElement): void;
|
|
3402
|
-
abstract handleError(err: any, $host$: _HostElement | null): void;
|
|
3450
|
+
abstract handleError(err: any, $host$: _HostElement | null, phase?: ErrorBoundaryPhase): void;
|
|
3403
3451
|
abstract getParentHost(host: _HostElement): _HostElement | null;
|
|
3404
3452
|
abstract setContext<T>(host: _HostElement, context: ContextId<T>, value: T): void;
|
|
3405
3453
|
abstract resolveContext<T>(host: _HostElement, contextId: ContextId<T>): T | undefined;
|
|
@@ -3754,9 +3802,14 @@ declare interface SSRContainer extends _Container {
|
|
|
3754
3802
|
readonly symbolToChunkResolver: SymbolToChunkResolver;
|
|
3755
3803
|
readonly resolvedManifest: ResolvedManifest;
|
|
3756
3804
|
readonly outOfOrderStreaming: boolean;
|
|
3805
|
+
readonly $transformError$: ((error: unknown) => unknown) | undefined;
|
|
3757
3806
|
additionalHeadNodes: Array<JSXNodeInternal>;
|
|
3758
3807
|
additionalBodyNodes: Array<JSXNodeInternal>;
|
|
3759
3808
|
$noScriptHere$: number;
|
|
3809
|
+
/** Innermost open ErrorBoundary content host, so the walker can skip an errored subtree. */
|
|
3810
|
+
$errorContentHost$: ISsrNode | null;
|
|
3811
|
+
/** Set when an ErrorBoundary caught during this container's render. */
|
|
3812
|
+
$hasBoundaryError$?: boolean;
|
|
3760
3813
|
/**
|
|
3761
3814
|
* Lets the container place a root-level `useOn` placeholder `<script>` itself when injecting it
|
|
3762
3815
|
* inline would put it at an illegal position. Returns `true` if the container took the node, in
|
|
@@ -3786,11 +3839,15 @@ declare interface SSRContainer extends _Container {
|
|
|
3786
3839
|
render(jsx: JSXOutput): Promise<void>;
|
|
3787
3840
|
renderJSX(jsx: JSXOutput, options: SSRRenderJSXOptions): Promise<void>;
|
|
3788
3841
|
$runQueuedRender$<T>(render: () => ValueOrPromise<T>): ValueOrPromise<T>;
|
|
3789
|
-
nextOutOfOrderId(): number;
|
|
3842
|
+
nextOutOfOrderId(markUsed?: boolean): number;
|
|
3790
3843
|
emitOutOfOrderSegmentScripts(scripts: string): void;
|
|
3791
3844
|
segment(segmentId: string, jsx: JSXOutput, options: SSRRenderJSXOptions): Promise<SSROutOfOrderSegment>;
|
|
3792
3845
|
queueOutOfOrderSegment(segment: Promise<void>): void;
|
|
3793
3846
|
emitOutOfOrderExecutorIfNeeded(): void;
|
|
3847
|
+
emitErrorSwapExecutorIfNeeded(): void;
|
|
3848
|
+
$registerErrorSwap$(boundaryId: number): void;
|
|
3849
|
+
/** Keeps the node re-renderable after resume. */
|
|
3850
|
+
$retainForResume$(node: ISsrNode | null | undefined): void;
|
|
3794
3851
|
emitInlineScript(script: string): void;
|
|
3795
3852
|
writeScript(attrs: Props, body?: string): void;
|
|
3796
3853
|
emitPreloaderPre(): void;
|
|
@@ -3847,6 +3904,7 @@ declare interface SSRRootRefPathChunk {
|
|
|
3847
3904
|
|
|
3848
3905
|
declare interface SSRSegmentContainer extends SSRContainer {
|
|
3849
3906
|
$rootContainer$: SSRContainer;
|
|
3907
|
+
$errorSwapIds$: number[] | null;
|
|
3850
3908
|
$recordExternalRootEffect$(producer: unknown, effect: EffectSubscription, prop: string | symbol | null, sourceEffects?: Map<string | symbol, Set<EffectSubscription>>): void;
|
|
3851
3909
|
$finalizeOutOfOrderSegment$(segmentId: string, segment: SSROutOfOrderSegment): Promise<{
|
|
3852
3910
|
html: string;
|
|
@@ -3893,7 +3951,7 @@ declare type SSRWriteChunk = string | number | SSRRootRefPathChunk | SSRRootRefD
|
|
|
3893
3951
|
|
|
3894
3952
|
declare type StackFn = () => ValueOrPromise<void>;
|
|
3895
3953
|
|
|
3896
|
-
declare type StackValue = ValueOrPromise<JSXOutput | StackFn | Promise<JSXOutput> | typeof Promise | AsyncGenerator | typeof MaybeAsyncSignal>;
|
|
3954
|
+
declare type StackValue = ValueOrPromise<JSXOutput | StackFn | Promise<JSXOutput> | typeof Promise | AsyncGenerator | typeof MaybeAsyncSignal | typeof InvokeJSXFunction>;
|
|
3897
3955
|
|
|
3898
3956
|
declare type StopPropagation = {
|
|
3899
3957
|
[K in keyof HTMLElementEventMap as `stoppropagation:${K}`]?: boolean;
|
|
@@ -4428,37 +4486,6 @@ export declare const unwrapStore: <T>(value: T) => T;
|
|
|
4428
4486
|
*/
|
|
4429
4487
|
export declare function _updateProjectionProps(container: _Container, vnode: _VirtualVNode, newProps: Record<string, unknown>): void;
|
|
4430
4488
|
|
|
4431
|
-
/**
|
|
4432
|
-
* Creates an AsyncSignal which holds the result of the given async function. If the function uses
|
|
4433
|
-
* `track()` to track reactive state, and that state changes, the AsyncSignal is recalculated, and
|
|
4434
|
-
* if the result changed, all tasks which are tracking the AsyncSignal will be re-run and all
|
|
4435
|
-
* subscribers (components, tasks etc) that read the AsyncSignal will be updated.
|
|
4436
|
-
*
|
|
4437
|
-
* If the async function throws an error, the AsyncSignal will capture the error and set the `error`
|
|
4438
|
-
* property. The error can be cleared by re-running the async function successfully.
|
|
4439
|
-
*
|
|
4440
|
-
* While the async function is running, the `loading` property will be set to `true`. Once the
|
|
4441
|
-
* function completes, `loading` will be set to `false`.
|
|
4442
|
-
*
|
|
4443
|
-
* If the value has not yet been resolved, reading the AsyncSignal will throw a Promise, which will
|
|
4444
|
-
* retry the component or task once the value resolves.
|
|
4445
|
-
*
|
|
4446
|
-
* If the value has been resolved, but the async function is re-running, reading the AsyncSignal
|
|
4447
|
-
* will subscribe to it and return the last resolved value until the new value is ready. As soon as
|
|
4448
|
-
* the new value is ready, the subscribers will be updated.
|
|
4449
|
-
*
|
|
4450
|
-
* @deprecated Use `useComputed$` instead, it has async support now. It auto-tracks synchronous
|
|
4451
|
-
* reads; after the first `await`, use the provided `track()` like before.
|
|
4452
|
-
* @public
|
|
4453
|
-
*/
|
|
4454
|
-
export declare const useAsync$: <T>(qrl: AsyncFn<T>, options?: AsyncSignalOptions<T> | undefined) => AsyncSignal<T>;
|
|
4455
|
-
|
|
4456
|
-
/**
|
|
4457
|
-
* @deprecated Use `useComputed$` instead, it has async support now.
|
|
4458
|
-
* @internal
|
|
4459
|
-
*/
|
|
4460
|
-
export declare const useAsyncQrl: <T>(qrl: QRL<AsyncFn<T>>, options?: AsyncSignalOptions<T>) => AsyncSignal<T>;
|
|
4461
|
-
|
|
4462
4489
|
/**
|
|
4463
4490
|
* Creates a computed signal which is calculated from the given function. A computed signal is a
|
|
4464
4491
|
* signal which is calculated from other signals. When the signals change, the computed signal is
|
|
@@ -4609,9 +4636,6 @@ export declare const useContext: UseContext;
|
|
|
4609
4636
|
*/
|
|
4610
4637
|
export declare const useContextProvider: <STATE>(context: ContextId<STATE>, newValue: STATE) => void;
|
|
4611
4638
|
|
|
4612
|
-
/** @public */
|
|
4613
|
-
export declare const useErrorBoundary: () => ErrorBoundaryStore;
|
|
4614
|
-
|
|
4615
4639
|
/**
|
|
4616
4640
|
* Injected by the optimizer into component$ bodies in HMR mode. Registers a document event listener
|
|
4617
4641
|
* that triggers component re-render on HMR updates.
|
|
@@ -5117,7 +5141,7 @@ export declare const _VAR_PROPS: unique symbol;
|
|
|
5117
5141
|
export declare const _verifySerializable: <T>(value: T, preMessage?: string) => T;
|
|
5118
5142
|
|
|
5119
5143
|
/**
|
|
5120
|
-
* 2.0.0-beta.
|
|
5144
|
+
* 2.0.0-beta.42-dev+3473a49
|
|
5121
5145
|
*
|
|
5122
5146
|
* @public
|
|
5123
5147
|
*/
|
|
@@ -5235,7 +5259,8 @@ declare const enum VNodeDataFlag {
|
|
|
5235
5259
|
VIRTUAL_NODE = 2,
|
|
5236
5260
|
ELEMENT_NODE = 4,
|
|
5237
5261
|
REFERENCE = 8,
|
|
5238
|
-
SERIALIZE = 16
|
|
5262
|
+
SERIALIZE = 16,
|
|
5263
|
+
INERT = 32
|
|
5239
5264
|
}
|
|
5240
5265
|
|
|
5241
5266
|
/**
|