rip-lang 3.13.65 → 3.13.67

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.
Files changed (49) hide show
  1. package/README.md +1 -1
  2. package/docs/dist/rip.js +28 -8
  3. package/docs/dist/rip.min.js +16 -16
  4. package/docs/dist/rip.min.js.br +0 -0
  5. package/docs/index.html +4 -0
  6. package/docs/ui/accordion.rip +113 -0
  7. package/docs/ui/autocomplete.rip +141 -0
  8. package/docs/ui/avatar.rip +37 -0
  9. package/docs/ui/button.rip +23 -0
  10. package/docs/ui/checkbox-group.rip +65 -0
  11. package/docs/ui/checkbox.rip +33 -0
  12. package/docs/ui/combobox.rip +155 -0
  13. package/docs/ui/context-menu.rip +105 -0
  14. package/docs/ui/date-picker.rip +214 -0
  15. package/docs/ui/dialog.rip +107 -0
  16. package/docs/ui/drawer.rip +79 -0
  17. package/docs/ui/editable-value.rip +80 -0
  18. package/docs/ui/field.rip +53 -0
  19. package/docs/ui/fieldset.rip +22 -0
  20. package/docs/ui/form.rip +39 -0
  21. package/docs/ui/grid.rip +901 -0
  22. package/docs/ui/index.css +1379 -0
  23. package/docs/ui/index.html +2097 -0
  24. package/docs/ui/input.rip +36 -0
  25. package/docs/ui/menu.rip +162 -0
  26. package/docs/ui/menubar.rip +155 -0
  27. package/docs/ui/meter.rip +36 -0
  28. package/docs/ui/multi-select.rip +158 -0
  29. package/docs/ui/nav-menu.rip +129 -0
  30. package/docs/ui/number-field.rip +162 -0
  31. package/docs/ui/otp-field.rip +89 -0
  32. package/docs/ui/popover.rip +143 -0
  33. package/docs/ui/preview-card.rip +73 -0
  34. package/docs/ui/progress.rip +25 -0
  35. package/docs/ui/radio-group.rip +67 -0
  36. package/docs/ui/scroll-area.rip +145 -0
  37. package/docs/ui/select.rip +184 -0
  38. package/docs/ui/separator.rip +17 -0
  39. package/docs/ui/slider.rip +165 -0
  40. package/docs/ui/tabs.rip +124 -0
  41. package/docs/ui/toast.rip +87 -0
  42. package/docs/ui/toggle-group.rip +78 -0
  43. package/docs/ui/toggle.rip +24 -0
  44. package/docs/ui/toolbar.rip +46 -0
  45. package/docs/ui/tooltip.rip +115 -0
  46. package/package.json +2 -1
  47. package/src/app.rip +1 -1
  48. package/src/components.js +3 -4
  49. package/src/lexer.js +1 -1
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.65-blue.svg" alt="Version"></a>
12
+ <a href="CHANGELOG.md"><img src="https://img.shields.io/badge/version-3.13.67-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%2C436%2F1%2C436-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
@@ -1532,7 +1532,7 @@
1532
1532
  return 0;
1533
1533
  let m = /^#([a-zA-Z_][\w-]*)/.exec(this.chunk);
1534
1534
  if (m) {
1535
- this.emit("IDENTIFIER", m[1] === "content" ? "slot" : "div#" + m[1]);
1535
+ this.emit("IDENTIFIER", "div#" + m[1]);
1536
1536
  return m[0].length;
1537
1537
  }
1538
1538
  }
