@constela/language-server 0.1.9 → 0.1.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/dist/index.js +52 -2
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -115,7 +115,14 @@ var ACTION_STEPS = [
|
|
|
115
115
|
{ label: "clearTimer", detail: "ClearTimer step - clears a timer (clearTimeout/clearInterval equivalent)", kind: CompletionItemKind.Function },
|
|
116
116
|
{ label: "focus", detail: "Focus step - manages form element focus", kind: CompletionItemKind.Function },
|
|
117
117
|
{ label: "if", detail: "If step - conditional action execution", kind: CompletionItemKind.Function },
|
|
118
|
-
{ label: "generate", detail: "Generate step - generates DSL using AI at runtime", kind: CompletionItemKind.Function }
|
|
118
|
+
{ label: "generate", detail: "Generate step - generates DSL using AI at runtime", kind: CompletionItemKind.Function },
|
|
119
|
+
{ label: "sseConnect", detail: "SSE connect step - establishes a Server-Sent Events connection", kind: CompletionItemKind.Function },
|
|
120
|
+
{ label: "sseClose", detail: "SSE close step - closes a named SSE connection", kind: CompletionItemKind.Function },
|
|
121
|
+
{ label: "optimistic", detail: "Optimistic step - applies optimistic UI update", kind: CompletionItemKind.Function },
|
|
122
|
+
{ label: "confirm", detail: "Confirm step - confirms an optimistic update", kind: CompletionItemKind.Function },
|
|
123
|
+
{ label: "reject", detail: "Reject step - rejects an optimistic update and rolls back", kind: CompletionItemKind.Function },
|
|
124
|
+
{ label: "bind", detail: "Bind step - binds connection messages to state", kind: CompletionItemKind.Function },
|
|
125
|
+
{ label: "unbind", detail: "Unbind step - removes a binding", kind: CompletionItemKind.Function }
|
|
119
126
|
];
|
|
120
127
|
var VIEW_NODES = [
|
|
121
128
|
{ label: "element", detail: "Element node - represents an HTML element", kind: CompletionItemKind.Class },
|
|
@@ -126,7 +133,10 @@ var VIEW_NODES = [
|
|
|
126
133
|
{ label: "slot", detail: "Slot node - placeholder for children in component definition\nFor layouts, can have an optional name for named slots", kind: CompletionItemKind.Class },
|
|
127
134
|
{ label: "markdown", detail: "Markdown node - renders markdown content", kind: CompletionItemKind.Class },
|
|
128
135
|
{ label: "code", detail: "Code node - renders syntax-highlighted code", kind: CompletionItemKind.Class },
|
|
129
|
-
{ label: "portal", detail: "Portal node - renders children to a different DOM location", kind: CompletionItemKind.Class }
|
|
136
|
+
{ label: "portal", detail: "Portal node - renders children to a different DOM location", kind: CompletionItemKind.Class },
|
|
137
|
+
{ label: "island", detail: "Island node - represents an interactive island in the Islands Architecture", kind: CompletionItemKind.Class },
|
|
138
|
+
{ label: "suspense", detail: "Suspense node - represents an async boundary with loading fallback", kind: CompletionItemKind.Class },
|
|
139
|
+
{ label: "errorBoundary", detail: "Error boundary node - catches errors and displays fallback UI", kind: CompletionItemKind.Class }
|
|
130
140
|
];
|
|
131
141
|
|
|
132
142
|
// src/completion.ts
|
|
@@ -389,6 +399,34 @@ var ACTION_DOCS = {
|
|
|
389
399
|
generate: {
|
|
390
400
|
signature: '{ "do": "generate", "provider": AiProviderType, "prompt": Expression, "output": AiOutputType, "result": string, "model"?: string, "onSuccess"?: ActionStep[], "onError"?: ActionStep[] }',
|
|
391
401
|
description: "Generate step - generates DSL using AI at runtime"
|
|
402
|
+
},
|
|
403
|
+
sseConnect: {
|
|
404
|
+
signature: '{ "do": "sseConnect", "connection": string, "url": Expression, "eventTypes"?: string[], "reconnect"?: ReconnectConfig, "onOpen"?: ActionStep[], "onMessage"?: ActionStep[], "onError"?: ActionStep[] }',
|
|
405
|
+
description: "SSE connect step - establishes a Server-Sent Events connection"
|
|
406
|
+
},
|
|
407
|
+
sseClose: {
|
|
408
|
+
signature: '{ "do": "sseClose", "connection": string }',
|
|
409
|
+
description: "SSE close step - closes a named SSE connection"
|
|
410
|
+
},
|
|
411
|
+
optimistic: {
|
|
412
|
+
signature: '{ "do": "optimistic", "target": string, "path"?: Expression, "value": Expression, "result"?: string, "timeout"?: number }',
|
|
413
|
+
description: "Optimistic step - applies optimistic UI update"
|
|
414
|
+
},
|
|
415
|
+
confirm: {
|
|
416
|
+
signature: '{ "do": "confirm", "id": Expression }',
|
|
417
|
+
description: "Confirm step - confirms an optimistic update"
|
|
418
|
+
},
|
|
419
|
+
reject: {
|
|
420
|
+
signature: '{ "do": "reject", "id": Expression }',
|
|
421
|
+
description: "Reject step - rejects an optimistic update and rolls back"
|
|
422
|
+
},
|
|
423
|
+
bind: {
|
|
424
|
+
signature: '{ "do": "bind", "connection": string, "eventType"?: string, "target": string, "path"?: Expression, "transform"?: Expression, "patch"?: boolean }',
|
|
425
|
+
description: "Bind step - binds connection messages to state"
|
|
426
|
+
},
|
|
427
|
+
unbind: {
|
|
428
|
+
signature: '{ "do": "unbind", "connection": string, "target": string }',
|
|
429
|
+
description: "Unbind step - removes a binding"
|
|
392
430
|
}
|
|
393
431
|
};
|
|
394
432
|
var VIEW_DOCS = {
|
|
@@ -427,6 +465,18 @@ var VIEW_DOCS = {
|
|
|
427
465
|
portal: {
|
|
428
466
|
signature: `{ "kind": "portal", "target": 'body' | 'head' | string, "children": ViewNode[] }`,
|
|
429
467
|
description: "Portal node - renders children to a different DOM location"
|
|
468
|
+
},
|
|
469
|
+
island: {
|
|
470
|
+
signature: '{ "kind": "island", "id": string, "strategy": IslandStrategy, "strategyOptions"?: IslandStrategyOptions, "content": ViewNode, "state"?: Record<string, StateField>, "actions"?: ActionDefinition[] }',
|
|
471
|
+
description: "Island node - represents an interactive island in the Islands Architecture"
|
|
472
|
+
},
|
|
473
|
+
suspense: {
|
|
474
|
+
signature: '{ "kind": "suspense", "id": string, "fallback": ViewNode, "content": ViewNode }',
|
|
475
|
+
description: "Suspense node - represents an async boundary with loading fallback"
|
|
476
|
+
},
|
|
477
|
+
errorBoundary: {
|
|
478
|
+
signature: '{ "kind": "errorBoundary", "fallback": ViewNode, "content": ViewNode }',
|
|
479
|
+
description: "Error boundary node - catches errors and displays fallback UI"
|
|
430
480
|
}
|
|
431
481
|
};
|
|
432
482
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@constela/language-server",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"description": "Language Server Protocol implementation for Constela DSL",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"vscode-languageserver-textdocument": "^1.0.12",
|
|
24
24
|
"vscode-jsonrpc": "^8.2.1",
|
|
25
25
|
"jsonc-parser": "^3.3.1",
|
|
26
|
-
"@constela/
|
|
27
|
-
"@constela/
|
|
26
|
+
"@constela/core": "0.17.1",
|
|
27
|
+
"@constela/compiler": "0.15.1"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@types/node": "^20.10.0",
|