@devtron-labs/devtron-fe-common-lib 0.0.84-beta-1 → 0.0.84-beta-3

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.
Files changed (133) hide show
  1. package/dist/Common/Api.d.ts +1 -1
  2. package/dist/Common/CodeEditor/CodeEditor.d.ts +1 -44
  3. package/dist/Common/CodeEditor/CodeEditor.reducer.d.ts +36 -0
  4. package/dist/Common/CodeEditor/index.d.ts +2 -0
  5. package/dist/Common/CodeEditor/types.d.ts +86 -0
  6. package/dist/Common/Common.service.d.ts +6 -1
  7. package/dist/Common/Constants.d.ts +10 -2
  8. package/dist/Common/Dialogs/Types.d.ts +17 -2
  9. package/dist/Common/EmptyState/GenericFilterEmptyState.d.ts +4 -0
  10. package/dist/Common/ErrorPage.d.ts +1 -1
  11. package/dist/Common/ErrorScreenManager.d.ts +1 -1
  12. package/dist/Common/Helper.d.ts +1 -0
  13. package/dist/Common/Hooks/index.d.ts +1 -0
  14. package/dist/Common/Hooks/useStateFilters/index.d.ts +2 -0
  15. package/dist/Common/Hooks/useStateFilters/types.d.ts +6 -0
  16. package/dist/Common/Hooks/useStateFilters/useStateFilters.d.ts +17 -0
  17. package/dist/Common/Hooks/useUrlFilters/types.d.ts +1 -1
  18. package/dist/Common/Modals/Modal.d.ts +3 -0
  19. package/dist/Common/Modals/OpaqueModal.d.ts +3 -0
  20. package/dist/Common/PopupMenu.d.ts +1 -1
  21. package/dist/Common/SearchBar/SearchBar.component.d.ts +1 -1
  22. package/dist/Common/SearchBar/types.d.ts +4 -0
  23. package/dist/Common/Types.d.ts +42 -59
  24. package/dist/Common/index.d.ts +2 -0
  25. package/dist/Pages/ResourceBrowser/Helper.d.ts +3 -0
  26. package/dist/Pages/ResourceBrowser/ResourceBrowser.Types.d.ts +20 -0
  27. package/dist/Pages/ResourceBrowser/index.d.ts +2 -0
  28. package/dist/Pages/index.d.ts +1 -0
  29. package/dist/Shared/Components/APIResponseHandler/APIResponseHandler.d.ts +1 -1
  30. package/dist/Shared/Components/APIResponseHandler/types.d.ts +7 -2
  31. package/dist/Shared/Components/ButtonWithSelector/ButtonWithSelector.d.ts +1 -1
  32. package/dist/Shared/Components/ButtonWithSelector/types.d.ts +1 -0
  33. package/dist/Shared/Components/FilterChips/FilterChips.component.d.ts +1 -1
  34. package/dist/Shared/Components/FilterChips/types.d.ts +11 -3
  35. package/dist/Shared/Components/GenericSectionErrorState/GenericSectionErrorState.component.d.ts +1 -1
  36. package/dist/Shared/Components/GenericSectionErrorState/index.d.ts +1 -0
  37. package/dist/Shared/Components/GenericSectionErrorState/types.d.ts +6 -0
  38. package/dist/Shared/Components/Header/PageHeader.d.ts +1 -1
  39. package/dist/Shared/Components/Header/types.d.ts +9 -7
  40. package/dist/Shared/Helpers.d.ts +4 -2
  41. package/dist/Shared/constants.d.ts +4 -0
  42. package/dist/Shared/types.d.ts +41 -2
  43. package/dist/Shared/validations.d.ts +4 -0
  44. package/dist/abap-5361cc9f.js +1314 -0
  45. package/dist/apex-f9413e6f.js +315 -0
  46. package/dist/assets/editor.worker-60ba9509.js +12 -0
  47. package/dist/assets/index.css +1 -1
  48. package/dist/assets/yaml.worker-cc1a551a.js +471 -0
  49. package/dist/azcli-36f2cb5e.js +74 -0
  50. package/dist/bat-6b05202d.js +95 -0
  51. package/dist/bicep-788415e3.js +108 -0
  52. package/dist/cameligo-4e85ec93.js +168 -0
  53. package/dist/clojure-40fa5799.js +754 -0
  54. package/dist/coffee-f557f5e0.js +228 -0
  55. package/dist/cpp-ebbf7759.js +390 -0
  56. package/dist/csharp-1616f566.js +320 -0
  57. package/dist/csp-5f0bc3c4.js +57 -0
  58. package/dist/css-2b1aec9b.js +186 -0
  59. package/dist/cssMode-891e1d60.js +1446 -0
  60. package/dist/cypher-b12b4ba8.js +262 -0
  61. package/dist/dart-e0d70030.js +270 -0
  62. package/dist/dockerfile-f9d4b2b0.js +132 -0
  63. package/dist/ecl-5b91fdec.js +454 -0
  64. package/dist/elixir-deffd5a6.js +489 -0
  65. package/dist/flow9-84cd00d7.js +141 -0
  66. package/dist/freemarker2-17a3ef5f.js +643 -0
  67. package/dist/fsharp-d296151f.js +210 -0
  68. package/dist/go-7e72ff3b.js +208 -0
  69. package/dist/graphql-a93568a1.js +141 -0
  70. package/dist/handlebars-9a82f999.js +391 -0
  71. package/dist/hcl-b3994d8f.js +177 -0
  72. package/dist/html-17150855.js +281 -0
  73. package/dist/htmlMode-cfd414ef.js +1456 -0
  74. package/dist/index-a31b3f6b.js +129085 -0
  75. package/dist/index.js +332 -20827
  76. package/dist/ini-df84509a.js +68 -0
  77. package/dist/java-fba3d046.js +221 -0
  78. package/dist/javascript-7e65bd30.js +75 -0
  79. package/dist/jsonMode-b53e09d1.js +1867 -0
  80. package/dist/julia-cefd45f6.js +496 -0
  81. package/dist/kotlin-b87b6942.js +245 -0
  82. package/dist/less-8a7f37bc.js +168 -0
  83. package/dist/lexon-cb95cd13.js +151 -0
  84. package/dist/liquid-536dd4ae.js +238 -0
  85. package/dist/lua-6d5b3ea4.js +157 -0
  86. package/dist/m3-d0daf5d0.js +210 -0
  87. package/dist/markdown-48bb0c6f.js +202 -0
  88. package/dist/mdx-249b908e.js +171 -0
  89. package/dist/mips-20dcf886.js +194 -0
  90. package/dist/msdax-e9759e23.js +377 -0
  91. package/dist/mysql-95f335b2.js +876 -0
  92. package/dist/objective-c-ad0cfb47.js +188 -0
  93. package/dist/pascal-eda19dc3.js +245 -0
  94. package/dist/pascaligo-b7e0c89b.js +158 -0
  95. package/dist/perl-bbe5d32a.js +599 -0
  96. package/dist/pgsql-7ebaee1c.js +847 -0
  97. package/dist/php-2526756d.js +471 -0
  98. package/dist/pla-9ebd6f68.js +131 -0
  99. package/dist/postiats-9ac05cf6.js +544 -0
  100. package/dist/powerquery-1cae399d.js +890 -0
  101. package/dist/powershell-093b5b87.js +233 -0
  102. package/dist/protobuf-37993cbc.js +422 -0
  103. package/dist/pug-c2a5db5f.js +393 -0
  104. package/dist/python-0d7512cf.js +259 -0
  105. package/dist/qsharp-1450aac5.js +282 -0
  106. package/dist/r-a0642b90.js +245 -0
  107. package/dist/razor-39b5fa81.js +512 -0
  108. package/dist/redis-405cb63d.js +298 -0
  109. package/dist/redshift-830f82de.js +806 -0
  110. package/dist/restructuredtext-d81f5ef4.js +162 -0
  111. package/dist/ruby-d607b87e.js +444 -0
  112. package/dist/rust-86e74dbb.js +337 -0
  113. package/dist/sb-b7e5010d.js +110 -0
  114. package/dist/scala-a4d4a3c6.js +353 -0
  115. package/dist/scheme-81927e94.js +114 -0
  116. package/dist/scss-3f112fcd.js +244 -0
  117. package/dist/shell-d795bcaa.js +224 -0
  118. package/dist/solidity-5b556d3e.js +1351 -0
  119. package/dist/sophia-1da55998.js +190 -0
  120. package/dist/sparql-ac34318e.js +193 -0
  121. package/dist/sql-eef6393b.js +818 -0
  122. package/dist/st-758b1972.js +415 -0
  123. package/dist/swift-63cb1847.js +315 -0
  124. package/dist/systemverilog-2538c608.js +556 -0
  125. package/dist/tcl-53e6282a.js +232 -0
  126. package/dist/tsMode-9cf4451c.js +811 -0
  127. package/dist/twig-80c3dc23.js +323 -0
  128. package/dist/typescript-b8c3ff6e.js +328 -0
  129. package/dist/vb-32089525.js +364 -0
  130. package/dist/wgsl-e681d5a0.js +420 -0
  131. package/dist/xml-6fc18d50.js +95 -0
  132. package/dist/yaml-ec291850.js +184 -0
  133. package/package.json +4 -4
