@apiuikit/web-component 1.3.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 +25 -5
  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 +20617 -20262
  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,21 @@
1
+ import { j as r } from "./registerElement-DAVqIcyy.js";
2
+ function t({ className: e }) {
3
+ return /* @__PURE__ */ r.jsx("svg", { className: e, viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ r.jsx("path", { d: "M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 110-4.124 2.062 2.062 0 010 4.124zM7.119 20.452H3.554V9h3.565v11.452z" }) });
4
+ }
5
+ function a({ value: e }) {
6
+ return typeof e != "string" || !/^https?:\/\//i.test(e) ? null : /* @__PURE__ */ r.jsx(
7
+ "a",
8
+ {
9
+ href: e,
10
+ target: "_blank",
11
+ rel: "noreferrer noopener",
12
+ "aria-label": "LinkedIn",
13
+ title: "LinkedIn",
14
+ className: "inline-flex items-center justify-center text-foreground-muted hover:text-foreground",
15
+ children: /* @__PURE__ */ r.jsx(t, { className: "h-4 w-4" })
16
+ }
17
+ );
18
+ }
19
+ export {
20
+ a as default
21
+ };
@@ -0,0 +1,16 @@
1
+ import { w as l, j as r } from "./registerElement-DAVqIcyy.js";
2
+ function n({ value: a }) {
3
+ const o = l(a);
4
+ return o ? /* @__PURE__ */ r.jsx(
5
+ "img",
6
+ {
7
+ src: o.url,
8
+ alt: o.altText ?? "logo",
9
+ style: o.backgroundColor ? { backgroundColor: o.backgroundColor } : void 0,
10
+ className: "max-h-24 max-w-24 object-contain"
11
+ }
12
+ ) : null;
13
+ }
14
+ export {
15
+ n as default
16
+ };
@@ -0,0 +1,23 @@
1
+ import { j as r } from "./registerElement-DAVqIcyy.js";
2
+ function l({ className: e }) {
3
+ return /* @__PURE__ */ r.jsx("svg", { className: e, viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ r.jsx("path", { d: "M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" }) });
4
+ }
5
+ function s({ value: e }) {
6
+ if (typeof e != "string" || !e) return null;
7
+ const t = e.replace(/^@/, ""), n = `@${t} on X`;
8
+ return /* @__PURE__ */ r.jsx(
9
+ "a",
10
+ {
11
+ href: `https://x.com/${t}`,
12
+ target: "_blank",
13
+ rel: "noreferrer noopener",
14
+ "aria-label": n,
15
+ title: n,
16
+ className: "inline-flex items-center justify-center text-foreground-muted hover:text-foreground",
17
+ children: /* @__PURE__ */ r.jsx(l, { className: "h-4 w-4" })
18
+ }
19
+ );
20
+ }
21
+ export {
22
+ s as default
23
+ };
@@ -0,0 +1,277 @@
1
+ function g(e) {
2
+ const s = e.regex, n = e.COMMENT("//", "$", { contains: [{ begin: /\\\n/ }] }), d = "decltype\\(auto\\)", l = "[a-zA-Z_]\\w*::", _ = "(" + d + "|" + s.optional(l) + "[a-zA-Z_]\\w*" + s.optional("<[^<>]+>") + ")", r = {
3
+ className: "type",
4
+ variants: [
5
+ { begin: "\\b[a-z\\d_]*_t\\b" },
6
+ { match: /\batomic_[a-z]{3,6}\b/ }
7
+ ]
8
+ }, a = {
9
+ className: "string",
10
+ variants: [
11
+ {
12
+ begin: '(u8?|U|L)?"',
13
+ end: '"',
14
+ illegal: "\\n",
15
+ contains: [e.BACKSLASH_ESCAPE]
16
+ },
17
+ {
18
+ begin: "(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",
19
+ end: "'",
20
+ illegal: "."
21
+ },
22
+ e.END_SAME_AS_BEGIN({
23
+ begin: /(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,
24
+ end: /\)([^()\\ ]{0,16})"/
25
+ })
26
+ ]
27
+ }, o = {
28
+ className: "number",
29
+ variants: [
30
+ { match: /\b(0b[01']+)/ },
31
+ { match: /(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/ },
32
+ { match: /(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/ },
33
+ { match: /(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/ }
34
+ ],
35
+ relevance: 0
36
+ }, i = {
37
+ className: "meta",
38
+ begin: /#\s*[a-z]+\b/,
39
+ end: /$/,
40
+ keywords: { keyword: "if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include" },
41
+ contains: [
42
+ {
43
+ begin: /\\\n/,
44
+ relevance: 0
45
+ },
46
+ e.inherit(a, { className: "string" }),
47
+ {
48
+ className: "string",
49
+ begin: /<.*?>/
50
+ },
51
+ n,
52
+ e.C_BLOCK_COMMENT_MODE
53
+ ]
54
+ }, m = {
55
+ className: "title",
56
+ begin: s.optional(l) + e.IDENT_RE,
57
+ relevance: 0
58
+ }, u = s.optional(l) + e.IDENT_RE + "\\s*\\(", t = {
59
+ keyword: [
60
+ "asm",
61
+ "auto",
62
+ "break",
63
+ "case",
64
+ "continue",
65
+ "default",
66
+ "do",
67
+ "else",
68
+ "enum",
69
+ "extern",
70
+ "for",
71
+ "fortran",
72
+ "goto",
73
+ "if",
74
+ "inline",
75
+ "register",
76
+ "restrict",
77
+ "return",
78
+ "sizeof",
79
+ "typeof",
80
+ "typeof_unqual",
81
+ "struct",
82
+ "switch",
83
+ "typedef",
84
+ "union",
85
+ "volatile",
86
+ "while",
87
+ "_Alignas",
88
+ "_Alignof",
89
+ "_Atomic",
90
+ "_Generic",
91
+ "_Noreturn",
92
+ "_Static_assert",
93
+ "_Thread_local",
94
+ // aliases
95
+ "alignas",
96
+ "alignof",
97
+ "noreturn",
98
+ "static_assert",
99
+ "thread_local",
100
+ // not a C keyword but is, for all intents and purposes, treated exactly like one.
101
+ "_Pragma"
102
+ ],
103
+ type: [
104
+ "float",
105
+ "double",
106
+ "signed",
107
+ "unsigned",
108
+ "int",
109
+ "short",
110
+ "long",
111
+ "char",
112
+ "void",
113
+ "_Bool",
114
+ "_BitInt",
115
+ "_Complex",
116
+ "_Imaginary",
117
+ "_Decimal32",
118
+ "_Decimal64",
119
+ "_Decimal96",
120
+ "_Decimal128",
121
+ "_Decimal64x",
122
+ "_Decimal128x",
123
+ "_Float16",
124
+ "_Float32",
125
+ "_Float64",
126
+ "_Float128",
127
+ "_Float32x",
128
+ "_Float64x",
129
+ "_Float128x",
130
+ // modifiers
131
+ "const",
132
+ "static",
133
+ "constexpr",
134
+ // aliases
135
+ "complex",
136
+ "bool",
137
+ "imaginary"
138
+ ],
139
+ literal: "true false NULL",
140
+ // TODO: apply hinting work similar to what was done in cpp.js
141
+ built_in: "std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"
142
+ }, c = [
143
+ i,
144
+ r,
145
+ n,
146
+ e.C_BLOCK_COMMENT_MODE,
147
+ o,
148
+ a
149
+ ], p = {
150
+ // This mode covers expression context where we can't expect a function
151
+ // definition and shouldn't highlight anything that looks like one:
152
+ // `return some()`, `else if()`, `(x*sum(1, 2))`
153
+ variants: [
154
+ {
155
+ begin: /=/,
156
+ end: /;/
157
+ },
158
+ {
159
+ begin: /\(/,
160
+ end: /\)/
161
+ },
162
+ {
163
+ beginKeywords: "new throw return else",
164
+ end: /;/
165
+ }
166
+ ],
167
+ keywords: t,
168
+ contains: c.concat([
169
+ {
170
+ begin: /\(/,
171
+ end: /\)/,
172
+ keywords: t,
173
+ contains: c.concat(["self"]),
174
+ relevance: 0
175
+ }
176
+ ]),
177
+ relevance: 0
178
+ }, f = {
179
+ begin: "(" + _ + "[\\*&\\s]+)+" + u,
180
+ returnBegin: !0,
181
+ end: /[{;=]/,
182
+ excludeEnd: !0,
183
+ keywords: t,
184
+ illegal: /[^\w\s\*&:<>.]/,
185
+ contains: [
186
+ {
187
+ // to prevent it from being confused as the function title
188
+ begin: d,
189
+ keywords: t,
190
+ relevance: 0
191
+ },
192
+ {
193
+ begin: u,
194
+ returnBegin: !0,
195
+ contains: [e.inherit(m, { className: "title.function" })],
196
+ relevance: 0
197
+ },
198
+ // allow for multiple declarations, e.g.:
199
+ // extern void f(int), g(char);
200
+ {
201
+ relevance: 0,
202
+ match: /,/
203
+ },
204
+ {
205
+ className: "params",
206
+ begin: /\(/,
207
+ end: /\)/,
208
+ keywords: t,
209
+ relevance: 0,
210
+ contains: [
211
+ n,
212
+ e.C_BLOCK_COMMENT_MODE,
213
+ a,
214
+ o,
215
+ r,
216
+ // Count matching parentheses.
217
+ {
218
+ begin: /\(/,
219
+ end: /\)/,
220
+ keywords: t,
221
+ relevance: 0,
222
+ contains: [
223
+ "self",
224
+ n,
225
+ e.C_BLOCK_COMMENT_MODE,
226
+ a,
227
+ o,
228
+ r
229
+ ]
230
+ }
231
+ ]
232
+ },
233
+ r,
234
+ n,
235
+ e.C_BLOCK_COMMENT_MODE,
236
+ i
237
+ ]
238
+ };
239
+ return {
240
+ name: "C",
241
+ aliases: ["h"],
242
+ keywords: t,
243
+ // Until differentiations are added between `c` and `cpp`, `c` will
244
+ // not be auto-detected to avoid auto-detect conflicts between C and C++
245
+ disableAutodetect: !0,
246
+ illegal: "</",
247
+ contains: [].concat(
248
+ p,
249
+ f,
250
+ c,
251
+ [
252
+ i,
253
+ {
254
+ begin: e.IDENT_RE + "::",
255
+ keywords: t
256
+ },
257
+ {
258
+ className: "class",
259
+ beginKeywords: "enum class struct union",
260
+ end: /[{;:<>=]/,
261
+ contains: [
262
+ { beginKeywords: "final class struct" },
263
+ e.TITLE_MODE
264
+ ]
265
+ }
266
+ ]
267
+ ),
268
+ exports: {
269
+ preprocessor: i,
270
+ strings: a,
271
+ keywords: t
272
+ }
273
+ };
274
+ }
275
+ export {
276
+ g as default
277
+ };
@@ -0,0 +1,135 @@
1
+ function k(t) {
2
+ const c = "a-zA-Z_\\-!.?+*=<>&'", e = "[#]?[" + c + "][" + c + "0-9/;:$#]*", n = "def defonce defprotocol defstruct defmulti defmethod defn- defn defmacro deftype defrecord", y = {
3
+ $pattern: e,
4
+ built_in: (
5
+ // Clojure keywords
6
+ n + " cond apply if-not if-let if not not= =|0 <|0 >|0 <=|0 >=|0 ==|0 +|0 /|0 *|0 -|0 rem quot neg? pos? delay? symbol? keyword? true? false? integer? empty? coll? list? set? ifn? fn? associative? sequential? sorted? counted? reversible? number? decimal? class? distinct? isa? float? rational? reduced? ratio? odd? even? char? seq? vector? string? map? nil? contains? zero? instance? not-every? not-any? libspec? -> ->> .. . inc compare do dotimes mapcat take remove take-while drop letfn drop-last take-last drop-while while intern condp case reduced cycle split-at split-with repeat replicate iterate range merge zipmap declare line-seq sort comparator sort-by dorun doall nthnext nthrest partition eval doseq await await-for let agent atom send send-off release-pending-sends add-watch mapv filterv remove-watch agent-error restart-agent set-error-handler error-handler set-error-mode! error-mode shutdown-agents quote var fn loop recur throw try monitor-enter monitor-exit macroexpand macroexpand-1 for dosync and or when when-not when-let comp juxt partial sequence memoize constantly complement identity assert peek pop doto proxy first rest cons cast coll last butlast sigs reify second ffirst fnext nfirst nnext meta with-meta ns in-ns create-ns import refer keys select-keys vals key val rseq name namespace promise into transient persistent! conj! assoc! dissoc! pop! disj! use class type num float double short byte boolean bigint biginteger bigdec print-method print-dup throw-if printf format load compile get-in update-in pr pr-on newline flush read slurp read-line subvec with-open memfn time re-find re-groups rand-int rand mod locking assert-valid-fdecl alias resolve ref deref refset swap! reset! set-validator! compare-and-set! alter-meta! reset-meta! commute get-validator alter ref-set ref-history-count ref-min-history ref-max-history ensure sync io! new next conj set! to-array future future-call into-array aset gen-class reduce map filter find empty hash-map hash-set sorted-map sorted-map-by sorted-set sorted-set-by vec vector seq flatten reverse assoc dissoc list disj get union difference intersection extend extend-type extend-protocol int nth delay count concat chunk chunk-buffer chunk-append chunk-first chunk-rest max min dec unchecked-inc-int unchecked-inc unchecked-dec-inc unchecked-dec unchecked-negate unchecked-add-int unchecked-add unchecked-subtract-int unchecked-subtract chunk-next chunk-cons chunked-seq? prn vary-meta lazy-seq spread list* str find-keyword keyword symbol gensym force rationalize"
7
+ )
8
+ }, b = {
9
+ begin: e,
10
+ relevance: 0
11
+ }, i = {
12
+ scope: "number",
13
+ relevance: 0,
14
+ variants: [
15
+ { match: /[-+]?0[xX][0-9a-fA-F]+N?/ },
16
+ // hexadecimal // 0x2a
17
+ { match: /[-+]?0[0-7]+N?/ },
18
+ // octal // 052
19
+ { match: /[-+]?[1-9][0-9]?[rR][0-9a-zA-Z]+N?/ },
20
+ // variable radix from 2 to 36 // 2r101010, 8r52, 36r16
21
+ { match: /[-+]?[0-9]+\/[0-9]+N?/ },
22
+ // ratio // 1/2
23
+ { match: /[-+]?[0-9]+((\.[0-9]*([eE][+-]?[0-9]+)?M?)|([eE][+-]?[0-9]+M?|M))/ },
24
+ // float // 0.42 4.2E-1M 42E1 42M
25
+ { match: /[-+]?([1-9][0-9]*|0)N?/ }
26
+ // int (don't match leading 0) // 42 42N
27
+ ]
28
+ }, d = {
29
+ scope: "character",
30
+ variants: [
31
+ { match: /\\o[0-3]?[0-7]{1,2}/ },
32
+ // Unicode Octal 0 - 377
33
+ { match: /\\u[0-9a-fA-F]{4}/ },
34
+ // Unicode Hex 0000 - FFFF
35
+ { match: /\\(newline|space|tab|formfeed|backspace|return)/ },
36
+ // special characters
37
+ {
38
+ match: /\\\S/,
39
+ relevance: 0
40
+ }
41
+ // any non-whitespace char
42
+ ]
43
+ }, l = {
44
+ scope: "regex",
45
+ begin: /#"/,
46
+ end: /"/,
47
+ contains: [t.BACKSLASH_ESCAPE]
48
+ }, m = t.inherit(t.QUOTE_STRING_MODE, { illegal: null }), p = {
49
+ scope: "punctuation",
50
+ match: /,/,
51
+ relevance: 0
52
+ }, u = t.COMMENT(
53
+ ";",
54
+ "$",
55
+ { relevance: 0 }
56
+ ), f = {
57
+ className: "literal",
58
+ begin: /\b(true|false|nil)\b/
59
+ }, a = {
60
+ begin: "\\[|(#::?" + e + ")?\\{",
61
+ end: "[\\]\\}]",
62
+ relevance: 0
63
+ }, h = {
64
+ className: "symbol",
65
+ begin: "[:]{1,2}" + e
66
+ }, r = {
67
+ begin: "\\(",
68
+ end: "\\)"
69
+ }, s = {
70
+ endsWithParent: !0,
71
+ relevance: 0
72
+ }, g = {
73
+ keywords: y,
74
+ className: "name",
75
+ begin: e,
76
+ relevance: 0,
77
+ starts: s
78
+ }, o = [
79
+ p,
80
+ r,
81
+ d,
82
+ l,
83
+ m,
84
+ u,
85
+ h,
86
+ a,
87
+ i,
88
+ f,
89
+ b
90
+ ], v = {
91
+ beginKeywords: n,
92
+ keywords: {
93
+ $pattern: e,
94
+ keyword: n
95
+ },
96
+ end: '(\\[|#|\\d|"|:|\\{|\\)|\\(|$)',
97
+ contains: [
98
+ {
99
+ className: "title",
100
+ begin: e,
101
+ relevance: 0,
102
+ excludeEnd: !0,
103
+ // we can only have a single title
104
+ endsParent: !0
105
+ }
106
+ ].concat(o)
107
+ };
108
+ return r.contains = [
109
+ v,
110
+ g,
111
+ s
112
+ ], s.contains = o, a.contains = o, {
113
+ name: "Clojure",
114
+ aliases: [
115
+ "clj",
116
+ "edn"
117
+ ],
118
+ illegal: /\S/,
119
+ contains: [
120
+ p,
121
+ r,
122
+ d,
123
+ l,
124
+ m,
125
+ u,
126
+ h,
127
+ a,
128
+ i,
129
+ f
130
+ ]
131
+ };
132
+ }
133
+ export {
134
+ k as default
135
+ };