@apiuikit/web-component 1.4.0 → 1.5.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 (58) hide show
  1. package/README.md +21 -1
  2. package/dist/CodeSamples-CvGJUENN-CR16fFmG.js +4234 -0
  3. package/dist/LinkedInExtension-BL-4T9tt-CwUePUjv.js +21 -0
  4. package/dist/LogoExtension-BCPMpWxf-CD0UVJhy.js +16 -0
  5. package/dist/XExtension-GyRtdHLL-DPPkXhkP.js +23 -0
  6. package/dist/c-Bz1-FJiA-CwNanOv1.js +277 -0
  7. package/dist/clojure-aY2138WD-CzZhvUkO.js +135 -0
  8. package/dist/crystal-BtD5fR4q-B1F7Ovrt.js +283 -0
  9. package/dist/csharp-AnFv7wyC-DBJ0ahb9.js +382 -0
  10. package/dist/elements/asyncapi-info.d.ts +7 -0
  11. package/dist/elements/asyncapi-info.js +17 -0
  12. package/dist/elements/asyncapi-messages.d.ts +7 -0
  13. package/dist/elements/asyncapi-messages.js +17 -0
  14. package/dist/elements/asyncapi-operations.d.ts +7 -0
  15. package/dist/elements/asyncapi-operations.js +17 -0
  16. package/dist/elements/asyncapi-renderer.d.ts +7 -0
  17. package/dist/elements/asyncapi-renderer.js +17 -0
  18. package/dist/elements/asyncapi-servers.d.ts +7 -0
  19. package/dist/elements/asyncapi-servers.js +17 -0
  20. package/dist/elements/asyncapi.d.ts +7 -0
  21. package/dist/elements/asyncapi.js +17 -0
  22. package/dist/elements/openapi-endpoints.d.ts +7 -0
  23. package/dist/elements/openapi-endpoints.js +17 -0
  24. package/dist/elements/openapi-info.d.ts +7 -0
  25. package/dist/elements/openapi-info.js +17 -0
  26. package/dist/elements/openapi-renderer.d.ts +7 -0
  27. package/dist/elements/openapi-renderer.js +17 -0
  28. package/dist/elements/openapi-servers.d.ts +7 -0
  29. package/dist/elements/openapi-servers.js +17 -0
  30. package/dist/elements/openapi-webhooks.d.ts +7 -0
  31. package/dist/elements/openapi-webhooks.js +17 -0
  32. package/dist/elements/openapi.d.ts +7 -0
  33. package/dist/elements/openapi.js +17 -0
  34. package/dist/elements/schemas.d.ts +7 -0
  35. package/dist/elements/schemas.js +17 -0
  36. package/dist/go-CkZ9_bn0-BavTPlHs.js +151 -0
  37. package/dist/http-DKeNlJKS-CncZekYb.js +85 -0
  38. package/dist/index-227TxMRF-BYlp71U_.js +25403 -0
  39. package/dist/index-Bf4YsziL-DPjrM_Iz.js +17529 -0
  40. package/dist/index-DCDYBZcY-B5md4zhj.js +1459 -0
  41. package/dist/java-BicX26Pg-BE9j1hqd.js +240 -0
  42. package/dist/kotlin-BwB8b-YX-DrhZ7rRS.js +242 -0
  43. package/dist/objectivec-CnyrJ13Z-crbGiB8Q.js +237 -0
  44. package/dist/ocaml-T8IqWCjo-T8IqWCjo.js +67 -0
  45. package/dist/php-BL35ZHWM-BVESXHm8.js +566 -0
  46. package/dist/powershell-DuhUKWoO-BkKc-lpt.js +236 -0
  47. package/dist/protoToJsonSchema-nTI0cRt8-B1zlLwd7.js +6127 -0
  48. package/dist/protobufSchemaParser-ChAv0AAl-DDsAdtNH.js +55 -0
  49. package/dist/r-B8fCBydS-B8fCBydS.js +207 -0
  50. package/dist/registerElement-DAVqIcyy.js +25412 -0
  51. package/dist/ruby-CvOid-1s-CANQXRsZ.js +386 -0
  52. package/dist/rust-BocnJ3Ns-BBcgTcYY.js +305 -0
  53. package/dist/swift-C35Eof-I-CeYSuGtY.js +799 -0
  54. package/dist/web-component.css +1 -1
  55. package/dist/web-component.es.js +20637 -20264
  56. package/dist/web-component.iife.js +329 -326
  57. package/package.json +57 -5
  58. package/dist/adapters.d.ts +0 -25
