@qwik.dev/core 2.0.0-beta.24 → 2.0.0-beta.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bindings/qwik.darwin-arm64.node +0 -0
- package/bindings/qwik.linux-x64-gnu.node +0 -0
- package/bindings/qwik.win32-x64-msvc.node +0 -0
- package/bindings/qwik_wasm_bg.wasm +0 -0
- package/dist/backpatch/package.json +1 -1
- package/dist/build/package.json +1 -1
- package/dist/cli.mjs +2 -2
- package/dist/core-internal.d.ts +6 -4
- package/dist/core.min.mjs +1 -1
- package/dist/core.mjs +137 -98
- package/dist/core.mjs.map +1 -1
- package/dist/core.prod.mjs +127 -80
- package/dist/loader/package.json +1 -1
- package/dist/optimizer.mjs +1 -1
- package/dist/server.mjs +2 -2
- package/dist/testing/index.d.ts +133 -2
- package/dist/testing/index.mjs +134 -106
- package/dist/testing/package.json +1 -1
- package/package.json +2 -2
package/dist/core.prod.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* @qwik.dev/core 2.0.0-beta.
|
|
3
|
+
* @qwik.dev/core 2.0.0-beta.25-dev+2677279
|
|
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
|
|
@@ -523,7 +523,7 @@ const isObjectEmpty = obj => {
|
|
|
523
523
|
return !0;
|
|
524
524
|
};
|
|
525
525
|
|
|
526
|
-
const version = "2.0.0-beta.
|
|
526
|
+
const version = "2.0.0-beta.25-dev+2677279";
|
|
527
527
|
|
|
528
528
|
const createPlatform = () => ({
|
|
529
529
|
isServer,
|
|
@@ -1721,6 +1721,8 @@ const _jsxSplit = (type, varProps, constProps, children, flags, key, dev) => {
|
|
|
1721
1721
|
}
|
|
1722
1722
|
_hasOwnProperty$1.call(constProps, attr) && !processedKeys.has(attr) || (constProps[attr] = constProps[k]);
|
|
1723
1723
|
delete constProps[k];
|
|
1724
|
+
} else {
|
|
1725
|
+
k === "bind:checked" ? bindCheckedSignal = constProps[k] : k === "bind:value" && (bindValueSignal = constProps[k]);
|
|
1724
1726
|
}
|
|
1725
1727
|
processedKeys.add(k);
|
|
1726
1728
|
}
|
|
@@ -1744,46 +1746,65 @@ const _jsxSplit = (type, varProps, constProps, children, flags, key, dev) => {
|
|
|
1744
1746
|
}
|
|
1745
1747
|
processedKeys.add(k);
|
|
1746
1748
|
}
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1749
|
+
}
|
|
1750
|
+
if (bindCheckedSignal || bindValueSignal) {
|
|
1751
|
+
if (!varPropsCopied) {
|
|
1752
|
+
varProps = {
|
|
1753
|
+
...varProps
|
|
1754
|
+
};
|
|
1755
|
+
varPropsCopied = !0;
|
|
1756
|
+
}
|
|
1757
|
+
varProps ||= {};
|
|
1758
|
+
if (bindCheckedSignal) {
|
|
1759
|
+
varProps && _hasOwnProperty$1.call(varProps, "bind:checked") && delete varProps["bind:checked"];
|
|
1760
|
+
if (constProps && _hasOwnProperty$1.call(constProps, "bind:checked")) {
|
|
1761
|
+
if (!constPropsCopied) {
|
|
1762
|
+
constProps = {
|
|
1763
|
+
...constProps
|
|
1764
|
+
};
|
|
1765
|
+
constPropsCopied = !0;
|
|
1766
|
+
}
|
|
1767
|
+
delete constProps["bind:checked"];
|
|
1753
1768
|
}
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
};
|
|
1763
|
-
constPropsCopied = !0;
|
|
1764
|
-
}
|
|
1765
|
-
const existingHandler = constProps["q-e:input"];
|
|
1766
|
-
delete constProps["q-e:input"];
|
|
1767
|
-
toSort = mergeHandlers(varProps, "q-e:input", existingHandler) || toSort;
|
|
1769
|
+
varProps.checked = bindCheckedSignal;
|
|
1770
|
+
const handler = createQRL(null, "_chk", _chk, null, [ bindCheckedSignal ]);
|
|
1771
|
+
if (constProps && _hasOwnProperty$1.call(constProps, "q-e:input")) {
|
|
1772
|
+
if (!constPropsCopied) {
|
|
1773
|
+
constProps = {
|
|
1774
|
+
...constProps
|
|
1775
|
+
};
|
|
1776
|
+
constPropsCopied = !0;
|
|
1768
1777
|
}
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
}
|
|
1781
|
-
|
|
1782
|
-
delete constProps["q-e:input"];
|
|
1783
|
-
toSort = mergeHandlers(varProps, "q-e:input", existingHandler) || toSort;
|
|
1778
|
+
const existingHandler = constProps["q-e:input"];
|
|
1779
|
+
delete constProps["q-e:input"];
|
|
1780
|
+
toSort = mergeHandlers(varProps, "q-e:input", existingHandler) || toSort;
|
|
1781
|
+
}
|
|
1782
|
+
toSort = mergeHandlers(varProps, "q-e:input", handler) || toSort;
|
|
1783
|
+
} else if (bindValueSignal) {
|
|
1784
|
+
varProps && _hasOwnProperty$1.call(varProps, "bind:value") && delete varProps["bind:value"];
|
|
1785
|
+
if (constProps && _hasOwnProperty$1.call(constProps, "bind:value")) {
|
|
1786
|
+
if (!constPropsCopied) {
|
|
1787
|
+
constProps = {
|
|
1788
|
+
...constProps
|
|
1789
|
+
};
|
|
1790
|
+
constPropsCopied = !0;
|
|
1784
1791
|
}
|
|
1785
|
-
|
|
1792
|
+
delete constProps["bind:value"];
|
|
1786
1793
|
}
|
|
1794
|
+
varProps.value = bindValueSignal;
|
|
1795
|
+
const handler = createQRL(null, "_val", _val, null, [ bindValueSignal ]);
|
|
1796
|
+
if (constProps && _hasOwnProperty$1.call(constProps, "q-e:input")) {
|
|
1797
|
+
if (!constPropsCopied) {
|
|
1798
|
+
constProps = {
|
|
1799
|
+
...constProps
|
|
1800
|
+
};
|
|
1801
|
+
constPropsCopied = !0;
|
|
1802
|
+
}
|
|
1803
|
+
const existingHandler = constProps["q-e:input"];
|
|
1804
|
+
delete constProps["q-e:input"];
|
|
1805
|
+
toSort = mergeHandlers(varProps, "q-e:input", existingHandler) || toSort;
|
|
1806
|
+
}
|
|
1807
|
+
toSort = mergeHandlers(varProps, "q-e:input", handler) || toSort;
|
|
1787
1808
|
}
|
|
1788
1809
|
}
|
|
1789
1810
|
if (varProps && _hasOwnProperty$1.call(varProps, "className")) {
|
|
@@ -2231,6 +2252,9 @@ function runEventHandlerQRL(handler, event, element, ctx = newInvokeContextFromD
|
|
|
2231
2252
|
}
|
|
2232
2253
|
|
|
2233
2254
|
function _run(event, element) {
|
|
2255
|
+
if (!element.isConnected) {
|
|
2256
|
+
return;
|
|
2257
|
+
}
|
|
2234
2258
|
const ctx = newInvokeContextFromDOM(event, element);
|
|
2235
2259
|
typeof this === "string" && setCaptures(deserializeCaptures(ctx.$container$, this));
|
|
2236
2260
|
const qrlToRun = _captures[0];
|
|
@@ -4617,6 +4641,12 @@ const ensureMaterialized = vnode => {
|
|
|
4617
4641
|
vnode_ensureElementKeyInflated(elementVNode);
|
|
4618
4642
|
addVNode(elementVNode);
|
|
4619
4643
|
child = fastNextSibling(child);
|
|
4644
|
+
for (;isElement(child) && shouldSkipElement(child); ) {
|
|
4645
|
+
child = fastNextSibling(child);
|
|
4646
|
+
if (!child && value > 0) {
|
|
4647
|
+
throw qError(27, [ vData, peek(), nextToConsumeIdx ]);
|
|
4648
|
+
}
|
|
4649
|
+
}
|
|
4620
4650
|
}
|
|
4621
4651
|
} else if (peek() === 59) {
|
|
4622
4652
|
vnode_setProp(vParent, "q:sstyle", consumeValue());
|
|
@@ -5836,7 +5866,7 @@ class Serializer {
|
|
|
5836
5866
|
} else if (value instanceof SubscriptionData) {
|
|
5837
5867
|
this.output(31, [ value.data.$scopedStyleIdPrefix$, value.data.$isConst$ ]);
|
|
5838
5868
|
} else if (value instanceof EffectSubscription) {
|
|
5839
|
-
this.output(32, [ value.consumer, value.property, value.
|
|
5869
|
+
this.output(32, [ value.consumer, value.property, value.data ]);
|
|
5840
5870
|
} else if (isStore(value)) {
|
|
5841
5871
|
const storeHandler = getStoreHandler(value);
|
|
5842
5872
|
const storeTarget = getStoreTarget(value);
|
|
@@ -5900,12 +5930,12 @@ class Serializer {
|
|
|
5900
5930
|
const forwardRefId = this.resolvePromise(maybeValue, (resolved, resolvedValue) => new PromiseResult(26, resolved, resolvedValue, value.$effects$, value.$computeQrl$));
|
|
5901
5931
|
this.output(2, forwardRefId);
|
|
5902
5932
|
} else {
|
|
5903
|
-
this.output(26, [ value.$computeQrl$,
|
|
5933
|
+
this.output(26, [ value.$computeQrl$, value.$effects$, maybeValue ]);
|
|
5904
5934
|
}
|
|
5905
5935
|
return;
|
|
5906
5936
|
}
|
|
5907
5937
|
if (value instanceof WrappedSignalImpl) {
|
|
5908
|
-
this.output(23, [ ...serializeWrappingFn(this.$serializationContext$, value),
|
|
5938
|
+
this.output(23, [ ...serializeWrappingFn(this.$serializationContext$, value), value.$flags$, value.$hostElement$, ...value.$effects$ || [] ]);
|
|
5909
5939
|
} else if (value instanceof ComputedSignalImpl) {
|
|
5910
5940
|
let v = value.$untrackedValue$;
|
|
5911
5941
|
const shouldAlwaysSerialize = value.$flags$ & 16;
|
|
@@ -5918,7 +5948,7 @@ class Serializer {
|
|
|
5918
5948
|
const timeout = isAsync && value.$timeoutMs$ !== 0 ? value.$timeoutMs$ : void 0;
|
|
5919
5949
|
const asyncFlags = isAsync && value.$flags$ & -25 || void 0;
|
|
5920
5950
|
isInvalid || isSkippable ? v = NEEDS_COMPUTATION : shouldAlwaysSerialize ? v = value.$untrackedValue$ : shouldNeverSerialize && (v = NEEDS_COMPUTATION);
|
|
5921
|
-
const out = [ value.$computeQrl$,
|
|
5951
|
+
const out = [ value.$computeQrl$, value.$effects$ ];
|
|
5922
5952
|
if (isAsync) {
|
|
5923
5953
|
out.push(value.$loadingEffects$, value.$errorEffects$, value.$untrackedError$);
|
|
5924
5954
|
out.push(asyncFlags || void 0);
|
|
@@ -6001,7 +6031,7 @@ class Serializer {
|
|
|
6001
6031
|
}
|
|
6002
6032
|
this.output(29, out);
|
|
6003
6033
|
} else if (value instanceof Task) {
|
|
6004
|
-
const out = [ value.$qrl$, value.$flags$, value.$index$, value.$el$, value
|
|
6034
|
+
const out = [ value.$qrl$, value.$flags$, value.$index$, value.$el$, value.$state$ ];
|
|
6005
6035
|
for (;out[out.length - 1] === void 0; ) {
|
|
6006
6036
|
out.pop();
|
|
6007
6037
|
}
|
|
@@ -6138,19 +6168,6 @@ function serializeWrappingFn(serializationContext, value) {
|
|
|
6138
6168
|
return [ syncFnId, value.$args$ ];
|
|
6139
6169
|
}
|
|
6140
6170
|
|
|
6141
|
-
function filterEffectBackRefs(effectBackRef) {
|
|
6142
|
-
let effectBackRefToSerialize;
|
|
6143
|
-
if (effectBackRef) {
|
|
6144
|
-
for (const [effectProp, effect] of effectBackRef) {
|
|
6145
|
-
if (effect.backRef) {
|
|
6146
|
-
effectBackRefToSerialize ||= new Map;
|
|
6147
|
-
effectBackRefToSerialize.set(effectProp, effect);
|
|
6148
|
-
}
|
|
6149
|
-
}
|
|
6150
|
-
}
|
|
6151
|
-
return effectBackRefToSerialize;
|
|
6152
|
-
}
|
|
6153
|
-
|
|
6154
6171
|
function tryGetBackRefs(props) {
|
|
6155
6172
|
return Object.prototype.hasOwnProperty.call(props, "q:brefs") ? props["q:brefs"] : void 0;
|
|
6156
6173
|
}
|
|
@@ -6682,8 +6699,7 @@ const inflate = (container, target, typeId, data) => {
|
|
|
6682
6699
|
task.$flags$ = v[1];
|
|
6683
6700
|
task.$index$ = v[2];
|
|
6684
6701
|
task.$el$ = v[3];
|
|
6685
|
-
task
|
|
6686
|
-
task.$state$ = v[5];
|
|
6702
|
+
task.$state$ = v[4];
|
|
6687
6703
|
break;
|
|
6688
6704
|
|
|
6689
6705
|
case 21:
|
|
@@ -6702,6 +6718,7 @@ const inflate = (container, target, typeId, data) => {
|
|
|
6702
6718
|
const storeHandler = getStoreHandler(target);
|
|
6703
6719
|
storeHandler.$flags$ = flags;
|
|
6704
6720
|
storeHandler.$effects$ = effects;
|
|
6721
|
+
restoreEffectBackRefForEffectsMap(storeHandler.$effects$, store);
|
|
6705
6722
|
break;
|
|
6706
6723
|
}
|
|
6707
6724
|
|
|
@@ -6711,6 +6728,7 @@ const inflate = (container, target, typeId, data) => {
|
|
|
6711
6728
|
const d = data;
|
|
6712
6729
|
signal.$untrackedValue$ = d[0];
|
|
6713
6730
|
signal.$effects$ = new Set(d.slice(1));
|
|
6731
|
+
restoreEffectBackRefForEffects(signal.$effects$, signal);
|
|
6714
6732
|
break;
|
|
6715
6733
|
}
|
|
6716
6734
|
|
|
@@ -6720,12 +6738,11 @@ const inflate = (container, target, typeId, data) => {
|
|
|
6720
6738
|
const d = data;
|
|
6721
6739
|
signal.$func$ = container.getSyncFn(d[0]);
|
|
6722
6740
|
signal.$args$ = d[1];
|
|
6723
|
-
signal[_EFFECT_BACK_REF] = d[2];
|
|
6724
6741
|
signal.$untrackedValue$ = NEEDS_COMPUTATION;
|
|
6725
|
-
signal.$flags$ = d[
|
|
6742
|
+
signal.$flags$ = d[2];
|
|
6726
6743
|
signal.$flags$ |= 1;
|
|
6727
|
-
signal.$hostElement$ = d[
|
|
6728
|
-
signal.$effects$ = new Set(d.slice(
|
|
6744
|
+
signal.$hostElement$ = d[3];
|
|
6745
|
+
signal.$effects$ = new Set(d.slice(4));
|
|
6729
6746
|
(function inflateWrappedSignalValue(signal) {
|
|
6730
6747
|
if (signal.$hostElement$ !== null && vnode_isVNode(signal.$hostElement$)) {
|
|
6731
6748
|
const hostVNode = signal.$hostElement$;
|
|
@@ -6750,6 +6767,7 @@ const inflate = (container, target, typeId, data) => {
|
|
|
6750
6767
|
}
|
|
6751
6768
|
}
|
|
6752
6769
|
})(signal);
|
|
6770
|
+
restoreEffectBackRefForEffects(signal.$effects$, signal);
|
|
6753
6771
|
break;
|
|
6754
6772
|
}
|
|
6755
6773
|
|
|
@@ -6758,19 +6776,21 @@ const inflate = (container, target, typeId, data) => {
|
|
|
6758
6776
|
const asyncSignal = target;
|
|
6759
6777
|
const d = data;
|
|
6760
6778
|
asyncSignal.$computeQrl$ = d[0];
|
|
6761
|
-
asyncSignal
|
|
6762
|
-
asyncSignal.$
|
|
6763
|
-
asyncSignal.$
|
|
6764
|
-
asyncSignal.$
|
|
6765
|
-
asyncSignal.$
|
|
6766
|
-
asyncSignal.$flags$ = d[6] ?? 0;
|
|
6779
|
+
asyncSignal.$effects$ = new Set(d[1]);
|
|
6780
|
+
asyncSignal.$loadingEffects$ = new Set(d[2]);
|
|
6781
|
+
asyncSignal.$errorEffects$ = new Set(d[3]);
|
|
6782
|
+
asyncSignal.$untrackedError$ = d[4];
|
|
6783
|
+
asyncSignal.$flags$ = d[5] ?? 0;
|
|
6767
6784
|
asyncSignal.$flags$ & 64 && (asyncSignal.$untrackedLoading$ = !0);
|
|
6768
|
-
const hasValue = d.length >
|
|
6769
|
-
hasValue && (asyncSignal.$untrackedValue$ = d[
|
|
6785
|
+
const hasValue = d.length > 6;
|
|
6786
|
+
hasValue && (asyncSignal.$untrackedValue$ = d[6]);
|
|
6770
6787
|
asyncSignal.$untrackedValue$ === NEEDS_COMPUTATION && (asyncSignal.$flags$ |= 1);
|
|
6771
|
-
asyncSignal.interval = d[
|
|
6772
|
-
asyncSignal.$concurrency$ = d[
|
|
6773
|
-
asyncSignal.$timeoutMs$ = d[
|
|
6788
|
+
asyncSignal.interval = d[7] ?? 0;
|
|
6789
|
+
asyncSignal.$concurrency$ = d[8] ?? 1;
|
|
6790
|
+
asyncSignal.$timeoutMs$ = d[9] ?? 0;
|
|
6791
|
+
restoreEffectBackRefForEffects(asyncSignal.$effects$, asyncSignal);
|
|
6792
|
+
restoreEffectBackRefForEffects(asyncSignal.$loadingEffects$, asyncSignal);
|
|
6793
|
+
restoreEffectBackRefForEffects(asyncSignal.$errorEffects$, asyncSignal);
|
|
6774
6794
|
break;
|
|
6775
6795
|
}
|
|
6776
6796
|
|
|
@@ -6782,11 +6802,11 @@ const inflate = (container, target, typeId, data) => {
|
|
|
6782
6802
|
computed.$computeQrl$ = d[0];
|
|
6783
6803
|
const p = computed.$computeQrl$.resolve(container).catch(() => {});
|
|
6784
6804
|
loading = loading.finally(() => p);
|
|
6785
|
-
|
|
6786
|
-
|
|
6787
|
-
|
|
6788
|
-
hasValue && (computed.$untrackedValue$ = d[3]);
|
|
6805
|
+
d[1] && (computed.$effects$ = new Set(d[1]));
|
|
6806
|
+
const hasValue = d.length > 2;
|
|
6807
|
+
hasValue && (computed.$untrackedValue$ = d[2]);
|
|
6789
6808
|
typeId !== 26 && computed.$untrackedValue$ !== NEEDS_COMPUTATION && (computed.$flags$ &= -2);
|
|
6809
|
+
restoreEffectBackRefForEffects(computed.$effects$, computed);
|
|
6790
6810
|
break;
|
|
6791
6811
|
}
|
|
6792
6812
|
|
|
@@ -6870,7 +6890,9 @@ const inflate = (container, target, typeId, data) => {
|
|
|
6870
6890
|
owner._proxy = propsProxy;
|
|
6871
6891
|
}
|
|
6872
6892
|
propsProxy[_OWNER] = owner;
|
|
6873
|
-
|
|
6893
|
+
const propsHandler = propsProxy[_PROPS_HANDLER];
|
|
6894
|
+
propsHandler.$effects$ = d[3];
|
|
6895
|
+
restoreEffectBackRefForEffectsMap(propsHandler.$effects$, propsProxy);
|
|
6874
6896
|
break;
|
|
6875
6897
|
|
|
6876
6898
|
case 31:
|
|
@@ -6887,8 +6909,16 @@ const inflate = (container, target, typeId, data) => {
|
|
|
6887
6909
|
const d = data;
|
|
6888
6910
|
effectSub.consumer = d[0];
|
|
6889
6911
|
effectSub.property = d[1];
|
|
6890
|
-
effectSub.
|
|
6891
|
-
|
|
6912
|
+
effectSub.data = d[2];
|
|
6913
|
+
(function restoreEffectBackRefForConsumer(effect) {
|
|
6914
|
+
const isServerSide = import.meta.env.TEST ? isServerPlatform() : isServer;
|
|
6915
|
+
const consumerBackRef = effect.consumer;
|
|
6916
|
+
if (isServerSide && !consumerBackRef) {
|
|
6917
|
+
return;
|
|
6918
|
+
}
|
|
6919
|
+
consumerBackRef[_EFFECT_BACK_REF] ||= new Map;
|
|
6920
|
+
consumerBackRef[_EFFECT_BACK_REF].set(effect.property, effect);
|
|
6921
|
+
})(effectSub);
|
|
6892
6922
|
break;
|
|
6893
6923
|
}
|
|
6894
6924
|
|
|
@@ -6913,6 +6943,23 @@ function deserializeData(container, typeId, value) {
|
|
|
6913
6943
|
return propValue;
|
|
6914
6944
|
}
|
|
6915
6945
|
|
|
6946
|
+
function restoreEffectBackRefForEffects(effects, consumer) {
|
|
6947
|
+
if (effects) {
|
|
6948
|
+
for (const effect of effects) {
|
|
6949
|
+
effect.backRef ||= new Set;
|
|
6950
|
+
effect.backRef.add(consumer);
|
|
6951
|
+
}
|
|
6952
|
+
}
|
|
6953
|
+
}
|
|
6954
|
+
|
|
6955
|
+
function restoreEffectBackRefForEffectsMap(effectsMap, consumer) {
|
|
6956
|
+
if (effectsMap) {
|
|
6957
|
+
for (const [, effects] of effectsMap) {
|
|
6958
|
+
restoreEffectBackRefForEffects(effects, consumer);
|
|
6959
|
+
}
|
|
6960
|
+
}
|
|
6961
|
+
}
|
|
6962
|
+
|
|
6916
6963
|
const needsInflation = typeId => typeId >= 15 || typeId === 4 || typeId === 5;
|
|
6917
6964
|
|
|
6918
6965
|
const deserializedProxyMap = new WeakMap;
|
package/dist/loader/package.json
CHANGED
package/dist/optimizer.mjs
CHANGED
|
@@ -344,7 +344,7 @@ const Et = () => typeof Deno < "u" ? "deno" : typeof Bun < "u" ? "bun" : typeof
|
|
|
344
344
|
r != null && (t[i] = r);
|
|
345
345
|
}), t.entryStrategy = e.entryStrategy?.type ?? "smart", t.manualChunks = e.entryStrategy?.manual ?? void 0, t;
|
|
346
346
|
}, Rr = {
|
|
347
|
-
qwik: "2.0.0-beta.
|
|
347
|
+
qwik: "2.0.0-beta.25-dev+2677279"
|
|
348
348
|
}, $t = (e, t = 0) => {
|
|
349
349
|
for (let i = 0; i < e.length; i++) {
|
|
350
350
|
const r = e.charCodeAt(i);
|
package/dist/server.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* @qwik.dev/core/server 2.0.0-beta.
|
|
3
|
+
* @qwik.dev/core/server 2.0.0-beta.25-dev+2677279
|
|
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
|
|
@@ -1232,7 +1232,7 @@ function getBuildBase(opts) {
|
|
|
1232
1232
|
return `${import.meta.env.BASE_URL || "/"}build/`;
|
|
1233
1233
|
}
|
|
1234
1234
|
var versions = {
|
|
1235
|
-
qwik: "2.0.0-beta.
|
|
1235
|
+
qwik: "2.0.0-beta.25-dev+2677279",
|
|
1236
1236
|
qwikDom: "2.1.19"
|
|
1237
1237
|
};
|
|
1238
1238
|
|
package/dist/testing/index.d.ts
CHANGED
|
@@ -50,6 +50,9 @@ declare const enum ChoreBits {
|
|
|
50
50
|
DIRTY_MASK = 127
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
+
/** @internal */
|
|
54
|
+
declare const _CONST_PROPS: unique symbol;
|
|
55
|
+
|
|
53
56
|
/**
|
|
54
57
|
* Effect is something which needs to happen (side-effect) due to signal value change.
|
|
55
58
|
*
|
|
@@ -187,6 +190,14 @@ declare interface DescriptorBase<T = unknown, B = unknown> extends BackRef {
|
|
|
187
190
|
$destroy$: (() => void) | null;
|
|
188
191
|
}
|
|
189
192
|
|
|
193
|
+
/** @public */
|
|
194
|
+
declare interface DevJSX {
|
|
195
|
+
fileName: string;
|
|
196
|
+
lineNumber: number;
|
|
197
|
+
columnNumber: number;
|
|
198
|
+
stack?: string;
|
|
199
|
+
}
|
|
200
|
+
|
|
190
201
|
declare type DomRef = {
|
|
191
202
|
$ssrNode$: SsrNode;
|
|
192
203
|
};
|
|
@@ -204,6 +215,8 @@ export declare function domRender(jsx: JSXOutput, opts?: {
|
|
|
204
215
|
/** @internal */
|
|
205
216
|
declare const _EFFECT_BACK_REF: unique symbol;
|
|
206
217
|
|
|
218
|
+
declare type EffectBackRef = SignalImpl | StoreTarget | PropsProxy;
|
|
219
|
+
|
|
207
220
|
declare const enum EffectProperty {
|
|
208
221
|
COMPONENT = ":",
|
|
209
222
|
VNODE = "."
|
|
@@ -248,9 +261,9 @@ declare const enum EffectProperty {
|
|
|
248
261
|
declare class EffectSubscription {
|
|
249
262
|
consumer: Consumer;
|
|
250
263
|
property: EffectProperty | string;
|
|
251
|
-
backRef: Set<
|
|
264
|
+
backRef: Set<EffectBackRef> | null;
|
|
252
265
|
data: SubscriptionData | null;
|
|
253
|
-
constructor(consumer: Consumer, property: EffectProperty | string, backRef?: Set<
|
|
266
|
+
constructor(consumer: Consumer, property: EffectProperty | string, backRef?: Set<EffectBackRef> | null, data?: SubscriptionData | null);
|
|
254
267
|
}
|
|
255
268
|
|
|
256
269
|
/**
|
|
@@ -288,6 +301,17 @@ export declare function emulateExecutionOfQwikFuncs(document: Document): void;
|
|
|
288
301
|
/** @public */
|
|
289
302
|
export declare function expectDOM(actual: Element, expected: string): Promise<void>;
|
|
290
303
|
|
|
304
|
+
/**
|
|
305
|
+
* Any function taking a props object that returns JSXOutput.
|
|
306
|
+
*
|
|
307
|
+
* The `key`, `flags` and `dev` parameters are for internal use.
|
|
308
|
+
*
|
|
309
|
+
* @public
|
|
310
|
+
*/
|
|
311
|
+
declare type FunctionComponent<P = unknown> = {
|
|
312
|
+
renderFn(props: P, key: string | null, flags: number, dev?: DevJSX): JSXOutput_2;
|
|
313
|
+
}['renderFn'];
|
|
314
|
+
|
|
291
315
|
/** @public */
|
|
292
316
|
export declare function getTestPlatform(): TestPlatform;
|
|
293
317
|
|
|
@@ -318,6 +342,84 @@ declare interface ISsrNode {
|
|
|
318
342
|
setTreeNonUpdatable(): void;
|
|
319
343
|
}
|
|
320
344
|
|
|
345
|
+
/** @public */
|
|
346
|
+
declare type JSXChildren = string | number | boolean | null | undefined | Function | RegExp | JSXChildren[] | Promise<JSXChildren> | Signal<JSXChildren> | JSXNode;
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* A JSX Node, an internal structure. You probably want to use `JSXOutput` instead.
|
|
350
|
+
*
|
|
351
|
+
* @public
|
|
352
|
+
*/
|
|
353
|
+
declare interface JSXNode<T extends string | FunctionComponent | unknown = unknown> {
|
|
354
|
+
type: T;
|
|
355
|
+
props: T extends FunctionComponent<infer P> ? P : Record<any, unknown>;
|
|
356
|
+
children: JSXChildren | null;
|
|
357
|
+
key: string | null;
|
|
358
|
+
dev?: DevJSX;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
declare class JSXNodeImpl<T = unknown> implements JSXNodeInternal_2<T> {
|
|
362
|
+
type: T;
|
|
363
|
+
children: JSXChildren;
|
|
364
|
+
toSort: boolean;
|
|
365
|
+
key: string | null;
|
|
366
|
+
varProps: Props;
|
|
367
|
+
constProps: Props | null;
|
|
368
|
+
dev?: DevJSX & {
|
|
369
|
+
stack: string | undefined;
|
|
370
|
+
};
|
|
371
|
+
_proxy: Props | null;
|
|
372
|
+
constructor(type: T, varProps: Props | null, constProps: Props | null, children: JSXChildren, key: string | number | null | undefined, toSort?: boolean, dev?: DevJSX);
|
|
373
|
+
get props(): T extends FunctionComponent<infer PROPS> ? PROPS : Props;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* The internal representation of a JSX Node.
|
|
378
|
+
*
|
|
379
|
+
* @internal
|
|
380
|
+
*/
|
|
381
|
+
declare interface JSXNodeInternal_2<T extends string | FunctionComponent | unknown = unknown> extends JSXNode<T> {
|
|
382
|
+
/** The type of node */
|
|
383
|
+
type: T;
|
|
384
|
+
/** Do the varProps need sorting */
|
|
385
|
+
toSort: boolean;
|
|
386
|
+
/** The key property */
|
|
387
|
+
key: string | null;
|
|
388
|
+
/**
|
|
389
|
+
* Props that are not guaranteed shallow equal across runs.
|
|
390
|
+
*
|
|
391
|
+
* Any prop that is in `constProps` takes precedence over `varProps`.
|
|
392
|
+
*
|
|
393
|
+
* Does not contain `children` or `key`.
|
|
394
|
+
*
|
|
395
|
+
* `onEvent$` props are normalized to the html `q-x:event` version
|
|
396
|
+
*/
|
|
397
|
+
varProps: Props;
|
|
398
|
+
/**
|
|
399
|
+
* Props that will be shallow equal across runs. Does not contain any props that are in varProps.
|
|
400
|
+
*
|
|
401
|
+
* Any prop that is in `constProps` takes precedence over `varProps`.
|
|
402
|
+
*
|
|
403
|
+
* Does not contain `children` or `key`.
|
|
404
|
+
*
|
|
405
|
+
* `onEvent$` props are normalized to the html `q-x:event` version
|
|
406
|
+
*/
|
|
407
|
+
constProps: Props | null;
|
|
408
|
+
/** The children of the node */
|
|
409
|
+
children: JSXChildren;
|
|
410
|
+
/** Filename etc for debugging */
|
|
411
|
+
dev?: DevJSX & {
|
|
412
|
+
stack: string | undefined;
|
|
413
|
+
};
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
/**
|
|
417
|
+
* Any valid output for a component
|
|
418
|
+
*
|
|
419
|
+
* @public
|
|
420
|
+
*/
|
|
421
|
+
declare type JSXOutput_2 = JSXNode | string | number | boolean | null | undefined | JSXOutput_2[];
|
|
422
|
+
|
|
321
423
|
/** @public */
|
|
322
424
|
declare interface MockDocument extends Document {
|
|
323
425
|
}
|
|
@@ -344,10 +446,36 @@ declare interface NodePropData {
|
|
|
344
446
|
|
|
345
447
|
declare type ObjToProxyMap = WeakMap<any, any>;
|
|
346
448
|
|
|
449
|
+
/** @internal */
|
|
450
|
+
declare const _OWNER: unique symbol;
|
|
451
|
+
|
|
347
452
|
declare type PossibleEvents = Event | SimplifiedServerRequestEvent | typeof TaskEvent | typeof RenderEvent;
|
|
348
453
|
|
|
349
454
|
declare type Props = Record<string, unknown>;
|
|
350
455
|
|
|
456
|
+
/** @internal */
|
|
457
|
+
declare const _PROPS_HANDLER: unique symbol;
|
|
458
|
+
|
|
459
|
+
declare type PropsProxy = {
|
|
460
|
+
[_VAR_PROPS]: Props;
|
|
461
|
+
[_CONST_PROPS]: Props | null;
|
|
462
|
+
[_OWNER]: JSXNodeInternal_2;
|
|
463
|
+
[_PROPS_HANDLER]: PropsProxyHandler;
|
|
464
|
+
} & Record<string | symbol, unknown>;
|
|
465
|
+
|
|
466
|
+
declare class PropsProxyHandler implements ProxyHandler<any> {
|
|
467
|
+
owner: JSXNodeImpl;
|
|
468
|
+
$effects$: undefined | Map<string | symbol, Set<EffectSubscription>>;
|
|
469
|
+
$container$: Container | null;
|
|
470
|
+
constructor(owner: JSXNodeImpl);
|
|
471
|
+
get(_: any, prop: string | symbol): any;
|
|
472
|
+
set(_: any, prop: string | symbol, value: any): boolean;
|
|
473
|
+
deleteProperty(_: any, prop: string | symbol): boolean;
|
|
474
|
+
has(_: any, prop: string | symbol): boolean;
|
|
475
|
+
getOwnPropertyDescriptor(_: any, p: string | symbol): PropertyDescriptor | undefined;
|
|
476
|
+
ownKeys(): string[];
|
|
477
|
+
}
|
|
478
|
+
|
|
351
479
|
/**
|
|
352
480
|
* The `QRL` type represents a lazy-loadable AND serializable resource.
|
|
353
481
|
*
|
|
@@ -736,6 +864,9 @@ export declare function trigger(root: Element, queryOrElement: string | Element
|
|
|
736
864
|
*/
|
|
737
865
|
declare type ValueOrPromise<T> = T | Promise<T>;
|
|
738
866
|
|
|
867
|
+
/** @internal */
|
|
868
|
+
declare const _VAR_PROPS: unique symbol;
|
|
869
|
+
|
|
739
870
|
/** @internal */
|
|
740
871
|
declare abstract class VNode implements BackRef {
|
|
741
872
|
flags: VNodeFlags;
|