apiuikit 0.5.0 → 1.0.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.
- package/README.md +20 -5
- package/dist/apiuikit.cjs.js +1 -1
- package/dist/apiuikit.css +1 -1
- package/dist/apiuikit.es.js +24 -17
- package/dist/c-Bz1-FJiA.js +277 -0
- package/dist/c-C_Sx7N-F.cjs +1 -0
- package/dist/clojure-DWYEZwCD.cjs +1 -0
- package/dist/clojure-aY2138WD.js +135 -0
- package/dist/components/Authorization.d.ts +28 -17
- package/dist/components/ChannelAddress.d.ts +8 -2
- package/dist/components/CodeBlock.d.ts +4 -1
- package/dist/components/CodeSamples.d.ts +12 -0
- package/dist/components/CollapsiblePanel.d.ts +24 -0
- package/dist/components/CopyMarkdownButton.d.ts +15 -0
- package/dist/components/Examples.d.ts +4 -2
- package/dist/components/InfoMetadata.d.ts +15 -2
- package/dist/components/Markdown.d.ts +2 -0
- package/dist/components/MarkdownExportMenu.d.ts +13 -0
- package/dist/components/MethodBadge.d.ts +14 -0
- package/dist/components/Navigation/AsyncAPINavigation.d.ts +28 -0
- package/dist/components/Navigation/Navigation.d.ts +58 -0
- package/dist/components/Navigation/OpenAPINavigation.d.ts +22 -0
- package/dist/components/Navigation/SpecNavigation.d.ts +25 -0
- package/dist/components/Navigation/index.d.ts +4 -0
- package/dist/components/Navigation/sharedSections.d.ts +10 -0
- package/dist/components/RenderExtensions.d.ts +14 -1
- package/dist/components/Section.d.ts +3 -1
- package/dist/components/ServerAddressBanner.d.ts +16 -0
- package/dist/components/SidePanel.d.ts +2 -0
- package/dist/components/Tabs.d.ts +3 -1
- package/dist/components/schema/SchemaTab.d.ts +19 -3
- package/dist/components/tests/Bindings.test.d.ts +1 -0
- package/dist/components/tests/CodeBlock.test.d.ts +1 -0
- package/dist/components/tests/CodeSamples.test.d.ts +1 -0
- package/dist/components/tests/CopyMarkdownButton.test.d.ts +1 -0
- package/dist/components/tests/MarkdownExportMenu.test.d.ts +1 -0
- package/dist/config/config.d.ts +8 -0
- package/dist/containers/AsyncAPI/AsyncAPI.d.ts +1 -1
- package/dist/containers/Information/InformationSection.d.ts +22 -0
- package/dist/containers/Information/OpenAPIInformation.d.ts +9 -0
- package/dist/containers/OpenAPI/Layout.d.ts +7 -0
- package/dist/containers/OpenAPI/OpenAPI.d.ts +18 -0
- package/dist/containers/OpenAPI/OpenAPIDocumentProvider.d.ts +13 -0
- package/dist/containers/OpenAPI/OpenAPIRenderer.d.ts +17 -0
- package/dist/containers/OpenAPI/tests/OpenAPI.test.d.ts +1 -0
- package/dist/containers/OpenAPI/tests/OpenAPIRenderer.test.d.ts +1 -0
- package/dist/containers/Operation/Operations.d.ts +2 -1
- package/dist/containers/Path/OperationCallbacks.d.ts +37 -0
- package/dist/containers/Path/PathOperation.d.ts +21 -0
- package/dist/containers/Path/Paths.d.ts +16 -0
- package/dist/containers/Path/ResponseLinks.d.ts +21 -0
- package/dist/containers/Path/tests/PathOperation.test.d.ts +1 -0
- package/dist/containers/Server/OpenAPIServer.d.ts +4 -0
- package/dist/containers/Server/OpenAPIServers.d.ts +13 -0
- package/dist/contants.d.ts +7 -0
- package/dist/contexts/useSpec.d.ts +28 -6
- package/dist/crystal-BcGgviMR.cjs +1 -0
- package/dist/crystal-BtD5fR4q.js +283 -0
- package/dist/csharp-AnFv7wyC.js +382 -0
- package/dist/csharp-yuAGIuP4.cjs +1 -0
- package/dist/go-BpetKc7b.cjs +1 -0
- package/dist/go-CkZ9_bn0.js +151 -0
- package/dist/helpers/codeSamples.d.ts +92 -0
- package/dist/helpers/exampleSchema.d.ts +19 -0
- package/dist/helpers/hljsLanguages.d.ts +6 -0
- package/dist/helpers/openapiParser.d.ts +10 -0
- package/dist/helpers/openapiSearchIndex.d.ts +3 -0
- package/dist/helpers/resolveDocument.d.ts +8 -0
- package/dist/helpers/runtimeExpression.d.ts +15 -0
- package/dist/helpers/schemaExample.d.ts +9 -0
- package/dist/helpers/searchIndex.d.ts +5 -2
- package/dist/helpers/tests/codeSamples.test.d.ts +1 -0
- package/dist/helpers/tests/exampleSchema.test.d.ts +1 -0
- package/dist/helpers/tests/openapiSearchIndex.test.d.ts +1 -0
- package/dist/helpers/tests/toMarkdown.test.d.ts +1 -0
- package/dist/helpers/toMarkdown.d.ts +20 -0
- package/dist/hooks/useDocumentProviderValue.d.ts +27 -0
- package/dist/hooks/useFuseSearch.d.ts +14 -0
- package/dist/hooks/useOpenAPISearch.d.ts +9 -0
- package/dist/hooks/useSearchResultFocus.d.ts +18 -0
- package/dist/hooks/useSpecLayoutController.d.ts +51 -0
- package/dist/hooks/useSpecSearch.d.ts +2 -6
- package/dist/http--XH4hLDt.cjs +1 -0
- package/dist/http-DKeNlJKS.js +85 -0
- package/dist/icons/Copy.d.ts +6 -0
- package/dist/icons/Info.d.ts +5 -0
- package/dist/{index-BcNlIoEF.cjs → index-ArzwV232.cjs} +6 -6
- package/dist/index-Bh4OKjMA.js +25412 -0
- package/dist/index-C278WDNb.cjs +139 -0
- package/dist/index-C4I0xC5G.js +17544 -0
- package/dist/index-DuW5iShy.cjs +177 -0
- package/dist/index-PtAFPDfk.js +18851 -0
- package/dist/index.d.ts +7 -0
- package/dist/java-BIk0G-rH.cjs +1 -0
- package/dist/java-BicX26Pg.js +240 -0
- package/dist/kotlin-BwB8b-YX.js +242 -0
- package/dist/kotlin-kGuORR5a.cjs +2 -0
- package/dist/objectivec-CnyrJ13Z.js +237 -0
- package/dist/objectivec-CoeV81Tz.cjs +1 -0
- package/dist/ocaml-0j7KDjso.cjs +1 -0
- package/dist/ocaml-T8IqWCjo.js +67 -0
- package/dist/php-BL35ZHWM.js +566 -0
- package/dist/php-DF4zG2hq.cjs +2 -0
- package/dist/powershell-CvydS3ek.cjs +1 -0
- package/dist/powershell-DuhUKWoO.js +236 -0
- package/dist/protoToJsonSchema-AciPTlBK.cjs +83 -0
- package/dist/protoToJsonSchema-D1lojrO3.js +6131 -0
- package/dist/{protobufSchemaParser-sEw46uRx.cjs → protobufSchemaParser-7SgmMhQd.cjs} +1 -1
- package/dist/{protobufSchemaParser-BQVXzHsQ.js → protobufSchemaParser-BohWo_pY.js} +2 -2
- package/dist/public/createSectionRoot.d.ts +30 -0
- package/dist/public/openapiSections.d.ts +26 -0
- package/dist/r-B8fCBydS.js +207 -0
- package/dist/r-CYaZnHkA.cjs +1 -0
- package/dist/ruby-CvOid-1s.js +388 -0
- package/dist/ruby-nPcbuC2a.cjs +1 -0
- package/dist/rust-BocnJ3Ns.js +305 -0
- package/dist/rust-DKnYCg2f.cjs +1 -0
- package/dist/swift-C35Eof-I.js +799 -0
- package/dist/swift-CAnH__EC.cjs +1 -0
- package/dist/types/openapi.d.ts +85 -0
- package/package.json +13 -2
- package/dist/components/Navigation.d.ts +0 -28
- package/dist/icons/SideBar.d.ts +0 -6
- package/dist/index-BG6colCU.js +0 -11473
- package/dist/index-Bmw7IyyF.cjs +0 -73
- package/dist/index-CEf0X0H_.js +0 -25414
- package/dist/protoToJsonSchema-BcqPKXqK.js +0 -6174
- package/dist/protoToJsonSchema-C43lKcgx.cjs +0 -83
- package/dist/vite.svg +0 -1
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
function S(n) {
|
|
2
|
+
const i = "(_?[ui](8|16|32|64|128))?", g = "(_?f(32|64))?", l = "[a-zA-Z_]\\w*[!?=]?", s = "[a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|[=!]~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~|]|//|//=|&[-+*]=?|&\\*\\*|\\[\\][=?]?", t = "[A-Za-z_]\\w*(::\\w+)*(\\?|!)?", c = {
|
|
3
|
+
$pattern: l,
|
|
4
|
+
keyword: "abstract alias annotation as as? asm begin break case class def do else elsif end ensure enum extend for fun if include instance_sizeof is_a? lib macro module next nil? of out pointerof private protected rescue responds_to? return require select self sizeof struct super then type typeof union uninitialized unless until verbatim when while with yield __DIR__ __END_LINE__ __FILE__ __LINE__",
|
|
5
|
+
literal: "false nil true"
|
|
6
|
+
}, a = {
|
|
7
|
+
className: "subst",
|
|
8
|
+
begin: /#\{/,
|
|
9
|
+
end: /\}/,
|
|
10
|
+
keywords: c
|
|
11
|
+
}, d = {
|
|
12
|
+
// negative-look forward attemps to prevent false matches like:
|
|
13
|
+
// @ident@ or $ident$ that might indicate this is not ruby at all
|
|
14
|
+
className: "variable",
|
|
15
|
+
begin: "(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"
|
|
16
|
+
}, b = {
|
|
17
|
+
className: "template-variable",
|
|
18
|
+
variants: [
|
|
19
|
+
{
|
|
20
|
+
begin: "\\{\\{",
|
|
21
|
+
end: "\\}\\}"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
begin: "\\{%",
|
|
25
|
+
end: "%\\}"
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
keywords: c
|
|
29
|
+
};
|
|
30
|
+
function e(A, w) {
|
|
31
|
+
const r = [
|
|
32
|
+
{
|
|
33
|
+
begin: A,
|
|
34
|
+
end: w
|
|
35
|
+
}
|
|
36
|
+
];
|
|
37
|
+
return r[0].contains = r, r;
|
|
38
|
+
}
|
|
39
|
+
const _ = {
|
|
40
|
+
className: "string",
|
|
41
|
+
contains: [
|
|
42
|
+
n.BACKSLASH_ESCAPE,
|
|
43
|
+
a
|
|
44
|
+
],
|
|
45
|
+
variants: [
|
|
46
|
+
{
|
|
47
|
+
begin: /'/,
|
|
48
|
+
end: /'/
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
begin: /"/,
|
|
52
|
+
end: /"/
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
begin: /`/,
|
|
56
|
+
end: /`/
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
begin: "%[Qwi]?\\(",
|
|
60
|
+
end: "\\)",
|
|
61
|
+
contains: e("\\(", "\\)")
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
begin: "%[Qwi]?\\[",
|
|
65
|
+
end: "\\]",
|
|
66
|
+
contains: e("\\[", "\\]")
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
begin: "%[Qwi]?\\{",
|
|
70
|
+
end: /\}/,
|
|
71
|
+
contains: e(/\{/, /\}/)
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
begin: "%[Qwi]?<",
|
|
75
|
+
end: ">",
|
|
76
|
+
contains: e("<", ">")
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
begin: "%[Qwi]?\\|",
|
|
80
|
+
end: "\\|"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
begin: /<<-\w+$/,
|
|
84
|
+
end: /^\s*\w+$/
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
relevance: 0
|
|
88
|
+
}, E = {
|
|
89
|
+
className: "string",
|
|
90
|
+
variants: [
|
|
91
|
+
{
|
|
92
|
+
begin: "%q\\(",
|
|
93
|
+
end: "\\)",
|
|
94
|
+
contains: e("\\(", "\\)")
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
begin: "%q\\[",
|
|
98
|
+
end: "\\]",
|
|
99
|
+
contains: e("\\[", "\\]")
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
begin: "%q\\{",
|
|
103
|
+
end: /\}/,
|
|
104
|
+
contains: e(/\{/, /\}/)
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
begin: "%q<",
|
|
108
|
+
end: ">",
|
|
109
|
+
contains: e("<", ">")
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
begin: "%q\\|",
|
|
113
|
+
end: "\\|"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
begin: /<<-'\w+'$/,
|
|
117
|
+
end: /^\s*\w+$/
|
|
118
|
+
}
|
|
119
|
+
],
|
|
120
|
+
relevance: 0
|
|
121
|
+
}, u = {
|
|
122
|
+
begin: "(?!%\\})(" + n.RE_STARTERS_RE + "|\\n|\\b(case|if|select|unless|until|when|while)\\b)\\s*",
|
|
123
|
+
keywords: "case if select unless until when while",
|
|
124
|
+
contains: [
|
|
125
|
+
{
|
|
126
|
+
className: "regexp",
|
|
127
|
+
contains: [
|
|
128
|
+
n.BACKSLASH_ESCAPE,
|
|
129
|
+
a
|
|
130
|
+
],
|
|
131
|
+
variants: [
|
|
132
|
+
{
|
|
133
|
+
begin: "//[a-z]*",
|
|
134
|
+
relevance: 0
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
begin: "/(?!\\/)",
|
|
138
|
+
end: "/[a-z]*"
|
|
139
|
+
}
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
],
|
|
143
|
+
relevance: 0
|
|
144
|
+
}, T = {
|
|
145
|
+
className: "regexp",
|
|
146
|
+
contains: [
|
|
147
|
+
n.BACKSLASH_ESCAPE,
|
|
148
|
+
a
|
|
149
|
+
],
|
|
150
|
+
variants: [
|
|
151
|
+
{
|
|
152
|
+
begin: "%r\\(",
|
|
153
|
+
end: "\\)",
|
|
154
|
+
contains: e("\\(", "\\)")
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
begin: "%r\\[",
|
|
158
|
+
end: "\\]",
|
|
159
|
+
contains: e("\\[", "\\]")
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
begin: "%r\\{",
|
|
163
|
+
end: /\}/,
|
|
164
|
+
contains: e(/\{/, /\}/)
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
begin: "%r<",
|
|
168
|
+
end: ">",
|
|
169
|
+
contains: e("<", ">")
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
begin: "%r\\|",
|
|
173
|
+
end: "\\|"
|
|
174
|
+
}
|
|
175
|
+
],
|
|
176
|
+
relevance: 0
|
|
177
|
+
}, N = {
|
|
178
|
+
className: "meta",
|
|
179
|
+
begin: "@\\[",
|
|
180
|
+
end: "\\]",
|
|
181
|
+
contains: [n.inherit(n.QUOTE_STRING_MODE, { className: "string" })]
|
|
182
|
+
}, o = [
|
|
183
|
+
b,
|
|
184
|
+
_,
|
|
185
|
+
E,
|
|
186
|
+
T,
|
|
187
|
+
u,
|
|
188
|
+
N,
|
|
189
|
+
d,
|
|
190
|
+
n.HASH_COMMENT_MODE,
|
|
191
|
+
{
|
|
192
|
+
className: "class",
|
|
193
|
+
beginKeywords: "class module struct",
|
|
194
|
+
end: "$|;",
|
|
195
|
+
illegal: /=/,
|
|
196
|
+
contains: [
|
|
197
|
+
n.HASH_COMMENT_MODE,
|
|
198
|
+
n.inherit(n.TITLE_MODE, { begin: t }),
|
|
199
|
+
{
|
|
200
|
+
// relevance booster for inheritance
|
|
201
|
+
begin: "<"
|
|
202
|
+
}
|
|
203
|
+
]
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
className: "class",
|
|
207
|
+
beginKeywords: "lib enum union",
|
|
208
|
+
end: "$|;",
|
|
209
|
+
illegal: /=/,
|
|
210
|
+
contains: [
|
|
211
|
+
n.HASH_COMMENT_MODE,
|
|
212
|
+
n.inherit(n.TITLE_MODE, { begin: t })
|
|
213
|
+
]
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
beginKeywords: "annotation",
|
|
217
|
+
end: "$|;",
|
|
218
|
+
illegal: /=/,
|
|
219
|
+
contains: [
|
|
220
|
+
n.HASH_COMMENT_MODE,
|
|
221
|
+
n.inherit(n.TITLE_MODE, { begin: t })
|
|
222
|
+
],
|
|
223
|
+
relevance: 2
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
className: "function",
|
|
227
|
+
beginKeywords: "def",
|
|
228
|
+
end: /\B\b/,
|
|
229
|
+
contains: [
|
|
230
|
+
n.inherit(n.TITLE_MODE, {
|
|
231
|
+
begin: s,
|
|
232
|
+
endsParent: !0
|
|
233
|
+
})
|
|
234
|
+
]
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
className: "function",
|
|
238
|
+
beginKeywords: "fun macro",
|
|
239
|
+
end: /\B\b/,
|
|
240
|
+
contains: [
|
|
241
|
+
n.inherit(n.TITLE_MODE, {
|
|
242
|
+
begin: s,
|
|
243
|
+
endsParent: !0
|
|
244
|
+
})
|
|
245
|
+
],
|
|
246
|
+
relevance: 2
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
className: "symbol",
|
|
250
|
+
begin: n.UNDERSCORE_IDENT_RE + "(!|\\?)?:",
|
|
251
|
+
relevance: 0
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
className: "symbol",
|
|
255
|
+
begin: ":",
|
|
256
|
+
contains: [
|
|
257
|
+
_,
|
|
258
|
+
{ begin: s }
|
|
259
|
+
],
|
|
260
|
+
relevance: 0
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
className: "number",
|
|
264
|
+
variants: [
|
|
265
|
+
{ begin: "\\b0b([01_]+)" + i },
|
|
266
|
+
{ begin: "\\b0o([0-7_]+)" + i },
|
|
267
|
+
{ begin: "\\b0x([A-Fa-f0-9_]+)" + i },
|
|
268
|
+
{ begin: "\\b([1-9][0-9_]*[0-9]|[0-9])(\\.[0-9][0-9_]*)?([eE]_?[-+]?[0-9_]*)?" + g + "(?!_)" },
|
|
269
|
+
{ begin: "\\b([1-9][0-9_]*|0)" + i }
|
|
270
|
+
],
|
|
271
|
+
relevance: 0
|
|
272
|
+
}
|
|
273
|
+
];
|
|
274
|
+
return a.contains = o, b.contains = o.slice(1), {
|
|
275
|
+
name: "Crystal",
|
|
276
|
+
aliases: ["cr"],
|
|
277
|
+
keywords: c,
|
|
278
|
+
contains: o
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
export {
|
|
282
|
+
S as default
|
|
283
|
+
};
|
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
function C(e) {
|
|
2
|
+
const d = [
|
|
3
|
+
"bool",
|
|
4
|
+
"byte",
|
|
5
|
+
"char",
|
|
6
|
+
"decimal",
|
|
7
|
+
"delegate",
|
|
8
|
+
"double",
|
|
9
|
+
"dynamic",
|
|
10
|
+
"enum",
|
|
11
|
+
"float",
|
|
12
|
+
"int",
|
|
13
|
+
"long",
|
|
14
|
+
"nint",
|
|
15
|
+
"nuint",
|
|
16
|
+
"object",
|
|
17
|
+
"sbyte",
|
|
18
|
+
"short",
|
|
19
|
+
"string",
|
|
20
|
+
"ulong",
|
|
21
|
+
"uint",
|
|
22
|
+
"ushort"
|
|
23
|
+
], l = [
|
|
24
|
+
"public",
|
|
25
|
+
"private",
|
|
26
|
+
"protected",
|
|
27
|
+
"static",
|
|
28
|
+
"internal",
|
|
29
|
+
"protected",
|
|
30
|
+
"abstract",
|
|
31
|
+
"async",
|
|
32
|
+
"extern",
|
|
33
|
+
"override",
|
|
34
|
+
"unsafe",
|
|
35
|
+
"virtual",
|
|
36
|
+
"new",
|
|
37
|
+
"sealed",
|
|
38
|
+
"partial"
|
|
39
|
+
], g = [
|
|
40
|
+
"default",
|
|
41
|
+
"false",
|
|
42
|
+
"null",
|
|
43
|
+
"true"
|
|
44
|
+
], O = [
|
|
45
|
+
"abstract",
|
|
46
|
+
"as",
|
|
47
|
+
"base",
|
|
48
|
+
"break",
|
|
49
|
+
"case",
|
|
50
|
+
"catch",
|
|
51
|
+
"class",
|
|
52
|
+
"const",
|
|
53
|
+
"continue",
|
|
54
|
+
"do",
|
|
55
|
+
"else",
|
|
56
|
+
"event",
|
|
57
|
+
"explicit",
|
|
58
|
+
"extern",
|
|
59
|
+
"finally",
|
|
60
|
+
"fixed",
|
|
61
|
+
"for",
|
|
62
|
+
"foreach",
|
|
63
|
+
"goto",
|
|
64
|
+
"if",
|
|
65
|
+
"implicit",
|
|
66
|
+
"in",
|
|
67
|
+
"interface",
|
|
68
|
+
"internal",
|
|
69
|
+
"is",
|
|
70
|
+
"lock",
|
|
71
|
+
"namespace",
|
|
72
|
+
"new",
|
|
73
|
+
"operator",
|
|
74
|
+
"out",
|
|
75
|
+
"override",
|
|
76
|
+
"params",
|
|
77
|
+
"private",
|
|
78
|
+
"protected",
|
|
79
|
+
"public",
|
|
80
|
+
"readonly",
|
|
81
|
+
"record",
|
|
82
|
+
"ref",
|
|
83
|
+
"return",
|
|
84
|
+
"scoped",
|
|
85
|
+
"sealed",
|
|
86
|
+
"sizeof",
|
|
87
|
+
"stackalloc",
|
|
88
|
+
"static",
|
|
89
|
+
"struct",
|
|
90
|
+
"switch",
|
|
91
|
+
"this",
|
|
92
|
+
"throw",
|
|
93
|
+
"try",
|
|
94
|
+
"typeof",
|
|
95
|
+
"unchecked",
|
|
96
|
+
"unsafe",
|
|
97
|
+
"using",
|
|
98
|
+
"virtual",
|
|
99
|
+
"void",
|
|
100
|
+
"volatile",
|
|
101
|
+
"while"
|
|
102
|
+
], N = [
|
|
103
|
+
"add",
|
|
104
|
+
"alias",
|
|
105
|
+
"and",
|
|
106
|
+
"ascending",
|
|
107
|
+
"args",
|
|
108
|
+
"async",
|
|
109
|
+
"await",
|
|
110
|
+
"by",
|
|
111
|
+
"descending",
|
|
112
|
+
"dynamic",
|
|
113
|
+
"equals",
|
|
114
|
+
"file",
|
|
115
|
+
"from",
|
|
116
|
+
"get",
|
|
117
|
+
"global",
|
|
118
|
+
"group",
|
|
119
|
+
"init",
|
|
120
|
+
"into",
|
|
121
|
+
"join",
|
|
122
|
+
"let",
|
|
123
|
+
"nameof",
|
|
124
|
+
"not",
|
|
125
|
+
"notnull",
|
|
126
|
+
"on",
|
|
127
|
+
"or",
|
|
128
|
+
"orderby",
|
|
129
|
+
"partial",
|
|
130
|
+
"record",
|
|
131
|
+
"remove",
|
|
132
|
+
"required",
|
|
133
|
+
"scoped",
|
|
134
|
+
"select",
|
|
135
|
+
"set",
|
|
136
|
+
"unmanaged",
|
|
137
|
+
"value|0",
|
|
138
|
+
"var",
|
|
139
|
+
"when",
|
|
140
|
+
"where",
|
|
141
|
+
"with",
|
|
142
|
+
"yield"
|
|
143
|
+
], n = {
|
|
144
|
+
keyword: O.concat(N),
|
|
145
|
+
built_in: d,
|
|
146
|
+
literal: g
|
|
147
|
+
}, a = e.inherit(e.TITLE_MODE, { begin: "[a-zA-Z](\\.?\\w)*" }), i = {
|
|
148
|
+
className: "number",
|
|
149
|
+
variants: [
|
|
150
|
+
{ begin: "\\b(0b[01']+)" },
|
|
151
|
+
{ begin: "(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)" },
|
|
152
|
+
{ begin: "(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)" }
|
|
153
|
+
],
|
|
154
|
+
relevance: 0
|
|
155
|
+
}, T = {
|
|
156
|
+
className: "string",
|
|
157
|
+
begin: /"""("*)(?!")(.|\n)*?"""\1/,
|
|
158
|
+
relevance: 1
|
|
159
|
+
}, t = {
|
|
160
|
+
className: "string",
|
|
161
|
+
begin: '@"',
|
|
162
|
+
end: '"',
|
|
163
|
+
contains: [{ begin: '""' }]
|
|
164
|
+
}, b = e.inherit(t, { illegal: /\n/ }), r = {
|
|
165
|
+
className: "subst",
|
|
166
|
+
begin: /\{/,
|
|
167
|
+
end: /\}/,
|
|
168
|
+
keywords: n
|
|
169
|
+
}, c = e.inherit(r, { illegal: /\n/ }), s = {
|
|
170
|
+
className: "string",
|
|
171
|
+
begin: /\$"/,
|
|
172
|
+
end: '"',
|
|
173
|
+
illegal: /\n/,
|
|
174
|
+
contains: [
|
|
175
|
+
{ begin: /\{\{/ },
|
|
176
|
+
{ begin: /\}\}/ },
|
|
177
|
+
e.BACKSLASH_ESCAPE,
|
|
178
|
+
c
|
|
179
|
+
]
|
|
180
|
+
}, o = {
|
|
181
|
+
className: "string",
|
|
182
|
+
begin: /\$@"/,
|
|
183
|
+
end: '"',
|
|
184
|
+
contains: [
|
|
185
|
+
{ begin: /\{\{/ },
|
|
186
|
+
{ begin: /\}\}/ },
|
|
187
|
+
{ begin: '""' },
|
|
188
|
+
r
|
|
189
|
+
]
|
|
190
|
+
}, M = e.inherit(o, {
|
|
191
|
+
illegal: /\n/,
|
|
192
|
+
contains: [
|
|
193
|
+
{ begin: /\{\{/ },
|
|
194
|
+
{ begin: /\}\}/ },
|
|
195
|
+
{ begin: '""' },
|
|
196
|
+
c
|
|
197
|
+
]
|
|
198
|
+
});
|
|
199
|
+
r.contains = [
|
|
200
|
+
o,
|
|
201
|
+
s,
|
|
202
|
+
t,
|
|
203
|
+
e.APOS_STRING_MODE,
|
|
204
|
+
e.QUOTE_STRING_MODE,
|
|
205
|
+
i,
|
|
206
|
+
e.C_BLOCK_COMMENT_MODE
|
|
207
|
+
], c.contains = [
|
|
208
|
+
M,
|
|
209
|
+
s,
|
|
210
|
+
b,
|
|
211
|
+
e.APOS_STRING_MODE,
|
|
212
|
+
e.QUOTE_STRING_MODE,
|
|
213
|
+
i,
|
|
214
|
+
e.inherit(e.C_BLOCK_COMMENT_MODE, { illegal: /\n/ })
|
|
215
|
+
];
|
|
216
|
+
const _ = { variants: [
|
|
217
|
+
T,
|
|
218
|
+
o,
|
|
219
|
+
s,
|
|
220
|
+
t,
|
|
221
|
+
e.APOS_STRING_MODE,
|
|
222
|
+
e.QUOTE_STRING_MODE
|
|
223
|
+
] }, E = {
|
|
224
|
+
begin: "<",
|
|
225
|
+
end: ">",
|
|
226
|
+
contains: [
|
|
227
|
+
{ beginKeywords: "in out" },
|
|
228
|
+
a
|
|
229
|
+
]
|
|
230
|
+
}, u = e.IDENT_RE + "(<" + e.IDENT_RE + "(\\s*,\\s*" + e.IDENT_RE + ")*>)?(\\[\\])?", I = {
|
|
231
|
+
// prevents expressions like `@class` from incorrect flagging
|
|
232
|
+
// `class` as a keyword
|
|
233
|
+
begin: "@" + e.IDENT_RE,
|
|
234
|
+
relevance: 0
|
|
235
|
+
};
|
|
236
|
+
return {
|
|
237
|
+
name: "C#",
|
|
238
|
+
aliases: [
|
|
239
|
+
"cs",
|
|
240
|
+
"c#"
|
|
241
|
+
],
|
|
242
|
+
keywords: n,
|
|
243
|
+
illegal: /::/,
|
|
244
|
+
contains: [
|
|
245
|
+
e.COMMENT(
|
|
246
|
+
"///",
|
|
247
|
+
"$",
|
|
248
|
+
{
|
|
249
|
+
returnBegin: !0,
|
|
250
|
+
contains: [
|
|
251
|
+
{
|
|
252
|
+
className: "doctag",
|
|
253
|
+
variants: [
|
|
254
|
+
{
|
|
255
|
+
begin: "///",
|
|
256
|
+
relevance: 0
|
|
257
|
+
},
|
|
258
|
+
{ begin: "<!--|-->" },
|
|
259
|
+
{
|
|
260
|
+
begin: "</?",
|
|
261
|
+
end: ">"
|
|
262
|
+
}
|
|
263
|
+
]
|
|
264
|
+
}
|
|
265
|
+
]
|
|
266
|
+
}
|
|
267
|
+
),
|
|
268
|
+
e.C_LINE_COMMENT_MODE,
|
|
269
|
+
e.C_BLOCK_COMMENT_MODE,
|
|
270
|
+
{
|
|
271
|
+
className: "meta",
|
|
272
|
+
begin: "#",
|
|
273
|
+
end: "$",
|
|
274
|
+
keywords: { keyword: "if else elif endif define undef warning error line region endregion pragma checksum" }
|
|
275
|
+
},
|
|
276
|
+
_,
|
|
277
|
+
i,
|
|
278
|
+
{
|
|
279
|
+
beginKeywords: "class interface",
|
|
280
|
+
relevance: 0,
|
|
281
|
+
end: /[{;=]/,
|
|
282
|
+
illegal: /[^\s:,]/,
|
|
283
|
+
contains: [
|
|
284
|
+
{ beginKeywords: "where class" },
|
|
285
|
+
a,
|
|
286
|
+
E,
|
|
287
|
+
e.C_LINE_COMMENT_MODE,
|
|
288
|
+
e.C_BLOCK_COMMENT_MODE
|
|
289
|
+
]
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
beginKeywords: "namespace",
|
|
293
|
+
relevance: 0,
|
|
294
|
+
end: /[{;=]/,
|
|
295
|
+
illegal: /[^\s:]/,
|
|
296
|
+
contains: [
|
|
297
|
+
a,
|
|
298
|
+
e.C_LINE_COMMENT_MODE,
|
|
299
|
+
e.C_BLOCK_COMMENT_MODE
|
|
300
|
+
]
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
beginKeywords: "record",
|
|
304
|
+
relevance: 0,
|
|
305
|
+
end: /[{;=]/,
|
|
306
|
+
illegal: /[^\s:]/,
|
|
307
|
+
contains: [
|
|
308
|
+
a,
|
|
309
|
+
E,
|
|
310
|
+
e.C_LINE_COMMENT_MODE,
|
|
311
|
+
e.C_BLOCK_COMMENT_MODE
|
|
312
|
+
]
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
// [Attributes("")]
|
|
316
|
+
className: "meta",
|
|
317
|
+
begin: "^\\s*\\[(?=[\\w])",
|
|
318
|
+
excludeBegin: !0,
|
|
319
|
+
end: "\\]",
|
|
320
|
+
excludeEnd: !0,
|
|
321
|
+
contains: [
|
|
322
|
+
{
|
|
323
|
+
className: "string",
|
|
324
|
+
begin: /"/,
|
|
325
|
+
end: /"/
|
|
326
|
+
}
|
|
327
|
+
]
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
// Expression keywords prevent 'keyword Name(...)' from being
|
|
331
|
+
// recognized as a function definition
|
|
332
|
+
beginKeywords: "new return throw await else",
|
|
333
|
+
relevance: 0
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
className: "function",
|
|
337
|
+
begin: "(" + u + "\\s+)+" + e.IDENT_RE + "\\s*(<[^=]+>\\s*)?\\(",
|
|
338
|
+
returnBegin: !0,
|
|
339
|
+
end: /\s*[{;=]/,
|
|
340
|
+
excludeEnd: !0,
|
|
341
|
+
keywords: n,
|
|
342
|
+
contains: [
|
|
343
|
+
// prevents these from being highlighted `title`
|
|
344
|
+
{
|
|
345
|
+
beginKeywords: l.join(" "),
|
|
346
|
+
relevance: 0
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
begin: e.IDENT_RE + "\\s*(<[^=]+>\\s*)?\\(",
|
|
350
|
+
returnBegin: !0,
|
|
351
|
+
contains: [
|
|
352
|
+
e.TITLE_MODE,
|
|
353
|
+
E
|
|
354
|
+
],
|
|
355
|
+
relevance: 0
|
|
356
|
+
},
|
|
357
|
+
{ match: /\(\)/ },
|
|
358
|
+
{
|
|
359
|
+
className: "params",
|
|
360
|
+
begin: /\(/,
|
|
361
|
+
end: /\)/,
|
|
362
|
+
excludeBegin: !0,
|
|
363
|
+
excludeEnd: !0,
|
|
364
|
+
keywords: n,
|
|
365
|
+
relevance: 0,
|
|
366
|
+
contains: [
|
|
367
|
+
_,
|
|
368
|
+
i,
|
|
369
|
+
e.C_BLOCK_COMMENT_MODE
|
|
370
|
+
]
|
|
371
|
+
},
|
|
372
|
+
e.C_LINE_COMMENT_MODE,
|
|
373
|
+
e.C_BLOCK_COMMENT_MODE
|
|
374
|
+
]
|
|
375
|
+
},
|
|
376
|
+
I
|
|
377
|
+
]
|
|
378
|
+
};
|
|
379
|
+
}
|
|
380
|
+
export {
|
|
381
|
+
C as default
|
|
382
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function C(e){const d=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],l=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],g=["default","false","null","true"],O=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],N=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],n={keyword:O.concat(N),built_in:d,literal:g},i=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),a={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},T={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},t={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},b=e.inherit(t,{illegal:/\n/}),r={className:"subst",begin:/\{/,end:/\}/,keywords:n},c=e.inherit(r,{illegal:/\n/}),s={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,c]},o={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},r]},u=e.inherit(o,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},c]});r.contains=[o,s,t,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,e.C_BLOCK_COMMENT_MODE],c.contains=[u,s,b,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const _={variants:[T,o,s,t,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},E={begin:"<",end:">",contains:[{beginKeywords:"in out"},i]},M=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",I={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:n,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},_,a,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},i,E,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[i,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[i,E,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+M+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:n,contains:[{beginKeywords:l.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,E],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:n,relevance:0,contains:[_,a,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},I]}}exports.default=C;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function t(e){const n={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:n,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:n,illegal:/["']/}]}]}}exports.default=t;
|