aktion-runtime 0.5.10 → 0.5.11
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 +20 -10
- package/dist/aktion.iife.js +113 -136
- package/dist/aktion.iife.js.map +1 -1
- package/dist/aktion.js +4087 -3959
- package/dist/aktion.js.map +1 -1
- package/dist/aktion.umd.cjs +113 -136
- package/dist/aktion.umd.cjs.map +1 -1
- package/dist/language.js +1938 -1662
- package/dist/language.js.map +1 -1
- package/dist/system_prompt.txt +28 -26
- package/dist/system_prompt_chat.txt +11 -11
- package/dist/testing.js +358 -197
- package/dist/testing.js.map +1 -1
- package/dist/types/library/types.d.ts +50 -0
- package/dist/types/library/utils.d.ts +28 -0
- package/dist/types/library/validate.d.ts +2 -2
- package/dist/types/runtime/evaluator.d.ts +8 -0
- package/dist/types/theme/index.d.ts +3 -0
- package/dist/types/theme/styles.d.ts +1 -1
- package/dist/types/tooling/signature-help.d.ts +35 -0
- package/package.json +1 -1
|
@@ -12,6 +12,12 @@ export interface SignatureInfo {
|
|
|
12
12
|
export interface SignatureHelp {
|
|
13
13
|
signatures: SignatureInfo[];
|
|
14
14
|
activeSignature: number;
|
|
15
|
+
/**
|
|
16
|
+
* Index into `signatures[activeSignature].parameters`. May equal
|
|
17
|
+
* `parameters.length` (out of range) when no parameter should be
|
|
18
|
+
* highlighted — e.g. the cursor is on a not-yet-matching object key or
|
|
19
|
+
* past the last slot of an all-positional call.
|
|
20
|
+
*/
|
|
15
21
|
activeParameter: number;
|
|
16
22
|
}
|
|
17
23
|
/**
|
|
@@ -19,3 +25,32 @@ export interface SignatureHelp {
|
|
|
19
25
|
* is not inside a recognised call.
|
|
20
26
|
*/
|
|
21
27
|
export declare function getSignatureHelp(source: string, position: Position, library?: ComponentLibrary): SignatureHelp | null;
|
|
28
|
+
/** Per-argument shape gathered by the scanner (feeds `chooseNamedBagIndex`). */
|
|
29
|
+
interface ScannedArg {
|
|
30
|
+
/** Top-level keys when the argument is an object literal; null otherwise. */
|
|
31
|
+
objectKeys: string[] | null;
|
|
32
|
+
}
|
|
33
|
+
interface ActiveObjectContext {
|
|
34
|
+
/**
|
|
35
|
+
* The prop key the cursor is on: the key whose value region contains the
|
|
36
|
+
* cursor, or the partial identifier being typed in key position. Empty
|
|
37
|
+
* when the cursor sits before any key (e.g. right after `{`).
|
|
38
|
+
*/
|
|
39
|
+
activeKey: string;
|
|
40
|
+
}
|
|
41
|
+
export interface ActiveCall {
|
|
42
|
+
callee: string;
|
|
43
|
+
/** Zero-based index of the argument the cursor is in. */
|
|
44
|
+
argIndex: number;
|
|
45
|
+
/** Shapes of every argument seen so far (the cursor's one included). */
|
|
46
|
+
args: ScannedArg[];
|
|
47
|
+
/** Set when the cursor is inside an object literal that IS the argument. */
|
|
48
|
+
objectArg: ActiveObjectContext | null;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Expose the cursor → enclosing-call analysis so other language-service
|
|
52
|
+
* surfaces (completions) can apply the same §19 binding rules without
|
|
53
|
+
* re-implementing the scan.
|
|
54
|
+
*/
|
|
55
|
+
export declare function analyseCallContext(source: string, position: Position): ActiveCall | null;
|
|
56
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aktion-runtime",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.11",
|
|
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",
|