gyosjs 0.3.1 → 0.3.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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * GyosJS v0.3.1
2
+ * GyosJS v0.3.2
3
3
  * (c) 2026
4
4
  * @license MIT
5
5
  */
@@ -5183,6 +5183,10 @@ function processStructuralDirectives(elements, scope) {
5183
5183
  const structuralElements = [];
5184
5184
  const root = elements[0];
5185
5185
  elements.forEach(el => {
5186
+ // Await branches are detached and parsed only after their alias scope exists.
5187
+ // Do not evaluate nested structural expressions during the parent scan.
5188
+ if (isAwaitBranchDescendant(el))
5189
+ return;
5186
5190
  const hasIf = el.hasAttribute('*if');
5187
5191
  const hasFor = el.hasAttribute('*for');
5188
5192
  const hasSwitch = el.hasAttribute('*switch');
@@ -5227,6 +5231,20 @@ function processStructuralDirectives(elements, scope) {
5227
5231
  }
5228
5232
  });
5229
5233
  }
5234
+ function isAwaitBranchDescendant(element) {
5235
+ let child = element;
5236
+ let parent = element.parentElement;
5237
+ while (parent && parent !== document.body) {
5238
+ if (parent.hasAttribute('*await') && (child.hasAttribute('*pending') ||
5239
+ child.hasAttribute('*then') ||
5240
+ child.hasAttribute('*catch'))) {
5241
+ return true;
5242
+ }
5243
+ child = parent;
5244
+ parent = parent.parentElement;
5245
+ }
5246
+ return false;
5247
+ }
5230
5248
  const elementBelongsToAnotherScope = (el, scope) => {
5231
5249
  const owner = getScopeFromElement(el);
5232
5250
  return Boolean(owner && owner !== scope);
@@ -8523,7 +8541,7 @@ const Gyos = {
8523
8541
  portalCreate,
8524
8542
  portalDestroy,
8525
8543
  setCspNonce,
8526
- version: '0.3.1'
8544
+ version: '0.3.2'
8527
8545
  };
8528
8546
 
8529
8547
  const standardExpressionRuntime = {