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.
Files changed (149) hide show
  1. package/README.md +66 -7
  2. package/dist/LinkedInExtension-6xekO5bX.cjs +1 -0
  3. package/dist/LinkedInExtension-BL-4T9tt.js +21 -0
  4. package/dist/LogoExtension-BOYrY_RE.cjs +1 -0
  5. package/dist/LogoExtension-HOlSsQf-.js +27 -0
  6. package/dist/XExtension-GyRtdHLL.js +23 -0
  7. package/dist/XExtension-jAiATfg-.cjs +1 -0
  8. package/dist/apiuikit.cjs.js +1 -1
  9. package/dist/apiuikit.css +1 -1
  10. package/dist/apiuikit.es.js +24 -17
  11. package/dist/c-Bz1-FJiA.js +277 -0
  12. package/dist/c-C_Sx7N-F.cjs +1 -0
  13. package/dist/clojure-DWYEZwCD.cjs +1 -0
  14. package/dist/clojure-aY2138WD.js +135 -0
  15. package/dist/components/Authorization.d.ts +28 -17
  16. package/dist/components/ChannelAddress.d.ts +8 -2
  17. package/dist/components/CodeBlock.d.ts +4 -1
  18. package/dist/components/CodeSamples.d.ts +12 -0
  19. package/dist/components/CollapsiblePanel.d.ts +24 -0
  20. package/dist/components/CopyMarkdownButton.d.ts +15 -0
  21. package/dist/components/Examples.d.ts +4 -2
  22. package/dist/components/InfoMetadata.d.ts +21 -2
  23. package/dist/components/Markdown.d.ts +2 -0
  24. package/dist/components/MarkdownExportMenu.d.ts +13 -0
  25. package/dist/components/MethodBadge.d.ts +14 -0
  26. package/dist/components/Navigation/AsyncAPINavigation.d.ts +28 -0
  27. package/dist/components/Navigation/Navigation.d.ts +58 -0
  28. package/dist/components/Navigation/OpenAPINavigation.d.ts +22 -0
  29. package/dist/components/Navigation/SpecNavigation.d.ts +25 -0
  30. package/dist/components/Navigation/index.d.ts +4 -0
  31. package/dist/components/Navigation/sharedSections.d.ts +10 -0
  32. package/dist/components/RenderExtensions.d.ts +28 -0
  33. package/dist/components/Section.d.ts +3 -1
  34. package/dist/components/ServerAddressBanner.d.ts +16 -0
  35. package/dist/components/SidePanel.d.ts +2 -0
  36. package/dist/components/Tabs.d.ts +3 -1
  37. package/dist/components/schema/SchemaTab.d.ts +24 -3
  38. package/dist/components/tests/Authorization.test.d.ts +1 -0
  39. package/dist/components/tests/Bindings.test.d.ts +1 -0
  40. package/dist/components/tests/CodeBlock.test.d.ts +1 -0
  41. package/dist/components/tests/CodeSamples.test.d.ts +1 -0
  42. package/dist/components/tests/CopyMarkdownButton.test.d.ts +1 -0
  43. package/dist/components/tests/MarkdownExportMenu.test.d.ts +1 -0
  44. package/dist/components/tests/RenderExtensions.test.d.ts +1 -0
  45. package/dist/config/config.d.ts +10 -0
  46. package/dist/containers/AsyncAPI/AsyncAPI.d.ts +12 -6
  47. package/dist/containers/AsyncAPI/AsyncAPIRenderer.d.ts +9 -0
  48. package/dist/containers/Information/InformationSection.d.ts +22 -0
  49. package/dist/containers/Information/OpenAPIInformation.d.ts +9 -0
  50. package/dist/containers/OpenAPI/Layout.d.ts +7 -0
  51. package/dist/containers/OpenAPI/OpenAPI.d.ts +18 -0
  52. package/dist/containers/OpenAPI/OpenAPIDocumentProvider.d.ts +13 -0
  53. package/dist/containers/OpenAPI/OpenAPIRenderer.d.ts +17 -0
  54. package/dist/containers/OpenAPI/tests/OpenAPI.test.d.ts +1 -0
  55. package/dist/containers/OpenAPI/tests/OpenAPIRenderer.test.d.ts +1 -0
  56. package/dist/containers/Operation/Operations.d.ts +2 -1
  57. package/dist/containers/Path/OperationCallbacks.d.ts +37 -0
  58. package/dist/containers/Path/PathOperation.d.ts +21 -0
  59. package/dist/containers/Path/Paths.d.ts +16 -0
  60. package/dist/containers/Path/ResponseLinks.d.ts +21 -0
  61. package/dist/containers/Path/tests/PathOperation.test.d.ts +1 -0
  62. package/dist/containers/Server/OpenAPIServer.d.ts +4 -0
  63. package/dist/containers/Server/OpenAPIServers.d.ts +13 -0
  64. package/dist/contants.d.ts +7 -0
  65. package/dist/contexts/useSpec.d.ts +30 -6
  66. package/dist/crystal-BcGgviMR.cjs +1 -0
  67. package/dist/crystal-BtD5fR4q.js +283 -0
  68. package/dist/csharp-AnFv7wyC.js +382 -0
  69. package/dist/csharp-yuAGIuP4.cjs +1 -0
  70. package/dist/go-BpetKc7b.cjs +1 -0
  71. package/dist/go-CkZ9_bn0.js +151 -0
  72. package/dist/helpers/codeSamples.d.ts +92 -0
  73. package/dist/helpers/exampleSchema.d.ts +19 -0
  74. package/dist/helpers/hljsLanguages.d.ts +6 -0
  75. package/dist/helpers/openapiParser.d.ts +10 -0
  76. package/dist/helpers/openapiSearchIndex.d.ts +3 -0
  77. package/dist/helpers/resolveDocument.d.ts +8 -0
  78. package/dist/helpers/runtimeExpression.d.ts +15 -0
  79. package/dist/helpers/schemaExample.d.ts +9 -0
  80. package/dist/helpers/searchIndex.d.ts +5 -2
  81. package/dist/helpers/tests/codeSamples.test.d.ts +1 -0
  82. package/dist/helpers/tests/exampleSchema.test.d.ts +1 -0
  83. package/dist/helpers/tests/openapiSearchIndex.test.d.ts +1 -0
  84. package/dist/helpers/tests/toMarkdown.test.d.ts +1 -0
  85. package/dist/helpers/toMarkdown.d.ts +20 -0
  86. package/dist/hooks/useDocumentProviderValue.d.ts +27 -0
  87. package/dist/hooks/useFuseSearch.d.ts +14 -0
  88. package/dist/hooks/useOpenAPISearch.d.ts +9 -0
  89. package/dist/hooks/useSearchResultFocus.d.ts +18 -0
  90. package/dist/hooks/useSpecLayoutController.d.ts +51 -0
  91. package/dist/hooks/useSpecSearch.d.ts +2 -6
  92. package/dist/http--XH4hLDt.cjs +1 -0
  93. package/dist/http-DKeNlJKS.js +85 -0
  94. package/dist/icons/Copy.d.ts +6 -0
  95. package/dist/icons/Info.d.ts +5 -0
  96. package/dist/icons/Search.d.ts +3 -0
  97. package/dist/{index-D7GelPk0.cjs → index-ArzwV232.cjs} +6 -6
  98. package/dist/index-Bh4OKjMA.js +25412 -0
  99. package/dist/index-C278WDNb.cjs +139 -0
  100. package/dist/index-C4I0xC5G.js +17544 -0
  101. package/dist/index-DuW5iShy.cjs +177 -0
  102. package/dist/index-PtAFPDfk.js +18851 -0
  103. package/dist/index.d.ts +7 -0
  104. package/dist/java-BIk0G-rH.cjs +1 -0
  105. package/dist/java-BicX26Pg.js +240 -0
  106. package/dist/kotlin-BwB8b-YX.js +242 -0
  107. package/dist/kotlin-kGuORR5a.cjs +2 -0
  108. package/dist/objectivec-CnyrJ13Z.js +237 -0
  109. package/dist/objectivec-CoeV81Tz.cjs +1 -0
  110. package/dist/ocaml-0j7KDjso.cjs +1 -0
  111. package/dist/ocaml-T8IqWCjo.js +67 -0
  112. package/dist/php-BL35ZHWM.js +566 -0
  113. package/dist/php-DF4zG2hq.cjs +2 -0
  114. package/dist/powershell-CvydS3ek.cjs +1 -0
  115. package/dist/powershell-DuhUKWoO.js +236 -0
  116. package/dist/protoToJsonSchema-AciPTlBK.cjs +83 -0
  117. package/dist/protoToJsonSchema-D1lojrO3.js +6131 -0
  118. package/dist/{protobufSchemaParser-D_2rEsD4.cjs → protobufSchemaParser-7SgmMhQd.cjs} +1 -1
  119. package/dist/{protobufSchemaParser-Cj2WOp05.js → protobufSchemaParser-BohWo_pY.js} +2 -2
  120. package/dist/public/createSectionRoot.d.ts +30 -0
  121. package/dist/public/openapiSections.d.ts +26 -0
  122. package/dist/public/sections.d.ts +6 -3
  123. package/dist/r-B8fCBydS.js +207 -0
  124. package/dist/r-CYaZnHkA.cjs +1 -0
  125. package/dist/ruby-CvOid-1s.js +388 -0
  126. package/dist/ruby-nPcbuC2a.cjs +1 -0
  127. package/dist/rust-BocnJ3Ns.js +305 -0
  128. package/dist/rust-DKnYCg2f.cjs +1 -0
  129. package/dist/stories/AsyncAPI.stories.d.ts +6 -0
  130. package/dist/stories/AsyncAPIRenderer.stories.d.ts +6 -0
  131. package/dist/stories/Messages.stories.d.ts +1 -0
  132. package/dist/stories/Operations.stories.d.ts +6 -0
  133. package/dist/stories/SchemaTab.stories.d.ts +1 -0
  134. package/dist/stories/SchemaTree.stories.d.ts +1 -0
  135. package/dist/stories/Server.stories.d.ts +1 -0
  136. package/dist/stories/documentContextDecorator.d.ts +2 -2
  137. package/dist/stories/noCanvasDocsPage.d.ts +9 -0
  138. package/dist/swift-C35Eof-I.js +799 -0
  139. package/dist/swift-CAnH__EC.cjs +1 -0
  140. package/dist/types/openapi.d.ts +85 -0
  141. package/package.json +16 -3
  142. package/dist/components/Navigation.d.ts +0 -28
  143. package/dist/icons/SideBar.d.ts +0 -6
  144. package/dist/index-Bad1aEIj.js +0 -11352
  145. package/dist/index-CzcxQGxP.js +0 -25414
  146. package/dist/index-gn5KpvCL.cjs +0 -73
  147. package/dist/protoToJsonSchema-8Mm10CIx.cjs +0 -83
  148. package/dist/protoToJsonSchema-BJpwl2Am.js +0 -6174
  149. package/dist/vite.svg +0 -1
