@qwik.dev/core 2.0.0-alpha.7 → 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.
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * @qwik.dev/core/testing 2.0.0-alpha.7-dev+a26598a
3
+ * @qwik.dev/core/testing 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
@@ -22439,8 +22439,7 @@ var VirtualTypeName = {
22439
22439
  var OnRenderProp = "q:renderFn";
22440
22440
  var ComponentStylesPrefixContent = "\u26A1\uFE0F";
22441
22441
  var QSlot = "q:slot";
22442
- var QSlotParent = ":";
22443
- var QSlotRef = "q:sref";
22442
+ var QSlotParent = "q:sparent";
22444
22443
  var QSlotS = "q:s";
22445
22444
  var QStyle = "q:style";
22446
22445
  var QStyleSelector = "style[q\\:style]";
@@ -23018,7 +23017,7 @@ var DEBUG = false;
23018
23017
  var log = (...args) => console.log("STORE", ...args.map(qwikDebugToString));
23019
23018
  var STORE_TARGET = Symbol("store.target");
23020
23019
  var STORE_HANDLER = Symbol("store.handler");
23021
- var STORE_ARRAY_PROP = Symbol("store.array");
23020
+ var STORE_ALL_PROPS = Symbol("store.all");
23022
23021
  var getStoreHandler = (value) => {
23023
23022
  return value[STORE_HANDLER];
23024
23023
  };
@@ -23080,7 +23079,12 @@ var StoreHandler = class {
23080
23079
  }
23081
23080
  const effectSubscriber = ctx.$effectSubscriber$;
23082
23081
  if (effectSubscriber) {
23083
- addEffect(target, Array.isArray(target) ? STORE_ARRAY_PROP : prop, this, effectSubscriber);
23082
+ addStoreEffect(
23083
+ target,
23084
+ Array.isArray(target) ? STORE_ALL_PROPS : prop,
23085
+ this,
23086
+ effectSubscriber
23087
+ );
23084
23088
  }
23085
23089
  }
