@lokascript/compilation-service 2.11.1 → 3.1.0
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/CHANGELOG.md +301 -1
- package/dist/{chunk-HRUSP6F2.js → chunk-5CZBYL6A.js} +2 -2
- package/dist/{chunk-BDISUJ32.js → chunk-TVK2OFIB.js} +14 -5
- package/dist/chunk-TVK2OFIB.js.map +1 -0
- package/dist/{core-parser-adapter-VCJB52SO-W3GDT5C6.js → core-parser-adapter-W5UPZR4X-AIVYD5RA.js} +2 -2
- package/dist/dist-GFKFJKU6.js +27074 -0
- package/dist/dist-GFKFJKU6.js.map +1 -0
- package/dist/{dist-4JWIJVFR.js → dist-HDVJKXUX.js} +17 -8
- package/dist/dist-HDVJKXUX.js.map +1 -0
- package/dist/http.cjs +19459 -78384
- package/dist/http.cjs.map +1 -1
- package/dist/http.js +1 -1
- package/dist/index.cjs +19510 -78435
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/multilingual-VYI3FTN7.js +485 -0
- package/dist/multilingual-VYI3FTN7.js.map +1 -0
- package/package.json +5 -5
- package/dist/chunk-BDISUJ32.js.map +0 -1
- package/dist/dist-4JWIJVFR.js.map +0 -1
- package/dist/dist-MGUUIWYB.js +0 -86915
- package/dist/dist-MGUUIWYB.js.map +0 -1
- /package/dist/{chunk-HRUSP6F2.js.map → chunk-5CZBYL6A.js.map} +0 -0
- /package/dist/{core-parser-adapter-VCJB52SO-W3GDT5C6.js.map → core-parser-adapter-W5UPZR4X-AIVYD5RA.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CoreParserAdapter,
|
|
3
3
|
createCoreParserAdapter
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-TVK2OFIB.js";
|
|
5
5
|
import {
|
|
6
6
|
SemanticParserAdapter,
|
|
7
7
|
createSemanticAdapter
|
|
@@ -1889,7 +1889,8 @@ var AddCodegen = class {
|
|
|
1889
1889
|
generate(node, ctx) {
|
|
1890
1890
|
const args = node.args ?? [];
|
|
1891
1891
|
if (args.length === 0) return null;
|
|
1892
|
-
const
|
|
1892
|
+
const targetSlot = node.target ?? node.modifiers?.to;
|
|
1893
|
+
const target = targetSlot ? ctx.generateExpression(targetSlot) : "_ctx.me";
|
|
1893
1894
|
const arg = args[0];
|
|
1894
1895
|
if (arg.type === "selector") {
|
|
1895
1896
|
const selector = arg.value;
|
|
@@ -1940,14 +1941,16 @@ var RemoveCodegen = class {
|
|
|
1940
1941
|
generate(node, ctx) {
|
|
1941
1942
|
const args = node.args ?? [];
|
|
1942
1943
|
if (args.length === 0) {
|
|
1943
|
-
const
|
|
1944
|
+
const targetSlot2 = node.target ?? node.modifiers?.from;
|
|
1945
|
+
const target2 = targetSlot2 ? ctx.generateExpression(targetSlot2) : "_ctx.me";
|
|
1944
1946
|
return {
|
|
1945
1947
|
code: `${target2}.remove()`,
|
|
1946
1948
|
async: false,
|
|
1947
1949
|
sideEffects: true
|
|
1948
1950
|
};
|
|
1949
1951
|
}
|
|
1950
|
-
const
|
|
1952
|
+
const targetSlot = node.target ?? node.modifiers?.from;
|
|
1953
|
+
const target = targetSlot ? ctx.generateExpression(targetSlot) : "_ctx.me";
|
|
1951
1954
|
const arg = args[0];
|
|
1952
1955
|
if (arg.type === "selector") {
|
|
1953
1956
|
const selector = arg.value;
|
|
@@ -2429,7 +2432,9 @@ var ScrollCodegen = class {
|
|
|
2429
2432
|
}
|
|
2430
2433
|
generate(node, ctx) {
|
|
2431
2434
|
const target = node.target ? ctx.generateExpression(node.target) : "_ctx.me";
|
|
2432
|
-
const
|
|
2435
|
+
const mods = node.modifiers;
|
|
2436
|
+
const smooth = mods?.smooth || mods?.behavior?.value === "smooth";
|
|
2437
|
+
const behavior = smooth ? "'smooth'" : "'auto'";
|
|
2433
2438
|
return {
|
|
2434
2439
|
code: `${target}.scrollIntoView({ behavior: ${behavior} })`,
|
|
2435
2440
|
async: false,
|
|
@@ -2596,7 +2601,11 @@ var GoCodegen = class {
|
|
|
2596
2601
|
generate(node, ctx) {
|
|
2597
2602
|
const args = node.args ?? [];
|
|
2598
2603
|
const roles = node.roles;
|
|
2599
|
-
const
|
|
2604
|
+
const mods = node.modifiers;
|
|
2605
|
+
if (mods?.back) {
|
|
2606
|
+
return { code: "history.back()", async: false, sideEffects: true };
|
|
2607
|
+
}
|
|
2608
|
+
const target = mods?.url ?? roles?.destination ?? args[0];
|
|
2600
2609
|
if (!target) return null;
|
|
2601
2610
|
if (target.type === "identifier") {
|
|
2602
2611
|
const name = target.value;
|
|
@@ -4214,7 +4223,7 @@ async function compileHyperscript(code, options) {
|
|
|
4214
4223
|
async function createMultilingualCompiler() {
|
|
4215
4224
|
const compiler = new AOTCompiler();
|
|
4216
4225
|
try {
|
|
4217
|
-
const { createCoreParserAdapter: createCoreParserAdapter2 } = await import("./core-parser-adapter-
|
|
4226
|
+
const { createCoreParserAdapter: createCoreParserAdapter2 } = await import("./core-parser-adapter-W5UPZR4X-AIVYD5RA.js");
|
|
4218
4227
|
compiler.setParser(await createCoreParserAdapter2());
|
|
4219
4228
|
} catch {
|
|
4220
4229
|
}
|
|
@@ -4267,4 +4276,4 @@ export {
|
|
|
4267
4276
|
sanitizeSelector,
|
|
4268
4277
|
scanFiles
|
|
4269
4278
|
};
|
|
4270
|
-
//# sourceMappingURL=dist-
|
|
4279
|
+
//# sourceMappingURL=dist-HDVJKXUX.js.map
|