aktion-runtime 0.5.5 → 0.5.7
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 +12655 -12123
- 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 +15415 -14698
- 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.cjs
CHANGED
|
@@ -589,7 +589,6 @@ function parseFunctionDecl(ctx) {
|
|
|
589
589
|
kind: "ActionDeclaration",
|
|
590
590
|
name: nameTok.value,
|
|
591
591
|
params,
|
|
592
|
-
optimistic: false,
|
|
593
592
|
body,
|
|
594
593
|
loc: { line: start.line, column: start.column }
|
|
595
594
|
};
|
|
@@ -2592,7 +2591,7 @@ function aktionPlugin(options = {}) {
|
|
|
2592
2591
|
if (w.severity === "warning") this.warn(w.message);
|
|
2593
2592
|
}
|
|
2594
2593
|
const moduleCode = emitModule(program, code, cleanId, runtimeModuleId) + (isServe ? HMR_FOOTER : "");
|
|
2595
|
-
return { code: moduleCode, map:
|
|
2594
|
+
return { code: moduleCode, map: buildSourceMap(moduleCode, cleanId, code) };
|
|
2596
2595
|
}
|
|
2597
2596
|
};
|
|
2598
2597
|
}
|
|
@@ -2623,6 +2622,17 @@ function nodeResolver() {
|
|
|
2623
2622
|
function hasEntryBinding(program) {
|
|
2624
2623
|
return program.statements.some((s) => s.kind === "Assignment" && s.identifier === "aktion");
|
|
2625
2624
|
}
|
|
2625
|
+
function buildSourceMap(generated, sourcePath, source) {
|
|
2626
|
+
const lineCount = generated.split("\n").length;
|
|
2627
|
+
const mappings = new Array(lineCount).fill("AAAA").join(";");
|
|
2628
|
+
return {
|
|
2629
|
+
version: 3,
|
|
2630
|
+
sources: [sourcePath],
|
|
2631
|
+
sourcesContent: [source],
|
|
2632
|
+
names: [],
|
|
2633
|
+
mappings
|
|
2634
|
+
};
|
|
2635
|
+
}
|
|
2626
2636
|
function emitModule(program, source, path, runtimeModuleId) {
|
|
2627
2637
|
const programLiteral = JSON.stringify(JSON.stringify(program));
|
|
2628
2638
|
return `// Generated by the Aktion Vite plugin — do not edit by hand.
|