apiuikit 0.3.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 +66 -7
- package/dist/LinkedInExtension-6xekO5bX.cjs +1 -0
- package/dist/LinkedInExtension-BL-4T9tt.js +21 -0
- package/dist/LogoExtension-BOYrY_RE.cjs +1 -0
- package/dist/LogoExtension-HOlSsQf-.js +27 -0
- package/dist/XExtension-GyRtdHLL.js +23 -0
- package/dist/XExtension-jAiATfg-.cjs +1 -0
- 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 +21 -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 +28 -0
- 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 +24 -3
- package/dist/components/tests/Authorization.test.d.ts +1 -0
- 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/components/tests/RenderExtensions.test.d.ts +1 -0
- package/dist/config/config.d.ts +10 -0
- package/dist/containers/AsyncAPI/AsyncAPI.d.ts +12 -6
- package/dist/containers/AsyncAPI/AsyncAPIRenderer.d.ts +9 -0
- 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 +30 -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/icons/Search.d.ts +3 -0
- package/dist/{index-D7GelPk0.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-D_2rEsD4.cjs → protobufSchemaParser-7SgmMhQd.cjs} +1 -1
- package/dist/{protobufSchemaParser-Cj2WOp05.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/public/sections.d.ts +6 -3
- 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/stories/AsyncAPI.stories.d.ts +6 -0
- package/dist/stories/AsyncAPIRenderer.stories.d.ts +6 -0
- package/dist/stories/Messages.stories.d.ts +1 -0
- package/dist/stories/Operations.stories.d.ts +6 -0
- package/dist/stories/SchemaTab.stories.d.ts +1 -0
- package/dist/stories/SchemaTree.stories.d.ts +1 -0
- package/dist/stories/Server.stories.d.ts +1 -0
- package/dist/stories/documentContextDecorator.d.ts +2 -2
- package/dist/stories/noCanvasDocsPage.d.ts +9 -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 +16 -3
- package/dist/components/Navigation.d.ts +0 -28
- package/dist/icons/SideBar.d.ts +0 -6
- package/dist/index-Bad1aEIj.js +0 -11352
- package/dist/index-CzcxQGxP.js +0 -25414
- package/dist/index-gn5KpvCL.cjs +0 -73
- package/dist/protoToJsonSchema-8Mm10CIx.cjs +0 -83
- package/dist/protoToJsonSchema-BJpwl2Am.js +0 -6174
- package/dist/vite.svg +0 -1
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
function C(e) {
|
|
2
|
+
const s = e.regex, n = e.COMMENT("//", "$", { contains: [{ begin: /\\\n/ }] }), _ = "decltype\\(auto\\)", o = "[a-zA-Z_]\\w*::", u = "(" + _ + "|" + s.optional(o) + "[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
|
+
}, c = {
|
|
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
|
+
}, E = {
|
|
55
|
+
className: "title",
|
|
56
|
+
begin: s.optional(o) + e.IDENT_RE,
|
|
57
|
+
relevance: 0
|
|
58
|
+
}, d = s.optional(o) + 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
|
+
}, l = [
|
|
143
|
+
i,
|
|
144
|
+
r,
|
|
145
|
+
n,
|
|
146
|
+
e.C_BLOCK_COMMENT_MODE,
|
|
147
|
+
c,
|
|
148
|
+
a
|
|
149
|
+
], m = {
|
|
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: l.concat([
|
|
169
|
+
{
|
|
170
|
+
begin: /\(/,
|
|
171
|
+
end: /\)/,
|
|
172
|
+
keywords: t,
|
|
173
|
+
contains: l.concat(["self"]),
|
|
174
|
+
relevance: 0
|
|
175
|
+
}
|
|
176
|
+
]),
|
|
177
|
+
relevance: 0
|
|
178
|
+
}, p = {
|
|
179
|
+
begin: "(" + u + "[\\*&\\s]+)+" + d,
|
|
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: _,
|
|
189
|
+
keywords: t,
|
|
190
|
+
relevance: 0
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
begin: d,
|
|
194
|
+
returnBegin: !0,
|
|
195
|
+
contains: [e.inherit(E, { 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
|
+
c,
|
|
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
|
+
c,
|
|
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
|
+
m,
|
|
249
|
+
p,
|
|
250
|
+
l,
|
|
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
|
+
C as default
|
|
277
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function g(e){const s=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),_="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",u="("+_+"|"+s.optional(o)+"[a-zA-Z_]\\w*"+s.optional("<[^<>]+>")+")",r={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},a={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},c={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{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)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},i={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(a,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},E={className:"title",begin:s.optional(o)+e.IDENT_RE,relevance:0},d=s.optional(o)+e.IDENT_RE+"\\s*\\(",t={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",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"},l=[i,r,n,e.C_BLOCK_COMMENT_MODE,c,a],m={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:t,contains:l.concat([{begin:/\(/,end:/\)/,keywords:t,contains:l.concat(["self"]),relevance:0}]),relevance:0},p={begin:"("+u+"[\\*&\\s]+)+"+d,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:t,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:_,keywords:t,relevance:0},{begin:d,returnBegin:!0,contains:[e.inherit(E,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:t,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,a,c,r,{begin:/\(/,end:/\)/,keywords:t,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,a,c,r]}]},r,n,e.C_BLOCK_COMMENT_MODE,i]};return{name:"C",aliases:["h"],keywords:t,disableAutodetect:!0,illegal:"</",contains:[].concat(m,p,l,[i,{begin:e.IDENT_RE+"::",keywords:t},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:i,strings:a,keywords:t}}}exports.default=g;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function k(t){const c="a-zA-Z_\\-!.?+*=<>&'",e="[#]?["+c+"]["+c+"0-9/;:$#]*",n="def defonce defprotocol defstruct defmulti defmethod defn- defn defmacro deftype defrecord",y={$pattern:e,built_in: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"},b={begin:e,relevance:0},i={scope:"number",relevance:0,variants:[{match:/[-+]?0[xX][0-9a-fA-F]+N?/},{match:/[-+]?0[0-7]+N?/},{match:/[-+]?[1-9][0-9]?[rR][0-9a-zA-Z]+N?/},{match:/[-+]?[0-9]+\/[0-9]+N?/},{match:/[-+]?[0-9]+((\.[0-9]*([eE][+-]?[0-9]+)?M?)|([eE][+-]?[0-9]+M?|M))/},{match:/[-+]?([1-9][0-9]*|0)N?/}]},d={scope:"character",variants:[{match:/\\o[0-3]?[0-7]{1,2}/},{match:/\\u[0-9a-fA-F]{4}/},{match:/\\(newline|space|tab|formfeed|backspace|return)/},{match:/\\\S/,relevance:0}]},l={scope:"regex",begin:/#"/,end:/"/,contains:[t.BACKSLASH_ESCAPE]},m=t.inherit(t.QUOTE_STRING_MODE,{illegal:null}),p={scope:"punctuation",match:/,/,relevance:0},u=t.COMMENT(";","$",{relevance:0}),f={className:"literal",begin:/\b(true|false|nil)\b/},a={begin:"\\[|(#::?"+e+")?\\{",end:"[\\]\\}]",relevance:0},h={className:"symbol",begin:"[:]{1,2}"+e},r={begin:"\\(",end:"\\)"},s={endsWithParent:!0,relevance:0},g={keywords:y,className:"name",begin:e,relevance:0,starts:s},o=[p,r,d,l,m,u,h,a,i,f,b],v={beginKeywords:n,keywords:{$pattern:e,keyword:n},end:'(\\[|#|\\d|"|:|\\{|\\)|\\(|$)',contains:[{className:"title",begin:e,relevance:0,excludeEnd:!0,endsParent:!0}].concat(o)};return r.contains=[v,g,s],s.contains=o,a.contains=o,{name:"Clojure",aliases:["clj","edn"],illegal:/\S/,contains:[p,r,d,l,m,u,h,a,i,f]}}exports.default=k;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
function v(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
|
+
], k = {
|
|
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
|
+
k,
|
|
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
|
+
v as default
|
|
135
|
+
};
|
|
@@ -1,27 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
export interface SecuritySchemeData {
|
|
2
|
+
type: string;
|
|
3
|
+
description?: string;
|
|
4
|
+
in?: string;
|
|
5
|
+
/** The header/query/cookie parameter name — OpenAPI's apiKey / AsyncAPI's httpApiKey. */
|
|
6
|
+
name?: string;
|
|
7
|
+
/** The `http` scheme, e.g. "bearer" | "basic". */
|
|
8
|
+
scheme?: string;
|
|
9
|
+
bearerFormat?: string;
|
|
10
|
+
openIdConnectUrl?: string;
|
|
11
|
+
scopes?: string[];
|
|
12
|
+
/** The scopes a specific security *requirement* actually asks for (set by the caller when it's resolving one operation's requirement, not the scheme definition itself) — preferred over the scheme's full scope catalog when present, since a requirement is usually only asking for a subset of it. */
|
|
13
|
+
requiredScopes?: string[];
|
|
14
|
+
flows?: Record<string, {
|
|
15
|
+
authorizationUrl?: string;
|
|
16
|
+
tokenUrl?: string;
|
|
17
|
+
refreshUrl?: string;
|
|
18
|
+
availableScopes?: string[] | Record<string, string>;
|
|
19
|
+
scopes?: Record<string, string>;
|
|
20
|
+
}>;
|
|
21
|
+
}
|
|
14
22
|
interface Props {
|
|
15
|
-
securities:
|
|
23
|
+
securities: SecuritySchemeData[];
|
|
16
24
|
}
|
|
17
25
|
export default function Authorization({ securities }: Props): import("react").JSX.Element;
|
|
26
|
+
export declare const Bearer: ({ security }: {
|
|
27
|
+
security: SecuritySchemeData;
|
|
28
|
+
}) => import("react").JSX.Element;
|
|
18
29
|
export declare const ApiKey: ({ security }: {
|
|
19
|
-
security:
|
|
30
|
+
security: SecuritySchemeData;
|
|
20
31
|
}) => import("react").JSX.Element;
|
|
21
32
|
export declare const OpenID: ({ security }: {
|
|
22
|
-
security:
|
|
33
|
+
security: SecuritySchemeData;
|
|
23
34
|
}) => import("react").JSX.Element;
|
|
24
35
|
export declare const OAuth2: ({ security }: {
|
|
25
|
-
security:
|
|
36
|
+
security: SecuritySchemeData;
|
|
26
37
|
}) => import("react").JSX.Element;
|
|
27
38
|
export {};
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
export interface ChannelAddressParameterDetail {
|
|
2
|
+
description?: string;
|
|
3
|
+
type?: string;
|
|
4
|
+
default?: string;
|
|
5
|
+
enum?: string[];
|
|
6
|
+
examples?: string[];
|
|
7
|
+
}
|
|
2
8
|
interface ChannelAddressProps {
|
|
3
9
|
address: string;
|
|
4
|
-
parameters?: Record<string,
|
|
10
|
+
parameters?: Record<string, ChannelAddressParameterDetail>;
|
|
5
11
|
className?: string;
|
|
6
12
|
/** Clip to a single line with an ellipsis instead of wrapping. Useful in fixed-width contexts like table rows. */
|
|
7
13
|
truncate?: boolean;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
interface CodeBlockProps {
|
|
2
2
|
code: string;
|
|
3
3
|
className?: string;
|
|
4
|
+
language?: string;
|
|
5
|
+
/** Height in px past which the block is clipped behind a "show all" toggle. */
|
|
6
|
+
collapsedMaxHeight?: number;
|
|
4
7
|
}
|
|
5
|
-
export declare function CodeBlock({ code, className }: CodeBlockProps): import("react").JSX.Element;
|
|
8
|
+
export declare function CodeBlock({ code, className, language, collapsedMaxHeight, }: CodeBlockProps): import("react").JSX.Element;
|
|
6
9
|
export default CodeBlock;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { HttpMethod, OpenAPIParameterData, OpenAPIRequestBodyData } from '../types/openapi';
|
|
2
|
+
interface CodeSamplesProps {
|
|
3
|
+
method: HttpMethod;
|
|
4
|
+
path: string;
|
|
5
|
+
parameters: OpenAPIParameterData[];
|
|
6
|
+
requestBody?: OpenAPIRequestBodyData;
|
|
7
|
+
/** Already resolved by the caller: `op.security ?? globalSecurity ?? []`. */
|
|
8
|
+
security: Array<Record<string, string[]>>;
|
|
9
|
+
id: string | null;
|
|
10
|
+
}
|
|
11
|
+
export declare function CodeSamples({ method, path, parameters, requestBody, security, id }: CodeSamplesProps): import("react").JSX.Element | null;
|
|
12
|
+
export default CodeSamples;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
interface CollapsiblePanelProps {
|
|
3
|
+
/** Header content before the chevron — e.g. a count pill or a protocol badge. */
|
|
4
|
+
trigger: ReactNode;
|
|
5
|
+
/** Content revealed inside the animated panel. */
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
/** Starts expanded. Defaults to false. */
|
|
8
|
+
defaultExpanded?: boolean;
|
|
9
|
+
/** Forces the panel open once true (e.g. search navigated here) — never forces it closed, so a later `false` doesn't collapse something the user opened themselves. */
|
|
10
|
+
forceExpanded?: boolean;
|
|
11
|
+
/** Id of an external heading that labels the toggle button (e.g. an `<h3>` above it), when there is one. */
|
|
12
|
+
ariaLabelledBy?: string;
|
|
13
|
+
/** Extra classes on the outer bordered container. */
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The expand/collapse accordion pattern shared by Authorization sections
|
|
18
|
+
* (Server, Operation) and Bindings: a toggle button with a `trigger` badge
|
|
19
|
+
* and chevron, and a `grid-rows-[0fr]/[1fr]` animated panel beneath it. Owns
|
|
20
|
+
* the ARIA wiring (`aria-expanded`/`aria-controls`) and the "force open on
|
|
21
|
+
* search navigation" glue that was duplicated identically across all three.
|
|
22
|
+
*/
|
|
23
|
+
export default function CollapsiblePanel({ trigger, children, defaultExpanded, forceExpanded, ariaLabelledBy, className, }: CollapsiblePanelProps): import("react").JSX.Element;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
interface CopyMarkdownButtonProps {
|
|
2
|
+
/** Builds the Markdown string to copy. Called lazily, only on click. */
|
|
3
|
+
getMarkdown: () => string;
|
|
4
|
+
/** Used as both the button's `title` and `aria-label`. */
|
|
5
|
+
label: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Small inline icon button that copies `getMarkdown()`'s result to the
|
|
9
|
+
* clipboard, showing a transient checkmark on success. Unlike
|
|
10
|
+
* MarkdownExportMenu (a floating, viewport-pinned button with its own
|
|
11
|
+
* dropdown menu), this is meant to sit inline in normal document flow —
|
|
12
|
+
* e.g. a SidePanel header — so it has no positioning or portal logic.
|
|
13
|
+
*/
|
|
14
|
+
export default function CopyMarkdownButton({ getMarkdown, label }: CopyMarkdownButtonProps): import("react").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import { JsonSchema } from '../helpers/exampleSchema';
|
|
2
2
|
interface ExamplesProps {
|
|
3
3
|
schema: JsonSchema;
|
|
4
|
+
/** A real example value declared in the spec (OpenAPI media type `example`/`examples`, or an AsyncAPI message example), shown as-is instead of auto-generating one when present. */
|
|
5
|
+
providedExample?: unknown;
|
|
4
6
|
}
|
|
5
|
-
export declare function Examples({ schema }: ExamplesProps): import("react").JSX.Element | null;
|
|
7
|
+
export declare function Examples({ schema, providedExample }: ExamplesProps): import("react").JSX.Element | null;
|
|
6
8
|
export {};
|
|
@@ -1,2 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
interface InfoMetadataProps {
|
|
3
|
+
license?: {
|
|
4
|
+
name?: string;
|
|
5
|
+
url?: string;
|
|
6
|
+
};
|
|
7
|
+
externalDocs?: {
|
|
8
|
+
description?: string;
|
|
9
|
+
url?: string;
|
|
10
|
+
};
|
|
11
|
+
contact?: {
|
|
12
|
+
name?: string;
|
|
13
|
+
url?: string;
|
|
14
|
+
email?: string;
|
|
15
|
+
};
|
|
16
|
+
tags?: unknown[];
|
|
17
|
+
/** `info.x-logo`, rendered above the metadata list. */
|
|
18
|
+
logo?: ReactNode;
|
|
19
|
+
}
|
|
20
|
+
export default function InfoMetadata({ license, externalDocs, contact, tags, logo, }: InfoMetadataProps): import("react").JSX.Element;
|
|
21
|
+
export {};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
declare const Markdown: React.FunctionComponent<{
|
|
3
3
|
children: React.ReactNode;
|
|
4
|
+
/** Extra classes merged onto the root `.prose` div — e.g. `prose-sm` to shrink it for a compact context. */
|
|
5
|
+
className?: string;
|
|
4
6
|
}>;
|
|
5
7
|
export default Markdown;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
interface MarkdownExportMenuProps {
|
|
2
|
+
/** Builds the Markdown string for the whole document, given `deref` (from
|
|
3
|
+
* this component's own document context — Layout renders this as a *child*
|
|
4
|
+
* of the provider, so it can't read context itself). Called lazily, only
|
|
5
|
+
* when a menu item is clicked — serialization isn't free for large
|
|
6
|
+
* documents, so it shouldn't run on every render/open. */
|
|
7
|
+
serialize: (deref: (ref: string) => unknown) => string;
|
|
8
|
+
/** Left offset (px) for this floating button. Layouts pass 60 when search is
|
|
9
|
+
* shown (12 + 40 width + 8 gap) or 12 when it isn't — see index.css. */
|
|
10
|
+
leftOffset: number;
|
|
11
|
+
}
|
|
12
|
+
export default function MarkdownExportMenu({ serialize, leftOffset }: MarkdownExportMenuProps): import("react").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { HttpMethod } from '../types/openapi';
|
|
2
|
+
import { OperationAction } from '../types/asyncapi/OperationAction';
|
|
3
|
+
export type MethodBadgeSize = "sm" | "xs";
|
|
4
|
+
interface MethodBadgeProps {
|
|
5
|
+
/** An OpenAPI HTTP method or an AsyncAPI operation action — same pill, one color map. Renders nothing when undefined (e.g. an operation with no action yet). */
|
|
6
|
+
method: HttpMethod | OperationAction | undefined;
|
|
7
|
+
/** `sm` for detail/table contexts, `xs` for compact ones like the nav. Defaults to `sm`. */
|
|
8
|
+
size?: MethodBadgeSize;
|
|
9
|
+
/** Extra layout classes for the specific spot it's dropped into (e.g. a fixed table-column width). */
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
/** The method/action color pill shared across OpenAPI's endpoint detail, its endpoints table, and AsyncAPI's operation list/detail/nav — one place for the method→color mapping, for both specs. */
|
|
13
|
+
export default function MethodBadge({ method, size, className }: MethodBadgeProps): import("react").JSX.Element | null;
|
|
14
|
+
export {};
|