@qwik.dev/core 2.0.0-beta.1 → 2.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/server.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * @qwik.dev/core/server 2.0.0-beta.1-dev+495e8d9
3
+ * @qwik.dev/core/server 2.0.0-beta.2-dev+3ddc6c7
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
@@ -59,7 +59,7 @@ __export(index_exports, {
59
59
  versions: () => versions
60
60
  });
61
61
  module.exports = __toCommonJS(index_exports);
62
- var import_core6 = require("@qwik.dev/core");
62
+ var import_core5 = require("@qwik.dev/core");
63
63
 
64
64
  // packages/qwik/src/server/platform.ts
65
65
  var import_core = require("@qwik.dev/core");
@@ -1167,12 +1167,12 @@ function getBuildBase(opts) {
1167
1167
  return `${globalThis.BASE_URL || "/"}build/`;
1168
1168
  }
1169
1169
  var versions = {
1170
- qwik: "2.0.0-beta.1-dev+495e8d9",
1170
+ qwik: "2.0.0-beta.2-dev+3ddc6c7",
1171
1171
  qwikDom: "2.1.19"
1172
1172
  };
1173
1173
 
1174
1174
  // packages/qwik/src/server/ssr-container.ts
1175
- var import_core5 = require("@qwik.dev/core");
1175
+ var import_core4 = require("@qwik.dev/core");
1176
1176
  var import_build7 = require("@qwik.dev/core/build");
1177
1177
 
1178
1178
  // packages/qwik/src/server/scripts.ts