23086
23090
  if (prop === "toString" && value === Object.prototype.toString) {
@@ -23127,9 +23131,9 @@ var StoreHandler = class {
23127
23131
  if (ctx) {
23128
23132
  const effectSubscriber = ctx.$effectSubscriber$;
23129
23133
  if (effectSubscriber) {
23130
- addEffect(
23134
+ addStoreEffect(
23131
23135
  target,
23132
- Array.isArray(target) ? STORE_ARRAY_PROP : prop,
23136
+ Array.isArray(target) ? STORE_ALL_PROPS : prop,
23133
23137
  this,
23134
23138
  effectSubscriber
23135
23139
  );
@@ -23142,7 +23146,7 @@ var StoreHandler = class {
23142
23146
  const ctx = tryGetInvokeContext();
23143
23147
  const effectSubscriber = ctx == null ? void 0 : ctx.$effectSubscriber$;
23144
23148
  if (effectSubscriber) {
23145
- addEffect(target, STORE_ARRAY_PROP, this, effectSubscriber);
23149
+ addStoreEffect(target, STORE_ALL_PROPS, this, effectSubscriber);
23146
23150
  }
23147
23151
  return Reflect.ownKeys(target);
23148
23152
  }
@@ -23160,7 +23164,7 @@ var StoreHandler = class {
23160
23164
  };
23161
23165
  }
23162
23166
  };
23163
- function addEffect(target, prop, store, effectSubscription) {
23167
+ function addStoreEffect(target, prop, store, effectSubscription) {
23164
23168
  var _a;
23165
23169
  const effectsMap = store.$effects$ ||= /* @__PURE__ */ new Map();
23166
23170
  let effects = effectsMap.get(prop);
@@ -23195,7 +23199,7 @@ function getEffects(target, prop, storeEffects) {
23195
23199
  effectsToTrigger = storeEffects.get(prop);
23196
23200
  }
23197
23201
  }
23198
- const storeArrayValue = storeEffects == null ? void 0 : storeEffects.get(STORE_ARRAY_PROP);
23202
+ const storeArrayValue = storeEffects == null ? void 0 : storeEffects.get(STORE_ALL_PROPS);
23199
23203
  if (storeArrayValue) {
23200
23204
  effectsToTrigger ||= /* @__PURE__ */ new Set();
23201
23205
  for (const effect of storeArrayValue) {
@@ -23339,6 +23343,14 @@ var runTask = (task, container, host) => {
23339
23343
  return obj[prop];
23340
23344
  } else if (isSignal(obj)) {
23341
23345
  return obj.value;
23346
+ } else if (isStore(obj)) {
23347
+ addStoreEffect(
23348
+ getStoreTarget(obj),
23349
+ STORE_ALL_PROPS,
23350
+ getStoreHandler(obj),
23351
+ ctx.$effectSubscriber$
23352
+ );
23353
+ return obj;
23342
23354
  } else {
23343
23355
  throw qError(2 /* trackObjectWithoutProp */);
23344
23356
  }
@@ -23408,13 +23420,13 @@ var isTask = (value) => {
23408
23420
  var import_build7 = require("@qwik.dev/core/build");
23409
23421
 
23410
23422
  // packages/qwik/src/core/client/util-mapArray.ts
23411
- var mapApp_findIndx = (elementVNode, key, start) => {
23423
+ var mapApp_findIndx = (array, key, start) => {
23412
23424
  assertTrue(start % 2 === 0, "Expecting even number.");
23413
23425
  let bottom = start >> 1;
23414
- let top = elementVNode.length - 2 >> 1;
23426
+ let top = array.length - 2 >> 1;
23415
23427
  while (bottom <= top) {
23416
23428
  const mid = bottom + (top - bottom >> 1);
23417
- const midKey = elementVNode[mid << 1];
23429
+ const midKey = array[mid << 1];
23418
23430
  if (midKey === key) {
23419
23431
  return mid << 1;
23420
23432
  }
@@ -23426,36 +23438,39 @@ var mapApp_findIndx = (elementVNode, key, start) => {
23426
23438
  }
23427
23439
  return bottom << 1 ^ -1;
23428
23440
  };
23429
- var mapArray_set = (elementVNode, key, value, start) => {
23430
- const indx = mapApp_findIndx(elementVNode, key, start);
23441
+ var mapArray_set = (array, key, value, start) => {
23442
+ const indx = mapApp_findIndx(array, key, start);
23431
23443
  if (indx >= 0) {
23432
23444
  if (value == null) {
23433
- elementVNode.splice(indx, 2);
23445
+ array.splice(indx, 2);
23434
23446
  } else {
23435
- elementVNode[indx + 1] = value;
23447
+ array[indx + 1] = value;
23436
23448
  }
23437
23449
  } else if (value != null) {
23438
- elementVNode.splice(indx ^ -1, 0, key, value);
23450
+ array.splice(indx ^ -1, 0, key, value);
23439
23451
  }
23440
23452
  };
23441
- var mapApp_remove = (elementVNode, key, start) => {
23442
- const indx = mapApp_findIndx(elementVNode, key, start);
23453
+ var mapApp_remove = (array, key, start) => {
23454
+ const indx = mapApp_findIndx(array, key, start);
23443
23455
  let value = null;
23444
23456
  if (indx >= 0) {
23445
- value = elementVNode[indx + 1];
23446
- elementVNode.splice(indx, 2);
23457
+ value = array[indx + 1];
23458
+ array.splice(indx, 2);
23447
23459
  return value;
23448
23460
  }
23449
23461
  return value;
23450
23462
  };
23451
- var mapArray_get = (elementVNode, key, start) => {
23452
- const indx = mapApp_findIndx(elementVNode, key, start);
23463
+ var mapArray_get = (array, key, start) => {
23464
+ const indx = mapApp_findIndx(array, key, start);
23453
23465
  if (indx >= 0) {
23454
- return elementVNode[indx + 1];
23466
+ return array[indx + 1];
23455
23467
  } else {
23456
23468
  return null;
23457
23469
  }
23458
23470
  };
23471
+ var mapArray_has = (array, key, start) => {
23472
+ return mapApp_findIndx(array, key, start) >= 0;
23473
+ };
23459
23474
 
23460
23475
  // packages/qwik/src/core/client/vnode-namespace.ts
23461
23476
  var import_build5 = require("@qwik.dev/core/build");
@@ -23807,9 +23822,6 @@ var _IMMUTABLE = Symbol("IMMUTABLE");
23807
23822
  function isSlotProp(prop) {
23808
23823
  return !prop.startsWith("q:") && !prop.startsWith(NON_SERIALIZABLE_MARKER_PREFIX);
23809
23824
  }
23810
- function isParentSlotProp(prop) {
23811
- return prop.startsWith(QSlotParent);
23812
- }
23813
23825
 
23814
23826
  // packages/qwik/src/core/shared/utils/character-escaping.ts
23815
23827
  function escapeHTML(html) {
@@ -24078,6 +24090,7 @@ var vnode_diff = (container, jsxNode, vStartNode, scopedStyleIdPrefix) => {
24078
24090
  slotName,
24079
24091
  (id) => vnode_locate(container.rootVNode, id)
24080
24092
  );
24093
+ vCurrent = vCurrent && vCurrent[0 /* flags */] & 32 /* Deleted */ ? null : vCurrent;
24081
24094
  if (vCurrent == null) {
24082
24095
  vNewNode = vnode_newVirtual();
24083
24096
  import_build7.isDev && vnode_setProp(vNewNode, DEBUG_TYPE, "P" /* Projection */);
@@ -24112,6 +24125,11 @@ var vnode_diff = (container, jsxNode, vStartNode, scopedStyleIdPrefix) => {
24112
24125
  return false;
24113
24126
  } else if (vProjectedNode === vCurrent) {
24114
24127
  } else {
24128
+ const parent = vnode_getParent(vProjectedNode);
24129
+ const isAlreadyProjected = !!parent && !(vnode_isElementVNode(parent) && vnode_getElementName(parent) === QTemplate);
24130
+ if (isAlreadyProjected && vParent !== parent) {
24131
+ vnode_remove(journal, parent, vProjectedNode, false);
24132
+ }
24115
24133
  vnode_insertBefore(
24116
24134
  journal,
24117
24135
  vParent,
@@ -24167,8 +24185,8 @@ var vnode_diff = (container, jsxNode, vStartNode, scopedStyleIdPrefix) => {
24167
24185
  while (vCurrent) {
24168
24186
  const toRemove = vCurrent;
24169
24187
  advanceToNextSibling();
24170
- cleanup(container, toRemove);
24171
24188
  if (vParent === vnode_getParent(toRemove)) {
24189
+ cleanup(container, toRemove);
24172
24190
  vnode_remove(journal, vParent, toRemove, true);
24173
24191
  }
24174
24192
  }
@@ -24533,10 +24551,8 @@ var vnode_diff = (container, jsxNode, vStartNode, scopedStyleIdPrefix) => {
24533
24551
  shouldRender = true;
24534
24552
  } else if (!hashesAreEqual) {
24535
24553
  insertNewComponent(host, componentQRL, jsxProps);
24536
- if (vNewNode) {
24537
- host = vNewNode;
24538
- shouldRender = true;
24539
- }
24554
+ host = vNewNode;
24555
+ shouldRender = true;
24540
24556
  }
24541
24557
  if (host) {
24542
24558
  const vNodeProps = vnode_getProp(host, ELEMENT_PROPS, container.$getObjectById$);
@@ -24551,6 +24567,7 @@ var vnode_diff = (container, jsxNode, vStartNode, scopedStyleIdPrefix) => {
24551
24567
  const lookupKey = jsxNode2.key;
24552
24568
  const vNodeLookupKey = getKey(host);
24553
24569
  const lookupKeysAreEqual = lookupKey === vNodeLookupKey;
24570
+ const vNodeComponentHash = getComponentHash(host, container.$getObjectById$);
24554
24571
  if (!lookupKeysAreEqual) {
24555
24572
  vNewNode = retrieveChildWithKey(null, lookupKey);
24556
24573
  if (vNewNode) {
@@ -24559,6 +24576,9 @@ var vnode_diff = (container, jsxNode, vStartNode, scopedStyleIdPrefix) => {
24559
24576
  insertNewInlineComponent();
24560
24577
  }
24561
24578
  host = vNewNode;
24579
+ } else if (vNodeComponentHash != null) {
24580
+ insertNewInlineComponent();
24581
+ host = vNewNode;
24562
24582
  }
24563
24583
  if (host) {
24564
24584
  let componentHost = host;
@@ -24673,6 +24693,7 @@ function removePropsKeys(keys, propKeys) {
24673
24693
  function cleanup(container, vNode) {
24674
24694
  let vCursor = vNode;
24675
24695
  if (vnode_isTextVNode(vNode)) {
24696
+ markVNodeAsDeleted(vCursor);
24676
24697
  return;
24677
24698
  }
24678
24699
  let vParent = null;
@@ -24703,7 +24724,7 @@ function cleanup(container, vNode) {
24703
24724
  const attrs = vnode_getProps(vCursor);
24704
24725
  for (let i = 0; i < attrs.length; i = i + 2) {
24705
24726
  const key = attrs[i];
24706
- if (!isParentSlotProp(key) && isSlotProp(key)) {
24727
+ if (isSlotProp(key)) {
24707
24728
  const value = attrs[i + 1];
24708
24729
  if (value) {
24709
24730
  attrs[i + 1] = null;
@@ -24718,7 +24739,7 @@ function cleanup(container, vNode) {
24718
24739
  }
24719
24740
  }
24720
24741
  }
24721
- const isProjection = type & 2 /* Virtual */ && vnode_getProp(vCursor, QSlot, null) !== null;
24742
+ const isProjection = vnode_isProjection(vCursor);
24722
24743
  if (!isProjection) {
24723
24744
  const vFirstChild = vnode_getFirstChild(vCursor);
24724
24745
  if (vFirstChild) {
@@ -24732,6 +24753,8 @@ function cleanup(container, vNode) {
24732
24753
  return;
24733
24754
  }
24734
24755
  }
24756
+ } else if (type & 4 /* Text */) {
24757
+ markVNodeAsDeleted(vCursor);
24735
24758
  }
24736
24759
  if (vCursor === vNode) {
24737
24760
  return;
@@ -25447,7 +25470,7 @@ var Signal = class {
25447
25470
  }
25448
25471
  }
25449
25472
  toString() {
25450
- return `[${this.constructor.name}${this.$invalid$ ? " INVALID" : ""} ${String(this.$untrackedValue$)}]` + (Array.from(this.$effects$ || []).map((e) => "\n -> " + pad(qwikDebugToString(e[0]), " ")).join("\n") || "");
25473
+ return `[${this.constructor.name}${this.$flags$ & 1 /* INVALID */ ? " INVALID" : ""} ${String(this.$untrackedValue$)}]` + (Array.from(this.$effects$ || []).map((e) => "\n -> " + pad(qwikDebugToString(e[0]), " ")).join("\n") || "");
25451
25474
  }
25452
25475
  toJSON() {
25453
25476
  return { value: this.$untrackedValue$ };
@@ -25537,17 +25560,17 @@ var ComputedSignal = class extends Signal {
25537
25560
  * resolve the QRL during the mark dirty phase so that any call to it will be synchronous). )
25538
25561
  */
25539
25562
  $computeQrl$;
25540
- // We need a separate flag to know when the computation needs running because
25541
- // we need the old value to know if effects need running after computation
25542
- $invalid$ = true;
25563
+ $flags$;
25543
25564
  $forceRunEffects$ = false;
25544
- constructor(container, fn) {
25565
+ [_EFFECT_BACK_REF] = null;
25566
+ constructor(container, fn, flags = 1 /* INVALID */) {
25545
25567
  super(container, NEEDS_COMPUTATION);
25546
25568
  this.$computeQrl$ = fn;
25569
+ this.$flags$ = flags;
25547
25570
  }
25548
25571
  $invalidate$() {
25549
25572
  var _a;
25550
- this.$invalid$ = true;
25573
+ this.$flags$ |= 1 /* INVALID */;
25551
25574
  this.$forceRunEffects$ = false;
25552
25575
  (_a = this.$container$) == null ? void 0 : _a.$scheduler$(7 /* RECOMPUTE_AND_SCHEDULE_EFFECTS */, null, this);
25553
25576
  }
@@ -25556,7 +25579,7 @@ var ComputedSignal = class extends Signal {
25556
25579
  * remained the same object
25557
25580
  */
25558
25581
  force() {
25559
- this.$invalid$ = true;
25582
+ this.$flags$ |= 1 /* INVALID */;
25560
25583
  this.$forceRunEffects$ = false;
25561
25584
  triggerEffects(this.$container$, this, this.$effects$);
25562
25585
  }
@@ -25569,7 +25592,7 @@ var ComputedSignal = class extends Signal {
25569
25592
  return this.$untrackedValue$;
25570
25593
  }
25571
25594
  $computeIfNeeded$() {
25572
- if (!this.$invalid$) {
25595
+ if (!(this.$flags$ & 1 /* INVALID */)) {
25573
25596
  return false;
25574
25597
  }
25575
25598
  const computeQrl = this.$computeQrl$;
@@ -25586,7 +25609,7 @@ var ComputedSignal = class extends Signal {
25586
25609
  ]);
25587
25610
  }
25588
25611
  DEBUG3 && log2("Signal.$compute$", untrackedValue);
25589
- this.$invalid$ = false;
25612
+ this.$flags$ &= ~1 /* INVALID */;
25590
25613
  const didChange = untrackedValue !== this.$untrackedValue$;
25591
25614
  if (didChange) {
25592
25615
  this.$untrackedValue$ = untrackedValue;
@@ -25610,21 +25633,20 @@ var WrappedSignal = class extends Signal {
25610
25633
  $args$;
25611
25634
  $func$;
25612
25635
  $funcStr$;
25613
- // We need a separate flag to know when the computation needs running because
25614
- // we need the old value to know if effects need running after computation
25615
- $invalid$ = true;
25636
+ $flags$;
25616
25637
  $hostElement$ = null;
25617
25638
  $forceRunEffects$ = false;
25618
25639
  [_EFFECT_BACK_REF] = null;
25619
- constructor(container, fn, args, fnStr) {
25640
+ constructor(container, fn, args, fnStr, flags = 1 /* INVALID */ | 2 /* UNWRAP */) {
25620
25641
  super(container, NEEDS_COMPUTATION);
25621
25642
  this.$args$ = args;
25622
25643
  this.$func$ = fn;
25623
25644
  this.$funcStr$ = fnStr;
25645
+ this.$flags$ = flags;
25624
25646
  }
25625
25647
  $invalidate$() {
25626
25648
  var _a;
25627
- this.$invalid$ = true;
25649
+ this.$flags$ |= 1 /* INVALID */;
25628
25650
  this.$forceRunEffects$ = false;
25629
25651
  (_a = this.$container$) == null ? void 0 : _a.$scheduler$(
25630
25652
  7 /* RECOMPUTE_AND_SCHEDULE_EFFECTS */,
@@ -25637,7 +25659,7 @@ var WrappedSignal = class extends Signal {
25637
25659
  * remained the same object
25638
25660
  */
25639
25661
  force() {
25640
- this.$invalid$ = true;
25662
+ this.$flags$ |= 1 /* INVALID */;
25641
25663
  this.$forceRunEffects$ = false;
25642
25664
  triggerEffects(this.$container$, this, this.$effects$);
25643
25665
  }
@@ -25650,7 +25672,7 @@ var WrappedSignal = class extends Signal {
25650
25672
  return this.$untrackedValue$;
25651
25673
  }
25652
25674
  $computeIfNeeded$() {
25653
- if (!this.$invalid$) {
25675
+ if (!(this.$flags$ & 1 /* INVALID */)) {
25654
25676
  return false;
25655
25677
  }
25656
25678
  const untrackedValue = trackSignal(
@@ -25832,7 +25854,7 @@ var PropsProxyHandler = class {
25832
25854
  return this.$children$;
25833
25855
  }
25834
25856
  const value = this.$constProps$ && prop in this.$constProps$ ? this.$constProps$[prop] : this.$varProps$[prop];
25835
- return value instanceof WrappedSignal ? value.value : value;
25857
+ return value instanceof WrappedSignal && value.$flags$ & 2 /* UNWRAP */ ? value.value : value;
25836
25858
  }
25837
25859
  set(_, prop, value) {
25838
25860
  if (prop === _CONST_PROPS) {
@@ -26185,13 +26207,13 @@ var VNodeDataChar = {
26185
26207
  /* ****** */
26186
26208
  ">"
26187
26209
  ),
26188
- SLOT_REF: (
26189
- /* *********** */
26210
+ SLOT_PARENT: (
26211
+ /* ******** */
26190
26212
  63
26191
26213
  ),
26192
- // `?` - `q:sref` - Slot reference.
26193
- SLOT_REF_CHAR: (
26194
- /* *** */
26214
+ // `?` - `q:sparent` - Slot parent.
26215
+ SLOT_PARENT_CHAR: (
26216
+ /* */
26195
26217
  "?"
26196
26218
  ),
26197
26219
  KEY: (
@@ -26395,6 +26417,11 @@ var vnode_isVirtualVNode = (vNode) => {
26395
26417
  const flag = vNode[0 /* flags */];
26396
26418
  return (flag & 2 /* Virtual */) === 2 /* Virtual */;
26397
26419
  };
26420
+ var vnode_isProjection = (vNode) => {
26421
+ assertDefined(vNode, "Missing vNode");
26422
+ const flag = vNode[0 /* flags */];
26423
+ return (flag & 2 /* Virtual */) === 2 /* Virtual */ && vnode_getProp(vNode, QSlot, null) !== null;
26424
+ };
26398
26425
  var ensureTextVNode = (vNode) => {
26399
26426
  assertTrue(vnode_isTextVNode(vNode), "Expecting TextVNode was: " + vnode_getNodeTypeName(vNode));
26400
26427
  return vNode;
@@ -26460,7 +26487,9 @@ function vnode_walkVNode(vNode, callback) {
26460
26487
  }
26461
26488
  let vParent = null;
26462
26489
  do {
26463
- callback == null ? void 0 : callback(vCursor, vParent);
26490
+ if (callback == null ? void 0 : callback(vCursor, vParent)) {
26491
+ return;
26492
+ }
26464
26493
  const vFirstChild = vnode_getFirstChild(vCursor);
26465
26494
  if (vFirstChild) {
26466
26495
  vCursor = vFirstChild;
@@ -26737,7 +26766,7 @@ var vnode_applyJournal = (journal) => {
26737
26766
  if (isBooleanAttr(element, key)) {
26738
26767
  element[key] = parseBoolean(value);
26739
26768
  } else if (key === "value" && key in element) {
26740
- element.value = escapeHTML(String(value));
26769
+ element.value = String(value);
26741
26770
  } else if (key === dangerouslySetInnerHTML) {
26742
26771
  element.innerHTML = value;
26743
26772
  } else {
@@ -27417,8 +27446,6 @@ function materializeFromVNodeData(vParent, vData, element, child) {
27417
27446
  import_build8.isDev && vnode_setAttr(null, vParent, ELEMENT_ID, id);
27418
27447
  } else if (peek() === VNodeDataChar.PROPS) {
27419
27448
  vnode_setAttr(null, vParent, ELEMENT_PROPS, consumeValue());
27420
- } else if (peek() === VNodeDataChar.SLOT_REF) {
27421
- vnode_setAttr(null, vParent, QSlotRef, consumeValue());
27422
27449
  } else if (peek() === VNodeDataChar.KEY) {
27423
27450
  vnode_setAttr(null, vParent, ELEMENT_KEY, consumeValue());
27424
27451
  } else if (peek() === VNodeDataChar.SEQ) {
@@ -27430,6 +27457,8 @@ function materializeFromVNodeData(vParent, vData, element, child) {
27430
27457
  container = getDomContainer(element);
27431
27458
  }
27432
27459
  setEffectBackRefFromVNodeData(vParent, consumeValue(), container);
27460
+ } else if (peek() === VNodeDataChar.SLOT_PARENT) {
27461
+ vnode_setProp(vParent, QSlotParent, consumeValue());
27433
27462
  } else if (peek() === VNodeDataChar.CONTEXT) {
27434
27463
  vnode_setAttr(null, vParent, QCtxAttr, consumeValue());
27435
27464
  } else if (peek() === VNodeDataChar.OPEN) {
@@ -27988,7 +28017,7 @@ var DomContainer = class extends _SharedContainer {
27988
28017
  () => this.scheduleRender(),
27989
28018
  () => vnode_applyJournal(this.$journal$),
27990
28019
  {},
27991
- element.getAttribute("q:locale")
28020
+ element.getAttribute(QLocaleAttr)
27992
28021
  );
27993
28022
  this.qContainer = element.getAttribute(QContainerAttr);
27994
28023
  if (!this.qContainer) {
@@ -28370,8 +28399,9 @@ var inflate = (container, target, typeId, data) => {
28370
28399
  signal.$args$ = d[1];
28371
28400
  signal[_EFFECT_BACK_REF] = d[2];
28372
28401
  signal.$untrackedValue$ = d[3];
28373
- signal.$hostElement$ = d[4];
28374
- signal.$effects$ = new Set(d.slice(5));
28402
+ signal.$flags$ = d[4];
28403
+ signal.$hostElement$ = d[5];
28404
+ signal.$effects$ = new Set(d.slice(6));
28375
28405
  break;
28376
28406
  }
28377
28407
  case 24 /* ComputedSignal */: {
@@ -28382,7 +28412,7 @@ var inflate = (container, target, typeId, data) => {
28382
28412
  if (d.length === 3) {
28383
28413
  computed.$untrackedValue$ = d[2];
28384
28414
  } else {
28385
- computed.$invalid$ = true;
28415
+ computed.$flags$ |= 1 /* INVALID */;
28386
28416
  computed.$computeQrl$.resolve();
28387
28417
  (_a = container.$scheduler$) == null ? void 0 : _a.call(
28388
28418
  container,
@@ -28486,7 +28516,7 @@ var _constants = [
28486
28516
  EMPTY_ARRAY,
28487
28517
  EMPTY_OBJ,
28488
28518
  NEEDS_COMPUTATION,
28489
- STORE_ARRAY_PROP,
28519
+ STORE_ALL_PROPS,
28490
28520
  Slot,
28491
28521
  Fragment,
28492
28522
  NaN,
@@ -28505,7 +28535,7 @@ var _constantNames = [
28505
28535
  "EMPTY_ARRAY",
28506
28536
  "EMPTY_OBJ",
28507
28537
  "NEEDS_COMPUTATION",
28508
- "STORE_ARRAY_PROP",
28538
+ "STORE_ALL_PROPS",
28509
28539
  "Slot",
28510
28540
  "Fragment",
28511
28541
  "NaN",
@@ -28758,12 +28788,12 @@ var createSerializationContext = (NodeConstructor, DomRefConstructor, symbolToCh
28758
28788
  discoveredValues.push(k, v);
28759
28789
  });
28760
28790
  } else if (obj instanceof Signal) {
28761
- const v = obj instanceof WrappedSignal ? obj.untrackedValue : obj instanceof ComputedSignal && (obj.$invalid$ || fastSkipSerialize(obj)) ? NEEDS_COMPUTATION : obj.$untrackedValue$;
28791
+ const v = obj instanceof WrappedSignal ? obj.untrackedValue : obj instanceof ComputedSignal && (obj.$flags$ & 1 /* INVALID */ || fastSkipSerialize(obj)) ? NEEDS_COMPUTATION : obj.$untrackedValue$;
28762
28792
  if (v !== NEEDS_COMPUTATION) {
28763
28793
  discoveredValues.push(v);
28764
28794
  }
28765
28795
  if (obj.$effects$) {
28766
- discoveredValues.push(...obj.$effects$);
28796
+ discoveredValues.push(obj.$effects$);
28767
28797
  }
28768
28798
  if (obj instanceof WrappedSignal) {
28769
28799
  discoverEffectBackRefs(obj[_EFFECT_BACK_REF], discoveredValues);
@@ -28774,6 +28804,7 @@ var createSerializationContext = (NodeConstructor, DomRefConstructor, symbolToCh
28774
28804
  discoveredValues.push(obj.$hostElement$);
28775
28805
  }
28776
28806
  } else if (obj instanceof ComputedSignal) {
28807
+ discoverEffectBackRefs(obj[_EFFECT_BACK_REF], discoveredValues);
28777
28808
  discoveredValues.push(obj.$computeQrl$);
28778
28809
  }
28779
28810
  } else if (obj instanceof Task) {
@@ -28856,17 +28887,7 @@ var discoverValuesForVNodeData = (vnodeData, discoveredValues) => {
28856
28887
  };
28857
28888
  var discoverEffectBackRefs = (effectsBackRefs, discoveredValues) => {
28858
28889
  if (effectsBackRefs) {
28859
- let hasBackRefs = false;
28860
- for (const [, effect] of effectsBackRefs) {
28861
- const backRefs = effect[2 /* BACK_REF */];
28862
- if (backRefs) {
28863
- hasBackRefs = true;
28864
- break;
28865
- }
28866
- }
28867
- if (hasBackRefs) {
28868
- discoveredValues.push(effectsBackRefs);
28869
- }
28890
+ discoveredValues.push(effectsBackRefs);
28870
28891
  }
28871
28892
  };
28872
28893
  var promiseResults = /* @__PURE__ */ new WeakMap();
@@ -28978,8 +28999,8 @@ function serialize(serializationContext) {
28978
28999
  output(1 /* Constant */, 0 /* Undefined */);
28979
29000
  } else if (value === NEEDS_COMPUTATION) {
28980
29001
  output(1 /* Constant */, 7 /* NEEDS_COMPUTATION */);
28981
- } else if (value === STORE_ARRAY_PROP) {
28982
- output(1 /* Constant */, 8 /* STORE_ARRAY_PROP */);
29002
+ } else if (value === STORE_ALL_PROPS) {
29003
+ output(1 /* Constant */, 8 /* STORE_ALL_PROPS */);
28983
29004
  } else {
28984
29005
  throw qError(37 /* serializeErrorUnknownType */, [typeof value]);
28985
29006
  }
@@ -29045,12 +29066,13 @@ function serialize(serializationContext) {
29045
29066
  value.$ssrNode$.vnodeData[0] |= 16 /* SERIALIZE */;
29046
29067
  output(9 /* RefVNode */, value.$ssrNode$.id);
29047
29068
  } else if (value instanceof Signal) {
29048
- const v = value instanceof ComputedSignal && (value.$invalid$ || fastSkipSerialize(value.$untrackedValue$)) ? NEEDS_COMPUTATION : value.$untrackedValue$;
29069
+ const v = value instanceof ComputedSignal && (value.$flags$ & 1 /* INVALID */ || fastSkipSerialize(value.$untrackedValue$)) ? NEEDS_COMPUTATION : value.$untrackedValue$;
29049
29070
  if (value instanceof WrappedSignal) {
29050
29071
  output(23 /* WrappedSignal */, [
29051
29072
  ...serializeWrappingFn(serializationContext, value),
29052
29073
  filterEffectBackRefs(value[_EFFECT_BACK_REF]),
29053
29074
  v,
29075
+ value.$flags$,
29054
29076
  value.$hostElement$,
29055
29077
  ...value.$effects$ || []
29056
29078
  ]);
@@ -31145,14 +31167,12 @@ var SsrComponentFrame = class {
31145
31167
  return QDefaultSlot;
31146
31168
  }
31147
31169
  hasSlot(slotName) {
31148
- return mapArray_get(this.slots, slotName, 0) !== null;
31170
+ return mapArray_has(this.slots, slotName, 0);
31149
31171
  }
31150
31172
  consumeChildrenForSlot(projectionNode, slotName) {
31151
31173
  const children = mapApp_remove(this.slots, slotName, 0);
31152
- if (children !== null) {
31153
- this.componentNode.setProp(slotName, projectionNode.id);
31154
- projectionNode.setProp(QSlotParent, this.componentNode.id);
31155
- }
31174
+ this.componentNode.setProp(slotName, projectionNode.id);
31175
+ projectionNode.setProp(QSlotParent, this.componentNode.id);
31156
31176
  return children;
31157
31177
  }
31158
31178
  releaseUnclaimedProjections(unclaimedProjections) {
@@ -32057,9 +32077,6 @@ var SSRContainer = class extends import_core6._SharedContainer {
32057
32077
  case ELEMENT_PROPS:
32058
32078
  write(VNodeDataChar.PROPS_CHAR);
32059
32079
  break;
32060
- case QSlotRef:
32061
- write(VNodeDataChar.SLOT_REF_CHAR);
32062
- break;
32063
32080
  case ELEMENT_KEY:
32064
32081
  write(VNodeDataChar.KEY_CHAR);
32065
32082
  break;
@@ -32072,6 +32089,9 @@ var SSRContainer = class extends import_core6._SharedContainer {
32072
32089
  case QBackRefs:
32073
32090
  write(VNodeDataChar.BACK_REFS_CHAR);
32074
32091
  break;
32092
+ case QSlotParent:
32093
+ write(VNodeDataChar.SLOT_PARENT_CHAR);
32094
+ break;
32075
32095
  // Skipping `\` character for now because it is used for escaping.
32076
32096
  case QCtxAttr:
32077
32097
  write(VNodeDataChar.CONTEXT_CHAR);