rip-lang 3.15.1 → 3.15.3

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="https://github.com/shreeve/rip-lang/commits/main"><img src="https://img.shields.io/badge/version-3.15.1-blue.svg" alt="Version"></a>
12
+ <a href="https://github.com/shreeve/rip-lang/commits/main"><img src="https://img.shields.io/badge/version-3.15.3-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
@@ -12453,8 +12453,8 @@ globalThis.zip ??= (...a) => a[0].map((_, i) => a.map(b => b[i]));
12453
12453
  return new CodeEmitter({}).getComponentRuntime();
12454
12454
  }
12455
12455
  // src/browser.js
12456
- var VERSION = "3.15.1";
12457
- var BUILD_DATE = "2026-04-27@06:14:13GMT";
12456
+ var VERSION = "3.15.3";
12457
+ var BUILD_DATE = "2026-04-27@07:02:58GMT";
12458
12458
  if (typeof globalThis !== "undefined") {
12459
12459
  if (!globalThis.__rip)
12460
12460
  new Function(getReactiveRuntime())();
@@ -12631,9 +12631,8 @@ ${js}
12631
12631
  if (!s.code)
12632
12632
  continue;
12633
12633
  const ripName = s.url || `inline-${++inlineCounter}.rip`;
12634
- const opts = debug ? { ...baseOpts, sourceMap: "inline", filename: ripName } : baseOpts;
12635
12634
  try {
12636
- const js = compileToJS(s.code, opts);
12635
+ const js = compileToJS(s.code, baseOpts);
12637
12636
  compiled.push({ js, url: ripName });
12638
12637
  } catch (e) {
12639
12638
  console.error(formatError(e, { source: s.code, file: ripName, color: false }));
@@ -12662,30 +12661,27 @@ ${js}
12662
12661
  }
12663
12662
  }
12664
12663
  if (compiled.length > 0) {
12665
- let anyError = false;
12666
- for (const c of compiled) {
12667
- try {
12668
- await (0, eval)(debug ? wrapForEval(c.js, c.url) : `(async()=>{
12669
- ${c.js}
12670
- })()`);
12671
- } catch (e) {
12672
- anyError = true;
12673
- if (e instanceof SyntaxError)
12674
- console.error(`Rip syntax error in ${c.url}: ${e.message}`);
12675
- else
12676
- console.error(`Rip runtime error in ${c.url}:`, e);
12677
- }
12678
- }
12679
12664
  const mount = runtimeTag?.getAttribute("data-mount");
12680
- if (mount) {
12681
- const target = runtimeTag.getAttribute("data-target") || "body";
12682
- try {
12683
- await (0, eval)(`(async()=>{ ${mount}.mount(${JSON.stringify(target)}); })()`);
12684
- } catch (e) {
12685
- console.error(`Rip mount error (${mount}):`, e);
12686
- }
12665
+ const target = runtimeTag?.getAttribute("data-target") || "body";
12666
+ const mountSnippet = mount ? `
12667
+ ${mount}.mount(${JSON.stringify(target)});
12668
+ ` : "";
12669
+ const merged = compiled.map((c) => c.js).join(`
12670
+ ;
12671
+ `);
12672
+ let ok = true;
12673
+ try {
12674
+ await (0, eval)(`(async()=>{
12675
+ ${merged}${mountSnippet}
12676
+ })()`);
12677
+ } catch (e) {
12678
+ ok = false;
12679
+ if (e instanceof SyntaxError)
12680
+ console.error(`Rip syntax error: ${e.message}`);
12681
+ else
12682
+ console.error("Rip runtime error:", e);
12687
12683
  }
12688
- if (!anyError)
12684
+ if (ok)
12689
12685
  document.body.classList.add("ready");
12690
12686
  }
12691
12687
  }