@@ -0,0 +1,386 @@
1
+ function E(e) {
2
+ const i = e.regex, b = "([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)", l = i.either(
3
+ /\b([A-Z]+[a-z0-9]+)+/,
4
+ // ends in caps
5
+ /\b([A-Z]+[a-z0-9]+)+[A-Z]+/
6
+ ), a = i.concat(l, /(::\w+)*/), n = {
7
+ "variable.constant": [
8
+ "__FILE__",
9
+ "__LINE__",
10
+ "__ENCODING__"
11
+ ],
12
+ "variable.language": [
13
+ "self",
14
+ "super"
15
+ ],
16
+ keyword: [
17
+ "alias",
18
+ "and",
19
+ "begin",
20
+ "BEGIN",
21
+ "break",
22
+ "case",
23
+ "class",
24
+ "defined",
25
+ "do",
26
+ "else",
27
+ "elsif",
28
+ "end",
29
+ "END",
30
+ "ensure",
31
+ "for",
32
+ "if",
33
+ "in",
34
+ "module",
35
+ "next",
36
+ "not",
37
+ "or",
38
+ "redo",
39
+ "require",
40
+ "rescue",
41
+ "retry",
42
+ "return",
43
+ "then",
44
+ "undef",
45
+ "unless",
46
+ "until",
47
+ "when",
48
+ "while",
49
+ "yield",
50
+ "include",
51
+ "extend",
52
+ "prepend",
53
+ "public",
54
+ "private",
55
+ "protected",
56
+ "raise",
57
+ "throw"
58
+ ],
59
+ built_in: [
60
+ "proc",
61
+ "lambda",
62
+ "attr_accessor",
63
+ "attr_reader",
64
+ "attr_writer",
65
+ "define_method",
66
+ "private_constant",
67
+ "module_function"
68
+ ],
69
+ literal: [
70
+ "true",
71
+ "false",
72
+ "nil"
73
+ ]
74
+ }, d = {
75
+ className: "doctag",
76
+ begin: "@[A-Za-z]+"
77
+ }, r = {
78
+ begin: "#<",
79
+ end: ">"
80
+ }, t = [
81
+ e.COMMENT(
82
+ "#",
83
+ "$",
84
+ { contains: [d] }
85
+ ),
86
+ e.COMMENT(
87
+ "^=begin",
88
+ "^=end",
89
+ {
90
+ contains: [d],
91
+ relevance: 10
92
+ }
93
+ ),
94
+ e.COMMENT("^__END__", e.MATCH_NOTHING_RE)
95
+ ], c = {
96
+ className: "subst",
97
+ begin: /#\{/,
98
+ end: /\}/,
99
+ keywords: n
100
+ }, o = {
101
+ className: "string",
102
+ contains: [
103
+ e.BACKSLASH_ESCAPE,
104
+ c
105
+ ],
106
+ variants: [
107
+ {
108
+ begin: /'/,
109
+ end: /'/
110
+ },
111
+ {
112
+ begin: /"/,
113
+ end: /"/
114
+ },
115
+ {
116
+ begin: /`/,
117
+ end: /`/
118
+ },
119
+ {
120
+ begin: /%[qQwWx]?\(/,
121
+ end: /\)/
122
+ },
123
+ {
124
+ begin: /%[qQwWx]?\[/,
125
+ end: /\]/
126
+ },
127
+ {
128
+ begin: /%[qQwWx]?\{/,
129
+ end: /\}/
130
+ },
131
+ {
132
+ begin: /%[qQwWx]?</,
133
+ end: />/
134
+ },
135
+ {
136
+ begin: /%[qQwWx]?\//,
137
+ end: /\//
138
+ },
139
+ {
140
+ begin: /%[qQwWx]?%/,
141
+ end: /%/
142
+ },
143
+ {
144
+ begin: /%[qQwWx]?-/,
145
+ end: /-/
146
+ },
147
+ {
148
+ begin: /%[qQwWx]?\|/,
149
+ end: /\|/
150
+ },
151
+ // in the following expressions, \B in the beginning suppresses recognition of ?-sequences
152
+ // where ? is the last character of a preceding identifier, as in: `func?4`
153
+ { begin: /\B\?(\\\d{1,3})/ },
154
+ { begin: /\B\?(\\x[A-Fa-f0-9]{1,2})/ },
155
+ { begin: /\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/ },
156
+ { begin: /\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/ },
157
+ { begin: /\B\?\\(c|C-)[\x20-\x7e]/ },
158
+ { begin: /\B\?\\?\S/ },
159
+ // heredocs
160
+ {
161
+ // this guard makes sure that we have an entire heredoc and not a false
162
+ // positive (auto-detect, etc.)
163
+ begin: i.concat(
164
+ /<<[-~]?'?/,
165
+ i.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)
166
+ ),
167
+ contains: [
168
+ e.END_SAME_AS_BEGIN({
169
+ begin: /(\w+)/,
170
+ end: /(\w+)/,
171
+ contains: [
172
+ e.BACKSLASH_ESCAPE,
173
+ c
174
+ ]
175
+ })
176
+ ]
177
+ }
178
+ ]
179
+ }, u = "[1-9](_?[0-9])*|0", g = "[0-9](_?[0-9])*", m = {
180
+ className: "number",
181
+ relevance: 0,
182
+ variants: [
183
+ // decimal integer/float, optionally exponential or rational, optionally imaginary
184
+ { begin: `\\b(${u})(\\.(${g}))?([eE][+-]?(${g})|r)?i?\\b` },
185
+ // explicit decimal/binary/octal/hexadecimal integer,
186
+ // optionally rational and/or imaginary
187
+ { begin: "\\b0[dD][0-9](_?[0-9])*r?i?\\b" },
188
+ { begin: "\\b0[bB][0-1](_?[0-1])*r?i?\\b" },
189
+ { begin: "\\b0[oO][0-7](_?[0-7])*r?i?\\b" },
190
+ { begin: "\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b" },
191
+ // 0-prefixed implicit octal integer, optionally rational and/or imaginary
192
+ { begin: "\\b0(_?[0-7])+r?i?\\b" }
193
+ ]
194
+ }, _ = {
195
+ variants: [
196
+ {
197
+ match: /\(\)/
198
+ },
199
+ {
200
+ className: "params",
201
+ begin: /\(/,
202
+ end: /(?=\))/,
203
+ excludeBegin: !0,
204
+ endsParent: !0,
205
+ keywords: n
206
+ }
207
+ ]
208
+ }, s = [
209
+ o,
210
+ {
211
+ variants: [
212
+ {
213
+ match: [
214
+ /class\s+/,
215
+ a,
216
+ /\s+<\s+/,
217
+ a
218
+ ]
219
+ },
220
+ {
221
+ match: [
222
+ /\b(class|module)\s+/,
223
+ a
224
+ ]
225
+ }
226
+ ],
227
+ scope: {
228
+ 2: "title.class",
229
+ 4: "title.class.inherited"
230
+ },
231
+ keywords: n
232
+ },
233
+ {
234
+ match: [
235
+ /(include|extend)\s+/,
236
+ a
237
+ ],
238
+ scope: {
239
+ 2: "title.class"
240
+ },
241
+ keywords: n
242
+ },
243
+ {
244
+ relevance: 0,
245
+ match: [
246
+ a,
247
+ /\.new[. (]/
248
+ ],
249
+ scope: {
250
+ 1: "title.class"
251
+ }
252
+ },
253
+ {
254
+ relevance: 0,
255
+ match: /\b[A-Z][A-Z_0-9]+\b/,
256
+ className: "variable.constant"
257
+ },
258
+ {
259
+ relevance: 0,
260
+ match: l,
261
+ scope: "title.class"
262
+ },
263
+ {
264
+ match: [
265
+ /def/,
266
+ /\s+/,
267
+ b
268
+ ],
269
+ scope: {
270
+ 1: "keyword",
271
+ 3: "title.function"
272
+ },
273
+ contains: [
274
+ _
275
+ ]
276
+ },
277
+ {
278
+ // swallow namespace qualifiers before symbols
279
+ begin: e.IDENT_RE + "::"
280
+ },
281
+ {
282
+ className: "symbol",
283
+ begin: e.UNDERSCORE_IDENT_RE + "(!|\\?)?:",
284
+ relevance: 0
285
+ },
286
+ {
287
+ className: "symbol",
288
+ begin: ":(?!\\s)",
289
+ contains: [
290
+ o,
291
+ { begin: b }
292
+ ],
293
+ relevance: 0
294
+ },
295
+ m,
296
+ {
297
+ // negative-look forward attempts to prevent false matches like:
298
+ // @ident@ or $ident$ that might indicate this is not ruby at all
299
+ className: "variable",
300
+ begin: "(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"
301
+ },
302
+ {
303
+ className: "params",
304
+ begin: /\|(?!=)/,
305
+ end: /\|/,
306
+ excludeBegin: !0,
307
+ excludeEnd: !0,
308
+ relevance: 0,
309
+ // this could be a lot of things (in other languages) other than params
310
+ keywords: n
311
+ },
312
+ {
313
+ // regexp container
314
+ begin: "(" + e.RE_STARTERS_RE + "|unless)\\s*",
315
+ keywords: "unless",
316
+ contains: [
317
+ {
318
+ className: "regexp",
319
+ contains: [
320
+ e.BACKSLASH_ESCAPE,
321
+ c
322
+ ],
323
+ illegal: /\n/,
324
+ variants: [
325
+ {
326
+ begin: "/",
327
+ end: "/[a-z]*"
328
+ },
329
+ {
330
+ begin: /%r\{/,
331
+ end: /\}[a-z]*/
332
+ },
333
+ {
334
+ begin: "%r\\(",
335
+ end: "\\)[a-z]*"
336
+ },
337
+ {
338
+ begin: "%r!",
339
+ end: "![a-z]*"
340
+ },
341
+ {
342
+ begin: "%r\\[",
343
+ end: "\\][a-z]*"
344
+ }
345
+ ]
346
+ }
347
+ ].concat(r, t),
348
+ relevance: 0
349
+ }
350
+ ].concat(r, t);
351
+ c.contains = s, _.contains = s;
352
+ const w = [
353
+ {
354
+ begin: /^\s*=>/,
355
+ starts: {
356
+ end: "$",
357
+ contains: s
358
+ }
359
+ },
360
+ {
361
+ className: "meta.prompt",
362
+ begin: "^([>?]>|[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]|(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>)(?=[ ])",
363
+ starts: {
364
+ end: "$",
365
+ keywords: n,
366
+ contains: s
367
+ }
368
+ }
369
+ ];
370
+ return t.unshift(r), {
371
+ name: "Ruby",
372
+ aliases: [
373
+ "rb",
374
+ "gemspec",
375
+ "podspec",
376
+ "thor",
377
+ "irb"
378
+ ],
379
+ keywords: n,
380
+ illegal: /\/\*/,
381
+ contains: [e.SHEBANG({ binary: "ruby" })].concat(w).concat(t).concat(s)
382
+ };
383
+ }
384
+ export {
385
+ E as default
386
+ };
@@ -0,0 +1,305 @@
1
+ function b(e) {
2
+ const n = e.regex, i = /(r#)?/, t = n.concat(i, e.UNDERSCORE_IDENT_RE), o = n.concat(i, e.IDENT_RE), l = {
3
+ className: "title.function.invoke",
4
+ relevance: 0,
5
+ begin: n.concat(
6
+ /\b/,
7
+ /(?!let|for|while|if|else|match\b)/,
8
+ o,
9
+ n.lookahead(/\s*\(/)
10
+ )
11
+ }, a = "([ui](8|16|32|64|128|size)|f(32|64))?", c = [
12
+ "abstract",
13
+ "as",
14
+ "async",
15
+ "await",
16
+ "become",
17
+ "box",
18
+ "break",
19
+ "const",
20
+ "continue",
21
+ "crate",
22
+ "do",
23
+ "dyn",
24
+ "else",
25
+ "enum",
26
+ "extern",
27
+ "false",
28
+ "final",
29
+ "fn",
30
+ "for",
31
+ "if",
32
+ "impl",
33
+ "in",
34
+ "let",
35
+ "loop",
36
+ "macro",
37
+ "match",
38
+ "mod",
39
+ "move",
40
+ "mut",
41
+ "override",
42
+ "priv",
43
+ "pub",
44
+ "ref",
45
+ "return",
46
+ "self",
47
+ "Self",
48
+ "static",
49
+ "struct",
50
+ "super",
51
+ "trait",
52
+ "true",
53
+ "try",
54
+ "type",
55
+ "typeof",
56
+ "union",
57
+ "unsafe",
58
+ "unsized",
59
+ "use",
60
+ "virtual",
61
+ "where",
62
+ "while",
63
+ "yield"
64
+ ], u = [
65
+ "true",
66
+ "false",
67
+ "Some",
68
+ "None",
69
+ "Ok",
70
+ "Err"
71
+ ], s = [
72
+ // functions
73
+ "drop ",
74
+ // traits
75
+ "Copy",
76
+ "Send",
77
+ "Sized",
78
+ "Sync",
79
+ "Drop",
80
+ "Fn",
81
+ "FnMut",
82
+ "FnOnce",
83
+ "ToOwned",
84
+ "Clone",
85
+ "Debug",
86
+ "PartialEq",
87
+ "PartialOrd",
88
+ "Eq",
89
+ "Ord",
90
+ "AsRef",
91
+ "AsMut",
92
+ "Into",
93
+ "From",
94
+ "Default",
95
+ "Iterator",
96
+ "Extend",
97
+ "IntoIterator",
98
+ "DoubleEndedIterator",
99
+ "ExactSizeIterator",
100
+ "SliceConcatExt",
101
+ "ToString",
102
+ // macros
103
+ "assert!",
104
+ "assert_eq!",
105
+ "bitflags!",
106
+ "bytes!",
107
+ "cfg!",
108
+ "col!",
109
+ "concat!",
110
+ "concat_idents!",
111
+ "debug_assert!",
112
+ "debug_assert_eq!",
113
+ "env!",
114
+ "eprintln!",
115
+ "panic!",
116
+ "file!",
117
+ "format!",
118
+ "format_args!",
119
+ "include_bytes!",
120
+ "include_str!",
121
+ "line!",
122
+ "local_data_key!",
123
+ "module_path!",
124
+ "option_env!",
125
+ "print!",
126
+ "println!",
127
+ "select!",
128
+ "stringify!",
129
+ "try!",
130
+ "unimplemented!",
131
+ "unreachable!",
132
+ "vec!",
133
+ "write!",
134
+ "writeln!",
135
+ "macro_rules!",
136
+ "assert_ne!",
137
+ "debug_assert_ne!"
138
+ ], r = [
139
+ "i8",
140
+ "i16",
141
+ "i32",
142
+ "i64",
143
+ "i128",
144
+ "isize",
145
+ "u8",
146
+ "u16",
147
+ "u32",
148
+ "u64",
149
+ "u128",
150
+ "usize",
151
+ "f32",
152
+ "f64",
153
+ "str",
154
+ "char",
155
+ "bool",
156
+ "Box",
157
+ "Option",
158
+ "Result",
159
+ "String",
160
+ "Vec"
161
+ ];
162
+ return {
163
+ name: "Rust",
164
+ aliases: ["rs"],
165
+ keywords: {
166
+ $pattern: e.IDENT_RE + "!?",
167
+ type: r,
168
+ keyword: c,
169
+ literal: u,
170
+ built_in: s
171
+ },
172
+ illegal: "</",
173
+ contains: [
174
+ e.C_LINE_COMMENT_MODE,
175
+ e.COMMENT("/\\*", "\\*/", { contains: ["self"] }),
176
+ e.inherit(e.QUOTE_STRING_MODE, {
177
+ begin: /b?"/,
178
+ illegal: null
179
+ }),
180
+ {
181
+ className: "symbol",
182
+ // negative lookahead to avoid matching `'`
183
+ begin: /'[a-zA-Z_][a-zA-Z0-9_]*(?!')/
184
+ },
185
+ {
186
+ scope: "string",
187
+ variants: [
188
+ { begin: /b?r(#*)"(.|\n)*?"\1(?!#)/ },
189
+ {
190
+ begin: /b?'/,
191
+ end: /'/,
192
+ contains: [
193
+ {
194
+ scope: "char.escape",
195
+ match: /\\('|\w|x\w{2}|u\w{4}|U\w{8})/
196
+ }
197
+ ]
198
+ }
199
+ ]
200
+ },
201
+ {
202
+ className: "number",
203
+ variants: [
204
+ { begin: "\\b0b([01_]+)" + a },
205
+ { begin: "\\b0o([0-7_]+)" + a },
206
+ { begin: "\\b0x([A-Fa-f0-9_]+)" + a },
207
+ { begin: "\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)" + a }
208
+ ],
209
+ relevance: 0
210
+ },
211
+ {
212
+ begin: [
213
+ /fn/,
214
+ /\s+/,
215
+ t
216
+ ],
217
+ className: {
218
+ 1: "keyword",
219
+ 3: "title.function"
220
+ }
221
+ },
222
+ {
223
+ className: "meta",
224
+ begin: "#!?\\[",
225
+ end: "\\]",
226
+ contains: [
227
+ {
228
+ className: "string",
229
+ begin: /"/,
230
+ end: /"/,
231
+ contains: [
232
+ e.BACKSLASH_ESCAPE
233
+ ]
234
+ }
235
+ ]
236
+ },
237
+ {
238
+ begin: [
239
+ /let/,
240
+ /\s+/,
241
+ /(?:mut\s+)?/,
242
+ t
243
+ ],
244
+ className: {
245
+ 1: "keyword",
246
+ 3: "keyword",
247
+ 4: "variable"
248
+ }
249
+ },
250
+ // must come before impl/for rule later
251
+ {
252
+ begin: [
253
+ /for/,
254
+ /\s+/,
255
+ t,
256
+ /\s+/,
257
+ /in/
258
+ ],
259
+ className: {
260
+ 1: "keyword",
261
+ 3: "variable",
262
+ 5: "keyword"
263
+ }
264
+ },
265
+ {
266
+ begin: [
267
+ /type/,
268
+ /\s+/,
269
+ t
270
+ ],
271
+ className: {
272
+ 1: "keyword",
273
+ 3: "title.class"
274
+ }
275
+ },
276
+ {
277
+ begin: [
278
+ /(?:trait|enum|struct|union|impl|for)/,
279
+ /\s+/,
280
+ t
281
+ ],
282
+ className: {
283
+ 1: "keyword",
284
+ 3: "title.class"
285
+ }
286
+ },
287
+ {
288
+ begin: e.IDENT_RE + "::",
289
+ keywords: {
290
+ keyword: "Self",
291
+ built_in: s,
292
+ type: r
293
+ }
294
+ },
295
+ {
296
+ className: "punctuation",
297
+ begin: "->"
298
+ },
299
+ l
300
+ ]
301
+ };
302
+ }
303
+ export {
304
+ b as default
305
+ };