@univerjs/uniscript 0.4.0-alpha.0 → 0.4.0-alpha.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (177) hide show
  1. package/lib/abap-BZS-1p12.js +6 -0
  2. package/lib/abap-D8H3nII2.mjs +1404 -0
  3. package/lib/apex-B2xdRF0k.js +6 -0
  4. package/lib/apex-BVHYDV51.mjs +334 -0
  5. package/lib/azcli-BwJ4gbR1.mjs +74 -0
  6. package/lib/azcli-CKk2q0zF.js +6 -0
  7. package/lib/bat-BDmMqWXx.mjs +106 -0
  8. package/lib/bat-Ehz5Z_mk.js +6 -0
  9. package/lib/bicep-B5L2IbSj.mjs +110 -0
  10. package/lib/bicep-WbLMPUMj.js +7 -0
  11. package/lib/cameligo-B_ldnAvM.js +6 -0
  12. package/lib/cameligo-CmyOPZUd.mjs +180 -0
  13. package/lib/cjs/index.js +1 -9
  14. package/lib/clojure-Dg-qgg-1.js +6 -0
  15. package/lib/clojure-iSXHsTlR.mjs +767 -0
  16. package/lib/coffee-BCg0pb49.js +6 -0
  17. package/lib/coffee-BUCk2FHC.mjs +238 -0
  18. package/lib/cpp-CJWZ7Zo7.js +6 -0
  19. package/lib/cpp-MUyeqRt5.mjs +395 -0
  20. package/lib/csharp-B9vyMfVU.mjs +332 -0
  21. package/lib/csharp-BZypj8XG.js +6 -0
  22. package/lib/csp-BfXxGnNN.js +6 -0
  23. package/lib/csp-CbylPXe5.mjs +59 -0
  24. package/lib/css-BPDnvT2s.js +8 -0
  25. package/lib/css-BQSMT8k7.mjs +193 -0
  26. package/lib/cssMode-B_of5tVd.js +9 -0
  27. package/lib/cssMode-BuX-eUHc.mjs +1604 -0
  28. package/lib/cypher-3bNWMNCJ.js +6 -0
  29. package/lib/cypher-D7IWy_82.mjs +269 -0
  30. package/lib/dart-BCVbUKaH.mjs +287 -0
  31. package/lib/dart-C9Glm5m-.js +6 -0
  32. package/lib/dockerfile-CjnlcV5o.js +6 -0
  33. package/lib/dockerfile-D2-hSnDX.mjs +136 -0
  34. package/lib/ecl-DRJlPmOb.mjs +462 -0
  35. package/lib/ecl-UyoSfv7F.js +6 -0
  36. package/lib/elixir-Bol0p0Ia.js +6 -0
  37. package/lib/elixir-D8NBXKCb.mjs +575 -0
  38. package/lib/es/index.js +5 -262
  39. package/lib/flow9-Be1OUdJl.js +6 -0
  40. package/lib/flow9-Dp7h8rKW.mjs +148 -0
  41. package/lib/freemarker2-D8-fH4uC.mjs +1001 -0
  42. package/lib/freemarker2-S5ay_GEf.js +8 -0
  43. package/lib/fsharp-CJxdVP7r.mjs +223 -0
  44. package/lib/fsharp-CKIYWNYJ.js +6 -0
  45. package/lib/go-DWj6zslQ.js +6 -0
  46. package/lib/go-IPaMO3Uz.mjs +224 -0
  47. package/lib/graphql-BzJpwfxN.js +6 -0
  48. package/lib/graphql-CMoDK5uf.mjs +157 -0
  49. package/lib/handlebars-CEMNnGaU.mjs +427 -0
  50. package/lib/handlebars-CM3PRDRO.js +6 -0
  51. package/lib/hcl-BCY6T0iq.js +6 -0
  52. package/lib/hcl-BTAYK4pT.mjs +189 -0
  53. package/lib/html-BSUn7oJR.mjs +316 -0
  54. package/lib/html-Df-Osxjs.js +6 -0
  55. package/lib/htmlMode-Bj4CfAzA.js +9 -0
  56. package/lib/htmlMode-xJPwX0cD.mjs +1615 -0
  57. package/lib/index-D6nY5NdF.mjs +116821 -0
  58. package/lib/index-rYV4VmC2.js +1163 -0
  59. package/lib/index.css +1 -1
  60. package/lib/ini-CC3_THb4.js +6 -0
  61. package/lib/ini-CiaphB6F.mjs +77 -0
  62. package/lib/java-CwRV8Dsg.js +6 -0
  63. package/lib/java-DxksziCw.mjs +238 -0
  64. package/lib/javascript-D1eKEotE.js +6 -0
  65. package/lib/javascript-c8D1_K05.mjs +76 -0
  66. package/lib/jsonMode-8-L3-E9k.mjs +2042 -0
  67. package/lib/jsonMode-BdBVsN9_.js +15 -0
  68. package/lib/julia-7Z1jwT4W.js +6 -0
  69. package/lib/julia-TTty8och.mjs +517 -0
  70. package/lib/kotlin-BAXgl2QX.js +6 -0
  71. package/lib/kotlin-Dzand-bM.mjs +259 -0
  72. package/lib/less-CSG9Zdoy.js +7 -0
  73. package/lib/less-CWDFQI_i.mjs +168 -0
  74. package/lib/lexon-BiTtMD9F.js +6 -0
  75. package/lib/lexon-bZpjZioh.mjs +163 -0
  76. package/lib/liquid-BmlJOXgY.js +6 -0
  77. package/lib/liquid-Bs7DM5cg.mjs +248 -0
  78. package/lib/lua-CoWYKXUu.mjs +168 -0
  79. package/lib/lua-o7UTFJ05.js +6 -0
  80. package/lib/m3-DIJY3uEe.mjs +216 -0
  81. package/lib/m3-DOYTRLxi.js +6 -0
  82. package/lib/markdown-CDlkMTMZ.mjs +235 -0
  83. package/lib/markdown-Di5faXtP.js +6 -0
  84. package/lib/mdx-BEI71kqO.mjs +173 -0
  85. package/lib/mdx-DJV2KJ98.js +6 -0
  86. package/lib/mips-CIiuS33B.mjs +204 -0
  87. package/lib/mips-CjGjcf9D.js +6 -0
  88. package/lib/msdax-4_jBeazN.mjs +381 -0
  89. package/lib/msdax-DZFpIwAH.js +6 -0
  90. package/lib/mysql-6Y0DL_eO.js +6 -0
  91. package/lib/mysql-D_KZRjSR.mjs +884 -0
  92. package/lib/objective-c-7nsY1fc1.mjs +189 -0
  93. package/lib/objective-c-BtrzMwBz.js +6 -0
  94. package/lib/pascal-BF06Dt9I.js +6 -0
  95. package/lib/pascal-BHpF9PW1.mjs +257 -0
  96. package/lib/pascaligo-BDrxVOcH.js +6 -0
  97. package/lib/pascaligo-C3mRbxmU.mjs +170 -0
  98. package/lib/perl-BMlqAyyD.js +6 -0
  99. package/lib/perl-F3tWDMLI.mjs +632 -0
  100. package/lib/pgsql-D62t1RD_.mjs +857 -0
  101. package/lib/pgsql-DXYBcnYD.js +6 -0
  102. package/lib/php-C8GGPjjI.mjs +506 -0
  103. package/lib/php-DmDmMNs3.js +6 -0
  104. package/lib/pla-2A6q3K8_.js +6 -0
  105. package/lib/pla-C_W_x2fV.mjs +143 -0
  106. package/lib/postiats-CMS8WwLg.mjs +913 -0
  107. package/lib/postiats-DQ-6iLGI.js +6 -0
  108. package/lib/powerquery-CuZPk7NC.js +6 -0
  109. package/lib/powerquery-Dcs0XplE.mjs +896 -0
  110. package/lib/powershell-Brx1N_3T.mjs +245 -0
  111. package/lib/powershell-D7BqJxnS.js +6 -0
  112. package/lib/protobuf-CkqkhuUG.js +7 -0
  113. package/lib/protobuf-UEJDuX6l.mjs +426 -0
  114. package/lib/pug-65DF18O8.js +6 -0
  115. package/lib/pug-LDwDmrMc.mjs +408 -0
  116. package/lib/python-BOeTitp9.mjs +309 -0
  117. package/lib/python-DRyE-VQQ.js +6 -0
  118. package/lib/qsharp-Cb7hPwnM.mjs +307 -0
  119. package/lib/qsharp-Dw07PXbd.js +6 -0
  120. package/lib/r-BHuY0po5.js +6 -0
  121. package/lib/r-BiFgSgcs.mjs +249 -0
  122. package/lib/razor-D0RPXCAO.mjs +558 -0
  123. package/lib/razor-DtDOotKq.js +6 -0
  124. package/lib/redis-BdzqoKC2.mjs +308 -0
  125. package/lib/redis-_Q4kv9ug.js +6 -0
  126. package/lib/redshift-DNNCHCLR.js +6 -0
  127. package/lib/redshift-Df6PoiEL.mjs +815 -0
  128. package/lib/restructuredtext-C9FM3r80.js +6 -0
  129. package/lib/restructuredtext-CW0ZtQ2l.mjs +180 -0
  130. package/lib/ruby-DyIFepcy.mjs +517 -0
  131. package/lib/ruby-DyJmXCYh.js +6 -0
  132. package/lib/rust-BiRHKB0S.mjs +349 -0
  133. package/lib/rust-DVvzZ_uH.js +6 -0
  134. package/lib/sb-CFwmZh3c.js +6 -0
  135. package/lib/sb-CahkGwPC.mjs +121 -0
  136. package/lib/scala-Cg9Wfw6B.mjs +376 -0
  137. package/lib/scala-DjaRe0PR.js +6 -0
  138. package/lib/scheme-Bqb0wlMX.mjs +114 -0
  139. package/lib/scheme-ZdeLzG0d.js +6 -0
  140. package/lib/scss-3qd2syug.mjs +268 -0
  141. package/lib/scss-Dqv1RljX.js +8 -0
  142. package/lib/shell-B5iW6U-v.mjs +227 -0
  143. package/lib/shell-BJ5zD_-e.js +6 -0
  144. package/lib/solidity-8Ys0iSgd.mjs +1373 -0
  145. package/lib/solidity-CagYWQAe.js +6 -0
  146. package/lib/sophia-PnZfErC3.mjs +205 -0
  147. package/lib/sophia-szuux90p.js +6 -0
  148. package/lib/sparql-CXz1-gkd.js +6 -0
  149. package/lib/sparql-CgWX-KRM.mjs +207 -0
  150. package/lib/sql-CN3Vg4Sm.mjs +859 -0
  151. package/lib/sql-CWZ5x4mg.js +6 -0
  152. package/lib/st-CcWMPoh3.js +6 -0
  153. package/lib/st-DKDuarOh.mjs +422 -0
  154. package/lib/swift-DUBoAkDR.js +8 -0
  155. package/lib/swift-DnXH6Con.mjs +318 -0
  156. package/lib/systemverilog-5hQzl-99.js +6 -0
  157. package/lib/systemverilog-pJOgZU46.mjs +582 -0
  158. package/lib/tcl-Bls9iNXn.mjs +238 -0
  159. package/lib/tcl-CiK0GhJi.js +6 -0
  160. package/lib/tsMode-BB2mDc5d.mjs +906 -0
  161. package/lib/tsMode-N-LS5RKx.js +16 -0
  162. package/lib/twig-B14HEeE0.mjs +398 -0
  163. package/lib/twig-Cbq-Ua-E.js +6 -0
  164. package/lib/typescript-CZplv8KD.js +6 -0
  165. package/lib/typescript-f9PHTVoW.mjs +351 -0
  166. package/lib/typespec-Br_LC070.js +6 -0
  167. package/lib/typespec-dAaIdBal.mjs +125 -0
  168. package/lib/umd/index.js +1914 -2
  169. package/lib/vb-B1HzwoGL.js +6 -0
  170. package/lib/vb-CPBujGrP.mjs +378 -0
  171. package/lib/wgsl-BNAUPMiJ.js +303 -0
  172. package/lib/wgsl-CqCqdnZC.mjs +448 -0
  173. package/lib/xml-BSe-ETnG.js +6 -0
  174. package/lib/xml-Dv0cmUxw.mjs +103 -0
  175. package/lib/yaml-O_DoXtBP.js +6 -0
  176. package/lib/yaml-eXS7QSgG.mjs +214 -0
  177. package/package.json +10 -17