@@ -0,0 +1,236 @@
1
+ function y(e) {
2
+ const l = [
3
+ "string",
4
+ "char",
5
+ "byte",
6
+ "int",
7
+ "long",
8
+ "bool",
9
+ "decimal",
10
+ "single",
11
+ "double",
12
+ "DateTime",
13
+ "xml",
14
+ "array",
15
+ "hashtable",
16
+ "void"
17
+ ], p = "Add|Clear|Close|Copy|Enter|Exit|Find|Format|Get|Hide|Join|Lock|Move|New|Open|Optimize|Pop|Push|Redo|Remove|Rename|Reset|Resize|Search|Select|Set|Show|Skip|Split|Step|Switch|Undo|Unlock|Watch|Backup|Checkpoint|Compare|Compress|Convert|ConvertFrom|ConvertTo|Dismount|Edit|Expand|Export|Group|Import|Initialize|Limit|Merge|Mount|Out|Publish|Restore|Save|Sync|Unpublish|Update|Approve|Assert|Build|Complete|Confirm|Deny|Deploy|Disable|Enable|Install|Invoke|Register|Request|Restart|Resume|Start|Stop|Submit|Suspend|Uninstall|Unregister|Wait|Debug|Measure|Ping|Repair|Resolve|Test|Trace|Connect|Disconnect|Read|Receive|Send|Write|Block|Grant|Protect|Revoke|Unblock|Unprotect|Use|ForEach|Sort|Tee|Where", g = "-and|-as|-band|-bnot|-bor|-bxor|-casesensitive|-ccontains|-ceq|-cge|-cgt|-cle|-clike|-clt|-cmatch|-cne|-cnotcontains|-cnotlike|-cnotmatch|-contains|-creplace|-csplit|-eq|-exact|-f|-file|-ge|-gt|-icontains|-ieq|-ige|-igt|-ile|-ilike|-ilt|-imatch|-in|-ine|-inotcontains|-inotlike|-inotmatch|-ireplace|-is|-isnot|-isplit|-join|-le|-like|-lt|-match|-ne|-not|-notcontains|-notin|-notlike|-notmatch|-or|-regex|-replace|-shl|-shr|-split|-wildcard|-xor", s = {
18
+ $pattern: /-?[A-z\.\-]+\b/,
19
+ keyword: "if else foreach return do while until elseif begin for trap data dynamicparam end break throw param continue finally in switch exit filter try process catch hidden static parameter",
20
+ // "echo" relevance has been set to 0 to avoid auto-detect conflicts with shell transcripts
21
+ built_in: "ac asnp cat cd CFS chdir clc clear clhy cli clp cls clv cnsn compare copy cp cpi cpp curl cvpa dbp del diff dir dnsn ebp echo|0 epal epcsv epsn erase etsn exsn fc fhx fl ft fw gal gbp gc gcb gci gcm gcs gdr gerr ghy gi gin gjb gl gm gmo gp gps gpv group gsn gsnp gsv gtz gu gv gwmi h history icm iex ihy ii ipal ipcsv ipmo ipsn irm ise iwmi iwr kill lp ls man md measure mi mount move mp mv nal ndr ni nmo npssc nsn nv ogv oh popd ps pushd pwd r rbp rcjb rcsn rd rdr ren ri rjb rm rmdir rmo rni rnp rp rsn rsnp rujb rv rvpa rwmi sajb sal saps sasv sbp sc scb select set shcm si sl sleep sls sort sp spjb spps spsv start stz sujb sv swmi tee trcm type wget where wjb write"
22
+ // TODO: 'validate[A-Z]+' can't work in keywords
23
+ }, d = /\w[\w\d]*((-)[\w\d]+)*/, t = {
24
+ begin: "`[\\s\\S]",
25
+ relevance: 0
26
+ }, n = {
27
+ className: "variable",
28
+ variants: [
29
+ { begin: /\$\B/ },
30
+ {
31
+ className: "keyword",
32
+ begin: /\$this/
33
+ },
34
+ { begin: /\$[\w\d][\w\d_:]*/ }
35
+ ]
36
+ }, m = {
37
+ className: "literal",
38
+ begin: /\$(null|true|false)\b/
39
+ }, i = {
40
+ className: "string",
41
+ variants: [
42
+ {
43
+ begin: /"/,
44
+ end: /"/
45
+ },
46
+ {
47
+ begin: /@"/,
48
+ end: /^"@/
49
+ }
50
+ ],
51
+ contains: [
52
+ t,
53
+ n,
54
+ {
55
+ className: "variable",
56
+ begin: /\$[A-z]/,
57
+ end: /[^A-z]/
58
+ }
59
+ ]
60
+ }, a = {
61
+ className: "string",
62
+ variants: [
63
+ {
64
+ begin: /'/,
65
+ end: /'/
66
+ },
67
+ {
68
+ begin: /@'/,
69
+ end: /^'@/
70
+ }
71
+ ]
72
+ }, b = {
73
+ className: "doctag",
74
+ variants: [
75
+ /* no paramater help tags */
76
+ { begin: /\.(synopsis|description|example|inputs|outputs|notes|link|component|role|functionality)/ },
77
+ /* one parameter help tags */
78
+ { begin: /\.(parameter|forwardhelptargetname|forwardhelpcategory|remotehelprunspace|externalhelp)\s+\S+/ }
79
+ ]
80
+ }, u = e.inherit(
81
+ e.COMMENT(null, null),
82
+ {
83
+ variants: [
84
+ /* single-line comment */
85
+ {
86
+ begin: /#/,
87
+ end: /$/
88
+ },
89
+ /* multi-line comment */
90
+ {
91
+ begin: /<#/,
92
+ end: /#>/
93
+ }
94
+ ],
95
+ contains: [b]
96
+ }
97
+ ), v = {
98
+ className: "built_in",
99
+ variants: [{ begin: "(".concat(p, ")+(-)[\\w\\d]+") }]
100
+ }, S = {
101
+ className: "class",
102
+ beginKeywords: "class enum",
103
+ end: /\s*[{]/,
104
+ excludeEnd: !0,
105
+ relevance: 0,
106
+ contains: [e.TITLE_MODE]
107
+ }, h = {
108
+ className: "function",
109
+ begin: /function\s+/,
110
+ end: /\s*\{|$/,
111
+ excludeEnd: !0,
112
+ returnBegin: !0,
113
+ relevance: 0,
114
+ contains: [
115
+ {
116
+ begin: "function",
117
+ relevance: 0,
118
+ className: "keyword"
119
+ },
120
+ {
121
+ className: "title",
122
+ begin: d,
123
+ relevance: 0
124
+ },
125
+ {
126
+ begin: /\(/,
127
+ end: /\)/,
128
+ className: "params",
129
+ relevance: 0,
130
+ contains: [n]
131
+ }
132
+ // CMDLETS
133
+ ]
134
+ }, w = {
135
+ begin: /using\s/,
136
+ end: /$/,
137
+ returnBegin: !0,
138
+ contains: [
139
+ i,
140
+ a,
141
+ {
142
+ className: "keyword",
143
+ begin: /(using|assembly|command|module|namespace|type)/
144
+ }
145
+ ]
146
+ }, E = { variants: [
147
+ // PS literals are pretty verbose so it's a good idea to accent them a bit.
148
+ {
149
+ className: "operator",
150
+ begin: "(".concat(g, ")\\b")
151
+ },
152
+ {
153
+ className: "literal",
154
+ begin: /(-){1,2}[\w\d-]+/,
155
+ relevance: 0
156
+ }
157
+ ] }, N = {
158
+ className: "selector-tag",
159
+ begin: /@\B/,
160
+ relevance: 0
161
+ }, c = {
162
+ className: "function",
163
+ begin: /\[.*\]\s*[\w]+[ ]??\(/,
164
+ end: /$/,
165
+ returnBegin: !0,
166
+ relevance: 0,
167
+ contains: [
168
+ {
169
+ className: "keyword",
170
+ begin: "(".concat(
171
+ s.keyword.toString().replace(
172
+ /\s/g,
173
+ "|"
174
+ ),
175
+ ")\\b"
176
+ ),
177
+ endsParent: !0,
178
+ relevance: 0
179
+ },
180
+ e.inherit(e.TITLE_MODE, { endsParent: !0 })
181
+ ]
182
+ }, r = [
183
+ // STATIC_MEMBER,
184
+ c,
185
+ u,
186
+ t,
187
+ e.NUMBER_MODE,
188
+ i,
189
+ a,
190
+ // PS_NEW_OBJECT_TYPE,
191
+ v,
192
+ n,
193
+ m,
194
+ N
195
+ ], o = {
196
+ begin: /\[/,
197
+ end: /\]/,
198
+ excludeBegin: !0,
199
+ excludeEnd: !0,
200
+ relevance: 0,
201
+ contains: [].concat(
202
+ "self",
203
+ r,
204
+ {
205
+ begin: "(" + l.join("|") + ")",
206
+ className: "built_in",
207
+ relevance: 0
208
+ },
209
+ {
210
+ className: "type",
211
+ begin: /[\.\w\d]+/,
212
+ relevance: 0
213
+ }
214
+ )
215
+ };
216
+ return c.contains.unshift(o), {
217
+ name: "PowerShell",
218
+ aliases: [
219
+ "pwsh",
220
+ "ps",
221
+ "ps1"
222
+ ],
223
+ case_insensitive: !0,
224
+ keywords: s,
225
+ contains: r.concat(
226
+ S,
227
+ h,
228
+ w,
229
+ E,
230
+ o
231
+ )
232
+ };
233
+ }
234
+ export {
235
+ y as default
236
+ };