datacontract-editor 0.1.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.
Files changed (97) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +54 -0
  3. package/bin/datacontract-editor.js +373 -0
  4. package/dist/abap-Bs8kvjsq.js +1398 -0
  5. package/dist/apex-Dspwrl5m.js +326 -0
  6. package/dist/assets/editor.worker-CKX8jfJ6.js +9037 -0
  7. package/dist/assets/yaml.worker-BqEbEWOg.js +26455 -0
  8. package/dist/azcli-k1BiOau1.js +68 -0
  9. package/dist/bat-BIP72KWc.js +100 -0
  10. package/dist/bicep-VhQeYhS3.js +102 -0
  11. package/dist/cameligo-DnuAXtHg.js +174 -0
  12. package/dist/clojure-BAuDPsal.js +761 -0
  13. package/dist/coffee-BV06qSnj.js +232 -0
  14. package/dist/cpp-Cz8Jeyrf.js +389 -0
  15. package/dist/csharp-F6hhlXFb.js +326 -0
  16. package/dist/csp-KzlEHCyI.js +53 -0
  17. package/dist/css-e4FKntZ3.js +187 -0
  18. package/dist/cssMode-CzVfCu2q.js +1618 -0
  19. package/dist/cypher-CpvDGKRr.js +263 -0
  20. package/dist/dart-DdHeFWR0.js +281 -0
  21. package/dist/datacontract-editor.css +1 -0
  22. package/dist/datacontract-editor.es.js +7 -0
  23. package/dist/dockerfile-aoNXDcio.js +130 -0
  24. package/dist/ecl-C4Q0DYuA.js +456 -0
  25. package/dist/elixir-C9X42b0T.js +569 -0
  26. package/dist/embed-BE-6FjUW.js +170984 -0
  27. package/dist/flow9-Bff42pfB.js +142 -0
  28. package/dist/freemarker2-DuISTfha.js +989 -0
  29. package/dist/fsharp-C6vPAsHG.js +217 -0
  30. package/dist/go-DEr8zx9f.js +218 -0
  31. package/dist/graphql-BiNBBRFh.js +151 -0
  32. package/dist/handlebars-CF6nf90Y.js +419 -0
  33. package/dist/hcl-2T9lKuFg.js +183 -0
  34. package/dist/html-Bd2leUjH.js +308 -0
  35. package/dist/htmlMode-D5ZCqfos.js +1628 -0
  36. package/dist/index.html +27 -0
  37. package/dist/ini-CZGtssYM.js +71 -0
  38. package/dist/java-B260NeH3.js +232 -0
  39. package/dist/javascript-DM0zQPyb.js +70 -0
  40. package/dist/jsonMode-kmlqwbu7.js +2051 -0
  41. package/dist/julia-kuNLM9c5.js +511 -0
  42. package/dist/kotlin-Bz6kAefA.js +253 -0
  43. package/dist/less-AZUtS89I.js +162 -0
  44. package/dist/lexon-BcmgnyRb.js +157 -0
  45. package/dist/liquid-BqQPT6Qf.js +240 -0
  46. package/dist/logo_fuchsia_v2.svg +13 -0
  47. package/dist/lua-Dz1RbATg.js +162 -0
  48. package/dist/m3-CIMooLFn.js +210 -0
  49. package/dist/markdown-C1BsCK9P.js +229 -0
  50. package/dist/mdx-8KgfCRJw.js +165 -0
  51. package/dist/mips-BovsnfLQ.js +198 -0
  52. package/dist/msdax-CiRB2ZB-.js +375 -0
  53. package/dist/mysql-BwdpPE19.js +878 -0
  54. package/dist/objective-c-D4nfHfso.js +183 -0
  55. package/dist/odcs.svg +24 -0
  56. package/dist/pascal--j5-PYtz.js +251 -0
  57. package/dist/pascaligo-C7TcJxNL.js +164 -0
  58. package/dist/perl-BzEWqUb5.js +626 -0
  59. package/dist/pgsql-B_KZ0mGX.js +851 -0
  60. package/dist/php-A19QHzQV.js +500 -0
  61. package/dist/pla-COeKY1hA.js +137 -0
  62. package/dist/postiats-BfMp7zJL.js +907 -0
  63. package/dist/powerquery-B0TS_5Gb.js +890 -0
  64. package/dist/powershell-5jSbKdYB.js +239 -0
  65. package/dist/protobuf-YgnOutn3.js +420 -0
  66. package/dist/pug-DLej6kn5.js +402 -0
  67. package/dist/python-CmHenqwx.js +301 -0
  68. package/dist/qsharp-AhjqtSHB.js +301 -0
  69. package/dist/r-D-F4P80w.js +243 -0
  70. package/dist/razor-D0q5qc6y.js +550 -0
  71. package/dist/redis-hwwIlMnV.js +302 -0
  72. package/dist/redshift-Bcm_kjEG.js +809 -0
  73. package/dist/restructuredtext-CrdzfPP-.js +174 -0
  74. package/dist/ruby-QC2UNm1s.js +511 -0
  75. package/dist/rust-5aqiQ3L5.js +343 -0
  76. package/dist/sb-B1g1ZfLJ.js +115 -0
  77. package/dist/scala-C2U4R5Gb.js +370 -0
  78. package/dist/scheme-DeFRbslr.js +108 -0
  79. package/dist/scss-RSTCiCmI.js +262 -0
  80. package/dist/shell-BpF-iNu8.js +221 -0
  81. package/dist/solidity-C00r2mbQ.js +1367 -0
  82. package/dist/sophia-DVW5ZKDB.js +199 -0
  83. package/dist/sparql-B0nmpxeX.js +201 -0
  84. package/dist/sql-CJwKPERn.js +853 -0
  85. package/dist/st-DPlKG5DT.js +416 -0
  86. package/dist/swift-YZBAbVHV.js +309 -0
  87. package/dist/systemverilog-CDQSaH63.js +576 -0
  88. package/dist/tcl-Dlu8sp6Q.js +232 -0
  89. package/dist/tsMode-DiTuI5n4.js +933 -0
  90. package/dist/twig-C5TO7-kw.js +392 -0
  91. package/dist/typescript-ozsvnTYx.js +343 -0
  92. package/dist/typespec-BsmjDEu7.js +117 -0
  93. package/dist/vb-ChHvIDrk.js +372 -0
  94. package/dist/wgsl-XEp1ju8c.js +439 -0
  95. package/dist/xml-oViOWYBd.js +95 -0
  96. package/dist/yaml-BdXw910y.js +206 -0
  97. package/package.json +51 -0