@@ -3803,7 +3803,18 @@ Expecting ${expected.join(", ")}, got '${this.tokenNames[symbol] || symbol}'`;
3803
3803
  isTemplateElement = startsWithTag(tokens, i);
3804
3804
  }
3805
3805
  if (isTemplateElement) {
3806
- let isClassOrIdTail = tag === "PROPERTY" && i > 0 && (tokens[i - 1][0] === "." || tokens[i - 1][0] === "#");
3806
+ let isClassOrIdTail = false;
3807
+ if (tag === "PROPERTY" && i > 0 && tokens[i - 1][0] === ".") {
3808
+ let j = i;
3809
+ while (j >= 2 && tokens[j - 1][0] === "." && tokens[j - 2][0] === "PROPERTY")
3810
+ j -= 2;
3811
+ if (j >= 2 && tokens[j - 1][0] === "." && tokens[j - 2][0] === "IDENTIFIER" && isTemplateTag(tokens[j - 2][1])) {
3812
+ let before = j >= 3 ? tokens[j - 3][0] : null;
3813
+ if (!before || before === "INDENT" || before === "OUTDENT" || before === "TERMINATOR" || before === "RENDER") {
3814
+ isClassOrIdTail = true;
3815
+ }
3816
+ }
3817
+ }
3807
3818
  let isBareTag = isClsxCallEnd || tag === "IDENTIFIER" && isTemplateTag(token[1]) || isClassOrIdTail;
3808
3819
  if (isBareTag) {
3809
3820
  let callStartToken = gen2("CALL_START", "(", token);
@@ -4462,7 +4473,7 @@ ${blockFactoriesCode}return ${lines.join(`
4462
4473
  }
4463
4474
  continue;
4464
4475
  }
4465
- if (typeof key === "string") {
4476
+ if (typeof key === "string" || key instanceof String) {
4466
4477
  if (key.startsWith('"') && key.endsWith('"')) {
4467
4478
  key = key.slice(1, -1);
4468
4479
  }
@@ -4539,7 +4550,11 @@ ${blockFactoriesCode}return ${lines.join(`
4539
4550
  this._pushEffect(`${elVar}.setAttribute('${key}', ${valueCode});`);
4540
4551
  }
4541
4552
  } else {
4542
- this._createLines.push(`${elVar}.setAttribute('${key}', ${valueCode});`);
4553
+ if (Array.isArray(value) && value[0] === "presence") {
4554
+ this._createLines.push(`{ const __v = ${valueCode}; if (__v != null) ${elVar}.setAttribute('${key}', __v); }`);
4555
+ } else {
4556
+ this._createLines.push(`${elVar}.setAttribute('${key}', ${valueCode});`);
4557
+ }
4543
4558
  }
4544
4559
  }
4545
4560
  }
@@ -4878,6 +4893,11 @@ ${blockFactoriesCode}return ${lines.join(`
4878
4893
  if (sexpr[0] === "." && this._rootsAtThis(sexpr[1])) {
4879
4894
  return true;
4880
4895
  }
4896
+ if (Array.isArray(sexpr[0]) && sexpr[0][0] === "." && sexpr[0][1] === "this") {
4897
+ const name = _str(sexpr[0][2]);
4898
+ if (name && this.componentMembers?.has(name))
4899
+ return true;
4900
+ }
4881
4901
  for (const child of sexpr) {
4882
4902
  if (this.hasReactiveDeps(child))
4883
4903
  return true;
@@ -6323,7 +6343,7 @@ function _setDataSection() {
6323
6343
  if (rest.length === 0)
6324
6344
  return "return";
6325
6345
  let [expr] = rest;
6326
- if (this.sideEffectOnly)
6346
+ if (this.sideEffectOnly && !(this.is(expr, "->") || this.is(expr, "=>")))
6327
6347
  return "return";
6328
6348
  if (this.is(expr, "if")) {
6329
6349
  let [, condition, body, ...elseParts] = expr;
@@ -8719,8 +8739,8 @@ globalThis.zip ??= (...a) => a[0].map((_, i) => a.map(b => b[i]));
8719
8739
  return new CodeGenerator({}).getComponentRuntime();
8720
8740
  }
8721
8741
  // src/browser.js
8722
- var VERSION = "3.13.63";
8723
- var BUILD_DATE = "2026-03-01@06:49:01GMT";
8742
+ var VERSION = "3.13.66";
8743
+ var BUILD_DATE = "2026-03-02@02:51:17GMT";
8724
8744
  if (typeof globalThis !== "undefined") {
8725
8745
  if (!globalThis.__rip)
8726
8746
  new Function(getReactiveRuntime())();
@@ -9779,7 +9799,7 @@ ${indented}`);
9779
9799
  mp.appendChild(wrapper);
9780
9800
  inst.mount(wrapper);
9781
9801
  layoutInstances.push(inst);
9782
- slot = wrapper.querySelector("slot") || wrapper;
9802
+ slot = wrapper.querySelector("#content") || wrapper;
9783
9803
  mp = slot;
9784
9804
  }
9785
9805
  currentLayouts = [...layoutFiles];