@stacksjs/stx-vscode 0.2.351
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/LICENSE.md +21 -0
- package/README.md +33 -0
- package/dist/assets/languages/stx.configuration.json +67 -0
- package/dist/assets/snippets/stx-components.json +11 -0
- package/dist/assets/snippets/stx-directives.json +74 -0
- package/dist/assets/snippets/stx.json +479 -0
- package/dist/assets/syntaxes/stx.tmLanguage.json +441 -0
- package/dist/contributes.json +168 -0
- package/dist/index.d.ts +48 -0
- package/dist/index.js +6985 -0
- package/package.json +48 -0
|
@@ -0,0 +1,441 @@
|
|
|
1
|
+
{
|
|
2
|
+
"scopeName": "text.html.ts.stx",
|
|
3
|
+
"name": "stx",
|
|
4
|
+
"fileTypes": ["stx"],
|
|
5
|
+
"patterns": [
|
|
6
|
+
{
|
|
7
|
+
"include": "#stx"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"include": "text.html.derivative"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"injections": {
|
|
14
|
+
"text.html.ts.stx - (meta.embedded | meta.tag | comment.block.stx), L:(text.html.ts.stx meta.tag - (comment.block.stx | meta.embedded.block.stx)), L:(source.js.embedded.html - (comment.block.stx | meta.embedded.block.stx))": {
|
|
15
|
+
"patterns": [
|
|
16
|
+
{
|
|
17
|
+
"include": "#stx"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"repository": {
|
|
23
|
+
"stx": {
|
|
24
|
+
"patterns": [
|
|
25
|
+
{
|
|
26
|
+
"begin": "(<)(script)(?=[\\s>])",
|
|
27
|
+
"beginCaptures": {
|
|
28
|
+
"1": {
|
|
29
|
+
"name": "punctuation.definition.tag.begin.html"
|
|
30
|
+
},
|
|
31
|
+
"2": {
|
|
32
|
+
"name": "entity.name.tag.script.html"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"end": "(</)(script)(>)",
|
|
36
|
+
"endCaptures": {
|
|
37
|
+
"1": {
|
|
38
|
+
"name": "punctuation.definition.tag.begin.html"
|
|
39
|
+
},
|
|
40
|
+
"2": {
|
|
41
|
+
"name": "entity.name.tag.script.html"
|
|
42
|
+
},
|
|
43
|
+
"3": {
|
|
44
|
+
"name": "punctuation.definition.tag.end.html"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"name": "meta.tag.script.html",
|
|
48
|
+
"patterns": [
|
|
49
|
+
{
|
|
50
|
+
"begin": "(?<=>)(?!</)",
|
|
51
|
+
"end": "(?=</script)",
|
|
52
|
+
"name": "source.js.embedded.html",
|
|
53
|
+
"patterns": [
|
|
54
|
+
{
|
|
55
|
+
"include": "#stx"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"include": "source.js"
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"include": "text.html.derivative#tag-stuff"
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"begin": "(<)(style)(?=[\\s>])",
|
|
69
|
+
"beginCaptures": {
|
|
70
|
+
"1": {
|
|
71
|
+
"name": "punctuation.definition.tag.begin.html"
|
|
72
|
+
},
|
|
73
|
+
"2": {
|
|
74
|
+
"name": "entity.name.tag.style.html"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"end": "(</)(style)(>)",
|
|
78
|
+
"endCaptures": {
|
|
79
|
+
"1": {
|
|
80
|
+
"name": "punctuation.definition.tag.begin.html"
|
|
81
|
+
},
|
|
82
|
+
"2": {
|
|
83
|
+
"name": "entity.name.tag.style.html"
|
|
84
|
+
},
|
|
85
|
+
"3": {
|
|
86
|
+
"name": "punctuation.definition.tag.end.html"
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"name": "meta.tag.style.html",
|
|
90
|
+
"patterns": [
|
|
91
|
+
{
|
|
92
|
+
"begin": "(?<=>)(?!</)",
|
|
93
|
+
"end": "(?=</style)",
|
|
94
|
+
"name": "source.css.embedded.html",
|
|
95
|
+
"patterns": [
|
|
96
|
+
{
|
|
97
|
+
"include": "source.css"
|
|
98
|
+
}
|
|
99
|
+
]
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"include": "text.html.derivative#tag-stuff"
|
|
103
|
+
}
|
|
104
|
+
]
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"begin": "{{--",
|
|
108
|
+
"beginCaptures": {
|
|
109
|
+
"0": {
|
|
110
|
+
"name": "punctuation.definition.comment.begin.stx"
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"end": "--}}",
|
|
114
|
+
"endCaptures": {
|
|
115
|
+
"0": {
|
|
116
|
+
"name": "punctuation.definition.comment.end.stx"
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"name": "comment.block.stx"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"begin": "(?<!@){{{",
|
|
123
|
+
"beginCaptures": {
|
|
124
|
+
"0": {
|
|
125
|
+
"name": "support.function.construct.begin.stx"
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"contentName": "source.ts",
|
|
129
|
+
"end": "}}}",
|
|
130
|
+
"endCaptures": {
|
|
131
|
+
"0": {
|
|
132
|
+
"name": "support.function.construct.end.stx"
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"name": "meta.function.echo.stx",
|
|
136
|
+
"patterns": [
|
|
137
|
+
{
|
|
138
|
+
"include": "source.ts"
|
|
139
|
+
}
|
|
140
|
+
]
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"begin": "(?<![@{]){{",
|
|
144
|
+
"beginCaptures": {
|
|
145
|
+
"0": {
|
|
146
|
+
"name": "support.function.construct.begin.stx"
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
"contentName": "source.ts",
|
|
150
|
+
"end": "}}",
|
|
151
|
+
"endCaptures": {
|
|
152
|
+
"0": {
|
|
153
|
+
"name": "support.function.construct.end.stx"
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"name": "meta.function.echo.stx",
|
|
157
|
+
"patterns": [
|
|
158
|
+
{
|
|
159
|
+
"include": "source.ts"
|
|
160
|
+
}
|
|
161
|
+
]
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"begin": "(?<!@){!!",
|
|
165
|
+
"beginCaptures": {
|
|
166
|
+
"0": {
|
|
167
|
+
"name": "support.function.construct.begin.stx"
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"contentName": "source.ts",
|
|
171
|
+
"end": "!!}",
|
|
172
|
+
"endCaptures": {
|
|
173
|
+
"0": {
|
|
174
|
+
"name": "support.function.construct.end.stx"
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
"name": "meta.function.echo.stx",
|
|
178
|
+
"patterns": [
|
|
179
|
+
{
|
|
180
|
+
"include": "source.ts"
|
|
181
|
+
}
|
|
182
|
+
]
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"begin": "(@){{",
|
|
186
|
+
"beginCaptures": {
|
|
187
|
+
"0": {
|
|
188
|
+
"name": "support.function.construct.begin.stx"
|
|
189
|
+
},
|
|
190
|
+
"1": {
|
|
191
|
+
"name": "variable.other.stx"
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
"contentName": "source.ts",
|
|
195
|
+
"end": "}}",
|
|
196
|
+
"endCaptures": {
|
|
197
|
+
"0": {
|
|
198
|
+
"name": "support.function.construct.end.stx"
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
"name": "meta.function.echo.stx",
|
|
202
|
+
"patterns": [
|
|
203
|
+
{
|
|
204
|
+
"include": "source.ts"
|
|
205
|
+
}
|
|
206
|
+
]
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"begin": "(?x)(?<![A-Za-z0-9_@]) (@ (?i:\n animationGroup\n |auth\n |break\n |can\n |canany\n |cannot\n |case\n |checked\n |choice\n |component\n |continue\n |css\n |csrf\n |dd\n |disabled\n |dump\n |each\n |elsecan\n |elsecanany\n |elsecannot\n |elseif\n |empty\n |env\n |error\n |extends\n |for\n |foreach\n |forelse\n |guest\n |hassection\n |if\n |include\n |includefirst\n |includeif\n |includeunless\n |includewhen\n |inject\n |isset\n |js\n |json\n |lang\n |locale\n |method\n |motion\n |once\n |prepend\n |prependOnce\n |props\n |push\n |pushIf\n |pushOnce\n |readonly\n |required\n |scrollAnimate\n |section\n |sectionMissing\n |selected\n |slot\n |stack\n |style\n |switch\n |t\n |translate\n |transition\n |unless\n |unset\n |use\n |webcomponent\n |while\n |yield\n )[\\t ]*\n)(\\() # Followed by opening parentheses\n",
|
|
210
|
+
"beginCaptures": {
|
|
211
|
+
"1": {
|
|
212
|
+
"name": "keyword.stx"
|
|
213
|
+
},
|
|
214
|
+
"2": {
|
|
215
|
+
"name": "begin.bracket.round.stx"
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
"contentName": "source.ts",
|
|
219
|
+
"end": "\\)",
|
|
220
|
+
"endCaptures": {
|
|
221
|
+
"0": {
|
|
222
|
+
"name": "end.bracket.round.stx"
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
"name": "meta.directive.stx",
|
|
226
|
+
"patterns": [
|
|
227
|
+
{
|
|
228
|
+
"include": "source.ts"
|
|
229
|
+
}
|
|
230
|
+
]
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"match": "(?x)(?<![A-Za-z0-9_@]) @(?: append\n |break\n |continue\n |default\n |each\n |else\n |overwrite\n |parent\n |sectionMissing\n |show\n |stack\n |stop\n)\\b\n",
|
|
234
|
+
"name": "keyword.stx"
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"begin": "(?<![A-Za-z0-9_@])@(?i:ts)\\b",
|
|
238
|
+
"beginCaptures": {
|
|
239
|
+
"0": {
|
|
240
|
+
"name": "keyword.control.directive.stx"
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
"end": "(?<![A-Za-z0-9_@])@(?i:endts)\\b",
|
|
244
|
+
"endCaptures": {
|
|
245
|
+
"0": {
|
|
246
|
+
"name": "keyword.control.directive.stx"
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
"patterns": [
|
|
250
|
+
{
|
|
251
|
+
"include": "source.ts"
|
|
252
|
+
}
|
|
253
|
+
],
|
|
254
|
+
"contentName": "source.ts",
|
|
255
|
+
"name": "meta.embedded.block.ts"
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
"match": "(?x)(?<![A-Za-z0-9_@]) @(end)? (?i: auth\n |can\n |canany\n |cannot\n |component\n |css\n |empty\n |env\n |error\n |for\n |foreach\n |forelse\n |guest\n |if\n |isset\n |js\n |lang\n |markdown\n |motion\n |once\n |prepend\n |prependOnce\n |push\n |pushIf\n |pushOnce\n |raw\n |script\n |scrollAnimate\n |section\n |session\n |slot\n |switch\n |transition\n |unless\n |verbatim\n |webcomponent\n |while\n)\\b\n",
|
|
259
|
+
"name": "keyword.stx"
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"begin": "(?<![A-Za-z0-9_@])@(?i:js)\\b",
|
|
263
|
+
"beginCaptures": {
|
|
264
|
+
"0": {
|
|
265
|
+
"name": "keyword.control.directive.stx"
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
"end": "(?<![A-Za-z0-9_@])@(?i:endjs)\\b",
|
|
269
|
+
"endCaptures": {
|
|
270
|
+
"0": {
|
|
271
|
+
"name": "keyword.control.directive.stx"
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
"patterns": [
|
|
275
|
+
{
|
|
276
|
+
"include": "source.js"
|
|
277
|
+
}
|
|
278
|
+
],
|
|
279
|
+
"contentName": "source.js",
|
|
280
|
+
"name": "meta.embedded.block.js"
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"begin": "(?<![A-Za-z0-9_@])@(?i:script)\\b",
|
|
284
|
+
"beginCaptures": {
|
|
285
|
+
"0": {
|
|
286
|
+
"name": "keyword.control.directive.stx"
|
|
287
|
+
}
|
|
288
|
+
},
|
|
289
|
+
"end": "(?<![A-Za-z0-9_@])@(?i:endscript)\\b",
|
|
290
|
+
"endCaptures": {
|
|
291
|
+
"0": {
|
|
292
|
+
"name": "keyword.control.directive.stx"
|
|
293
|
+
}
|
|
294
|
+
},
|
|
295
|
+
"patterns": [
|
|
296
|
+
{
|
|
297
|
+
"include": "source.ts"
|
|
298
|
+
}
|
|
299
|
+
],
|
|
300
|
+
"contentName": "source.ts",
|
|
301
|
+
"name": "meta.embedded.block.script"
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
"begin": "(?<![A-Za-z0-9_@])@(?i:css)\\b",
|
|
305
|
+
"beginCaptures": {
|
|
306
|
+
"0": {
|
|
307
|
+
"name": "keyword.control.directive.stx"
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
"end": "(?<![A-Za-z0-9_@])@(?i:endcss)\\b",
|
|
311
|
+
"endCaptures": {
|
|
312
|
+
"0": {
|
|
313
|
+
"name": "keyword.control.directive.stx"
|
|
314
|
+
}
|
|
315
|
+
},
|
|
316
|
+
"patterns": [
|
|
317
|
+
{
|
|
318
|
+
"include": "source.css"
|
|
319
|
+
}
|
|
320
|
+
],
|
|
321
|
+
"contentName": "source.css",
|
|
322
|
+
"name": "meta.embedded.block.css"
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
"begin": "(?<![A-Za-z0-9_@])@(?i:markdown)\\b",
|
|
326
|
+
"beginCaptures": {
|
|
327
|
+
"0": {
|
|
328
|
+
"name": "keyword.control.directive.stx"
|
|
329
|
+
}
|
|
330
|
+
},
|
|
331
|
+
"end": "(?<![A-Za-z0-9_@])@(?i:endmarkdown)\\b",
|
|
332
|
+
"endCaptures": {
|
|
333
|
+
"0": {
|
|
334
|
+
"name": "keyword.control.directive.stx"
|
|
335
|
+
}
|
|
336
|
+
},
|
|
337
|
+
"patterns": [
|
|
338
|
+
{
|
|
339
|
+
"include": "text.html.markdown"
|
|
340
|
+
}
|
|
341
|
+
],
|
|
342
|
+
"contentName": "text.html.markdown",
|
|
343
|
+
"name": "meta.embedded.block.markdown"
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"begin": "(?<![A-Za-z0-9_@])@(?i:raw|verbatim)\\b",
|
|
347
|
+
"beginCaptures": {
|
|
348
|
+
"0": {
|
|
349
|
+
"name": "keyword.control.directive.stx"
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
"end": "(?<![A-Za-z0-9_@])@(?i:end(?:raw|verbatim))\\b",
|
|
353
|
+
"endCaptures": {
|
|
354
|
+
"0": {
|
|
355
|
+
"name": "keyword.control.directive.stx"
|
|
356
|
+
}
|
|
357
|
+
},
|
|
358
|
+
"contentName": "string.unquoted.raw",
|
|
359
|
+
"name": "meta.embedded.block.raw"
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
"begin": "(?x)(?<![A-Za-z0-9_@]) (@\\w+(?:::w+)?[\\t ]*) (\\() # Followed by opening parentheses",
|
|
363
|
+
"beginCaptures": {
|
|
364
|
+
"1": {
|
|
365
|
+
"name": "entity.name.function.stx"
|
|
366
|
+
},
|
|
367
|
+
"2": {
|
|
368
|
+
"name": "begin.bracket.round.stx"
|
|
369
|
+
}
|
|
370
|
+
},
|
|
371
|
+
"contentName": "source.ts",
|
|
372
|
+
"end": "\\)",
|
|
373
|
+
"endCaptures": {
|
|
374
|
+
"0": {
|
|
375
|
+
"name": "end.bracket.round.stx"
|
|
376
|
+
}
|
|
377
|
+
},
|
|
378
|
+
"name": "meta.directive.custom.stx",
|
|
379
|
+
"patterns": [
|
|
380
|
+
{
|
|
381
|
+
"include": "source.ts"
|
|
382
|
+
}
|
|
383
|
+
]
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
"match": "(?x)(?<![A-Za-z0-9_@]) @\\w+(?:::w+)?\\b",
|
|
387
|
+
"name": "entity.name.function.stx"
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
"begin": "(:[a-z-]+)(=)(\")",
|
|
391
|
+
"beginCaptures": {
|
|
392
|
+
"0": {
|
|
393
|
+
"name": "meta.attribute.directive.stx"
|
|
394
|
+
},
|
|
395
|
+
"1": {
|
|
396
|
+
"name": "entity.other.attribute-name.stx"
|
|
397
|
+
},
|
|
398
|
+
"2": {
|
|
399
|
+
"name": "punctuation.separator.key-value.stx"
|
|
400
|
+
},
|
|
401
|
+
"3": {
|
|
402
|
+
"name": "string.quoted.double.stx"
|
|
403
|
+
}
|
|
404
|
+
},
|
|
405
|
+
"end": "(\")",
|
|
406
|
+
"endCaptures": {
|
|
407
|
+
"0": {
|
|
408
|
+
"name": "string.quoted.double.stx"
|
|
409
|
+
},
|
|
410
|
+
"1": {
|
|
411
|
+
"name": "punctuation.definition.string.end.stx"
|
|
412
|
+
}
|
|
413
|
+
},
|
|
414
|
+
"contentName": "source.ts",
|
|
415
|
+
"patterns": [
|
|
416
|
+
{
|
|
417
|
+
"include": "source.ts"
|
|
418
|
+
}
|
|
419
|
+
]
|
|
420
|
+
}
|
|
421
|
+
]
|
|
422
|
+
},
|
|
423
|
+
"balance_brackets": {
|
|
424
|
+
"patterns": [
|
|
425
|
+
{
|
|
426
|
+
"begin": "\\(",
|
|
427
|
+
"end": "\\)",
|
|
428
|
+
"patterns": [
|
|
429
|
+
{
|
|
430
|
+
"include": "#balance_brackets"
|
|
431
|
+
}
|
|
432
|
+
]
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
"match": "[^()]+"
|
|
436
|
+
}
|
|
437
|
+
]
|
|
438
|
+
}
|
|
439
|
+
},
|
|
440
|
+
"uuid": "stx-tmlanguage"
|
|
441
|
+
}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
{
|
|
2
|
+
"languages": [
|
|
3
|
+
{
|
|
4
|
+
"id": "stx",
|
|
5
|
+
"aliases": [
|
|
6
|
+
"stx",
|
|
7
|
+
"STX"
|
|
8
|
+
],
|
|
9
|
+
"extensions": [
|
|
10
|
+
".stx"
|
|
11
|
+
],
|
|
12
|
+
"configuration": "./languages/stx.configuration.json"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"grammars": [
|
|
16
|
+
{
|
|
17
|
+
"language": "stx",
|
|
18
|
+
"scopeName": "text.html.ts.stx",
|
|
19
|
+
"path": "./syntaxes/stx.tmLanguage.json",
|
|
20
|
+
"embeddedLanguages": {
|
|
21
|
+
"source.css": "css",
|
|
22
|
+
"source.js": "javascript",
|
|
23
|
+
"source.ts": "typescript",
|
|
24
|
+
"meta.embedded.block.typescript": "typescript",
|
|
25
|
+
"meta.embedded.block.javascript": "javascript",
|
|
26
|
+
"meta.embedded.line.typescript": "typescript",
|
|
27
|
+
"meta.component.parameters.stx": "typescript"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
"snippets": [
|
|
32
|
+
{
|
|
33
|
+
"language": "stx",
|
|
34
|
+
"path": "./snippets/stx.json"
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"commands": [
|
|
38
|
+
{
|
|
39
|
+
"command": "stx.sortClasses",
|
|
40
|
+
"title": "Sort Utility Classes",
|
|
41
|
+
"category": "stx"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"command": "css.reload",
|
|
45
|
+
"title": "Css: Reload Configuration"
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
"configuration": {
|
|
49
|
+
"title": "stx",
|
|
50
|
+
"properties": {
|
|
51
|
+
"stxTypescriptPlugin.enabled": {
|
|
52
|
+
"type": "boolean",
|
|
53
|
+
"default": true,
|
|
54
|
+
"description": "Enable TypeScript language features in stx files"
|
|
55
|
+
},
|
|
56
|
+
"stx.diagnostics.enable": {
|
|
57
|
+
"type": "boolean",
|
|
58
|
+
"default": true,
|
|
59
|
+
"description": "Enable diagnostics (errors and warnings) for stx files"
|
|
60
|
+
},
|
|
61
|
+
"stx.diagnostics.validateUnclosedDirectives": {
|
|
62
|
+
"type": "boolean",
|
|
63
|
+
"default": true,
|
|
64
|
+
"description": "Validate unclosed directives like @if without @endif"
|
|
65
|
+
},
|
|
66
|
+
"stx.diagnostics.validateMismatchedDirectives": {
|
|
67
|
+
"type": "boolean",
|
|
68
|
+
"default": true,
|
|
69
|
+
"description": "Validate mismatched directives like @if closed with @endforeach"
|
|
70
|
+
},
|
|
71
|
+
"stx.diagnostics.validateTemplatePaths": {
|
|
72
|
+
"type": "boolean",
|
|
73
|
+
"default": true,
|
|
74
|
+
"description": "Validate that template paths in @include and @component directives exist"
|
|
75
|
+
},
|
|
76
|
+
"stx.completion.enable": {
|
|
77
|
+
"type": "boolean",
|
|
78
|
+
"default": true,
|
|
79
|
+
"description": "Enable auto-completion for stx directives"
|
|
80
|
+
},
|
|
81
|
+
"stx.completion.showSnippets": {
|
|
82
|
+
"type": "boolean",
|
|
83
|
+
"default": true,
|
|
84
|
+
"description": "Show snippet completions with placeholders for directive parameters"
|
|
85
|
+
},
|
|
86
|
+
"stx.hover.enable": {
|
|
87
|
+
"type": "boolean",
|
|
88
|
+
"default": true,
|
|
89
|
+
"description": "Enable hover documentation for stx directives"
|
|
90
|
+
},
|
|
91
|
+
"stx.hover.showExamples": {
|
|
92
|
+
"type": "boolean",
|
|
93
|
+
"default": true,
|
|
94
|
+
"description": "Show code examples in hover documentation"
|
|
95
|
+
},
|
|
96
|
+
"stx.codeActions.enable": {
|
|
97
|
+
"type": "boolean",
|
|
98
|
+
"default": true,
|
|
99
|
+
"description": "Enable quick fixes and code actions"
|
|
100
|
+
},
|
|
101
|
+
"stx.folding.enable": {
|
|
102
|
+
"type": "boolean",
|
|
103
|
+
"default": true,
|
|
104
|
+
"description": "Enable code folding for directive blocks"
|
|
105
|
+
},
|
|
106
|
+
"stx.semanticHighlighting.enable": {
|
|
107
|
+
"type": "boolean",
|
|
108
|
+
"default": true,
|
|
109
|
+
"description": "Enable semantic syntax highlighting for directives"
|
|
110
|
+
},
|
|
111
|
+
"stx.utilityClasses.enable": {
|
|
112
|
+
"type": "boolean",
|
|
113
|
+
"default": true,
|
|
114
|
+
"description": "Enable utility class features (tooltips, color previews, sorting)"
|
|
115
|
+
},
|
|
116
|
+
"stx.utilityClasses.framework": {
|
|
117
|
+
"type": "string",
|
|
118
|
+
"enum": [
|
|
119
|
+
"tailwind",
|
|
120
|
+
"unocss",
|
|
121
|
+
"auto"
|
|
122
|
+
],
|
|
123
|
+
"default": "auto",
|
|
124
|
+
"markdownDescription": "Utility CSS framework to use. `auto` will detect from config files"
|
|
125
|
+
},
|
|
126
|
+
"stx.utilityClasses.colorPreview": {
|
|
127
|
+
"type": "boolean",
|
|
128
|
+
"default": true,
|
|
129
|
+
"description": "Show inline color decorations for color utility classes"
|
|
130
|
+
},
|
|
131
|
+
"stx.utilityClasses.hoverPreview": {
|
|
132
|
+
"type": "boolean",
|
|
133
|
+
"default": true,
|
|
134
|
+
"description": "Show CSS output when hovering over utility classes"
|
|
135
|
+
},
|
|
136
|
+
"stx.utilityClasses.underline": {
|
|
137
|
+
"type": "boolean",
|
|
138
|
+
"default": true,
|
|
139
|
+
"description": "Underline matched utility classes"
|
|
140
|
+
},
|
|
141
|
+
"stx.utilityClasses.sortOnSave": {
|
|
142
|
+
"type": "boolean",
|
|
143
|
+
"default": false,
|
|
144
|
+
"description": "Automatically sort utility classes on file save"
|
|
145
|
+
},
|
|
146
|
+
"stx.utilityClasses.colorPreviewRadius": {
|
|
147
|
+
"type": "string",
|
|
148
|
+
"default": "0",
|
|
149
|
+
"description": "Border radius for color preview blocks ('0' for square like Tailwind, '50%' for circle)"
|
|
150
|
+
},
|
|
151
|
+
"stx.utilityClasses.selectionStyle": {
|
|
152
|
+
"type": "boolean",
|
|
153
|
+
"default": false,
|
|
154
|
+
"description": "Show CSS preview for selected utility classes"
|
|
155
|
+
},
|
|
156
|
+
"stx.utilityClasses.autocomplete": {
|
|
157
|
+
"type": "boolean",
|
|
158
|
+
"default": true,
|
|
159
|
+
"description": "Enable autocomplete for utility classes"
|
|
160
|
+
},
|
|
161
|
+
"css.remToPxRatio": {
|
|
162
|
+
"type": "number",
|
|
163
|
+
"default": 16,
|
|
164
|
+
"description": "Rem to px conversion ratio for hover previews"
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The embedding API of `@stacksjs/stx-vscode`.
|
|
3
|
+
*
|
|
4
|
+
* Written by hand rather than generated: the implementation (packages/vscode/src)
|
|
5
|
+
* is typed against `@types/vscode`, and generating from it would make every
|
|
6
|
+
* consumer install those types to read four functions.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/** The marketplace ID of the standalone stx extension. */
|
|
10
|
+
export declare const STX_EXTENSION_ID: 'Stacks.vscode-stx'
|
|
11
|
+
|
|
12
|
+
/** The marketplace ID of the Stacks framework extension, which embeds this package. */
|
|
13
|
+
export declare const STACKS_EXTENSION_ID: 'Stacks.vscode-stacks'
|
|
14
|
+
|
|
15
|
+
/** The part of `vscode.ExtensionContext` stx support uses. */
|
|
16
|
+
export interface StxExtensionContext {
|
|
17
|
+
subscriptions: Array<{ dispose: () => unknown }>
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface StxLanguageOptions {
|
|
21
|
+
/**
|
|
22
|
+
* The directory holding the `snippets/`, `syntaxes/` and `languages/`
|
|
23
|
+
* assets: this package's `dist/assets`, copied into the embedding extension.
|
|
24
|
+
*/
|
|
25
|
+
assetsPath: string
|
|
26
|
+
/**
|
|
27
|
+
* Offer the stx snippets as completions. Leave it off when the snippets are
|
|
28
|
+
* in your manifest, or when the stx extension is installed and contributes
|
|
29
|
+
* them already.
|
|
30
|
+
*/
|
|
31
|
+
snippets?: boolean
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Register all of stx's runtime language support: hovers, completions,
|
|
36
|
+
* diagnostics, go to definition, document links, folding, semantic tokens,
|
|
37
|
+
* code actions, utility-class previews, and the `stx.sortClasses` and
|
|
38
|
+
* `css.reload` commands. Everything is added to `context.subscriptions`.
|
|
39
|
+
*
|
|
40
|
+
* Call it at most once per window. The stx extension stands down only for
|
|
41
|
+
* `Stacks.vscode-stacks`, and only once that extension's `activate` resolves
|
|
42
|
+
* to `{ stx: { active: true } }`, so return that from `activate` after this
|
|
43
|
+
* resolves. Any other embedding extension would register everything twice
|
|
44
|
+
* next to the stx extension.
|
|
45
|
+
*/
|
|
46
|
+
export declare function activateStxLanguage(context: StxExtensionContext, options: StxLanguageOptions): Promise<void>
|
|
47
|
+
|
|
48
|
+
export declare function deactivateStxLanguage(): void
|