@@ -0,0 +1,392 @@
1
+ var t = {
2
+ wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,
3
+ comments: {
4
+ blockComment: ["{#", "#}"]
5
+ },
6
+ brackets: [
7
+ ["{#", "#}"],
8
+ ["{%", "%}"],
9
+ ["{{", "}}"],
10
+ ["(", ")"],
11
+ ["[", "]"],
12
+ // HTML
13
+ ["<!--", "-->"],
14
+ ["<", ">"]
15
+ ],
16
+ autoClosingPairs: [
17
+ { open: "{# ", close: " #}" },
18
+ { open: "{% ", close: " %}" },
19
+ { open: "{{ ", close: " }}" },
20
+ { open: "[", close: "]" },
21
+ { open: "(", close: ")" },
22
+ { open: '"', close: '"' },
23
+ { open: "'", close: "'" }
24
+ ],
25
+ surroundingPairs: [
26
+ { open: '"', close: '"' },
27
+ { open: "'", close: "'" },
28
+ // HTML
29
+ { open: "<", close: ">" }
30
+ ]
31
+ }, e = {
32
+ defaultToken: "",
33
+ tokenPostfix: "",
34
+ ignoreCase: !0,
35
+ keywords: [
36
+ // (opening) tags
37
+ "apply",
38
+ "autoescape",
39
+ "block",
40
+ "deprecated",
41
+ "do",
42
+ "embed",
43
+ "extends",
44
+ "flush",
45
+ "for",
46
+ "from",
47
+ "if",
48
+ "import",
49
+ "include",
50
+ "macro",
51
+ "sandbox",
52
+ "set",
53
+ "use",
54
+ "verbatim",
55
+ "with",
56
+ // closing tags
57
+ "endapply",
58
+ "endautoescape",
59
+ "endblock",
60
+ "endembed",
61
+ "endfor",
62
+ "endif",
63
+ "endmacro",
64
+ "endsandbox",
65
+ "endset",
66
+ "endwith",
67
+ // literals
68
+ "true",
69
+ "false"
70
+ ],
71
+ tokenizer: {
72
+ root: [
73
+ // whitespace
74
+ [/\s+/],
75
+ // Twig Tag Delimiters
76
+ [/{#/, "comment.twig", "@commentState"],
77
+ [/{%[-~]?/, "delimiter.twig", "@blockState"],
78
+ [/{{[-~]?/, "delimiter.twig", "@variableState"],
79
+ // HTML
80
+ [/<!DOCTYPE/, "metatag.html", "@doctype"],
81
+ [/<!--/, "comment.html", "@comment"],
82
+ [/(<)((?:[\w\-]+:)?[\w\-]+)(\s*)(\/>)/, ["delimiter.html", "tag.html", "", "delimiter.html"]],
83
+ [/(<)(script)/, ["delimiter.html", { token: "tag.html", next: "@script" }]],
84
+ [/(<)(style)/, ["delimiter.html", { token: "tag.html", next: "@style" }]],
85
+ [/(<)((?:[\w\-]+:)?[\w\-]+)/, ["delimiter.html", { token: "tag.html", next: "@otherTag" }]],
86
+ [/(<\/)((?:[\w\-]+:)?[\w\-]+)/, ["delimiter.html", { token: "tag.html", next: "@otherTag" }]],
87
+ [/</, "delimiter.html"],
88
+ [/[^<{]+/]
89
+ // text
90
+ ],
91
+ /**
92
+ * Comment Tag Handling
93
+ */
94
+ commentState: [
95
+ [/#}/, "comment.twig", "@pop"],
96
+ [/./, "comment.twig"]
97
+ ],
98
+ /**
99
+ * Block Tag Handling
100
+ */
101
+ blockState: [
102
+ [/[-~]?%}/, "delimiter.twig", "@pop"],
103
+ // whitespace
104
+ [/\s+/],
105
+ // verbatim
106
+ // Unlike other blocks, verbatim ehas its own state
107
+ // transition to ensure we mark its contents as strings.
108
+ [
109
+ /(verbatim)(\s*)([-~]?%})/,
110
+ ["keyword.twig", "", { token: "delimiter.twig", next: "@rawDataState" }]
111
+ ],
112
+ { include: "expression" }
113
+ ],
114
+ rawDataState: [
115
+ // endverbatim
116
+ [
117
+ /({%[-~]?)(\s*)(endverbatim)(\s*)([-~]?%})/,
118
+ ["delimiter.twig", "", "keyword.twig", "", { token: "delimiter.twig", next: "@popall" }]
119
+ ],
120
+ [/./, "string.twig"]
121
+ ],
122
+ /**
123
+ * Variable Tag Handling
124
+ */
125
+ variableState: [[/[-~]?}}/, "delimiter.twig", "@pop"], { include: "expression" }],
126
+ stringState: [
127
+ // closing double quoted string
128
+ [/"/, "string.twig", "@pop"],
129
+ // interpolation start
130
+ [/#{\s*/, "string.twig", "@interpolationState"],
131
+ // string part
132
+ [/[^#"\\]*(?:(?:\\.|#(?!\{))[^#"\\]*)*/, "string.twig"]
133
+ ],
134
+ interpolationState: [
135
+ // interpolation end
136
+ [/}/, "string.twig", "@pop"],
137
+ { include: "expression" }
138
+ ],
139
+ /**
140
+ * Expression Handling
141
+ */
142
+ expression: [
143
+ // whitespace
144
+ [/\s+/],
145
+ // operators - math
146
+ [/\+|-|\/{1,2}|%|\*{1,2}/, "operators.twig"],
147
+ // operators - logic
148
+ [/(and|or|not|b-and|b-xor|b-or)(\s+)/, ["operators.twig", ""]],
149
+ // operators - comparison (symbols)
150
+ [/==|!=|<|>|>=|<=/, "operators.twig"],
151
+ // operators - comparison (words)
152
+ [/(starts with|ends with|matches)(\s+)/, ["operators.twig", ""]],
153
+ // operators - containment
154
+ [/(in)(\s+)/, ["operators.twig", ""]],
155
+ // operators - test
156
+ [/(is)(\s+)/, ["operators.twig", ""]],
157
+ // operators - misc
158
+ [/\||~|:|\.{1,2}|\?{1,2}/, "operators.twig"],
159
+ // names
160
+ [
161
+ /[^\W\d][\w]*/,
162
+ {
163
+ cases: {
164
+ "@keywords": "keyword.twig",
165
+ "@default": "variable.twig"
166
+ }
167
+ }
168
+ ],
169
+ // numbers
170
+ [/\d+(\.\d+)?/, "number.twig"],
171
+ // punctuation
172
+ [/\(|\)|\[|\]|{|}|,/, "delimiter.twig"],
173
+ // strings
174
+ [/"([^#"\\]*(?:\\.[^#"\\]*)*)"|\'([^\'\\]*(?:\\.[^\'\\]*)*)\'/, "string.twig"],
175
+ // opening double quoted string
176
+ [/"/, "string.twig", "@stringState"],
177
+ // misc syntactic constructs
178
+ // These are not operators per se, but for the purposes of lexical analysis we
179
+ // can treat them as such.
180
+ // arrow functions
181
+ [/=>/, "operators.twig"],
182
+ // assignment
183
+ [/=/, "operators.twig"]
184
+ ],
185
+ /**
186
+ * HTML
187
+ */
188
+ doctype: [
189
+ [/[^>]+/, "metatag.content.html"],
190
+ [/>/, "metatag.html", "@pop"]
191
+ ],
192
+ comment: [
193
+ [/-->/, "comment.html", "@pop"],
194
+ [/[^-]+/, "comment.content.html"],
195
+ [/./, "comment.content.html"]
196
+ ],
197
+ otherTag: [
198
+ [/\/?>/, "delimiter.html", "@pop"],
199
+ [/"([^"]*)"/, "attribute.value.html"],
200
+ [/'([^']*)'/, "attribute.value.html"],
201
+ [/[\w\-]+/, "attribute.name.html"],
202
+ [/=/, "delimiter.html"],
203
+ [/[ \t\r\n]+/]
204
+ // whitespace
205
+ ],
206
+ // -- BEGIN <script> tags handling
207
+ // After <script
208
+ script: [
209
+ [/type/, "attribute.name.html", "@scriptAfterType"],
210
+ [/"([^"]*)"/, "attribute.value.html"],
211
+ [/'([^']*)'/, "attribute.value.html"],
212
+ [/[\w\-]+/, "attribute.name.html"],
213
+ [/=/, "delimiter.html"],
214
+ [
215
+ />/,
216
+ {
217
+ token: "delimiter.html",
218
+ next: "@scriptEmbedded",
219
+ nextEmbedded: "text/javascript"
220
+ }
221
+ ],
222
+ [/[ \t\r\n]+/],
223
+ // whitespace
224
+ [
225
+ /(<\/)(script\s*)(>)/,
226
+ ["delimiter.html", "tag.html", { token: "delimiter.html", next: "@pop" }]
227
+ ]
228
+ ],
229
+ // After <script ... type
230
+ scriptAfterType: [
231
+ [/=/, "delimiter.html", "@scriptAfterTypeEquals"],
232
+ [
233
+ />/,
234
+ {
235
+ token: "delimiter.html",
236
+ next: "@scriptEmbedded",
237
+ nextEmbedded: "text/javascript"
238
+ }
239
+ ],
240
+ // cover invalid e.g. <script type>
241
+ [/[ \t\r\n]+/],
242
+ // whitespace
243
+ [/<\/script\s*>/, { token: "@rematch", next: "@pop" }]
244
+ ],
245
+ // After <script ... type =
246
+ scriptAfterTypeEquals: [
247
+ [
248
+ /"([^"]*)"/,
249
+ {
250
+ token: "attribute.value.html",
251
+ switchTo: "@scriptWithCustomType.$1"
252
+ }
253
+ ],
254
+ [
255
+ /'([^']*)'/,
256
+ {
257
+ token: "attribute.value.html",
258
+ switchTo: "@scriptWithCustomType.$1"
259
+ }
260
+ ],
261
+ [
262
+ />/,
263
+ {
264
+ token: "delimiter.html",
265
+ next: "@scriptEmbedded",
266
+ nextEmbedded: "text/javascript"
267
+ }
268
+ ],
269
+ // cover invalid e.g. <script type=>
270
+ [/[ \t\r\n]+/],
271
+ // whitespace
272
+ [/<\/script\s*>/, { token: "@rematch", next: "@pop" }]
273
+ ],
274
+ // After <script ... type = $S2
275
+ scriptWithCustomType: [
276
+ [
277
+ />/,
278
+ {
279
+ token: "delimiter.html",
280
+ next: "@scriptEmbedded.$S2",
281
+ nextEmbedded: "$S2"
282
+ }
283
+ ],
284
+ [/"([^"]*)"/, "attribute.value.html"],
285
+ [/'([^']*)'/, "attribute.value.html"],
286
+ [/[\w\-]+/, "attribute.name.html"],
287
+ [/=/, "delimiter.html"],
288
+ [/[ \t\r\n]+/],
289
+ // whitespace
290
+ [/<\/script\s*>/, { token: "@rematch", next: "@pop" }]
291
+ ],
292
+ scriptEmbedded: [
293
+ [/<\/script/, { token: "@rematch", next: "@pop", nextEmbedded: "@pop" }],
294
+ [/[^<]+/, ""]
295
+ ],
296
+ // -- END <script> tags handling
297
+ // -- BEGIN <style> tags handling
298
+ // After <style
299
+ style: [
300
+ [/type/, "attribute.name.html", "@styleAfterType"],
301
+ [/"([^"]*)"/, "attribute.value.html"],
302
+ [/'([^']*)'/, "attribute.value.html"],
303
+ [/[\w\-]+/, "attribute.name.html"],
304
+ [/=/, "delimiter.html"],
305
+ [
306
+ />/,
307
+ {
308
+ token: "delimiter.html",
309
+ next: "@styleEmbedded",
310
+ nextEmbedded: "text/css"
311
+ }
312
+ ],
313
+ [/[ \t\r\n]+/],
314
+ // whitespace
315
+ [
316
+ /(<\/)(style\s*)(>)/,
317
+ ["delimiter.html", "tag.html", { token: "delimiter.html", next: "@pop" }]
318
+ ]
319
+ ],
320
+ // After <style ... type
321
+ styleAfterType: [
322
+ [/=/, "delimiter.html", "@styleAfterTypeEquals"],
323
+ [
324
+ />/,
325
+ {
326
+ token: "delimiter.html",
327
+ next: "@styleEmbedded",
328
+ nextEmbedded: "text/css"
329
+ }
330
+ ],
331
+ // cover invalid e.g. <style type>
332
+ [/[ \t\r\n]+/],
333
+ // whitespace
334
+ [/<\/style\s*>/, { token: "@rematch", next: "@pop" }]
335
+ ],
336
+ // After <style ... type =
337
+ styleAfterTypeEquals: [
338
+ [
339
+ /"([^"]*)"/,
340
+ {
341
+ token: "attribute.value.html",
342
+ switchTo: "@styleWithCustomType.$1"
343
+ }
344
+ ],
345
+ [
346
+ /'([^']*)'/,
347
+ {
348
+ token: "attribute.value.html",
349
+ switchTo: "@styleWithCustomType.$1"
350
+ }
351
+ ],
352
+ [
353
+ />/,
354
+ {
355
+ token: "delimiter.html",
356
+ next: "@styleEmbedded",
357
+ nextEmbedded: "text/css"
358
+ }
359
+ ],
360
+ // cover invalid e.g. <style type=>
361
+ [/[ \t\r\n]+/],
362
+ // whitespace
363
+ [/<\/style\s*>/, { token: "@rematch", next: "@pop" }]
364
+ ],
365
+ // After <style ... type = $S2
366
+ styleWithCustomType: [
367
+ [
368
+ />/,
369
+ {
370
+ token: "delimiter.html",
371
+ next: "@styleEmbedded.$S2",
372
+ nextEmbedded: "$S2"
373
+ }
374
+ ],
375
+ [/"([^"]*)"/, "attribute.value.html"],
376
+ [/'([^']*)'/, "attribute.value.html"],
377
+ [/[\w\-]+/, "attribute.name.html"],
378
+ [/=/, "delimiter.html"],
379
+ [/[ \t\r\n]+/],
380
+ // whitespace
381
+ [/<\/style\s*>/, { token: "@rematch", next: "@pop" }]
382
+ ],
383
+ styleEmbedded: [
384
+ [/<\/style/, { token: "@rematch", next: "@pop", nextEmbedded: "@pop" }],
385
+ [/[^<]+/, ""]
386
+ ]
387
+ }
388
+ };
389
+ export {
390
+ t as conf,
391
+ e as language
392
+ };