@pb33f/cowboy-components 0.0.14 → 0.1.1

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 (218) 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/mailing-list/mailing-list.js +1 -1
  22. package/dist/components/paginator/paginator-events.d.ts +4 -0
  23. package/dist/components/paginator/paginator-events.js +4 -0
  24. package/dist/components/paginator/paginator-navigator.css.d.ts +2 -0
  25. package/dist/components/paginator/paginator-navigator.css.js +35 -0
  26. package/dist/components/paginator/paginator-navigator.d.ts +27 -0
  27. package/dist/components/paginator/paginator-navigator.js +168 -0
  28. package/dist/components/paginator/paginator.css.d.ts +2 -0
  29. package/dist/components/paginator/paginator.css.js +38 -0
  30. package/dist/components/paginator/paginator.d.ts +22 -0
  31. package/dist/components/paginator/paginator.js +122 -0
  32. package/dist/components/percent-bar/percent-bar.css.d.ts +2 -0
  33. package/dist/components/percent-bar/percent-bar.css.js +65 -0
  34. package/dist/components/percent-bar/percent-bar.d.ts +11 -0
  35. package/dist/components/percent-bar/percent-bar.js +85 -0
  36. package/dist/components/problem-list/details-drawer.css.d.ts +2 -0
  37. package/dist/components/problem-list/details-drawer.css.js +42 -0
  38. package/dist/components/problem-list/details-drawer.d.ts +22 -0
  39. package/dist/components/problem-list/details-drawer.js +66 -0
  40. package/dist/components/problem-list/filter.css.d.ts +2 -0
  41. package/dist/components/problem-list/filter.css.js +67 -0
  42. package/dist/components/problem-list/problem-item.css.d.ts +2 -0
  43. package/dist/components/problem-list/problem-item.css.js +170 -0
  44. package/dist/components/problem-list/problem-item.d.ts +27 -0
  45. package/dist/components/problem-list/problem-item.js +126 -0
  46. package/dist/components/problem-list/problem-label-view-filter.css.d.ts +2 -0
  47. package/dist/components/problem-list/problem-label-view-filter.css.js +6 -0
  48. package/dist/components/problem-list/problem-label-view-filter.d.ts +18 -0
  49. package/dist/components/problem-list/problem-label-view-filter.js +66 -0
  50. package/dist/components/problem-list/problem-list.css.d.ts +2 -0
  51. package/dist/components/problem-list/problem-list.css.js +59 -0
  52. package/dist/components/problem-list/problem-list.d.ts +37 -0
  53. package/dist/components/problem-list/problem-list.js +334 -0
  54. package/dist/components/problem-list/problem-mainview.css.d.ts +2 -0
  55. package/dist/components/problem-list/problem-mainview.css.js +100 -0
  56. package/dist/components/problem-list/problem-mainview.d.ts +20 -0
  57. package/dist/components/problem-list/problem-mainview.js +126 -0
  58. package/dist/components/problem-list/problem-rule-filter.d.ts +13 -0
  59. package/dist/components/problem-list/problem-rule-filter.js +67 -0
  60. package/dist/components/problem-list/problem-search-filter.d.ts +13 -0
  61. package/dist/components/problem-list/problem-search-filter.js +45 -0
  62. package/dist/components/problem-list/problem-sort-filter.d.ts +19 -0
  63. package/dist/components/problem-list/problem-sort-filter.js +67 -0
  64. package/dist/components/problem-list/problem-toolbar.css.d.ts +2 -0
  65. package/dist/components/problem-list/problem-toolbar.css.js +41 -0
  66. package/dist/components/problem-list/problem-toolbar.d.ts +14 -0
  67. package/dist/components/problem-list/problem-toolbar.js +63 -0
  68. package/dist/components/problem-list/shared.css.d.ts +2 -0
  69. package/dist/components/problem-list/shared.css.js +91 -0
  70. package/dist/components/problems-overview/diagnostic-evaluation.css.d.ts +2 -0
  71. package/dist/components/problems-overview/diagnostic-evaluation.css.js +178 -0
  72. package/dist/components/problems-overview/diagnostic-evaluation.d.ts +13 -0
  73. package/dist/components/problems-overview/diagnostic-evaluation.js +118 -0
  74. package/dist/components/problems-overview/document-statistic.css.d.ts +2 -0
  75. package/dist/components/problems-overview/document-statistic.css.js +16 -0
  76. package/dist/components/problems-overview/document-statistic.d.ts +10 -0
  77. package/dist/components/problems-overview/document-statistic.js +49 -0
  78. package/dist/components/problems-overview/problem-overview-group.css.d.ts +2 -0
  79. package/dist/components/problems-overview/problem-overview-group.css.js +84 -0
  80. package/dist/components/problems-overview/problem-overview-group.d.ts +17 -0
  81. package/dist/components/problems-overview/problem-overview-group.js +121 -0
  82. package/dist/components/problems-overview/problem-statistic.css.d.ts +2 -0
  83. package/dist/components/problems-overview/problem-statistic.css.js +40 -0
  84. package/dist/components/problems-overview/problem-statistic.d.ts +11 -0
  85. package/dist/components/problems-overview/problem-statistic.js +57 -0
  86. package/dist/components/problems-overview/problem-statistics.css.d.ts +2 -0
  87. package/dist/components/problems-overview/problem-statistics.css.js +46 -0
  88. package/dist/components/problems-overview/problem-statistics.d.ts +14 -0
  89. package/dist/components/problems-overview/problem-statistics.js +132 -0
  90. package/dist/components/problems-overview/problems-overview.css.d.ts +2 -0
  91. package/dist/components/problems-overview/problems-overview.css.js +49 -0
  92. package/dist/components/problems-overview/problems-overview.d.ts +21 -0
  93. package/dist/components/problems-overview/problems-overview.js +108 -0
  94. package/dist/components/render-json-path/render-json-path.css.d.ts +2 -0
  95. package/dist/components/render-json-path/render-json-path.css.js +86 -0
  96. package/dist/components/render-json-path/render-json-path.d.ts +11 -0
  97. package/dist/components/render-json-path/render-json-path.js +105 -0
  98. package/dist/components/the-doctor/settings.d.ts +5 -0
  99. package/dist/components/the-doctor/settings.js +22 -0
  100. package/dist/components/the-doctor/status-bar.css.d.ts +2 -0
  101. package/dist/components/the-doctor/status-bar.css.js +47 -0
  102. package/dist/components/the-doctor/status-bar.d.ts +12 -0
  103. package/dist/components/the-doctor/status-bar.js +71 -0
  104. package/dist/components/the-doctor/the-doctor.css.d.ts +2 -0
  105. package/dist/components/the-doctor/the-doctor.css.js +156 -0
  106. package/dist/components/the-doctor/the-doctor.d.ts +57 -0
  107. package/dist/components/the-doctor/the-doctor.js +340 -0
  108. package/dist/cowboy-components-BOuaCruy.js +114388 -0
  109. package/dist/cowboy-components.d.ts +5 -2
  110. package/dist/cowboy-components.js +8 -2
  111. package/dist/cowboy-components.umd.cjs +3997 -103
  112. package/dist/cpp-Bq-GnYlH.js +407 -0
  113. package/dist/csharp-IDcibKAT.js +332 -0
  114. package/dist/csp-QdYr8JWa.js +59 -0
  115. package/dist/css/button.css.d.ts +2 -0
  116. package/dist/css/button.css.js +34 -0
  117. package/dist/css/chroma-synxtax.css.d.ts +2 -0
  118. package/dist/css/chroma-synxtax.css.js +130 -0
  119. package/dist/css/cowboy-components.css +3 -0
  120. package/dist/css/links.css.d.ts +2 -0
  121. package/dist/css/links.css.js +17 -0
  122. package/dist/css/lists.css.d.ts +2 -0
  123. package/dist/css/lists.css.js +43 -0
  124. package/dist/css/pb33f-theme.css +2 -2
  125. package/dist/css/syntax.css.js +1 -1
  126. package/dist/css-C-wMMefI.js +193 -0
  127. package/dist/cssMode-Cvbhe77l.js +1541 -0
  128. package/dist/cypher-BfBo9yir.js +269 -0
  129. package/dist/dart-Cv3rVfv_.js +287 -0
  130. package/dist/dockerfile-DyCXBGhV.js +136 -0
  131. package/dist/ecl-COP_iObm.js +462 -0
  132. package/dist/elixir-DoEhbk9F.js +575 -0
  133. package/dist/events/doctor.d.ts +51 -0
  134. package/dist/events/doctor.js +17 -0
  135. package/dist/flow9-DuHGSNW1.js +148 -0
  136. package/dist/freemarker2-DmhDQrVn.js +995 -0
  137. package/dist/fsharp-Dv9PDxVO.js +223 -0
  138. package/dist/go-CcdAeqiK.js +224 -0
  139. package/dist/graphql-CoRm4b1H.js +157 -0
  140. package/dist/handlebars-DWUSy2Nn.js +425 -0
  141. package/dist/hcl-BSgAhV5f.js +189 -0
  142. package/dist/html-BTxdvu8o.js +314 -0
  143. package/dist/htmlMode-DeG-6tqP.js +1551 -0
  144. package/dist/ini-ewx9HLIq.js +77 -0
  145. package/dist/java-B5lwcbTy.js +238 -0
  146. package/dist/javascript-CQTBmqTv.js +76 -0
  147. package/dist/jsonMode-DJhhXlcK.js +1958 -0
  148. package/dist/julia-NCcg_P_q.js +517 -0
  149. package/dist/kotlin-BYlnmGrb.js +259 -0
  150. package/dist/less-DG4tqgOo.js +168 -0
  151. package/dist/lexon-CTTPcJLv.js +163 -0
  152. package/dist/liquid-OuSl50Zm.js +246 -0
  153. package/dist/lua-CxQ1RWuo.js +168 -0
  154. package/dist/m3-mHFfpmgx.js +216 -0
  155. package/dist/markdown-Dh6sYULt.js +235 -0
  156. package/dist/mdx-Cs8POpae.js +171 -0
  157. package/dist/mips-CNUcjHD1.js +204 -0
  158. package/dist/model/document-statistics.d.ts +40 -0
  159. package/dist/model/document-statistics.js +4 -0
  160. package/dist/model/how_to_fix.d.ts +4 -0
  161. package/dist/model/how_to_fix.js +1 -0
  162. package/dist/model/problem.d.ts +19 -0
  163. package/dist/model/problem.js +106 -0
  164. package/dist/model/rule_documentation.d.ts +5 -0
  165. package/dist/model/rule_documentation.js +1 -0
  166. package/dist/model/session.d.ts +5 -0
  167. package/dist/model/session.js +1 -0
  168. package/dist/msdax-ZvxFeKvs.js +381 -0
  169. package/dist/mysql-COjg31sJ.js +884 -0
  170. package/dist/objective-c-BqrCFBhT.js +189 -0
  171. package/dist/pascal-CUpkilAS.js +257 -0
  172. package/dist/pascaligo-nJfvRJ7x.js +170 -0
  173. package/dist/perl-CWsX6Ysg.js +632 -0
  174. package/dist/pgsql-DwgpEXC8.js +857 -0
  175. package/dist/php-CrbKyd62.js +506 -0
  176. package/dist/pla-JxXT6Kb-.js +143 -0
  177. package/dist/postiats-BOdnTRGv.js +913 -0
  178. package/dist/powerquery-DTkwcXGH.js +896 -0
  179. package/dist/powershell-Cx53dGpt.js +245 -0
  180. package/dist/protobuf-Dp9vE-l-.js +426 -0
  181. package/dist/pug-BSjKVjwP.js +408 -0
  182. package/dist/python-BsXAz21q.js +282 -0
  183. package/dist/qsharp-C5P1RxY3.js +291 -0
  184. package/dist/r-sEMYnclc.js +249 -0
  185. package/dist/razor-CXJ9MZn4.js +556 -0
  186. package/dist/redis-DbzUc-fU.js +308 -0
  187. package/dist/redshift-nrLijj1O.js +815 -0
  188. package/dist/restructuredtext-CIbGUl6T.js +180 -0
  189. package/dist/ruby-JcYJisWg.js +517 -0
  190. package/dist/rust-BgbFBFXH.js +349 -0
  191. package/dist/sb-hRFFChi7.js +121 -0
  192. package/dist/scala-Cs0yVo3Q.js +376 -0
  193. package/dist/scheme-l_0jNtxy.js +114 -0
  194. package/dist/scss-C4l7ZIRR.js +268 -0
  195. package/dist/services/linting-service.d.ts +12 -0
  196. package/dist/services/linting-service.js +121 -0
  197. package/dist/shell-ikLk_l24.js +227 -0
  198. package/dist/solidity-4GxCaH9e.js +1373 -0
  199. package/dist/sophia-tX0WEZsZ.js +205 -0
  200. package/dist/sparql-D7ky-uMk.js +207 -0
  201. package/dist/sql-CqEfBVGS.js +859 -0
  202. package/dist/st-CNWQPqyI.js +422 -0
  203. package/dist/style.css +1 -1
  204. package/dist/swift-C_fDfC0d.js +318 -0
  205. package/dist/systemverilog-gAvsEtN_.js +582 -0
  206. package/dist/tcl-KbBChuA6.js +238 -0
  207. package/dist/tsMode-C-mwN8lz.js +886 -0
  208. package/dist/twig-Bb652BpM.js +398 -0
  209. package/dist/typescript-CamPbG-s.js +349 -0
  210. package/dist/vb-2e5hSeUh.js +378 -0
  211. package/dist/wgsl-CYSDq0zg.js +445 -0
  212. package/dist/workers/rule-documentation.worker.d.ts +1 -0
  213. package/dist/workers/rule-documentation.worker.js +85 -0
  214. package/dist/workers/search-problems.worker.d.ts +1 -0
  215. package/dist/workers/search-problems.worker.js +19 -0
  216. package/dist/xml-CrDvxVsf.js +101 -0
  217. package/dist/yaml-xGWjZwPI.js +212 -0
  218. package/package.json +6 -4
