@nanobpm/nano-ide-ext-types 1.2.0 → 1.3.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/index.d.ts +76 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -69,6 +69,78 @@ export interface ThemeSpec {
|
|
|
69
69
|
/** Design-token name -> CSS colour. Unknown keys are ignored by the host. */
|
|
70
70
|
tokens: Partial<Record<ThemeTokenKey, string>>;
|
|
71
71
|
}
|
|
72
|
+
/**
|
|
73
|
+
* IntelliSense data a lang pack ships for the console's Monaco editor. The
|
|
74
|
+
* console has a real language service only for TypeScript/JavaScript (Monaco's
|
|
75
|
+
* built-in TS worker); every other language gets tokenisation only. A pack can
|
|
76
|
+
* light up completion, hover, and signature help for its `monacoLang` by
|
|
77
|
+
* shipping this curated data — no in-browser language server required. The host
|
|
78
|
+
* registers one provider per `monacoLang` and feeds it every pack's entries.
|
|
79
|
+
*/
|
|
80
|
+
export interface LangIntellisense {
|
|
81
|
+
/** Monaco language id these entries apply to (e.g. "csharp", "rust"). */
|
|
82
|
+
monacoLang: string;
|
|
83
|
+
/** Extra characters that reopen the completion popup (e.g. ["."]). The word
|
|
84
|
+
* character set always triggers completion; add member-access dots etc. */
|
|
85
|
+
triggerCharacters?: string[];
|
|
86
|
+
/** Completion items offered in files of this language. */
|
|
87
|
+
completions?: CompletionSpec[];
|
|
88
|
+
/** Hover cards keyed by the exact symbol under the cursor. */
|
|
89
|
+
hovers?: HoverSpec[];
|
|
90
|
+
/** Signature-help entries shown while typing a call's arguments. */
|
|
91
|
+
signatures?: SignatureSpec[];
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Monaco `CompletionItemKind` names a pack may use. The listed names are the
|
|
95
|
+
* commonly-emitted ones and exist only as authoring hints — the real authority
|
|
96
|
+
* is the host's kind→Monaco mapping, which renders any unknown value as
|
|
97
|
+
* `Value`. The union is intentionally open (`string & {}`) because the mapping
|
|
98
|
+
* lives in a separate repo (the console), so a closed set here can't be
|
|
99
|
+
* compile-time reconciled with it and would only drift; keeping it open means a
|
|
100
|
+
* new generator-emitted kind never breaks consumers of this package.
|
|
101
|
+
*/
|
|
102
|
+
export type CompletionKind = "keyword" | "snippet" | "function" | "method" | "constructor" | "class" | "struct" | "interface" | "enum" | "module" | "property" | "field" | "variable" | "constant" | "value" | (string & {});
|
|
103
|
+
/** One completion item. `insertText` defaults to `label`. */
|
|
104
|
+
export interface CompletionSpec {
|
|
105
|
+
/** Text shown in the completion list. */
|
|
106
|
+
label: string;
|
|
107
|
+
/** Icon/category. Defaults to "value" when omitted. */
|
|
108
|
+
kind?: CompletionKind;
|
|
109
|
+
/** Text inserted on accept. Defaults to `label`. */
|
|
110
|
+
insertText?: string;
|
|
111
|
+
/** When true, `insertText` is a Monaco snippet (`${1:name}` placeholders). */
|
|
112
|
+
snippet?: boolean;
|
|
113
|
+
/** Short right-aligned signature/type (e.g. the return type). */
|
|
114
|
+
detail?: string;
|
|
115
|
+
/** Markdown documentation shown in the details flyout. */
|
|
116
|
+
documentation?: string;
|
|
117
|
+
}
|
|
118
|
+
/** A hover card: shown when the pointer rests on `symbol`. */
|
|
119
|
+
export interface HoverSpec {
|
|
120
|
+
/** Exact identifier that triggers this hover (whole-word match). */
|
|
121
|
+
symbol: string;
|
|
122
|
+
/** Markdown rendered in the hover card. */
|
|
123
|
+
contents: string;
|
|
124
|
+
}
|
|
125
|
+
/** One function/method signature surfaced by signature help. */
|
|
126
|
+
export interface SignatureSpec {
|
|
127
|
+
/** Identifier that, when followed by `(`, triggers this help (e.g.
|
|
128
|
+
* "CreateProcessInstanceAsync"). */
|
|
129
|
+
trigger: string;
|
|
130
|
+
/** Full signature line shown in the popup. */
|
|
131
|
+
label: string;
|
|
132
|
+
/** Markdown documentation for the call. */
|
|
133
|
+
documentation?: string;
|
|
134
|
+
/** Ordered parameters; the active one is highlighted by comma position. */
|
|
135
|
+
parameters?: SignatureParam[];
|
|
136
|
+
}
|
|
137
|
+
/** One parameter within a {@link SignatureSpec}. */
|
|
138
|
+
export interface SignatureParam {
|
|
139
|
+
/** Parameter label as it appears in the signature (e.g. "id: string"). */
|
|
140
|
+
label: string;
|
|
141
|
+
/** Markdown documentation for this parameter. */
|
|
142
|
+
documentation?: string;
|
|
143
|
+
}
|
|
72
144
|
export interface ExtManifest {
|
|
73
145
|
id: string;
|
|
74
146
|
kind: ExtKind;
|
|
@@ -93,6 +165,10 @@ export interface ExtManifest {
|
|
|
93
165
|
summary?: string;
|
|
94
166
|
/** theme packs: the console colour themes this pack contributes. */
|
|
95
167
|
themes?: ThemeSpec[];
|
|
168
|
+
/** lang packs: curated IntelliSense (completion/hover/signature) for the
|
|
169
|
+
* pack's languages, since the console has no in-browser language server for
|
|
170
|
+
* anything but TypeScript. One entry per `monacoLang`. */
|
|
171
|
+
intellisense?: LangIntellisense[];
|
|
96
172
|
/** Built-in packs set this; published packs omit it. */
|
|
97
173
|
builtin?: boolean;
|
|
98
174
|
}
|