@qwik.dev/core 2.0.0-alpha.2 → 2.0.0-alpha.3
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.wasm.cjs +259 -272
- package/bindings/qwik.wasm.mjs +259 -272
- 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 +2 -2
- package/dist/core-internal.d.ts +4 -7
- package/dist/core.cjs +59 -52
- package/dist/core.cjs.map +1 -1
- package/dist/core.min.mjs +1 -1
- package/dist/core.mjs +59 -52
- package/dist/core.mjs.map +1 -1
- package/dist/core.prod.cjs +35 -25
- package/dist/core.prod.mjs +36 -25
- package/dist/insights/index.qwik.cjs +1 -1
- package/dist/insights/index.qwik.mjs +1 -1
- package/dist/loader/package.json +1 -1
- package/dist/optimizer.cjs +50 -38
- package/dist/optimizer.mjs +52 -39
- package/dist/prefetch/package.json +1 -1
- package/dist/server.cjs +63 -56
- package/dist/server.mjs +63 -56
- package/dist/testing/index.cjs +61 -54
- package/dist/testing/index.mjs +61 -54
- package/dist/testing/package.json +1 -1
- package/package.json +4 -4
package/dist/core.prod.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* @qwik.dev/core 2.0.0-alpha.
|
|
3
|
+
* @qwik.dev/core 2.0.0-alpha.3-dev+418fd6d
|
|
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
|
|
@@ -1560,21 +1560,22 @@
|
|
|
1560
1560
|
}(jsxProps, vNodeProps), shouldRender && (host[VNodeProps.flags] &= ~VNodeFlags.Deleted,
|
|
1561
1561
|
container.$scheduler$(ChoreType.COMPONENT, host, componentQRL, jsxProps));
|
|
1562
1562
|
}
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
}
|
|
1563
|
+
!function(children, host) {
|
|
1564
|
+
const projectionChildren = Array.isArray(children) ? children : [ children ];
|
|
1565
|
+
const createProjectionJSXNode = slotName => new JSXNodeImpl(Projection, EMPTY_OBJ, null, [], 0, slotName);
|
|
1566
|
+
const projections = [];
|
|
1567
|
+
if (host) {
|
|
1568
|
+
for (let i = vnode_getPropStartIndex(host); i < host.length; i += 2) {
|
|
1569
|
+
const prop = host[i];
|
|
1570
|
+
if (isSlotProp(prop)) {
|
|
1571
|
+
const slotName = prop;
|
|
1572
|
+
projections.push(slotName), projections.push(createProjectionJSXNode(slotName));
|
|
1574
1573
|
}
|
|
1575
1574
|
}
|
|
1576
|
-
|
|
1577
|
-
|
|
1575
|
+
}
|
|
1576
|
+
if (0 !== projections.length || null != children) {
|
|
1577
|
+
for (let i = 0; i < projectionChildren.length; i++) {
|
|
1578
|
+
const child = projectionChildren[i];
|
|
1578
1579
|
const slotName = String(isJSXNode(child) && directGetPropsProxyProp(child, QSlot) || "");
|
|
1579
1580
|
const idx = mapApp_findIndx(projections, slotName, 0);
|
|
1580
1581
|
let jsxBucket;
|
|
@@ -1824,7 +1825,13 @@
|
|
|
1824
1825
|
|
|
1825
1826
|
case ChoreType.COMPONENT:
|
|
1826
1827
|
case ChoreType.COMPONENT_SSR:
|
|
1827
|
-
returnValue = safeCall((() => executeComponent(container, host, host, chore.$target$, chore.$payload$)), (jsx =>
|
|
1828
|
+
returnValue = safeCall((() => executeComponent(container, host, host, chore.$target$, chore.$payload$)), (jsx => {
|
|
1829
|
+
if (chore.$type$ === ChoreType.COMPONENT) {
|
|
1830
|
+
const styleScopedId = container.getHostProp(host, "q:sstyle");
|
|
1831
|
+
return vnode_diff(container, jsx, host, addComponentStylePrefix(styleScopedId));
|
|
1832
|
+
}
|
|
1833
|
+
return jsx;
|
|
1834
|
+
}), (err => container.handleError(err, host)));
|
|
1828
1835
|
break;
|
|
1829
1836
|
|
|
1830
1837
|
case ChoreType.RESOURCE:
|
|
@@ -1914,7 +1921,7 @@
|
|
|
1914
1921
|
}
|
|
1915
1922
|
return 0;
|
|
1916
1923
|
}
|
|
1917
|
-
const version = "2.0.0-alpha.
|
|
1924
|
+
const version = "2.0.0-alpha.3-dev+418fd6d";
|
|
1918
1925
|
class _SharedContainer {
|
|
1919
1926
|
$version$;
|
|
1920
1927
|
$scheduler$;
|
|
@@ -2163,10 +2170,6 @@
|
|
|
2163
2170
|
parseQRL(qrl) {
|
|
2164
2171
|
return inflateQRL(this, parseQRL(qrl));
|
|
2165
2172
|
}
|
|
2166
|
-
processJsx(host, jsx) {
|
|
2167
|
-
const styleScopedId = this.getHostProp(host, "q:sstyle");
|
|
2168
|
-
return vnode_diff(this, jsx, host, addComponentStylePrefix(styleScopedId));
|
|
2169
|
-
}
|
|
2170
2173
|
handleError(err, host) {
|
|
2171
2174
|
const errorStore = this.resolveContext(host, ERROR_CONTEXT);
|
|
2172
2175
|
if (!errorStore) {
|
|
@@ -3763,7 +3766,10 @@
|
|
|
3763
3766
|
const valType = data[i + 2];
|
|
3764
3767
|
const valData = data[i + 3];
|
|
3765
3768
|
valType === TypeIds.RootRef || valType >= TypeIds.Error ? Object.defineProperty(target, key, {
|
|
3766
|
-
get
|
|
3769
|
+
get() {
|
|
3770
|
+
const value = deserializeData(container, valType, valData);
|
|
3771
|
+
return target[key] = value, value;
|
|
3772
|
+
},
|
|
3767
3773
|
set(value) {
|
|
3768
3774
|
Object.defineProperty(target, key, {
|
|
3769
3775
|
value,
|
|
@@ -4063,6 +4069,7 @@
|
|
|
4063
4069
|
return qrl.$captureRef$ = captureIds ? captureIds.map((id => container.$getObjectById$(id))) : null,
|
|
4064
4070
|
container.element && qrl.$setContainer$(container.element), qrl;
|
|
4065
4071
|
}
|
|
4072
|
+
let isDomRef = () => !1;
|
|
4066
4073
|
const createSerializationContext = (NodeConstructor, DomRefConstructor, symbolToChunkResolver, getProp, setProp, storeProxyMap, writer, prepVNodeData) => {
|
|
4067
4074
|
if (!writer) {
|
|
4068
4075
|
const buffer = [];
|
|
@@ -4083,8 +4090,8 @@
|
|
|
4083
4090
|
roots.push(obj)), id;
|
|
4084
4091
|
};
|
|
4085
4092
|
const isSsrNode = NodeConstructor ? obj => obj instanceof NodeConstructor : () => !1;
|
|
4086
|
-
|
|
4087
|
-
|
|
4093
|
+
return isDomRef = DomRefConstructor ? obj => obj instanceof DomRefConstructor : () => !1,
|
|
4094
|
+
{
|
|
4088
4095
|
$serialize$() {
|
|
4089
4096
|
!function(serializationContext) {
|
|
4090
4097
|
const {$writer$, $isSsrNode$, $isDomRef$, $setProp$, $storeProxyMap$} = serializationContext;
|
|
@@ -4206,7 +4213,7 @@
|
|
|
4206
4213
|
output(TypeIds.Object, out);
|
|
4207
4214
|
}
|
|
4208
4215
|
} else if ($isDomRef$(value)) {
|
|
4209
|
-
output(TypeIds.RefVNode, value
|
|
4216
|
+
value.$ssrNode$.vnodeData[0] |= VNodeDataFlag.SERIALIZE, output(TypeIds.RefVNode, value.$ssrNode$.id);
|
|
4210
4217
|
} else if (value instanceof Signal) {
|
|
4211
4218
|
const v = value instanceof ComputedSignal && (value.$invalid$ || fastSkipSerialize(value.$untrackedValue$)) ? NEEDS_COMPUTATION : value.$untrackedValue$;
|
|
4212
4219
|
if (value instanceof WrappedSignal) {
|
|
@@ -4357,7 +4364,7 @@
|
|
|
4357
4364
|
} else if (isSsrNode(obj)) {
|
|
4358
4365
|
discoveredValues.push(obj.vnodeData);
|
|
4359
4366
|
} else if (isDomRef(obj)) {
|
|
4360
|
-
discoveredValues.push(obj
|
|
4367
|
+
discoveredValues.push(obj.$ssrNode$.id);
|
|
4361
4368
|
} else if (isJSXNode(obj)) {
|
|
4362
4369
|
discoveredValues.push(obj.type, obj.props, obj.constProps, obj.children);
|
|
4363
4370
|
} else if (Array.isArray(obj)) {
|
|
@@ -4535,6 +4542,9 @@
|
|
|
4535
4542
|
if (value instanceof Uint8Array) {
|
|
4536
4543
|
return !0;
|
|
4537
4544
|
}
|
|
4545
|
+
if (isDomRef?.(value)) {
|
|
4546
|
+
return !0;
|
|
4547
|
+
}
|
|
4538
4548
|
} else if ("function" == typeof value && (isQrl(value) || isQwikComponent(value))) {
|
|
4539
4549
|
return !0;
|
|
4540
4550
|
}
|
package/dist/core.prod.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* @qwik.dev/core 2.0.0-alpha.
|
|
3
|
+
* @qwik.dev/core 2.0.0-alpha.3-dev+418fd6d
|
|
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
|
|
@@ -2025,21 +2025,22 @@ const vnode_diff = (container, jsxNode, vStartNode, scopedStyleIdPrefix) => {
|
|
|
2025
2025
|
shouldRender = shouldRender || propsDiffer(jsxProps, vNodeProps), shouldRender && (host[VNodeProps.flags] &= ~VNodeFlags.Deleted,
|
|
2026
2026
|
container.$scheduler$(ChoreType.COMPONENT, host, componentQRL, jsxProps));
|
|
2027
2027
|
}
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
}
|
|
2028
|
+
!function(children, host) {
|
|
2029
|
+
const projectionChildren = Array.isArray(children) ? children : [ children ];
|
|
2030
|
+
const createProjectionJSXNode = slotName => new JSXNodeImpl(Projection, EMPTY_OBJ, null, [], 0, slotName);
|
|
2031
|
+
const projections = [];
|
|
2032
|
+
if (host) {
|
|
2033
|
+
for (let i = vnode_getPropStartIndex(host); i < host.length; i += 2) {
|
|
2034
|
+
const prop = host[i];
|
|
2035
|
+
if (isSlotProp(prop)) {
|
|
2036
|
+
const slotName = prop;
|
|
2037
|
+
projections.push(slotName), projections.push(createProjectionJSXNode(slotName));
|
|
2039
2038
|
}
|
|
2040
2039
|
}
|
|
2041
|
-
|
|
2042
|
-
|
|
2040
|
+
}
|
|
2041
|
+
if (0 !== projections.length || null != children) {
|
|
2042
|
+
for (let i = 0; i < projectionChildren.length; i++) {
|
|
2043
|
+
const child = projectionChildren[i];
|
|
2043
2044
|
const slotName = String(isJSXNode(child) && directGetPropsProxyProp(child, QSlot) || "");
|
|
2044
2045
|
const idx = mapApp_findIndx(projections, slotName, 0);
|
|
2045
2046
|
let jsxBucket;
|
|
@@ -2299,7 +2300,13 @@ const createScheduler = (container, scheduleDrain, journalFlush) => {
|
|
|
2299
2300
|
|
|
2300
2301
|
case ChoreType.COMPONENT:
|
|
2301
2302
|
case ChoreType.COMPONENT_SSR:
|
|
2302
|
-
returnValue = safeCall((() => executeComponent(container, host, host, chore.$target$, chore.$payload$)), (jsx =>
|
|
2303
|
+
returnValue = safeCall((() => executeComponent(container, host, host, chore.$target$, chore.$payload$)), (jsx => {
|
|
2304
|
+
if (chore.$type$ === ChoreType.COMPONENT) {
|
|
2305
|
+
const styleScopedId = container.getHostProp(host, "q:sstyle");
|
|
2306
|
+
return vnode_diff(container, jsx, host, addComponentStylePrefix(styleScopedId));
|
|
2307
|
+
}
|
|
2308
|
+
return jsx;
|
|
2309
|
+
}), (err => container.handleError(err, host)));
|
|
2303
2310
|
break;
|
|
2304
2311
|
|
|
2305
2312
|
case ChoreType.RESOURCE:
|
|
@@ -2423,7 +2430,7 @@ function sortedInsert(sortedArray, value) {
|
|
|
2423
2430
|
return choreUpdate(existing, value), existing;
|
|
2424
2431
|
}
|
|
2425
2432
|
|
|
2426
|
-
const version = "2.0.0-alpha.
|
|
2433
|
+
const version = "2.0.0-alpha.3-dev+418fd6d";
|
|
2427
2434
|
|
|
2428
2435
|
class _SharedContainer {
|
|
2429
2436
|
$version$;
|
|
@@ -2754,10 +2761,6 @@ class DomContainer extends _SharedContainer {
|
|
|
2754
2761
|
parseQRL(qrl) {
|
|
2755
2762
|
return inflateQRL(this, parseQRL(qrl));
|
|
2756
2763
|
}
|
|
2757
|
-
processJsx(host, jsx) {
|
|
2758
|
-
const styleScopedId = this.getHostProp(host, "q:sstyle");
|
|
2759
|
-
return vnode_diff(this, jsx, host, addComponentStylePrefix(styleScopedId));
|
|
2760
|
-
}
|
|
2761
2764
|
handleError(err, host) {
|
|
2762
2765
|
const errorStore = this.resolveContext(host, ERROR_CONTEXT);
|
|
2763
2766
|
if (!errorStore) {
|
|
@@ -4564,7 +4567,10 @@ const inflate = (container, target, typeId, data) => {
|
|
|
4564
4567
|
const valType = data[i + 2];
|
|
4565
4568
|
const valData = data[i + 3];
|
|
4566
4569
|
valType === TypeIds.RootRef || valType >= TypeIds.Error ? Object.defineProperty(target, key, {
|
|
4567
|
-
get
|
|
4570
|
+
get() {
|
|
4571
|
+
const value = deserializeData(container, valType, valData);
|
|
4572
|
+
return target[key] = value, value;
|
|
4573
|
+
},
|
|
4568
4574
|
set(value) {
|
|
4569
4575
|
Object.defineProperty(target, key, {
|
|
4570
4576
|
value,
|
|
@@ -4870,6 +4876,8 @@ function inflateQRL(container, qrl) {
|
|
|
4870
4876
|
container.element && qrl.$setContainer$(container.element), qrl;
|
|
4871
4877
|
}
|
|
4872
4878
|
|
|
4879
|
+
let isDomRef = () => !1;
|
|
4880
|
+
|
|
4873
4881
|
const createSerializationContext = (NodeConstructor, DomRefConstructor, symbolToChunkResolver, getProp, setProp, storeProxyMap, writer, prepVNodeData) => {
|
|
4874
4882
|
if (!writer) {
|
|
4875
4883
|
const buffer = [];
|
|
@@ -4890,8 +4898,8 @@ const createSerializationContext = (NodeConstructor, DomRefConstructor, symbolTo
|
|
|
4890
4898
|
roots.push(obj)), id;
|
|
4891
4899
|
};
|
|
4892
4900
|
const isSsrNode = NodeConstructor ? obj => obj instanceof NodeConstructor : () => !1;
|
|
4893
|
-
|
|
4894
|
-
|
|
4901
|
+
return isDomRef = DomRefConstructor ? obj => obj instanceof DomRefConstructor : () => !1,
|
|
4902
|
+
{
|
|
4895
4903
|
$serialize$() {
|
|
4896
4904
|
serialize(this);
|
|
4897
4905
|
},
|
|
@@ -4966,7 +4974,7 @@ const createSerializationContext = (NodeConstructor, DomRefConstructor, symbolTo
|
|
|
4966
4974
|
} else if (isSsrNode(obj)) {
|
|
4967
4975
|
discoveredValues.push(obj.vnodeData);
|
|
4968
4976
|
} else if (isDomRef(obj)) {
|
|
4969
|
-
discoveredValues.push(obj
|
|
4977
|
+
discoveredValues.push(obj.$ssrNode$.id);
|
|
4970
4978
|
} else if (isJSXNode(obj)) {
|
|
4971
4979
|
discoveredValues.push(obj.type, obj.props, obj.constProps, obj.children);
|
|
4972
4980
|
} else if (Array.isArray(obj)) {
|
|
@@ -5138,7 +5146,7 @@ function serialize(serializationContext) {
|
|
|
5138
5146
|
output(TypeIds.Object, out);
|
|
5139
5147
|
}
|
|
5140
5148
|
} else if ($isDomRef$(value)) {
|
|
5141
|
-
output(TypeIds.RefVNode, value
|
|
5149
|
+
value.$ssrNode$.vnodeData[0] |= VNodeDataFlag.SERIALIZE, output(TypeIds.RefVNode, value.$ssrNode$.id);
|
|
5142
5150
|
} else if (value instanceof Signal) {
|
|
5143
5151
|
const v = value instanceof ComputedSignal && (value.$invalid$ || fastSkipSerialize(value.$untrackedValue$)) ? NEEDS_COMPUTATION : value.$untrackedValue$;
|
|
5144
5152
|
if (value instanceof WrappedSignal) {
|
|
@@ -5384,6 +5392,9 @@ const canSerialize = value => {
|
|
|
5384
5392
|
if (value instanceof Uint8Array) {
|
|
5385
5393
|
return !0;
|
|
5386
5394
|
}
|
|
5395
|
+
if (isDomRef?.(value)) {
|
|
5396
|
+
return !0;
|
|
5397
|
+
}
|
|
5387
5398
|
} else if ("function" == typeof value && (isQrl(value) || isQwikComponent(value))) {
|
|
5388
5399
|
return !0;
|
|
5389
5400
|
}
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
6
6
|
const core = require("@qwik.dev/core");
|
|
7
7
|
/**
|
|
8
8
|
* @license
|
|
9
|
-
* @qwik.dev/core 2.0.0-alpha.
|
|
9
|
+
* @qwik.dev/core 2.0.0-alpha.3-dev+418fd6d
|
|
10
10
|
* Copyright QwikDev. All Rights Reserved.
|
|
11
11
|
* Use of this source code is governed by an MIT-style license that can be
|
|
12
12
|
* found in the LICENSE file at https://github.com/QwikDev/qwik/blob/main/LICENSE
|
|
@@ -4,7 +4,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
4
4
|
import { sync$, component$ } from "@qwik.dev/core";
|
|
5
5
|
/**
|
|
6
6
|
* @license
|
|
7
|
-
* @qwik.dev/core 2.0.0-alpha.
|
|
7
|
+
* @qwik.dev/core 2.0.0-alpha.3-dev+418fd6d
|
|
8
8
|
* Copyright QwikDev. All Rights Reserved.
|
|
9
9
|
* Use of this source code is governed by an MIT-style license that can be
|
|
10
10
|
* found in the LICENSE file at https://github.com/QwikDev/qwik/blob/main/LICENSE
|
package/dist/loader/package.json
CHANGED
package/dist/optimizer.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* @qwik.dev/core/optimizer 2.0.0-alpha.
|
|
3
|
+
* @qwik.dev/core/optimizer 2.0.0-alpha.3-dev+418fd6d
|
|
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
|
|
@@ -1226,7 +1226,7 @@ globalThis.qwikOptimizer = function(module) {
|
|
|
1226
1226
|
}
|
|
1227
1227
|
var QWIK_BINDING_MAP = {};
|
|
1228
1228
|
var versions = {
|
|
1229
|
-
qwik: "2.0.0-alpha.
|
|
1229
|
+
qwik: "2.0.0-alpha.3-dev+418fd6d"
|
|
1230
1230
|
};
|
|
1231
1231
|
async function getSystem() {
|
|
1232
1232
|
const sysEnv = getEnv();
|
|
@@ -4265,34 +4265,35 @@ globalThis.qwikOptimizer = function(module) {
|
|
|
4265
4265
|
return peekNextSibling();
|
|
4266
4266
|
}
|
|
4267
4267
|
function descendContentToProject(children, host) {
|
|
4268
|
-
Array.isArray(children)
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
projections.push(createProjectionJSXNode(slotName));
|
|
4279
|
-
}
|
|
4268
|
+
const projectionChildren = Array.isArray(children) ? children : [ children ];
|
|
4269
|
+
const createProjectionJSXNode = slotName => new JSXNodeImpl(Projection, EMPTY_OBJ, null, [], 0, slotName);
|
|
4270
|
+
const projections = [];
|
|
4271
|
+
if (host) {
|
|
4272
|
+
for (let i = vnode_getPropStartIndex(host); i < host.length; i += 2) {
|
|
4273
|
+
const prop = host[i];
|
|
4274
|
+
if (isSlotProp(prop)) {
|
|
4275
|
+
const slotName = prop;
|
|
4276
|
+
projections.push(slotName);
|
|
4277
|
+
projections.push(createProjectionJSXNode(slotName));
|
|
4280
4278
|
}
|
|
4281
4279
|
}
|
|
4282
|
-
for (let i = 0; i < children.length; i++) {
|
|
4283
|
-
const child = children[i];
|
|
4284
|
-
const slotName = String(isJSXNode(child) && directGetPropsProxyProp(child, QSlot) || QDefaultSlot);
|
|
4285
|
-
const idx = mapApp_findIndx(projections, slotName, 0);
|
|
4286
|
-
let jsxBucket;
|
|
4287
|
-
idx >= 0 ? jsxBucket = projections[idx + 1] : projections.splice(~idx, 0, slotName, jsxBucket = createProjectionJSXNode(slotName));
|
|
4288
|
-
const removeProjection = false === child;
|
|
4289
|
-
removeProjection || jsxBucket.children.push(child);
|
|
4290
|
-
}
|
|
4291
|
-
for (let i = projections.length - 2; i >= 0; i -= 2) {
|
|
4292
|
-
projections.splice(i, 1);
|
|
4293
|
-
}
|
|
4294
|
-
descend(projections, true);
|
|
4295
4280
|
}
|
|
4281
|
+
if (0 === projections.length && null == children) {
|
|
4282
|
+
return;
|
|
4283
|
+
}
|
|
4284
|
+
for (let i = 0; i < projectionChildren.length; i++) {
|
|
4285
|
+
const child = projectionChildren[i];
|
|
4286
|
+
const slotName = String(isJSXNode(child) && directGetPropsProxyProp(child, QSlot) || QDefaultSlot);
|
|
4287
|
+
const idx = mapApp_findIndx(projections, slotName, 0);
|
|
4288
|
+
let jsxBucket;
|
|
4289
|
+
idx >= 0 ? jsxBucket = projections[idx + 1] : projections.splice(~idx, 0, slotName, jsxBucket = createProjectionJSXNode(slotName));
|
|
4290
|
+
const removeProjection = false === child;
|
|
4291
|
+
removeProjection || jsxBucket.children.push(child);
|
|
4292
|
+
}
|
|
4293
|
+
for (let i = projections.length - 2; i >= 0; i -= 2) {
|
|
4294
|
+
projections.splice(i, 1);
|
|
4295
|
+
}
|
|
4296
|
+
descend(projections, true);
|
|
4296
4297
|
}
|
|
4297
4298
|
function expectProjection() {
|
|
4298
4299
|
const jsxNode2 = jsxValue;
|
|
@@ -4658,7 +4659,7 @@ globalThis.qwikOptimizer = function(module) {
|
|
|
4658
4659
|
container.$scheduler$(7, host, componentQRL, jsxProps);
|
|
4659
4660
|
}
|
|
4660
4661
|
}
|
|
4661
|
-
|
|
4662
|
+
descendContentToProject(jsxNode2.children, host);
|
|
4662
4663
|
} else {
|
|
4663
4664
|
const lookupKey = jsxNode2.key;
|
|
4664
4665
|
const vNodeLookupKey = getKey(host);
|
|
@@ -4922,7 +4923,13 @@ globalThis.qwikOptimizer = function(module) {
|
|
|
4922
4923
|
|
|
4923
4924
|
case 7:
|
|
4924
4925
|
case 6:
|
|
4925
|
-
returnValue = safeCall((() => executeComponent(container, host, host, chore.$target$, chore.$payload$)), (jsx3 =>
|
|
4926
|
+
returnValue = safeCall((() => executeComponent(container, host, host, chore.$target$, chore.$payload$)), (jsx3 => {
|
|
4927
|
+
if (7 === chore.$type$) {
|
|
4928
|
+
const styleScopedId = container.getHostProp(host, QScopedStyle);
|
|
4929
|
+
return vnode_diff(container, jsx3, host, addComponentStylePrefix(styleScopedId));
|
|
4930
|
+
}
|
|
4931
|
+
return jsx3;
|
|
4932
|
+
}), (err => container.handleError(err, host)));
|
|
4926
4933
|
break;
|
|
4927
4934
|
|
|
4928
4935
|
case 2:
|
|
@@ -5086,7 +5093,7 @@ globalThis.qwikOptimizer = function(module) {
|
|
|
5086
5093
|
}));
|
|
5087
5094
|
console.log(lines.join("\n ") + "\n");
|
|
5088
5095
|
}
|
|
5089
|
-
var version = "2.0.0-alpha.
|
|
5096
|
+
var version = "2.0.0-alpha.3-dev+418fd6d";
|
|
5090
5097
|
var _SharedContainer = class {
|
|
5091
5098
|
$version$;
|
|
5092
5099
|
$scheduler$;
|
|
@@ -5468,10 +5475,6 @@ globalThis.qwikOptimizer = function(module) {
|
|
|
5468
5475
|
parseQRL(qrl2) {
|
|
5469
5476
|
return inflateQRL(this, parseQRL(qrl2));
|
|
5470
5477
|
}
|
|
5471
|
-
processJsx(host, jsx2) {
|
|
5472
|
-
const styleScopedId = this.getHostProp(host, QScopedStyle);
|
|
5473
|
-
return vnode_diff(this, jsx2, host, addComponentStylePrefix(styleScopedId));
|
|
5474
|
-
}
|
|
5475
5478
|
handleError(err, host) {
|
|
5476
5479
|
if (qDev) {
|
|
5477
5480
|
if ("undefined" !== typeof document) {
|
|
@@ -7146,7 +7149,11 @@ globalThis.qwikOptimizer = function(module) {
|
|
|
7146
7149
|
const valType = data[i2 + 2];
|
|
7147
7150
|
const valData = data[i2 + 3];
|
|
7148
7151
|
0 === valType || valType >= 12 ? Object.defineProperty(target, key, {
|
|
7149
|
-
get
|
|
7152
|
+
get() {
|
|
7153
|
+
const value = deserializeData(container, valType, valData);
|
|
7154
|
+
target[key] = value;
|
|
7155
|
+
return value;
|
|
7156
|
+
},
|
|
7150
7157
|
set(value) {
|
|
7151
7158
|
Object.defineProperty(target, key, {
|
|
7152
7159
|
value: value,
|
|
@@ -7487,6 +7494,7 @@ globalThis.qwikOptimizer = function(module) {
|
|
|
7487
7494
|
container.element && qrl2.$setContainer$(container.element);
|
|
7488
7495
|
return qrl2;
|
|
7489
7496
|
}
|
|
7497
|
+
var isDomRef = obj => false;
|
|
7490
7498
|
var createSerializationContext = (NodeConstructor, DomRefConstructor, symbolToChunkResolver, getProp, setProp, storeProxyMap, writer, prepVNodeData) => {
|
|
7491
7499
|
if (!writer) {
|
|
7492
7500
|
const buffer = [];
|
|
@@ -7511,7 +7519,7 @@ globalThis.qwikOptimizer = function(module) {
|
|
|
7511
7519
|
return id;
|
|
7512
7520
|
};
|
|
7513
7521
|
const isSsrNode = NodeConstructor ? obj => obj instanceof NodeConstructor : () => false;
|
|
7514
|
-
|
|
7522
|
+
isDomRef = DomRefConstructor ? obj => obj instanceof DomRefConstructor : () => false;
|
|
7515
7523
|
return {
|
|
7516
7524
|
$serialize$() {
|
|
7517
7525
|
serialize(this);
|
|
@@ -7608,7 +7616,7 @@ globalThis.qwikOptimizer = function(module) {
|
|
|
7608
7616
|
} else if (isSsrNode(obj)) {
|
|
7609
7617
|
discoveredValues.push(obj.vnodeData);
|
|
7610
7618
|
} else if (isDomRef(obj)) {
|
|
7611
|
-
discoveredValues.push(obj
|
|
7619
|
+
discoveredValues.push(obj.$ssrNode$.id);
|
|
7612
7620
|
} else if (isJSXNode(obj)) {
|
|
7613
7621
|
discoveredValues.push(obj.type, obj.props, obj.constProps, obj.children);
|
|
7614
7622
|
} else if (Array.isArray(obj)) {
|
|
@@ -7794,7 +7802,8 @@ globalThis.qwikOptimizer = function(module) {
|
|
|
7794
7802
|
output(13, out);
|
|
7795
7803
|
}
|
|
7796
7804
|
} else if ($isDomRef$(value)) {
|
|
7797
|
-
|
|
7805
|
+
value.$ssrNode$.vnodeData[0] |= 8;
|
|
7806
|
+
output(9, value.$ssrNode$.id);
|
|
7798
7807
|
} else if (value instanceof Signal) {
|
|
7799
7808
|
const v = value instanceof ComputedSignal && (value.$invalid$ || fastSkipSerialize(value.$untrackedValue$)) ? NEEDS_COMPUTATION : value.$untrackedValue$;
|
|
7800
7809
|
if (value instanceof WrappedSignal) {
|
|
@@ -8010,6 +8019,9 @@ globalThis.qwikOptimizer = function(module) {
|
|
|
8010
8019
|
if (value instanceof Uint8Array) {
|
|
8011
8020
|
return true;
|
|
8012
8021
|
}
|
|
8022
|
+
if (null == isDomRef ? void 0 : isDomRef(value)) {
|
|
8023
|
+
return true;
|
|
8024
|
+
}
|
|
8013
8025
|
} else if ("function" === typeof value && (isQrl2(value) || isQwikComponent(value))) {
|
|
8014
8026
|
return true;
|
|
8015
8027
|
}
|