@telorun/ide-support 0.14.1 → 0.16.0
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/cel/cursor-chain.d.ts +30 -0
- package/dist/cel/cursor-chain.d.ts.map +1 -0
- package/dist/cel/cursor-chain.js +30 -0
- package/dist/cel/symbols.d.ts +82 -0
- package/dist/cel/symbols.d.ts.map +1 -0
- package/dist/cel/symbols.js +147 -0
- package/dist/cel/tokens.d.ts +32 -0
- package/dist/cel/tokens.d.ts.map +1 -0
- package/dist/cel/tokens.js +162 -0
- package/dist/completions/build.d.ts +6 -2
- package/dist/completions/build.d.ts.map +1 -1
- package/dist/completions/build.js +52 -24
- package/dist/completions/call-inputs.d.ts +25 -0
- package/dist/completions/call-inputs.d.ts.map +1 -0
- package/dist/completions/call-inputs.js +78 -0
- package/dist/completions/cel-completions.d.ts +26 -0
- package/dist/completions/cel-completions.d.ts.map +1 -0
- package/dist/completions/cel-completions.js +78 -0
- package/dist/completions/detect-context.d.ts +47 -8
- package/dist/completions/detect-context.d.ts.map +1 -1
- package/dist/completions/detect-context.js +51 -15
- package/dist/completions/prop-keys.d.ts +5 -1
- package/dist/completions/prop-keys.d.ts.map +1 -1
- package/dist/completions/prop-keys.js +51 -3
- package/dist/completions/resolve-node.d.ts +9 -2
- package/dist/completions/resolve-node.d.ts.map +1 -1
- package/dist/completions/resolve-node.js +63 -21
- package/dist/definition/build-definition.d.ts +6 -2
- package/dist/definition/build-definition.d.ts.map +1 -1
- package/dist/definition/build-definition.js +16 -3
- package/dist/definition/locate-context-binding.d.ts +15 -0
- package/dist/definition/locate-context-binding.d.ts.map +1 -0
- package/dist/definition/locate-context-binding.js +35 -0
- package/dist/definition/locate-step.d.ts +13 -0
- package/dist/definition/locate-step.d.ts.map +1 -0
- package/dist/definition/locate-step.js +33 -0
- package/dist/definition/resolve-cel-target.d.ts +11 -1
- package/dist/definition/resolve-cel-target.d.ts.map +1 -1
- package/dist/definition/resolve-cel-target.js +14 -14
- package/dist/doc-identity.d.ts +17 -0
- package/dist/doc-identity.d.ts.map +1 -0
- package/dist/doc-identity.js +19 -0
- package/dist/hover/build-hover.d.ts +6 -2
- package/dist/hover/build-hover.d.ts.map +1 -1
- package/dist/hover/build-hover.js +64 -3
- package/dist/import-upgrades/build-import-upgrades.d.ts +57 -3
- package/dist/import-upgrades/build-import-upgrades.d.ts.map +1 -1
- package/dist/import-upgrades/build-import-upgrades.js +67 -10
- package/dist/import-upgrades/index.d.ts +5 -2
- package/dist/import-upgrades/index.d.ts.map +1 -1
- package/dist/import-upgrades/index.js +3 -1
- package/dist/import-upgrades/manifest-cache-url.d.ts +17 -0
- package/dist/import-upgrades/manifest-cache-url.d.ts.map +1 -0
- package/dist/import-upgrades/manifest-cache-url.js +30 -0
- package/dist/import-upgrades/version-compatibility.d.ts +92 -0
- package/dist/import-upgrades/version-compatibility.d.ts.map +1 -0
- package/dist/import-upgrades/version-compatibility.js +121 -0
- package/dist/semantic-tokens/build-semantic-tokens.d.ts +13 -8
- package/dist/semantic-tokens/build-semantic-tokens.d.ts.map +1 -1
- package/dist/semantic-tokens/build-semantic-tokens.js +81 -37
- package/dist/types.d.ts +25 -5
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +16 -2
- package/package.json +2 -2
- package/src/cel/cursor-chain.ts +58 -0
- package/src/cel/symbols.ts +189 -0
- package/src/cel/tokens.ts +169 -0
- package/src/completions/build.ts +85 -22
- package/src/completions/call-inputs.ts +92 -0
- package/src/completions/cel-completions.ts +108 -0
- package/src/completions/detect-context.ts +107 -13
- package/src/completions/prop-keys.ts +59 -2
- package/src/completions/resolve-node.ts +82 -17
- package/src/definition/build-definition.ts +30 -2
- package/src/definition/locate-context-binding.ts +53 -0
- package/src/definition/locate-step.ts +50 -0
- package/src/definition/resolve-cel-target.ts +25 -0
- package/src/doc-identity.ts +31 -0
- package/src/hover/build-hover.ts +67 -1
- package/src/import-upgrades/build-import-upgrades.ts +115 -11
- package/src/import-upgrades/index.ts +22 -1
- package/src/import-upgrades/manifest-cache-url.ts +40 -0
- package/src/import-upgrades/version-compatibility.ts +196 -0
- package/src/semantic-tokens/build-semantic-tokens.ts +84 -30
- package/src/types.ts +47 -6
package/src/types.ts
CHANGED
|
@@ -54,14 +54,55 @@ export interface HoverResult {
|
|
|
54
54
|
|
|
55
55
|
/** Semantic token type names emitted by `buildSemanticTokens`. Kept to the
|
|
56
56
|
* standard VS Code / LSP set so hosts register them against a stock legend and
|
|
57
|
-
* every theme colors them without extra configuration.
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
|
|
57
|
+
* every theme colors them without extra configuration.
|
|
58
|
+
*
|
|
59
|
+
* Manifest structure: `type` marks a resolved resource kind; `interface` marks
|
|
60
|
+
* a capability value; `variable` marks a `!ref` target.
|
|
61
|
+
*
|
|
62
|
+
* Inside a CEL body: `namespace` marks the ROOT of a chain, `property` a member
|
|
63
|
+
* it can resolve, `function` a call, and `number` / `string` / `keyword` /
|
|
64
|
+
* `operator` the syntax around them. A CEL name the scope CANNOT confirm gets
|
|
65
|
+
* no token — the same quiet signal an unresolved `kind:` gives, pairing with
|
|
66
|
+
* the analyzer's `CEL_UNKNOWN_FIELD`.
|
|
67
|
+
*
|
|
68
|
+
* The root is a `namespace` rather than a `variable` because colour encodes
|
|
69
|
+
* what a symbol IS, which is the invariant every language holds to — and a CEL
|
|
70
|
+
* root is not data the author declared, it is a scope the runtime injects
|
|
71
|
+
* (`request`, `steps`, `variables`, `self`). Members are uniformly `property`
|
|
72
|
+
* however deep, so a chain reads as scope · path. Colouring by the SHAPE of the
|
|
73
|
+
* value behind a name — object vs scalar — was considered and rejected: it is
|
|
74
|
+
* type-directed highlighting, so the palette becomes a type legend, a name
|
|
75
|
+
* changes colour as analysis resolves, and it says nothing exactly where the
|
|
76
|
+
* scope declares no shape. */
|
|
77
|
+
export type SemanticTokenType =
|
|
78
|
+
| "type"
|
|
79
|
+
| "interface"
|
|
80
|
+
| "variable"
|
|
81
|
+
| "property"
|
|
82
|
+
| "function"
|
|
83
|
+
| "number"
|
|
84
|
+
| "string"
|
|
85
|
+
| "keyword"
|
|
86
|
+
| "operator"
|
|
87
|
+
| "namespace";
|
|
61
88
|
|
|
62
89
|
/** The legend a host registers before mapping `buildSemanticTokens` output. The
|
|
63
|
-
* numeric token-type of each `SemanticToken` is its index in this array
|
|
64
|
-
|
|
90
|
+
* numeric token-type of each `SemanticToken` is its index in this array, and a
|
|
91
|
+
* host registers it once at activation — so new types are APPENDED, never
|
|
92
|
+
* inserted, or an already-registered legend would repaint every existing
|
|
93
|
+
* token as something else. */
|
|
94
|
+
export const SEMANTIC_TOKEN_LEGEND: readonly SemanticTokenType[] = [
|
|
95
|
+
"type",
|
|
96
|
+
"interface",
|
|
97
|
+
"variable",
|
|
98
|
+
"property",
|
|
99
|
+
"function",
|
|
100
|
+
"number",
|
|
101
|
+
"string",
|
|
102
|
+
"keyword",
|
|
103
|
+
"operator",
|
|
104
|
+
"namespace",
|
|
105
|
+
];
|
|
65
106
|
|
|
66
107
|
/** One absolute-positioned semantic token. Every Telo semantic token is
|
|
67
108
|
* single-line (kinds and capabilities never wrap), so a `{line, char, length}`
|