@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,67 @@
1
+ function n(e) {
2
+ return {
3
+ name: "OCaml",
4
+ aliases: ["ml"],
5
+ keywords: {
6
+ $pattern: "[a-z_]\\w*!?",
7
+ keyword: "and as assert asr begin class constraint do done downto else end exception external for fun function functor if in include inherit! inherit initializer land lazy let lor lsl lsr lxor match method!|10 method mod module mutable new object of open! open or private rec sig struct then to try type val! val virtual when while with parser value",
8
+ built_in: (
9
+ /* built-in types */
10
+ "array bool bytes char exn|5 float int int32 int64 list lazy_t|5 nativeint|5 string unit in_channel out_channel ref"
11
+ ),
12
+ literal: "true false"
13
+ },
14
+ illegal: /\/\/|>>/,
15
+ contains: [
16
+ {
17
+ className: "literal",
18
+ begin: "\\[(\\|\\|)?\\]|\\(\\)",
19
+ relevance: 0
20
+ },
21
+ e.COMMENT(
22
+ "\\(\\*",
23
+ "\\*\\)",
24
+ { contains: ["self"] }
25
+ ),
26
+ {
27
+ /* type variable */
28
+ className: "symbol",
29
+ begin: "'[A-Za-z_](?!')[\\w']*"
30
+ /* the grammar is ambiguous on how 'a'b should be interpreted but not the compiler */
31
+ },
32
+ {
33
+ /* polymorphic variant */
34
+ className: "type",
35
+ begin: "`[A-Z][\\w']*"
36
+ },
37
+ {
38
+ /* module or constructor */
39
+ className: "type",
40
+ begin: "\\b[A-Z][\\w']*",
41
+ relevance: 0
42
+ },
43
+ {
44
+ /* don't color identifiers, but safely catch all identifiers with ' */
45
+ begin: "[a-z_]\\w*'[\\w']*",
46
+ relevance: 0
47
+ },
48
+ e.inherit(e.APOS_STRING_MODE, {
49
+ className: "string",
50
+ relevance: 0
51
+ }),
52
+ e.inherit(e.QUOTE_STRING_MODE, { illegal: null }),
53
+ {
54
+ className: "number",
55
+ begin: "\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",
56
+ relevance: 0
57
+ },
58
+ {
59
+ begin: /->/
60
+ // relevance booster
61
+ }
62
+ ]
63
+ };
64
+ }
65
+ export {
66
+ n as default
67
+ };
@@ -0,0 +1,566 @@
1
+ function k(e) {
2
+ const t = e.regex, d = /(?![A-Za-z0-9])(?![$])/, o = t.concat(
3
+ /[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,
4
+ d
5
+ ), n = t.concat(
6
+ /(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,
7
+ d
8
+ ), h = t.concat(
9
+ /[A-Z]+/,
10
+ d
11
+ ), _ = {
12
+ scope: "variable",
13
+ match: "\\$+" + o
14
+ }, S = {
15
+ scope: "meta",
16
+ variants: [
17
+ { begin: /<\?php/, relevance: 10 },
18
+ // boost for obvious PHP
19
+ { begin: /<\?=/ },
20
+ // less relevant per PSR-1 which says not to use short-tags
21
+ { begin: /<\?/, relevance: 0.1 },
22
+ { begin: /\?>/ }
23
+ // end php tag
24
+ ]
25
+ }, f = {
26
+ scope: "subst",
27
+ variants: [
28
+ { begin: /\$\w+/ },
29
+ {
30
+ begin: /\{\$/,
31
+ end: /\}/
32
+ }
33
+ ]
34
+ }, C = e.inherit(e.APOS_STRING_MODE, { illegal: null }), T = e.inherit(e.QUOTE_STRING_MODE, {
35
+ illegal: null,
36
+ contains: e.QUOTE_STRING_MODE.contains.concat(f)
37
+ }), A = {
38
+ begin: /<<<[ \t]*(?:(\w+)|"(\w+)")\n/,
39
+ end: /[ \t]*(\w+)\b/,
40
+ contains: e.QUOTE_STRING_MODE.contains.concat(f),
41
+ "on:begin": (r, a) => {
42
+ a.data._beginMatch = r[1] || r[2];
43
+ },
44
+ "on:end": (r, a) => {
45
+ a.data._beginMatch !== r[1] && a.ignoreMatch();
46
+ }
47
+ }, R = e.END_SAME_AS_BEGIN({
48
+ begin: /<<<[ \t]*'(\w+)'\n/,
49
+ end: /[ \t]*(\w+)\b/
50
+ }), m = `[
51
+ ]`, i = {
52
+ scope: "string",
53
+ variants: [
54
+ T,
55
+ C,
56
+ A,
57
+ R
58
+ ]
59
+ }, s = {
60
+ scope: "number",
61
+ variants: [
62
+ { begin: "\\b0[bB][01]+(?:_[01]+)*\\b" },
63
+ // Binary w/ underscore support
64
+ { begin: "\\b0[oO][0-7]+(?:_[0-7]+)*\\b" },
65
+ // Octals w/ underscore support
66
+ { begin: "\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b" },
67
+ // Hex w/ underscore support
68
+ // Decimals w/ underscore support, with optional fragments and scientific exponent (e) suffix.
69
+ { begin: "(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?" }
70
+ ],
71
+ relevance: 0
72
+ }, p = [
73
+ "false",
74
+ "null",
75
+ "true"
76
+ ], I = [
77
+ // Magic constants:
78
+ // <https://www.php.net/manual/en/language.constants.predefined.php>
79
+ "__CLASS__",
80
+ "__DIR__",
81
+ "__FILE__",
82
+ "__FUNCTION__",
83
+ "__COMPILER_HALT_OFFSET__",
84
+ "__LINE__",
85
+ "__METHOD__",
86
+ "__NAMESPACE__",
87
+ "__TRAIT__",
88
+ // Function that look like language construct or language construct that look like function:
89
+ // List of keywords that may not require parenthesis
90
+ "die",
91
+ "echo",
92
+ "exit",
93
+ "include",
94
+ "include_once",
95
+ "print",
96
+ "require",
97
+ "require_once",
98
+ // These are not language construct (function) but operate on the currently-executing function and can access the current symbol table
99
+ // 'compact extract func_get_arg func_get_args func_num_args get_called_class get_parent_class ' +
100
+ // Other keywords:
101
+ // <https://www.php.net/manual/en/reserved.php>
102
+ // <https://www.php.net/manual/en/language.types.type-juggling.php>
103
+ "array",
104
+ "abstract",
105
+ "and",
106
+ "as",
107
+ "binary",
108
+ "bool",
109
+ "boolean",
110
+ "break",
111
+ "callable",
112
+ "case",
113
+ "catch",
114
+ "class",
115
+ "clone",
116
+ "const",
117
+ "continue",
118
+ "declare",
119
+ "default",
120
+ "do",
121
+ "double",
122
+ "else",
123
+ "elseif",
124
+ "empty",
125
+ "enddeclare",
126
+ "endfor",
127
+ "endforeach",
128
+ "endif",
129
+ "endswitch",
130
+ "endwhile",
131
+ "enum",
132
+ "eval",
133
+ "extends",
134
+ "final",
135
+ "finally",
136
+ "float",
137
+ "for",
138
+ "foreach",
139
+ "from",
140
+ "global",
141
+ "goto",
142
+ "if",
143
+ "implements",
144
+ "instanceof",
145
+ "insteadof",
146
+ "int",
147
+ "integer",
148
+ "interface",
149
+ "isset",
150
+ "iterable",
151
+ "list",
152
+ "match|0",
153
+ "mixed",
154
+ "new",
155
+ "never",
156
+ "object",
157
+ "or",
158
+ "private",
159
+ "protected",
160
+ "public",
161
+ "readonly",
162
+ "real",
163
+ "return",
164
+ "string",
165
+ "switch",
166
+ "throw",
167
+ "trait",
168
+ "try",
169
+ "unset",
170
+ "use",
171
+ "var",
172
+ "void",
173
+ "while",
174
+ "xor",
175
+ "yield"
176
+ ], b = [
177
+ // Standard PHP library:
178
+ // <https://www.php.net/manual/en/book.spl.php>
179
+ "Error|0",
180
+ "AppendIterator",
181
+ "ArgumentCountError",
182
+ "ArithmeticError",
183
+ "ArrayIterator",
184
+ "ArrayObject",
185
+ "AssertionError",
186
+ "BadFunctionCallException",
187
+ "BadMethodCallException",
188
+ "CachingIterator",
189
+ "CallbackFilterIterator",
190
+ "CompileError",
191
+ "Countable",
192
+ "DirectoryIterator",
193
+ "DivisionByZeroError",
194
+ "DomainException",
195
+ "EmptyIterator",
196
+ "ErrorException",
197
+ "Exception",
198
+ "FilesystemIterator",
199
+ "FilterIterator",
200
+ "GlobIterator",
201
+ "InfiniteIterator",
202
+ "InvalidArgumentException",
203
+ "IteratorIterator",
204
+ "LengthException",
205
+ "LimitIterator",
206
+ "LogicException",
207
+ "MultipleIterator",
208
+ "NoRewindIterator",
209
+ "OutOfBoundsException",
210
+ "OutOfRangeException",
211
+ "OuterIterator",
212
+ "OverflowException",
213
+ "ParentIterator",
214
+ "ParseError",
215
+ "RangeException",
216
+ "RecursiveArrayIterator",
217
+ "RecursiveCachingIterator",
218
+ "RecursiveCallbackFilterIterator",
219
+ "RecursiveDirectoryIterator",
220
+ "RecursiveFilterIterator",
221
+ "RecursiveIterator",
222
+ "RecursiveIteratorIterator",
223
+ "RecursiveRegexIterator",
224
+ "RecursiveTreeIterator",
225
+ "RegexIterator",
226
+ "RuntimeException",
227
+ "SeekableIterator",
228
+ "SplDoublyLinkedList",
229
+ "SplFileInfo",
230
+ "SplFileObject",
231
+ "SplFixedArray",
232
+ "SplHeap",
233
+ "SplMaxHeap",
234
+ "SplMinHeap",
235
+ "SplObjectStorage",
236
+ "SplObserver",
237
+ "SplPriorityQueue",
238
+ "SplQueue",
239
+ "SplStack",
240
+ "SplSubject",
241
+ "SplTempFileObject",
242
+ "TypeError",
243
+ "UnderflowException",
244
+ "UnexpectedValueException",
245
+ "UnhandledMatchError",
246
+ // Reserved interfaces:
247
+ // <https://www.php.net/manual/en/reserved.interfaces.php>
248
+ "ArrayAccess",
249
+ "BackedEnum",
250
+ "Closure",
251
+ "Fiber",
252
+ "Generator",
253
+ "Iterator",
254
+ "IteratorAggregate",
255
+ "Serializable",
256
+ "Stringable",
257
+ "Throwable",
258
+ "Traversable",
259
+ "UnitEnum",
260
+ "WeakReference",
261
+ "WeakMap",
262
+ // Reserved classes:
263
+ // <https://www.php.net/manual/en/reserved.classes.php>
264
+ "Directory",
265
+ "__PHP_Incomplete_Class",
266
+ "parent",
267
+ "php_user_filter",
268
+ "self",
269
+ "static",
270
+ "stdClass"
271
+ ], u = {
272
+ keyword: I,
273
+ literal: ((r) => {
274
+ const a = [];
275
+ return r.forEach((c) => {
276
+ a.push(c), c.toLowerCase() === c ? a.push(c.toUpperCase()) : a.push(c.toLowerCase());
277
+ }), a;
278
+ })(p),
279
+ built_in: b
280
+ }, E = (r) => r.map((a) => a.replace(/\|\d+$/, "")), g = { variants: [
281
+ {
282
+ match: [
283
+ /new/,
284
+ t.concat(m, "+"),
285
+ // to prevent built ins from being confused as the class constructor call
286
+ t.concat("(?!", E(b).join("\\b|"), "\\b)"),
287
+ n
288
+ ],
289
+ scope: {
290
+ 1: "keyword",
291
+ 4: "title.class"
292
+ }
293
+ }
294
+ ] }, O = t.concat(o, "\\b(?!\\()"), l = { variants: [
295
+ {
296
+ match: [
297
+ t.concat(
298
+ /::/,
299
+ t.lookahead(/(?!class\b)/)
300
+ ),
301
+ O
302
+ ],
303
+ scope: { 2: "variable.constant" }
304
+ },
305
+ {
306
+ match: [
307
+ /::/,
308
+ /class/
309
+ ],
310
+ scope: { 2: "variable.language" }
311
+ },
312
+ {
313
+ match: [
314
+ n,
315
+ t.concat(
316
+ /::/,
317
+ t.lookahead(/(?!class\b)/)
318
+ ),
319
+ O
320
+ ],
321
+ scope: {
322
+ 1: "title.class",
323
+ 3: "variable.constant"
324
+ }
325
+ },
326
+ {
327
+ match: [
328
+ n,
329
+ t.concat(
330
+ "::",
331
+ t.lookahead(/(?!class\b)/)
332
+ )
333
+ ],
334
+ scope: { 1: "title.class" }
335
+ },
336
+ {
337
+ match: [
338
+ n,
339
+ /::/,
340
+ /class/
341
+ ],
342
+ scope: {
343
+ 1: "title.class",
344
+ 3: "variable.language"
345
+ }
346
+ }
347
+ ] }, v = {
348
+ scope: "attr",
349
+ match: t.concat(o, t.lookahead(":"), t.lookahead(/(?!::)/))
350
+ }, y = {
351
+ relevance: 0,
352
+ begin: /\(/,
353
+ end: /\)/,
354
+ keywords: u,
355
+ contains: [
356
+ v,
357
+ _,
358
+ l,
359
+ e.C_BLOCK_COMMENT_MODE,
360
+ i,
361
+ s,
362
+ g
363
+ ]
364
+ }, w = {
365
+ relevance: 0,
366
+ match: [
367
+ /\b/,
368
+ // to prevent keywords from being confused as the function title
369
+ t.concat("(?!fn\\b|function\\b|", E(I).join("\\b|"), "|", E(b).join("\\b|"), "\\b)"),
370
+ o,
371
+ t.concat(m, "*"),
372
+ t.lookahead(/(?=\()/)
373
+ ],
374
+ scope: { 3: "title.function.invoke" },
375
+ contains: [y]
376
+ };
377
+ y.contains.push(w);
378
+ const x = [
379
+ v,
380
+ l,
381
+ e.C_BLOCK_COMMENT_MODE,
382
+ i,
383
+ s,
384
+ g
385
+ ], M = {
386
+ begin: t.concat(
387
+ /#\[\s*\\?/,
388
+ t.either(
389
+ n,
390
+ h
391
+ )
392
+ ),
393
+ beginScope: "meta",
394
+ end: /]/,
395
+ endScope: "meta",
396
+ keywords: {
397
+ literal: p,
398
+ keyword: [
399
+ "new",
400
+ "array"
401
+ ]
402
+ },
403
+ contains: [
404
+ {
405
+ begin: /\[/,
406
+ end: /]/,
407
+ keywords: {
408
+ literal: p,
409
+ keyword: [
410
+ "new",
411
+ "array"
412
+ ]
413
+ },
414
+ contains: [
415
+ "self",
416
+ ...x
417
+ ]
418
+ },
419
+ ...x,
420
+ {
421
+ scope: "meta",
422
+ variants: [
423
+ { match: n },
424
+ { match: h }
425
+ ]
426
+ }
427
+ ]
428
+ };
429
+ return {
430
+ case_insensitive: !1,
431
+ keywords: u,
432
+ contains: [
433
+ M,
434
+ e.HASH_COMMENT_MODE,
435
+ e.COMMENT("//", "$"),
436
+ e.COMMENT(
437
+ "/\\*",
438
+ "\\*/",
439
+ { contains: [
440
+ {
441
+ scope: "doctag",
442
+ match: "@[A-Za-z]+"
443
+ }
444
+ ] }
445
+ ),
446
+ {
447
+ match: /__halt_compiler\(\);/,
448
+ keywords: "__halt_compiler",
449
+ starts: {
450
+ scope: "comment",
451
+ end: e.MATCH_NOTHING_RE,
452
+ contains: [
453
+ {
454
+ match: /\?>/,
455
+ scope: "meta",
456
+ endsParent: !0
457
+ }
458
+ ]
459
+ }
460
+ },
461
+ S,
462
+ {
463
+ scope: "variable.language",
464
+ match: /\$this\b/
465
+ },
466
+ _,
467
+ w,
468
+ l,
469
+ {
470
+ match: [
471
+ /const/,
472
+ /\s/,
473
+ o
474
+ ],
475
+ scope: {
476
+ 1: "keyword",
477
+ 3: "variable.constant"
478
+ }
479
+ },
480
+ g,
481
+ {
482
+ scope: "function",
483
+ relevance: 0,
484
+ beginKeywords: "fn function",
485
+ end: /[;{]/,
486
+ excludeEnd: !0,
487
+ illegal: "[$%\\[]",
488
+ contains: [
489
+ { beginKeywords: "use" },
490
+ e.UNDERSCORE_TITLE_MODE,
491
+ {
492
+ begin: "=>",
493
+ // No markup, just a relevance booster
494
+ endsParent: !0
495
+ },
496
+ {
497
+ scope: "params",
498
+ begin: "\\(",
499
+ end: "\\)",
500
+ excludeBegin: !0,
501
+ excludeEnd: !0,
502
+ keywords: u,
503
+ contains: [
504
+ "self",
505
+ M,
506
+ _,
507
+ l,
508
+ e.C_BLOCK_COMMENT_MODE,
509
+ i,
510
+ s
511
+ ]
512
+ }
513
+ ]
514
+ },
515
+ {
516
+ scope: "class",
517
+ variants: [
518
+ {
519
+ beginKeywords: "enum",
520
+ illegal: /[($"]/
521
+ },
522
+ {
523
+ beginKeywords: "class interface trait",
524
+ illegal: /[:($"]/
525
+ }
526
+ ],
527
+ relevance: 0,
528
+ end: /\{/,
529
+ excludeEnd: !0,
530
+ contains: [
531
+ { beginKeywords: "extends implements" },
532
+ e.UNDERSCORE_TITLE_MODE
533
+ ]
534
+ },
535
+ // both use and namespace still use "old style" rules (vs multi-match)
536
+ // because the namespace name can include `\` and we still want each
537
+ // element to be treated as its own *individual* title
538
+ {
539
+ beginKeywords: "namespace",
540
+ relevance: 0,
541
+ end: ";",
542
+ illegal: /[.']/,
543
+ contains: [e.inherit(e.UNDERSCORE_TITLE_MODE, { scope: "title.class" })]
544
+ },
545
+ {
546
+ beginKeywords: "use",
547
+ relevance: 0,
548
+ end: ";",
549
+ contains: [
550
+ // TODO: title.function vs title.class
551
+ {
552
+ match: /\b(as|const|function)\b/,
553
+ scope: "keyword"
554
+ },
555
+ // TODO: could be title.class or title.function
556
+ e.UNDERSCORE_TITLE_MODE
557
+ ]
558
+ },
559
+ i,
560
+ s
561
+ ]
562
+ };
563
+ }
564
+ export {
565
+ k as default
566
+ };