@kong-ui-public/monaco-editor 0.3.0 → 0.3.1-pr.2622.ca1f578c8.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/package.json +1 -1
- package/dist/abap-CrvW7_qN.js +0 -1398
- package/dist/apex-BAOI8p1v.js +0 -327
- package/dist/assets/css.worker-Cb0JI69t.js +0 -93
- package/dist/assets/editor.worker-DzMH9hFo.js +0 -26
- package/dist/assets/html.worker-BNFZMwEc.js +0 -470
- package/dist/assets/json.worker-BCybXpia.js +0 -58
- package/dist/assets/ts.worker-DAVh1bw1.js +0 -67731
- package/dist/azcli-BlCk_UqW.js +0 -68
- package/dist/bat-DPoEelVx.js +0 -100
- package/dist/bicep-Cp1F394l.js +0 -102
- package/dist/cameligo-CWqtSlQs.js +0 -174
- package/dist/clojure-CKBp32Gf.js +0 -761
- package/dist/coffee-CDo6vc-J.js +0 -232
- package/dist/cpp-DokufPgf.js +0 -389
- package/dist/csharp-BQi3szM0.js +0 -326
- package/dist/csp-BSGtCCZ-.js +0 -53
- package/dist/css-DEPFDJfb.js +0 -187
- package/dist/cssMode-BoaW_8EY.js +0 -141
- package/dist/cypher-DAb1vOxS.js +0 -263
- package/dist/dart-C8p4jewR.js +0 -281
- package/dist/dockerfile-DP0iLFPN.js +0 -130
- package/dist/ecl-BDQHA6fi.js +0 -456
- package/dist/elixir-D4II6kDM.js +0 -569
- package/dist/flow9-StcnL-VB.js +0 -142
- package/dist/freemarker2-DLxAEbra.js +0 -982
- package/dist/fsharp-DdUVp3EN.js +0 -217
- package/dist/go-D1-I258M.js +0 -218
- package/dist/graphql-DWkL3f8U.js +0 -151
- package/dist/handlebars-H1fAc7pY.js +0 -412
- package/dist/hcl-D_0MNifv.js +0 -183
- package/dist/html-Bjh5RSoV.js +0 -301
- package/dist/htmlMode-XE4-FvOp.js +0 -152
- package/dist/index-BtAApC8Z.js +0 -129109
- package/dist/ini-C4I2-MT7.js +0 -71
- package/dist/java-OBvaP_SS.js +0 -232
- package/dist/javascript-BL-y8a3N.js +0 -70
- package/dist/jsonMode-BO164Oml.js +0 -569
- package/dist/julia-BmDH8Kkf.js +0 -511
- package/dist/kotlin-Dhu5AGOD.js +0 -252
- package/dist/less-CzmjXREq.js +0 -162
- package/dist/lexon-CV2c4pN9.js +0 -157
- package/dist/liquid-B4OW2xCW.js +0 -233
- package/dist/lspLanguageFeatures-CLOLvtro.js +0 -1458
- package/dist/lua-CFY5U8qF.js +0 -162
- package/dist/m3-BL_AnZVh.js +0 -210
- package/dist/markdown-CWKQPXCv.js +0 -229
- package/dist/mdx-BscoYQtT.js +0 -158
- package/dist/mips-ButYmJ5E.js +0 -198
- package/dist/monaco-editor.es.js +0 -5
- package/dist/monaco-editor.umd.js +0 -1234
- package/dist/msdax-C3cnXqDh.js +0 -375
- package/dist/mysql-YlSHaf6G.js +0 -878
- package/dist/objective-c-Dwnlproe.js +0 -183
- package/dist/pascal-UzGbSWEN.js +0 -251
- package/dist/pascaligo-CslTgu68.js +0 -164
- package/dist/perl-oj6r_mgw.js +0 -626
- package/dist/pgsql-DSBO0Mev.js +0 -851
- package/dist/php-YzCD--7j.js +0 -500
- package/dist/pla-CmylB8vQ.js +0 -137
- package/dist/postiats-CLFW5gNY.js +0 -907
- package/dist/powerquery-CmOWUvlh.js +0 -890
- package/dist/powershell-fHQcmBLK.js +0 -239
- package/dist/protobuf-p5BArb-9.js +0 -420
- package/dist/pug-gVdUDvqf.js +0 -402
- package/dist/python-CdwN88xa.js +0 -294
- package/dist/qsharp-DnrWSUlt.js +0 -301
- package/dist/r-Cv309K2z.js +0 -243
- package/dist/razor-BzIEQn-i.js +0 -543
- package/dist/redis-DTcS4wMj.js +0 -302
- package/dist/redshift-hLxZVESM.js +0 -809
- package/dist/restructuredtext-C898lK4f.js +0 -174
- package/dist/ruby-CgKtnJIQ.js +0 -511
- package/dist/rust-bj8oxVnh.js +0 -343
- package/dist/sb-DWynz26l.js +0 -115
- package/dist/scala-BL5z1UEd.js +0 -370
- package/dist/scheme-DUJsH6VU.js +0 -108
- package/dist/scss-CxjmhvaL.js +0 -262
- package/dist/shell-D14Zs1dF.js +0 -221
- package/dist/solidity-WyRm-BGK.js +0 -1367
- package/dist/sophia-CKk-_Oa5.js +0 -199
- package/dist/sparql-DHtmINMZ.js +0 -201
- package/dist/sql-Dqaj5JHC.js +0 -853
- package/dist/st-Bj2IIaop.js +0 -416
- package/dist/style.css +0 -1
- package/dist/swift-DwxP72iM.js +0 -312
- package/dist/systemverilog-D7wJfuql.js +0 -576
- package/dist/tcl-0ApMt-eC.js +0 -232
- package/dist/tsMode-Bm7Ao8a0.js +0 -946
- package/dist/twig-DxwbdmvQ.js +0 -392
- package/dist/types/components/MonacoEditor.vue.d.ts +0 -52
- package/dist/types/components/MonacoEditor.vue.d.ts.map +0 -1
- package/dist/types/components/MonacoEditorStatusOverlay.vue.d.ts +0 -19
- package/dist/types/components/MonacoEditorStatusOverlay.vue.d.ts.map +0 -1
- package/dist/types/composables/useI18n.d.ts +0 -9
- package/dist/types/composables/useI18n.d.ts.map +0 -1
- package/dist/types/composables/useMonacoEditor.d.ts +0 -25
- package/dist/types/composables/useMonacoEditor.d.ts.map +0 -1
- package/dist/types/constants/index.d.ts +0 -3
- package/dist/types/constants/index.d.ts.map +0 -1
- package/dist/types/index.d.ts +0 -5
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/tests/mocks/monaco-editor-api.d.ts +0 -2
- package/dist/types/tests/mocks/monaco-editor-api.d.ts.map +0 -1
- package/dist/types/types/index.d.ts +0 -69
- package/dist/types/types/index.d.ts.map +0 -1
- package/dist/typescript-xVL7xVgf.js +0 -336
- package/dist/typespec-Fd-JwSuS.js +0 -117
- package/dist/vb-CxuyYE1I.js +0 -372
- package/dist/wgsl-DoEGc31J.js +0 -439
- package/dist/xml-5AZvXygb.js +0 -88
- package/dist/yaml-BpKYQQZ4.js +0 -199
|
@@ -1,412 +0,0 @@
|
|
|
1
|
-
import { l as e } from "./index-BtAApC8Z.js";
|
|
2
|
-
const t = [
|
|
3
|
-
"area",
|
|
4
|
-
"base",
|
|
5
|
-
"br",
|
|
6
|
-
"col",
|
|
7
|
-
"embed",
|
|
8
|
-
"hr",
|
|
9
|
-
"img",
|
|
10
|
-
"input",
|
|
11
|
-
"keygen",
|
|
12
|
-
"link",
|
|
13
|
-
"menuitem",
|
|
14
|
-
"meta",
|
|
15
|
-
"param",
|
|
16
|
-
"source",
|
|
17
|
-
"track",
|
|
18
|
-
"wbr"
|
|
19
|
-
], a = {
|
|
20
|
-
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,
|
|
21
|
-
comments: {
|
|
22
|
-
blockComment: ["{{!--", "--}}"]
|
|
23
|
-
},
|
|
24
|
-
brackets: [
|
|
25
|
-
["<!--", "-->"],
|
|
26
|
-
["<", ">"],
|
|
27
|
-
["{{", "}}"],
|
|
28
|
-
["{", "}"],
|
|
29
|
-
["(", ")"]
|
|
30
|
-
],
|
|
31
|
-
autoClosingPairs: [
|
|
32
|
-
{ open: "{", close: "}" },
|
|
33
|
-
{ open: "[", close: "]" },
|
|
34
|
-
{ open: "(", close: ")" },
|
|
35
|
-
{ open: '"', close: '"' },
|
|
36
|
-
{ open: "'", close: "'" }
|
|
37
|
-
],
|
|
38
|
-
surroundingPairs: [
|
|
39
|
-
{ open: "<", close: ">" },
|
|
40
|
-
{ open: '"', close: '"' },
|
|
41
|
-
{ open: "'", close: "'" }
|
|
42
|
-
],
|
|
43
|
-
onEnterRules: [
|
|
44
|
-
{
|
|
45
|
-
beforeText: new RegExp(
|
|
46
|
-
`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,
|
|
47
|
-
"i"
|
|
48
|
-
),
|
|
49
|
-
afterText: /^<\/(\w[\w\d]*)\s*>$/i,
|
|
50
|
-
action: {
|
|
51
|
-
indentAction: e.IndentAction.IndentOutdent
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
beforeText: new RegExp(
|
|
56
|
-
`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,
|
|
57
|
-
"i"
|
|
58
|
-
),
|
|
59
|
-
action: { indentAction: e.IndentAction.Indent }
|
|
60
|
-
}
|
|
61
|
-
]
|
|
62
|
-
}, m = {
|
|
63
|
-
defaultToken: "",
|
|
64
|
-
tokenPostfix: "",
|
|
65
|
-
// ignoreCase: true,
|
|
66
|
-
// The main tokenizer for our languages
|
|
67
|
-
tokenizer: {
|
|
68
|
-
root: [
|
|
69
|
-
[/\{\{!--/, "comment.block.start.handlebars", "@commentBlock"],
|
|
70
|
-
[/\{\{!/, "comment.start.handlebars", "@comment"],
|
|
71
|
-
[/\{\{/, { token: "@rematch", switchTo: "@handlebarsInSimpleState.root" }],
|
|
72
|
-
[/<!DOCTYPE/, "metatag.html", "@doctype"],
|
|
73
|
-
[/<!--/, "comment.html", "@commentHtml"],
|
|
74
|
-
[/(<)(\w+)(\/>)/, ["delimiter.html", "tag.html", "delimiter.html"]],
|
|
75
|
-
[/(<)(script)/, ["delimiter.html", { token: "tag.html", next: "@script" }]],
|
|
76
|
-
[/(<)(style)/, ["delimiter.html", { token: "tag.html", next: "@style" }]],
|
|
77
|
-
[/(<)([:\w]+)/, ["delimiter.html", { token: "tag.html", next: "@otherTag" }]],
|
|
78
|
-
[/(<\/)(\w+)/, ["delimiter.html", { token: "tag.html", next: "@otherTag" }]],
|
|
79
|
-
[/</, "delimiter.html"],
|
|
80
|
-
[/\{/, "delimiter.html"],
|
|
81
|
-
[/[^<{]+/]
|
|
82
|
-
// text
|
|
83
|
-
],
|
|
84
|
-
doctype: [
|
|
85
|
-
[
|
|
86
|
-
/\{\{/,
|
|
87
|
-
{
|
|
88
|
-
token: "@rematch",
|
|
89
|
-
switchTo: "@handlebarsInSimpleState.comment"
|
|
90
|
-
}
|
|
91
|
-
],
|
|
92
|
-
[/[^>]+/, "metatag.content.html"],
|
|
93
|
-
[/>/, "metatag.html", "@pop"]
|
|
94
|
-
],
|
|
95
|
-
comment: [
|
|
96
|
-
[/\}\}/, "comment.end.handlebars", "@pop"],
|
|
97
|
-
[/./, "comment.content.handlebars"]
|
|
98
|
-
],
|
|
99
|
-
commentBlock: [
|
|
100
|
-
[/--\}\}/, "comment.block.end.handlebars", "@pop"],
|
|
101
|
-
[/./, "comment.content.handlebars"]
|
|
102
|
-
],
|
|
103
|
-
commentHtml: [
|
|
104
|
-
[
|
|
105
|
-
/\{\{/,
|
|
106
|
-
{
|
|
107
|
-
token: "@rematch",
|
|
108
|
-
switchTo: "@handlebarsInSimpleState.comment"
|
|
109
|
-
}
|
|
110
|
-
],
|
|
111
|
-
[/-->/, "comment.html", "@pop"],
|
|
112
|
-
[/[^-]+/, "comment.content.html"],
|
|
113
|
-
[/./, "comment.content.html"]
|
|
114
|
-
],
|
|
115
|
-
otherTag: [
|
|
116
|
-
[
|
|
117
|
-
/\{\{/,
|
|
118
|
-
{
|
|
119
|
-
token: "@rematch",
|
|
120
|
-
switchTo: "@handlebarsInSimpleState.otherTag"
|
|
121
|
-
}
|
|
122
|
-
],
|
|
123
|
-
[/\/?>/, "delimiter.html", "@pop"],
|
|
124
|
-
[/"([^"]*)"/, "attribute.value"],
|
|
125
|
-
[/'([^']*)'/, "attribute.value"],
|
|
126
|
-
[/[\w\-]+/, "attribute.name"],
|
|
127
|
-
[/=/, "delimiter"],
|
|
128
|
-
[/[ \t\r\n]+/]
|
|
129
|
-
// whitespace
|
|
130
|
-
],
|
|
131
|
-
// -- BEGIN <script> tags handling
|
|
132
|
-
// After <script
|
|
133
|
-
script: [
|
|
134
|
-
[
|
|
135
|
-
/\{\{/,
|
|
136
|
-
{
|
|
137
|
-
token: "@rematch",
|
|
138
|
-
switchTo: "@handlebarsInSimpleState.script"
|
|
139
|
-
}
|
|
140
|
-
],
|
|
141
|
-
[/type/, "attribute.name", "@scriptAfterType"],
|
|
142
|
-
[/"([^"]*)"/, "attribute.value"],
|
|
143
|
-
[/'([^']*)'/, "attribute.value"],
|
|
144
|
-
[/[\w\-]+/, "attribute.name"],
|
|
145
|
-
[/=/, "delimiter"],
|
|
146
|
-
[
|
|
147
|
-
/>/,
|
|
148
|
-
{
|
|
149
|
-
token: "delimiter.html",
|
|
150
|
-
next: "@scriptEmbedded.text/javascript",
|
|
151
|
-
nextEmbedded: "text/javascript"
|
|
152
|
-
}
|
|
153
|
-
],
|
|
154
|
-
[/[ \t\r\n]+/],
|
|
155
|
-
// whitespace
|
|
156
|
-
[
|
|
157
|
-
/(<\/)(script\s*)(>)/,
|
|
158
|
-
["delimiter.html", "tag.html", { token: "delimiter.html", next: "@pop" }]
|
|
159
|
-
]
|
|
160
|
-
],
|
|
161
|
-
// After <script ... type
|
|
162
|
-
scriptAfterType: [
|
|
163
|
-
[
|
|
164
|
-
/\{\{/,
|
|
165
|
-
{
|
|
166
|
-
token: "@rematch",
|
|
167
|
-
switchTo: "@handlebarsInSimpleState.scriptAfterType"
|
|
168
|
-
}
|
|
169
|
-
],
|
|
170
|
-
[/=/, "delimiter", "@scriptAfterTypeEquals"],
|
|
171
|
-
[
|
|
172
|
-
/>/,
|
|
173
|
-
{
|
|
174
|
-
token: "delimiter.html",
|
|
175
|
-
next: "@scriptEmbedded.text/javascript",
|
|
176
|
-
nextEmbedded: "text/javascript"
|
|
177
|
-
}
|
|
178
|
-
],
|
|
179
|
-
// cover invalid e.g. <script type>
|
|
180
|
-
[/[ \t\r\n]+/],
|
|
181
|
-
// whitespace
|
|
182
|
-
[/<\/script\s*>/, { token: "@rematch", next: "@pop" }]
|
|
183
|
-
],
|
|
184
|
-
// After <script ... type =
|
|
185
|
-
scriptAfterTypeEquals: [
|
|
186
|
-
[
|
|
187
|
-
/\{\{/,
|
|
188
|
-
{
|
|
189
|
-
token: "@rematch",
|
|
190
|
-
switchTo: "@handlebarsInSimpleState.scriptAfterTypeEquals"
|
|
191
|
-
}
|
|
192
|
-
],
|
|
193
|
-
[
|
|
194
|
-
/"([^"]*)"/,
|
|
195
|
-
{
|
|
196
|
-
token: "attribute.value",
|
|
197
|
-
switchTo: "@scriptWithCustomType.$1"
|
|
198
|
-
}
|
|
199
|
-
],
|
|
200
|
-
[
|
|
201
|
-
/'([^']*)'/,
|
|
202
|
-
{
|
|
203
|
-
token: "attribute.value",
|
|
204
|
-
switchTo: "@scriptWithCustomType.$1"
|
|
205
|
-
}
|
|
206
|
-
],
|
|
207
|
-
[
|
|
208
|
-
/>/,
|
|
209
|
-
{
|
|
210
|
-
token: "delimiter.html",
|
|
211
|
-
next: "@scriptEmbedded.text/javascript",
|
|
212
|
-
nextEmbedded: "text/javascript"
|
|
213
|
-
}
|
|
214
|
-
],
|
|
215
|
-
// cover invalid e.g. <script type=>
|
|
216
|
-
[/[ \t\r\n]+/],
|
|
217
|
-
// whitespace
|
|
218
|
-
[/<\/script\s*>/, { token: "@rematch", next: "@pop" }]
|
|
219
|
-
],
|
|
220
|
-
// After <script ... type = $S2
|
|
221
|
-
scriptWithCustomType: [
|
|
222
|
-
[
|
|
223
|
-
/\{\{/,
|
|
224
|
-
{
|
|
225
|
-
token: "@rematch",
|
|
226
|
-
switchTo: "@handlebarsInSimpleState.scriptWithCustomType.$S2"
|
|
227
|
-
}
|
|
228
|
-
],
|
|
229
|
-
[
|
|
230
|
-
/>/,
|
|
231
|
-
{
|
|
232
|
-
token: "delimiter.html",
|
|
233
|
-
next: "@scriptEmbedded.$S2",
|
|
234
|
-
nextEmbedded: "$S2"
|
|
235
|
-
}
|
|
236
|
-
],
|
|
237
|
-
[/"([^"]*)"/, "attribute.value"],
|
|
238
|
-
[/'([^']*)'/, "attribute.value"],
|
|
239
|
-
[/[\w\-]+/, "attribute.name"],
|
|
240
|
-
[/=/, "delimiter"],
|
|
241
|
-
[/[ \t\r\n]+/],
|
|
242
|
-
// whitespace
|
|
243
|
-
[/<\/script\s*>/, { token: "@rematch", next: "@pop" }]
|
|
244
|
-
],
|
|
245
|
-
scriptEmbedded: [
|
|
246
|
-
[
|
|
247
|
-
/\{\{/,
|
|
248
|
-
{
|
|
249
|
-
token: "@rematch",
|
|
250
|
-
switchTo: "@handlebarsInEmbeddedState.scriptEmbedded.$S2",
|
|
251
|
-
nextEmbedded: "@pop"
|
|
252
|
-
}
|
|
253
|
-
],
|
|
254
|
-
[/<\/script/, { token: "@rematch", next: "@pop", nextEmbedded: "@pop" }]
|
|
255
|
-
],
|
|
256
|
-
// -- END <script> tags handling
|
|
257
|
-
// -- BEGIN <style> tags handling
|
|
258
|
-
// After <style
|
|
259
|
-
style: [
|
|
260
|
-
[
|
|
261
|
-
/\{\{/,
|
|
262
|
-
{
|
|
263
|
-
token: "@rematch",
|
|
264
|
-
switchTo: "@handlebarsInSimpleState.style"
|
|
265
|
-
}
|
|
266
|
-
],
|
|
267
|
-
[/type/, "attribute.name", "@styleAfterType"],
|
|
268
|
-
[/"([^"]*)"/, "attribute.value"],
|
|
269
|
-
[/'([^']*)'/, "attribute.value"],
|
|
270
|
-
[/[\w\-]+/, "attribute.name"],
|
|
271
|
-
[/=/, "delimiter"],
|
|
272
|
-
[
|
|
273
|
-
/>/,
|
|
274
|
-
{
|
|
275
|
-
token: "delimiter.html",
|
|
276
|
-
next: "@styleEmbedded.text/css",
|
|
277
|
-
nextEmbedded: "text/css"
|
|
278
|
-
}
|
|
279
|
-
],
|
|
280
|
-
[/[ \t\r\n]+/],
|
|
281
|
-
// whitespace
|
|
282
|
-
[
|
|
283
|
-
/(<\/)(style\s*)(>)/,
|
|
284
|
-
["delimiter.html", "tag.html", { token: "delimiter.html", next: "@pop" }]
|
|
285
|
-
]
|
|
286
|
-
],
|
|
287
|
-
// After <style ... type
|
|
288
|
-
styleAfterType: [
|
|
289
|
-
[
|
|
290
|
-
/\{\{/,
|
|
291
|
-
{
|
|
292
|
-
token: "@rematch",
|
|
293
|
-
switchTo: "@handlebarsInSimpleState.styleAfterType"
|
|
294
|
-
}
|
|
295
|
-
],
|
|
296
|
-
[/=/, "delimiter", "@styleAfterTypeEquals"],
|
|
297
|
-
[
|
|
298
|
-
/>/,
|
|
299
|
-
{
|
|
300
|
-
token: "delimiter.html",
|
|
301
|
-
next: "@styleEmbedded.text/css",
|
|
302
|
-
nextEmbedded: "text/css"
|
|
303
|
-
}
|
|
304
|
-
],
|
|
305
|
-
// cover invalid e.g. <style type>
|
|
306
|
-
[/[ \t\r\n]+/],
|
|
307
|
-
// whitespace
|
|
308
|
-
[/<\/style\s*>/, { token: "@rematch", next: "@pop" }]
|
|
309
|
-
],
|
|
310
|
-
// After <style ... type =
|
|
311
|
-
styleAfterTypeEquals: [
|
|
312
|
-
[
|
|
313
|
-
/\{\{/,
|
|
314
|
-
{
|
|
315
|
-
token: "@rematch",
|
|
316
|
-
switchTo: "@handlebarsInSimpleState.styleAfterTypeEquals"
|
|
317
|
-
}
|
|
318
|
-
],
|
|
319
|
-
[
|
|
320
|
-
/"([^"]*)"/,
|
|
321
|
-
{
|
|
322
|
-
token: "attribute.value",
|
|
323
|
-
switchTo: "@styleWithCustomType.$1"
|
|
324
|
-
}
|
|
325
|
-
],
|
|
326
|
-
[
|
|
327
|
-
/'([^']*)'/,
|
|
328
|
-
{
|
|
329
|
-
token: "attribute.value",
|
|
330
|
-
switchTo: "@styleWithCustomType.$1"
|
|
331
|
-
}
|
|
332
|
-
],
|
|
333
|
-
[
|
|
334
|
-
/>/,
|
|
335
|
-
{
|
|
336
|
-
token: "delimiter.html",
|
|
337
|
-
next: "@styleEmbedded.text/css",
|
|
338
|
-
nextEmbedded: "text/css"
|
|
339
|
-
}
|
|
340
|
-
],
|
|
341
|
-
// cover invalid e.g. <style type=>
|
|
342
|
-
[/[ \t\r\n]+/],
|
|
343
|
-
// whitespace
|
|
344
|
-
[/<\/style\s*>/, { token: "@rematch", next: "@pop" }]
|
|
345
|
-
],
|
|
346
|
-
// After <style ... type = $S2
|
|
347
|
-
styleWithCustomType: [
|
|
348
|
-
[
|
|
349
|
-
/\{\{/,
|
|
350
|
-
{
|
|
351
|
-
token: "@rematch",
|
|
352
|
-
switchTo: "@handlebarsInSimpleState.styleWithCustomType.$S2"
|
|
353
|
-
}
|
|
354
|
-
],
|
|
355
|
-
[
|
|
356
|
-
/>/,
|
|
357
|
-
{
|
|
358
|
-
token: "delimiter.html",
|
|
359
|
-
next: "@styleEmbedded.$S2",
|
|
360
|
-
nextEmbedded: "$S2"
|
|
361
|
-
}
|
|
362
|
-
],
|
|
363
|
-
[/"([^"]*)"/, "attribute.value"],
|
|
364
|
-
[/'([^']*)'/, "attribute.value"],
|
|
365
|
-
[/[\w\-]+/, "attribute.name"],
|
|
366
|
-
[/=/, "delimiter"],
|
|
367
|
-
[/[ \t\r\n]+/],
|
|
368
|
-
// whitespace
|
|
369
|
-
[/<\/style\s*>/, { token: "@rematch", next: "@pop" }]
|
|
370
|
-
],
|
|
371
|
-
styleEmbedded: [
|
|
372
|
-
[
|
|
373
|
-
/\{\{/,
|
|
374
|
-
{
|
|
375
|
-
token: "@rematch",
|
|
376
|
-
switchTo: "@handlebarsInEmbeddedState.styleEmbedded.$S2",
|
|
377
|
-
nextEmbedded: "@pop"
|
|
378
|
-
}
|
|
379
|
-
],
|
|
380
|
-
[/<\/style/, { token: "@rematch", next: "@pop", nextEmbedded: "@pop" }]
|
|
381
|
-
],
|
|
382
|
-
// -- END <style> tags handling
|
|
383
|
-
handlebarsInSimpleState: [
|
|
384
|
-
[/\{\{\{?/, "delimiter.handlebars"],
|
|
385
|
-
[/\}\}\}?/, { token: "delimiter.handlebars", switchTo: "@$S2.$S3" }],
|
|
386
|
-
{ include: "handlebarsRoot" }
|
|
387
|
-
],
|
|
388
|
-
handlebarsInEmbeddedState: [
|
|
389
|
-
[/\{\{\{?/, "delimiter.handlebars"],
|
|
390
|
-
[
|
|
391
|
-
/\}\}\}?/,
|
|
392
|
-
{
|
|
393
|
-
token: "delimiter.handlebars",
|
|
394
|
-
switchTo: "@$S2.$S3",
|
|
395
|
-
nextEmbedded: "$S3"
|
|
396
|
-
}
|
|
397
|
-
],
|
|
398
|
-
{ include: "handlebarsRoot" }
|
|
399
|
-
],
|
|
400
|
-
handlebarsRoot: [
|
|
401
|
-
[/"[^"]*"/, "string.handlebars"],
|
|
402
|
-
[/[#/][^\s}]+/, "keyword.helper.handlebars"],
|
|
403
|
-
[/else\b/, "keyword.helper.handlebars"],
|
|
404
|
-
[/[\s]+/],
|
|
405
|
-
[/[^}]/, "variable.parameter.handlebars"]
|
|
406
|
-
]
|
|
407
|
-
}
|
|
408
|
-
};
|
|
409
|
-
export {
|
|
410
|
-
a as conf,
|
|
411
|
-
m as language
|
|
412
|
-
};
|
package/dist/hcl-D_0MNifv.js
DELETED
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
const e = {
|
|
2
|
-
comments: {
|
|
3
|
-
lineComment: "#",
|
|
4
|
-
blockComment: ["/*", "*/"]
|
|
5
|
-
},
|
|
6
|
-
brackets: [
|
|
7
|
-
["{", "}"],
|
|
8
|
-
["[", "]"],
|
|
9
|
-
["(", ")"]
|
|
10
|
-
],
|
|
11
|
-
autoClosingPairs: [
|
|
12
|
-
{ open: "{", close: "}" },
|
|
13
|
-
{ open: "[", close: "]" },
|
|
14
|
-
{ open: "(", close: ")" },
|
|
15
|
-
{ open: '"', close: '"', notIn: ["string"] }
|
|
16
|
-
],
|
|
17
|
-
surroundingPairs: [
|
|
18
|
-
{ open: "{", close: "}" },
|
|
19
|
-
{ open: "[", close: "]" },
|
|
20
|
-
{ open: "(", close: ")" },
|
|
21
|
-
{ open: '"', close: '"' }
|
|
22
|
-
]
|
|
23
|
-
}, t = {
|
|
24
|
-
defaultToken: "",
|
|
25
|
-
tokenPostfix: ".hcl",
|
|
26
|
-
keywords: [
|
|
27
|
-
"var",
|
|
28
|
-
"local",
|
|
29
|
-
"path",
|
|
30
|
-
"for_each",
|
|
31
|
-
"any",
|
|
32
|
-
"string",
|
|
33
|
-
"number",
|
|
34
|
-
"bool",
|
|
35
|
-
"true",
|
|
36
|
-
"false",
|
|
37
|
-
"null",
|
|
38
|
-
"if ",
|
|
39
|
-
"else ",
|
|
40
|
-
"endif ",
|
|
41
|
-
"for ",
|
|
42
|
-
"in",
|
|
43
|
-
"endfor"
|
|
44
|
-
],
|
|
45
|
-
operators: [
|
|
46
|
-
"=",
|
|
47
|
-
">=",
|
|
48
|
-
"<=",
|
|
49
|
-
"==",
|
|
50
|
-
"!=",
|
|
51
|
-
"+",
|
|
52
|
-
"-",
|
|
53
|
-
"*",
|
|
54
|
-
"/",
|
|
55
|
-
"%",
|
|
56
|
-
"&&",
|
|
57
|
-
"||",
|
|
58
|
-
"!",
|
|
59
|
-
"<",
|
|
60
|
-
">",
|
|
61
|
-
"?",
|
|
62
|
-
"...",
|
|
63
|
-
":"
|
|
64
|
-
],
|
|
65
|
-
symbols: /[=><!~?:&|+\-*\/\^%]+/,
|
|
66
|
-
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
|
67
|
-
terraformFunctions: /(abs|ceil|floor|log|max|min|pow|signum|chomp|format|formatlist|indent|join|lower|regex|regexall|replace|split|strrev|substr|title|trimspace|upper|chunklist|coalesce|coalescelist|compact|concat|contains|distinct|element|flatten|index|keys|length|list|lookup|map|matchkeys|merge|range|reverse|setintersection|setproduct|setunion|slice|sort|transpose|values|zipmap|base64decode|base64encode|base64gzip|csvdecode|jsondecode|jsonencode|urlencode|yamldecode|yamlencode|abspath|dirname|pathexpand|basename|file|fileexists|fileset|filebase64|templatefile|formatdate|timeadd|timestamp|base64sha256|base64sha512|bcrypt|filebase64sha256|filebase64sha512|filemd5|filemd1|filesha256|filesha512|md5|rsadecrypt|sha1|sha256|sha512|uuid|uuidv5|cidrhost|cidrnetmask|cidrsubnet|tobool|tolist|tomap|tonumber|toset|tostring)/,
|
|
68
|
-
terraformMainBlocks: /(module|data|terraform|resource|provider|variable|output|locals)/,
|
|
69
|
-
tokenizer: {
|
|
70
|
-
root: [
|
|
71
|
-
// highlight main blocks
|
|
72
|
-
[
|
|
73
|
-
/^@terraformMainBlocks([ \t]*)([\w-]+|"[\w-]+"|)([ \t]*)([\w-]+|"[\w-]+"|)([ \t]*)(\{)/,
|
|
74
|
-
["type", "", "string", "", "string", "", "@brackets"]
|
|
75
|
-
],
|
|
76
|
-
// highlight all the remaining blocks
|
|
77
|
-
[
|
|
78
|
-
/(\w+[ \t]+)([ \t]*)([\w-]+|"[\w-]+"|)([ \t]*)([\w-]+|"[\w-]+"|)([ \t]*)(\{)/,
|
|
79
|
-
["identifier", "", "string", "", "string", "", "@brackets"]
|
|
80
|
-
],
|
|
81
|
-
// highlight block
|
|
82
|
-
[
|
|
83
|
-
/(\w+[ \t]+)([ \t]*)([\w-]+|"[\w-]+"|)([ \t]*)([\w-]+|"[\w-]+"|)(=)(\{)/,
|
|
84
|
-
["identifier", "", "string", "", "operator", "", "@brackets"]
|
|
85
|
-
],
|
|
86
|
-
// terraform general highlight - shared with expressions
|
|
87
|
-
{ include: "@terraform" }
|
|
88
|
-
],
|
|
89
|
-
terraform: [
|
|
90
|
-
// highlight terraform functions
|
|
91
|
-
[/@terraformFunctions(\()/, ["type", "@brackets"]],
|
|
92
|
-
// all other words are variables or keywords
|
|
93
|
-
[
|
|
94
|
-
/[a-zA-Z_]\w*-*/,
|
|
95
|
-
// must work with variables such as foo-bar and also with negative numbers
|
|
96
|
-
{
|
|
97
|
-
cases: {
|
|
98
|
-
"@keywords": { token: "keyword.$0" },
|
|
99
|
-
"@default": "variable"
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
],
|
|
103
|
-
{ include: "@whitespace" },
|
|
104
|
-
{ include: "@heredoc" },
|
|
105
|
-
// delimiters and operators
|
|
106
|
-
[/[{}()\[\]]/, "@brackets"],
|
|
107
|
-
[/[<>](?!@symbols)/, "@brackets"],
|
|
108
|
-
[
|
|
109
|
-
/@symbols/,
|
|
110
|
-
{
|
|
111
|
-
cases: {
|
|
112
|
-
"@operators": "operator",
|
|
113
|
-
"@default": ""
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
],
|
|
117
|
-
// numbers
|
|
118
|
-
[/\d*\d+[eE]([\-+]?\d+)?/, "number.float"],
|
|
119
|
-
[/\d*\.\d+([eE][\-+]?\d+)?/, "number.float"],
|
|
120
|
-
[/\d[\d']*/, "number"],
|
|
121
|
-
[/\d/, "number"],
|
|
122
|
-
[/[;,.]/, "delimiter"],
|
|
123
|
-
// delimiter: after number because of .\d floats
|
|
124
|
-
// strings
|
|
125
|
-
[/"/, "string", "@string"],
|
|
126
|
-
// this will include expressions
|
|
127
|
-
[/'/, "invalid"]
|
|
128
|
-
],
|
|
129
|
-
heredoc: [
|
|
130
|
-
[/<<[-]*\s*["]?([\w\-]+)["]?/, { token: "string.heredoc.delimiter", next: "@heredocBody.$1" }]
|
|
131
|
-
],
|
|
132
|
-
heredocBody: [
|
|
133
|
-
[
|
|
134
|
-
/([\w\-]+)$/,
|
|
135
|
-
{
|
|
136
|
-
cases: {
|
|
137
|
-
"$1==$S2": [
|
|
138
|
-
{
|
|
139
|
-
token: "string.heredoc.delimiter",
|
|
140
|
-
next: "@popall"
|
|
141
|
-
}
|
|
142
|
-
],
|
|
143
|
-
"@default": "string.heredoc"
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
],
|
|
147
|
-
[/./, "string.heredoc"]
|
|
148
|
-
],
|
|
149
|
-
whitespace: [
|
|
150
|
-
[/[ \t\r\n]+/, ""],
|
|
151
|
-
[/\/\*/, "comment", "@comment"],
|
|
152
|
-
[/\/\/.*$/, "comment"],
|
|
153
|
-
[/#.*$/, "comment"]
|
|
154
|
-
],
|
|
155
|
-
comment: [
|
|
156
|
-
[/[^\/*]+/, "comment"],
|
|
157
|
-
[/\*\//, "comment", "@pop"],
|
|
158
|
-
[/[\/*]/, "comment"]
|
|
159
|
-
],
|
|
160
|
-
string: [
|
|
161
|
-
[/\$\{/, { token: "delimiter", next: "@stringExpression" }],
|
|
162
|
-
[/[^\\"\$]+/, "string"],
|
|
163
|
-
[/@escapes/, "string.escape"],
|
|
164
|
-
[/\\./, "string.escape.invalid"],
|
|
165
|
-
[/"/, "string", "@popall"]
|
|
166
|
-
],
|
|
167
|
-
stringInsideExpression: [
|
|
168
|
-
[/[^\\"]+/, "string"],
|
|
169
|
-
[/@escapes/, "string.escape"],
|
|
170
|
-
[/\\./, "string.escape.invalid"],
|
|
171
|
-
[/"/, "string", "@pop"]
|
|
172
|
-
],
|
|
173
|
-
stringExpression: [
|
|
174
|
-
[/\}/, { token: "delimiter", next: "@pop" }],
|
|
175
|
-
[/"/, "string", "@stringInsideExpression"],
|
|
176
|
-
{ include: "@terraform" }
|
|
177
|
-
]
|
|
178
|
-
}
|
|
179
|
-
};
|
|
180
|
-
export {
|
|
181
|
-
e as conf,
|
|
182
|
-
t as language
|
|
183
|
-
};
|