@qwik.dev/core 2.0.0-beta.40 → 2.0.0-beta.41
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 +13 -57
- package/dist/core.min.mjs +9 -9
- package/dist/core.mjs +41 -58
- package/dist/core.mjs.map +1 -1
- package/dist/core.prod.mjs +525 -517
- package/dist/loader/package.json +1 -1
- package/dist/optimizer.d.ts +1 -7
- package/dist/optimizer.mjs +48 -66
- package/dist/server.mjs +2 -2
- package/dist/server.prod.mjs +30 -30
- 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.mjs +4 -4
- package/dist/testing/package.json +1 -1
- package/dist/worker/package.json +1 -1
- package/package.json +3 -3
- package/public.d.ts +0 -2
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.41-dev+4d04076
|
|
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.41-dev+4d04076");
|
|
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) */
|
|
@@ -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
|
|
@@ -3008,7 +2995,7 @@ export declare const _resolveContextWithoutSequentialScope: <STATE>(context: Con
|
|
|
3008
2995
|
* const Cmp = component$(() => {
|
|
3009
2996
|
* const city = useSignal('');
|
|
3010
2997
|
*
|
|
3011
|
-
* const weather =
|
|
2998
|
+
* const weather = useComputed$(async ({ track, cleanup, abortSignal }) => {
|
|
3012
2999
|
* const cityName = track(city);
|
|
3013
3000
|
* const res = await fetch(`http://weatherdata.com?city=${cityName}`, {
|
|
3014
3001
|
* signal: abortSignal,
|
|
@@ -3022,7 +3009,7 @@ export declare const _resolveContextWithoutSequentialScope: <STATE>(context: Con
|
|
|
3022
3009
|
* <input name="city" bind:value={city} />
|
|
3023
3010
|
* <div>
|
|
3024
3011
|
* Temperature:{' '}
|
|
3025
|
-
* {weather.
|
|
3012
|
+
* {weather.pending
|
|
3026
3013
|
* ? 'Loading...'
|
|
3027
3014
|
* : weather.error
|
|
3028
3015
|
* ? `Error: ${weather.error.message}`
|
|
@@ -3033,8 +3020,8 @@ export declare const _resolveContextWithoutSequentialScope: <STATE>(context: Con
|
|
|
3033
3020
|
* });
|
|
3034
3021
|
* ```
|
|
3035
3022
|
*
|
|
3036
|
-
* @deprecated Use `
|
|
3037
|
-
*
|
|
3023
|
+
* @deprecated Use `useComputed$` instead. Read the `pending` and `error` properties from the
|
|
3024
|
+
* returned signal to determine the status.
|
|
3038
3025
|
* @public
|
|
3039
3026
|
*/
|
|
3040
3027
|
export declare const Resource: <T>({ value, onResolved, onPending, onRejected, }: ResourceProps<T>) => JSXOutput;
|
|
@@ -3095,7 +3082,7 @@ declare interface ResourceReturnInternal<T> {
|
|
|
3095
3082
|
}
|
|
3096
3083
|
|
|
3097
3084
|
/** @internal */
|
|
3098
|
-
export declare const _restProps: (props:
|
|
3085
|
+
export declare const _restProps: (props: unknown, omit?: string[], target?: Props) => Props;
|
|
3099
3086
|
|
|
3100
3087
|
/** @internal */
|
|
3101
3088
|
export declare const _reT: ({ cleanup }: TaskCtx) => void;
|
|
@@ -4428,37 +4415,6 @@ export declare const unwrapStore: <T>(value: T) => T;
|
|
|
4428
4415
|
*/
|
|
4429
4416
|
export declare function _updateProjectionProps(container: _Container, vnode: _VirtualVNode, newProps: Record<string, unknown>): void;
|
|
4430
4417
|
|
|
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
4418
|
/**
|
|
4463
4419
|
* Creates a computed signal which is calculated from the given function. A computed signal is a
|
|
4464
4420
|
* signal which is calculated from other signals. When the signals change, the computed signal is
|
|
@@ -5117,7 +5073,7 @@ export declare const _VAR_PROPS: unique symbol;
|
|
|
5117
5073
|
export declare const _verifySerializable: <T>(value: T, preMessage?: string) => T;
|
|
5118
5074
|
|
|
5119
5075
|
/**
|
|
5120
|
-
* 2.0.0-beta.
|
|
5076
|
+
* 2.0.0-beta.41-dev+4d04076
|
|
5121
5077
|
*
|
|
5122
5078
|
* @public
|
|
5123
5079
|
*/
|