docusaurus-theme-openapi-docs 0.0.0-1000

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 (312) hide show
  1. package/LICENSE +21 -0
  2. package/babel.config.js +35 -0
  3. package/lib/index.d.ts +2 -0
  4. package/lib/index.js +81 -0
  5. package/lib/markdown/createDescription.d.ts +1 -0
  6. package/lib/markdown/createDescription.js +15 -0
  7. package/lib/markdown/schema.d.ts +3 -0
  8. package/lib/markdown/schema.js +149 -0
  9. package/lib/markdown/utils.d.ts +10 -0
  10. package/lib/markdown/utils.js +49 -0
  11. package/lib/markdown/utils.test.d.ts +1 -0
  12. package/lib/markdown/utils.test.js +43 -0
  13. package/lib/theme/ApiExplorer/Accept/index.d.ts +3 -0
  14. package/lib/theme/ApiExplorer/Accept/index.js +38 -0
  15. package/lib/theme/ApiExplorer/Accept/slice.d.ts +11 -0
  16. package/lib/theme/ApiExplorer/Accept/slice.js +22 -0
  17. package/lib/theme/ApiExplorer/ApiCodeBlock/Container/_Container.scss +7 -0
  18. package/lib/theme/ApiExplorer/ApiCodeBlock/Container/index.d.ts +4 -0
  19. package/lib/theme/ApiExplorer/ApiCodeBlock/Container/index.js +35 -0
  20. package/lib/theme/ApiExplorer/ApiCodeBlock/Content/Element.d.ts +3 -0
  21. package/lib/theme/ApiExplorer/ApiCodeBlock/Content/Element.js +41 -0
  22. package/lib/theme/ApiExplorer/ApiCodeBlock/Content/String.d.ts +3 -0
  23. package/lib/theme/ApiExplorer/ApiCodeBlock/Content/String.js +153 -0
  24. package/lib/theme/ApiExplorer/ApiCodeBlock/Content/_Content.scss +91 -0
  25. package/lib/theme/ApiExplorer/ApiCodeBlock/CopyButton/_CopyButton.scss +44 -0
  26. package/lib/theme/ApiExplorer/ApiCodeBlock/CopyButton/index.d.ts +3 -0
  27. package/lib/theme/ApiExplorer/ApiCodeBlock/CopyButton/index.js +147 -0
  28. package/lib/theme/ApiExplorer/ApiCodeBlock/ExitButton/_ExitButton.scss +16 -0
  29. package/lib/theme/ApiExplorer/ApiCodeBlock/ExitButton/index.d.ts +6 -0
  30. package/lib/theme/ApiExplorer/ApiCodeBlock/ExitButton/index.js +58 -0
  31. package/lib/theme/ApiExplorer/ApiCodeBlock/ExpandButton/_ExpandButton.scss +62 -0
  32. package/lib/theme/ApiExplorer/ApiCodeBlock/ExpandButton/index.d.ts +14 -0
  33. package/lib/theme/ApiExplorer/ApiCodeBlock/ExpandButton/index.js +248 -0
  34. package/lib/theme/ApiExplorer/ApiCodeBlock/Line/_Line.scss +34 -0
  35. package/lib/theme/ApiExplorer/ApiCodeBlock/Line/index.d.ts +3 -0
  36. package/lib/theme/ApiExplorer/ApiCodeBlock/Line/index.js +59 -0
  37. package/lib/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/_WordWrapButton.scss +10 -0
  38. package/lib/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/index.d.ts +7 -0
  39. package/lib/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/index.js +51 -0
  40. package/lib/theme/ApiExplorer/ApiCodeBlock/index.d.ts +3 -0
  41. package/lib/theme/ApiExplorer/ApiCodeBlock/index.js +110 -0
  42. package/lib/theme/ApiExplorer/Authorization/auth-types.d.ts +3 -0
  43. package/lib/theme/ApiExplorer/Authorization/auth-types.js +28 -0
  44. package/lib/theme/ApiExplorer/Authorization/index.d.ts +3 -0
  45. package/lib/theme/ApiExplorer/Authorization/index.js +160 -0
  46. package/lib/theme/ApiExplorer/Authorization/slice.d.ts +40 -0
  47. package/lib/theme/ApiExplorer/Authorization/slice.js +102 -0
  48. package/lib/theme/ApiExplorer/Body/index.d.ts +10 -0
  49. package/lib/theme/ApiExplorer/Body/index.js +381 -0
  50. package/lib/theme/ApiExplorer/Body/json2xml.js +43 -0
  51. package/lib/theme/ApiExplorer/Body/slice.d.ts +82 -0
  52. package/lib/theme/ApiExplorer/Body/slice.js +97 -0
  53. package/lib/theme/ApiExplorer/CodeSnippets/code-snippets-types.d.ts +21 -0
  54. package/lib/theme/ApiExplorer/CodeSnippets/code-snippets-types.js +8 -0
  55. package/lib/theme/ApiExplorer/CodeSnippets/index.d.ts +10 -0
  56. package/lib/theme/ApiExplorer/CodeSnippets/index.js +389 -0
  57. package/lib/theme/ApiExplorer/CodeSnippets/languages.d.ts +5 -0
  58. package/lib/theme/ApiExplorer/CodeSnippets/languages.js +95 -0
  59. package/lib/theme/ApiExplorer/CodeSnippets/languages.json +1290 -0
  60. package/lib/theme/ApiExplorer/CodeTabs/_CodeTabs.scss +501 -0
  61. package/lib/theme/ApiExplorer/CodeTabs/index.d.ts +15 -0
  62. package/lib/theme/ApiExplorer/CodeTabs/index.js +271 -0
  63. package/lib/theme/ApiExplorer/ContentType/index.d.ts +3 -0
  64. package/lib/theme/ApiExplorer/ContentType/index.js +40 -0
  65. package/lib/theme/ApiExplorer/ContentType/slice.d.ts +11 -0
  66. package/lib/theme/ApiExplorer/ContentType/slice.js +22 -0
  67. package/lib/theme/ApiExplorer/Export/index.d.ts +3 -0
  68. package/lib/theme/ApiExplorer/Export/index.js +57 -0
  69. package/lib/theme/ApiExplorer/FloatingButton/_FloatingButton.scss +27 -0
  70. package/lib/theme/ApiExplorer/FloatingButton/index.d.ts +8 -0
  71. package/lib/theme/ApiExplorer/FloatingButton/index.js +28 -0
  72. package/lib/theme/ApiExplorer/FormFileUpload/_FormFileUpload.scss +74 -0
  73. package/lib/theme/ApiExplorer/FormFileUpload/index.d.ts +7 -0
  74. package/lib/theme/ApiExplorer/FormFileUpload/index.js +173 -0
  75. package/lib/theme/ApiExplorer/FormItem/_FormItem.scss +21 -0
  76. package/lib/theme/ApiExplorer/FormItem/index.d.ts +10 -0
  77. package/lib/theme/ApiExplorer/FormItem/index.js +44 -0
  78. package/lib/theme/ApiExplorer/FormMultiSelect/_FormMultiSelect.scss +30 -0
  79. package/lib/theme/ApiExplorer/FormMultiSelect/index.d.ts +9 -0
  80. package/lib/theme/ApiExplorer/FormMultiSelect/index.js +51 -0
  81. package/lib/theme/ApiExplorer/FormSelect/_FormSelect.scss +43 -0
  82. package/lib/theme/ApiExplorer/FormSelect/index.d.ts +8 -0
  83. package/lib/theme/ApiExplorer/FormSelect/index.js +35 -0
  84. package/lib/theme/ApiExplorer/FormTextInput/_FormTextInput.scss +34 -0
  85. package/lib/theme/ApiExplorer/FormTextInput/index.d.ts +9 -0
  86. package/lib/theme/ApiExplorer/FormTextInput/index.js +73 -0
  87. package/lib/theme/ApiExplorer/LiveEditor/_LiveEditor.scss +15 -0
  88. package/lib/theme/ApiExplorer/LiveEditor/index.d.ts +6 -0
  89. package/lib/theme/ApiExplorer/LiveEditor/index.js +168 -0
  90. package/lib/theme/ApiExplorer/MethodEndpoint/_MethodEndpoint.scss +22 -0
  91. package/lib/theme/ApiExplorer/MethodEndpoint/index.d.ts +8 -0
  92. package/lib/theme/ApiExplorer/MethodEndpoint/index.js +86 -0
  93. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamArrayFormItem.d.ts +6 -0
  94. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamArrayFormItem.js +220 -0
  95. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamBooleanFormItem.d.ts +6 -0
  96. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamBooleanFormItem.js +63 -0
  97. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamMultiSelectFormItem.d.ts +6 -0
  98. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamMultiSelectFormItem.js +89 -0
  99. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamSelectFormItem.d.ts +6 -0
  100. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamSelectFormItem.js +63 -0
  101. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamTextFormItem.d.ts +6 -0
  102. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamTextFormItem.js +38 -0
  103. package/lib/theme/ApiExplorer/ParamOptions/_ParamOptions.scss +123 -0
  104. package/lib/theme/ApiExplorer/ParamOptions/index.d.ts +7 -0
  105. package/lib/theme/ApiExplorer/ParamOptions/index.js +223 -0
  106. package/lib/theme/ApiExplorer/ParamOptions/slice.d.ts +17 -0
  107. package/lib/theme/ApiExplorer/ParamOptions/slice.js +25 -0
  108. package/lib/theme/ApiExplorer/Request/_Request.scss +129 -0
  109. package/lib/theme/ApiExplorer/Request/index.d.ts +6 -0
  110. package/lib/theme/ApiExplorer/Request/index.js +396 -0
  111. package/lib/theme/ApiExplorer/Request/makeRequest.d.ts +4 -0
  112. package/lib/theme/ApiExplorer/Request/makeRequest.js +222 -0
  113. package/lib/theme/ApiExplorer/Response/_Response.scss +121 -0
  114. package/lib/theme/ApiExplorer/Response/index.d.ts +6 -0
  115. package/lib/theme/ApiExplorer/Response/index.js +193 -0
  116. package/lib/theme/ApiExplorer/Response/slice.d.ts +17 -0
  117. package/lib/theme/ApiExplorer/Response/slice.js +51 -0
  118. package/lib/theme/ApiExplorer/SecuritySchemes/index.d.ts +3 -0
  119. package/lib/theme/ApiExplorer/SecuritySchemes/index.js +380 -0
  120. package/lib/theme/ApiExplorer/Server/_Server.scss +26 -0
  121. package/lib/theme/ApiExplorer/Server/index.d.ts +3 -0
  122. package/lib/theme/ApiExplorer/Server/index.js +199 -0
  123. package/lib/theme/ApiExplorer/Server/slice.d.ts +13 -0
  124. package/lib/theme/ApiExplorer/Server/slice.js +33 -0
  125. package/lib/theme/ApiExplorer/buildPostmanRequest.d.ts +20 -0
  126. package/lib/theme/ApiExplorer/buildPostmanRequest.js +465 -0
  127. package/lib/theme/ApiExplorer/index.d.ts +7 -0
  128. package/lib/theme/ApiExplorer/index.js +41 -0
  129. package/lib/theme/ApiExplorer/persistanceMiddleware.d.ts +3 -0
  130. package/lib/theme/ApiExplorer/persistanceMiddleware.js +54 -0
  131. package/lib/theme/ApiExplorer/storage-utils.d.ts +4 -0
  132. package/lib/theme/ApiExplorer/storage-utils.js +41 -0
  133. package/lib/theme/ApiItem/Layout/index.d.ts +3 -0
  134. package/lib/theme/ApiItem/Layout/index.js +121 -0
  135. package/lib/theme/ApiItem/Layout/styles.module.css +17 -0
  136. package/lib/theme/ApiItem/hooks.d.ts +12 -0
  137. package/lib/theme/ApiItem/hooks.js +13 -0
  138. package/lib/theme/ApiItem/index.d.ts +2 -0
  139. package/lib/theme/ApiItem/index.js +238 -0
  140. package/lib/theme/ApiItem/store.d.ts +46 -0
  141. package/lib/theme/ApiItem/store.js +53 -0
  142. package/lib/theme/ApiLogo/index.d.ts +2 -0
  143. package/lib/theme/ApiLogo/index.js +51 -0
  144. package/lib/theme/ApiTabs/_ApiTabs.scss +142 -0
  145. package/lib/theme/ApiTabs/index.d.ts +7 -0
  146. package/lib/theme/ApiTabs/index.js +270 -0
  147. package/lib/theme/ArrayBrackets/index.d.ts +3 -0
  148. package/lib/theme/ArrayBrackets/index.js +50 -0
  149. package/lib/theme/DiscriminatorTabs/_DiscriminatorTabs.scss +98 -0
  150. package/lib/theme/DiscriminatorTabs/index.d.ts +3 -0
  151. package/lib/theme/DiscriminatorTabs/index.js +258 -0
  152. package/lib/theme/Markdown/Details/_Details.scss +122 -0
  153. package/lib/theme/Markdown/index.js +179 -0
  154. package/lib/theme/MimeTabs/_MimeTabs.scss +70 -0
  155. package/lib/theme/MimeTabs/index.d.ts +6 -0
  156. package/lib/theme/MimeTabs/index.js +286 -0
  157. package/lib/theme/OperationTabs/_OperationTabs.scss +72 -0
  158. package/lib/theme/OperationTabs/index.d.ts +3 -0
  159. package/lib/theme/OperationTabs/index.js +248 -0
  160. package/lib/theme/ParamsDetails/index.d.ts +6 -0
  161. package/lib/theme/ParamsDetails/index.js +85 -0
  162. package/lib/theme/ParamsItem/_ParamsItem.scss +54 -0
  163. package/lib/theme/ParamsItem/index.d.ts +25 -0
  164. package/lib/theme/ParamsItem/index.js +218 -0
  165. package/lib/theme/RequestSchema/index.d.ts +15 -0
  166. package/lib/theme/RequestSchema/index.js +194 -0
  167. package/lib/theme/ResponseExamples/index.d.ts +18 -0
  168. package/lib/theme/ResponseExamples/index.js +193 -0
  169. package/lib/theme/ResponseHeaders/index.d.ts +13 -0
  170. package/lib/theme/ResponseHeaders/index.js +39 -0
  171. package/lib/theme/ResponseSamples/_ResponseSamples.scss +3 -0
  172. package/lib/theme/ResponseSamples/index.d.ts +8 -0
  173. package/lib/theme/ResponseSamples/index.js +27 -0
  174. package/lib/theme/ResponseSchema/index.d.ts +15 -0
  175. package/lib/theme/ResponseSchema/index.js +159 -0
  176. package/lib/theme/Schema/index.d.ts +8 -0
  177. package/lib/theme/Schema/index.js +885 -0
  178. package/lib/theme/SchemaItem/_SchemaItem.scss +89 -0
  179. package/lib/theme/SchemaItem/index.d.ts +12 -0
  180. package/lib/theme/SchemaItem/index.js +213 -0
  181. package/lib/theme/SchemaTabs/_SchemaTabs.scss +61 -0
  182. package/lib/theme/SchemaTabs/index.d.ts +3 -0
  183. package/lib/theme/SchemaTabs/index.js +255 -0
  184. package/lib/theme/SkeletonLoader/index.d.ts +6 -0
  185. package/lib/theme/SkeletonLoader/index.js +20 -0
  186. package/lib/theme/StatusCodes/index.d.ts +9 -0
  187. package/lib/theme/StatusCodes/index.js +81 -0
  188. package/lib/theme/styles.scss +212 -0
  189. package/lib/types.d.ts +157 -0
  190. package/lib/types.js +8 -0
  191. package/package.json +83 -0
  192. package/src/index.ts +85 -0
  193. package/src/markdown/createDescription.ts +13 -0
  194. package/src/markdown/schema.ts +181 -0
  195. package/src/markdown/utils.test.ts +49 -0
  196. package/src/markdown/utils.ts +59 -0
  197. package/src/plugin-content-docs.d.ts +20 -0
  198. package/src/postman-code-generators.d.ts +9 -0
  199. package/src/react-magic-dropzone.d.ts +9 -0
  200. package/src/theme/ApiExplorer/Accept/index.tsx +36 -0
  201. package/src/theme/ApiExplorer/Accept/slice.ts +29 -0
  202. package/src/theme/ApiExplorer/ApiCodeBlock/Container/_Container.scss +7 -0
  203. package/src/theme/ApiExplorer/ApiCodeBlock/Container/index.tsx +32 -0
  204. package/src/theme/ApiExplorer/ApiCodeBlock/Content/Element.tsx +34 -0
  205. package/src/theme/ApiExplorer/ApiCodeBlock/Content/String.tsx +134 -0
  206. package/src/theme/ApiExplorer/ApiCodeBlock/Content/_Content.scss +91 -0
  207. package/src/theme/ApiExplorer/ApiCodeBlock/CopyButton/_CopyButton.scss +44 -0
  208. package/src/theme/ApiExplorer/ApiCodeBlock/CopyButton/index.tsx +79 -0
  209. package/src/theme/ApiExplorer/ApiCodeBlock/ExitButton/_ExitButton.scss +16 -0
  210. package/src/theme/ApiExplorer/ApiCodeBlock/ExitButton/index.tsx +55 -0
  211. package/src/theme/ApiExplorer/ApiCodeBlock/ExpandButton/_ExpandButton.scss +62 -0
  212. package/src/theme/ApiExplorer/ApiCodeBlock/ExpandButton/index.tsx +166 -0
  213. package/src/theme/ApiExplorer/ApiCodeBlock/Line/_Line.scss +34 -0
  214. package/src/theme/ApiExplorer/ApiCodeBlock/Line/index.tsx +48 -0
  215. package/src/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/_WordWrapButton.scss +10 -0
  216. package/src/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/index.tsx +54 -0
  217. package/src/theme/ApiExplorer/ApiCodeBlock/index.tsx +45 -0
  218. package/src/theme/ApiExplorer/Authorization/auth-types.ts +30 -0
  219. package/src/theme/ApiExplorer/Authorization/index.tsx +158 -0
  220. package/src/theme/ApiExplorer/Authorization/slice.ts +146 -0
  221. package/src/theme/ApiExplorer/Body/index.tsx +376 -0
  222. package/src/theme/ApiExplorer/Body/json2xml.js +43 -0
  223. package/src/theme/ApiExplorer/Body/slice.ts +133 -0
  224. package/src/theme/ApiExplorer/CodeSnippets/code-snippets-types.ts +57 -0
  225. package/src/theme/ApiExplorer/CodeSnippets/index.tsx +338 -0
  226. package/src/theme/ApiExplorer/CodeSnippets/languages.json +1290 -0
  227. package/src/theme/ApiExplorer/CodeSnippets/languages.ts +96 -0
  228. package/src/theme/ApiExplorer/CodeTabs/_CodeTabs.scss +501 -0
  229. package/src/theme/ApiExplorer/CodeTabs/index.tsx +248 -0
  230. package/src/theme/ApiExplorer/ContentType/index.tsx +38 -0
  231. package/src/theme/ApiExplorer/ContentType/slice.ts +29 -0
  232. package/src/theme/ApiExplorer/Export/index.tsx +47 -0
  233. package/src/theme/ApiExplorer/FloatingButton/_FloatingButton.scss +27 -0
  234. package/src/theme/ApiExplorer/FloatingButton/index.tsx +29 -0
  235. package/src/theme/ApiExplorer/FormFileUpload/_FormFileUpload.scss +74 -0
  236. package/src/theme/ApiExplorer/FormFileUpload/index.tsx +119 -0
  237. package/src/theme/ApiExplorer/FormItem/_FormItem.scss +21 -0
  238. package/src/theme/ApiExplorer/FormItem/index.tsx +33 -0
  239. package/src/theme/ApiExplorer/FormMultiSelect/_FormMultiSelect.scss +30 -0
  240. package/src/theme/ApiExplorer/FormMultiSelect/index.tsx +57 -0
  241. package/src/theme/ApiExplorer/FormSelect/_FormSelect.scss +43 -0
  242. package/src/theme/ApiExplorer/FormSelect/index.tsx +38 -0
  243. package/src/theme/ApiExplorer/FormTextInput/_FormTextInput.scss +34 -0
  244. package/src/theme/ApiExplorer/FormTextInput/index.tsx +80 -0
  245. package/src/theme/ApiExplorer/LiveEditor/_LiveEditor.scss +15 -0
  246. package/src/theme/ApiExplorer/LiveEditor/index.tsx +114 -0
  247. package/src/theme/ApiExplorer/MethodEndpoint/_MethodEndpoint.scss +22 -0
  248. package/src/theme/ApiExplorer/MethodEndpoint/index.tsx +91 -0
  249. package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamArrayFormItem.tsx +175 -0
  250. package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamBooleanFormItem.tsx +64 -0
  251. package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamMultiSelectFormItem.tsx +86 -0
  252. package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamSelectFormItem.tsx +65 -0
  253. package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamTextFormItem.tsx +38 -0
  254. package/src/theme/ApiExplorer/ParamOptions/_ParamOptions.scss +123 -0
  255. package/src/theme/ApiExplorer/ParamOptions/index.tsx +146 -0
  256. package/src/theme/ApiExplorer/ParamOptions/slice.ts +37 -0
  257. package/src/theme/ApiExplorer/Request/_Request.scss +129 -0
  258. package/src/theme/ApiExplorer/Request/index.tsx +309 -0
  259. package/src/theme/ApiExplorer/Request/makeRequest.ts +254 -0
  260. package/src/theme/ApiExplorer/Response/_Response.scss +121 -0
  261. package/src/theme/ApiExplorer/Response/index.tsx +157 -0
  262. package/src/theme/ApiExplorer/Response/slice.ts +52 -0
  263. package/src/theme/ApiExplorer/SecuritySchemes/index.tsx +287 -0
  264. package/src/theme/ApiExplorer/Server/_Server.scss +26 -0
  265. package/src/theme/ApiExplorer/Server/index.tsx +130 -0
  266. package/src/theme/ApiExplorer/Server/slice.ts +39 -0
  267. package/src/theme/ApiExplorer/buildPostmanRequest.ts +526 -0
  268. package/src/theme/ApiExplorer/index.tsx +41 -0
  269. package/src/theme/ApiExplorer/persistanceMiddleware.ts +71 -0
  270. package/src/theme/ApiExplorer/postman-collection.d.ts +10 -0
  271. package/src/theme/ApiExplorer/react-modal.d.ts +8 -0
  272. package/src/theme/ApiExplorer/storage-utils.ts +39 -0
  273. package/src/theme/ApiItem/Layout/index.tsx +85 -0
  274. package/src/theme/ApiItem/Layout/styles.module.css +17 -0
  275. package/src/theme/ApiItem/hooks.ts +13 -0
  276. package/src/theme/ApiItem/index.tsx +222 -0
  277. package/src/theme/ApiItem/store.ts +51 -0
  278. package/src/theme/ApiLogo/index.tsx +52 -0
  279. package/src/theme/ApiTabs/_ApiTabs.scss +142 -0
  280. package/src/theme/ApiTabs/index.tsx +238 -0
  281. package/src/theme/ArrayBrackets/index.tsx +37 -0
  282. package/src/theme/DiscriminatorTabs/_DiscriminatorTabs.scss +98 -0
  283. package/src/theme/DiscriminatorTabs/index.tsx +229 -0
  284. package/src/theme/Markdown/Details/_Details.scss +122 -0
  285. package/src/theme/Markdown/index.js +179 -0
  286. package/src/theme/MimeTabs/_MimeTabs.scss +70 -0
  287. package/src/theme/MimeTabs/index.tsx +257 -0
  288. package/src/theme/OperationTabs/_OperationTabs.scss +72 -0
  289. package/src/theme/OperationTabs/index.tsx +220 -0
  290. package/src/theme/ParamsDetails/index.tsx +81 -0
  291. package/src/theme/ParamsItem/_ParamsItem.scss +54 -0
  292. package/src/theme/ParamsItem/index.tsx +205 -0
  293. package/src/theme/RequestSchema/index.tsx +157 -0
  294. package/src/theme/ResponseExamples/index.tsx +192 -0
  295. package/src/theme/ResponseHeaders/index.tsx +49 -0
  296. package/src/theme/ResponseSamples/_ResponseSamples.scss +3 -0
  297. package/src/theme/ResponseSamples/index.tsx +31 -0
  298. package/src/theme/ResponseSchema/index.tsx +144 -0
  299. package/src/theme/Schema/index.tsx +939 -0
  300. package/src/theme/SchemaItem/_SchemaItem.scss +89 -0
  301. package/src/theme/SchemaItem/index.tsx +198 -0
  302. package/src/theme/SchemaTabs/_SchemaTabs.scss +61 -0
  303. package/src/theme/SchemaTabs/index.tsx +224 -0
  304. package/src/theme/SkeletonLoader/index.tsx +18 -0
  305. package/src/theme/StatusCodes/index.tsx +72 -0
  306. package/src/theme/styles.scss +212 -0
  307. package/src/theme-classic.d.ts +80 -0
  308. package/src/theme-openapi.d.ts +288 -0
  309. package/src/theme-translations.d.ts +9 -0
  310. package/src/types.ts +182 -0
  311. package/tsconfig.json +16 -0
  312. package/tsconfig.tsbuildinfo +1 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Palo Alto Networks
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,35 @@
1
+ /* ============================================================================
2
+ * Copyright (c) Palo Alto Networks
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ * ========================================================================== */
7
+
8
+ module.exports = {
9
+ env: {
10
+ // USED FOR NODE/RUNTIME
11
+ // maybe we should differenciate both cases because
12
+ // we mostly need to transpile some features so that node does not crash...
13
+ lib: {
14
+ presets: [
15
+ ["@babel/preset-typescript", { isTSX: true, allExtensions: true }],
16
+ ],
17
+ // Useful to transpile for older node versions
18
+ plugins: [
19
+ "@babel/plugin-transform-modules-commonjs",
20
+ "@babel/plugin-proposal-nullish-coalescing-operator",
21
+ "@babel/plugin-proposal-optional-chaining",
22
+ ],
23
+ },
24
+
25
+ // USED FOR JS SWIZZLE
26
+ // /lib-next folder is used as source to swizzle JS source code
27
+ // This JS code is created from TS source code
28
+ // This source code should look clean/human readable to be usable
29
+ "lib-next": {
30
+ presets: [
31
+ ["@babel/preset-typescript", { isTSX: true, allExtensions: true }],
32
+ ],
33
+ },
34
+ },
35
+ };
package/lib/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ import type { Plugin } from "@docusaurus/types";
2
+ export default function docusaurusThemeOpenAPI(): Plugin<void>;
package/lib/index.js ADDED
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+ /* ============================================================================
3
+ * Copyright (c) Palo Alto Networks
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ * ========================================================================== */
8
+ var __importDefault = (this && this.__importDefault) || function (mod) {
9
+ return (mod && mod.__esModule) ? mod : { "default": mod };
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.default = docusaurusThemeOpenAPI;
13
+ const path_1 = __importDefault(require("path"));
14
+ function docusaurusThemeOpenAPI() {
15
+ return {
16
+ name: "docusaurus-theme-openapi",
17
+ getClientModules() {
18
+ const modules = [
19
+ require.resolve(path_1.default.join(__dirname, "..", "lib", "theme", "styles.scss")),
20
+ ];
21
+ return modules;
22
+ },
23
+ getThemePath() {
24
+ return path_1.default.join(__dirname, "..", "lib", "theme");
25
+ },
26
+ getTypeScriptThemePath() {
27
+ return path_1.default.resolve(__dirname, "..", "src", "theme");
28
+ },
29
+ configureWebpack(_, isServer, utils) {
30
+ const rules = _.module?.rules ?? [];
31
+ const sassLoaderRule = rules.filter((r) => {
32
+ return String(r.test) === String(/\.s[ca]ss$/);
33
+ });
34
+ const { getStyleLoaders } = utils;
35
+ // Avoid conflicts with docusaurus-plugin-sass
36
+ if (sassLoaderRule.length === 0) {
37
+ return {
38
+ resolve: {
39
+ fallback: {
40
+ buffer: require.resolve("buffer/"),
41
+ },
42
+ },
43
+ plugins: [
44
+ new utils.currentBundler.instance.ProvidePlugin({
45
+ process: require.resolve("process/browser"),
46
+ Buffer: ["buffer", "Buffer"],
47
+ }),
48
+ ],
49
+ module: {
50
+ rules: [
51
+ {
52
+ test: /\.s[ac]ss$/,
53
+ include: path_1.default.resolve(__dirname, "..", "lib", "theme"),
54
+ use: [
55
+ ...getStyleLoaders(isServer, {}),
56
+ {
57
+ loader: require.resolve("sass-loader"),
58
+ options: {},
59
+ },
60
+ ],
61
+ },
62
+ ],
63
+ },
64
+ };
65
+ }
66
+ return {
67
+ resolve: {
68
+ fallback: {
69
+ buffer: require.resolve("buffer/"),
70
+ },
71
+ },
72
+ plugins: [
73
+ new utils.currentBundler.instance.ProvidePlugin({
74
+ process: require.resolve("process/browser"),
75
+ Buffer: ["buffer", "Buffer"],
76
+ }),
77
+ ],
78
+ };
79
+ },
80
+ };
81
+ }
@@ -0,0 +1 @@
1
+ export declare function createDescription(description: string | undefined): string;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* ============================================================================
3
+ * Copyright (c) Palo Alto Networks
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ * ========================================================================== */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.createDescription = createDescription;
10
+ function createDescription(description) {
11
+ if (!description) {
12
+ return "";
13
+ }
14
+ return `\n\n${description}\n\n`;
15
+ }
@@ -0,0 +1,3 @@
1
+ import { SchemaObject } from "../types";
2
+ export declare function getSchemaName(schema: SchemaObject, circular?: boolean): string;
3
+ export declare function getQualifierMessage(schema?: SchemaObject): string | undefined;
@@ -0,0 +1,149 @@
1
+ "use strict";
2
+ /* ============================================================================
3
+ * Copyright (c) Palo Alto Networks
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ * ========================================================================== */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.getSchemaName = getSchemaName;
10
+ exports.getQualifierMessage = getQualifierMessage;
11
+ function prettyName(schema, circular) {
12
+ if (schema.format) {
13
+ return schema.format;
14
+ }
15
+ if (schema.allOf) {
16
+ if (typeof schema.allOf[0] === "string") {
17
+ // @ts-ignore
18
+ if (schema.allOf[0].includes("circular")) {
19
+ return schema.allOf[0];
20
+ }
21
+ }
22
+ return "object";
23
+ }
24
+ if (schema.oneOf) {
25
+ return "object";
26
+ }
27
+ if (schema.anyOf) {
28
+ return "object";
29
+ }
30
+ if (schema.type === "object") {
31
+ return schema.xml?.name ?? schema.type;
32
+ // return schema.type;
33
+ }
34
+ if (schema.type === "array") {
35
+ return schema.xml?.name ?? schema.type;
36
+ // return schema.type;
37
+ }
38
+ return schema.title ?? schema.type;
39
+ }
40
+ function getSchemaName(schema, circular) {
41
+ if (schema.items) {
42
+ return prettyName(schema.items, circular) + "[]";
43
+ }
44
+ return prettyName(schema, circular) ?? "";
45
+ }
46
+ function getQualifierMessage(schema) {
47
+ // TODO:
48
+ // - uniqueItems
49
+ // - maxProperties
50
+ // - minProperties
51
+ // - multipleOf
52
+ if (!schema) {
53
+ return undefined;
54
+ }
55
+ if (schema.items &&
56
+ schema.minItems === undefined &&
57
+ schema.maxItems === undefined) {
58
+ return getQualifierMessage(schema.items);
59
+ }
60
+ let message = "**Possible values:** ";
61
+ let qualifierGroups = [];
62
+ if (schema.items && schema.items.enum) {
63
+ if (schema.items.enum) {
64
+ qualifierGroups.push(`[${schema.items.enum.map((e) => `\`${e}\``).join(", ")}]`);
65
+ }
66
+ }
67
+ if (schema.minLength || schema.maxLength) {
68
+ let lengthQualifier = "";
69
+ let minLength;
70
+ let maxLength;
71
+ if (schema.minLength && schema.minLength > 1) {
72
+ minLength = `\`>= ${schema.minLength} characters\``;
73
+ }
74
+ if (schema.minLength && schema.minLength === 1) {
75
+ minLength = `\`non-empty\``;
76
+ }
77
+ if (schema.maxLength) {
78
+ maxLength = `\`<= ${schema.maxLength} characters\``;
79
+ }
80
+ if (minLength && !maxLength) {
81
+ lengthQualifier += minLength;
82
+ }
83
+ if (maxLength && !minLength) {
84
+ lengthQualifier += maxLength;
85
+ }
86
+ if (minLength && maxLength) {
87
+ lengthQualifier += `${minLength} and ${maxLength}`;
88
+ }
89
+ qualifierGroups.push(lengthQualifier);
90
+ }
91
+ if (schema.minimum != null ||
92
+ schema.maximum != null ||
93
+ typeof schema.exclusiveMinimum === "number" ||
94
+ typeof schema.exclusiveMaximum === "number") {
95
+ let minmaxQualifier = "";
96
+ let minimum;
97
+ let maximum;
98
+ if (typeof schema.exclusiveMinimum === "number") {
99
+ minimum = `\`> ${schema.exclusiveMinimum}\``;
100
+ }
101
+ else if (schema.minimum != null && !schema.exclusiveMinimum) {
102
+ minimum = `\`>= ${schema.minimum}\``;
103
+ }
104
+ else if (schema.minimum != null && schema.exclusiveMinimum === true) {
105
+ minimum = `\`> ${schema.minimum}\``;
106
+ }
107
+ if (typeof schema.exclusiveMaximum === "number") {
108
+ maximum = `\`< ${schema.exclusiveMaximum}\``;
109
+ }
110
+ else if (schema.maximum != null && !schema.exclusiveMaximum) {
111
+ maximum = `\`<= ${schema.maximum}\``;
112
+ }
113
+ else if (schema.maximum != null && schema.exclusiveMaximum === true) {
114
+ maximum = `\`< ${schema.maximum}\``;
115
+ }
116
+ if (minimum && !maximum) {
117
+ minmaxQualifier += minimum;
118
+ }
119
+ if (maximum && !minimum) {
120
+ minmaxQualifier += maximum;
121
+ }
122
+ if (minimum && maximum) {
123
+ minmaxQualifier += `${minimum} and ${maximum}`;
124
+ }
125
+ qualifierGroups.push(minmaxQualifier);
126
+ }
127
+ if (schema.pattern) {
128
+ qualifierGroups.push(`Value must match regular expression \`${schema.pattern}\``);
129
+ }
130
+ // Check if discriminator mapping
131
+ const discriminator = schema;
132
+ if (discriminator.mapping) {
133
+ const values = Object.keys(discriminator.mapping);
134
+ qualifierGroups.push(`[${values.map((e) => `\`${e}\``).join(", ")}]`);
135
+ }
136
+ if (schema.enum) {
137
+ qualifierGroups.push(`[${schema.enum.map((e) => `\`${e}\``).join(", ")}]`);
138
+ }
139
+ if (schema.minItems) {
140
+ qualifierGroups.push(`\`>= ${schema.minItems}\``);
141
+ }
142
+ if (schema.maxItems) {
143
+ qualifierGroups.push(`\`<= ${schema.maxItems}\``);
144
+ }
145
+ if (qualifierGroups.length === 0) {
146
+ return undefined;
147
+ }
148
+ return message + qualifierGroups.join(", ");
149
+ }
@@ -0,0 +1,10 @@
1
+ import { ReactNode } from "react";
2
+ /** @deprecated use ReactNode from React instead */
3
+ export type Children = ReactNode;
4
+ export type Props = Record<string, any> & {
5
+ children?: ReactNode;
6
+ };
7
+ export declare function create(tag: string, props: Props): string;
8
+ export declare function guard<T>(value: T | undefined | string, cb: (value: T) => ReactNode): string | number | bigint | boolean | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined>;
9
+ export declare function render(children: ReactNode): string | number | bigint | boolean | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined>;
10
+ export declare function toString(value: any): string | undefined;
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ /* ============================================================================
3
+ * Copyright (c) Palo Alto Networks
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ * ========================================================================== */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.create = create;
10
+ exports.guard = guard;
11
+ exports.render = render;
12
+ exports.toString = toString;
13
+ function create(tag, props) {
14
+ const { children, ...rest } = props;
15
+ let propString = "";
16
+ for (const [key, value] of Object.entries(rest)) {
17
+ propString += ` ${key}={${JSON.stringify(value)}}`;
18
+ }
19
+ return `<${tag}${propString}>${render(children)}</${tag}>`;
20
+ }
21
+ function guard(value, cb) {
22
+ if (!!value || value === 0) {
23
+ const children = cb(value);
24
+ return render(children);
25
+ }
26
+ return "";
27
+ }
28
+ function render(children) {
29
+ if (Array.isArray(children)) {
30
+ return children.filter((c) => c !== undefined).join("");
31
+ }
32
+ return children ?? "";
33
+ }
34
+ function toString(value) {
35
+ // Return as-is if already string
36
+ if (typeof value === "string") {
37
+ return value;
38
+ }
39
+ // Return undefined if null or undefined
40
+ if (value == null) {
41
+ return undefined;
42
+ }
43
+ // Return formatted array if Array
44
+ if (Array.isArray(value)) {
45
+ return `[${value.join(", ")}]`;
46
+ }
47
+ // Coerce to string in all other cases,
48
+ return value + "";
49
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ /* ============================================================================
3
+ * Copyright (c) Palo Alto Networks
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ * ========================================================================== */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ const utils_1 = require("./utils");
10
+ describe("guard", () => {
11
+ it("should guard empty strings", () => {
12
+ const actual = (0, utils_1.guard)("", (_) => {
13
+ throw new Error("Should not be called");
14
+ });
15
+ expect(actual).toBe("");
16
+ });
17
+ it("should guard undefined", () => {
18
+ const actual = (0, utils_1.guard)(undefined, (value) => {
19
+ throw new Error("Should not be called");
20
+ });
21
+ expect(actual).toBe("");
22
+ });
23
+ it("should guard false booleans", () => {
24
+ const actual = (0, utils_1.guard)(false, (value) => `${value}`);
25
+ expect(actual).toBe("");
26
+ });
27
+ it("should not guard strings", () => {
28
+ const actual = (0, utils_1.guard)("hello", (value) => value);
29
+ expect(actual).toBe("hello");
30
+ });
31
+ it("should not guard numbers", () => {
32
+ const actual = (0, utils_1.guard)(1, (value) => `${value}`);
33
+ expect(actual).toBe("1");
34
+ });
35
+ it("should not guard numbers equals to 0", () => {
36
+ const actual = (0, utils_1.guard)(0, (value) => `${value}`);
37
+ expect(actual).toBe("0");
38
+ });
39
+ it("should not guard true booleans", () => {
40
+ const actual = (0, utils_1.guard)(true, (value) => `${value}`);
41
+ expect(actual).toBe("true");
42
+ });
43
+ });
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ declare function Accept(): React.JSX.Element | null;
3
+ export default Accept;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ /* ============================================================================
3
+ * Copyright (c) Palo Alto Networks
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ * ========================================================================== */
8
+ var __importDefault =
9
+ (this && this.__importDefault) ||
10
+ function (mod) {
11
+ return mod && mod.__esModule ? mod : { default: mod };
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ const react_1 = __importDefault(require("react"));
15
+ const FormItem_1 = __importDefault(require("@theme/ApiExplorer/FormItem"));
16
+ const FormSelect_1 = __importDefault(require("@theme/ApiExplorer/FormSelect"));
17
+ const hooks_1 = require("@theme/ApiItem/hooks");
18
+ const slice_1 = require("./slice");
19
+ function Accept() {
20
+ const value = (0, hooks_1.useTypedSelector)((state) => state.accept.value);
21
+ const options = (0, hooks_1.useTypedSelector)(
22
+ (state) => state.accept.options
23
+ );
24
+ const dispatch = (0, hooks_1.useTypedDispatch)();
25
+ if (options.length <= 1) {
26
+ return null;
27
+ }
28
+ return react_1.default.createElement(
29
+ FormItem_1.default,
30
+ { label: "Accept" },
31
+ react_1.default.createElement(FormSelect_1.default, {
32
+ value: value,
33
+ options: options,
34
+ onChange: (e) => dispatch((0, slice_1.setAccept)(e.target.value)),
35
+ })
36
+ );
37
+ }
38
+ exports.default = Accept;
@@ -0,0 +1,11 @@
1
+ import { PayloadAction } from "@reduxjs/toolkit";
2
+ export interface State {
3
+ value: string;
4
+ options: string[];
5
+ }
6
+ export declare const slice: import("@reduxjs/toolkit").Slice<State, {
7
+ setAccept: (state: import("immer/dist/internal").WritableDraft<State>, action: PayloadAction<string>) => void;
8
+ }, "accept">;
9
+ export declare const setAccept: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "accept/setAccept">;
10
+ declare const _default: import("redux").Reducer<State>;
11
+ export default _default;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ /* ============================================================================
3
+ * Copyright (c) Palo Alto Networks
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ * ========================================================================== */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.setAccept = exports.slice = void 0;
10
+ const toolkit_1 = require("@reduxjs/toolkit");
11
+ const initialState = {};
12
+ exports.slice = (0, toolkit_1.createSlice)({
13
+ name: "accept",
14
+ initialState,
15
+ reducers: {
16
+ setAccept: (state, action) => {
17
+ state.value = action.payload;
18
+ },
19
+ },
20
+ });
21
+ exports.setAccept = exports.slice.actions.setAccept;
22
+ exports.default = exports.slice.reducer;
@@ -0,0 +1,7 @@
1
+ .openapi-explorer__code-block-container {
2
+ height: 100%;
3
+ background: var(--prism-background-color);
4
+ color: var(--prism-color);
5
+ margin-bottom: unset;
6
+ box-shadow: var(--ifm-global-shadow-lw);
7
+ }
@@ -0,0 +1,4 @@
1
+ import React, { ComponentProps } from "react";
2
+ export default function CodeBlockContainer<T extends "div" | "pre">({ as: As, ...props }: {
3
+ as: T;
4
+ } & ComponentProps<T>): React.JSX.Element;
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ /* ============================================================================
3
+ * Copyright (c) Palo Alto Networks
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ * ========================================================================== */
8
+ var __importDefault =
9
+ (this && this.__importDefault) ||
10
+ function (mod) {
11
+ return mod && mod.__esModule ? mod : { default: mod };
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.default = CodeBlockContainer;
15
+ const react_1 = __importDefault(require("react"));
16
+ const theme_common_1 = require("@docusaurus/theme-common");
17
+ const internal_1 = require("@docusaurus/theme-common/internal");
18
+ const clsx_1 = __importDefault(require("clsx"));
19
+ function CodeBlockContainer({ as: As, ...props }) {
20
+ const prismTheme = (0, theme_common_1.usePrismTheme)();
21
+ const prismCssVariables = (0, internal_1.getPrismCssVariables)(prismTheme);
22
+ return react_1.default.createElement(
23
+ As,
24
+ // Polymorphic components are hard to type, without `oneOf` generics
25
+ {
26
+ ...props,
27
+ style: prismCssVariables,
28
+ className: (0, clsx_1.default)(
29
+ "openapi-explorer__code-block-container",
30
+ props.className,
31
+ theme_common_1.ThemeClassNames.common.codeBlock
32
+ ),
33
+ }
34
+ );
35
+ }
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import type { Props } from "@theme/CodeBlock/Content/Element";
3
+ export default function CodeBlockJSX({ children, className, }: Props): React.JSX.Element;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ /* ============================================================================
3
+ * Copyright (c) Palo Alto Networks
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ * ========================================================================== */
8
+ var __importDefault =
9
+ (this && this.__importDefault) ||
10
+ function (mod) {
11
+ return mod && mod.__esModule ? mod : { default: mod };
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.default = CodeBlockJSX;
15
+ const react_1 = __importDefault(require("react"));
16
+ const Container_1 = __importDefault(
17
+ require("@theme/ApiExplorer/ApiCodeBlock/Container")
18
+ );
19
+ const clsx_1 = __importDefault(require("clsx"));
20
+ // <pre> tags in markdown map to CodeBlocks. They may contain JSX children. When
21
+ // the children is not a simple string, we just return a styled block without
22
+ // actually highlighting.
23
+ function CodeBlockJSX({ children, className }) {
24
+ return react_1.default.createElement(
25
+ Container_1.default,
26
+ {
27
+ as: "pre",
28
+ tabIndex: 0,
29
+ className: (0, clsx_1.default)(
30
+ "openapi-explorer__code-block-standalone",
31
+ "thin-scrollbar",
32
+ className
33
+ ),
34
+ },
35
+ react_1.default.createElement(
36
+ "code",
37
+ { className: "openapi-explorer__code-block-lines" },
38
+ children
39
+ )
40
+ );
41
+ }
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import type { Props } from "@theme/CodeBlock/Content/String";
3
+ export default function CodeBlockString({ children, className: blockClassName, metastring, title: titleProp, showLineNumbers: showLineNumbersProp, language: languageProp, }: Props): React.JSX.Element;