@qwik.dev/core 2.0.0-alpha.6 → 2.0.0-alpha.7
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.darwin-x64.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/build/package.json +1 -1
- package/dist/cli.cjs +65 -42
- package/dist/core-internal.d.ts +77 -76
- package/dist/core.cjs +1498 -1323
- package/dist/core.cjs.map +1 -1
- package/dist/core.min.mjs +1 -1
- package/dist/core.mjs +1496 -1323
- package/dist/core.mjs.map +1 -1
- package/dist/core.prod.cjs +884 -782
- package/dist/core.prod.mjs +1006 -867
- package/dist/insights/index.qwik.cjs +3652 -154
- package/dist/insights/index.qwik.mjs +3652 -154
- package/dist/loader/index.cjs +2 -2
- package/dist/loader/index.mjs +2 -2
- package/dist/loader/package.json +1 -1
- package/dist/optimizer.cjs +210 -5714
- package/dist/optimizer.mjs +191 -6037
- package/dist/prefetch/package.json +1 -1
- package/dist/qwikloader.debug.js +12 -15
- package/dist/qwikloader.js +2 -2
- package/dist/server.cjs +762 -7127
- package/dist/server.mjs +778 -7121
- package/dist/starters/adapters/fastify/src/plugins/fastify-qwik.ts +2 -0
- package/dist/starters/features/cypress/package.json +1 -1
- package/dist/starters/features/drizzle/drizzle/schema.ts +6 -18
- package/dist/starters/features/drizzle/drizzle.config.ts +5 -4
- package/dist/starters/features/drizzle/package.json +14 -11
- package/dist/starters/features/pandacss/package.json +1 -1
- package/dist/starters/features/partytown/package.json +1 -1
- package/dist/starters/features/postcss/package.json +1 -1
- package/dist/starters/features/prisma/package.json +1 -1
- package/dist/starters/features/react/package.json +1 -1
- package/dist/starters/features/storybook/package.json +1 -1
- package/dist/starters/features/styled-vanilla-extract/package.json +2 -1
- package/dist/starters/features/tailwind/package.json +15 -9
- package/dist/starters/features/tailwind/src/global.css +1 -7
- package/dist/starters/features/turso/package.json +1 -1
- package/dist/starters/features/vitest/package.json +1 -1
- package/dist/testing/index.cjs +1265 -1124
- package/dist/testing/index.mjs +1271 -1124
- package/dist/testing/package.json +1 -1
- package/handlers.mjs +9 -0
- package/package.json +6 -4
- package/public.d.ts +2 -0
- package/dist/starters/features/tailwind/.vscode/settings.json +0 -3
- package/dist/starters/features/tailwind/postcss.config.cjs +0 -6
- package/dist/starters/features/tailwind/tailwind.config.js +0 -8
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
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-alpha.
|
|
3
|
+
* @qwik.dev/core/cli 2.0.0-alpha.7-dev+a26598a
|
|
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
|
|
@@ -96,20 +96,19 @@ var require_src = __commonJS({
|
|
|
96
96
|
}
|
|
97
97
|
});
|
|
98
98
|
|
|
99
|
-
// node_modules/.pnpm/picocolors@1.
|
|
99
|
+
// node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
|
|
100
100
|
var require_picocolors = __commonJS({
|
|
101
|
-
"node_modules/.pnpm/picocolors@1.
|
|
102
|
-
var
|
|
103
|
-
var
|
|
104
|
-
var
|
|
101
|
+
"node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js"(exports2, module2) {
|
|
102
|
+
var p = process || {};
|
|
103
|
+
var argv = p.argv || [];
|
|
104
|
+
var env = p.env || {};
|
|
105
|
+
var isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
|
|
105
106
|
var formatter = (open, close, replace = open) => (input) => {
|
|
106
|
-
let string = "" + input;
|
|
107
|
-
let index = string.indexOf(close, open.length);
|
|
107
|
+
let string = "" + input, index = string.indexOf(close, open.length);
|
|
108
108
|
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
|
109
109
|
};
|
|
110
110
|
var replaceClose = (string, close, replace, index) => {
|
|
111
|
-
let result = "";
|
|
112
|
-
let cursor = 0;
|
|
111
|
+
let result = "", cursor = 0;
|
|
113
112
|
do {
|
|
114
113
|
result += string.substring(cursor, index) + replace;
|
|
115
114
|
cursor = index + close.length;
|
|
@@ -118,34 +117,50 @@ var require_picocolors = __commonJS({
|
|
|
118
117
|
return result + string.substring(cursor);
|
|
119
118
|
};
|
|
120
119
|
var createColors = (enabled = isColorSupported) => {
|
|
121
|
-
let
|
|
120
|
+
let f3 = enabled ? formatter : () => String;
|
|
122
121
|
return {
|
|
123
122
|
isColorSupported: enabled,
|
|
124
|
-
reset:
|
|
125
|
-
bold:
|
|
126
|
-
dim:
|
|
127
|
-
italic:
|
|
128
|
-
underline:
|
|
129
|
-
inverse:
|
|
130
|
-
hidden:
|
|
131
|
-
strikethrough:
|
|
132
|
-
black:
|
|
133
|
-
red:
|
|
134
|
-
green:
|
|
135
|
-
yellow:
|
|
136
|
-
blue:
|
|
137
|
-
magenta:
|
|
138
|
-
cyan:
|
|
139
|
-
white:
|
|
140
|
-
gray:
|
|
141
|
-
bgBlack:
|
|
142
|
-
bgRed:
|
|
143
|
-
bgGreen:
|
|
144
|
-
bgYellow:
|
|
145
|
-
bgBlue:
|
|
146
|
-
bgMagenta:
|
|
147
|
-
bgCyan:
|
|
148
|
-
bgWhite:
|
|
123
|
+
reset: f3("\x1B[0m", "\x1B[0m"),
|
|
124
|
+
bold: f3("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
|
|
125
|
+
dim: f3("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
|
|
126
|
+
italic: f3("\x1B[3m", "\x1B[23m"),
|
|
127
|
+
underline: f3("\x1B[4m", "\x1B[24m"),
|
|
128
|
+
inverse: f3("\x1B[7m", "\x1B[27m"),
|
|
129
|
+
hidden: f3("\x1B[8m", "\x1B[28m"),
|
|
130
|
+
strikethrough: f3("\x1B[9m", "\x1B[29m"),
|
|
131
|
+
black: f3("\x1B[30m", "\x1B[39m"),
|
|
132
|
+
red: f3("\x1B[31m", "\x1B[39m"),
|
|
133
|
+
green: f3("\x1B[32m", "\x1B[39m"),
|
|
134
|
+
yellow: f3("\x1B[33m", "\x1B[39m"),
|
|
135
|
+
blue: f3("\x1B[34m", "\x1B[39m"),
|
|
136
|
+
magenta: f3("\x1B[35m", "\x1B[39m"),
|
|
137
|
+
cyan: f3("\x1B[36m", "\x1B[39m"),
|
|
138
|
+
white: f3("\x1B[37m", "\x1B[39m"),
|
|
139
|
+
gray: f3("\x1B[90m", "\x1B[39m"),
|
|
140
|
+
bgBlack: f3("\x1B[40m", "\x1B[49m"),
|
|
141
|
+
bgRed: f3("\x1B[41m", "\x1B[49m"),
|
|
142
|
+
bgGreen: f3("\x1B[42m", "\x1B[49m"),
|
|
143
|
+
bgYellow: f3("\x1B[43m", "\x1B[49m"),
|
|
144
|
+
bgBlue: f3("\x1B[44m", "\x1B[49m"),
|
|
145
|
+
bgMagenta: f3("\x1B[45m", "\x1B[49m"),
|
|
146
|
+
bgCyan: f3("\x1B[46m", "\x1B[49m"),
|
|
147
|
+
bgWhite: f3("\x1B[47m", "\x1B[49m"),
|
|
148
|
+
blackBright: f3("\x1B[90m", "\x1B[39m"),
|
|
149
|
+
redBright: f3("\x1B[91m", "\x1B[39m"),
|
|
150
|
+
greenBright: f3("\x1B[92m", "\x1B[39m"),
|
|
151
|
+
yellowBright: f3("\x1B[93m", "\x1B[39m"),
|
|
152
|
+
blueBright: f3("\x1B[94m", "\x1B[39m"),
|
|
153
|
+
magentaBright: f3("\x1B[95m", "\x1B[39m"),
|
|
154
|
+
cyanBright: f3("\x1B[96m", "\x1B[39m"),
|
|
155
|
+
whiteBright: f3("\x1B[97m", "\x1B[39m"),
|
|
156
|
+
bgBlackBright: f3("\x1B[100m", "\x1B[49m"),
|
|
157
|
+
bgRedBright: f3("\x1B[101m", "\x1B[49m"),
|
|
158
|
+
bgGreenBright: f3("\x1B[102m", "\x1B[49m"),
|
|
159
|
+
bgYellowBright: f3("\x1B[103m", "\x1B[49m"),
|
|
160
|
+
bgBlueBright: f3("\x1B[104m", "\x1B[49m"),
|
|
161
|
+
bgMagentaBright: f3("\x1B[105m", "\x1B[49m"),
|
|
162
|
+
bgCyanBright: f3("\x1B[106m", "\x1B[49m"),
|
|
163
|
+
bgWhiteBright: f3("\x1B[107m", "\x1B[49m")
|
|
149
164
|
};
|
|
150
165
|
};
|
|
151
166
|
module2.exports = createColors();
|
|
@@ -5253,13 +5268,19 @@ var import_semver = require("semver");
|
|
|
5253
5268
|
init_dist2();
|
|
5254
5269
|
async function updateDependencies() {
|
|
5255
5270
|
const packageJson = await readPackageJson(process.cwd());
|
|
5256
|
-
const devDependencies = packageJson.devDependencies ??= {};
|
|
5257
|
-
const dependencies = packageJson.dependencies ??= {};
|
|
5258
5271
|
const version = getPackageTag();
|
|
5272
|
+
const dependencyNames = [
|
|
5273
|
+
"dependencies",
|
|
5274
|
+
"devDependencies",
|
|
5275
|
+
"peerDependencies",
|
|
5276
|
+
"optionalDependencies"
|
|
5277
|
+
];
|
|
5259
5278
|
for (const name of packageNames) {
|
|
5260
|
-
|
|
5261
|
-
|
|
5262
|
-
|
|
5279
|
+
for (const propName of dependencyNames) {
|
|
5280
|
+
const prop = packageJson[propName];
|
|
5281
|
+
if (prop && prop[name]) {
|
|
5282
|
+
prop[name] = version;
|
|
5283
|
+
}
|
|
5263
5284
|
}
|
|
5264
5285
|
}
|
|
5265
5286
|
await writePackageJson(process.cwd(), packageJson);
|
|
@@ -5357,9 +5378,11 @@ ${bold(bgRed('Warning: migration tool is experimental and will migrate your appl
|
|
|
5357
5378
|
"@qwik-city-plan"
|
|
5358
5379
|
// using old name, package name will be updated in the next step
|
|
5359
5380
|
);
|
|
5381
|
+
replaceImportInFiles2([["jsxs", "jsx"]], "@builder.io/qwik/jsx-runtime");
|
|
5360
5382
|
replacePackage("@qwik-city-plan", "@qwik-router-config", true);
|
|
5361
5383
|
replacePackage("@builder.io/qwik-city", "@qwik.dev/router");
|
|
5362
5384
|
replacePackage("@builder.io/qwik-react", "@qwik.dev/react");
|
|
5385
|
+
replacePackage("@builder.io/qwik/jsx-runtime", "@qwik.dev/core");
|
|
5363
5386
|
replacePackage("@builder.io/qwik", "@qwik.dev/core");
|
|
5364
5387
|
if (installedTsMorph) {
|
|
5365
5388
|
await removeTsMorphFromPackageJson();
|
|
@@ -5513,7 +5536,7 @@ async function printHelp(app) {
|
|
|
5513
5536
|
await runCommand2(Object.assign(app, { task: args[0], args }));
|
|
5514
5537
|
}
|
|
5515
5538
|
function printVersion() {
|
|
5516
|
-
console.log("2.0.0-alpha.
|
|
5539
|
+
console.log("2.0.0-alpha.7-dev+a26598a");
|
|
5517
5540
|
}
|
|
5518
5541
|
// Annotate the CommonJS export names for ESM import in node:
|
|
5519
5542
|
0 && (module.exports = {
|
package/dist/core-internal.d.ts
CHANGED
|
@@ -359,6 +359,11 @@ declare type AriaRole = 'alert' | 'alertdialog' | 'application' | 'article' | 'b
|
|
|
359
359
|
*/
|
|
360
360
|
declare type Augmented<E, A = {}> = Prettify<Filtered<E, A> & A>;
|
|
361
361
|
|
|
362
|
+
/** Class for back reference to the EffectSubscription */
|
|
363
|
+
declare abstract class BackRef {
|
|
364
|
+
[_EFFECT_BACK_REF]: Map<EffectProperty | string, EffectSubscription> | null;
|
|
365
|
+
}
|
|
366
|
+
|
|
362
367
|
declare type BivariantQrlFn<ARGS extends any[], RETURN> = {
|
|
363
368
|
/**
|
|
364
369
|
* Resolve the QRL of closure and invoke it.
|
|
@@ -375,15 +380,14 @@ declare type Booleanish = boolean | `${boolean}`;
|
|
|
375
380
|
declare const enum ChoreType {
|
|
376
381
|
MACRO = 240,
|
|
377
382
|
MICRO = 15,
|
|
378
|
-
/** Ensure
|
|
383
|
+
/** Ensure that the QRL promise is resolved before processing next chores in the queue */
|
|
379
384
|
QRL_RESOLVE = 1,
|
|
380
|
-
|
|
385
|
+
RUN_QRL = 2,
|
|
381
386
|
TASK = 3,
|
|
382
387
|
NODE_DIFF = 4,
|
|
383
388
|
NODE_PROP = 5,
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
RECOMPUTE_AND_SCHEDULE_EFFECTS = 8,
|
|
389
|
+
COMPONENT = 6,
|
|
390
|
+
RECOMPUTE_AND_SCHEDULE_EFFECTS = 7,
|
|
387
391
|
JOURNAL_FLUSH = 16,
|
|
388
392
|
VISIBLE = 32,
|
|
389
393
|
CLEANUP_VISIBLE = 48,
|
|
@@ -525,6 +529,17 @@ export declare interface ComputedSignal<T> extends ReadonlySignal<T> {
|
|
|
525
529
|
/** @internal */
|
|
526
530
|
export declare const _CONST_PROPS: unique symbol;
|
|
527
531
|
|
|
532
|
+
/**
|
|
533
|
+
* Effect is something which needs to happen (side-effect) due to signal value change.
|
|
534
|
+
*
|
|
535
|
+
* There are three types of effects:
|
|
536
|
+
*
|
|
537
|
+
* - `Task`: `useTask`, `useVisibleTask`, `useResource`
|
|
538
|
+
* - `VNode` and `ISsrNode`: Either a component or `<Signal>`
|
|
539
|
+
* - `Signal2`: A derived signal which contains a computation function.
|
|
540
|
+
*/
|
|
541
|
+
declare type Consumer = Task | _VNode | ISsrNode | Signal_2;
|
|
542
|
+
|
|
528
543
|
declare interface Container {
|
|
529
544
|
readonly $version$: string;
|
|
530
545
|
readonly $scheduler$: Scheduler;
|
|
@@ -786,9 +801,9 @@ declare const createScheduler: (container: Container, scheduleDrain: () => void,
|
|
|
786
801
|
(type: ChoreType.JOURNAL_FLUSH): ValueOrPromise<void>;
|
|
787
802
|
(type: ChoreType.WAIT_FOR_ALL): ValueOrPromise<void>;
|
|
788
803
|
(type: ChoreType.RECOMPUTE_AND_SCHEDULE_EFFECTS, host: HostElement | null, target: Signal): ValueOrPromise<void>;
|
|
789
|
-
(type: ChoreType.TASK | ChoreType.VISIBLE
|
|
804
|
+
(type: ChoreType.TASK | ChoreType.VISIBLE, task: Task): ValueOrPromise<void>;
|
|
805
|
+
(type: ChoreType.RUN_QRL, host: HostElement, target: QRLInternal<(...args: unknown[]) => unknown>, args: unknown[]): ValueOrPromise<void>;
|
|
790
806
|
(type: ChoreType.COMPONENT, host: HostElement, qrl: QRLInternal<OnRenderFn<unknown>>, props: Props | null): ValueOrPromise<JSXOutput>;
|
|
791
|
-
(type: ChoreType.COMPONENT_SSR, host: HostElement, qrl: QRLInternal<OnRenderFn<unknown>>, props: Props | null): ValueOrPromise<JSXOutput>;
|
|
792
807
|
(type: ChoreType.NODE_DIFF, host: HostElement, target: HostElement, value: JSXOutput | Signal): ValueOrPromise<void>;
|
|
793
808
|
(type: ChoreType.NODE_PROP, host: HostElement, prop: string, value: any): ValueOrPromise<void>;
|
|
794
809
|
(type: ChoreType.CLEANUP_VISIBLE, task: Task): ValueOrPromise<JSXOutput>;
|
|
@@ -818,7 +833,7 @@ export declare interface CSSProperties extends CSS_2.Properties<string | number>
|
|
|
818
833
|
}
|
|
819
834
|
|
|
820
835
|
/** @public */
|
|
821
|
-
declare interface DescriptorBase<T = unknown, B = unknown> extends
|
|
836
|
+
declare interface DescriptorBase<T = unknown, B = unknown> extends BackRef {
|
|
822
837
|
$flags$: number;
|
|
823
838
|
$index$: number;
|
|
824
839
|
$el$: HostElement;
|
|
@@ -867,9 +882,9 @@ declare class DomContainer extends _SharedContainer implements ClientContainer {
|
|
|
867
882
|
$storeProxyMap$: ObjToProxyMap;
|
|
868
883
|
$qFuncs$: Array<(...args: unknown[]) => unknown>;
|
|
869
884
|
$instanceHash$: string;
|
|
870
|
-
|
|
885
|
+
vNodeLocate: (id: string | Element) => _VNode;
|
|
886
|
+
private $stateData$;
|
|
871
887
|
private $styleIds$;
|
|
872
|
-
private $vnodeLocate$;
|
|
873
888
|
private $renderCount$;
|
|
874
889
|
constructor(element: _ContainerElement);
|
|
875
890
|
$setRawState$(id: number, vParent: _ElementVNode | _VirtualVNode): void;
|
|
@@ -894,19 +909,8 @@ declare type DomRef = {
|
|
|
894
909
|
$ssrNode$: SsrNode;
|
|
895
910
|
};
|
|
896
911
|
|
|
897
|
-
/** @
|
|
898
|
-
export declare
|
|
899
|
-
|
|
900
|
-
/**
|
|
901
|
-
* Effect is something which needs to happen (side-effect) due to signal value change.
|
|
902
|
-
*
|
|
903
|
-
* There are three types of effects:
|
|
904
|
-
*
|
|
905
|
-
* - `Task`: `useTask`, `useVisibleTask`, `useResource`
|
|
906
|
-
* - `VNode` and `ISsrNode`: Either a component or `<Signal>`
|
|
907
|
-
* - `Signal2`: A derived signal which contains a computation function.
|
|
908
|
-
*/
|
|
909
|
-
declare type Effect = Task | _VNode | ISsrNode | Signal_2;
|
|
912
|
+
/** @internal */
|
|
913
|
+
export declare const _EFFECT_BACK_REF: unique symbol;
|
|
910
914
|
|
|
911
915
|
/** @internal */
|
|
912
916
|
export declare class _EffectData {
|
|
@@ -914,8 +918,13 @@ export declare class _EffectData {
|
|
|
914
918
|
constructor(data: NodePropData);
|
|
915
919
|
}
|
|
916
920
|
|
|
921
|
+
declare const enum EffectProperty {
|
|
922
|
+
COMPONENT = ":",
|
|
923
|
+
VNODE = "."
|
|
924
|
+
}
|
|
925
|
+
|
|
917
926
|
/**
|
|
918
|
-
* An effect plus
|
|
927
|
+
* An effect consumer plus type of effect, back references to producers and additional data
|
|
919
928
|
*
|
|
920
929
|
* An effect can be trigger by one or more of signal inputs. The first step of re-running an effect
|
|
921
930
|
* is to clear its subscriptions so that the effect can re add new set of subscriptions. In order to
|
|
@@ -932,10 +941,10 @@ export declare class _EffectData {
|
|
|
932
941
|
* In the above case the `signalB` needs to be unsubscribed when `signalA` is falsy. We do this by
|
|
933
942
|
* always clearing all of the subscriptions
|
|
934
943
|
*
|
|
935
|
-
* The `
|
|
944
|
+
* The `EffectSubscription` stores
|
|
936
945
|
*
|
|
937
946
|
* ```
|
|
938
|
-
* subscription1 = [
|
|
947
|
+
* subscription1 = [effectConsumer1, EffectProperty.COMPONENT, Set[(signalA, signalB)]];
|
|
939
948
|
* ```
|
|
940
949
|
*
|
|
941
950
|
* The `signal1` and `signal2` back references are needed to "clear" existing subscriptions.
|
|
@@ -944,18 +953,20 @@ export declare class _EffectData {
|
|
|
944
953
|
* effect can be scheduled if either `signalA` or `signalB` triggers. The `subscription1` is shared
|
|
945
954
|
* between the signals.
|
|
946
955
|
*
|
|
947
|
-
* The second position `string
|
|
956
|
+
* The second position `EffectProperty|string` store the property name of the effect.
|
|
948
957
|
*
|
|
949
958
|
* - Property name of the VNode
|
|
950
959
|
* - `EffectProperty.COMPONENT` if component
|
|
951
960
|
* - `EffectProperty.VNODE` if VNode
|
|
952
961
|
*/
|
|
953
|
-
declare type
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
string
|
|
957
|
-
|
|
958
|
-
|
|
962
|
+
declare type EffectSubscription = [
|
|
963
|
+
Consumer,
|
|
964
|
+
// EffectSubscriptionProp.CONSUMER
|
|
965
|
+
EffectProperty | string,
|
|
966
|
+
// EffectSubscriptionProp.PROPERTY or string for attributes
|
|
967
|
+
Set<Signal_2 | TargetType> | null,
|
|
968
|
+
// EffectSubscriptionProp.BACK_REF
|
|
969
|
+
_EffectData | null
|
|
959
970
|
];
|
|
960
971
|
|
|
961
972
|
/** @internal */
|
|
@@ -974,7 +985,7 @@ _VNode | null | undefined,
|
|
|
974
985
|
Element,
|
|
975
986
|
//////////////////// 6 - Element
|
|
976
987
|
string | undefined,
|
|
977
|
-
|
|
988
|
+
(string | null)[]
|
|
978
989
|
] & {
|
|
979
990
|
__brand__: 'ElementVNode';
|
|
980
991
|
};
|
|
@@ -1162,14 +1173,6 @@ declare type HTMLInputAutocompleteAttribute = 'on' | 'off' | 'billing' | 'shippi
|
|
|
1162
1173
|
/** @public */
|
|
1163
1174
|
declare type HTMLInputTypeAttribute = 'button' | 'checkbox' | 'color' | 'date' | 'datetime-local' | 'email' | 'file' | 'hidden' | 'image' | 'month' | 'number' | 'password' | 'radio' | 'range' | 'reset' | 'search' | 'submit' | 'tel' | 'text' | 'time' | 'url' | 'week' | (string & {});
|
|
1164
1175
|
|
|
1165
|
-
/**
|
|
1166
|
-
* Low-level API used by the Optimizer to process `useTask$()` API. This method is not intended to
|
|
1167
|
-
* be used by developers.
|
|
1168
|
-
*
|
|
1169
|
-
* @internal
|
|
1170
|
-
*/
|
|
1171
|
-
export declare const _hW: () => void;
|
|
1172
|
-
|
|
1173
1176
|
declare type IfEquals<X, Y, A, B> = (<T>() => T extends X ? 1 : 2) extends <T>() => T extends Y ? 1 : 2 ? A : B;
|
|
1174
1177
|
|
|
1175
1178
|
/** @internal @deprecated v1 compat */
|
|
@@ -1255,7 +1258,7 @@ declare interface InvokeContext {
|
|
|
1255
1258
|
$event$: PossibleEvents | undefined;
|
|
1256
1259
|
/** The QRL function we're currently executing */
|
|
1257
1260
|
$qrl$: QRL | undefined;
|
|
1258
|
-
$effectSubscriber$:
|
|
1261
|
+
$effectSubscriber$: EffectSubscription | undefined;
|
|
1259
1262
|
$locale$: string | undefined;
|
|
1260
1263
|
$container$: Container | undefined;
|
|
1261
1264
|
}
|
|
@@ -1690,6 +1693,11 @@ declare type Props = Record<string, unknown>;
|
|
|
1690
1693
|
*/
|
|
1691
1694
|
export declare type PropsOf<COMP> = COMP extends string ? COMP extends keyof QwikIntrinsicElements ? QwikIntrinsicElements[COMP] : QwikIntrinsicElements['span'] : NonNullable<COMP> extends never ? never : COMP extends FunctionComponent<infer PROPS> ? PROPS extends Record<any, infer V> ? IsAny<V> extends true ? never : ObjectProps<PROPS> : COMP extends Component<infer OrigProps> ? ObjectProps<OrigProps> : PROPS : never;
|
|
1692
1695
|
|
|
1696
|
+
declare type PropsProxy = {
|
|
1697
|
+
[_VAR_PROPS]: Props;
|
|
1698
|
+
[_CONST_PROPS]: Props | null;
|
|
1699
|
+
};
|
|
1700
|
+
|
|
1693
1701
|
/**
|
|
1694
1702
|
* Extends the defined component PROPS, adding the default ones (children and q:slot) and allowing
|
|
1695
1703
|
* plain functions to QRL arguments.
|
|
@@ -1876,7 +1884,6 @@ declare type QRLInternal<TYPE = unknown> = QRL<TYPE> & QRLInternalMethods<TYPE>;
|
|
|
1876
1884
|
declare type QRLInternalMethods<TYPE> = {
|
|
1877
1885
|
readonly $chunk$: string | null;
|
|
1878
1886
|
readonly $symbol$: string;
|
|
1879
|
-
readonly $refSymbol$: string | null;
|
|
1880
1887
|
readonly $hash$: string;
|
|
1881
1888
|
$capture$: string[] | null;
|
|
1882
1889
|
$captureRef$: unknown[] | null;
|
|
@@ -2258,7 +2265,14 @@ declare interface ResourceReturnInternal<T> {
|
|
|
2258
2265
|
}
|
|
2259
2266
|
|
|
2260
2267
|
/** @internal */
|
|
2261
|
-
export declare const _restProps: (props:
|
|
2268
|
+
export declare const _restProps: (props: PropsProxy, omit: string[], target?: Props) => Props;
|
|
2269
|
+
|
|
2270
|
+
/**
|
|
2271
|
+
* This is called by qwik-loader to schedule a QRL. It has to be synchronous.
|
|
2272
|
+
*
|
|
2273
|
+
* @internal
|
|
2274
|
+
*/
|
|
2275
|
+
export declare const _run: (...args: unknown[]) => ValueOrPromise<void>;
|
|
2262
2276
|
|
|
2263
2277
|
declare type Scheduler = ReturnType<typeof createScheduler>;
|
|
2264
2278
|
|
|
@@ -2382,7 +2396,7 @@ export declare interface Signal<T = any> extends ReadonlySignal<T> {
|
|
|
2382
2396
|
declare class Signal_2<T = any> implements Signal<T> {
|
|
2383
2397
|
$untrackedValue$: T;
|
|
2384
2398
|
/** Store a list of effects which are dependent on this signal. */
|
|
2385
|
-
$effects$: null |
|
|
2399
|
+
$effects$: null | Set<EffectSubscription>;
|
|
2386
2400
|
$container$: Container | null;
|
|
2387
2401
|
constructor(container: Container | null, value: T);
|
|
2388
2402
|
get untrackedValue(): T;
|
|
@@ -2715,6 +2729,7 @@ declare type SsrNode = {
|
|
|
2715
2729
|
id: string;
|
|
2716
2730
|
childrenVNodeData: VNodeData[] | null;
|
|
2717
2731
|
vnodeData: VNodeData;
|
|
2732
|
+
[_EFFECT_BACK_REF]: Map<EffectProperty | string, EffectSubscription> | null;
|
|
2718
2733
|
};
|
|
2719
2734
|
|
|
2720
2735
|
/** @public */
|
|
@@ -2751,10 +2766,6 @@ export declare interface StreamWriter {
|
|
|
2751
2766
|
/** @internal */
|
|
2752
2767
|
export declare type _Stringifiable = string | boolean | number | null;
|
|
2753
2768
|
|
|
2754
|
-
declare abstract class Subscriber {
|
|
2755
|
-
$effectDependencies$: (Subscriber | TargetType)[] | null;
|
|
2756
|
-
}
|
|
2757
|
-
|
|
2758
2769
|
/**
|
|
2759
2770
|
* The TS types don't include the SVG attributes so we have to define them ourselves
|
|
2760
2771
|
*
|
|
@@ -2762,7 +2773,7 @@ declare abstract class Subscriber {
|
|
|
2762
2773
|
*
|
|
2763
2774
|
* @public
|
|
2764
2775
|
*/
|
|
2765
|
-
declare interface SVGAttributes<T extends Element = Element> extends AriaAttributes {
|
|
2776
|
+
export declare interface SVGAttributes<T extends Element = Element> extends AriaAttributes {
|
|
2766
2777
|
color?: string | undefined;
|
|
2767
2778
|
height?: Size | undefined;
|
|
2768
2779
|
id?: string | undefined;
|
|
@@ -3063,7 +3074,7 @@ declare type TableCellSpecialAttrs = {
|
|
|
3063
3074
|
|
|
3064
3075
|
declare type TargetType = Record<string | symbol, any>;
|
|
3065
3076
|
|
|
3066
|
-
declare class Task<T = unknown, B = T> extends
|
|
3077
|
+
declare class Task<T = unknown, B = T> extends BackRef implements DescriptorBase<unknown, Signal<B> | ResourceReturnInternal<B>> {
|
|
3067
3078
|
$flags$: number;
|
|
3068
3079
|
$index$: number;
|
|
3069
3080
|
$el$: HostElement;
|
|
@@ -3073,6 +3084,13 @@ declare class Task<T = unknown, B = T> extends Subscriber implements DescriptorB
|
|
|
3073
3084
|
constructor($flags$: number, $index$: number, $el$: HostElement, $qrl$: QRLInternal<T>, $state$: Signal<B> | ResourceReturnInternal<B> | undefined, $destroy$: NoSerialize<() => void> | null);
|
|
3074
3085
|
}
|
|
3075
3086
|
|
|
3087
|
+
/**
|
|
3088
|
+
* Used internally as a qrl event handler to schedule a task.
|
|
3089
|
+
*
|
|
3090
|
+
* @internal
|
|
3091
|
+
*/
|
|
3092
|
+
export declare const _task: (_event: Event, element: Element) => void;
|
|
3093
|
+
|
|
3076
3094
|
/** @public */
|
|
3077
3095
|
export declare interface TaskCtx {
|
|
3078
3096
|
track: Tracker;
|
|
@@ -3676,19 +3694,10 @@ export declare const useStylesScopedQrl: (styles: QRL<string>) => UseStylesScope
|
|
|
3676
3694
|
* @public
|
|
3677
3695
|
* @see `Tracker`
|
|
3678
3696
|
*/
|
|
3679
|
-
export declare const useTask$: (qrl: TaskFn
|
|
3680
|
-
|
|
3681
|
-
/** @public */
|
|
3682
|
-
export declare interface UseTaskOptions {
|
|
3683
|
-
/**
|
|
3684
|
-
* - `visible`: run the effect when the element is visible.
|
|
3685
|
-
* - `load`: eagerly run the effect when the application resumes.
|
|
3686
|
-
*/
|
|
3687
|
-
eagerness?: EagernessOptions;
|
|
3688
|
-
}
|
|
3697
|
+
export declare const useTask$: (qrl: TaskFn) => void;
|
|
3689
3698
|
|
|
3690
3699
|
/** @internal */
|
|
3691
|
-
export declare const useTaskQrl: (qrl: QRL<TaskFn
|
|
3700
|
+
export declare const useTaskQrl: (qrl: QRL<TaskFn>) => void;
|
|
3692
3701
|
|
|
3693
3702
|
/**
|
|
3694
3703
|
* ```tsx
|
|
@@ -3732,7 +3741,7 @@ export declare const _VAR_PROPS: unique symbol;
|
|
|
3732
3741
|
export declare const _verifySerializable: <T>(value: T, preMessage?: string) => T;
|
|
3733
3742
|
|
|
3734
3743
|
/**
|
|
3735
|
-
* 2.0.0-alpha.
|
|
3744
|
+
* 2.0.0-alpha.7-dev+a26598a
|
|
3736
3745
|
*
|
|
3737
3746
|
* @public
|
|
3738
3747
|
*/
|
|
@@ -3751,7 +3760,7 @@ _VNode | null,
|
|
|
3751
3760
|
_VNode | null,
|
|
3752
3761
|
/////////////// 4 - First child
|
|
3753
3762
|
_VNode | null,
|
|
3754
|
-
|
|
3763
|
+
(string | null | boolean)[]
|
|
3755
3764
|
] & {
|
|
3756
3765
|
__brand__: 'FragmentNode' & 'HostElement';
|
|
3757
3766
|
};
|
|
@@ -3865,17 +3874,9 @@ export declare const _waitUntilRendered: (elm: Element) => Promise<void>;
|
|
|
3865
3874
|
|
|
3866
3875
|
/** @internal */
|
|
3867
3876
|
export declare function _walkJSX(ssr: SSRContainer, value: JSXOutput, options: {
|
|
3868
|
-
allowPromises: true;
|
|
3869
|
-
currentStyleScoped: string | null;
|
|
3870
|
-
parentComponentFrame: ISsrComponentFrame | null;
|
|
3871
|
-
}): ValueOrPromise<void>;
|
|
3872
|
-
|
|
3873
|
-
/** @internal */
|
|
3874
|
-
export declare function _walkJSX(ssr: SSRContainer, value: JSXOutput, options: {
|
|
3875
|
-
allowPromises: false;
|
|
3876
3877
|
currentStyleScoped: string | null;
|
|
3877
3878
|
parentComponentFrame: ISsrComponentFrame | null;
|
|
3878
|
-
}):
|
|
3879
|
+
}): Promise<void>;
|
|
3879
3880
|
|
|
3880
3881
|
/** @internal */
|
|
3881
3882
|
export declare const _weakSerialize: <T extends object>(input: T) => Partial<T>;
|
|
@@ -3887,14 +3888,14 @@ export declare const _weakSerialize: <T extends object>(input: T) => Partial<T>;
|
|
|
3887
3888
|
*/
|
|
3888
3889
|
export declare function withLocale<T>(locale: string, fn: () => T): T;
|
|
3889
3890
|
|
|
3890
|
-
declare class WrappedSignal<T> extends Signal_2<T> implements
|
|
3891
|
+
declare class WrappedSignal<T> extends Signal_2<T> implements BackRef {
|
|
3891
3892
|
$args$: any[];
|
|
3892
3893
|
$func$: (...args: any[]) => T;
|
|
3893
3894
|
$funcStr$: string | null;
|
|
3894
3895
|
$invalid$: boolean;
|
|
3895
|
-
$effectDependencies$: Subscriber[] | null;
|
|
3896
3896
|
$hostElement$: HostElement | null;
|
|
3897
3897
|
$forceRunEffects$: boolean;
|
|
3898
|
+
[_EFFECT_BACK_REF]: Map<EffectProperty | string, EffectSubscription> | null;
|
|
3898
3899
|
constructor(container: Container | null, fn: (...args: any[]) => T, args: any[], fnStr: string | null);
|
|
3899
3900
|
$invalidate$(): void;
|
|
3900
3901
|
/**
|