@pb33f/cowboy-components 0.0.14 → 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 (217) hide show
  1. package/dist/abap-DXvTa7XC.js +1404 -0
  2. package/dist/apex-DsQH3mjJ.js +332 -0
  3. package/dist/assets/css.worker-B_qZXUzt.js +84 -0
  4. package/dist/assets/editor.worker-HEmB0D7P.js +11 -0
  5. package/dist/assets/html.worker-D3WUrk8Q.js +458 -0
  6. package/dist/assets/json.worker-CAhUaBo4.js +42 -0
  7. package/dist/assets/rule-documentation.worker-BFIxMBU8.js +1 -0
  8. package/dist/assets/search-problems.worker-VJi4P9Gj.js +1 -0
  9. package/dist/azcli-Cir32SBk.js +74 -0
  10. package/dist/bat-BsNExolo.js +106 -0
  11. package/dist/bicep-2KcKzeQF.js +108 -0
  12. package/dist/cameligo-D0ezznwE.js +180 -0
  13. package/dist/clojure-DxYzAIlu.js +767 -0
  14. package/dist/coffee-DgiPTF3g.js +238 -0
  15. package/dist/components/editor/editor.d.ts +27 -0
  16. package/dist/components/editor/editor.js +192 -0
  17. package/dist/components/error-banner/error-banner.css.d.ts +2 -0
  18. package/dist/components/error-banner/error-banner.css.js +23 -0
  19. package/dist/components/error-banner/error-banner.d.ts +9 -0
  20. package/dist/components/error-banner/error-banner.js +40 -0
  21. package/dist/components/paginator/paginator-events.d.ts +4 -0
  22. package/dist/components/paginator/paginator-events.js +4 -0
  23. package/dist/components/paginator/paginator-navigator.css.d.ts +2 -0
  24. package/dist/components/paginator/paginator-navigator.css.js +35 -0
  25. package/dist/components/paginator/paginator-navigator.d.ts +27 -0
  26. package/dist/components/paginator/paginator-navigator.js +168 -0
  27. package/dist/components/paginator/paginator.css.d.ts +2 -0
  28. package/dist/components/paginator/paginator.css.js +38 -0
  29. package/dist/components/paginator/paginator.d.ts +22 -0
  30. package/dist/components/paginator/paginator.js +122 -0
  31. package/dist/components/percent-bar/percent-bar.css.d.ts +2 -0
  32. package/dist/components/percent-bar/percent-bar.css.js +65 -0
  33. package/dist/components/percent-bar/percent-bar.d.ts +11 -0
  34. package/dist/components/percent-bar/percent-bar.js +85 -0
  35. package/dist/components/problem-list/details-drawer.css.d.ts +2 -0
  36. package/dist/components/problem-list/details-drawer.css.js +42 -0
  37. package/dist/components/problem-list/details-drawer.d.ts +22 -0
  38. package/dist/components/problem-list/details-drawer.js +66 -0
  39. package/dist/components/problem-list/filter.css.d.ts +2 -0
  40. package/dist/components/problem-list/filter.css.js +67 -0
  41. package/dist/components/problem-list/problem-item.css.d.ts +2 -0
  42. package/dist/components/problem-list/problem-item.css.js +170 -0
  43. package/dist/components/problem-list/problem-item.d.ts +27 -0
  44. package/dist/components/problem-list/problem-item.js +126 -0
  45. package/dist/components/problem-list/problem-label-view-filter.css.d.ts +2 -0
  46. package/dist/components/problem-list/problem-label-view-filter.css.js +6 -0
  47. package/dist/components/problem-list/problem-label-view-filter.d.ts +18 -0
  48. package/dist/components/problem-list/problem-label-view-filter.js +66 -0
  49. package/dist/components/problem-list/problem-list.css.d.ts +2 -0
  50. package/dist/components/problem-list/problem-list.css.js +59 -0
  51. package/dist/components/problem-list/problem-list.d.ts +37 -0
  52. package/dist/components/problem-list/problem-list.js +334 -0
  53. package/dist/components/problem-list/problem-mainview.css.d.ts +2 -0
  54. package/dist/components/problem-list/problem-mainview.css.js +100 -0
  55. package/dist/components/problem-list/problem-mainview.d.ts +20 -0
  56. package/dist/components/problem-list/problem-mainview.js +126 -0
  57. package/dist/components/problem-list/problem-rule-filter.d.ts +13 -0
  58. package/dist/components/problem-list/problem-rule-filter.js +67 -0
  59. package/dist/components/problem-list/problem-search-filter.d.ts +13 -0
  60. package/dist/components/problem-list/problem-search-filter.js +45 -0
  61. package/dist/components/problem-list/problem-sort-filter.d.ts +19 -0
  62. package/dist/components/problem-list/problem-sort-filter.js +67 -0
  63. package/dist/components/problem-list/problem-toolbar.css.d.ts +2 -0
  64. package/dist/components/problem-list/problem-toolbar.css.js +41 -0
  65. package/dist/components/problem-list/problem-toolbar.d.ts +14 -0
  66. package/dist/components/problem-list/problem-toolbar.js +63 -0
  67. package/dist/components/problem-list/shared.css.d.ts +2 -0
  68. package/dist/components/problem-list/shared.css.js +91 -0
  69. package/dist/components/problems-overview/diagnostic-evaluation.css.d.ts +2 -0
  70. package/dist/components/problems-overview/diagnostic-evaluation.css.js +178 -0
  71. package/dist/components/problems-overview/diagnostic-evaluation.d.ts +13 -0
  72. package/dist/components/problems-overview/diagnostic-evaluation.js +119 -0
  73. package/dist/components/problems-overview/document-statistic.css.d.ts +2 -0
  74. package/dist/components/problems-overview/document-statistic.css.js +16 -0
  75. package/dist/components/problems-overview/document-statistic.d.ts +10 -0
  76. package/dist/components/problems-overview/document-statistic.js +49 -0
  77. package/dist/components/problems-overview/problem-overview-group.css.d.ts +2 -0
  78. package/dist/components/problems-overview/problem-overview-group.css.js +84 -0
  79. package/dist/components/problems-overview/problem-overview-group.d.ts +17 -0
  80. package/dist/components/problems-overview/problem-overview-group.js +121 -0
  81. package/dist/components/problems-overview/problem-statistic.css.d.ts +2 -0
  82. package/dist/components/problems-overview/problem-statistic.css.js +40 -0
  83. package/dist/components/problems-overview/problem-statistic.d.ts +11 -0
  84. package/dist/components/problems-overview/problem-statistic.js +57 -0
  85. package/dist/components/problems-overview/problem-statistics.css.d.ts +2 -0
  86. package/dist/components/problems-overview/problem-statistics.css.js +46 -0
  87. package/dist/components/problems-overview/problem-statistics.d.ts +14 -0
  88. package/dist/components/problems-overview/problem-statistics.js +132 -0
  89. package/dist/components/problems-overview/problems-overview.css.d.ts +2 -0
  90. package/dist/components/problems-overview/problems-overview.css.js +49 -0
  91. package/dist/components/problems-overview/problems-overview.d.ts +21 -0
  92. package/dist/components/problems-overview/problems-overview.js +108 -0
  93. package/dist/components/render-json-path/render-json-path.css.d.ts +2 -0
  94. package/dist/components/render-json-path/render-json-path.css.js +86 -0
  95. package/dist/components/render-json-path/render-json-path.d.ts +11 -0
  96. package/dist/components/render-json-path/render-json-path.js +105 -0
  97. package/dist/components/the-doctor/settings.d.ts +5 -0
  98. package/dist/components/the-doctor/settings.js +22 -0
  99. package/dist/components/the-doctor/status-bar.css.d.ts +2 -0
  100. package/dist/components/the-doctor/status-bar.css.js +47 -0
  101. package/dist/components/the-doctor/status-bar.d.ts +12 -0
  102. package/dist/components/the-doctor/status-bar.js +71 -0
  103. package/dist/components/the-doctor/the-doctor.css.d.ts +2 -0
  104. package/dist/components/the-doctor/the-doctor.css.js +156 -0
  105. package/dist/components/the-doctor/the-doctor.d.ts +57 -0
  106. package/dist/components/the-doctor/the-doctor.js +340 -0
  107. package/dist/cowboy-components-FcPnnXMU.js +114388 -0
  108. package/dist/cowboy-components.d.ts +5 -2
  109. package/dist/cowboy-components.js +8 -2
  110. package/dist/cowboy-components.umd.cjs +3997 -103
  111. package/dist/cpp-Bq-GnYlH.js +407 -0
  112. package/dist/csharp-IDcibKAT.js +332 -0
  113. package/dist/csp-QdYr8JWa.js +59 -0
  114. package/dist/css/button.css.d.ts +2 -0
  115. package/dist/css/button.css.js +34 -0
  116. package/dist/css/chroma-synxtax.css.d.ts +2 -0
  117. package/dist/css/chroma-synxtax.css.js +130 -0
  118. package/dist/css/cowboy-components.css +3 -0
  119. package/dist/css/links.css.d.ts +2 -0
  120. package/dist/css/links.css.js +17 -0
  121. package/dist/css/lists.css.d.ts +2 -0
  122. package/dist/css/lists.css.js +43 -0
  123. package/dist/css/pb33f-theme.css +2 -2
  124. package/dist/css/syntax.css.js +1 -1
  125. package/dist/css-C-wMMefI.js +193 -0
  126. package/dist/cssMode-DcUlnXpV.js +1541 -0
  127. package/dist/cypher-BfBo9yir.js +269 -0
  128. package/dist/dart-Cv3rVfv_.js +287 -0
  129. package/dist/dockerfile-DyCXBGhV.js +136 -0
  130. package/dist/ecl-COP_iObm.js +462 -0
  131. package/dist/elixir-DoEhbk9F.js +575 -0
  132. package/dist/events/doctor.d.ts +51 -0
  133. package/dist/events/doctor.js +17 -0
  134. package/dist/flow9-DuHGSNW1.js +148 -0
  135. package/dist/freemarker2-sY6FVddl.js +995 -0
  136. package/dist/fsharp-Dv9PDxVO.js +223 -0
  137. package/dist/go-CcdAeqiK.js +224 -0
  138. package/dist/graphql-CoRm4b1H.js +157 -0
  139. package/dist/handlebars-BqznQEC5.js +425 -0
  140. package/dist/hcl-BSgAhV5f.js +189 -0
  141. package/dist/html-DBpY_ZT1.js +314 -0
  142. package/dist/htmlMode-Cf0lYQWN.js +1551 -0
  143. package/dist/ini-ewx9HLIq.js +77 -0
  144. package/dist/java-B5lwcbTy.js +238 -0
  145. package/dist/javascript-DRgEI2Yf.js +76 -0
  146. package/dist/jsonMode-CmuECwTh.js +1958 -0
  147. package/dist/julia-NCcg_P_q.js +517 -0
  148. package/dist/kotlin-BYlnmGrb.js +259 -0
  149. package/dist/less-DG4tqgOo.js +168 -0
  150. package/dist/lexon-CTTPcJLv.js +163 -0
  151. package/dist/liquid-DWVJYCIL.js +246 -0
  152. package/dist/lua-CxQ1RWuo.js +168 -0
  153. package/dist/m3-mHFfpmgx.js +216 -0
  154. package/dist/markdown-Dh6sYULt.js +235 -0
  155. package/dist/mdx-Bjcj5AvL.js +171 -0
  156. package/dist/mips-CNUcjHD1.js +204 -0
  157. package/dist/model/document-statistics.d.ts +40 -0
  158. package/dist/model/document-statistics.js +4 -0
  159. package/dist/model/how_to_fix.d.ts +4 -0
  160. package/dist/model/how_to_fix.js +1 -0
  161. package/dist/model/problem.d.ts +19 -0
  162. package/dist/model/problem.js +106 -0
  163. package/dist/model/rule_documentation.d.ts +5 -0
  164. package/dist/model/rule_documentation.js +1 -0
  165. package/dist/model/session.d.ts +5 -0
  166. package/dist/model/session.js +1 -0
  167. package/dist/msdax-ZvxFeKvs.js +381 -0
  168. package/dist/mysql-COjg31sJ.js +884 -0
  169. package/dist/objective-c-BqrCFBhT.js +189 -0
  170. package/dist/pascal-CUpkilAS.js +257 -0
  171. package/dist/pascaligo-nJfvRJ7x.js +170 -0
  172. package/dist/perl-CWsX6Ysg.js +632 -0
  173. package/dist/pgsql-DwgpEXC8.js +857 -0
  174. package/dist/php-CrbKyd62.js +506 -0
  175. package/dist/pla-JxXT6Kb-.js +143 -0
  176. package/dist/postiats-BOdnTRGv.js +913 -0
  177. package/dist/powerquery-DTkwcXGH.js +896 -0
  178. package/dist/powershell-Cx53dGpt.js +245 -0
  179. package/dist/protobuf-Dp9vE-l-.js +426 -0
  180. package/dist/pug-BSjKVjwP.js +408 -0
  181. package/dist/python-CiN6iAi3.js +282 -0
  182. package/dist/qsharp-C5P1RxY3.js +291 -0
  183. package/dist/r-sEMYnclc.js +249 -0
  184. package/dist/razor-B4jDf_4z.js +556 -0
  185. package/dist/redis-DbzUc-fU.js +308 -0
  186. package/dist/redshift-nrLijj1O.js +815 -0
  187. package/dist/restructuredtext-CIbGUl6T.js +180 -0
  188. package/dist/ruby-JcYJisWg.js +517 -0
  189. package/dist/rust-BgbFBFXH.js +349 -0
  190. package/dist/sb-hRFFChi7.js +121 -0
  191. package/dist/scala-Cs0yVo3Q.js +376 -0
  192. package/dist/scheme-l_0jNtxy.js +114 -0
  193. package/dist/scss-C4l7ZIRR.js +268 -0
  194. package/dist/services/linting-service.d.ts +12 -0
  195. package/dist/services/linting-service.js +121 -0
  196. package/dist/shell-ikLk_l24.js +227 -0
  197. package/dist/solidity-4GxCaH9e.js +1373 -0
  198. package/dist/sophia-tX0WEZsZ.js +205 -0
  199. package/dist/sparql-D7ky-uMk.js +207 -0
  200. package/dist/sql-CqEfBVGS.js +859 -0
  201. package/dist/st-CNWQPqyI.js +422 -0
  202. package/dist/style.css +1 -1
  203. package/dist/swift-C_fDfC0d.js +318 -0
  204. package/dist/systemverilog-gAvsEtN_.js +582 -0
  205. package/dist/tcl-KbBChuA6.js +238 -0
  206. package/dist/tsMode-29i0IHrU.js +886 -0
  207. package/dist/twig-Bb652BpM.js +398 -0
  208. package/dist/typescript-FDohSLaF.js +349 -0
  209. package/dist/vb-2e5hSeUh.js +378 -0
  210. package/dist/wgsl-CYSDq0zg.js +445 -0
  211. package/dist/workers/rule-documentation.worker.d.ts +1 -0
  212. package/dist/workers/rule-documentation.worker.js +85 -0
  213. package/dist/workers/search-problems.worker.d.ts +1 -0
  214. package/dist/workers/search-problems.worker.js +19 -0
  215. package/dist/xml-BdgdiRK4.js +101 -0
  216. package/dist/yaml-CJDq-Ud3.js +212 -0
  217. package/package.json +6 -4
