@qwik.dev/core 2.0.0-alpha.6 → 2.0.0-alpha.8
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 +92 -78
- package/dist/core.cjs +1603 -1374
- package/dist/core.cjs.map +1 -1
- package/dist/core.min.mjs +1 -1
- package/dist/core.mjs +1600 -1374
- package/dist/core.mjs.map +1 -1
- package/dist/core.prod.cjs +963 -834
- package/dist/core.prod.mjs +1093 -927
- package/dist/insights/index.qwik.cjs +3679 -167
- package/dist/insights/index.qwik.mjs +3679 -167
- 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 +228 -5715
- package/dist/optimizer.mjs +208 -6038
- package/dist/prefetch/package.json +1 -1
- package/dist/qwikloader.debug.js +12 -15
- package/dist/qwikloader.js +2 -2
- package/dist/server.cjs +787 -7152
- package/dist/server.mjs +805 -7148
- 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 +1341 -1180
- package/dist/testing/index.mjs +1354 -1186
- 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.8-dev+66037b5
|
|
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.8-dev+66037b5");
|
|
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
|
@@ -95,6 +95,8 @@ declare type _AllowPlainQrl<Q> = QRLEventHandlerMulti<any, any> extends Q ? Q ex
|
|
|
95
95
|
|
|
96
96
|
declare type AllPascalEventMaps = PascalMap<AllEventsMap>;
|
|
97
97
|
|
|
98
|
+
declare type AllSignalFlags = SignalFlags | WrappedSignalFlags;
|
|
99
|
+
|
|
98
100
|
/**
|
|
99
101
|
* TS defines these with the React syntax which is not compatible with Qwik. E.g. `ariaAtomic`
|
|
100
102
|
* instead of `aria-atomic`.
|
|
@@ -359,6 +361,11 @@ declare type AriaRole = 'alert' | 'alertdialog' | 'application' | 'article' | 'b
|
|
|
359
361
|
*/
|
|
360
362
|
declare type Augmented<E, A = {}> = Prettify<Filtered<E, A> & A>;
|
|
361
363
|
|
|
364
|
+
/** Class for back reference to the EffectSubscription */
|
|
365
|
+
declare abstract class BackRef {
|
|
366
|
+
[_EFFECT_BACK_REF]: Map<EffectProperty | string, EffectSubscription> | null;
|
|
367
|
+
}
|
|
368
|
+
|
|
362
369
|
declare type BivariantQrlFn<ARGS extends any[], RETURN> = {
|
|
363
370
|
/**
|
|
364
371
|
* Resolve the QRL of closure and invoke it.
|
|
@@ -375,15 +382,14 @@ declare type Booleanish = boolean | `${boolean}`;
|
|
|
375
382
|
declare const enum ChoreType {
|
|
376
383
|
MACRO = 240,
|
|
377
384
|
MICRO = 15,
|
|
378
|
-
/** Ensure
|
|
385
|
+
/** Ensure that the QRL promise is resolved before processing next chores in the queue */
|
|
379
386
|
QRL_RESOLVE = 1,
|
|
380
|
-
|
|
387
|
+
RUN_QRL = 2,
|
|
381
388
|
TASK = 3,
|
|
382
389
|
NODE_DIFF = 4,
|
|
383
390
|
NODE_PROP = 5,
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
RECOMPUTE_AND_SCHEDULE_EFFECTS = 8,
|
|
391
|
+
COMPONENT = 6,
|
|
392
|
+
RECOMPUTE_AND_SCHEDULE_EFFECTS = 7,
|
|
387
393
|
JOURNAL_FLUSH = 16,
|
|
388
394
|
VISIBLE = 32,
|
|
389
395
|
CLEANUP_VISIBLE = 48,
|
|
@@ -525,6 +531,17 @@ export declare interface ComputedSignal<T> extends ReadonlySignal<T> {
|
|
|
525
531
|
/** @internal */
|
|
526
532
|
export declare const _CONST_PROPS: unique symbol;
|
|
527
533
|
|
|
534
|
+
/**
|
|
535
|
+
* Effect is something which needs to happen (side-effect) due to signal value change.
|
|
536
|
+
*
|
|
537
|
+
* There are three types of effects:
|
|
538
|
+
*
|
|
539
|
+
* - `Task`: `useTask`, `useVisibleTask`, `useResource`
|
|
540
|
+
* - `VNode` and `ISsrNode`: Either a component or `<Signal>`
|
|
541
|
+
* - `Signal2`: A derived signal which contains a computation function.
|
|
542
|
+
*/
|
|
543
|
+
declare type Consumer = Task | _VNode | ISsrNode | Signal_2;
|
|
544
|
+
|
|
528
545
|
declare interface Container {
|
|
529
546
|
readonly $version$: string;
|
|
530
547
|
readonly $scheduler$: Scheduler;
|
|
@@ -786,9 +803,9 @@ declare const createScheduler: (container: Container, scheduleDrain: () => void,
|
|
|
786
803
|
(type: ChoreType.JOURNAL_FLUSH): ValueOrPromise<void>;
|
|
787
804
|
(type: ChoreType.WAIT_FOR_ALL): ValueOrPromise<void>;
|
|
788
805
|
(type: ChoreType.RECOMPUTE_AND_SCHEDULE_EFFECTS, host: HostElement | null, target: Signal): ValueOrPromise<void>;
|
|
789
|
-
(type: ChoreType.TASK | ChoreType.VISIBLE
|
|
806
|
+
(type: ChoreType.TASK | ChoreType.VISIBLE, task: Task): ValueOrPromise<void>;
|
|
807
|
+
(type: ChoreType.RUN_QRL, host: HostElement, target: QRLInternal<(...args: unknown[]) => unknown>, args: unknown[]): ValueOrPromise<void>;
|
|
790
808
|
(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
809
|
(type: ChoreType.NODE_DIFF, host: HostElement, target: HostElement, value: JSXOutput | Signal): ValueOrPromise<void>;
|
|
793
810
|
(type: ChoreType.NODE_PROP, host: HostElement, prop: string, value: any): ValueOrPromise<void>;
|
|
794
811
|
(type: ChoreType.CLEANUP_VISIBLE, task: Task): ValueOrPromise<JSXOutput>;
|
|
@@ -818,7 +835,7 @@ export declare interface CSSProperties extends CSS_2.Properties<string | number>
|
|
|
818
835
|
}
|
|
819
836
|
|
|
820
837
|
/** @public */
|
|
821
|
-
declare interface DescriptorBase<T = unknown, B = unknown> extends
|
|
838
|
+
declare interface DescriptorBase<T = unknown, B = unknown> extends BackRef {
|
|
822
839
|
$flags$: number;
|
|
823
840
|
$index$: number;
|
|
824
841
|
$el$: HostElement;
|
|
@@ -867,9 +884,9 @@ declare class DomContainer extends _SharedContainer implements ClientContainer {
|
|
|
867
884
|
$storeProxyMap$: ObjToProxyMap;
|
|
868
885
|
$qFuncs$: Array<(...args: unknown[]) => unknown>;
|
|
869
886
|
$instanceHash$: string;
|
|
870
|
-
|
|
887
|
+
vNodeLocate: (id: string | Element) => _VNode;
|
|
888
|
+
private $stateData$;
|
|
871
889
|
private $styleIds$;
|
|
872
|
-
private $vnodeLocate$;
|
|
873
890
|
private $renderCount$;
|
|
874
891
|
constructor(element: _ContainerElement);
|
|
875
892
|
$setRawState$(id: number, vParent: _ElementVNode | _VirtualVNode): void;
|
|
@@ -894,19 +911,8 @@ declare type DomRef = {
|
|
|
894
911
|
$ssrNode$: SsrNode;
|
|
895
912
|
};
|
|
896
913
|
|
|
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;
|
|
914
|
+
/** @internal */
|
|
915
|
+
export declare const _EFFECT_BACK_REF: unique symbol;
|
|
910
916
|
|
|
911
917
|
/** @internal */
|
|
912
918
|
export declare class _EffectData {
|
|
@@ -914,8 +920,13 @@ export declare class _EffectData {
|
|
|
914
920
|
constructor(data: NodePropData);
|
|
915
921
|
}
|
|
916
922
|
|
|
923
|
+
declare const enum EffectProperty {
|
|
924
|
+
COMPONENT = ":",
|
|
925
|
+
VNODE = "."
|
|
926
|
+
}
|
|
927
|
+
|
|
917
928
|
/**
|
|
918
|
-
* An effect plus
|
|
929
|
+
* An effect consumer plus type of effect, back references to producers and additional data
|
|
919
930
|
*
|
|
920
931
|
* An effect can be trigger by one or more of signal inputs. The first step of re-running an effect
|
|
921
932
|
* is to clear its subscriptions so that the effect can re add new set of subscriptions. In order to
|
|
@@ -932,10 +943,10 @@ export declare class _EffectData {
|
|
|
932
943
|
* In the above case the `signalB` needs to be unsubscribed when `signalA` is falsy. We do this by
|
|
933
944
|
* always clearing all of the subscriptions
|
|
934
945
|
*
|
|
935
|
-
* The `
|
|
946
|
+
* The `EffectSubscription` stores
|
|
936
947
|
*
|
|
937
948
|
* ```
|
|
938
|
-
* subscription1 = [
|
|
949
|
+
* subscription1 = [effectConsumer1, EffectProperty.COMPONENT, Set[(signalA, signalB)]];
|
|
939
950
|
* ```
|
|
940
951
|
*
|
|
941
952
|
* The `signal1` and `signal2` back references are needed to "clear" existing subscriptions.
|
|
@@ -944,18 +955,20 @@ export declare class _EffectData {
|
|
|
944
955
|
* effect can be scheduled if either `signalA` or `signalB` triggers. The `subscription1` is shared
|
|
945
956
|
* between the signals.
|
|
946
957
|
*
|
|
947
|
-
* The second position `string
|
|
958
|
+
* The second position `EffectProperty|string` store the property name of the effect.
|
|
948
959
|
*
|
|
949
960
|
* - Property name of the VNode
|
|
950
961
|
* - `EffectProperty.COMPONENT` if component
|
|
951
962
|
* - `EffectProperty.VNODE` if VNode
|
|
952
963
|
*/
|
|
953
|
-
declare type
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
string
|
|
957
|
-
|
|
958
|
-
|
|
964
|
+
declare type EffectSubscription = [
|
|
965
|
+
Consumer,
|
|
966
|
+
// EffectSubscriptionProp.CONSUMER
|
|
967
|
+
EffectProperty | string,
|
|
968
|
+
// EffectSubscriptionProp.PROPERTY or string for attributes
|
|
969
|
+
Set<Signal_2 | TargetType> | null,
|
|
970
|
+
// EffectSubscriptionProp.BACK_REF
|
|
971
|
+
_EffectData | null
|
|
959
972
|
];
|
|
960
973
|
|
|
961
974
|
/** @internal */
|
|
@@ -974,7 +987,7 @@ _VNode | null | undefined,
|
|
|
974
987
|
Element,
|
|
975
988
|
//////////////////// 6 - Element
|
|
976
989
|
string | undefined,
|
|
977
|
-
|
|
990
|
+
(string | null)[]
|
|
978
991
|
] & {
|
|
979
992
|
__brand__: 'ElementVNode';
|
|
980
993
|
};
|
|
@@ -1162,14 +1175,6 @@ declare type HTMLInputAutocompleteAttribute = 'on' | 'off' | 'billing' | 'shippi
|
|
|
1162
1175
|
/** @public */
|
|
1163
1176
|
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
1177
|
|
|
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
1178
|
declare type IfEquals<X, Y, A, B> = (<T>() => T extends X ? 1 : 2) extends <T>() => T extends Y ? 1 : 2 ? A : B;
|
|
1174
1179
|
|
|
1175
1180
|
/** @internal @deprecated v1 compat */
|
|
@@ -1255,7 +1260,7 @@ declare interface InvokeContext {
|
|
|
1255
1260
|
$event$: PossibleEvents | undefined;
|
|
1256
1261
|
/** The QRL function we're currently executing */
|
|
1257
1262
|
$qrl$: QRL | undefined;
|
|
1258
|
-
$effectSubscriber$:
|
|
1263
|
+
$effectSubscriber$: EffectSubscription | undefined;
|
|
1259
1264
|
$locale$: string | undefined;
|
|
1260
1265
|
$container$: Container | undefined;
|
|
1261
1266
|
}
|
|
@@ -1690,6 +1695,11 @@ declare type Props = Record<string, unknown>;
|
|
|
1690
1695
|
*/
|
|
1691
1696
|
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
1697
|
|
|
1698
|
+
declare type PropsProxy = {
|
|
1699
|
+
[_VAR_PROPS]: Props;
|
|
1700
|
+
[_CONST_PROPS]: Props | null;
|
|
1701
|
+
};
|
|
1702
|
+
|
|
1693
1703
|
/**
|
|
1694
1704
|
* Extends the defined component PROPS, adding the default ones (children and q:slot) and allowing
|
|
1695
1705
|
* plain functions to QRL arguments.
|
|
@@ -1876,7 +1886,6 @@ declare type QRLInternal<TYPE = unknown> = QRL<TYPE> & QRLInternalMethods<TYPE>;
|
|
|
1876
1886
|
declare type QRLInternalMethods<TYPE> = {
|
|
1877
1887
|
readonly $chunk$: string | null;
|
|
1878
1888
|
readonly $symbol$: string;
|
|
1879
|
-
readonly $refSymbol$: string | null;
|
|
1880
1889
|
readonly $hash$: string;
|
|
1881
1890
|
$capture$: string[] | null;
|
|
1882
1891
|
$captureRef$: unknown[] | null;
|
|
@@ -2258,7 +2267,14 @@ declare interface ResourceReturnInternal<T> {
|
|
|
2258
2267
|
}
|
|
2259
2268
|
|
|
2260
2269
|
/** @internal */
|
|
2261
|
-
export declare const _restProps: (props:
|
|
2270
|
+
export declare const _restProps: (props: PropsProxy, omit: string[], target?: Props) => Props;
|
|
2271
|
+
|
|
2272
|
+
/**
|
|
2273
|
+
* This is called by qwik-loader to schedule a QRL. It has to be synchronous.
|
|
2274
|
+
*
|
|
2275
|
+
* @internal
|
|
2276
|
+
*/
|
|
2277
|
+
export declare const _run: (...args: unknown[]) => ValueOrPromise<void>;
|
|
2262
2278
|
|
|
2263
2279
|
declare type Scheduler = ReturnType<typeof createScheduler>;
|
|
2264
2280
|
|
|
@@ -2382,7 +2398,7 @@ export declare interface Signal<T = any> extends ReadonlySignal<T> {
|
|
|
2382
2398
|
declare class Signal_2<T = any> implements Signal<T> {
|
|
2383
2399
|
$untrackedValue$: T;
|
|
2384
2400
|
/** Store a list of effects which are dependent on this signal. */
|
|
2385
|
-
$effects$: null |
|
|
2401
|
+
$effects$: null | Set<EffectSubscription>;
|
|
2386
2402
|
$container$: Container | null;
|
|
2387
2403
|
constructor(container: Container | null, value: T);
|
|
2388
2404
|
get untrackedValue(): T;
|
|
@@ -2396,6 +2412,10 @@ declare class Signal_2<T = any> implements Signal<T> {
|
|
|
2396
2412
|
};
|
|
2397
2413
|
}
|
|
2398
2414
|
|
|
2415
|
+
declare const enum SignalFlags {
|
|
2416
|
+
INVALID = 1
|
|
2417
|
+
}
|
|
2418
|
+
|
|
2399
2419
|
declare interface SimplifiedServerRequestEvent<T = unknown> {
|
|
2400
2420
|
url: URL;
|
|
2401
2421
|
locale: string | undefined;
|
|
@@ -2715,6 +2735,7 @@ declare type SsrNode = {
|
|
|
2715
2735
|
id: string;
|
|
2716
2736
|
childrenVNodeData: VNodeData[] | null;
|
|
2717
2737
|
vnodeData: VNodeData;
|
|
2738
|
+
[_EFFECT_BACK_REF]: Map<EffectProperty | string, EffectSubscription> | null;
|
|
2718
2739
|
};
|
|
2719
2740
|
|
|
2720
2741
|
/** @public */
|
|
@@ -2751,10 +2772,6 @@ export declare interface StreamWriter {
|
|
|
2751
2772
|
/** @internal */
|
|
2752
2773
|
export declare type _Stringifiable = string | boolean | number | null;
|
|
2753
2774
|
|
|
2754
|
-
declare abstract class Subscriber {
|
|
2755
|
-
$effectDependencies$: (Subscriber | TargetType)[] | null;
|
|
2756
|
-
}
|
|
2757
|
-
|
|
2758
2775
|
/**
|
|
2759
2776
|
* The TS types don't include the SVG attributes so we have to define them ourselves
|
|
2760
2777
|
*
|
|
@@ -2762,7 +2779,7 @@ declare abstract class Subscriber {
|
|
|
2762
2779
|
*
|
|
2763
2780
|
* @public
|
|
2764
2781
|
*/
|
|
2765
|
-
declare interface SVGAttributes<T extends Element = Element> extends AriaAttributes {
|
|
2782
|
+
export declare interface SVGAttributes<T extends Element = Element> extends AriaAttributes {
|
|
2766
2783
|
color?: string | undefined;
|
|
2767
2784
|
height?: Size | undefined;
|
|
2768
2785
|
id?: string | undefined;
|
|
@@ -3063,7 +3080,7 @@ declare type TableCellSpecialAttrs = {
|
|
|
3063
3080
|
|
|
3064
3081
|
declare type TargetType = Record<string | symbol, any>;
|
|
3065
3082
|
|
|
3066
|
-
declare class Task<T = unknown, B = T> extends
|
|
3083
|
+
declare class Task<T = unknown, B = T> extends BackRef implements DescriptorBase<unknown, Signal<B> | ResourceReturnInternal<B>> {
|
|
3067
3084
|
$flags$: number;
|
|
3068
3085
|
$index$: number;
|
|
3069
3086
|
$el$: HostElement;
|
|
@@ -3073,6 +3090,13 @@ declare class Task<T = unknown, B = T> extends Subscriber implements DescriptorB
|
|
|
3073
3090
|
constructor($flags$: number, $index$: number, $el$: HostElement, $qrl$: QRLInternal<T>, $state$: Signal<B> | ResourceReturnInternal<B> | undefined, $destroy$: NoSerialize<() => void> | null);
|
|
3074
3091
|
}
|
|
3075
3092
|
|
|
3093
|
+
/**
|
|
3094
|
+
* Used internally as a qrl event handler to schedule a task.
|
|
3095
|
+
*
|
|
3096
|
+
* @internal
|
|
3097
|
+
*/
|
|
3098
|
+
export declare const _task: (_event: Event, element: Element) => void;
|
|
3099
|
+
|
|
3076
3100
|
/** @public */
|
|
3077
3101
|
export declare interface TaskCtx {
|
|
3078
3102
|
track: Tracker;
|
|
@@ -3676,19 +3700,10 @@ export declare const useStylesScopedQrl: (styles: QRL<string>) => UseStylesScope
|
|
|
3676
3700
|
* @public
|
|
3677
3701
|
* @see `Tracker`
|
|
3678
3702
|
*/
|
|
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
|
-
}
|
|
3703
|
+
export declare const useTask$: (qrl: TaskFn) => void;
|
|
3689
3704
|
|
|
3690
3705
|
/** @internal */
|
|
3691
|
-
export declare const useTaskQrl: (qrl: QRL<TaskFn
|
|
3706
|
+
export declare const useTaskQrl: (qrl: QRL<TaskFn>) => void;
|
|
3692
3707
|
|
|
3693
3708
|
/**
|
|
3694
3709
|
* ```tsx
|
|
@@ -3732,7 +3747,7 @@ export declare const _VAR_PROPS: unique symbol;
|
|
|
3732
3747
|
export declare const _verifySerializable: <T>(value: T, preMessage?: string) => T;
|
|
3733
3748
|
|
|
3734
3749
|
/**
|
|
3735
|
-
* 2.0.0-alpha.
|
|
3750
|
+
* 2.0.0-alpha.8-dev+66037b5
|
|
3736
3751
|
*
|
|
3737
3752
|
* @public
|
|
3738
3753
|
*/
|
|
@@ -3751,7 +3766,7 @@ _VNode | null,
|
|
|
3751
3766
|
_VNode | null,
|
|
3752
3767
|
/////////////// 4 - First child
|
|
3753
3768
|
_VNode | null,
|
|
3754
|
-
|
|
3769
|
+
(string | null | boolean)[]
|
|
3755
3770
|
] & {
|
|
3756
3771
|
__brand__: 'FragmentNode' & 'HostElement';
|
|
3757
3772
|
};
|
|
@@ -3865,17 +3880,9 @@ export declare const _waitUntilRendered: (elm: Element) => Promise<void>;
|
|
|
3865
3880
|
|
|
3866
3881
|
/** @internal */
|
|
3867
3882
|
export declare function _walkJSX(ssr: SSRContainer, value: JSXOutput, options: {
|
|
3868
|
-
allowPromises: true;
|
|
3869
3883
|
currentStyleScoped: string | null;
|
|
3870
3884
|
parentComponentFrame: ISsrComponentFrame | null;
|
|
3871
|
-
}):
|
|
3872
|
-
|
|
3873
|
-
/** @internal */
|
|
3874
|
-
export declare function _walkJSX(ssr: SSRContainer, value: JSXOutput, options: {
|
|
3875
|
-
allowPromises: false;
|
|
3876
|
-
currentStyleScoped: string | null;
|
|
3877
|
-
parentComponentFrame: ISsrComponentFrame | null;
|
|
3878
|
-
}): false;
|
|
3885
|
+
}): Promise<void>;
|
|
3879
3886
|
|
|
3880
3887
|
/** @internal */
|
|
3881
3888
|
export declare const _weakSerialize: <T extends object>(input: T) => Partial<T>;
|
|
@@ -3887,15 +3894,15 @@ export declare const _weakSerialize: <T extends object>(input: T) => Partial<T>;
|
|
|
3887
3894
|
*/
|
|
3888
3895
|
export declare function withLocale<T>(locale: string, fn: () => T): T;
|
|
3889
3896
|
|
|
3890
|
-
declare class WrappedSignal<T> extends Signal_2<T> implements
|
|
3897
|
+
declare class WrappedSignal<T> extends Signal_2<T> implements BackRef {
|
|
3891
3898
|
$args$: any[];
|
|
3892
3899
|
$func$: (...args: any[]) => T;
|
|
3893
3900
|
$funcStr$: string | null;
|
|
3894
|
-
$
|
|
3895
|
-
$effectDependencies$: Subscriber[] | null;
|
|
3901
|
+
$flags$: AllSignalFlags;
|
|
3896
3902
|
$hostElement$: HostElement | null;
|
|
3897
3903
|
$forceRunEffects$: boolean;
|
|
3898
|
-
|
|
3904
|
+
[_EFFECT_BACK_REF]: Map<EffectProperty | string, EffectSubscription> | null;
|
|
3905
|
+
constructor(container: Container | null, fn: (...args: any[]) => T, args: any[], fnStr: string | null, flags?: SignalFlags);
|
|
3899
3906
|
$invalidate$(): void;
|
|
3900
3907
|
/**
|
|
3901
3908
|
* Use this to force running subscribers, for example when the calculated value has mutated but
|
|
@@ -3908,6 +3915,10 @@ declare class WrappedSignal<T> extends Signal_2<T> implements Subscriber {
|
|
|
3908
3915
|
set value(_: any);
|
|
3909
3916
|
}
|
|
3910
3917
|
|
|
3918
|
+
declare const enum WrappedSignalFlags {
|
|
3919
|
+
UNWRAP = 2
|
|
3920
|
+
}
|
|
3921
|
+
|
|
3911
3922
|
/**
|
|
3912
3923
|
* This wraps a property access of a possible Signal/Store into a WrappedSignal. The optimizer does
|
|
3913
3924
|
* this automatically when a prop is only used as a prop on JSX.
|
|
@@ -3924,4 +3935,7 @@ export declare const _wrapProp: <T extends Record<any, any>, P extends keyof T>(
|
|
|
3924
3935
|
/** @internal @deprecated v1 compat */
|
|
3925
3936
|
export declare const _wrapSignal: <T extends Record<any, any>, P extends keyof T>(obj: T, prop: P) => any;
|
|
3926
3937
|
|
|
3938
|
+
/** @internal */
|
|
3939
|
+
export declare const _wrapStore: <T extends Record<any, any>, P extends keyof T>(obj: T, prop: P) => Signal<T>;
|
|
3940
|
+
|
|
3927
3941
|
export { }
|