@@ -1191,14 +1191,15 @@ function getQwikPrefetchWorkerScript(opts = {}) {
1191
1191
  var import_core2 = require("@qwik.dev/core");
1192
1192
  var import_build6 = require("@qwik.dev/core/build");
1193
1193
  var SsrNode = class {
1194
- constructor(parentSsrNode, id, attrs, cleanupQueue, vnodeData) {
1195
- this.attrs = attrs;
1194
+ constructor(parentSsrNode, id, attributesIndex, cleanupQueue, vnodeData) {
1195
+ this.attributesIndex = attributesIndex;
1196
1196
  this.cleanupQueue = cleanupQueue;
1197
1197
  this.vnodeData = vnodeData;
1198
1198
  var _a;
1199
1199
  this.parentSsrNode = parentSsrNode;
1200
1200
  (_a = this.parentSsrNode) == null ? void 0 : _a.addChild(this);
1201
1201
  this.id = id;
1202
+ this.attrs = this.attributesIndex >= 0 ? this.vnodeData[this.attributesIndex] : import_core2._EMPTY_ARRAY;
1202
1203
  if (import_build6.isDev && id.indexOf("undefined") != -1) {
1203
1204
  throw new Error(`Invalid SSR node id: ${id}`);
1204
1205
  }
@@ -1212,6 +1213,7 @@ var SsrNode = class {
1212
1213
  id;
1213
1214
  parentSsrNode;
1214
1215
  children = null;
1216
+ attrs;
1215
1217
  /** Local props which don't serialize; */
1216
1218
  localProps = null;
1217
1219
  get [import_core2._EFFECT_BACK_REF]() {
@@ -1219,7 +1221,7 @@ var SsrNode = class {
1219
1221
  }
1220
1222
  setProp(name, value) {
1221
1223
  if (this.attrs === import_core2._EMPTY_ARRAY) {
1222
- this.attrs = [];
1224
+ this.setEmptyArrayAsVNodeDataAttributes();
1223
1225
  }
1224
1226
  if (name.startsWith(NON_SERIALIZABLE_MARKER_PREFIX)) {
1225
1227
  mapArray_set(this.localProps || (this.localProps = []), name, value, 0);
@@ -1230,6 +1232,17 @@ var SsrNode = class {
1230
1232
  this.cleanupQueue.push(value);
1231
1233
  }
1232
1234
  }
1235
+ setEmptyArrayAsVNodeDataAttributes() {
1236
+ if (this.attributesIndex >= 0) {
1237
+ this.vnodeData[this.attributesIndex] = [];
1238
+ this.attrs = this.vnodeData[this.attributesIndex];
1239
+ } else {
1240
+ const newAttributesIndex = this.vnodeData.length > 1 ? 1 : 0;
1241
+ this.vnodeData.splice(newAttributesIndex, 0, []);
1242
+ this.attributesIndex = newAttributesIndex;
1243
+ this.attrs = this.vnodeData[this.attributesIndex];
1244
+ }
1245
+ }
1233
1246
  getProp(name) {
1234
1247
  if (name.startsWith(NON_SERIALIZABLE_MARKER_PREFIX)) {
1235
1248
  return this.localProps ? mapArray_get(this.localProps, name, 0) : null;
@@ -1613,7 +1626,6 @@ function isInPhrasing(text, allowInput) {
1613
1626
  }
1614
1627
 
1615
1628
  // packages/qwik/src/server/vnode-data.ts
1616
- var import_core3 = require("@qwik.dev/core");
1617
1629
  var OPEN_FRAGMENT = Number.MAX_SAFE_INTEGER;
1618
1630
  var CLOSE_FRAGMENT = Number.MAX_SAFE_INTEGER - 1;
1619
1631
  var WRITE_ELEMENT_ATTRS = Number.MAX_SAFE_INTEGER - 2;
@@ -1650,12 +1662,12 @@ function vNodeData_openElement(vNodeData) {
1650
1662
  }
1651
1663
  function vNodeData_createSsrNodeReference(currentComponentNode, vNodeData, depthFirstElementIdx, cleanupQueue) {
1652
1664
  vNodeData[0] |= 8 /* REFERENCE */;
1653
- let fragmentAttrs = import_core3._EMPTY_ARRAY;
1654
1665
  const stack = [-1];
1666
+ let attributesIndex = -1;
1655
1667
  for (let i = 1; i < vNodeData.length; i++) {
1656
1668
  const value = vNodeData[i];
1657
1669
  if (Array.isArray(value)) {
1658
- fragmentAttrs = value;
1670
+ attributesIndex = i;
1659
1671
  i++;
1660
1672
  if (vNodeData[i] !== WRITE_ELEMENT_ATTRS) {
1661
1673
  stack[stack.length - 1]++;
@@ -1663,7 +1675,6 @@ function vNodeData_createSsrNodeReference(currentComponentNode, vNodeData, depth
1663
1675
  }
1664
1676
  } else if (value === CLOSE_FRAGMENT) {
1665
1677
  stack.pop();
1666
- fragmentAttrs = import_core3._EMPTY_ARRAY;
1667
1678
  } else if (value < 0) {
1668
1679
  const numberOfElements = 0 - value;
1669
1680
  stack[stack.length - 1] += numberOfElements;
@@ -1680,7 +1691,7 @@ function vNodeData_createSsrNodeReference(currentComponentNode, vNodeData, depth
1680
1691
  }
1681
1692
  }
1682
1693
  }
1683
- return new SsrNode(currentComponentNode, refId, fragmentAttrs, cleanupQueue, vNodeData);
1694
+ return new SsrNode(currentComponentNode, refId, attributesIndex, cleanupQueue, vNodeData);
1684
1695
  }
1685
1696
  var ALPHANUMERIC = [];
1686
1697
  function encodeAsAlphanumeric(value) {
@@ -1703,7 +1714,7 @@ function encodeAsAlphanumeric(value) {
1703
1714
  }
1704
1715
 
1705
1716
  // packages/qwik/src/server/preload-strategy.ts
1706
- var import_core4 = require("@qwik.dev/core");
1717
+ var import_core3 = require("@qwik.dev/core");
1707
1718
 
1708
1719
  // packages/qwik/src/server/preload-utils.ts
1709
1720
  function flattenPrefetchResources(prefetchResources) {
@@ -1726,7 +1737,7 @@ function flattenPrefetchResources(prefetchResources) {
1726
1737
 
1727
1738
  // packages/qwik/src/server/preload-strategy.ts
1728
1739
  var getBundles = (qrls) => {
1729
- const platform = (0, import_core4.getPlatform)();
1740
+ const platform = (0, import_core3.getPlatform)();
1730
1741
  return qrls == null ? void 0 : qrls.map((qrl) => {
1731
1742
  var _a;
1732
1743
  const symbol = qrl.$symbol$;
@@ -1969,7 +1980,7 @@ var StringBufferWriter = class {
1969
1980
  }
1970
1981
  };
1971
1982
  var EMPTY_OBJ = {};
1972
- var SSRContainer = class extends import_core5._SharedContainer {
1983
+ var SSRContainer = class extends import_core4._SharedContainer {
1973
1984
  tag;
1974
1985
  isHtml;
1975
1986
  writer;
@@ -2052,7 +2063,7 @@ var SSRContainer = class extends import_core5._SharedContainer {
2052
2063
  }
2053
2064
  async render(jsx) {
2054
2065
  this.openContainer();
2055
- await (0, import_core5._walkJSX)(this, jsx, {
2066
+ await (0, import_core4._walkJSX)(this, jsx, {
2056
2067
  currentStyleScoped: null,
2057
2068
  parentComponentFrame: this.getComponentFrame()
2058
2069
  });
@@ -2297,7 +2308,7 @@ var SSRContainer = class extends import_core5._SharedContainer {
2297
2308
  }
2298
2309
  for (let i = 0; i < injections.length; i++) {
2299
2310
  const injection = injections[i];
2300
- const jsxNode = (0, import_core5._jsxSplit)(injection.tag, null, injection.attributes || {}, null, 0, null);
2311
+ const jsxNode = (0, import_core4._jsxSplit)(injection.tag, null, injection.attributes || {}, null, 0, null);
2301
2312
  if (injection.location === "head") {
2302
2313
  this.additionalHeadNodes.push(jsxNode);
2303
2314
  } else {
@@ -2317,7 +2328,7 @@ var SSRContainer = class extends import_core5._SharedContainer {
2317
2328
  this.styleIds.add(styleId);
2318
2329
  if (((_a = this.currentElementFrame) == null ? void 0 : _a.elementName) === "html") {
2319
2330
  this.additionalHeadNodes.push(
2320
- (0, import_core5._jsxSorted)(
2331
+ (0, import_core4._jsxSorted)(
2321
2332
  "style",
2322
2333
  null,
2323
2334
  { dangerouslySetInnerHTML: content, [QStyle]: styleId },
@@ -2601,7 +2612,7 @@ var SSRContainer = class extends import_core5._SharedContainer {
2601
2612
  lastNode.vnodeData[0] |= 16 /* SERIALIZE */;
2602
2613
  }
2603
2614
  ssrComponentNode == null ? void 0 : ssrComponentNode.setProp(value, lastNode.id);
2604
- await (0, import_core5._walkJSX)(this, children, {
2615
+ await (0, import_core4._walkJSX)(this, children, {
2605
2616
  currentStyleScoped: scopedStyleId,
2606
2617
  parentComponentFrame: null
2607
2618
  });
@@ -2731,7 +2742,7 @@ var SSRContainer = class extends import_core5._SharedContainer {
2731
2742
  }
2732
2743
  if (key === "ref") {
2733
2744
  const lastNode = this.getOrCreateLastNode();
2734
- if ((0, import_core5.isSignal)(value)) {
2745
+ if ((0, import_core4.isSignal)(value)) {
2735
2746
  value.$untrackedValue$ = new DomRef(lastNode);
2736
2747
  continue;
2737
2748
  } else if (typeof value === "function") {
@@ -2743,9 +2754,9 @@ var SSRContainer = class extends import_core5._SharedContainer {
2743
2754
  throw qError(15 /* invalidRefValue */, [currentFile]);
2744
2755
  }
2745
2756
  }
2746
- if ((0, import_core5.isSignal)(value)) {
2757
+ if ((0, import_core4.isSignal)(value)) {
2747
2758
  const lastNode = this.getOrCreateLastNode();
2748
- const signalData = new import_core5._SubscriptionData({
2759
+ const signalData = new import_core4._SubscriptionData({
2749
2760
  $scopedStyleIdPrefix$: styleScopedId,
2750
2761
  $isConst$: isConst
2751
2762
  });
@@ -3001,7 +3012,7 @@ var Q_FUNCS_PREFIX = 'document["qFuncs_HASH"]=';
3001
3012
  // packages/qwik/src/server/index.ts
3002
3013
  async function setServerPlatform2(manifest) {
3003
3014
  const platform = createPlatform({ manifest }, resolveManifest(manifest));
3004
- (0, import_core6.setPlatform)(platform);
3015
+ (0, import_core5.setPlatform)(platform);
3005
3016
  }
3006
3017
  // Annotate the CommonJS export names for ESM import in node:
3007
3018
  0 && (module.exports = {
package/dist/server.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * @qwik.dev/core/server 2.0.0-beta.1-dev+495e8d9
3
+ * @qwik.dev/core/server 2.0.0-beta.2-dev+3ddc6c7
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
@@ -1122,7 +1122,7 @@ function getBuildBase(opts) {
1122
1122
  return `${import.meta.env.BASE_URL || "/"}build/`;
1123
1123
  }
1124
1124
  var versions = {
1125
- qwik: "2.0.0-beta.1-dev+495e8d9",
1125
+ qwik: "2.0.0-beta.2-dev+3ddc6c7",
1126
1126
  qwikDom: "2.1.19"
1127
1127
  };
1128
1128
 
@@ -1157,8 +1157,8 @@ import {
1157
1157
  } from "@qwik.dev/core";
1158
1158
  import { isDev as isDev3 } from "@qwik.dev/core/build";
1159
1159
  var SsrNode = class {
1160
- constructor(parentSsrNode, id, attrs, cleanupQueue, vnodeData) {
1161
- this.attrs = attrs;
1160
+ constructor(parentSsrNode, id, attributesIndex, cleanupQueue, vnodeData) {
1161
+ this.attributesIndex = attributesIndex;
1162
1162
  this.cleanupQueue = cleanupQueue;
1163
1163
  this.vnodeData = vnodeData;
1164
1164
  __publicField(this, "__brand__", "SsrNode");
@@ -1170,11 +1170,13 @@ var SsrNode = class {
1170
1170
  __publicField(this, "id");
1171
1171
  __publicField(this, "parentSsrNode");
1172
1172
  __publicField(this, "children", null);
1173
+ __publicField(this, "attrs");
1173
1174
  /** Local props which don't serialize; */
1174
1175
  __publicField(this, "localProps", null);
1175
1176
  this.parentSsrNode = parentSsrNode;
1176
1177
  this.parentSsrNode?.addChild(this);
1177
1178
  this.id = id;
1179
+ this.attrs = this.attributesIndex >= 0 ? this.vnodeData[this.attributesIndex] : _EMPTY_ARRAY;
1178
1180
  if (isDev3 && id.indexOf("undefined") != -1) {
1179
1181
  throw new Error(`Invalid SSR node id: ${id}`);
1180
1182
  }
@@ -1184,7 +1186,7 @@ var SsrNode = class {
1184
1186
  }
1185
1187
  setProp(name, value) {
1186
1188
  if (this.attrs === _EMPTY_ARRAY) {
1187
- this.attrs = [];
1189
+ this.setEmptyArrayAsVNodeDataAttributes();
1188
1190
  }
1189
1191
  if (name.startsWith(NON_SERIALIZABLE_MARKER_PREFIX)) {
1190
1192
  mapArray_set(this.localProps || (this.localProps = []), name, value, 0);
@@ -1195,6 +1197,17 @@ var SsrNode = class {
1195
1197
  this.cleanupQueue.push(value);
1196
1198
  }
1197
1199
  }
1200
+ setEmptyArrayAsVNodeDataAttributes() {
1201
+ if (this.attributesIndex >= 0) {
1202
+ this.vnodeData[this.attributesIndex] = [];
1203
+ this.attrs = this.vnodeData[this.attributesIndex];
1204
+ } else {
1205
+ const newAttributesIndex = this.vnodeData.length > 1 ? 1 : 0;
1206
+ this.vnodeData.splice(newAttributesIndex, 0, []);
1207
+ this.attributesIndex = newAttributesIndex;
1208
+ this.attrs = this.vnodeData[this.attributesIndex];
1209
+ }
1210
+ }
1198
1211
  getProp(name) {
1199
1212
  if (name.startsWith(NON_SERIALIZABLE_MARKER_PREFIX)) {
1200
1213
  return this.localProps ? mapArray_get(this.localProps, name, 0) : null;
@@ -1578,7 +1591,6 @@ function isInPhrasing(text, allowInput) {
1578
1591
  }
1579
1592
 
1580
1593
  // packages/qwik/src/server/vnode-data.ts
1581
- import { _EMPTY_ARRAY as _EMPTY_ARRAY2 } from "@qwik.dev/core";
1582
1594
  var OPEN_FRAGMENT = Number.MAX_SAFE_INTEGER;
1583
1595
  var CLOSE_FRAGMENT = Number.MAX_SAFE_INTEGER - 1;
1584
1596
  var WRITE_ELEMENT_ATTRS = Number.MAX_SAFE_INTEGER - 2;
@@ -1615,12 +1627,12 @@ function vNodeData_openElement(vNodeData) {
1615
1627
  }
1616
1628
  function vNodeData_createSsrNodeReference(currentComponentNode, vNodeData, depthFirstElementIdx, cleanupQueue) {
1617
1629
  vNodeData[0] |= 8 /* REFERENCE */;
1618
- let fragmentAttrs = _EMPTY_ARRAY2;
1619
1630
  const stack = [-1];
1631
+ let attributesIndex = -1;
1620
1632
  for (let i = 1; i < vNodeData.length; i++) {
1621
1633
  const value = vNodeData[i];
1622
1634
  if (Array.isArray(value)) {
1623
- fragmentAttrs = value;
1635
+ attributesIndex = i;
1624
1636
  i++;
1625
1637
  if (vNodeData[i] !== WRITE_ELEMENT_ATTRS) {
1626
1638
  stack[stack.length - 1]++;
@@ -1628,7 +1640,6 @@ function vNodeData_createSsrNodeReference(currentComponentNode, vNodeData, depth
1628
1640
  }
1629
1641
  } else if (value === CLOSE_FRAGMENT) {
1630
1642
  stack.pop();
1631
- fragmentAttrs = _EMPTY_ARRAY2;
1632
1643
  } else if (value < 0) {
1633
1644
  const numberOfElements = 0 - value;
1634
1645
  stack[stack.length - 1] += numberOfElements;
@@ -1645,7 +1656,7 @@ function vNodeData_createSsrNodeReference(currentComponentNode, vNodeData, depth
1645
1656
  }
1646
1657
  }
1647
1658
  }
1648
- return new SsrNode(currentComponentNode, refId, fragmentAttrs, cleanupQueue, vNodeData);
1659
+ return new SsrNode(currentComponentNode, refId, attributesIndex, cleanupQueue, vNodeData);
1649
1660
  }
1650
1661
  var ALPHANUMERIC = [];
1651
1662
  function encodeAsAlphanumeric(value) {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * @qwik.dev/core/testing 2.0.0-beta.1-dev+495e8d9
3
+ * @qwik.dev/core/testing 2.0.0-beta.2-dev+3ddc6c7
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
@@ -31116,7 +31116,7 @@ async function expectDOM(actual, expected) {
31116
31116
  }
31117
31117
 
31118
31118
  // packages/qwik/src/testing/rendering.unit-util.tsx
31119
- var import_core8 = require("../core.cjs");
31119
+ var import_core7 = require("../core.cjs");
31120
31120
  var import_vitest3 = require("vitest");
31121
31121
 
31122
31122
  // packages/qwik/src/server/platform.ts
@@ -31501,7 +31501,7 @@ var versions = {
31501
31501
  };
31502
31502
 
31503
31503
  // packages/qwik/src/server/ssr-container.ts
31504
- var import_core7 = require("../core.cjs");
31504
+ var import_core6 = require("../core.cjs");
31505
31505
  var import_build15 = require("@qwik.dev/core/build");
31506
31506
 
31507
31507
  // packages/qwik/src/server/scripts.ts
@@ -31517,14 +31517,15 @@ var QWIK_PREFETCH_DEBUG = globalThis.QWIK_PREFETCH_DEBUG;
31517
31517
  var import_core4 = require("../core.cjs");
31518
31518
  var import_build14 = require("@qwik.dev/core/build");
31519
31519
  var SsrNode = class {
31520
- constructor(parentSsrNode, id, attrs, cleanupQueue, vnodeData) {
31521
- this.attrs = attrs;
31520
+ constructor(parentSsrNode, id, attributesIndex, cleanupQueue, vnodeData) {
31521
+ this.attributesIndex = attributesIndex;
31522
31522
  this.cleanupQueue = cleanupQueue;
31523
31523
  this.vnodeData = vnodeData;
31524
31524
  var _a;
31525
31525
  this.parentSsrNode = parentSsrNode;
31526
31526
  (_a = this.parentSsrNode) == null ? void 0 : _a.addChild(this);
31527
31527
  this.id = id;
31528
+ this.attrs = this.attributesIndex >= 0 ? this.vnodeData[this.attributesIndex] : import_core4._EMPTY_ARRAY;
31528
31529
  if (import_build14.isDev && id.indexOf("undefined") != -1) {
31529
31530
  throw new Error(`Invalid SSR node id: ${id}`);
31530
31531
  }
@@ -31538,6 +31539,7 @@ var SsrNode = class {
31538
31539
  id;
31539
31540
  parentSsrNode;
31540
31541
  children = null;
31542
+ attrs;
31541
31543
  /** Local props which don't serialize; */
31542
31544
  localProps = null;
31543
31545
  get [import_core4._EFFECT_BACK_REF]() {
@@ -31545,7 +31547,7 @@ var SsrNode = class {
31545
31547
  }
31546
31548
  setProp(name, value) {
31547
31549
  if (this.attrs === import_core4._EMPTY_ARRAY) {
31548
- this.attrs = [];
31550
+ this.setEmptyArrayAsVNodeDataAttributes();
31549
31551
  }
31550
31552
  if (name.startsWith(NON_SERIALIZABLE_MARKER_PREFIX)) {
31551
31553
  mapArray_set(this.localProps || (this.localProps = []), name, value, 0);
@@ -31556,6 +31558,17 @@ var SsrNode = class {
31556
31558
  this.cleanupQueue.push(value);
31557
31559
  }
31558
31560
  }
31561
+ setEmptyArrayAsVNodeDataAttributes() {
31562
+ if (this.attributesIndex >= 0) {
31563
+ this.vnodeData[this.attributesIndex] = [];
31564
+ this.attrs = this.vnodeData[this.attributesIndex];
31565
+ } else {
31566
+ const newAttributesIndex = this.vnodeData.length > 1 ? 1 : 0;
31567
+ this.vnodeData.splice(newAttributesIndex, 0, []);
31568
+ this.attributesIndex = newAttributesIndex;
31569
+ this.attrs = this.vnodeData[this.attributesIndex];
31570
+ }
31571
+ }
31559
31572
  getProp(name) {
31560
31573
  if (name.startsWith(NON_SERIALIZABLE_MARKER_PREFIX)) {
31561
31574
  return this.localProps ? mapArray_get(this.localProps, name, 0) : null;
@@ -31669,7 +31682,6 @@ var SsrComponentFrame = class {
31669
31682
  };
31670
31683
 
31671
31684
  // packages/qwik/src/server/vnode-data.ts
31672
- var import_core5 = require("../core.cjs");
31673
31685
  var OPEN_FRAGMENT = Number.MAX_SAFE_INTEGER;
31674
31686
  var CLOSE_FRAGMENT = Number.MAX_SAFE_INTEGER - 1;
31675
31687
  var WRITE_ELEMENT_ATTRS = Number.MAX_SAFE_INTEGER - 2;
@@ -31706,12 +31718,12 @@ function vNodeData_openElement(vNodeData) {
31706
31718
  }
31707
31719
  function vNodeData_createSsrNodeReference(currentComponentNode, vNodeData, depthFirstElementIdx, cleanupQueue) {
31708
31720
  vNodeData[0] |= 8 /* REFERENCE */;
31709
- let fragmentAttrs = import_core5._EMPTY_ARRAY;
31710
31721
  const stack2 = [-1];
31722
+ let attributesIndex = -1;
31711
31723
  for (let i = 1; i < vNodeData.length; i++) {
31712
31724
  const value = vNodeData[i];
31713
31725
  if (Array.isArray(value)) {
31714
- fragmentAttrs = value;
31726
+ attributesIndex = i;
31715
31727
  i++;
31716
31728
  if (vNodeData[i] !== WRITE_ELEMENT_ATTRS) {
31717
31729
  stack2[stack2.length - 1]++;
@@ -31719,7 +31731,6 @@ function vNodeData_createSsrNodeReference(currentComponentNode, vNodeData, depth
31719
31731
  }
31720
31732
  } else if (value === CLOSE_FRAGMENT) {
31721
31733
  stack2.pop();
31722
- fragmentAttrs = import_core5._EMPTY_ARRAY;
31723
31734
  } else if (value < 0) {
31724
31735
  const numberOfElements = 0 - value;
31725
31736
  stack2[stack2.length - 1] += numberOfElements;
@@ -31736,7 +31747,7 @@ function vNodeData_createSsrNodeReference(currentComponentNode, vNodeData, depth
31736
31747
  }
31737
31748
  }
31738
31749
  }
31739
- return new SsrNode(currentComponentNode, refId, fragmentAttrs, cleanupQueue, vNodeData);
31750
+ return new SsrNode(currentComponentNode, refId, attributesIndex, cleanupQueue, vNodeData);
31740
31751
  }
31741
31752
  var ALPHANUMERIC = [];
31742
31753
  function encodeAsAlphanumeric(value) {
@@ -31759,7 +31770,7 @@ function encodeAsAlphanumeric(value) {
31759
31770
  }
31760
31771
 
31761
31772
  // packages/qwik/src/server/preload-strategy.ts
31762
- var import_core6 = require("../core.cjs");
31773
+ var import_core5 = require("../core.cjs");
31763
31774
 
31764
31775
  // packages/qwik/src/server/preload-utils.ts
31765
31776
  function flattenPrefetchResources(prefetchResources) {
@@ -31782,7 +31793,7 @@ function flattenPrefetchResources(prefetchResources) {
31782
31793
 
31783
31794
  // packages/qwik/src/server/preload-strategy.ts
31784
31795
  var getBundles = (qrls) => {
31785
- const platform = (0, import_core6.getPlatform)();
31796
+ const platform = (0, import_core5.getPlatform)();
31786
31797
  return qrls == null ? void 0 : qrls.map((qrl) => {
31787
31798
  var _a;
31788
31799
  const symbol = qrl.$symbol$;
@@ -32026,7 +32037,7 @@ var StringBufferWriter = class {
32026
32037
  }
32027
32038
  };
32028
32039
  var EMPTY_OBJ2 = {};
32029
- var SSRContainer = class extends import_core7._SharedContainer {
32040
+ var SSRContainer = class extends import_core6._SharedContainer {
32030
32041
  tag;
32031
32042
  isHtml;
32032
32043
  writer;
@@ -32109,7 +32120,7 @@ var SSRContainer = class extends import_core7._SharedContainer {
32109
32120
  }
32110
32121
  async render(jsx3) {
32111
32122
  this.openContainer();
32112
- await (0, import_core7._walkJSX)(this, jsx3, {
32123
+ await (0, import_core6._walkJSX)(this, jsx3, {
32113
32124
  currentStyleScoped: null,
32114
32125
  parentComponentFrame: this.getComponentFrame()
32115
32126
  });
@@ -32354,7 +32365,7 @@ var SSRContainer = class extends import_core7._SharedContainer {
32354
32365
  }
32355
32366
  for (let i = 0; i < injections.length; i++) {
32356
32367
  const injection = injections[i];
32357
- const jsxNode = (0, import_core7._jsxSplit)(injection.tag, null, injection.attributes || {}, null, 0, null);
32368
+ const jsxNode = (0, import_core6._jsxSplit)(injection.tag, null, injection.attributes || {}, null, 0, null);
32358
32369
  if (injection.location === "head") {
32359
32370
  this.additionalHeadNodes.push(jsxNode);
32360
32371
  } else {
@@ -32374,7 +32385,7 @@ var SSRContainer = class extends import_core7._SharedContainer {
32374
32385
  this.styleIds.add(styleId);
32375
32386
  if (((_a = this.currentElementFrame) == null ? void 0 : _a.elementName) === "html") {
32376
32387
  this.additionalHeadNodes.push(
32377
- (0, import_core7._jsxSorted)(
32388
+ (0, import_core6._jsxSorted)(
32378
32389
  "style",
32379
32390
  null,
32380
32391
  { dangerouslySetInnerHTML: content, [QStyle]: styleId },
@@ -32658,7 +32669,7 @@ var SSRContainer = class extends import_core7._SharedContainer {
32658
32669
  lastNode.vnodeData[0] |= 16 /* SERIALIZE */;
32659
32670
  }
32660
32671
  ssrComponentNode == null ? void 0 : ssrComponentNode.setProp(value, lastNode.id);
32661
- await (0, import_core7._walkJSX)(this, children, {
32672
+ await (0, import_core6._walkJSX)(this, children, {
32662
32673
  currentStyleScoped: scopedStyleId,
32663
32674
  parentComponentFrame: null
32664
32675
  });
@@ -32788,7 +32799,7 @@ var SSRContainer = class extends import_core7._SharedContainer {
32788
32799
  }
32789
32800
  if (key === "ref") {
32790
32801
  const lastNode = this.getOrCreateLastNode();
32791
- if ((0, import_core7.isSignal)(value)) {
32802
+ if ((0, import_core6.isSignal)(value)) {
32792
32803
  value.$untrackedValue$ = new DomRef(lastNode);
32793
32804
  continue;
32794
32805
  } else if (typeof value === "function") {
@@ -32800,9 +32811,9 @@ var SSRContainer = class extends import_core7._SharedContainer {
32800
32811
  throw qError(15 /* invalidRefValue */, [currentFile]);
32801
32812
  }
32802
32813
  }
32803
- if ((0, import_core7.isSignal)(value)) {
32814
+ if ((0, import_core6.isSignal)(value)) {
32804
32815
  const lastNode = this.getOrCreateLastNode();
32805
- const signalData = new import_core7._SubscriptionData({
32816
+ const signalData = new import_core6._SubscriptionData({
32806
32817
  $scopedStyleIdPrefix$: styleScopedId,
32807
32818
  $isConst$: isConst
32808
32819
  });
@@ -33059,10 +33070,10 @@ var Q_FUNCS_PREFIX2 = 'document["qFuncs_HASH"]=';
33059
33070
  var import_jsx_runtime13 = require("@qwik.dev/core/jsx-runtime");
33060
33071
  async function domRender(jsx3, opts = {}) {
33061
33072
  const document2 = createDocument();
33062
- await (0, import_core8.render)(document2.body, jsx3);
33073
+ await (0, import_core7.render)(document2.body, jsx3);
33063
33074
  await getTestPlatform().flush();
33064
33075
  const getStyles = getStylesFactory(document2);
33065
- const container = (0, import_core8._getDomContainer)(document2.body);
33076
+ const container = (0, import_core7._getDomContainer)(document2.body);
33066
33077
  if (opts.debug) {
33067
33078
  console.log("========================================================");
33068
33079
  console.log("------------------------- CSR --------------------------");
@@ -33112,7 +33123,7 @@ async function ssrRenderToDom(jsx3, opts = {}) {
33112
33123
  const document2 = createDocument({ html });
33113
33124
  const containerElement2 = document2.querySelector(QContainerSelector);
33114
33125
  emulateExecutionOfQwikFuncs(document2);
33115
- const container = (0, import_core8._getDomContainer)(containerElement2);
33126
+ const container = (0, import_core7._getDomContainer)(containerElement2);
33116
33127
  await getTestPlatform().flush();
33117
33128
  const getStyles = getStylesFactory(document2);
33118
33129
  if (opts.debug) {
@@ -33208,7 +33219,7 @@ function renderStyles(getStyles) {
33208
33219
  });
33209
33220
  }
33210
33221
  async function rerenderComponent(element, flush) {
33211
- const container = (0, import_core8._getDomContainer)(element);
33222
+ const container = (0, import_core7._getDomContainer)(element);
33212
33223
  const vElement = vnode_locate(container.rootVNode, element);
33213
33224
  const host = getHostVNode(vElement);
33214
33225
  const qrl = container.getHostProp(host, OnRenderProp);
@@ -33228,11 +33239,11 @@ function getHostVNode(vElement) {
33228
33239
  return vElement;
33229
33240
  }
33230
33241
  var ErrorProvider = Object.assign(
33231
- (0, import_core8.componentQrl)(
33242
+ (0, import_core7.componentQrl)(
33232
33243
  inlinedQrl(() => {
33233
33244
  ErrorProvider.error = null;
33234
33245
  useContextProvider(ERROR_CONTEXT, ErrorProvider);
33235
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core8.Slot, {});
33246
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core7.Slot, {});
33236
33247
  }, "s_ErrorProvider")
33237
33248
  ),
33238
33249
  { error: null }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * @qwik.dev/core/testing 2.0.0-beta.1-dev+495e8d9
3
+ * @qwik.dev/core/testing 2.0.0-beta.2-dev+3ddc6c7
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
@@ -31494,8 +31494,8 @@ import {
31494
31494
  } from "../core.mjs";
31495
31495
  import { isDev as isDev10 } from "@qwik.dev/core/build";
31496
31496
  var SsrNode = class {
31497
- constructor(parentSsrNode, id, attrs, cleanupQueue, vnodeData) {
31498
- this.attrs = attrs;
31497
+ constructor(parentSsrNode, id, attributesIndex, cleanupQueue, vnodeData) {
31498
+ this.attributesIndex = attributesIndex;
31499
31499
  this.cleanupQueue = cleanupQueue;
31500
31500
  this.vnodeData = vnodeData;
31501
31501
  __publicField(this, "__brand__", "SsrNode");
@@ -31507,11 +31507,13 @@ var SsrNode = class {
31507
31507
  __publicField(this, "id");
31508
31508
  __publicField(this, "parentSsrNode");
31509
31509
  __publicField(this, "children", null);
31510
+ __publicField(this, "attrs");
31510
31511
  /** Local props which don't serialize; */
31511
31512
  __publicField(this, "localProps", null);
31512
31513
  this.parentSsrNode = parentSsrNode;
31513
31514
  this.parentSsrNode?.addChild(this);
31514
31515
  this.id = id;
31516
+ this.attrs = this.attributesIndex >= 0 ? this.vnodeData[this.attributesIndex] : _EMPTY_ARRAY;
31515
31517
  if (isDev10 && id.indexOf("undefined") != -1) {
31516
31518
  throw new Error(`Invalid SSR node id: ${id}`);
31517
31519
  }
@@ -31521,7 +31523,7 @@ var SsrNode = class {
31521
31523
  }
31522
31524
  setProp(name, value) {
31523
31525
  if (this.attrs === _EMPTY_ARRAY) {
31524
- this.attrs = [];
31526
+ this.setEmptyArrayAsVNodeDataAttributes();
31525
31527
  }
31526
31528
  if (name.startsWith(NON_SERIALIZABLE_MARKER_PREFIX)) {
31527
31529
  mapArray_set(this.localProps || (this.localProps = []), name, value, 0);
@@ -31532,6 +31534,17 @@ var SsrNode = class {
31532
31534
  this.cleanupQueue.push(value);
31533
31535
  }
31534
31536
  }
31537
+ setEmptyArrayAsVNodeDataAttributes() {
31538
+ if (this.attributesIndex >= 0) {
31539
+ this.vnodeData[this.attributesIndex] = [];
31540
+ this.attrs = this.vnodeData[this.attributesIndex];
31541
+ } else {
31542
+ const newAttributesIndex = this.vnodeData.length > 1 ? 1 : 0;
31543
+ this.vnodeData.splice(newAttributesIndex, 0, []);
31544
+ this.attributesIndex = newAttributesIndex;
31545
+ this.attrs = this.vnodeData[this.attributesIndex];
31546
+ }
31547
+ }
31535
31548
  getProp(name) {
31536
31549
  if (name.startsWith(NON_SERIALIZABLE_MARKER_PREFIX)) {
31537
31550
  return this.localProps ? mapArray_get(this.localProps, name, 0) : null;
@@ -31645,7 +31658,6 @@ var SsrComponentFrame = class {
31645
31658
  };
31646
31659
 
31647
31660
  // packages/qwik/src/server/vnode-data.ts
31648
- import { _EMPTY_ARRAY as _EMPTY_ARRAY2 } from "../core.mjs";
31649
31661
  var OPEN_FRAGMENT = Number.MAX_SAFE_INTEGER;
31650
31662
  var CLOSE_FRAGMENT = Number.MAX_SAFE_INTEGER - 1;
31651
31663
  var WRITE_ELEMENT_ATTRS = Number.MAX_SAFE_INTEGER - 2;
@@ -31682,12 +31694,12 @@ function vNodeData_openElement(vNodeData) {
31682
31694
  }
31683
31695
  function vNodeData_createSsrNodeReference(currentComponentNode, vNodeData, depthFirstElementIdx, cleanupQueue) {
31684
31696
  vNodeData[0] |= 8 /* REFERENCE */;
31685
- let fragmentAttrs = _EMPTY_ARRAY2;
31686
31697
  const stack2 = [-1];
31698
+ let attributesIndex = -1;
31687
31699
  for (let i = 1; i < vNodeData.length; i++) {
31688
31700
  const value = vNodeData[i];
31689
31701
  if (Array.isArray(value)) {
31690
- fragmentAttrs = value;
31702
+ attributesIndex = i;
31691
31703
  i++;
31692
31704
  if (vNodeData[i] !== WRITE_ELEMENT_ATTRS) {
31693
31705
  stack2[stack2.length - 1]++;
@@ -31695,7 +31707,6 @@ function vNodeData_createSsrNodeReference(currentComponentNode, vNodeData, depth
31695
31707
  }
31696
31708
  } else if (value === CLOSE_FRAGMENT) {
31697
31709
  stack2.pop();
31698
- fragmentAttrs = _EMPTY_ARRAY2;
31699
31710
  } else if (value < 0) {
31700
31711
  const numberOfElements = 0 - value;
31701
31712
  stack2[stack2.length - 1] += numberOfElements;
@@ -31712,7 +31723,7 @@ function vNodeData_createSsrNodeReference(currentComponentNode, vNodeData, depth
31712
31723
  }
31713
31724
  }
31714
31725
  }
31715
- return new SsrNode(currentComponentNode, refId, fragmentAttrs, cleanupQueue, vNodeData);
31726
+ return new SsrNode(currentComponentNode, refId, attributesIndex, cleanupQueue, vNodeData);
31716
31727
  }
31717
31728
  var ALPHANUMERIC = [];
31718
31729
  function encodeAsAlphanumeric(value) {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qwik.dev/core/testing",
3
- "version": "2.0.0-beta.1-dev+495e8d9",
3
+ "version": "2.0.0-beta.2-dev+3ddc6c7",
4
4
  "main": "index.mjs",
5
5
  "types": "index.d.ts",
6
6
  "private": true,