apiuikit 0.5.0 → 1.0.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 (133) hide show
  1. package/README.md +47 -6
  2. package/dist/apiuikit.cjs.js +1 -1
  3. package/dist/apiuikit.css +1 -1
  4. package/dist/apiuikit.es.js +24 -17
  5. package/dist/c-Bz1-FJiA.js +277 -0
  6. package/dist/c-C_Sx7N-F.cjs +1 -0
  7. package/dist/clojure-DWYEZwCD.cjs +1 -0
  8. package/dist/clojure-aY2138WD.js +135 -0
  9. package/dist/components/Authorization.d.ts +28 -17
  10. package/dist/components/ChannelAddress.d.ts +17 -3
  11. package/dist/components/CodeBlock.d.ts +4 -1
  12. package/dist/components/CodeSamples.d.ts +12 -0
  13. package/dist/components/CollapsiblePanel.d.ts +24 -0
  14. package/dist/components/CopyMarkdownButton.d.ts +15 -0
  15. package/dist/components/Examples.d.ts +4 -2
  16. package/dist/components/InfoMetadata.d.ts +15 -2
  17. package/dist/components/Markdown.d.ts +2 -0
  18. package/dist/components/MarkdownExportMenu.d.ts +13 -0
  19. package/dist/components/MethodBadge.d.ts +14 -0
  20. package/dist/components/Navigation/AsyncAPINavigation.d.ts +28 -0
  21. package/dist/components/Navigation/Navigation.d.ts +58 -0
  22. package/dist/components/Navigation/OpenAPINavigation.d.ts +22 -0
  23. package/dist/components/Navigation/SpecNavigation.d.ts +25 -0
  24. package/dist/components/Navigation/index.d.ts +4 -0
  25. package/dist/components/Navigation/sharedSections.d.ts +10 -0
  26. package/dist/components/Navigation/spineTicks.d.ts +28 -0
  27. package/dist/components/Navigation/tests/spineTicks.test.d.ts +1 -0
  28. package/dist/components/RenderExtensions.d.ts +14 -1
  29. package/dist/components/Section.d.ts +3 -1
  30. package/dist/components/ServerAddressBanner.d.ts +16 -0
  31. package/dist/components/SidePanel.d.ts +2 -0
  32. package/dist/components/Tabs.d.ts +3 -1
  33. package/dist/components/schema/SchemaTab.d.ts +19 -3
  34. package/dist/components/tests/Bindings.test.d.ts +1 -0
  35. package/dist/components/tests/ChannelAddress.test.d.ts +1 -0
  36. package/dist/components/tests/CodeBlock.test.d.ts +1 -0
  37. package/dist/components/tests/CodeSamples.test.d.ts +1 -0
  38. package/dist/components/tests/CopyMarkdownButton.test.d.ts +1 -0
  39. package/dist/components/tests/MarkdownExportMenu.test.d.ts +1 -0
  40. package/dist/config/config.d.ts +8 -0
  41. package/dist/containers/AsyncAPI/AsyncAPI.d.ts +1 -1
  42. package/dist/containers/Information/InformationSection.d.ts +22 -0
  43. package/dist/containers/Information/OpenAPIInformation.d.ts +9 -0
  44. package/dist/containers/OpenAPI/Layout.d.ts +7 -0
  45. package/dist/containers/OpenAPI/OpenAPI.d.ts +18 -0
  46. package/dist/containers/OpenAPI/OpenAPIDocumentProvider.d.ts +13 -0
  47. package/dist/containers/OpenAPI/OpenAPIRenderer.d.ts +17 -0
  48. package/dist/containers/OpenAPI/tests/OpenAPI.test.d.ts +1 -0
  49. package/dist/containers/OpenAPI/tests/OpenAPIRenderer.test.d.ts +1 -0
  50. package/dist/containers/Operation/Operations.d.ts +2 -1
  51. package/dist/containers/Path/OperationCallbacks.d.ts +37 -0
  52. package/dist/containers/Path/PathOperation.d.ts +21 -0
  53. package/dist/containers/Path/Paths.d.ts +16 -0
  54. package/dist/containers/Path/ResponseLinks.d.ts +21 -0
  55. package/dist/containers/Path/tests/PathOperation.test.d.ts +1 -0
  56. package/dist/containers/Path/tests/Paths.test.d.ts +1 -0
  57. package/dist/containers/Server/OpenAPIServer.d.ts +4 -0
  58. package/dist/containers/Server/OpenAPIServers.d.ts +13 -0
  59. package/dist/contants.d.ts +7 -0
  60. package/dist/contexts/useSpec.d.ts +28 -6
  61. package/dist/crystal-BcGgviMR.cjs +1 -0
  62. package/dist/crystal-BtD5fR4q.js +283 -0
  63. package/dist/csharp-AnFv7wyC.js +382 -0
  64. package/dist/csharp-yuAGIuP4.cjs +1 -0
  65. package/dist/go-BpetKc7b.cjs +1 -0
  66. package/dist/go-CkZ9_bn0.js +151 -0
  67. package/dist/helpers/codeSamples.d.ts +92 -0
  68. package/dist/helpers/exampleSchema.d.ts +19 -0
  69. package/dist/helpers/hljsLanguages.d.ts +6 -0
  70. package/dist/helpers/openapiParser.d.ts +10 -0
  71. package/dist/helpers/openapiSearchIndex.d.ts +3 -0
  72. package/dist/helpers/resolveDocument.d.ts +8 -0
  73. package/dist/helpers/runtimeExpression.d.ts +15 -0
  74. package/dist/helpers/schemaExample.d.ts +9 -0
  75. package/dist/helpers/searchIndex.d.ts +5 -2
  76. package/dist/helpers/tests/codeSamples.test.d.ts +1 -0
  77. package/dist/helpers/tests/exampleSchema.test.d.ts +1 -0
  78. package/dist/helpers/tests/openapiSearchIndex.test.d.ts +1 -0
  79. package/dist/helpers/tests/toMarkdown.test.d.ts +1 -0
  80. package/dist/helpers/toMarkdown.d.ts +20 -0
  81. package/dist/hooks/useDocumentProviderValue.d.ts +27 -0
  82. package/dist/hooks/useFuseSearch.d.ts +14 -0
  83. package/dist/hooks/useOpenAPISearch.d.ts +9 -0
  84. package/dist/hooks/useSearchResultFocus.d.ts +18 -0
  85. package/dist/hooks/useSpecLayoutController.d.ts +51 -0
  86. package/dist/hooks/useSpecSearch.d.ts +2 -6
  87. package/dist/http--XH4hLDt.cjs +1 -0
  88. package/dist/http-DKeNlJKS.js +85 -0
  89. package/dist/icons/Copy.d.ts +6 -0
  90. package/dist/icons/Info.d.ts +5 -0
  91. package/dist/index-C9Pyi0cN.cjs +177 -0
  92. package/dist/index-CFqT-0u9.js +17544 -0
  93. package/dist/index-CkQBQKmb.cjs +139 -0
  94. package/dist/index-DSOufiFF.js +18957 -0
  95. package/dist/{index-BcNlIoEF.cjs → index-QHokKPe8.cjs} +6 -6
  96. package/dist/index-xz-kuNHf.js +25412 -0
  97. package/dist/index.d.ts +7 -0
  98. package/dist/java-BIk0G-rH.cjs +1 -0
  99. package/dist/java-BicX26Pg.js +240 -0
  100. package/dist/kotlin-BwB8b-YX.js +242 -0
  101. package/dist/kotlin-kGuORR5a.cjs +2 -0
  102. package/dist/objectivec-CnyrJ13Z.js +237 -0
  103. package/dist/objectivec-CoeV81Tz.cjs +1 -0
  104. package/dist/ocaml-0j7KDjso.cjs +1 -0
  105. package/dist/ocaml-T8IqWCjo.js +67 -0
  106. package/dist/php-BL35ZHWM.js +566 -0
  107. package/dist/php-DF4zG2hq.cjs +2 -0
  108. package/dist/powershell-CvydS3ek.cjs +1 -0
  109. package/dist/powershell-DuhUKWoO.js +236 -0
  110. package/dist/protoToJsonSchema-ScIUJOSl.cjs +83 -0
  111. package/dist/protoToJsonSchema-dSLrBGlF.js +6131 -0
  112. package/dist/{protobufSchemaParser-sEw46uRx.cjs → protobufSchemaParser-Bd0cGKWk.cjs} +1 -1
  113. package/dist/{protobufSchemaParser-BQVXzHsQ.js → protobufSchemaParser-DE3p5F51.js} +2 -2
  114. package/dist/public/createSectionRoot.d.ts +30 -0
  115. package/dist/public/openapiSections.d.ts +26 -0
  116. package/dist/r-B8fCBydS.js +207 -0
  117. package/dist/r-CYaZnHkA.cjs +1 -0
  118. package/dist/ruby-CvOid-1s.js +388 -0
  119. package/dist/ruby-nPcbuC2a.cjs +1 -0
  120. package/dist/rust-BocnJ3Ns.js +305 -0
  121. package/dist/rust-DKnYCg2f.cjs +1 -0
  122. package/dist/swift-C35Eof-I.js +799 -0
  123. package/dist/swift-CAnH__EC.cjs +1 -0
  124. package/dist/types/openapi.d.ts +85 -0
  125. package/package.json +17 -2
  126. package/dist/components/Navigation.d.ts +0 -28
  127. package/dist/icons/SideBar.d.ts +0 -6
  128. package/dist/index-BG6colCU.js +0 -11473
  129. package/dist/index-Bmw7IyyF.cjs +0 -73
  130. package/dist/index-CEf0X0H_.js +0 -25414
  131. package/dist/protoToJsonSchema-BcqPKXqK.js +0 -6174
  132. package/dist/protoToJsonSchema-C43lKcgx.cjs +0 -83
  133. package/dist/vite.svg +0 -1
@@ -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), c = {
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))?", l = [
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: l,
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
+ c
300
+ ]
301
+ };
302
+ }
303
+ export {
304
+ b as default
305
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function b(e){const n=e.regex,i=/(r#)?/,t=n.concat(i,e.UNDERSCORE_IDENT_RE),o=n.concat(i,e.IDENT_RE),c={className:"title.function.invoke",relevance:0,begin:n.concat(/\b/,/(?!let|for|while|if|else|match\b)/,o,n.lookahead(/\s*\(/))},a="([ui](8|16|32|64|128|size)|f(32|64))?",l=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],u=["true","false","Some","None","Ok","Err"],r=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],s=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:s,keyword:l,literal:u,built_in:r},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+a},{begin:"\\b0o([0-7_]+)"+a},{begin:"\\b0x([A-Fa-f0-9_]+)"+a},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+a}],relevance:0},{begin:[/fn/,/\s+/,t],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,t],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,t,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,t],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,t],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:r,type:s}},{className:"punctuation",begin:"->"},c]}}exports.default=b;