aktion-runtime 0.5.5 → 0.5.6
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 +120 -15
- package/dist/aktion.iife.js +42 -42
- package/dist/aktion.iife.js.map +1 -1
- package/dist/aktion.js +12663 -12149
- package/dist/aktion.js.map +1 -1
- package/dist/aktion.umd.cjs +42 -42
- package/dist/aktion.umd.cjs.map +1 -1
- package/dist/language.js +1348 -98
- package/dist/language.js.map +1 -1
- package/dist/plugin.cjs +12 -2
- package/dist/plugin.cjs.map +1 -1
- package/dist/plugin.js +12 -2
- package/dist/plugin.js.map +1 -1
- package/dist/system_prompt.txt +40 -8
- package/dist/system_prompt_chat.txt +2 -1
- package/dist/testing.js +15221 -14527
- package/dist/testing.js.map +1 -1
- package/dist/types/element.d.ts +0 -1
- package/dist/types/language/builtins.d.ts +52 -0
- package/dist/types/language/index.d.ts +5 -2
- package/dist/types/language-api.d.ts +5 -1
- package/dist/types/library/components/helpers.d.ts +0 -5
- package/dist/types/library/components/wrappers.d.ts +1 -0
- package/dist/types/parser/types.d.ts +0 -1
- package/dist/types/runtime/effects.d.ts +1 -18
- package/dist/types/runtime/evaluator.d.ts +46 -5
- package/dist/types/runtime/http.d.ts +41 -0
- package/dist/types/runtime/index.d.ts +2 -1
- package/dist/types/runtime/router.d.ts +28 -2
- package/dist/types/runtime/toast.d.ts +45 -0
- package/dist/types/runtime/util.d.ts +11 -1
- package/dist/types/tooling/index.d.ts +6 -0
- package/dist/types/tooling/language-service.d.ts +10 -5
- package/dist/types/tooling/navigation.d.ts +91 -0
- package/dist/types/tooling/semantic-tokens.d.ts +24 -0
- package/dist/types/tooling/signature-help.d.ts +21 -0
- package/package.json +1 -1
package/dist/plugin.js
CHANGED
|
@@ -587,7 +587,6 @@ function parseFunctionDecl(ctx) {
|
|
|
587
587
|
kind: "ActionDeclaration",
|
|
588
588
|
name: nameTok.value,
|
|
589
589
|
params,
|
|
590
|
-
optimistic: false,
|
|
591
590
|
body,
|
|
592
591
|
loc: { line: start.line, column: start.column }
|
|
593
592
|
};
|
|
@@ -2590,7 +2589,7 @@ function aktionPlugin(options = {}) {
|
|
|
2590
2589
|
if (w.severity === "warning") this.warn(w.message);
|
|
2591
2590
|
}
|
|
2592
2591
|
const moduleCode = emitModule(program, code, cleanId, runtimeModuleId) + (isServe ? HMR_FOOTER : "");
|
|
2593
|
-
return { code: moduleCode, map:
|
|
2592
|
+
return { code: moduleCode, map: buildSourceMap(moduleCode, cleanId, code) };
|
|
2594
2593
|
}
|
|
2595
2594
|
};
|
|
2596
2595
|
}
|
|
@@ -2621,6 +2620,17 @@ function nodeResolver() {
|
|
|
2621
2620
|
function hasEntryBinding(program) {
|
|
2622
2621
|
return program.statements.some((s) => s.kind === "Assignment" && s.identifier === "aktion");
|
|
2623
2622
|
}
|
|
2623
|
+
function buildSourceMap(generated, sourcePath, source) {
|
|
2624
|
+
const lineCount = generated.split("\n").length;
|
|
2625
|
+
const mappings = new Array(lineCount).fill("AAAA").join(";");
|
|
2626
|
+
return {
|
|
2627
|
+
version: 3,
|
|
2628
|
+
sources: [sourcePath],
|
|
2629
|
+
sourcesContent: [source],
|
|
2630
|
+
names: [],
|
|
2631
|
+
mappings
|
|
2632
|
+
};
|
|
2633
|
+
}
|
|
2624
2634
|
function emitModule(program, source, path, runtimeModuleId) {
|
|
2625
2635
|
const programLiteral = JSON.stringify(JSON.stringify(program));
|
|
2626
2636
|
return `// Generated by the Aktion Vite plugin — do not edit by hand.
|