@@ -0,0 +1,391 @@
1
+ import { m as i } from "./index-a31b3f6b.js";
2
+ /*!-----------------------------------------------------------------------------
3
+ * Copyright (c) Microsoft Corporation. All rights reserved.
4
+ * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
5
+ * Released under the MIT license
6
+ * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
7
+ *-----------------------------------------------------------------------------*/
8
+ var s = Object.defineProperty, d = Object.getOwnPropertyDescriptor, c = Object.getOwnPropertyNames, p = Object.prototype.hasOwnProperty, o = (t, e, a, m) => {
9
+ if (e && typeof e == "object" || typeof e == "function")
10
+ for (let n of c(e))
11
+ !p.call(t, n) && n !== a && s(t, n, { get: () => e[n], enumerable: !(m = d(e, n)) || m.enumerable });
12
+ return t;
13
+ }, h = (t, e, a) => (o(t, e, "default"), a && o(a, e, "default")), r = {};
14
+ h(r, i);
15
+ var l = [
16
+ "area",
17
+ "base",
18
+ "br",
19
+ "col",
20
+ "embed",
21
+ "hr",
22
+ "img",
23
+ "input",
24
+ "keygen",
25
+ "link",
26
+ "menuitem",
27
+ "meta",
28
+ "param",
29
+ "source",
30
+ "track",
31
+ "wbr"
32
+ ], u = {
33
+ wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,
34
+ comments: {
35
+ blockComment: ["{{!--", "--}}"]
36
+ },
37
+ brackets: [
38
+ ["<!--", "-->"],
39
+ ["<", ">"],
40
+ ["{{", "}}"],
41
+ ["{", "}"],
42
+ ["(", ")"]
43
+ ],
44
+ autoClosingPairs: [
45
+ { open: "{", close: "}" },
46
+ { open: "[", close: "]" },
47
+ { open: "(", close: ")" },
48
+ { open: '"', close: '"' },
49
+ { open: "'", close: "'" }
50
+ ],
51
+ surroundingPairs: [
52
+ { open: "<", close: ">" },
53
+ { open: '"', close: '"' },
54
+ { open: "'", close: "'" }
55
+ ],
56
+ onEnterRules: [
57
+ {
58
+ beforeText: new RegExp(`<(?!(?:${l.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`, "i"),
59
+ afterText: /^<\/(\w[\w\d]*)\s*>$/i,
60
+ action: {
61
+ indentAction: r.languages.IndentAction.IndentOutdent
62
+ }
63
+ },
64
+ {
65
+ beforeText: new RegExp(`<(?!(?:${l.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`, "i"),
66
+ action: { indentAction: r.languages.IndentAction.Indent }
67
+ }
68
+ ]
69
+ }, y = {
70
+ defaultToken: "",
71
+ tokenPostfix: "",
72
+ tokenizer: {
73
+ root: [
74
+ [/\{\{!--/, "comment.block.start.handlebars", "@commentBlock"],
75
+ [/\{\{!/, "comment.start.handlebars", "@comment"],
76
+ [/\{\{/, { token: "@rematch", switchTo: "@handlebarsInSimpleState.root" }],
77
+ [/<!DOCTYPE/, "metatag.html", "@doctype"],
78
+ [/<!--/, "comment.html", "@commentHtml"],
79
+ [/(<)(\w+)(\/>)/, ["delimiter.html", "tag.html", "delimiter.html"]],
80
+ [/(<)(script)/, ["delimiter.html", { token: "tag.html", next: "@script" }]],
81
+ [/(<)(style)/, ["delimiter.html", { token: "tag.html", next: "@style" }]],
82
+ [/(<)([:\w]+)/, ["delimiter.html", { token: "tag.html", next: "@otherTag" }]],
83
+ [/(<\/)(\w+)/, ["delimiter.html", { token: "tag.html", next: "@otherTag" }]],
84
+ [/</, "delimiter.html"],
85
+ [/\{/, "delimiter.html"],
86
+ [/[^<{]+/]
87
+ ],
88
+ doctype: [
89
+ [
90
+ /\{\{/,
91
+ {
92
+ token: "@rematch",
93
+ switchTo: "@handlebarsInSimpleState.comment"
94
+ }
95
+ ],
96
+ [/[^>]+/, "metatag.content.html"],
97
+ [/>/, "metatag.html", "@pop"]
98
+ ],
99
+ comment: [
100
+ [/\}\}/, "comment.end.handlebars", "@pop"],
101
+ [/./, "comment.content.handlebars"]
102
+ ],
103
+ commentBlock: [
104
+ [/--\}\}/, "comment.block.end.handlebars", "@pop"],
105
+ [/./, "comment.content.handlebars"]
106
+ ],
107
+ commentHtml: [
108
+ [
109
+ /\{\{/,
110
+ {
111
+ token: "@rematch",
112
+ switchTo: "@handlebarsInSimpleState.comment"
113
+ }
114
+ ],
115
+ [/-->/, "comment.html", "@pop"],
116
+ [/[^-]+/, "comment.content.html"],
117
+ [/./, "comment.content.html"]
118
+ ],
119
+ otherTag: [
120
+ [
121
+ /\{\{/,
122
+ {
123
+ token: "@rematch",
124
+ switchTo: "@handlebarsInSimpleState.otherTag"
125
+ }
126
+ ],
127
+ [/\/?>/, "delimiter.html", "@pop"],
128
+ [/"([^"]*)"/, "attribute.value"],
129
+ [/'([^']*)'/, "attribute.value"],
130
+ [/[\w\-]+/, "attribute.name"],
131
+ [/=/, "delimiter"],
132
+ [/[ \t\r\n]+/]
133
+ ],
134
+ script: [
135
+ [
136
+ /\{\{/,
137
+ {
138
+ token: "@rematch",
139
+ switchTo: "@handlebarsInSimpleState.script"
140
+ }
141
+ ],
142
+ [/type/, "attribute.name", "@scriptAfterType"],
143
+ [/"([^"]*)"/, "attribute.value"],
144
+ [/'([^']*)'/, "attribute.value"],
145
+ [/[\w\-]+/, "attribute.name"],
146
+ [/=/, "delimiter"],
147
+ [
148
+ />/,
149
+ {
150
+ token: "delimiter.html",
151
+ next: "@scriptEmbedded.text/javascript",
152
+ nextEmbedded: "text/javascript"
153
+ }
154
+ ],
155
+ [/[ \t\r\n]+/],
156
+ [
157
+ /(<\/)(script\s*)(>)/,
158
+ ["delimiter.html", "tag.html", { token: "delimiter.html", next: "@pop" }]
159
+ ]
160
+ ],
161
+ scriptAfterType: [
162
+ [
163
+ /\{\{/,
164
+ {
165
+ token: "@rematch",
166
+ switchTo: "@handlebarsInSimpleState.scriptAfterType"
167
+ }
168
+ ],
169
+ [/=/, "delimiter", "@scriptAfterTypeEquals"],
170
+ [
171
+ />/,
172
+ {
173
+ token: "delimiter.html",
174
+ next: "@scriptEmbedded.text/javascript",
175
+ nextEmbedded: "text/javascript"
176
+ }
177
+ ],
178
+ [/[ \t\r\n]+/],
179
+ [/<\/script\s*>/, { token: "@rematch", next: "@pop" }]
180
+ ],
181
+ scriptAfterTypeEquals: [
182
+ [
183
+ /\{\{/,
184
+ {
185
+ token: "@rematch",
186
+ switchTo: "@handlebarsInSimpleState.scriptAfterTypeEquals"
187
+ }
188
+ ],
189
+ [
190
+ /"([^"]*)"/,
191
+ {
192
+ token: "attribute.value",
193
+ switchTo: "@scriptWithCustomType.$1"
194
+ }
195
+ ],
196
+ [
197
+ /'([^']*)'/,
198
+ {
199
+ token: "attribute.value",
200
+ switchTo: "@scriptWithCustomType.$1"
201
+ }
202
+ ],
203
+ [
204
+ />/,
205
+ {
206
+ token: "delimiter.html",
207
+ next: "@scriptEmbedded.text/javascript",
208
+ nextEmbedded: "text/javascript"
209
+ }
210
+ ],
211
+ [/[ \t\r\n]+/],
212
+ [/<\/script\s*>/, { token: "@rematch", next: "@pop" }]
213
+ ],
214
+ scriptWithCustomType: [
215
+ [
216
+ /\{\{/,
217
+ {
218
+ token: "@rematch",
219
+ switchTo: "@handlebarsInSimpleState.scriptWithCustomType.$S2"
220
+ }
221
+ ],
222
+ [
223
+ />/,
224
+ {
225
+ token: "delimiter.html",
226
+ next: "@scriptEmbedded.$S2",
227
+ nextEmbedded: "$S2"
228
+ }
229
+ ],
230
+ [/"([^"]*)"/, "attribute.value"],
231
+ [/'([^']*)'/, "attribute.value"],
232
+ [/[\w\-]+/, "attribute.name"],
233
+ [/=/, "delimiter"],
234
+ [/[ \t\r\n]+/],
235
+ [/<\/script\s*>/, { token: "@rematch", next: "@pop" }]
236
+ ],
237
+ scriptEmbedded: [
238
+ [
239
+ /\{\{/,
240
+ {
241
+ token: "@rematch",
242
+ switchTo: "@handlebarsInEmbeddedState.scriptEmbedded.$S2",
243
+ nextEmbedded: "@pop"
244
+ }
245
+ ],
246
+ [/<\/script/, { token: "@rematch", next: "@pop", nextEmbedded: "@pop" }]
247
+ ],
248
+ style: [
249
+ [
250
+ /\{\{/,
251
+ {
252
+ token: "@rematch",
253
+ switchTo: "@handlebarsInSimpleState.style"
254
+ }
255
+ ],
256
+ [/type/, "attribute.name", "@styleAfterType"],
257
+ [/"([^"]*)"/, "attribute.value"],
258
+ [/'([^']*)'/, "attribute.value"],
259
+ [/[\w\-]+/, "attribute.name"],
260
+ [/=/, "delimiter"],
261
+ [
262
+ />/,
263
+ {
264
+ token: "delimiter.html",
265
+ next: "@styleEmbedded.text/css",
266
+ nextEmbedded: "text/css"
267
+ }
268
+ ],
269
+ [/[ \t\r\n]+/],
270
+ [
271
+ /(<\/)(style\s*)(>)/,
272
+ ["delimiter.html", "tag.html", { token: "delimiter.html", next: "@pop" }]
273
+ ]
274
+ ],
275
+ styleAfterType: [
276
+ [
277
+ /\{\{/,
278
+ {
279
+ token: "@rematch",
280
+ switchTo: "@handlebarsInSimpleState.styleAfterType"
281
+ }
282
+ ],
283
+ [/=/, "delimiter", "@styleAfterTypeEquals"],
284
+ [
285
+ />/,
286
+ {
287
+ token: "delimiter.html",
288
+ next: "@styleEmbedded.text/css",
289
+ nextEmbedded: "text/css"
290
+ }
291
+ ],
292
+ [/[ \t\r\n]+/],
293
+ [/<\/style\s*>/, { token: "@rematch", next: "@pop" }]
294
+ ],
295
+ styleAfterTypeEquals: [
296
+ [
297
+ /\{\{/,
298
+ {
299
+ token: "@rematch",
300
+ switchTo: "@handlebarsInSimpleState.styleAfterTypeEquals"
301
+ }
302
+ ],
303
+ [
304
+ /"([^"]*)"/,
305
+ {
306
+ token: "attribute.value",
307
+ switchTo: "@styleWithCustomType.$1"
308
+ }
309
+ ],
310
+ [
311
+ /'([^']*)'/,
312
+ {
313
+ token: "attribute.value",
314
+ switchTo: "@styleWithCustomType.$1"
315
+ }
316
+ ],
317
+ [
318
+ />/,
319
+ {
320
+ token: "delimiter.html",
321
+ next: "@styleEmbedded.text/css",
322
+ nextEmbedded: "text/css"
323
+ }
324
+ ],
325
+ [/[ \t\r\n]+/],
326
+ [/<\/style\s*>/, { token: "@rematch", next: "@pop" }]
327
+ ],
328
+ styleWithCustomType: [
329
+ [
330
+ /\{\{/,
331
+ {
332
+ token: "@rematch",
333
+ switchTo: "@handlebarsInSimpleState.styleWithCustomType.$S2"
334
+ }
335
+ ],
336
+ [
337
+ />/,
338
+ {
339
+ token: "delimiter.html",
340
+ next: "@styleEmbedded.$S2",
341
+ nextEmbedded: "$S2"
342
+ }
343
+ ],
344
+ [/"([^"]*)"/, "attribute.value"],
345
+ [/'([^']*)'/, "attribute.value"],
346
+ [/[\w\-]+/, "attribute.name"],
347
+ [/=/, "delimiter"],
348
+ [/[ \t\r\n]+/],
349
+ [/<\/style\s*>/, { token: "@rematch", next: "@pop" }]
350
+ ],
351
+ styleEmbedded: [
352
+ [
353
+ /\{\{/,
354
+ {
355
+ token: "@rematch",
356
+ switchTo: "@handlebarsInEmbeddedState.styleEmbedded.$S2",
357
+ nextEmbedded: "@pop"
358
+ }
359
+ ],
360
+ [/<\/style/, { token: "@rematch", next: "@pop", nextEmbedded: "@pop" }]
361
+ ],
362
+ handlebarsInSimpleState: [
363
+ [/\{\{\{?/, "delimiter.handlebars"],
364
+ [/\}\}\}?/, { token: "delimiter.handlebars", switchTo: "@$S2.$S3" }],
365
+ { include: "handlebarsRoot" }
366
+ ],
367
+ handlebarsInEmbeddedState: [
368
+ [/\{\{\{?/, "delimiter.handlebars"],
369
+ [
370
+ /\}\}\}?/,
371
+ {
372
+ token: "delimiter.handlebars",
373
+ switchTo: "@$S2.$S3",
374
+ nextEmbedded: "$S3"
375
+ }
376
+ ],
377
+ { include: "handlebarsRoot" }
378
+ ],
379
+ handlebarsRoot: [
380
+ [/"[^"]*"/, "string.handlebars"],
381
+ [/[#/][^\s}]+/, "keyword.helper.handlebars"],
382
+ [/else\b/, "keyword.helper.handlebars"],
383
+ [/[\s]+/],
384
+ [/[^}]/, "variable.parameter.handlebars"]
385
+ ]
386
+ }
387
+ };
388
+ export {
389
+ u as conf,
390
+ y as language
391
+ };
@@ -0,0 +1,177 @@
1
+ /*!-----------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
4
+ * Released under the MIT license
5
+ * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
6
+ *-----------------------------------------------------------------------------*/
7
+ var e = {
8
+ comments: {
9
+ lineComment: "#",
10
+ blockComment: ["/*", "*/"]
11
+ },
12
+ brackets: [
13
+ ["{", "}"],
14
+ ["[", "]"],
15
+ ["(", ")"]
16
+ ],
17
+ autoClosingPairs: [
18
+ { open: "{", close: "}" },
19
+ { open: "[", close: "]" },
20
+ { open: "(", close: ")" },
21
+ { open: '"', close: '"', notIn: ["string"] }
22
+ ],
23
+ surroundingPairs: [
24
+ { open: "{", close: "}" },
25
+ { open: "[", close: "]" },
26
+ { open: "(", close: ")" },
27
+ { open: '"', close: '"' }
28
+ ]
29
+ }, t = {
30
+ defaultToken: "",
31
+ tokenPostfix: ".hcl",
32
+ keywords: [
33
+ "var",
34
+ "local",
35
+ "path",
36
+ "for_each",
37
+ "any",
38
+ "string",
39
+ "number",
40
+ "bool",
41
+ "true",
42
+ "false",
43
+ "null",
44
+ "if ",
45
+ "else ",
46
+ "endif ",
47
+ "for ",
48
+ "in",
49
+ "endfor"
50
+ ],
51
+ operators: [
52
+ "=",
53
+ ">=",
54
+ "<=",
55
+ "==",
56
+ "!=",
57
+ "+",
58
+ "-",
59
+ "*",
60
+ "/",
61
+ "%",
62
+ "&&",
63
+ "||",
64
+ "!",
65
+ "<",
66
+ ">",
67
+ "?",
68
+ "...",
69
+ ":"
70
+ ],
71
+ symbols: /[=><!~?:&|+\-*\/\^%]+/,
72
+ escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
73
+ 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)/,
74
+ terraformMainBlocks: /(module|data|terraform|resource|provider|variable|output|locals)/,
75
+ tokenizer: {
76
+ root: [
77
+ [
78
+ /^@terraformMainBlocks([ \t]*)([\w-]+|"[\w-]+"|)([ \t]*)([\w-]+|"[\w-]+"|)([ \t]*)(\{)/,
79
+ ["type", "", "string", "", "string", "", "@brackets"]
80
+ ],
81
+ [
82
+ /(\w+[ \t]+)([ \t]*)([\w-]+|"[\w-]+"|)([ \t]*)([\w-]+|"[\w-]+"|)([ \t]*)(\{)/,
83
+ ["identifier", "", "string", "", "string", "", "@brackets"]
84
+ ],
85
+ [
86
+ /(\w+[ \t]+)([ \t]*)([\w-]+|"[\w-]+"|)([ \t]*)([\w-]+|"[\w-]+"|)(=)(\{)/,
87
+ ["identifier", "", "string", "", "operator", "", "@brackets"]
88
+ ],
89
+ { include: "@terraform" }
90
+ ],
91
+ terraform: [
92
+ [/@terraformFunctions(\()/, ["type", "@brackets"]],
93
+ [
94
+ /[a-zA-Z_]\w*-*/,
95
+ {
96
+ cases: {
97
+ "@keywords": { token: "keyword.$0" },
98
+ "@default": "variable"
99
+ }
100
+ }
101
+ ],
102
+ { include: "@whitespace" },
103
+ { include: "@heredoc" },
104
+ [/[{}()\[\]]/, "@brackets"],
105
+ [/[<>](?!@symbols)/, "@brackets"],
106
+ [
107
+ /@symbols/,
108
+ {
109
+ cases: {
110
+ "@operators": "operator",
111
+ "@default": ""
112
+ }
113
+ }
114
+ ],
115
+ [/\d*\d+[eE]([\-+]?\d+)?/, "number.float"],
116
+ [/\d*\.\d+([eE][\-+]?\d+)?/, "number.float"],
117
+ [/\d[\d']*/, "number"],
118
+ [/\d/, "number"],
119
+ [/[;,.]/, "delimiter"],
120
+ [/"/, "string", "@string"],
121
+ [/'/, "invalid"]
122
+ ],
123
+ heredoc: [
124
+ [/<<[-]*\s*["]?([\w\-]+)["]?/, { token: "string.heredoc.delimiter", next: "@heredocBody.$1" }]
125
+ ],
126
+ heredocBody: [
127
+ [
128
+ /([\w\-]+)$/,
129
+ {
130
+ cases: {
131
+ "$1==$S2": [
132
+ {
133
+ token: "string.heredoc.delimiter",
134
+ next: "@popall"
135
+ }
136
+ ],
137
+ "@default": "string.heredoc"
138
+ }
139
+ }
140
+ ],
141
+ [/./, "string.heredoc"]
142
+ ],
143
+ whitespace: [
144
+ [/[ \t\r\n]+/, ""],
145
+ [/\/\*/, "comment", "@comment"],
146
+ [/\/\/.*$/, "comment"],
147
+ [/#.*$/, "comment"]
148
+ ],
149
+ comment: [
150
+ [/[^\/*]+/, "comment"],
151
+ [/\*\//, "comment", "@pop"],
152
+ [/[\/*]/, "comment"]
153
+ ],
154
+ string: [
155
+ [/\$\{/, { token: "delimiter", next: "@stringExpression" }],
156
+ [/[^\\"\$]+/, "string"],
157
+ [/@escapes/, "string.escape"],
158
+ [/\\./, "string.escape.invalid"],
159
+ [/"/, "string", "@popall"]
160
+ ],
161
+ stringInsideExpression: [
162
+ [/[^\\"]+/, "string"],
163
+ [/@escapes/, "string.escape"],
164
+ [/\\./, "string.escape.invalid"],
165
+ [/"/, "string", "@pop"]
166
+ ],
167
+ stringExpression: [
168
+ [/\}/, { token: "delimiter", next: "@pop" }],
169
+ [/"/, "string", "@stringInsideExpression"],
170
+ { include: "@terraform" }
171
+ ]
172
+ }
173
+ };
174
+ export {
175
+ e as conf,
176
+ t as language
177
+ };