@next-bricks/vs 0.2.2 → 0.4.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/bricks.json +1 -1
- package/dist/chunks/2383.d28fda57.js +2 -0
- package/dist/chunks/2383.d28fda57.js.map +1 -0
- package/dist/chunks/code-editor.157372af.js +2 -0
- package/dist/chunks/code-editor.157372af.js.map +1 -0
- package/dist/chunks/main.edb98f31.js +2 -0
- package/dist/chunks/main.edb98f31.js.map +1 -0
- package/dist/index.a513d002.js +2 -0
- package/dist/index.a513d002.js.map +1 -0
- package/dist/manifest.json +21 -2
- package/dist/types.json +213 -93
- package/dist-types/code-editor/index.d.ts +29 -8
- package/dist-types/code-editor/utils/brickNextSourceMap.d.ts +17 -0
- package/dist-types/code-editor/utils/brickNextYaml.d.ts +4 -3
- package/dist-types/code-editor/utils/constants.d.ts +6 -0
- package/docs/code-editor.md +146 -27
- package/package.json +2 -2
- package/dist/chunks/9918.4c039a22.js +0 -2
- package/dist/chunks/9918.4c039a22.js.map +0 -1
- package/dist/chunks/code-editor.43b1b397.js +0 -2
- package/dist/chunks/code-editor.43b1b397.js.map +0 -1
- package/dist/chunks/main.876be1d3.js +0 -2
- package/dist/chunks/main.876be1d3.js.map +0 -1
- package/dist/index.d563b587.js +0 -2
- package/dist/index.d563b587.js.map +0 -1
package/dist/types.json
CHANGED
|
@@ -79,11 +79,119 @@
|
|
|
79
79
|
},
|
|
80
80
|
{
|
|
81
81
|
"name": "completers",
|
|
82
|
+
"annotation": {
|
|
83
|
+
"type": "array",
|
|
84
|
+
"elementType": {
|
|
85
|
+
"type": "reference",
|
|
86
|
+
"typeName": {
|
|
87
|
+
"type": "qualifiedName",
|
|
88
|
+
"left": {
|
|
89
|
+
"type": "qualifiedName",
|
|
90
|
+
"left": {
|
|
91
|
+
"type": "identifier",
|
|
92
|
+
"name": "monaco"
|
|
93
|
+
},
|
|
94
|
+
"right": {
|
|
95
|
+
"type": "identifier",
|
|
96
|
+
"name": "languages"
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"right": {
|
|
100
|
+
"type": "identifier",
|
|
101
|
+
"name": "CompletionItem"
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"name": "advancedCompleters",
|
|
82
109
|
"annotation": {
|
|
83
110
|
"type": "reference",
|
|
84
111
|
"typeName": {
|
|
85
112
|
"type": "identifier",
|
|
86
|
-
"name": "
|
|
113
|
+
"name": "Record"
|
|
114
|
+
},
|
|
115
|
+
"typeParameters": {
|
|
116
|
+
"type": "typeParameterInstantiation",
|
|
117
|
+
"params": [
|
|
118
|
+
{
|
|
119
|
+
"type": "keyword",
|
|
120
|
+
"value": "string"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"type": "typeLiteral",
|
|
124
|
+
"members": [
|
|
125
|
+
{
|
|
126
|
+
"type": "propertySignature",
|
|
127
|
+
"key": {
|
|
128
|
+
"type": "identifier",
|
|
129
|
+
"name": "triggerCharacter"
|
|
130
|
+
},
|
|
131
|
+
"annotation": {
|
|
132
|
+
"type": "keyword",
|
|
133
|
+
"value": "string"
|
|
134
|
+
},
|
|
135
|
+
"computed": false
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"type": "propertySignature",
|
|
139
|
+
"key": {
|
|
140
|
+
"type": "identifier",
|
|
141
|
+
"name": "completers"
|
|
142
|
+
},
|
|
143
|
+
"annotation": {
|
|
144
|
+
"type": "array",
|
|
145
|
+
"elementType": {
|
|
146
|
+
"type": "reference",
|
|
147
|
+
"typeName": {
|
|
148
|
+
"type": "qualifiedName",
|
|
149
|
+
"left": {
|
|
150
|
+
"type": "qualifiedName",
|
|
151
|
+
"left": {
|
|
152
|
+
"type": "identifier",
|
|
153
|
+
"name": "monaco"
|
|
154
|
+
},
|
|
155
|
+
"right": {
|
|
156
|
+
"type": "identifier",
|
|
157
|
+
"name": "languages"
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
"right": {
|
|
161
|
+
"type": "identifier",
|
|
162
|
+
"name": "CompletionItem"
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"computed": false
|
|
168
|
+
}
|
|
169
|
+
]
|
|
170
|
+
}
|
|
171
|
+
]
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"name": "markers",
|
|
177
|
+
"annotation": {
|
|
178
|
+
"type": "array",
|
|
179
|
+
"elementType": {
|
|
180
|
+
"type": "reference",
|
|
181
|
+
"typeName": {
|
|
182
|
+
"type": "identifier",
|
|
183
|
+
"name": "Marker"
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"name": "links",
|
|
190
|
+
"annotation": {
|
|
191
|
+
"type": "array",
|
|
192
|
+
"elementType": {
|
|
193
|
+
"type": "keyword",
|
|
194
|
+
"value": "string"
|
|
87
195
|
}
|
|
88
196
|
}
|
|
89
197
|
},
|
|
@@ -109,6 +217,13 @@
|
|
|
109
217
|
}
|
|
110
218
|
]
|
|
111
219
|
}
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"name": "message",
|
|
223
|
+
"annotation": {
|
|
224
|
+
"type": "keyword",
|
|
225
|
+
"value": "string"
|
|
226
|
+
}
|
|
112
227
|
}
|
|
113
228
|
],
|
|
114
229
|
"events": [
|
|
@@ -131,7 +246,7 @@
|
|
|
131
246
|
}
|
|
132
247
|
},
|
|
133
248
|
{
|
|
134
|
-
"name": "
|
|
249
|
+
"name": "token.click",
|
|
135
250
|
"detail": {
|
|
136
251
|
"annotation": {
|
|
137
252
|
"type": "keyword",
|
|
@@ -143,102 +258,107 @@
|
|
|
143
258
|
"methods": [],
|
|
144
259
|
"types": [
|
|
145
260
|
{
|
|
146
|
-
"type": "
|
|
147
|
-
"name": "
|
|
148
|
-
"
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
"
|
|
152
|
-
|
|
261
|
+
"type": "interface",
|
|
262
|
+
"name": "Marker",
|
|
263
|
+
"body": [
|
|
264
|
+
{
|
|
265
|
+
"type": "propertySignature",
|
|
266
|
+
"key": {
|
|
267
|
+
"type": "identifier",
|
|
268
|
+
"name": "token"
|
|
269
|
+
},
|
|
270
|
+
"annotation": {
|
|
271
|
+
"type": "keyword",
|
|
272
|
+
"value": "string"
|
|
273
|
+
},
|
|
274
|
+
"computed": false
|
|
153
275
|
},
|
|
154
|
-
|
|
155
|
-
"type": "
|
|
156
|
-
"
|
|
157
|
-
|
|
276
|
+
{
|
|
277
|
+
"type": "propertySignature",
|
|
278
|
+
"key": {
|
|
279
|
+
"type": "identifier",
|
|
280
|
+
"name": "level"
|
|
281
|
+
},
|
|
282
|
+
"annotation": {
|
|
283
|
+
"type": "typeOperator",
|
|
284
|
+
"operator": "keyof",
|
|
285
|
+
"annotation": {
|
|
286
|
+
"type": "typeQuery",
|
|
287
|
+
"exprName": {
|
|
288
|
+
"type": "identifier",
|
|
289
|
+
"name": "Level"
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
"computed": false
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
"type": "propertySignature",
|
|
297
|
+
"key": {
|
|
298
|
+
"type": "identifier",
|
|
299
|
+
"name": "message"
|
|
300
|
+
},
|
|
301
|
+
"annotation": {
|
|
302
|
+
"type": "keyword",
|
|
303
|
+
"value": "string"
|
|
304
|
+
},
|
|
305
|
+
"computed": false
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"type": "propertySignature",
|
|
309
|
+
"key": {
|
|
310
|
+
"type": "identifier",
|
|
311
|
+
"name": "code"
|
|
312
|
+
},
|
|
313
|
+
"annotation": {
|
|
314
|
+
"type": "typeLiteral",
|
|
315
|
+
"members": [
|
|
316
|
+
{
|
|
317
|
+
"type": "propertySignature",
|
|
318
|
+
"key": {
|
|
319
|
+
"type": "identifier",
|
|
320
|
+
"name": "value"
|
|
321
|
+
},
|
|
322
|
+
"annotation": {
|
|
323
|
+
"type": "keyword",
|
|
324
|
+
"value": "string"
|
|
325
|
+
},
|
|
326
|
+
"computed": false
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
"type": "propertySignature",
|
|
330
|
+
"key": {
|
|
331
|
+
"type": "identifier",
|
|
332
|
+
"name": "target"
|
|
333
|
+
},
|
|
334
|
+
"annotation": {
|
|
335
|
+
"type": "keyword",
|
|
336
|
+
"value": "string"
|
|
337
|
+
},
|
|
338
|
+
"computed": false
|
|
339
|
+
}
|
|
340
|
+
]
|
|
341
|
+
},
|
|
342
|
+
"optional": true,
|
|
343
|
+
"computed": false
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"type": "propertySignature",
|
|
347
|
+
"key": {
|
|
348
|
+
"type": "identifier",
|
|
349
|
+
"name": "params"
|
|
350
|
+
},
|
|
351
|
+
"annotation": {
|
|
352
|
+
"type": "array",
|
|
353
|
+
"elementType": {
|
|
158
354
|
"type": "keyword",
|
|
159
355
|
"value": "string"
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
"type": "union",
|
|
163
|
-
"types": [
|
|
164
|
-
{
|
|
165
|
-
"type": "array",
|
|
166
|
-
"elementType": {
|
|
167
|
-
"type": "reference",
|
|
168
|
-
"typeName": {
|
|
169
|
-
"type": "qualifiedName",
|
|
170
|
-
"left": {
|
|
171
|
-
"type": "qualifiedName",
|
|
172
|
-
"left": {
|
|
173
|
-
"type": "identifier",
|
|
174
|
-
"name": "monaco"
|
|
175
|
-
},
|
|
176
|
-
"right": {
|
|
177
|
-
"type": "identifier",
|
|
178
|
-
"name": "languages"
|
|
179
|
-
}
|
|
180
|
-
},
|
|
181
|
-
"right": {
|
|
182
|
-
"type": "identifier",
|
|
183
|
-
"name": "CompletionItem"
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
},
|
|
188
|
-
{
|
|
189
|
-
"type": "typeLiteral",
|
|
190
|
-
"members": [
|
|
191
|
-
{
|
|
192
|
-
"type": "propertySignature",
|
|
193
|
-
"key": {
|
|
194
|
-
"type": "identifier",
|
|
195
|
-
"name": "triggerCharacter"
|
|
196
|
-
},
|
|
197
|
-
"annotation": {
|
|
198
|
-
"type": "keyword",
|
|
199
|
-
"value": "string"
|
|
200
|
-
},
|
|
201
|
-
"computed": false
|
|
202
|
-
},
|
|
203
|
-
{
|
|
204
|
-
"type": "propertySignature",
|
|
205
|
-
"key": {
|
|
206
|
-
"type": "identifier",
|
|
207
|
-
"name": "list"
|
|
208
|
-
},
|
|
209
|
-
"annotation": {
|
|
210
|
-
"type": "array",
|
|
211
|
-
"elementType": {
|
|
212
|
-
"type": "reference",
|
|
213
|
-
"typeName": {
|
|
214
|
-
"type": "qualifiedName",
|
|
215
|
-
"left": {
|
|
216
|
-
"type": "qualifiedName",
|
|
217
|
-
"left": {
|
|
218
|
-
"type": "identifier",
|
|
219
|
-
"name": "monaco"
|
|
220
|
-
},
|
|
221
|
-
"right": {
|
|
222
|
-
"type": "identifier",
|
|
223
|
-
"name": "languages"
|
|
224
|
-
}
|
|
225
|
-
},
|
|
226
|
-
"right": {
|
|
227
|
-
"type": "identifier",
|
|
228
|
-
"name": "CompletionItem"
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
},
|
|
233
|
-
"computed": false
|
|
234
|
-
}
|
|
235
|
-
]
|
|
236
|
-
}
|
|
237
|
-
]
|
|
238
356
|
}
|
|
239
|
-
|
|
357
|
+
},
|
|
358
|
+
"optional": true,
|
|
359
|
+
"computed": false
|
|
240
360
|
}
|
|
241
|
-
|
|
361
|
+
]
|
|
242
362
|
}
|
|
243
363
|
]
|
|
244
364
|
}
|
|
@@ -3,10 +3,7 @@ import { FormItemElementBase } from "@next-shared/form";
|
|
|
3
3
|
import * as monaco from "monaco-editor/esm/vs/editor/editor.api.js";
|
|
4
4
|
import "@next-core/theme";
|
|
5
5
|
import "./index.css";
|
|
6
|
-
|
|
7
|
-
triggerCharacter: string;
|
|
8
|
-
list: monaco.languages.CompletionItem[];
|
|
9
|
-
}>;
|
|
6
|
+
import { Level } from "./utils/constants.js";
|
|
10
7
|
export interface CodeEditorProps {
|
|
11
8
|
name?: string;
|
|
12
9
|
label?: string;
|
|
@@ -19,7 +16,24 @@ export interface CodeEditorProps {
|
|
|
19
16
|
minLines?: number;
|
|
20
17
|
maxLines?: number;
|
|
21
18
|
height?: string | number;
|
|
22
|
-
completers?:
|
|
19
|
+
completers?: monaco.languages.CompletionItem[];
|
|
20
|
+
advancedCompleters?: Record<string, {
|
|
21
|
+
triggerCharacter: string;
|
|
22
|
+
completers: monaco.languages.CompletionItem[];
|
|
23
|
+
}>;
|
|
24
|
+
markers?: Marker[];
|
|
25
|
+
links?: string[];
|
|
26
|
+
validateState?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface Marker {
|
|
29
|
+
token: string;
|
|
30
|
+
level: keyof typeof Level;
|
|
31
|
+
message: string;
|
|
32
|
+
code?: {
|
|
33
|
+
value: string;
|
|
34
|
+
target: string;
|
|
35
|
+
};
|
|
36
|
+
params?: string[];
|
|
23
37
|
}
|
|
24
38
|
/**
|
|
25
39
|
* 构件 code-editor
|
|
@@ -47,16 +61,23 @@ export declare class CodeEditor extends FormItemElementBase implements CodeEdito
|
|
|
47
61
|
* @default 3
|
|
48
62
|
*/
|
|
49
63
|
accessor minLines: number | undefined;
|
|
50
|
-
accessor completers:
|
|
64
|
+
accessor completers: monaco.languages.CompletionItem[] | undefined;
|
|
65
|
+
accessor advancedCompleters: Record<string, {
|
|
66
|
+
triggerCharacter: string;
|
|
67
|
+
completers: monaco.languages.CompletionItem[];
|
|
68
|
+
}> | undefined;
|
|
69
|
+
accessor markers: Marker[] | undefined;
|
|
70
|
+
accessor links: string[] | undefined;
|
|
51
71
|
/**
|
|
52
72
|
* @default Infinity
|
|
53
73
|
*/
|
|
54
74
|
accessor maxLines: number | undefined;
|
|
55
75
|
accessor height: string | number | undefined;
|
|
76
|
+
accessor message: string | undefined;
|
|
56
77
|
connectedCallback(): void;
|
|
57
78
|
render(): JSX.Element;
|
|
58
79
|
}
|
|
59
|
-
export declare function CodeEditorComponent({ value: _value, language: _language, theme: _theme, minLines: _minLines, maxLines: _maxLines, height: _height, automaticLayout, completers, onChange, onHighlightClick, }: CodeEditorProps & {
|
|
60
|
-
onChange(value: string, isFlush: boolean): void;
|
|
80
|
+
export declare function CodeEditorComponent({ value: _value, language: _language, theme: _theme, minLines: _minLines, maxLines: _maxLines, height: _height, automaticLayout, completers, advancedCompleters, markers, links, validateState, onChange, onHighlightClick, }: CodeEditorProps & {
|
|
81
|
+
onChange(value: string, parseValue: any, isFlush: boolean): void;
|
|
61
82
|
onHighlightClick(word: string): void;
|
|
62
83
|
}): JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { State } from "js-yaml";
|
|
2
|
+
export interface Token {
|
|
3
|
+
startLineNumber: number;
|
|
4
|
+
endLineNumber: number;
|
|
5
|
+
startColumn: number;
|
|
6
|
+
endColumn: number;
|
|
7
|
+
source: string;
|
|
8
|
+
isString?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare class BrickNextYamlSourceMap {
|
|
11
|
+
#private;
|
|
12
|
+
constructor();
|
|
13
|
+
private handleState;
|
|
14
|
+
listen(): (event: "open" | "close", state: State) => void;
|
|
15
|
+
getTokens: () => Token[];
|
|
16
|
+
}
|
|
17
|
+
export default BrickNextYamlSourceMap;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as monaco from "monaco-editor/esm/vs/editor/editor.api.js";
|
|
2
|
-
import { Completers } from "../index.jsx";
|
|
3
2
|
export declare const isInEvaluateBody: (model: monaco.editor.ITextModel, position: monaco.Position) => boolean;
|
|
4
|
-
export declare const brickNextYAMLProvideCompletionItems: (completers?:
|
|
5
|
-
|
|
3
|
+
export declare const brickNextYAMLProvideCompletionItems: (completers?: monaco.languages.CompletionItem[], advancedCompleters?: Record<string, {
|
|
4
|
+
triggerCharacter: string;
|
|
5
|
+
completers: monaco.languages.CompletionItem[];
|
|
6
|
+
}> | undefined) => (model: monaco.editor.ITextModel, position: monaco.Position, context: monaco.languages.CompletionContext, _token: monaco.CancellationToken) => monaco.languages.ProviderResult<monaco.languages.CompletionList>;
|
package/docs/code-editor.md
CHANGED
|
@@ -78,40 +78,159 @@ children:
|
|
|
78
78
|
properties:
|
|
79
79
|
language: brick_next_yaml
|
|
80
80
|
value: |
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
81
|
+
basicUsige:
|
|
82
|
+
keyword:
|
|
83
|
+
Expression:
|
|
84
|
+
expression1: <% CTX.work %>
|
|
85
|
+
expression2: <% `${CTX.work}` %>
|
|
86
|
+
expression3:
|
|
87
|
+
test1: |
|
|
88
|
+
<%
|
|
89
|
+
CTX.a ? CTX.b : CTX.c
|
|
90
|
+
%>
|
|
91
|
+
test2: |-
|
|
92
|
+
<%
|
|
93
|
+
CTX.a ? CTX.b : CTX.c
|
|
94
|
+
%>
|
|
95
|
+
test3: >
|
|
96
|
+
<%
|
|
97
|
+
CTX.a ? CTX.b : CTX.c
|
|
98
|
+
%>
|
|
99
|
+
test4: >-
|
|
100
|
+
<%
|
|
101
|
+
CTX.a ? CTX.b : CTX.c
|
|
102
|
+
%>
|
|
103
|
+
expression4: "<% CTX.a ? CTX.b : CTX.c %>"
|
|
104
|
+
expression7: <% CTX.list.map(item => FN.getDetail(item, CTX.name)) %>
|
|
105
|
+
expression8: <% CTX.list.map(FN.getDetail) %>
|
|
106
|
+
expression9: |
|
|
107
|
+
<%
|
|
108
|
+
[
|
|
109
|
+
CTX.work,
|
|
110
|
+
CTX.work.a,
|
|
111
|
+
ACTX,
|
|
112
|
+
CTXA,
|
|
113
|
+
ACTX.noWork,
|
|
114
|
+
CTXA.noWork,
|
|
115
|
+
a.CTX.noWork,
|
|
116
|
+
]
|
|
117
|
+
%>
|
|
118
|
+
expression10: |
|
|
119
|
+
<%
|
|
120
|
+
"TPL is warn",
|
|
121
|
+
TPL.id
|
|
122
|
+
%>
|
|
123
|
+
expression11: |
|
|
124
|
+
<%
|
|
125
|
+
FN.getDetail(CTX.abc, CTX.efg) %>
|
|
126
|
+
expression12:
|
|
127
|
+
test1:
|
|
128
|
+
test2: <% CTX.name %>
|
|
129
|
+
test3: |
|
|
130
|
+
<%
|
|
131
|
+
CTX.name
|
|
132
|
+
%>
|
|
133
|
+
expression13: <%= CTX.b + CTX.c %>
|
|
134
|
+
expression14: |
|
|
135
|
+
<%=
|
|
136
|
+
APP.id + CTX.name
|
|
137
|
+
%>
|
|
138
|
+
expression15:
|
|
139
|
+
test1: |
|
|
140
|
+
<%
|
|
141
|
+
CTX.name %>
|
|
142
|
+
test2: |
|
|
143
|
+
<% CTX.name
|
|
144
|
+
%>
|
|
145
|
+
test3: |
|
|
146
|
+
<% "track context", CTX.name
|
|
147
|
+
%>
|
|
148
|
+
test4: |
|
|
149
|
+
<%
|
|
150
|
+
"track context", CTX.name
|
|
151
|
+
%>
|
|
152
|
+
test5: |
|
|
153
|
+
<%
|
|
154
|
+
"track context",
|
|
155
|
+
CTX.name
|
|
156
|
+
%>
|
|
157
|
+
test6: |
|
|
158
|
+
<% "track context",
|
|
159
|
+
CTX.name
|
|
160
|
+
%>
|
|
161
|
+
test7: |
|
|
162
|
+
<% "track context", CTX.name
|
|
163
|
+
exporession16:
|
|
164
|
+
- <% CTX.a %>
|
|
165
|
+
- CTX.b
|
|
166
|
+
- <% CTX.c %>
|
|
167
|
+
- <% "CTX.d" %>
|
|
168
|
+
markers:
|
|
169
|
+
hit:
|
|
170
|
+
PATH: <% PATH.instanceId %>
|
|
171
|
+
info:
|
|
172
|
+
QUERY: <% QUERY.info %>
|
|
173
|
+
warn:
|
|
174
|
+
ANCHOR: <% ANCHOR.id %>
|
|
175
|
+
error:
|
|
176
|
+
STATE: <% STATE.name %>
|
|
177
|
+
stringAndNoWork:
|
|
178
|
+
string1: CTX.noWork
|
|
179
|
+
string2: FN.getTest
|
|
180
|
+
string3: <% "FN.getTest(CTX.test)" %>
|
|
95
181
|
automaticLayout: fit-content
|
|
182
|
+
links:
|
|
183
|
+
- CTX
|
|
184
|
+
- FN
|
|
185
|
+
markers:
|
|
186
|
+
- token: CTX
|
|
187
|
+
params:
|
|
188
|
+
- a
|
|
189
|
+
- b
|
|
190
|
+
- token: PATH
|
|
191
|
+
message: “这是 PATH”
|
|
192
|
+
level: hit
|
|
193
|
+
- token: QUERY
|
|
194
|
+
message: “这是 QUERY”
|
|
195
|
+
level: info
|
|
196
|
+
- token: ANCHOR
|
|
197
|
+
message: “这是 ANCHOR“
|
|
198
|
+
level: warn
|
|
199
|
+
- token: STATE
|
|
200
|
+
message: "这里不能写 STATE"
|
|
201
|
+
level: error
|
|
202
|
+
code:
|
|
203
|
+
value: "详情地址"
|
|
204
|
+
target: https://brick-next.js.org/docs/concepts/context
|
|
205
|
+
- token: TPL
|
|
206
|
+
level: warn
|
|
207
|
+
message: 不允许写入TPL
|
|
96
208
|
completers:
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
209
|
+
- label: buttonName
|
|
210
|
+
detail: string
|
|
211
|
+
- label: buttonType
|
|
212
|
+
detail: "primary|default|link|danger"
|
|
213
|
+
- label: buttonSize
|
|
214
|
+
insertText: size
|
|
215
|
+
advancedCompleters:
|
|
104
216
|
target:
|
|
105
217
|
triggerCharacter: ":"
|
|
106
|
-
|
|
218
|
+
completers:
|
|
107
219
|
- label: a
|
|
108
220
|
- label: b
|
|
109
221
|
CTX:
|
|
110
|
-
|
|
111
|
-
|
|
222
|
+
triggerCharacter: "."
|
|
223
|
+
completers:
|
|
224
|
+
- label: pageTitle
|
|
225
|
+
- label: name
|
|
112
226
|
FN:
|
|
113
|
-
|
|
114
|
-
|
|
227
|
+
triggerCharacter: "."
|
|
228
|
+
completers:
|
|
229
|
+
- label: getPageDetail
|
|
230
|
+
- label: getInstance
|
|
115
231
|
PATH:
|
|
116
|
-
|
|
232
|
+
triggerCharacter: "."
|
|
233
|
+
completers:
|
|
234
|
+
- label: instanceId
|
|
235
|
+
- label: name
|
|
117
236
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@next-bricks/vs",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"homepage": "https://github.com/easyops-cn/next-bricks/tree/master/bricks/vs",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"@next-core/test-next": "^1.0.7",
|
|
39
39
|
"resize-observer-polyfill": "^1.5.1"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "1d1d029906b29f94be440bc2d5c93db819034443"
|
|
42
42
|
}
|