rip-lang 3.13.21 → 3.13.23

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/README.md CHANGED
@@ -9,7 +9,7 @@
9
9
  </p>
10
10
 
11
11
  <p align="center">
12
- <a href="CHANGELOG.md"><img src="https://img.shields.io/badge/version-3.13.21-blue.svg" alt="Version"></a>
12
+ <a href="CHANGELOG.md"><img src="https://img.shields.io/badge/version-3.13.23-blue.svg" alt="Version"></a>
13
13
  <a href="#zero-dependencies"><img src="https://img.shields.io/badge/dependencies-ZERO-brightgreen.svg" alt="Dependencies"></a>
14
14
  <a href="#"><img src="https://img.shields.io/badge/tests-1%2C265%2F1%2C265-brightgreen.svg" alt="Tests"></a>
15
15
  <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-green.svg" alt="License"></a>
package/docs/dist/rip.js CHANGED
@@ -3713,7 +3713,20 @@ Expecting ${expected.join(", ")}, got '${this.tokenNames[symbol] || symbol}'`;
3713
3713
  return 2;
3714
3714
  }
3715
3715
  }
3716
- if (nextToken && nextToken[0] === "INDENT" && !nextToken.fromThen) {
3716
+ if (nextToken && nextToken[0] === "INDENT") {
3717
+ if (nextToken.fromThen) {
3718
+ let depth = 0;
3719
+ for (let j = i;j >= 0; j--) {
3720
+ let jt = tokens[j][0];
3721
+ if (jt === "INTERPOLATION_END" || jt === "STRING_END")
3722
+ depth++;
3723
+ if (jt === "INTERPOLATION_START" || jt === "STRING_START")
3724
+ depth--;
3725
+ if (depth < 0) {
3726
+ return 1;
3727
+ }
3728
+ }
3729
+ }
3717
3730
  if (tag === "->" || tag === "=>" || tag === "CALL_START" || tag === "(") {
3718
3731
  return 1;
3719
3732
  }
@@ -4545,6 +4558,8 @@ ${blockFactoriesCode}return ${lines.join(`
4545
4558
  const savedSetupLines = this._setupLines;
4546
4559
  this._createLines = [];
4547
4560
  this._setupLines = [];
4561
+ const outerLoopParams = this._loopVarStack.map((v) => `${v.itemVar}, ${v.indexVar}`).join(", ");
4562
+ const outerExtra = outerLoopParams ? `, ${outerLoopParams}` : "";
4548
4563
  this._loopVarStack.push({ itemVar, indexVar });
4549
4564
  const itemNode = this.generateTemplateBlock(body);
4550
4565
  this._loopVarStack.pop();
@@ -4554,7 +4569,7 @@ ${blockFactoriesCode}return ${lines.join(`
4554
4569
  this._setupLines = savedSetupLines;
4555
4570
  const localizeVar = (line) => this.localizeVar(line);
4556
4571
  const factoryLines = [];
4557
- factoryLines.push(`function ${blockName}(ctx, ${itemVar}, ${indexVar}) {`);
4572
+ factoryLines.push(`function ${blockName}(ctx, ${itemVar}, ${indexVar}${outerExtra}) {`);
4558
4573
  const localVars = new Set;
4559
4574
  for (const line of itemCreateLines) {
4560
4575
  const match = line.match(/^this\.(_(?:el|t|anchor|frag|slot|c|inst|empty)\d+)\s*=/);
@@ -4584,7 +4599,7 @@ ${blockFactoriesCode}return ${lines.join(`
4584
4599
  factoryLines.push(` if (target) target.insertBefore(${localizeVar(itemNode)}, anchor);`);
4585
4600
  }
4586
4601
  factoryLines.push(` },`);
4587
- factoryLines.push(` p(ctx, ${itemVar}, ${indexVar}) {`);
4602
+ factoryLines.push(` p(ctx, ${itemVar}, ${indexVar}${outerExtra}) {`);
4588
4603
  if (hasEffects) {
4589
4604
  factoryLines.push(` disposers.forEach(d => d());`);
4590
4605
  factoryLines.push(` disposers = [];`);
@@ -4626,11 +4641,11 @@ ${blockFactoriesCode}return ${lines.join(`
4626
4641
  setupLines.push(` const __key = ${keyExpr};`);
4627
4642
  setupLines.push(` let __block = __map.get(__key);`);
4628
4643
  setupLines.push(` if (!__block) {`);
4629
- setupLines.push(` __block = ${blockName}(this, ${itemVar}, ${indexVar});`);
4644
+ setupLines.push(` __block = ${blockName}(this, ${itemVar}, ${indexVar}${outerExtra});`);
4630
4645
  setupLines.push(` __block.c();`);
4631
4646
  setupLines.push(` }`);
4632
4647
  setupLines.push(` __block.m(__parent, __anchor);`);
4633
- setupLines.push(` __block.p(this, ${itemVar}, ${indexVar});`);
4648
+ setupLines.push(` __block.p(this, ${itemVar}, ${indexVar}${outerExtra});`);
4634
4649
  setupLines.push(` __newMap.set(__key, __block);`);
4635
4650
  setupLines.push(` }`);
4636
4651
  setupLines.push(``);
@@ -8359,8 +8374,8 @@ globalThis.zip ??= (...a) => a[0].map((_, i) => a.map(b => b[i]));
8359
8374
  return new CodeGenerator({}).getComponentRuntime();
8360
8375
  }
8361
8376
  // src/browser.js
8362
- var VERSION = "3.13.21";
8363
- var BUILD_DATE = "2026-02-25@12:40:03GMT";
8377
+ var VERSION = "3.13.23";
8378
+ var BUILD_DATE = "2026-02-25@12:51:51GMT";
8364
8379
  if (typeof globalThis !== "undefined") {
8365
8380
  if (!globalThis.__rip)
8366
8381
  new Function(getReactiveRuntime())();