@@ -0,0 +1,238 @@
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
+ wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\$\-\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
9
+ comments: {
10
+ blockComment: ["###", "###"],
11
+ lineComment: "#"
12
+ },
13
+ brackets: [
14
+ ["{", "}"],
15
+ ["[", "]"],
16
+ ["(", ")"]
17
+ ],
18
+ autoClosingPairs: [
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
+ { open: "(", close: ")" },
29
+ { open: '"', close: '"' },
30
+ { open: "'", close: "'" }
31
+ ],
32
+ folding: {
33
+ markers: {
34
+ start: new RegExp("^\\s*#region\\b"),
35
+ end: new RegExp("^\\s*#endregion\\b")
36
+ }
37
+ }
38
+ }, r = {
39
+ defaultToken: "",
40
+ ignoreCase: !0,
41
+ tokenPostfix: ".coffee",
42
+ brackets: [
43
+ { open: "{", close: "}", token: "delimiter.curly" },
44
+ { open: "[", close: "]", token: "delimiter.square" },
45
+ { open: "(", close: ")", token: "delimiter.parenthesis" }
46
+ ],
47
+ regEx: /\/(?!\/\/)(?:[^\/\\]|\\.)*\/[igm]*/,
48
+ keywords: [
49
+ "and",
50
+ "or",
51
+ "is",
52
+ "isnt",
53
+ "not",
54
+ "on",
55
+ "yes",
56
+ "@",
57
+ "no",
58
+ "off",
59
+ "true",
60
+ "false",
61
+ "null",
62
+ "this",
63
+ "new",
64
+ "delete",
65
+ "typeof",
66
+ "in",
67
+ "instanceof",
68
+ "return",
69
+ "throw",
70
+ "break",
71
+ "continue",
72
+ "debugger",
73
+ "if",
74
+ "else",
75
+ "switch",
76
+ "for",
77
+ "while",
78
+ "do",
79
+ "try",
80
+ "catch",
81
+ "finally",
82
+ "class",
83
+ "extends",
84
+ "super",
85
+ "undefined",
86
+ "then",
87
+ "unless",
88
+ "until",
89
+ "loop",
90
+ "of",
91
+ "by",
92
+ "when"
93
+ ],
94
+ // we include these common regular expressions
95
+ symbols: /[=><!~?&%|+\-*\/\^\.,\:]+/,
96
+ escapes: /\\(?:[abfnrtv\\"'$]|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
97
+ // The main tokenizer for our languages
98
+ tokenizer: {
99
+ root: [
100
+ // identifiers and keywords
101
+ [/\@[a-zA-Z_]\w*/, "variable.predefined"],
102
+ [
103
+ /[a-zA-Z_]\w*/,
104
+ {
105
+ cases: {
106
+ this: "variable.predefined",
107
+ "@keywords": { token: "keyword.$0" },
108
+ "@default": ""
109
+ }
110
+ }
111
+ ],
112
+ // whitespace
113
+ [/[ \t\r\n]+/, ""],
114
+ // Comments
115
+ [/###/, "comment", "@comment"],
116
+ [/#.*$/, "comment"],
117
+ // regular expressions
118
+ ["///", { token: "regexp", next: "@hereregexp" }],
119
+ [/^(\s*)(@regEx)/, ["", "regexp"]],
120
+ [/(\()(\s*)(@regEx)/, ["@brackets", "", "regexp"]],
121
+ [/(\,)(\s*)(@regEx)/, ["delimiter", "", "regexp"]],
122
+ [/(\=)(\s*)(@regEx)/, ["delimiter", "", "regexp"]],
123
+ [/(\:)(\s*)(@regEx)/, ["delimiter", "", "regexp"]],
124
+ [/(\[)(\s*)(@regEx)/, ["@brackets", "", "regexp"]],
125
+ [/(\!)(\s*)(@regEx)/, ["delimiter", "", "regexp"]],
126
+ [/(\&)(\s*)(@regEx)/, ["delimiter", "", "regexp"]],
127
+ [/(\|)(\s*)(@regEx)/, ["delimiter", "", "regexp"]],
128
+ [/(\?)(\s*)(@regEx)/, ["delimiter", "", "regexp"]],
129
+ [/(\{)(\s*)(@regEx)/, ["@brackets", "", "regexp"]],
130
+ [/(\;)(\s*)(@regEx)/, ["", "", "regexp"]],
131
+ // delimiters
132
+ [
133
+ /}/,
134
+ {
135
+ cases: {
136
+ "$S2==interpolatedstring": {
137
+ token: "string",
138
+ next: "@pop"
139
+ },
140
+ "@default": "@brackets"
141
+ }
142
+ }
143
+ ],
144
+ [/[{}()\[\]]/, "@brackets"],
145
+ [/@symbols/, "delimiter"],
146
+ // numbers
147
+ [/\d+[eE]([\-+]?\d+)?/, "number.float"],
148
+ [/\d+\.\d+([eE][\-+]?\d+)?/, "number.float"],
149
+ [/0[xX][0-9a-fA-F]+/, "number.hex"],
150
+ [/0[0-7]+(?!\d)/, "number.octal"],
151
+ [/\d+/, "number"],
152
+ // delimiter: after number because of .\d floats
153
+ [/[,.]/, "delimiter"],
154
+ // strings:
155
+ [/"""/, "string", '@herestring."""'],
156
+ [/'''/, "string", "@herestring.'''"],
157
+ [
158
+ /"/,
159
+ {
160
+ cases: {
161
+ "@eos": "string",
162
+ "@default": { token: "string", next: '@string."' }
163
+ }
164
+ }
165
+ ],
166
+ [
167
+ /'/,
168
+ {
169
+ cases: {
170
+ "@eos": "string",
171
+ "@default": { token: "string", next: "@string.'" }
172
+ }
173
+ }
174
+ ]
175
+ ],
176
+ string: [
177
+ [/[^"'\#\\]+/, "string"],
178
+ [/@escapes/, "string.escape"],
179
+ [/\./, "string.escape.invalid"],
180
+ [/\./, "string.escape.invalid"],
181
+ [
182
+ /#{/,
183
+ {
184
+ cases: {
185
+ '$S2=="': {
186
+ token: "string",
187
+ next: "root.interpolatedstring"
188
+ },
189
+ "@default": "string"
190
+ }
191
+ }
192
+ ],
193
+ [
194
+ /["']/,
195
+ {
196
+ cases: {
197
+ "$#==$S2": { token: "string", next: "@pop" },
198
+ "@default": "string"
199
+ }
200
+ }
201
+ ],
202
+ [/#/, "string"]
203
+ ],
204
+ herestring: [
205
+ [
206
+ /("""|''')/,
207
+ {
208
+ cases: {
209
+ "$1==$S2": { token: "string", next: "@pop" },
210
+ "@default": "string"
211
+ }
212
+ }
213
+ ],
214
+ [/[^#\\'"]+/, "string"],
215
+ [/['"]+/, "string"],
216
+ [/@escapes/, "string.escape"],
217
+ [/\./, "string.escape.invalid"],
218
+ [/#{/, { token: "string.quote", next: "root.interpolatedstring" }],
219
+ [/#/, "string"]
220
+ ],
221
+ comment: [
222
+ [/[^#]+/, "comment"],
223
+ [/###/, "comment", "@pop"],
224
+ [/#/, "comment"]
225
+ ],
226
+ hereregexp: [
227
+ [/[^\\\/#]+/, "regexp"],
228
+ [/\\./, "regexp"],
229
+ [/#.*$/, "comment"],
230
+ ["///[igm]*", { token: "regexp", next: "@pop" }],
231
+ [/\//, "regexp"]
232
+ ]
233
+ }
234
+ };
235
+ export {
236
+ e as conf,
237
+ r as language
238
+ };
@@ -0,0 +1,27 @@
1
+ import { LitElement } from "lit";
2
+ import * as monaco from "monaco-editor";
3
+ export declare class SpecEditor extends LitElement {
4
+ private container;
5
+ editor?: monaco.editor.IStandaloneCodeEditor;
6
+ model?: monaco.editor.ITextModel;
7
+ readOnly?: boolean;
8
+ theme?: string;
9
+ language?: string;
10
+ code?: string;
11
+ static styles: import("lit").CSSResult;
12
+ private firstboot;
13
+ render(): import("lit-html").TemplateResult<1>;
14
+ private getFile;
15
+ private getCode;
16
+ private getTheme;
17
+ private isDark;
18
+ setValue(value: string, firstboot?: boolean): void;
19
+ getValue(): string;
20
+ setMarkers(markers: monaco.editor.IMarkerData[]): void;
21
+ firstUpdated(): void;
22
+ }
23
+ declare global {
24
+ interface HTMLElementTagNameMap {
25
+ "pb33f-editor": SpecEditor;
26
+ }
27
+ }
@@ -0,0 +1,192 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { css, html, LitElement } from "lit";
8
+ import { customElement, property } from "lit/decorators.js";
9
+ import { createRef, ref } from "lit/directives/ref.js";
10
+ // -- Monaco Editor Imports --
11
+ import * as monaco from "monaco-editor";
12
+ // @ts-ignore
13
+ import styles from "monaco-editor/min/vs/editor/editor.main.css?inline";
14
+ // @ts-ignore
15
+ import editorWorker from "monaco-editor/esm/vs/editor/editor.worker?worker";
16
+ // @ts-ignore
17
+ import htmlWorker from "monaco-editor/esm/vs/language/html/html.worker?worker";
18
+ // @ts-ignore
19
+ import cssWorker from "monaco-editor/esm/vs/language/css/css.worker?worker";
20
+ // @ts-ignore
21
+ import jsonWorker from "monaco-editor/esm/vs/language/json/json.worker?worker";
22
+ import { EditorClicked, EditorUpdated } from "@/events/doctor";
23
+ // @ts-ignore
24
+ self.MonacoEnvironment = {
25
+ getWorker(_, label) {
26
+ if (label === "json") {
27
+ return new jsonWorker();
28
+ }
29
+ if (label === "html") {
30
+ return new htmlWorker();
31
+ }
32
+ if (label === "css" || label === "scss" || label === "less") {
33
+ return new cssWorker();
34
+ }
35
+ return new editorWorker();
36
+ },
37
+ };
38
+ let SpecEditor = class SpecEditor extends LitElement {
39
+ constructor() {
40
+ super(...arguments);
41
+ this.container = createRef();
42
+ }
43
+ render() {
44
+ return html `
45
+ <style>
46
+ ${styles}
47
+ </style>
48
+ <main ${ref(this.container)}></main>
49
+ `;
50
+ }
51
+ getFile() {
52
+ if (this.children.length > 0)
53
+ return this.children[0];
54
+ return null;
55
+ }
56
+ getCode() {
57
+ if (this.code)
58
+ return this.code;
59
+ const file = this.getFile();
60
+ if (!file)
61
+ return;
62
+ return file.innerHTML.trim();
63
+ }
64
+ getTheme() {
65
+ if (this.theme)
66
+ return this.theme;
67
+ if (this.isDark())
68
+ return "vs-dark";
69
+ return "vs-light";
70
+ }
71
+ isDark() {
72
+ return (window.matchMedia &&
73
+ window.matchMedia("(prefers-color-scheme: dark)").matches);
74
+ }
75
+ setValue(value, firstboot = false) {
76
+ if (firstboot) {
77
+ this.firstboot = firstboot;
78
+ }
79
+ this.editor.setValue(value);
80
+ }
81
+ getValue() {
82
+ return this.editor.getValue();
83
+ }
84
+ setMarkers(markers) {
85
+ monaco.editor.removeAllMarkers("owner");
86
+ monaco.editor.setModelMarkers(this.model, "owner", markers);
87
+ }
88
+ firstUpdated() {
89
+ const options = {
90
+ base: 'vs-dark',
91
+ //renderSideBySide: false,
92
+ inherit: true,
93
+ rules: [
94
+ {
95
+ "foreground": "E400FB",
96
+ "token": "string"
97
+ },
98
+ {
99
+ "foreground": "62C4FFFF",
100
+ "token": "type"
101
+ },
102
+ ],
103
+ colors: {
104
+ 'editor.fontFamily': 'arial',
105
+ 'editor.foreground': '#ffffff',
106
+ 'editor.background': '#0d1117',
107
+ 'editorCursor.foreground': '#62C4FFFF',
108
+ 'editor.lineHighlightBackground': '#E400FB30',
109
+ 'editorLineNumber.foreground': '#6368747F',
110
+ 'editorLineNumber.activeForeground': '#E400FB',
111
+ 'editor.inactiveSelectionBackground': '#FF3C742D',
112
+ 'diffEditor.removedTextBackground': '#FF3C741A',
113
+ 'diffEditor.insertedTextBackground': '#62C4FF1A',
114
+ }
115
+ };
116
+ // @ts-ignore
117
+ monaco.editor.defineTheme("pb33f", options);
118
+ monaco.editor.setTheme('pb33f');
119
+ const uri = monaco.Uri.parse("inmemory://doc");
120
+ const value = this.getCode();
121
+ this.model = monaco.editor.createModel(value, "yaml", uri);
122
+ this.editor = monaco.editor.create(this.container.value, {
123
+ model: this.model,
124
+ language: 'yaml',
125
+ theme: 'pb33f',
126
+ readOnly: this.readOnly,
127
+ automaticLayout: true,
128
+ fontFamily: 'BerkeleyMono-Regular',
129
+ fontSize: 14,
130
+ minimap: {
131
+ enabled: false
132
+ },
133
+ hover: {
134
+ enabled: true
135
+ }
136
+ });
137
+ this.model.onDidChangeContent(() => {
138
+ if (!this.firstboot) {
139
+ this.dispatchEvent(new CustomEvent(EditorUpdated, {
140
+ bubbles: true,
141
+ composed: true,
142
+ detail: {
143
+ content: this.editor.getValue()
144
+ }
145
+ }));
146
+ }
147
+ else {
148
+ this.firstboot = false;
149
+ }
150
+ });
151
+ this.editor.onMouseDown((e) => {
152
+ this.dispatchEvent(new CustomEvent(EditorClicked, {
153
+ bubbles: true,
154
+ composed: true,
155
+ detail: {
156
+ line: e.target.position?.lineNumber,
157
+ column: e.target.position?.column
158
+ }
159
+ }));
160
+ //this.editor?.getAction("editor.action.revealDefinition")!.run()
161
+ });
162
+ window
163
+ .matchMedia("(prefers-color-scheme: dark)")
164
+ .addEventListener("change", () => {
165
+ monaco.editor.setTheme(this.getTheme());
166
+ });
167
+ }
168
+ };
169
+ SpecEditor.styles = css `
170
+ main {
171
+ width: 100%;
172
+ height: 100%;
173
+ position: relative;
174
+ word-spacing: normal;
175
+ }
176
+ `;
177
+ __decorate([
178
+ property({ type: Boolean, attribute: "readonly" })
179
+ ], SpecEditor.prototype, "readOnly", void 0);
180
+ __decorate([
181
+ property()
182
+ ], SpecEditor.prototype, "theme", void 0);
183
+ __decorate([
184
+ property()
185
+ ], SpecEditor.prototype, "language", void 0);
186
+ __decorate([
187
+ property()
188
+ ], SpecEditor.prototype, "code", void 0);
189
+ SpecEditor = __decorate([
190
+ customElement("pb33f-editor")
191
+ ], SpecEditor);
192
+ export { SpecEditor };
@@ -0,0 +1,2 @@
1
+ declare const _default: import("lit").CSSResult;
2
+ export default _default;
@@ -0,0 +1,23 @@
1
+ import { css } from "lit";
2
+ export default css `
3
+ .banner {
4
+ opacity: 0 ;
5
+ transition: all 0.5s;
6
+ height: 0;
7
+ position: absolute;
8
+ top: 0;
9
+ left: 0;
10
+ z-index: 1000;
11
+ width: 100%;
12
+ overflow: hidden;
13
+ }
14
+
15
+ .visible {
16
+ height: 200px;
17
+ opacity: 1;
18
+ margin-bottom: 20px;
19
+ transition-timing-function: ease-out;
20
+ }
21
+
22
+
23
+ `;
@@ -0,0 +1,9 @@
1
+ import { LitElement } from "lit";
2
+ export declare class ErrorBanner extends LitElement {
3
+ static styles: import("lit").CSSResult[];
4
+ errorMessage: string;
5
+ errorTitle: string;
6
+ visible: boolean;
7
+ constructor();
8
+ render(): import("lit-html").TemplateResult<1>;
9
+ }
@@ -0,0 +1,40 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { customElement, property } from "lit/decorators.js";
8
+ import { html, LitElement } from "lit";
9
+ import { unsafeHTML } from "lit/directives/unsafe-html.js";
10
+ import errorBannerCss from "./error-banner.css.js";
11
+ let ErrorBanner = class ErrorBanner extends LitElement {
12
+ constructor() {
13
+ super();
14
+ this.errorTitle = "Error";
15
+ this.errorMessage = "An error occurred";
16
+ this.visible = false;
17
+ }
18
+ render() {
19
+ return html `
20
+ <div class="banner ${this.visible ? 'visible' : ''}">
21
+ <pb33f-attention-box type="error" headerText="${this.errorTitle}">
22
+ ${unsafeHTML(this.errorMessage)}
23
+ </pb33f-attention-box>
24
+ </div>`;
25
+ }
26
+ };
27
+ ErrorBanner.styles = [errorBannerCss];
28
+ __decorate([
29
+ property()
30
+ ], ErrorBanner.prototype, "errorMessage", void 0);
31
+ __decorate([
32
+ property()
33
+ ], ErrorBanner.prototype, "errorTitle", void 0);
34
+ __decorate([
35
+ property({ type: Boolean })
36
+ ], ErrorBanner.prototype, "visible", void 0);
37
+ ErrorBanner = __decorate([
38
+ customElement("pb33f-error-banner")
39
+ ], ErrorBanner);
40
+ export { ErrorBanner };
@@ -8,7 +8,7 @@ import { customElement, property, query, state } from "lit/decorators.js";
8
8
  import { LitElement } from "lit";
9
9
  import { html } from "lit";
10
10
  import mailingListComponentsCss from "./mailing-list.css.js";
11
- import sharedCss from "../../css/shared.css.js";
11
+ import sharedCss from "@/css/shared.css.js";
12
12
  let MailingList = class MailingList extends LitElement {
13
13
  constructor() {
14
14
  super();
@@ -0,0 +1,4 @@
1
+ export declare const PaginatorFirstPage = "paginatorFirstPage";
2
+ export declare const PaginatorLastPage = "paginatorLastPage";
3
+ export declare const PaginatorNextPage = "paginatorNextPage";
4
+ export declare const PaginatorPreviousPage = "paginator-previous-page";
@@ -0,0 +1,4 @@
1
+ export const PaginatorFirstPage = "paginatorFirstPage";
2
+ export const PaginatorLastPage = "paginatorLastPage";
3
+ export const PaginatorNextPage = "paginatorNextPage";
4
+ export const PaginatorPreviousPage = "paginator-previous-page";
@@ -0,0 +1,2 @@
1
+ declare const _default: import("lit").CSSResult;
2
+ export default _default;
@@ -0,0 +1,35 @@
1
+ import { css } from "lit";
2
+ export default css `
3
+ .paginator-navigation {
4
+ display: flex;
5
+ justify-content: space-between;
6
+ align-items: center;
7
+ background: var(--pagination-header);
8
+ border: 1px solid var(--secondary-color-lowalpha);
9
+
10
+ }
11
+
12
+ .location {
13
+ color: var(--font-color-sub1);
14
+ font-size: 0.8rem;
15
+ }
16
+
17
+ strong {
18
+ font-family: var(--font-stack-bold), monospace;
19
+ font-weight: normal;
20
+ }
21
+
22
+ strong.current-page, strong.total {
23
+ color: var(--primary-color);
24
+ }
25
+
26
+ .result-range {
27
+ font-size: 0.8rem;
28
+ color: var(--font-color-sub1);
29
+ }
30
+
31
+ .hide {
32
+ display: none;
33
+ }
34
+
35
+ `;
@@ -0,0 +1,27 @@
1
+ import { LitElement } from "lit";
2
+ import SlIconButton from "@shoelace-style/shoelace/cdn/components/icon-button/icon-button.component";
3
+ import "@shoelace-style/shoelace/dist/components/format-number/format-number.js";
4
+ export declare class PaginatorNavigation extends LitElement {
5
+ static styles: import("lit").CSSResult[];
6
+ currentPage: number;
7
+ totalPages: number;
8
+ totalItems: number;
9
+ itemsPerPage: number;
10
+ homeButton: SlIconButton;
11
+ prevButton: SlIconButton;
12
+ nextButton: SlIconButton;
13
+ endButton: SlIconButton;
14
+ label: string;
15
+ hide: boolean;
16
+ constructor();
17
+ getRangeStart(): number;
18
+ getPagesRemaining(): number;
19
+ getRangeEnd(): number;
20
+ nextPage(): void;
21
+ previousPage(): void;
22
+ lastPage(): void;
23
+ firstPage(): void;
24
+ togglePrev(toggle: boolean): void;
25
+ toggleNext(toggle: boolean): void;
26
+ render(): import("lit-html").TemplateResult<1>;
27
+ }