aktion-runtime 0.5.1 → 0.5.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.
Files changed (35) hide show
  1. package/README.md +654 -373
  2. package/dist/aktion.iife.js +798 -790
  3. package/dist/aktion.iife.js.map +1 -1
  4. package/dist/aktion.js +10059 -7997
  5. package/dist/aktion.js.map +1 -1
  6. package/dist/aktion.umd.cjs +798 -790
  7. package/dist/aktion.umd.cjs.map +1 -1
  8. package/dist/system_prompt.txt +595 -829
  9. package/dist/system_prompt_chat.txt +98 -263
  10. package/dist/types/element.d.ts +46 -26
  11. package/dist/types/language/grammar.d.ts +25 -9
  12. package/dist/types/language/index.d.ts +8 -6
  13. package/dist/types/library/components/content.d.ts +0 -1
  14. package/dist/types/library/components/escape-hatch.d.ts +3 -0
  15. package/dist/types/library/components/layout.d.ts +3 -0
  16. package/dist/types/library/components/wrappers.d.ts +12 -0
  17. package/dist/types/library/utils.d.ts +42 -0
  18. package/dist/types/parser/frontier.d.ts +3 -3
  19. package/dist/types/parser/lexer.d.ts +7 -17
  20. package/dist/types/parser/types.d.ts +239 -113
  21. package/dist/types/prompt/generator.d.ts +0 -11
  22. package/dist/types/renderer/renderer.d.ts +60 -7
  23. package/dist/types/runtime/builtins.d.ts +10 -6
  24. package/dist/types/runtime/effects.d.ts +5 -30
  25. package/dist/types/runtime/evaluator.d.ts +356 -25
  26. package/dist/types/runtime/http.d.ts +35 -30
  27. package/dist/types/runtime/i18n.d.ts +23 -32
  28. package/dist/types/runtime/router.d.ts +5 -6
  29. package/dist/types/runtime/state.d.ts +77 -33
  30. package/dist/types/runtime/util.d.ts +88 -0
  31. package/dist/types/theme/styles.d.ts +1 -1
  32. package/dist/types/tooling/delta.d.ts +1 -1
  33. package/dist/types/tooling/inspector.d.ts +1 -1
  34. package/package.json +2 -2
  35. package/dist/types/language/builtins.d.ts +0 -33
@@ -27,7 +27,7 @@
27
27
  * Append an item to a top-level array binding. `binding`'s RHS
28
28
  * must be a literal array expression.
29
29
  *
30
- * { kind: "new", source: "component ReportCard(r) { Card([Text(r.title)]) }" }
30
+ * { kind: "new", source: "function ReportCard(r) { return Card([Text(r.title)]) }" }
31
31
  * Append a new top-level statement to the program.
32
32
  *
33
33
  * { kind: "delete", binding: "legacyWidget" }
@@ -3,7 +3,7 @@ export interface InspectorBinding {
3
3
  /** Top-level name (e.g. `root`, `count`, `Header`). */
4
4
  name: string;
5
5
  /** What kind of declaration introduced this binding. */
6
- kind: "assignment" | "component" | "effect" | "action" | "router";
6
+ kind: "assignment" | "component" | "effect" | "action" | "hook" | "router";
7
7
  /** Source line (1-indexed). */
8
8
  line: number;
9
9
  /** Source column (1-indexed). */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aktion-runtime",
3
- "version": "0.5.1",
3
+ "version": "0.5.3",
4
4
  "description": "Aktion is a single web component that turns a compact, streaming-first DSL into a rich, interactive UI inside its shadow DOM. Works in React, Vue, Angular, Svelte, plain HTML — or no framework at all.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -23,7 +23,7 @@
23
23
  "access": "public"
24
24
  },
25
25
  "scripts": {
26
- "dev": "vite",
26
+ "dev": "npm run build && vite",
27
27
  "build": "tsc -p tsconfig.build.json && vite build && node scripts/emit-prompt.mjs && node scripts/emit-entry.mjs",
28
28
  "build:lib": "vite build",
29
29
  "build:prompt": "node scripts/emit-prompt.mjs",
@@ -1,33 +0,0 @@
1
- /**
2
- * Built-in `@Name(...)` catalog.
3
- *
4
- * Sourced (by name) from `src/runtime/builtins.ts` plus the action steps
5
- * handled directly in the evaluator. Each entry carries a short description
6
- * and parameter signature so editors can show argument hints.
7
- *
8
- * Adding a new builtin to the runtime? Add an entry here too — the test
9
- * suite guards the union (see `tests/language.test.ts`).
10
- */
11
- export interface BuiltinParam {
12
- name: string;
13
- type: string;
14
- required: boolean;
15
- description?: string;
16
- }
17
- export interface BuiltinEntry {
18
- name: string;
19
- category: "data" | "iteration";
20
- description: string;
21
- params: BuiltinParam[];
22
- signature: string;
23
- }
24
- /**
25
- * Return the catalog of all `@-builtins`. The list is deterministic — data
26
- * builtins first (sourced from the runtime registry), then iteration
27
- * fallbacks. Aktion 0.5 removed the legacy action-step builtins
28
- * (`@Set`, `@Run`, `@Reset`, `@ToAssistant`, `@OpenUrl`, `@Navigate`, `@Js`)
29
- * and the `@Const` memo helper; use `action` declarations and `$computed`
30
- * bindings instead.
31
- */
32
- export declare function getBuiltinCatalog(): BuiltinEntry[];
33
- export declare function indexBuiltins(entries: BuiltinEntry[]): Record<string, BuiltinEntry>;