rip-lang 3.13.88 → 3.13.89
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 +1 -1
- package/docs/dist/rip.js +26 -6
- package/docs/dist/rip.min.js +33 -33
- package/docs/dist/rip.min.js.br +0 -0
- package/package.json +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.
|
|
12
|
+
<a href="CHANGELOG.md"><img src="https://img.shields.io/badge/version-3.13.89-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
|
@@ -4400,6 +4400,9 @@ ${blockFactoriesCode}return ${lines.join(`
|
|
|
4400
4400
|
if (id) {
|
|
4401
4401
|
this._createLines.push(`${elVar}.id = '${id}';`);
|
|
4402
4402
|
}
|
|
4403
|
+
if (this._componentName && this._elementCount === 1 && !this._factoryMode && !this.options.skipDataPart) {
|
|
4404
|
+
this._createLines.push(`${elVar}.setAttribute('data-part', '${this._componentName}');`);
|
|
4405
|
+
}
|
|
4403
4406
|
const autoWireClaimed = this._claimAutoWire(elVar);
|
|
4404
4407
|
const prevClassArgs = this._pendingClassArgs;
|
|
4405
4408
|
const prevClassEl = this._pendingClassEl;
|
|
@@ -6204,7 +6207,11 @@ function _setDataSection() {
|
|
|
6204
6207
|
} else {
|
|
6205
6208
|
targetCode = this.generate(target, "value");
|
|
6206
6209
|
}
|
|
6210
|
+
const prevComponentName = this._componentName;
|
|
6211
|
+
if (this.is(value, "component") && (typeof target === "string" || target instanceof String))
|
|
6212
|
+
this._componentName = str(target);
|
|
6207
6213
|
let valueCode = this.generate(value, "value");
|
|
6214
|
+
this._componentName = prevComponentName;
|
|
6208
6215
|
let isObjLit = this.is(value, "object");
|
|
6209
6216
|
if (!isObjLit)
|
|
6210
6217
|
valueCode = this.unwrap(valueCode);
|
|
@@ -7361,14 +7368,26 @@ ${this.indent()}}`;
|
|
|
7361
7368
|
if (this.options.skipExports) {
|
|
7362
7369
|
if (Array.isArray(decl) && decl.every((i) => typeof i === "string"))
|
|
7363
7370
|
return "";
|
|
7364
|
-
if (this.is(decl, "="))
|
|
7365
|
-
|
|
7371
|
+
if (this.is(decl, "=")) {
|
|
7372
|
+
const prev = this._componentName;
|
|
7373
|
+
if (this.is(decl[2], "component"))
|
|
7374
|
+
this._componentName = str(decl[1]);
|
|
7375
|
+
const result = `const ${decl[1]} = ${this.generate(decl[2], "value")}`;
|
|
7376
|
+
this._componentName = prev;
|
|
7377
|
+
return result;
|
|
7378
|
+
}
|
|
7366
7379
|
return this.generate(decl, "statement");
|
|
7367
7380
|
}
|
|
7368
7381
|
if (Array.isArray(decl) && decl.every((i) => typeof i === "string"))
|
|
7369
7382
|
return `export { ${decl.join(", ")} }`;
|
|
7370
|
-
if (this.is(decl, "="))
|
|
7371
|
-
|
|
7383
|
+
if (this.is(decl, "=")) {
|
|
7384
|
+
const prev = this._componentName;
|
|
7385
|
+
if (this.is(decl[2], "component"))
|
|
7386
|
+
this._componentName = str(decl[1]);
|
|
7387
|
+
const result = `export const ${decl[1]} = ${this.generate(decl[2], "value")}`;
|
|
7388
|
+
this._componentName = prev;
|
|
7389
|
+
return result;
|
|
7390
|
+
}
|
|
7372
7391
|
return `export ${this.generate(decl, "statement")}`;
|
|
7373
7392
|
}
|
|
7374
7393
|
generateExportDefault(head, rest) {
|
|
@@ -8707,6 +8726,7 @@ if (typeof globalThis !== 'undefined') {
|
|
|
8707
8726
|
skipPreamble: this.options.skipPreamble,
|
|
8708
8727
|
skipRuntimes: this.options.skipRuntimes,
|
|
8709
8728
|
skipExports: this.options.skipExports,
|
|
8729
|
+
skipDataPart: this.options.skipDataPart,
|
|
8710
8730
|
stubComponents: this.options.stubComponents,
|
|
8711
8731
|
reactiveVars: this.options.reactiveVars,
|
|
8712
8732
|
sourceMap
|
|
@@ -8765,8 +8785,8 @@ globalThis.zip ??= (...a) => a[0].map((_, i) => a.map(b => b[i]));
|
|
|
8765
8785
|
return new CodeGenerator({}).getComponentRuntime();
|
|
8766
8786
|
}
|
|
8767
8787
|
// src/browser.js
|
|
8768
|
-
var VERSION = "3.13.
|
|
8769
|
-
var BUILD_DATE = "2026-03-04@
|
|
8788
|
+
var VERSION = "3.13.88";
|
|
8789
|
+
var BUILD_DATE = "2026-03-04@05:54:21GMT";
|
|
8770
8790
|
if (typeof globalThis !== "undefined") {
|
|
8771
8791
|
if (!globalThis.__rip)
|
|
8772
8792
|
new Function(getReactiveRuntime())();
|