@@ -0,0 +1,408 @@
1
+ /*!-----------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Version: 0.52.0(f6dc0eb8fce67e57f6036f4769d92c1666cdf546)
4
+ * Released under the MIT license
5
+ * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
6
+ *-----------------------------------------------------------------------------*/
7
+ var conf = {
8
+ comments: {
9
+ lineComment: "//"
10
+ },
11
+ brackets: [
12
+ ["{", "}"],
13
+ ["[", "]"],
14
+ ["(", ")"]
15
+ ],
16
+ autoClosingPairs: [
17
+ { open: '"', close: '"', notIn: ["string", "comment"] },
18
+ { open: "'", close: "'", notIn: ["string", "comment"] },
19
+ { open: "{", close: "}", notIn: ["string", "comment"] },
20
+ { open: "[", close: "]", notIn: ["string", "comment"] },
21
+ { open: "(", close: ")", notIn: ["string", "comment"] }
22
+ ],
23
+ folding: {
24
+ offSide: !0
25
+ }
26
+ }, language = {
27
+ defaultToken: "",
28
+ tokenPostfix: ".pug",
29
+ ignoreCase: !0,
30
+ brackets: [
31
+ { token: "delimiter.curly", open: "{", close: "}" },
32
+ { token: "delimiter.array", open: "[", close: "]" },
33
+ { token: "delimiter.parenthesis", open: "(", close: ")" }
34
+ ],
35
+ keywords: [
36
+ "append",
37
+ "block",
38
+ "case",
39
+ "default",
40
+ "doctype",
41
+ "each",
42
+ "else",
43
+ "extends",
44
+ "for",
45
+ "if",
46
+ "in",
47
+ "include",
48
+ "mixin",
49
+ "typeof",
50
+ "unless",
51
+ "var",
52
+ "when"
53
+ ],
54
+ tags: [
55
+ "a",
56
+ "abbr",
57
+ "acronym",
58
+ "address",
59
+ "area",
60
+ "article",
61
+ "aside",
62
+ "audio",
63
+ "b",
64
+ "base",
65
+ "basefont",
66
+ "bdi",
67
+ "bdo",
68
+ "blockquote",
69
+ "body",
70
+ "br",
71
+ "button",
72
+ "canvas",
73
+ "caption",
74
+ "center",
75
+ "cite",
76
+ "code",
77
+ "col",
78
+ "colgroup",
79
+ "command",
80
+ "datalist",
81
+ "dd",
82
+ "del",
83
+ "details",
84
+ "dfn",
85
+ "div",
86
+ "dl",
87
+ "dt",
88
+ "em",
89
+ "embed",
90
+ "fieldset",
91
+ "figcaption",
92
+ "figure",
93
+ "font",
94
+ "footer",
95
+ "form",
96
+ "frame",
97
+ "frameset",
98
+ "h1",
99
+ "h2",
100
+ "h3",
101
+ "h4",
102
+ "h5",
103
+ "h6",
104
+ "head",
105
+ "header",
106
+ "hgroup",
107
+ "hr",
108
+ "html",
109
+ "i",
110
+ "iframe",
111
+ "img",
112
+ "input",
113
+ "ins",
114
+ "keygen",
115
+ "kbd",
116
+ "label",
117
+ "li",
118
+ "link",
119
+ "map",
120
+ "mark",
121
+ "menu",
122
+ "meta",
123
+ "meter",
124
+ "nav",
125
+ "noframes",
126
+ "noscript",
127
+ "object",
128
+ "ol",
129
+ "optgroup",
130
+ "option",
131
+ "output",
132
+ "p",
133
+ "param",
134
+ "pre",
135
+ "progress",
136
+ "q",
137
+ "rp",
138
+ "rt",
139
+ "ruby",
140
+ "s",
141
+ "samp",
142
+ "script",
143
+ "section",
144
+ "select",
145
+ "small",
146
+ "source",
147
+ "span",
148
+ "strike",
149
+ "strong",
150
+ "style",
151
+ "sub",
152
+ "summary",
153
+ "sup",
154
+ "table",
155
+ "tbody",
156
+ "td",
157
+ "textarea",
158
+ "tfoot",
159
+ "th",
160
+ "thead",
161
+ "time",
162
+ "title",
163
+ "tr",
164
+ "tracks",
165
+ "tt",
166
+ "u",
167
+ "ul",
168
+ "video",
169
+ "wbr"
170
+ ],
171
+ // we include these common regular expressions
172
+ symbols: /[\+\-\*\%\&\|\!\=\/\.\,\:]+/,
173
+ escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
174
+ tokenizer: {
175
+ root: [
176
+ // Tag or a keyword at start
177
+ [
178
+ /^(\s*)([a-zA-Z_-][\w-]*)/,
179
+ {
180
+ cases: {
181
+ "$2@tags": {
182
+ cases: {
183
+ "@eos": ["", "tag"],
184
+ "@default": ["", { token: "tag", next: "@tag.$1" }]
185
+ }
186
+ },
187
+ "$2@keywords": ["", { token: "keyword.$2" }],
188
+ "@default": ["", ""]
189
+ }
190
+ }
191
+ ],
192
+ // id
193
+ [
194
+ /^(\s*)(#[a-zA-Z_-][\w-]*)/,
195
+ {
196
+ cases: {
197
+ "@eos": ["", "tag.id"],
198
+ "@default": ["", { token: "tag.id", next: "@tag.$1" }]
199
+ }
200
+ }
201
+ ],
202
+ // class
203
+ [
204
+ /^(\s*)(\.[a-zA-Z_-][\w-]*)/,
205
+ {
206
+ cases: {
207
+ "@eos": ["", "tag.class"],
208
+ "@default": ["", { token: "tag.class", next: "@tag.$1" }]
209
+ }
210
+ }
211
+ ],
212
+ // plain text with pipe
213
+ [/^(\s*)(\|.*)$/, ""],
214
+ { include: "@whitespace" },
215
+ // keywords
216
+ [
217
+ /[a-zA-Z_$][\w$]*/,
218
+ {
219
+ cases: {
220
+ "@keywords": { token: "keyword.$0" },
221
+ "@default": ""
222
+ }
223
+ }
224
+ ],
225
+ // delimiters and operators
226
+ [/[{}()\[\]]/, "@brackets"],
227
+ [/@symbols/, "delimiter"],
228
+ // numbers
229
+ [/\d+\.\d+([eE][\-+]?\d+)?/, "number.float"],
230
+ [/\d+/, "number"],
231
+ // strings:
232
+ [/"/, "string", '@string."'],
233
+ [/'/, "string", "@string.'"]
234
+ ],
235
+ tag: [
236
+ [/(\.)(\s*$)/, [{ token: "delimiter", next: "@blockText.$S2." }, ""]],
237
+ [/\s+/, { token: "", next: "@simpleText" }],
238
+ // id
239
+ [
240
+ /#[a-zA-Z_-][\w-]*/,
241
+ {
242
+ cases: {
243
+ "@eos": { token: "tag.id", next: "@pop" },
244
+ "@default": "tag.id"
245
+ }
246
+ }
247
+ ],
248
+ // class
249
+ [
250
+ /\.[a-zA-Z_-][\w-]*/,
251
+ {
252
+ cases: {
253
+ "@eos": { token: "tag.class", next: "@pop" },
254
+ "@default": "tag.class"
255
+ }
256
+ }
257
+ ],
258
+ // attributes
259
+ [/\(/, { token: "delimiter.parenthesis", next: "@attributeList" }]
260
+ ],
261
+ simpleText: [
262
+ [/[^#]+$/, { token: "", next: "@popall" }],
263
+ [/[^#]+/, { token: "" }],
264
+ // interpolation
265
+ [
266
+ /(#{)([^}]*)(})/,
267
+ {
268
+ cases: {
269
+ "@eos": [
270
+ "interpolation.delimiter",
271
+ "interpolation",
272
+ {
273
+ token: "interpolation.delimiter",
274
+ next: "@popall"
275
+ }
276
+ ],
277
+ "@default": ["interpolation.delimiter", "interpolation", "interpolation.delimiter"]
278
+ }
279
+ }
280
+ ],
281
+ [/#$/, { token: "", next: "@popall" }],
282
+ [/#/, ""]
283
+ ],
284
+ attributeList: [
285
+ [/\s+/, ""],
286
+ [
287
+ /(\w+)(\s*=\s*)("|')/,
288
+ ["attribute.name", "delimiter", { token: "attribute.value", next: "@value.$3" }]
289
+ ],
290
+ [/\w+/, "attribute.name"],
291
+ [
292
+ /,/,
293
+ {
294
+ cases: {
295
+ "@eos": {
296
+ token: "attribute.delimiter",
297
+ next: "@popall"
298
+ },
299
+ "@default": "attribute.delimiter"
300
+ }
301
+ }
302
+ ],
303
+ [/\)$/, { token: "delimiter.parenthesis", next: "@popall" }],
304
+ [/\)/, { token: "delimiter.parenthesis", next: "@pop" }]
305
+ ],
306
+ whitespace: [
307
+ [/^(\s*)(\/\/.*)$/, { token: "comment", next: "@blockText.$1.comment" }],
308
+ [/[ \t\r\n]+/, ""],
309
+ [/<!--/, { token: "comment", next: "@comment" }]
310
+ ],
311
+ blockText: [
312
+ [
313
+ /^\s+.*$/,
314
+ {
315
+ cases: {
316
+ "($S2\\s+.*$)": { token: "$S3" },
317
+ "@default": { token: "@rematch", next: "@popall" }
318
+ }
319
+ }
320
+ ],
321
+ [/./, { token: "@rematch", next: "@popall" }]
322
+ ],
323
+ comment: [
324
+ [/[^<\-]+/, "comment.content"],
325
+ [/-->/, { token: "comment", next: "@pop" }],
326
+ [/<!--/, "comment.content.invalid"],
327
+ [/[<\-]/, "comment.content"]
328
+ ],
329
+ string: [
330
+ [
331
+ /[^\\"'#]+/,
332
+ {
333
+ cases: {
334
+ "@eos": { token: "string", next: "@popall" },
335
+ "@default": "string"
336
+ }
337
+ }
338
+ ],
339
+ [
340
+ /@escapes/,
341
+ {
342
+ cases: {
343
+ "@eos": { token: "string.escape", next: "@popall" },
344
+ "@default": "string.escape"
345
+ }
346
+ }
347
+ ],
348
+ [
349
+ /\\./,
350
+ {
351
+ cases: {
352
+ "@eos": {
353
+ token: "string.escape.invalid",
354
+ next: "@popall"
355
+ },
356
+ "@default": "string.escape.invalid"
357
+ }
358
+ }
359
+ ],
360
+ // interpolation
361
+ [/(#{)([^}]*)(})/, ["interpolation.delimiter", "interpolation", "interpolation.delimiter"]],
362
+ [/#/, "string"],
363
+ [
364
+ /["']/,
365
+ {
366
+ cases: {
367
+ "$#==$S2": { token: "string", next: "@pop" },
368
+ "@default": { token: "string" }
369
+ }
370
+ }
371
+ ]
372
+ ],
373
+ // Almost identical to above, except for escapes and the output token
374
+ value: [
375
+ [
376
+ /[^\\"']+/,
377
+ {
378
+ cases: {
379
+ "@eos": { token: "attribute.value", next: "@popall" },
380
+ "@default": "attribute.value"
381
+ }
382
+ }
383
+ ],
384
+ [
385
+ /\\./,
386
+ {
387
+ cases: {
388
+ "@eos": { token: "attribute.value", next: "@popall" },
389
+ "@default": "attribute.value"
390
+ }
391
+ }
392
+ ],
393
+ [
394
+ /["']/,
395
+ {
396
+ cases: {
397
+ "$#==$S2": { token: "attribute.value", next: "@pop" },
398
+ "@default": { token: "attribute.value" }
399
+ }
400
+ }
401
+ ]
402
+ ]
403
+ }
404
+ };
405
+ export {
406
+ conf,
407
+ language
408
+ };
@@ -0,0 +1,309 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: !0 });
3
+ import { m as monaco_editor_core_star } from "./index-D6nY5NdF.mjs";
4
+ /*!-----------------------------------------------------------------------------
5
+ * Copyright (c) Microsoft Corporation. All rights reserved.
6
+ * Version: 0.52.0(f6dc0eb8fce67e57f6036f4769d92c1666cdf546)
7
+ * Released under the MIT license
8
+ * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
9
+ *-----------------------------------------------------------------------------*/
10
+ var __defProp2 = Object.defineProperty, __getOwnPropDesc = Object.getOwnPropertyDescriptor, __getOwnPropNames = Object.getOwnPropertyNames, __hasOwnProp = Object.prototype.hasOwnProperty, __copyProps = /* @__PURE__ */ __name((to, from, except, desc) => {
11
+ if (from && typeof from == "object" || typeof from == "function")
12
+ for (let key of __getOwnPropNames(from))
13
+ !__hasOwnProp.call(to, key) && key !== except && __defProp2(to, key, { get: /* @__PURE__ */ __name(() => from[key], "get"), enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ return to;
15
+ }, "__copyProps"), __reExport = /* @__PURE__ */ __name((target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget), "__reExport"), monaco_editor_core_exports = {};
16
+ __reExport(monaco_editor_core_exports, monaco_editor_core_star);
17
+ var conf = {
18
+ comments: {
19
+ lineComment: "#",
20
+ blockComment: ["'''", "'''"]
21
+ },
22
+ brackets: [
23
+ ["{", "}"],
24
+ ["[", "]"],
25
+ ["(", ")"]
26
+ ],
27
+ autoClosingPairs: [
28
+ { open: "{", close: "}" },
29
+ { open: "[", close: "]" },
30
+ { open: "(", close: ")" },
31
+ { open: '"', close: '"', notIn: ["string"] },
32
+ { open: "'", close: "'", notIn: ["string", "comment"] }
33
+ ],
34
+ surroundingPairs: [
35
+ { open: "{", close: "}" },
36
+ { open: "[", close: "]" },
37
+ { open: "(", close: ")" },
38
+ { open: '"', close: '"' },
39
+ { open: "'", close: "'" }
40
+ ],
41
+ onEnterRules: [
42
+ {
43
+ beforeText: new RegExp(
44
+ "^\\s*(?:def|class|for|if|elif|else|while|try|with|finally|except|async|match|case).*?:\\s*$"
45
+ ),
46
+ action: { indentAction: monaco_editor_core_exports.languages.IndentAction.Indent }
47
+ }
48
+ ],
49
+ folding: {
50
+ offSide: !0,
51
+ markers: {
52
+ start: new RegExp("^\\s*#region\\b"),
53
+ end: new RegExp("^\\s*#endregion\\b")
54
+ }
55
+ }
56
+ }, language = {
57
+ defaultToken: "",
58
+ tokenPostfix: ".python",
59
+ keywords: [
60
+ // This section is the result of running
61
+ // `import keyword; for k in sorted(keyword.kwlist + keyword.softkwlist): print(" '" + k + "',")`
62
+ // in a Python REPL,
63
+ // though note that the output from Python 3 is not a strict superset of the
64
+ // output from Python 2.
65
+ "False",
66
+ // promoted to keyword.kwlist in Python 3
67
+ "None",
68
+ // promoted to keyword.kwlist in Python 3
69
+ "True",
70
+ // promoted to keyword.kwlist in Python 3
71
+ "_",
72
+ // new in Python 3.10
73
+ "and",
74
+ "as",
75
+ "assert",
76
+ "async",
77
+ // new in Python 3
78
+ "await",
79
+ // new in Python 3
80
+ "break",
81
+ "case",
82
+ // new in Python 3.10
83
+ "class",
84
+ "continue",
85
+ "def",
86
+ "del",
87
+ "elif",
88
+ "else",
89
+ "except",
90
+ "exec",
91
+ // Python 2, but not 3.
92
+ "finally",
93
+ "for",
94
+ "from",
95
+ "global",
96
+ "if",
97
+ "import",
98
+ "in",
99
+ "is",
100
+ "lambda",
101
+ "match",
102
+ // new in Python 3.10
103
+ "nonlocal",
104
+ // new in Python 3
105
+ "not",
106
+ "or",
107
+ "pass",
108
+ "print",
109
+ // Python 2, but not 3.
110
+ "raise",
111
+ "return",
112
+ "try",
113
+ "type",
114
+ // new in Python 3.12
115
+ "while",
116
+ "with",
117
+ "yield",
118
+ "int",
119
+ "float",
120
+ "long",
121
+ "complex",
122
+ "hex",
123
+ "abs",
124
+ "all",
125
+ "any",
126
+ "apply",
127
+ "basestring",
128
+ "bin",
129
+ "bool",
130
+ "buffer",
131
+ "bytearray",
132
+ "callable",
133
+ "chr",
134
+ "classmethod",
135
+ "cmp",
136
+ "coerce",
137
+ "compile",
138
+ "complex",
139
+ "delattr",
140
+ "dict",
141
+ "dir",
142
+ "divmod",
143
+ "enumerate",
144
+ "eval",
145
+ "execfile",
146
+ "file",
147
+ "filter",
148
+ "format",
149
+ "frozenset",
150
+ "getattr",
151
+ "globals",
152
+ "hasattr",
153
+ "hash",
154
+ "help",
155
+ "id",
156
+ "input",
157
+ "intern",
158
+ "isinstance",
159
+ "issubclass",
160
+ "iter",
161
+ "len",
162
+ "locals",
163
+ "list",
164
+ "map",
165
+ "max",
166
+ "memoryview",
167
+ "min",
168
+ "next",
169
+ "object",
170
+ "oct",
171
+ "open",
172
+ "ord",
173
+ "pow",
174
+ "print",
175
+ "property",
176
+ "reversed",
177
+ "range",
178
+ "raw_input",
179
+ "reduce",
180
+ "reload",
181
+ "repr",
182
+ "reversed",
183
+ "round",
184
+ "self",
185
+ "set",
186
+ "setattr",
187
+ "slice",
188
+ "sorted",
189
+ "staticmethod",
190
+ "str",
191
+ "sum",
192
+ "super",
193
+ "tuple",
194
+ "type",
195
+ "unichr",
196
+ "unicode",
197
+ "vars",
198
+ "xrange",
199
+ "zip",
200
+ "__dict__",
201
+ "__methods__",
202
+ "__members__",
203
+ "__class__",
204
+ "__bases__",
205
+ "__name__",
206
+ "__mro__",
207
+ "__subclasses__",
208
+ "__init__",
209
+ "__import__"
210
+ ],
211
+ brackets: [
212
+ { open: "{", close: "}", token: "delimiter.curly" },
213
+ { open: "[", close: "]", token: "delimiter.bracket" },
214
+ { open: "(", close: ")", token: "delimiter.parenthesis" }
215
+ ],
216
+ tokenizer: {
217
+ root: [
218
+ { include: "@whitespace" },
219
+ { include: "@numbers" },
220
+ { include: "@strings" },
221
+ [/[,:;]/, "delimiter"],
222
+ [/[{}\[\]()]/, "@brackets"],
223
+ [/@[a-zA-Z_]\w*/, "tag"],
224
+ [
225
+ /[a-zA-Z_]\w*/,
226
+ {
227
+ cases: {
228
+ "@keywords": "keyword",
229
+ "@default": "identifier"
230
+ }
231
+ }
232
+ ]
233
+ ],
234
+ // Deal with white space, including single and multi-line comments
235
+ whitespace: [
236
+ [/\s+/, "white"],
237
+ [/(^#.*$)/, "comment"],
238
+ [/'''/, "string", "@endDocString"],
239
+ [/"""/, "string", "@endDblDocString"]
240
+ ],
241
+ endDocString: [
242
+ [/[^']+/, "string"],
243
+ [/\\'/, "string"],
244
+ [/'''/, "string", "@popall"],
245
+ [/'/, "string"]
246
+ ],
247
+ endDblDocString: [
248
+ [/[^"]+/, "string"],
249
+ [/\\"/, "string"],
250
+ [/"""/, "string", "@popall"],
251
+ [/"/, "string"]
252
+ ],
253
+ // Recognize hex, negatives, decimals, imaginaries, longs, and scientific notation
254
+ numbers: [
255
+ [/-?0x([abcdef]|[ABCDEF]|\d)+[lL]?/, "number.hex"],
256
+ [/-?(\d*\.)?\d+([eE][+\-]?\d+)?[jJ]?[lL]?/, "number"]
257
+ ],
258
+ // Recognize strings, including those broken across lines with \ (but not without)
259
+ strings: [
260
+ [/'$/, "string.escape", "@popall"],
261
+ [/f'{1,3}/, "string.escape", "@fStringBody"],
262
+ [/'/, "string.escape", "@stringBody"],
263
+ [/"$/, "string.escape", "@popall"],
264
+ [/f"{1,3}/, "string.escape", "@fDblStringBody"],
265
+ [/"/, "string.escape", "@dblStringBody"]
266
+ ],
267
+ fStringBody: [
268
+ [/[^\\'\{\}]+$/, "string", "@popall"],
269
+ [/[^\\'\{\}]+/, "string"],
270
+ [/\{[^\}':!=]+/, "identifier", "@fStringDetail"],
271
+ [/\\./, "string"],
272
+ [/'/, "string.escape", "@popall"],
273
+ [/\\$/, "string"]
274
+ ],
275
+ stringBody: [
276
+ [/[^\\']+$/, "string", "@popall"],
277
+ [/[^\\']+/, "string"],
278
+ [/\\./, "string"],
279
+ [/'/, "string.escape", "@popall"],
280
+ [/\\$/, "string"]
281
+ ],
282
+ fDblStringBody: [
283
+ [/[^\\"\{\}]+$/, "string", "@popall"],
284
+ [/[^\\"\{\}]+/, "string"],
285
+ [/\{[^\}':!=]+/, "identifier", "@fStringDetail"],
286
+ [/\\./, "string"],
287
+ [/"/, "string.escape", "@popall"],
288
+ [/\\$/, "string"]
289
+ ],
290
+ dblStringBody: [
291
+ [/[^\\"]+$/, "string", "@popall"],
292
+ [/[^\\"]+/, "string"],
293
+ [/\\./, "string"],
294
+ [/"/, "string.escape", "@popall"],
295
+ [/\\$/, "string"]
296
+ ],
297
+ fStringDetail: [
298
+ [/[:][^}]+/, "string"],
299
+ [/[!][ars]/, "string"],
300
+ // only !a, !r, !s are supported by f-strings: https://docs.python.org/3/tutorial/inputoutput.html#formatted-string-literals
301
+ [/=/, "string"],
302
+ [/\}/, "identifier", "@pop"]
303
+ ]
304
+ }
305
+ };
306
+ export {
307
+ conf,
308
+ language
309
+ };