apiuikit 1.12.0 → 2.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.
- package/README.md +2 -52
- package/dist/CodeSamples-C5Tl3k83.cjs +50 -0
- package/dist/{CodeSamples-BzQONJ_W.js → CodeSamples-bu8KSzOn.js} +1225 -1231
- package/dist/{LogoExtension-NutcLQ6T.cjs → LogoExtension-BVOE2HZc.cjs} +1 -1
- package/dist/{LogoExtension-DyWnBQ1M.js → LogoExtension-CZJpJnyk.js} +1 -1
- package/dist/apiuikit.cjs.js +1 -1
- package/dist/apiuikit.css +1 -1
- package/dist/apiuikit.es.js +1 -1
- package/dist/c-B4BAHWS4.cjs +1 -0
- package/dist/{c-Bz1-FJiA.js → c-C0DTNf68.js} +122 -63
- package/dist/components/AsyncCodeSample.d.ts +1 -1
- package/dist/components/Authorization.d.ts +5 -5
- package/dist/components/Bindings.d.ts +1 -1
- package/dist/components/ChannelAddress.d.ts +1 -1
- package/dist/components/CodeBlock.d.ts +1 -1
- package/dist/components/CodeSamples.d.ts +1 -1
- package/dist/components/CollapsiblePanel.d.ts +1 -1
- package/dist/components/ContentTab.d.ts +1 -1
- package/dist/components/CopyButton.d.ts +1 -1
- package/dist/components/DefinitionListItem.d.ts +1 -1
- package/dist/components/DocumentTopBar.d.ts +1 -1
- package/dist/components/ErrorBoundary.d.ts +1 -1
- package/dist/components/Examples.d.ts +1 -1
- package/dist/components/InfoMetadata.d.ts +1 -1
- package/dist/components/MarkdownExportMenu.d.ts +1 -1
- package/dist/components/MethodBadge.d.ts +1 -1
- package/dist/components/Navigation/AsyncAPINavigation.d.ts +1 -1
- package/dist/components/Navigation/Navigation.d.ts +1 -1
- package/dist/components/Navigation/OpenAPINavigation.d.ts +1 -1
- package/dist/components/Navigation/SpecNavigation.d.ts +1 -1
- package/dist/components/QueryParameters.d.ts +1 -1
- package/dist/components/RenderExtensions.d.ts +1 -1
- package/dist/components/Reply.d.ts +1 -1
- package/dist/components/SearchPanel.d.ts +1 -1
- package/dist/components/Section.d.ts +8 -1
- package/dist/components/ServerAddressBanner.d.ts +1 -1
- package/dist/components/TabToggle.d.ts +1 -1
- package/dist/components/Tabs.d.ts +2 -2
- package/dist/components/Tag.d.ts +1 -1
- package/dist/components/VerticalNavigation.d.ts +1 -1
- package/dist/components/schema/ExpandToggle.d.ts +1 -1
- package/dist/components/schema/SchemaCaseDetail.d.ts +1 -1
- package/dist/components/schema/SchemaConstraints.d.ts +1 -1
- package/dist/components/schema/SchemaFieldMeta.d.ts +1 -1
- package/dist/components/schema/SchemaIfThenElseBranch.d.ts +1 -1
- package/dist/components/schema/SchemaMapBranch.d.ts +1 -1
- package/dist/components/schema/SchemaNode.d.ts +1 -1
- package/dist/components/schema/SchemaNotBranch.d.ts +2 -2
- package/dist/components/schema/SchemaTab.d.ts +1 -1
- package/dist/components/schema/SchemaTree.d.ts +1 -1
- package/dist/components/schema/SchemaTreeBranch.d.ts +1 -1
- package/dist/components/schema/SchemaTreeRow.d.ts +1 -1
- package/dist/components/schema/SchemaTypeLabel.d.ts +1 -1
- package/dist/components/schema/SchemaUnionBranch.d.ts +1 -1
- package/dist/config/config.d.ts +17 -0
- package/dist/containers/AsyncAPI/AsyncAPI.d.ts +1 -1
- package/dist/containers/AsyncAPI/AsyncAPIDocumentProvider.d.ts +1 -1
- package/dist/containers/AsyncAPI/AsyncAPIRenderer.d.ts +1 -1
- package/dist/containers/AsyncAPI/Layout.d.ts +1 -1
- package/dist/containers/Information/InformationSection.d.ts +2 -2
- package/dist/containers/Information/OpenAPIInformation.d.ts +1 -1
- package/dist/containers/Messages/Message.d.ts +1 -1
- package/dist/containers/Messages/MessageDetails.d.ts +1 -1
- package/dist/containers/Messages/Messages.d.ts +1 -1
- package/dist/containers/OpenAPI/Layout.d.ts +1 -1
- package/dist/containers/OpenAPI/OpenAPI.d.ts +1 -1
- package/dist/containers/OpenAPI/OpenAPIDocumentProvider.d.ts +1 -1
- package/dist/containers/OpenAPI/OpenAPIRenderer.d.ts +1 -1
- package/dist/containers/Operation/Operation.d.ts +1 -1
- package/dist/containers/Operation/Operations.d.ts +1 -1
- package/dist/containers/Path/OperationCallbacks.d.ts +1 -1
- package/dist/containers/Path/PathOperation.d.ts +1 -1
- package/dist/containers/Path/Paths.d.ts +1 -1
- package/dist/containers/Path/ResponseLinks.d.ts +1 -1
- package/dist/containers/Schema/Schemas.d.ts +1 -1
- package/dist/containers/Server/OpenAPIServer.d.ts +1 -1
- package/dist/containers/Server/OpenAPIServers.d.ts +1 -1
- package/dist/containers/Server/Server.d.ts +1 -1
- package/dist/containers/Server/Servers.d.ts +1 -1
- package/dist/contexts/useSpec.d.ts +5 -0
- package/dist/{crystal-BcGgviMR.cjs → crystal-BA1RB3o9.cjs} +1 -1
- package/dist/{crystal-BtD5fR4q.js → crystal-C5EKc8oK.js} +29 -18
- package/dist/{csharp-AnFv7wyC.js → csharp-B6YWt0KR.js} +47 -47
- package/dist/csharp-IihVQN8U.cjs +1 -0
- package/dist/{go-BpetKc7b.cjs → go-By8nj0Vi.cjs} +1 -1
- package/dist/{go-CkZ9_bn0.js → go-C8VcBUsu.js} +7 -2
- package/dist/helpers/openapiParser.d.ts +1 -1
- package/dist/helpers/parser.d.ts +1 -1
- package/dist/hooks/useDocumentProviderValue.d.ts +1 -0
- package/dist/icons/ArrowDown.d.ts +1 -1
- package/dist/icons/ArrowRight.d.ts +1 -1
- package/dist/icons/AtSymbol.d.ts +1 -1
- package/dist/icons/BookOpen.d.ts +1 -1
- package/dist/icons/Check.d.ts +1 -1
- package/dist/icons/Clipboard.d.ts +1 -1
- package/dist/icons/Connection.d.ts +1 -1
- package/dist/icons/Copy.d.ts +1 -1
- package/dist/icons/ExternalLink.d.ts +1 -1
- package/dist/icons/Globe.d.ts +1 -1
- package/dist/icons/IconWrapper.d.ts +1 -1
- package/dist/icons/Info.d.ts +1 -1
- package/dist/icons/Link.d.ts +1 -1
- package/dist/icons/Message.d.ts +1 -1
- package/dist/icons/Operation.d.ts +1 -1
- package/dist/icons/Scale.d.ts +1 -1
- package/dist/icons/Schema.d.ts +1 -1
- package/dist/icons/Server.d.ts +1 -1
- package/dist/icons/ShieldCheck.d.ts +1 -1
- package/dist/icons/Tag.d.ts +1 -1
- package/dist/icons/Variable.d.ts +1 -1
- package/dist/index-1SEMQuYi.js +1704 -0
- package/dist/index-29FyeXas.cjs +137 -0
- package/dist/index-C2tdEw22.cjs +178 -0
- package/dist/{index-Zmu_k8_1.js → index-CbVUi36m.js} +3637 -3400
- package/dist/{index-ByyWsuPc.js → index-Ccaf5SNM.js} +10357 -10196
- package/dist/index-Ccy_JZ0T.cjs +4 -0
- package/dist/index-DKcgVKzx.cjs +107 -0
- package/dist/{index-CxOoKEXt.js → index-DkjcpZQZ.js} +3118 -3026
- package/dist/{java-BicX26Pg.js → java-BoRJOXvw.js} +48 -39
- package/dist/java-DFXAwvvK.cjs +1 -0
- package/dist/{kotlin-kGuORR5a.cjs → kotlin-B3HlgtFq.cjs} +2 -2
- package/dist/{kotlin-BwB8b-YX.js → kotlin-CIEA64JZ.js} +3 -1
- package/dist/markdown-assets/protoToJsonSchema-B7uaS_Ic.js +83 -0
- package/dist/markdown-assets/{protoToJsonSchema-CBPWaboT.js → protoToJsonSchema-CWtEPUyE.js} +1807 -1788
- package/dist/markdown.cjs +37 -37
- package/dist/markdown.es.js +927 -900
- package/dist/{php-DF4zG2hq.cjs → php-BMUCoWpx.cjs} +2 -2
- package/dist/{php-BL35ZHWM.js → php-DJ7KS8rT.js} +39 -33
- package/dist/plugins/OperationPluginTabs.d.ts +1 -1
- package/dist/plugins/PluginSlot.d.ts +2 -2
- package/dist/{protoToJsonSchema-DYct0Ubq.js → protoToJsonSchema-BvNrF6Ce.js} +787 -769
- package/dist/protoToJsonSchema-CQwj_Ytd.cjs +83 -0
- package/dist/{protobufSchemaParser-AhCAnBeA.cjs → protobufSchemaParser-DO1jnL81.cjs} +1 -1
- package/dist/{protobufSchemaParser-DDehPdy5.js → protobufSchemaParser-hOIbQrct.js} +2 -2
- package/dist/public/createSectionRoot.d.ts +1 -1
- package/dist/public/openapiSections.d.ts +5 -5
- package/dist/public/schemasSection.d.ts +1 -1
- package/dist/public/sections.d.ts +5 -5
- package/dist/{ruby-nPcbuC2a.cjs → ruby-CGL4kvvH.cjs} +1 -1
- package/dist/{ruby-CvOid-1s.js → ruby-t1jbZ0Fv.js} +2 -2
- package/dist/{rust-BocnJ3Ns.js → rust-DY-oA2gr.js} +40 -26
- package/dist/rust-_vvcEGSJ.cjs +1 -0
- package/dist/swift-BAji1QIq.cjs +1 -0
- package/dist/{swift-C35Eof-I.js → swift-CdDIFB_j.js} +25 -11
- package/dist/utils/theme.d.ts +14 -0
- package/package.json +20 -4
- package/dist/App.d.ts +0 -2
- package/dist/CodeSamples-BpMwzCbt.cjs +0 -50
- package/dist/c-C_Sx7N-F.cjs +0 -1
- package/dist/csharp-yuAGIuP4.cjs +0 -1
- package/dist/index-BKvXpIUY.cjs +0 -107
- package/dist/index-DCDYBZcY.js +0 -1461
- package/dist/index-DgKIIH6w.cjs +0 -139
- package/dist/index-DwDyiZr3.cjs +0 -178
- package/dist/index-d8kJa7YD.cjs +0 -4
- package/dist/java-BIk0G-rH.cjs +0 -1
- package/dist/main.d.ts +0 -0
- package/dist/markdown-assets/protoToJsonSchema-CgkcluFJ.js +0 -83
- package/dist/protoToJsonSchema-B86Gpg5n.cjs +0 -83
- package/dist/rust-DKnYCg2f.cjs +0 -1
- package/dist/swift-CAnH__EC.cjs +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
function b(e) {
|
|
2
|
-
const n = e.regex,
|
|
3
|
-
|
|
2
|
+
const n = e.regex, o = /(r#)?/, t = n.concat(o, e.UNDERSCORE_IDENT_RE), a = n.concat(o, e.IDENT_RE), c = {
|
|
3
|
+
scope: "title.function.invoke",
|
|
4
4
|
relevance: 0,
|
|
5
5
|
begin: n.concat(
|
|
6
6
|
/\b/,
|
|
7
|
-
/(?!let|for|while|if|else|match\b)/,
|
|
8
|
-
|
|
7
|
+
/(?!(?:let|for|while|if|else|match)\b)/,
|
|
8
|
+
a,
|
|
9
9
|
n.lookahead(/\s*\(/)
|
|
10
10
|
)
|
|
11
|
-
},
|
|
11
|
+
}, i = "([ui](8|16|32|64|128|size)|f(16|32|64|128))?", l = [
|
|
12
12
|
"abstract",
|
|
13
13
|
"as",
|
|
14
14
|
"async",
|
|
@@ -41,6 +41,7 @@ function b(e) {
|
|
|
41
41
|
"override",
|
|
42
42
|
"priv",
|
|
43
43
|
"pub",
|
|
44
|
+
"raw",
|
|
44
45
|
"ref",
|
|
45
46
|
"return",
|
|
46
47
|
"self",
|
|
@@ -68,7 +69,7 @@ function b(e) {
|
|
|
68
69
|
"None",
|
|
69
70
|
"Ok",
|
|
70
71
|
"Err"
|
|
71
|
-
],
|
|
72
|
+
], r = [
|
|
72
73
|
// functions
|
|
73
74
|
"drop ",
|
|
74
75
|
// traits
|
|
@@ -135,7 +136,7 @@ function b(e) {
|
|
|
135
136
|
"macro_rules!",
|
|
136
137
|
"assert_ne!",
|
|
137
138
|
"debug_assert_ne!"
|
|
138
|
-
],
|
|
139
|
+
], s = [
|
|
139
140
|
"i8",
|
|
140
141
|
"i16",
|
|
141
142
|
"i32",
|
|
@@ -148,8 +149,10 @@ function b(e) {
|
|
|
148
149
|
"u64",
|
|
149
150
|
"u128",
|
|
150
151
|
"usize",
|
|
152
|
+
"f16",
|
|
151
153
|
"f32",
|
|
152
154
|
"f64",
|
|
155
|
+
"f128",
|
|
153
156
|
"str",
|
|
154
157
|
"char",
|
|
155
158
|
"bool",
|
|
@@ -164,10 +167,10 @@ function b(e) {
|
|
|
164
167
|
aliases: ["rs"],
|
|
165
168
|
keywords: {
|
|
166
169
|
$pattern: e.IDENT_RE + "!?",
|
|
167
|
-
type:
|
|
170
|
+
type: s,
|
|
168
171
|
keyword: l,
|
|
169
172
|
literal: u,
|
|
170
|
-
built_in:
|
|
173
|
+
built_in: r
|
|
171
174
|
},
|
|
172
175
|
illegal: "</",
|
|
173
176
|
contains: [
|
|
@@ -178,7 +181,7 @@ function b(e) {
|
|
|
178
181
|
illegal: null
|
|
179
182
|
}),
|
|
180
183
|
{
|
|
181
|
-
|
|
184
|
+
scope: "symbol",
|
|
182
185
|
// negative lookahead to avoid matching `'`
|
|
183
186
|
begin: /'[a-zA-Z_][a-zA-Z0-9_]*(?!')/
|
|
184
187
|
},
|
|
@@ -192,40 +195,51 @@ function b(e) {
|
|
|
192
195
|
contains: [
|
|
193
196
|
{
|
|
194
197
|
scope: "char.escape",
|
|
195
|
-
match: /\\('
|
|
198
|
+
match: /\\('|"|\\|\w|x\w{2}|u\w{4}|U\w{8})/
|
|
196
199
|
}
|
|
197
200
|
]
|
|
198
201
|
}
|
|
199
202
|
]
|
|
200
203
|
},
|
|
201
204
|
{
|
|
202
|
-
|
|
205
|
+
scope: "number",
|
|
203
206
|
variants: [
|
|
204
|
-
{ begin: "\\b0b([01_]+)" +
|
|
205
|
-
{ begin: "\\b0o([0-7_]+)" +
|
|
206
|
-
{ begin: "\\b0x([A-Fa-f0-9_]+)" +
|
|
207
|
-
{ begin: "\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)" +
|
|
207
|
+
{ begin: "\\b0b([01_]+)" + i },
|
|
208
|
+
{ begin: "\\b0o([0-7_]+)" + i },
|
|
209
|
+
{ begin: "\\b0x([A-Fa-f0-9_]+)" + i },
|
|
210
|
+
{ begin: "\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)" + i }
|
|
208
211
|
],
|
|
209
212
|
relevance: 0
|
|
210
213
|
},
|
|
214
|
+
{
|
|
215
|
+
begin: [
|
|
216
|
+
/\bsafe/,
|
|
217
|
+
/\s+/,
|
|
218
|
+
/extern/
|
|
219
|
+
],
|
|
220
|
+
scope: {
|
|
221
|
+
1: "keyword",
|
|
222
|
+
3: "keyword"
|
|
223
|
+
}
|
|
224
|
+
},
|
|
211
225
|
{
|
|
212
226
|
begin: [
|
|
213
227
|
/fn/,
|
|
214
228
|
/\s+/,
|
|
215
229
|
t
|
|
216
230
|
],
|
|
217
|
-
|
|
231
|
+
scope: {
|
|
218
232
|
1: "keyword",
|
|
219
233
|
3: "title.function"
|
|
220
234
|
}
|
|
221
235
|
},
|
|
222
236
|
{
|
|
223
|
-
|
|
237
|
+
scope: "meta",
|
|
224
238
|
begin: "#!?\\[",
|
|
225
239
|
end: "\\]",
|
|
226
240
|
contains: [
|
|
227
241
|
{
|
|
228
|
-
|
|
242
|
+
scope: "string",
|
|
229
243
|
begin: /"/,
|
|
230
244
|
end: /"/,
|
|
231
245
|
contains: [
|
|
@@ -241,7 +255,7 @@ function b(e) {
|
|
|
241
255
|
/(?:mut\s+)?/,
|
|
242
256
|
t
|
|
243
257
|
],
|
|
244
|
-
|
|
258
|
+
scope: {
|
|
245
259
|
1: "keyword",
|
|
246
260
|
3: "keyword",
|
|
247
261
|
4: "variable"
|
|
@@ -256,7 +270,7 @@ function b(e) {
|
|
|
256
270
|
/\s+/,
|
|
257
271
|
/in/
|
|
258
272
|
],
|
|
259
|
-
|
|
273
|
+
scope: {
|
|
260
274
|
1: "keyword",
|
|
261
275
|
3: "variable",
|
|
262
276
|
5: "keyword"
|
|
@@ -268,7 +282,7 @@ function b(e) {
|
|
|
268
282
|
/\s+/,
|
|
269
283
|
t
|
|
270
284
|
],
|
|
271
|
-
|
|
285
|
+
scope: {
|
|
272
286
|
1: "keyword",
|
|
273
287
|
3: "title.class"
|
|
274
288
|
}
|
|
@@ -279,7 +293,7 @@ function b(e) {
|
|
|
279
293
|
/\s+/,
|
|
280
294
|
t
|
|
281
295
|
],
|
|
282
|
-
|
|
296
|
+
scope: {
|
|
283
297
|
1: "keyword",
|
|
284
298
|
3: "title.class"
|
|
285
299
|
}
|
|
@@ -288,12 +302,12 @@ function b(e) {
|
|
|
288
302
|
begin: e.IDENT_RE + "::",
|
|
289
303
|
keywords: {
|
|
290
304
|
keyword: "Self",
|
|
291
|
-
built_in:
|
|
292
|
-
type:
|
|
305
|
+
built_in: r,
|
|
306
|
+
type: s
|
|
293
307
|
}
|
|
294
308
|
},
|
|
295
309
|
{
|
|
296
|
-
|
|
310
|
+
scope: "punctuation",
|
|
297
311
|
begin: "->"
|
|
298
312
|
},
|
|
299
313
|
c
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function b(e){const n=e.regex,o=/(r#)?/,t=n.concat(o,e.UNDERSCORE_IDENT_RE),a=n.concat(o,e.IDENT_RE),c={scope:"title.function.invoke",relevance:0,begin:n.concat(/\b/,/(?!(?:let|for|while|if|else|match)\b)/,a,n.lookahead(/\s*\(/))},i="([ui](8|16|32|64|128|size)|f(16|32|64|128))?",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","raw","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","f16","f32","f64","f128","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}),{scope:"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})/}]}]},{scope:"number",variants:[{begin:"\\b0b([01_]+)"+i},{begin:"\\b0o([0-7_]+)"+i},{begin:"\\b0x([A-Fa-f0-9_]+)"+i},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+i}],relevance:0},{begin:[/\bsafe/,/\s+/,/extern/],scope:{1:"keyword",3:"keyword"}},{begin:[/fn/,/\s+/,t],scope:{1:"keyword",3:"title.function"}},{scope:"meta",begin:"#!?\\[",end:"\\]",contains:[{scope:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,t],scope:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,t,/\s+/,/in/],scope:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,t],scope:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,t],scope:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:r,type:s}},{scope:"punctuation",begin:"->"},c]}}exports.default=b;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function W(t){return t?typeof t=="string"?t:t.source:null}function m(t){return e("(?=",t,")")}function e(...t){return t.map(A=>W(A)).join("")}function fe(t){const o=t[t.length-1];return typeof o=="object"&&o.constructor===Object?(t.splice(t.length-1,1),o):{}}function s(...t){return"("+(fe(t).capture?"":"?:")+t.map(c=>W(c)).join("|")+")"}new RegExp(s(/\[(?:[^\\\]]|\\.)*\]/,/\(\?<(?![=!])[^>]+>/,/\(\?'[^']+'/,/\(\??/,/\\([1-9][0-9]*)/,/\\./));const g=t=>e(/\b/,t,/\w$/.test(t)?/\b/:/\B/),he=["Protocol","Type"].map(g),K=["init","self"].map(g),ye=["Any","Self"],C=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],x=["false","nil","true"],Ne=["assignment","associativity","higherThan","left","lowerThan","none","right"],Te=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],G=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],$=s(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),Y=s($,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),S=e($,Y,"*"),j=s(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),T=s(j,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),a=e(j,T,"*"),N=e(/[A-Z]/,T,"*"),Re=["attached","autoclosure",e(/convention\(/,s("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",e(/objc\(/,a,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],_e=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function we(t){const o={match:/\s+/,relevance:0},A=t.COMMENT("/\\*","\\*/",{contains:["self"]}),c=[t.C_LINE_COMMENT_MODE,A],X={match:[/\./,s(...he,...K)],className:{2:"keyword"}},z={match:e(/\./,s(...C)),relevance:0},H=C.filter(n=>typeof n=="string").concat(["_|0"]),V=C.filter(n=>typeof n!="string").concat(ye).map(g),q={variants:[{className:"keyword",match:s(...V,...K)}]},i={$pattern:s(/\b\w+/,/#\w+/),keyword:H.concat(Te),literal:x},r=[X,z,q],Z={match:e(/\./,s(...G)),relevance:0},J={className:"built_in",match:e(/\b/,s(...G),/(?=\()/)},R=[Z,J],O={match:/->/,relevance:0},Q={className:"operator",relevance:0,variants:[{match:S},{match:`\\.(\\.|${Y})+`}]},E=[O,Q],b="([0-9]_*)+",D="([0-9a-fA-F]_*)+",d={className:"number",relevance:0,variants:[{match:`\\b(${b})(\\.(${b}))?([eE][+-]?(${b}))?\\b`},{match:`\\b0x(${D})(\\.(${D}))?([pP][+-]?(${b}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},v=(n="")=>({className:"subst",variants:[{match:e(/\\/,n,/[0\\tnr"']/)},{match:e(/\\/,n,/u\{[0-9a-fA-F]{1,8}\}/)}]}),ee=(n="")=>({className:"subst",match:e(/\\/,n,/[\t ]*(?:[\r\n]|\r\n)/)}),P=(n="")=>({className:"subst",label:"interpol",begin:e(/\\/,n,/\(/),end:/\)/}),F=(n="")=>({begin:e(n,/"""/),end:e(/"""/,n),contains:[v(n),ee(n),P(n)]}),f=(n="")=>({begin:e(n,/"/),end:e(/"/,n),contains:[v(n),P(n)]}),l={className:"string",variants:[F(),F("#"),F("##"),F("###"),f(),f("#"),f("##"),f("###")]},L=[t.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[t.BACKSLASH_ESCAPE]}],ne={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:L},_=n=>{const y=e(n,/\//),p=e(/\//,n);return{begin:y,end:p,contains:[...L,{scope:"comment",begin:`#(?!.*${p})`,end:/$/}]}},k={scope:"regexp",variants:[_("###"),_("##"),_("#"),ne]},B={match:e(/`/,a,/`/)},te={className:"variable",match:/\$\d+/},se={className:"variable",match:`\\$${T}+`},w=[B,te,se],ae={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:_e,contains:[...E,d,l]}]}},oe={scope:"keyword",match:e(/@/,s(...Re),m(s(/\(/,/\s+/)))},ce={scope:"meta",match:e(/@/,a)},h=[ae,oe,ce],u={match:m(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:e(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,T,"+")},{className:"type",match:N,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:e(/\s+&\s+/,m(N)),relevance:0}]},ie={begin:/</,end:/>/,keywords:i,contains:[...c,...r,...h,O,u]};u.contains.push(ie);const re={match:e(a,/\s*:/),keywords:"_|0",relevance:0},M={begin:/\(/,end:/\)/,relevance:0,keywords:i,contains:["self",re,...c,k,...r,...R,...E,d,l,...w,...h,u]},I={begin:/</,end:/>/,keywords:"repeat each",contains:[...c,u]},ue={begin:s(m(e(a,/\s*:/)),m(e(a,/\s+/,a,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:a}]},U={begin:/\(/,end:/\)/,keywords:i,contains:[ue,...c,...r,...E,d,l,...h,u,M],endsParent:!0,illegal:/["']/},le={match:[/(func|macro)/,/\s+/,s(B.match,a,S)],className:{1:"keyword",3:"title.function"},contains:[I,U,o],illegal:[/\[/,/%/]},Ee={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[I,U,o],illegal:/\[|%/},de={match:[/operator/,/\s+/,S],className:{1:"keyword",3:"title"}},pe={begin:[/precedencegroup/,/\s+/,N],className:{1:"keyword",3:"title"},contains:[u],keywords:[...Ne,...x],end:/}/},me={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},Ae={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},be={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,a,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:i,contains:[I,...r,{begin:/:/,end:/\{/,keywords:i,contains:[{scope:"title.class.inherited",match:N},...r],relevance:0}]};for(const n of l.variants){const y=n.contains.find(Fe=>Fe.label==="interpol");y.keywords=i;const p=[...r,...R,...E,d,l,...w];y.contains=[...p,{begin:/\(/,end:/\)/,contains:["self",...p]}]}return{name:"Swift",keywords:i,contains:[...c,le,Ee,me,Ae,be,de,pe,{beginKeywords:"import",end:/$/,contains:[...c],relevance:0},k,...r,...R,...E,d,l,...w,...h,u,M]}}exports.default=we;
|
|
@@ -14,6 +14,20 @@ function fe(t) {
|
|
|
14
14
|
function s(...t) {
|
|
15
15
|
return "(" + (fe(t).capture ? "" : "?:") + t.map((c) => W(c)).join("|") + ")";
|
|
16
16
|
}
|
|
17
|
+
new RegExp(s(
|
|
18
|
+
/\[(?:[^\\\]]|\\.)*\]/,
|
|
19
|
+
// a character class, inside which ( and \ lose their meaning
|
|
20
|
+
/\(\?<(?![=!])[^>]+>/,
|
|
21
|
+
// a named capture group `(?<name>` (not a lookbehind `(?<=` / `(?<!`)
|
|
22
|
+
/\(\?'[^']+'/,
|
|
23
|
+
// a named capture group `(?'name'`
|
|
24
|
+
/\(\??/,
|
|
25
|
+
// an opening parenthesis, capturing or non-capturing / lookahead
|
|
26
|
+
/\\([1-9][0-9]*)/,
|
|
27
|
+
// a backreference like `\1`
|
|
28
|
+
/\\./
|
|
29
|
+
// any other escape sequence
|
|
30
|
+
));
|
|
17
31
|
const g = (t) => e(
|
|
18
32
|
/\b/,
|
|
19
33
|
t,
|
|
@@ -177,7 +191,7 @@ const g = (t) => e(
|
|
|
177
191
|
"lowerThan",
|
|
178
192
|
"none",
|
|
179
193
|
"right"
|
|
180
|
-
],
|
|
194
|
+
], Re = [
|
|
181
195
|
"#colorLiteral",
|
|
182
196
|
"#column",
|
|
183
197
|
"#dsohandle",
|
|
@@ -278,11 +292,11 @@ const g = (t) => e(
|
|
|
278
292
|
// /[\u{50000}-\u{5FFFD}\u{60000-\u{6FFFD}\u{70000}-\u{7FFFD}\u{80000}-\u{8FFFD}]/u,
|
|
279
293
|
// /[\u{90000}-\u{9FFFD}\u{A0000-\u{AFFFD}\u{B0000}-\u{BFFFD}\u{C0000}-\u{CFFFD}]/u,
|
|
280
294
|
// /[\u{D0000}-\u{DFFFD}\u{E0000-\u{EFFFD}]/u
|
|
281
|
-
),
|
|
295
|
+
), R = s(
|
|
282
296
|
j,
|
|
283
297
|
/\d/,
|
|
284
298
|
/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/
|
|
285
|
-
), a = e(j,
|
|
299
|
+
), a = e(j, R, "*"), y = e(/[A-Z]/, R, "*"), Te = [
|
|
286
300
|
"attached",
|
|
287
301
|
"autoclosure",
|
|
288
302
|
e(/convention\(/, s("swift", "block", "c"), /\)/),
|
|
@@ -363,7 +377,7 @@ function we(t) {
|
|
|
363
377
|
/#\w+/
|
|
364
378
|
// number keywords
|
|
365
379
|
),
|
|
366
|
-
keyword: H.concat(
|
|
380
|
+
keyword: H.concat(Re),
|
|
367
381
|
literal: x
|
|
368
382
|
}, r = [
|
|
369
383
|
X,
|
|
@@ -376,7 +390,7 @@ function we(t) {
|
|
|
376
390
|
}, J = {
|
|
377
391
|
className: "built_in",
|
|
378
392
|
match: e(/\b/, s(...G), /(?=\()/)
|
|
379
|
-
},
|
|
393
|
+
}, T = [
|
|
380
394
|
Z,
|
|
381
395
|
J
|
|
382
396
|
], O = {
|
|
@@ -491,7 +505,7 @@ function we(t) {
|
|
|
491
505
|
match: /\$\d+/
|
|
492
506
|
}, se = {
|
|
493
507
|
className: "variable",
|
|
494
|
-
match: `\\$${
|
|
508
|
+
match: `\\$${R}+`
|
|
495
509
|
}, w = [
|
|
496
510
|
B,
|
|
497
511
|
te,
|
|
@@ -513,7 +527,7 @@ function we(t) {
|
|
|
513
527
|
] }
|
|
514
528
|
}, oe = {
|
|
515
529
|
scope: "keyword",
|
|
516
|
-
match: e(/@/, s(...
|
|
530
|
+
match: e(/@/, s(...Te), m(s(/\(/, /\s+/)))
|
|
517
531
|
}, ce = {
|
|
518
532
|
scope: "meta",
|
|
519
533
|
match: e(/@/, a)
|
|
@@ -528,7 +542,7 @@ function we(t) {
|
|
|
528
542
|
{
|
|
529
543
|
// Common Apple frameworks, for relevance boost
|
|
530
544
|
className: "type",
|
|
531
|
-
match: e(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,
|
|
545
|
+
match: e(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/, R, "+")
|
|
532
546
|
},
|
|
533
547
|
{
|
|
534
548
|
// Type identifier
|
|
@@ -580,7 +594,7 @@ function we(t) {
|
|
|
580
594
|
...c,
|
|
581
595
|
k,
|
|
582
596
|
...r,
|
|
583
|
-
...
|
|
597
|
+
...T,
|
|
584
598
|
...E,
|
|
585
599
|
d,
|
|
586
600
|
l,
|
|
@@ -745,7 +759,7 @@ function we(t) {
|
|
|
745
759
|
N.keywords = i;
|
|
746
760
|
const p = [
|
|
747
761
|
...r,
|
|
748
|
-
...
|
|
762
|
+
...T,
|
|
749
763
|
...E,
|
|
750
764
|
d,
|
|
751
765
|
l,
|
|
@@ -783,7 +797,7 @@ function we(t) {
|
|
|
783
797
|
},
|
|
784
798
|
k,
|
|
785
799
|
...r,
|
|
786
|
-
...
|
|
800
|
+
...T,
|
|
787
801
|
...E,
|
|
788
802
|
d,
|
|
789
803
|
l,
|
package/dist/utils/theme.d.ts
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
import { ThemeConfig } from '../config/config';
|
|
2
2
|
export type ResolvedThemeMode = "light" | "dark";
|
|
3
|
+
/**
|
|
4
|
+
* Layers a host's theme over the library defaults, key by key: each palette
|
|
5
|
+
* color and each brand-scale shade the host leaves out keeps its default.
|
|
6
|
+
* `mode` and `depthColors` replace outright.
|
|
7
|
+
*
|
|
8
|
+
* Without this, any `theme` at all replaced the defaults wholesale — a host
|
|
9
|
+
* setting only `light.background` also lost the default primary scale and
|
|
10
|
+
* fell through to the stylesheet's fallback, a different color entirely.
|
|
11
|
+
*
|
|
12
|
+
* The merged theme always carries both palettes, so resolve the mode from
|
|
13
|
+
* the host's *unmerged* theme: "only `dark` given → dark" depends on which
|
|
14
|
+
* palettes the host actually supplied.
|
|
15
|
+
*/
|
|
16
|
+
export declare function mergeTheme(base: ThemeConfig | undefined, override: ThemeConfig | undefined): ThemeConfig;
|
|
3
17
|
/**
|
|
4
18
|
* Resolves which palette to actually render.
|
|
5
19
|
*
|
package/package.json
CHANGED
|
@@ -1,7 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "apiuikit",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "A React UI library for rendering your API specifications",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"react",
|
|
7
|
+
"react-components",
|
|
8
|
+
"ui-kit",
|
|
9
|
+
"openapi",
|
|
10
|
+
"asyncapi",
|
|
11
|
+
"swagger",
|
|
12
|
+
"api-documentation",
|
|
13
|
+
"api-docs",
|
|
14
|
+
"api-reference",
|
|
15
|
+
"documentation",
|
|
16
|
+
"websocket",
|
|
17
|
+
"try-it",
|
|
18
|
+
"api-explorer",
|
|
19
|
+
"developer-portal"
|
|
20
|
+
],
|
|
5
21
|
"license": "Apache-2.0",
|
|
6
22
|
"bugs": {
|
|
7
23
|
"url": "https://github.com/AceTheCreator/apiuikit/issues"
|
|
@@ -41,7 +57,6 @@
|
|
|
41
57
|
"THIRD_PARTY_NOTICES.md"
|
|
42
58
|
],
|
|
43
59
|
"scripts": {
|
|
44
|
-
"dev": "vite",
|
|
45
60
|
"build": "vite build && node scripts/verifyCssIsolation.mjs && vite build --config vite.markdown.config.ts && vite build --config vite.plugin.config.ts && node scripts/verifyPackageExports.mjs",
|
|
46
61
|
"watch": "vite build --watch",
|
|
47
62
|
"prepublishOnly": "cp ../../README.md ./README.md && npm run build",
|
|
@@ -50,12 +65,13 @@
|
|
|
50
65
|
"test": "vitest run",
|
|
51
66
|
"test:watch": "vitest",
|
|
52
67
|
"lint": "eslint .",
|
|
53
|
-
"preview": "vite preview",
|
|
54
68
|
"storybook": "storybook dev -p 6006",
|
|
55
69
|
"build-storybook": "storybook build",
|
|
56
70
|
"generate:models": "tsx src/scripts/generateAsyncAPIModel.ts"
|
|
57
71
|
},
|
|
58
72
|
"dependencies": {
|
|
73
|
+
"@apiuikit/openapi-try-it-plugin": "^0.3.0",
|
|
74
|
+
"@apiuikit/ws-try-it-plugin": "^0.1.0",
|
|
59
75
|
"@asyncapi/specs": "^6.8.1",
|
|
60
76
|
"@json-schema-tools/reference-resolver": "^1.2.6",
|
|
61
77
|
"@readme/httpsnippet": "^11.4.0",
|
|
@@ -90,9 +106,9 @@
|
|
|
90
106
|
"devDependencies": {
|
|
91
107
|
"@asyncapi/modelina": "^5.10.1",
|
|
92
108
|
"@asyncapi/parser": "^3.6.0",
|
|
93
|
-
"@scalar/openapi-parser": "^0.28.10",
|
|
94
109
|
"@chromatic-com/storybook": "^3.2.3",
|
|
95
110
|
"@eslint/js": "^9.17.0",
|
|
111
|
+
"@scalar/openapi-parser": "^0.28.10",
|
|
96
112
|
"@storybook/addon-a11y": "^8.6.18",
|
|
97
113
|
"@storybook/addon-essentials": "^8.6.18",
|
|
98
114
|
"@storybook/addon-interactions": "^8.6.18",
|
package/dist/App.d.ts
DELETED