@@ -0,0 +1,575 @@
1
+ /*!-----------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Version: 0.46.0(21007360cad28648bdf46282a2592cb47c3a7a6f)
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
+ },
11
+ brackets: [
12
+ ["{", "}"],
13
+ ["[", "]"],
14
+ ["(", ")"]
15
+ ],
16
+ surroundingPairs: [
17
+ { open: "{", close: "}" },
18
+ { open: "[", close: "]" },
19
+ { open: "(", close: ")" },
20
+ { open: "'", close: "'" },
21
+ { open: '"', close: '"' }
22
+ ],
23
+ autoClosingPairs: [
24
+ { open: "'", close: "'", notIn: ["string", "comment"] },
25
+ { open: '"', close: '"', notIn: ["comment"] },
26
+ { open: '"""', close: '"""' },
27
+ { open: "`", close: "`", notIn: ["string", "comment"] },
28
+ { open: "(", close: ")" },
29
+ { open: "{", close: "}" },
30
+ { open: "[", close: "]" },
31
+ { open: "<<", close: ">>" }
32
+ ],
33
+ indentationRules: {
34
+ increaseIndentPattern: /^\s*(after|else|catch|rescue|fn|[^#]*(do|<\-|\->|\{|\[|\=))\s*$/,
35
+ decreaseIndentPattern: /^\s*((\}|\])\s*$|(after|else|catch|rescue|end)\b)/
36
+ }
37
+ }, t = {
38
+ defaultToken: "source",
39
+ tokenPostfix: ".elixir",
40
+ brackets: [
41
+ { open: "[", close: "]", token: "delimiter.square" },
42
+ { open: "(", close: ")", token: "delimiter.parenthesis" },
43
+ { open: "{", close: "}", token: "delimiter.curly" },
44
+ { open: "<<", close: ">>", token: "delimiter.angle.special" }
45
+ ],
46
+ // Below are lists/regexps to which we reference later.
47
+ declarationKeywords: [
48
+ "def",
49
+ "defp",
50
+ "defn",
51
+ "defnp",
52
+ "defguard",
53
+ "defguardp",
54
+ "defmacro",
55
+ "defmacrop",
56
+ "defdelegate",
57
+ "defcallback",
58
+ "defmacrocallback",
59
+ "defmodule",
60
+ "defprotocol",
61
+ "defexception",
62
+ "defimpl",
63
+ "defstruct"
64
+ ],
65
+ operatorKeywords: ["and", "in", "not", "or", "when"],
66
+ namespaceKeywords: ["alias", "import", "require", "use"],
67
+ otherKeywords: [
68
+ "after",
69
+ "case",
70
+ "catch",
71
+ "cond",
72
+ "do",
73
+ "else",
74
+ "end",
75
+ "fn",
76
+ "for",
77
+ "if",
78
+ "quote",
79
+ "raise",
80
+ "receive",
81
+ "rescue",
82
+ "super",
83
+ "throw",
84
+ "try",
85
+ "unless",
86
+ "unquote_splicing",
87
+ "unquote",
88
+ "with"
89
+ ],
90
+ constants: ["true", "false", "nil"],
91
+ nameBuiltin: ["__MODULE__", "__DIR__", "__ENV__", "__CALLER__", "__STACKTRACE__"],
92
+ // Matches any of the operator names:
93
+ // <<< >>> ||| &&& ^^^ ~~~ === !== ~>> <~> |~> <|> == != <= >= && || \\ <> ++ -- |> =~ -> <- ~> <~ :: .. = < > + - * / | . ^ & !
94
+ operator: /-[->]?|!={0,2}|\*{1,2}|\/|\\\\|&{1,3}|\.\.?|\^(?:\^\^)?|\+\+?|<(?:-|<<|=|>|\|>|~>?)?|=~|={1,3}|>(?:=|>>)?|\|~>|\|>|\|{1,3}|~>>?|~~~|::/,
95
+ // See https://hexdocs.pm/elixir/syntax-reference.html#variables
96
+ variableName: /[a-z_][a-zA-Z0-9_]*[?!]?/,
97
+ // See https://hexdocs.pm/elixir/syntax-reference.html#atoms
98
+ atomName: /[a-zA-Z_][a-zA-Z0-9_@]*[?!]?|@specialAtomName|@operator/,
99
+ specialAtomName: /\.\.\.|<<>>|%\{\}|%|\{\}/,
100
+ aliasPart: /[A-Z][a-zA-Z0-9_]*/,
101
+ moduleName: /@aliasPart(?:\.@aliasPart)*/,
102
+ // Sigil pairs are: """ """, ''' ''', " ", ' ', / /, | |, < >, { }, [ ], ( )
103
+ sigilSymmetricDelimiter: /"""|'''|"|'|\/|\|/,
104
+ sigilStartDelimiter: /@sigilSymmetricDelimiter|<|\{|\[|\(/,
105
+ sigilEndDelimiter: /@sigilSymmetricDelimiter|>|\}|\]|\)/,
106
+ sigilModifiers: /[a-zA-Z0-9]*/,
107
+ decimal: /\d(?:_?\d)*/,
108
+ hex: /[0-9a-fA-F](_?[0-9a-fA-F])*/,
109
+ octal: /[0-7](_?[0-7])*/,
110
+ binary: /[01](_?[01])*/,
111
+ // See https://hexdocs.pm/elixir/master/String.html#module-escape-characters
112
+ escape: /\\u[0-9a-fA-F]{4}|\\x[0-9a-fA-F]{2}|\\./,
113
+ // The keys below correspond to tokenizer states.
114
+ // We start from the root state and match against its rules
115
+ // until we explicitly transition into another state.
116
+ // The `include` simply brings in all operations from the given state
117
+ // and is useful for improving readability.
118
+ tokenizer: {
119
+ root: [
120
+ { include: "@whitespace" },
121
+ { include: "@comments" },
122
+ // Keywords start as either an identifier or a string,
123
+ // but end with a : so it's important to match this first.
124
+ { include: "@keywordsShorthand" },
125
+ { include: "@numbers" },
126
+ { include: "@identifiers" },
127
+ { include: "@strings" },
128
+ { include: "@atoms" },
129
+ { include: "@sigils" },
130
+ { include: "@attributes" },
131
+ { include: "@symbols" }
132
+ ],
133
+ // Whitespace
134
+ whitespace: [[/\s+/, "white"]],
135
+ // Comments
136
+ comments: [[/(#)(.*)/, ["comment.punctuation", "comment"]]],
137
+ // Keyword list shorthand
138
+ keywordsShorthand: [
139
+ [/(@atomName)(:)(\s+)/, ["constant", "constant.punctuation", "white"]],
140
+ // Use positive look-ahead to ensure the string is followed by :
141
+ // and should be considered a keyword.
142
+ [
143
+ /"(?=([^"]|#\{.*?\}|\\")*":)/,
144
+ { token: "constant.delimiter", next: "@doubleQuotedStringKeyword" }
145
+ ],
146
+ [
147
+ /'(?=([^']|#\{.*?\}|\\')*':)/,
148
+ { token: "constant.delimiter", next: "@singleQuotedStringKeyword" }
149
+ ]
150
+ ],
151
+ doubleQuotedStringKeyword: [
152
+ [/":/, { token: "constant.delimiter", next: "@pop" }],
153
+ { include: "@stringConstantContentInterpol" }
154
+ ],
155
+ singleQuotedStringKeyword: [
156
+ [/':/, { token: "constant.delimiter", next: "@pop" }],
157
+ { include: "@stringConstantContentInterpol" }
158
+ ],
159
+ // Numbers
160
+ numbers: [
161
+ [/0b@binary/, "number.binary"],
162
+ [/0o@octal/, "number.octal"],
163
+ [/0x@hex/, "number.hex"],
164
+ [/@decimal\.@decimal([eE]-?@decimal)?/, "number.float"],
165
+ [/@decimal/, "number"]
166
+ ],
167
+ // Identifiers
168
+ identifiers: [
169
+ // Tokenize identifier name in function-like definitions.
170
+ // Note: given `def a + b, do: nil`, `a` is not a function name,
171
+ // so we use negative look-ahead to ensure there's no operator.
172
+ [
173
+ /\b(defp?|defnp?|defmacrop?|defguardp?|defdelegate)(\s+)(@variableName)(?!\s+@operator)/,
174
+ [
175
+ "keyword.declaration",
176
+ "white",
177
+ {
178
+ cases: {
179
+ unquote: "keyword",
180
+ "@default": "function"
181
+ }
182
+ }
183
+ ]
184
+ ],
185
+ // Tokenize function calls
186
+ [
187
+ // In-scope call - an identifier followed by ( or .(
188
+ /(@variableName)(?=\s*\.?\s*\()/,
189
+ {
190
+ cases: {
191
+ // Tokenize as keyword in cases like `if(..., do: ..., else: ...)`
192
+ "@declarationKeywords": "keyword.declaration",
193
+ "@namespaceKeywords": "keyword",
194
+ "@otherKeywords": "keyword",
195
+ "@default": "function.call"
196
+ }
197
+ }
198
+ ],
199
+ [
200
+ // Referencing function in a module
201
+ /(@moduleName)(\s*)(\.)(\s*)(@variableName)/,
202
+ ["type.identifier", "white", "operator", "white", "function.call"]
203
+ ],
204
+ [
205
+ // Referencing function in an Erlang module
206
+ /(:)(@atomName)(\s*)(\.)(\s*)(@variableName)/,
207
+ ["constant.punctuation", "constant", "white", "operator", "white", "function.call"]
208
+ ],
209
+ [
210
+ // Piping into a function (tokenized separately as it may not have parentheses)
211
+ /(\|>)(\s*)(@variableName)/,
212
+ [
213
+ "operator",
214
+ "white",
215
+ {
216
+ cases: {
217
+ "@otherKeywords": "keyword",
218
+ "@default": "function.call"
219
+ }
220
+ }
221
+ ]
222
+ ],
223
+ [
224
+ // Function reference passed to another function
225
+ /(&)(\s*)(@variableName)/,
226
+ ["operator", "white", "function.call"]
227
+ ],
228
+ // Language keywords, builtins, constants and variables
229
+ [
230
+ /@variableName/,
231
+ {
232
+ cases: {
233
+ "@declarationKeywords": "keyword.declaration",
234
+ "@operatorKeywords": "keyword.operator",
235
+ "@namespaceKeywords": "keyword",
236
+ "@otherKeywords": "keyword",
237
+ "@constants": "constant.language",
238
+ "@nameBuiltin": "variable.language",
239
+ "_.*": "comment.unused",
240
+ "@default": "identifier"
241
+ }
242
+ }
243
+ ],
244
+ // Module names
245
+ [/@moduleName/, "type.identifier"]
246
+ ],
247
+ // Strings
248
+ strings: [
249
+ [/"""/, { token: "string.delimiter", next: "@doubleQuotedHeredoc" }],
250
+ [/'''/, { token: "string.delimiter", next: "@singleQuotedHeredoc" }],
251
+ [/"/, { token: "string.delimiter", next: "@doubleQuotedString" }],
252
+ [/'/, { token: "string.delimiter", next: "@singleQuotedString" }]
253
+ ],
254
+ doubleQuotedHeredoc: [
255
+ [/"""/, { token: "string.delimiter", next: "@pop" }],
256
+ { include: "@stringContentInterpol" }
257
+ ],
258
+ singleQuotedHeredoc: [
259
+ [/'''/, { token: "string.delimiter", next: "@pop" }],
260
+ { include: "@stringContentInterpol" }
261
+ ],
262
+ doubleQuotedString: [
263
+ [/"/, { token: "string.delimiter", next: "@pop" }],
264
+ { include: "@stringContentInterpol" }
265
+ ],
266
+ singleQuotedString: [
267
+ [/'/, { token: "string.delimiter", next: "@pop" }],
268
+ { include: "@stringContentInterpol" }
269
+ ],
270
+ // Atoms
271
+ atoms: [
272
+ [/(:)(@atomName)/, ["constant.punctuation", "constant"]],
273
+ [/:"/, { token: "constant.delimiter", next: "@doubleQuotedStringAtom" }],
274
+ [/:'/, { token: "constant.delimiter", next: "@singleQuotedStringAtom" }]
275
+ ],
276
+ doubleQuotedStringAtom: [
277
+ [/"/, { token: "constant.delimiter", next: "@pop" }],
278
+ { include: "@stringConstantContentInterpol" }
279
+ ],
280
+ singleQuotedStringAtom: [
281
+ [/'/, { token: "constant.delimiter", next: "@pop" }],
282
+ { include: "@stringConstantContentInterpol" }
283
+ ],
284
+ // Sigils
285
+ // See https://elixir-lang.org/getting-started/sigils.html
286
+ // Sigils allow for typing values using their textual representation.
287
+ // All sigils start with ~ followed by a letter or
288
+ // multi-letter uppercase starting at Elixir v1.15.0, indicating sigil type
289
+ // and then a delimiter pair enclosing the textual representation.
290
+ // Optional modifiers are allowed after the closing delimiter.
291
+ // For instance a regular expressions can be written as:
292
+ // ~r/foo|bar/ ~r{foo|bar} ~r/foo|bar/g
293
+ //
294
+ // In general lowercase sigils allow for interpolation
295
+ // and escaped characters, whereas uppercase sigils don't
296
+ //
297
+ // During tokenization we want to distinguish some
298
+ // specific sigil types, namely string and regexp,
299
+ // so that they cen be themed separately.
300
+ //
301
+ // To reasonably handle all those combinations we leverage
302
+ // dot-separated states, so if we transition to @sigilStart.interpol.s.{.}
303
+ // then "sigilStart.interpol.s" state will match and also all
304
+ // the individual dot-separated parameters can be accessed.
305
+ sigils: [
306
+ [/~[a-z]@sigilStartDelimiter/, { token: "@rematch", next: "@sigil.interpol" }],
307
+ [/~([A-Z]+)@sigilStartDelimiter/, { token: "@rematch", next: "@sigil.noInterpol" }]
308
+ ],
309
+ sigil: [
310
+ [/~([a-z]|[A-Z]+)\{/, { token: "@rematch", switchTo: "@sigilStart.$S2.$1.{.}" }],
311
+ [/~([a-z]|[A-Z]+)\[/, { token: "@rematch", switchTo: "@sigilStart.$S2.$1.[.]" }],
312
+ [/~([a-z]|[A-Z]+)\(/, { token: "@rematch", switchTo: "@sigilStart.$S2.$1.(.)" }],
313
+ [/~([a-z]|[A-Z]+)\</, { token: "@rematch", switchTo: "@sigilStart.$S2.$1.<.>" }],
314
+ [
315
+ /~([a-z]|[A-Z]+)(@sigilSymmetricDelimiter)/,
316
+ { token: "@rematch", switchTo: "@sigilStart.$S2.$1.$2.$2" }
317
+ ]
318
+ ],
319
+ // The definitions below expect states to be of the form:
320
+ //
321
+ // sigilStart.<interpol-or-noInterpol>.<sigil-letter>.<start-delimiter>.<end-delimiter>
322
+ // sigilContinue.<interpol-or-noInterpol>.<sigil-letter>.<start-delimiter>.<end-delimiter>
323
+ //
324
+ // The sigilStart state is used only to properly classify the token (as string/regex/sigil)
325
+ // and immediately switches to the sigilContinue sate, which handles the actual content
326
+ // and waits for the corresponding end delimiter.
327
+ "sigilStart.interpol.s": [
328
+ [
329
+ /~s@sigilStartDelimiter/,
330
+ {
331
+ token: "string.delimiter",
332
+ switchTo: "@sigilContinue.$S2.$S3.$S4.$S5"
333
+ }
334
+ ]
335
+ ],
336
+ "sigilContinue.interpol.s": [
337
+ [
338
+ /(@sigilEndDelimiter)@sigilModifiers/,
339
+ {
340
+ cases: {
341
+ "$1==$S5": { token: "string.delimiter", next: "@pop" },
342
+ "@default": "string"
343
+ }
344
+ }
345
+ ],
346
+ { include: "@stringContentInterpol" }
347
+ ],
348
+ "sigilStart.noInterpol.S": [
349
+ [
350
+ /~S@sigilStartDelimiter/,
351
+ {
352
+ token: "string.delimiter",
353
+ switchTo: "@sigilContinue.$S2.$S3.$S4.$S5"
354
+ }
355
+ ]
356
+ ],
357
+ "sigilContinue.noInterpol.S": [
358
+ // Ignore escaped sigil end
359
+ [/(^|[^\\])\\@sigilEndDelimiter/, "string"],
360
+ [
361
+ /(@sigilEndDelimiter)@sigilModifiers/,
362
+ {
363
+ cases: {
364
+ "$1==$S5": { token: "string.delimiter", next: "@pop" },
365
+ "@default": "string"
366
+ }
367
+ }
368
+ ],
369
+ { include: "@stringContent" }
370
+ ],
371
+ "sigilStart.interpol.r": [
372
+ [
373
+ /~r@sigilStartDelimiter/,
374
+ {
375
+ token: "regexp.delimiter",
376
+ switchTo: "@sigilContinue.$S2.$S3.$S4.$S5"
377
+ }
378
+ ]
379
+ ],
380
+ "sigilContinue.interpol.r": [
381
+ [
382
+ /(@sigilEndDelimiter)@sigilModifiers/,
383
+ {
384
+ cases: {
385
+ "$1==$S5": { token: "regexp.delimiter", next: "@pop" },
386
+ "@default": "regexp"
387
+ }
388
+ }
389
+ ],
390
+ { include: "@regexpContentInterpol" }
391
+ ],
392
+ "sigilStart.noInterpol.R": [
393
+ [
394
+ /~R@sigilStartDelimiter/,
395
+ {
396
+ token: "regexp.delimiter",
397
+ switchTo: "@sigilContinue.$S2.$S3.$S4.$S5"
398
+ }
399
+ ]
400
+ ],
401
+ "sigilContinue.noInterpol.R": [
402
+ // Ignore escaped sigil end
403
+ [/(^|[^\\])\\@sigilEndDelimiter/, "regexp"],
404
+ [
405
+ /(@sigilEndDelimiter)@sigilModifiers/,
406
+ {
407
+ cases: {
408
+ "$1==$S5": { token: "regexp.delimiter", next: "@pop" },
409
+ "@default": "regexp"
410
+ }
411
+ }
412
+ ],
413
+ { include: "@regexpContent" }
414
+ ],
415
+ // Fallback to the generic sigil by default
416
+ "sigilStart.interpol": [
417
+ [
418
+ /~([a-z]|[A-Z]+)@sigilStartDelimiter/,
419
+ {
420
+ token: "sigil.delimiter",
421
+ switchTo: "@sigilContinue.$S2.$S3.$S4.$S5"
422
+ }
423
+ ]
424
+ ],
425
+ "sigilContinue.interpol": [
426
+ [
427
+ /(@sigilEndDelimiter)@sigilModifiers/,
428
+ {
429
+ cases: {
430
+ "$1==$S5": { token: "sigil.delimiter", next: "@pop" },
431
+ "@default": "sigil"
432
+ }
433
+ }
434
+ ],
435
+ { include: "@sigilContentInterpol" }
436
+ ],
437
+ "sigilStart.noInterpol": [
438
+ [
439
+ /~([a-z]|[A-Z]+)@sigilStartDelimiter/,
440
+ {
441
+ token: "sigil.delimiter",
442
+ switchTo: "@sigilContinue.$S2.$S3.$S4.$S5"
443
+ }
444
+ ]
445
+ ],
446
+ "sigilContinue.noInterpol": [
447
+ // Ignore escaped sigil end
448
+ [/(^|[^\\])\\@sigilEndDelimiter/, "sigil"],
449
+ [
450
+ /(@sigilEndDelimiter)@sigilModifiers/,
451
+ {
452
+ cases: {
453
+ "$1==$S5": { token: "sigil.delimiter", next: "@pop" },
454
+ "@default": "sigil"
455
+ }
456
+ }
457
+ ],
458
+ { include: "@sigilContent" }
459
+ ],
460
+ // Attributes
461
+ attributes: [
462
+ // Module @doc* attributes - tokenized as comments
463
+ [
464
+ /\@(module|type)?doc (~[sS])?"""/,
465
+ {
466
+ token: "comment.block.documentation",
467
+ next: "@doubleQuotedHeredocDocstring"
468
+ }
469
+ ],
470
+ [
471
+ /\@(module|type)?doc (~[sS])?'''/,
472
+ {
473
+ token: "comment.block.documentation",
474
+ next: "@singleQuotedHeredocDocstring"
475
+ }
476
+ ],
477
+ [
478
+ /\@(module|type)?doc (~[sS])?"/,
479
+ {
480
+ token: "comment.block.documentation",
481
+ next: "@doubleQuotedStringDocstring"
482
+ }
483
+ ],
484
+ [
485
+ /\@(module|type)?doc (~[sS])?'/,
486
+ {
487
+ token: "comment.block.documentation",
488
+ next: "@singleQuotedStringDocstring"
489
+ }
490
+ ],
491
+ [/\@(module|type)?doc false/, "comment.block.documentation"],
492
+ // Module attributes
493
+ [/\@(@variableName)/, "variable"]
494
+ ],
495
+ doubleQuotedHeredocDocstring: [
496
+ [/"""/, { token: "comment.block.documentation", next: "@pop" }],
497
+ { include: "@docstringContent" }
498
+ ],
499
+ singleQuotedHeredocDocstring: [
500
+ [/'''/, { token: "comment.block.documentation", next: "@pop" }],
501
+ { include: "@docstringContent" }
502
+ ],
503
+ doubleQuotedStringDocstring: [
504
+ [/"/, { token: "comment.block.documentation", next: "@pop" }],
505
+ { include: "@docstringContent" }
506
+ ],
507
+ singleQuotedStringDocstring: [
508
+ [/'/, { token: "comment.block.documentation", next: "@pop" }],
509
+ { include: "@docstringContent" }
510
+ ],
511
+ // Operators, punctuation, brackets
512
+ symbols: [
513
+ // Code point operator (either with regular character ?a or an escaped one ?\n)
514
+ [/\?(\\.|[^\\\s])/, "number.constant"],
515
+ // Anonymous function arguments
516
+ [/&\d+/, "operator"],
517
+ // Bitshift operators (must go before delimiters, so that << >> don't match first)
518
+ [/<<<|>>>/, "operator"],
519
+ // Delimiter pairs
520
+ [/[()\[\]\{\}]|<<|>>/, "@brackets"],
521
+ // Triple dot is a valid name (must go before operators, so that .. doesn't match instead)
522
+ [/\.\.\./, "identifier"],
523
+ // Punctuation => (must go before operators, so it's not tokenized as = then >)
524
+ [/=>/, "punctuation"],
525
+ // Operators
526
+ [/@operator/, "operator"],
527
+ // Punctuation
528
+ [/[:;,.%]/, "punctuation"]
529
+ ],
530
+ // Generic helpers
531
+ stringContentInterpol: [
532
+ { include: "@interpolation" },
533
+ { include: "@escapeChar" },
534
+ { include: "@stringContent" }
535
+ ],
536
+ stringContent: [[/./, "string"]],
537
+ stringConstantContentInterpol: [
538
+ { include: "@interpolation" },
539
+ { include: "@escapeChar" },
540
+ { include: "@stringConstantContent" }
541
+ ],
542
+ stringConstantContent: [[/./, "constant"]],
543
+ regexpContentInterpol: [
544
+ { include: "@interpolation" },
545
+ { include: "@escapeChar" },
546
+ { include: "@regexpContent" }
547
+ ],
548
+ regexpContent: [
549
+ // # may be a regular regexp char, so we use a heuristic
550
+ // assuming a # surrounded by whitespace is actually a comment.
551
+ [/(\s)(#)(\s.*)$/, ["white", "comment.punctuation", "comment"]],
552
+ [/./, "regexp"]
553
+ ],
554
+ sigilContentInterpol: [
555
+ { include: "@interpolation" },
556
+ { include: "@escapeChar" },
557
+ { include: "@sigilContent" }
558
+ ],
559
+ sigilContent: [[/./, "sigil"]],
560
+ docstringContent: [[/./, "comment.block.documentation"]],
561
+ escapeChar: [[/@escape/, "constant.character.escape"]],
562
+ interpolation: [[/#{/, { token: "delimiter.bracket.embed", next: "@interpolationContinue" }]],
563
+ interpolationContinue: [
564
+ [/}/, { token: "delimiter.bracket.embed", next: "@pop" }],
565
+ // Interpolation brackets may contain arbitrary code,
566
+ // so we simply match against all the root rules,
567
+ // until we reach interpolation end (the above matches).
568
+ { include: "@root" }
569
+ ]
570
+ }
571
+ };
572
+ export {
573
+ e as conf,
574
+ t as language
575
+ };
@@ -0,0 +1,51 @@
1
+ import { ProblemItem } from "@/components/problem-list/problem-item";
2
+ import { Problem } from "@/model/problem";
3
+ export declare const EditorUpdated: string;
4
+ export declare const EditorClicked: string;
5
+ export declare const ProblemClicked: string;
6
+ export declare const OpenProblemDrawer: string;
7
+ export declare const MainViewSlideChanged: string;
8
+ export declare const ProblemLabelViewFilterChanged: string;
9
+ export declare const ProblemSortFilterChanged: string;
10
+ export declare const ProblemRuleFilterChanged: string;
11
+ export declare const ProblemRuleFilterChangedManual: string;
12
+ export declare const ProblemSearchFilterChanged: string;
13
+ export declare const RuleClicked: string;
14
+ export declare const MessageEvent: string;
15
+ export interface ProblemLabelViewFilterChangedEvent {
16
+ label: string;
17
+ }
18
+ export interface ProblemSearchFilterChangedEvent {
19
+ search: string;
20
+ }
21
+ export interface ProblemSortFilterChangedEvent {
22
+ sort: string;
23
+ }
24
+ export interface ProblemRuleFilterChangedEvent {
25
+ rule: string;
26
+ }
27
+ export interface MainViewSlideChangedEvent {
28
+ index: number;
29
+ problem: ProblemItem;
30
+ }
31
+ export interface EditorUpdatedEvent {
32
+ content: string;
33
+ }
34
+ export interface EditorClickedEvent {
35
+ line: number | undefined;
36
+ column: number | undefined;
37
+ }
38
+ export interface ProblemClickedEvent {
39
+ problem: ProblemItem;
40
+ launchedFromProblems: boolean;
41
+ }
42
+ export declare enum ActiveView {
43
+ Problems = "problems",
44
+ Overview = "overview"
45
+ }
46
+ export interface HistoryState {
47
+ problem: Problem;
48
+ rule: string;
49
+ page: number;
50
+ view: ActiveView;
51
+ }
@@ -0,0 +1,17 @@
1
+ export const EditorUpdated = "editorUpdated";
2
+ export const EditorClicked = "editorClicked";
3
+ export const ProblemClicked = "problemClicked";
4
+ export const OpenProblemDrawer = "openProblemDrawer";
5
+ export const MainViewSlideChanged = "mainViewSlideChanged";
6
+ export const ProblemLabelViewFilterChanged = "problemLabelViewFilterChanged";
7
+ export const ProblemSortFilterChanged = "problemSortFilterChanged";
8
+ export const ProblemRuleFilterChanged = "problemRuleFilterChanged";
9
+ export const ProblemRuleFilterChangedManual = "problemRuleFilterChangedManual";
10
+ export const ProblemSearchFilterChanged = "problemSearchFilterChanged";
11
+ export const RuleClicked = "ruleViolationClicked";
12
+ export const MessageEvent = "message";
13
+ export var ActiveView;
14
+ (function (ActiveView) {
15
+ ActiveView["Problems"] = "problems";
16
+ ActiveView["Overview"] = "overview";
17
+ })(ActiveView || (ActiveView = {}));