@constela/language-server 0.1.5 → 0.1.10

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 (2) hide show
  1. package/dist/index.js +57 -2
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -114,7 +114,15 @@ var ACTION_STEPS = [
114
114
  { label: "interval", detail: "Interval step - executes an action repeatedly (setInterval equivalent)", kind: CompletionItemKind.Function },
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
- { label: "if", detail: "If step - conditional action execution", kind: CompletionItemKind.Function }
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 },
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 }
118
126
  ];
119
127
  var VIEW_NODES = [
120
128
  { label: "element", detail: "Element node - represents an HTML element", kind: CompletionItemKind.Class },
@@ -125,7 +133,10 @@ var VIEW_NODES = [
125
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 },
126
134
  { label: "markdown", detail: "Markdown node - renders markdown content", kind: CompletionItemKind.Class },
127
135
  { label: "code", detail: "Code node - renders syntax-highlighted code", kind: CompletionItemKind.Class },
128
- { 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 }
129
140
  ];
130
141
 
131
142
  // src/completion.ts
@@ -384,6 +395,38 @@ var ACTION_DOCS = {
384
395
  if: {
385
396
  signature: '{ "do": "if", "condition": Expression, "then": ActionStep[], "else"?: ActionStep[] }',
386
397
  description: "If step - conditional action execution"
398
+ },
399
+ generate: {
400
+ signature: '{ "do": "generate", "provider": AiProviderType, "prompt": Expression, "output": AiOutputType, "result": string, "model"?: string, "onSuccess"?: ActionStep[], "onError"?: ActionStep[] }',
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"
387
430
  }
388
431
  };
389
432
  var VIEW_DOCS = {
@@ -422,6 +465,18 @@ var VIEW_DOCS = {
422
465
  portal: {
423
466
  signature: `{ "kind": "portal", "target": 'body' | 'head' | string, "children": ViewNode[] }`,
424
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"
425
480
  }
426
481
  };
427
482
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@constela/language-server",
3
- "version": "0.1.5",
3
+ "version": "0.1.10",
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/core": "0.15.2",
27
- "@constela/compiler": "0.14.3"
26
+ "@constela/core": "0.17.0",
27
+ "@constela/compiler": "0.15.0"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@types/node": "^20.10.0",