docusaurus-theme-openapi-docs 0.0.0-618 → 0.0.0-684

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 (390) hide show
  1. package/lib/index.d.ts +2 -0
  2. package/lib/index.js +53 -27
  3. package/lib/markdown/createDescription.d.ts +1 -0
  4. package/lib/markdown/createDescription.js +8 -11
  5. package/lib/markdown/schema.d.ts +3 -0
  6. package/lib/markdown/schema.js +138 -139
  7. package/lib/markdown/utils.d.ts +8 -0
  8. package/lib/markdown/utils.js +36 -42
  9. package/lib/theme/ApiDemoPanel/ApiCodeBlock/ExpandButton/index.js +165 -0
  10. package/lib/theme/ApiDemoPanel/ApiCodeBlock/Line/_Line.scss +46 -0
  11. package/lib/theme/ApiExplorer/Accept/index.d.ts +3 -0
  12. package/lib/theme/ApiExplorer/Accept/index.js +38 -0
  13. package/lib/theme/ApiExplorer/Accept/slice.d.ts +11 -0
  14. package/{lib-next/theme/ApiDemoPanel → lib/theme/ApiExplorer}/Accept/slice.js +7 -5
  15. package/lib/theme/ApiExplorer/ApiCodeBlock/Container/_Container.scss +7 -0
  16. package/lib/theme/ApiExplorer/ApiCodeBlock/Container/index.js +29 -0
  17. package/lib/theme/ApiExplorer/ApiCodeBlock/Content/Element.js +30 -0
  18. package/lib/theme/ApiExplorer/ApiCodeBlock/Content/String.js +134 -0
  19. package/lib/theme/ApiExplorer/ApiCodeBlock/Content/_Content.scss +91 -0
  20. package/lib/theme/ApiExplorer/ApiCodeBlock/CopyButton/_CopyButton.scss +44 -0
  21. package/lib/theme/ApiExplorer/ApiCodeBlock/CopyButton/index.js +74 -0
  22. package/lib/theme/ApiExplorer/ApiCodeBlock/ExitButton/_ExitButton.scss +16 -0
  23. package/lib/theme/ApiExplorer/ApiCodeBlock/ExitButton/index.js +47 -0
  24. package/lib/theme/ApiExplorer/ApiCodeBlock/ExpandButton/_ExpandButton.scss +62 -0
  25. package/lib/theme/ApiExplorer/ApiCodeBlock/ExpandButton/index.js +156 -0
  26. package/lib/theme/ApiExplorer/ApiCodeBlock/Line/_Line.scss +46 -0
  27. package/lib/theme/ApiExplorer/ApiCodeBlock/Line/index.js +47 -0
  28. package/lib/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/_WordWrapButton.scss +10 -0
  29. package/lib/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/index.js +44 -0
  30. package/lib/theme/ApiExplorer/ApiCodeBlock/index.js +40 -0
  31. package/lib/theme/ApiExplorer/Authorization/auth-types.d.ts +3 -0
  32. package/lib/theme/{ApiDemoPanel → ApiExplorer}/Authorization/auth-types.js +4 -10
  33. package/lib/theme/ApiExplorer/Authorization/index.d.ts +3 -0
  34. package/lib/theme/ApiExplorer/Authorization/index.js +157 -0
  35. package/lib/theme/ApiExplorer/Authorization/slice.d.ts +40 -0
  36. package/{lib-next/theme/ApiDemoPanel → lib/theme/ApiExplorer}/Authorization/slice.js +23 -16
  37. package/lib/theme/ApiExplorer/Body/index.d.ts +10 -0
  38. package/lib/theme/ApiExplorer/Body/index.js +363 -0
  39. package/lib/theme/ApiExplorer/Body/slice.d.ts +82 -0
  40. package/{lib-next/theme/ApiDemoPanel → lib/theme/ApiExplorer}/Body/slice.js +21 -12
  41. package/lib/theme/ApiExplorer/CodeSnippets/index.d.ts +20 -0
  42. package/lib/theme/ApiExplorer/CodeSnippets/index.js +406 -0
  43. package/lib/theme/ApiExplorer/CodeTabs/_CodeTabs.scss +291 -0
  44. package/lib/theme/ApiExplorer/CodeTabs/index.js +174 -0
  45. package/lib/theme/ApiExplorer/ContentType/index.d.ts +3 -0
  46. package/lib/theme/ApiExplorer/ContentType/index.js +40 -0
  47. package/lib/theme/ApiExplorer/ContentType/slice.d.ts +11 -0
  48. package/{lib-next/theme/ApiDemoPanel → lib/theme/ApiExplorer}/ContentType/slice.js +7 -5
  49. package/lib/theme/ApiExplorer/Export/index.d.ts +3 -0
  50. package/lib/theme/ApiExplorer/Export/index.js +57 -0
  51. package/lib/theme/ApiExplorer/FloatingButton/_FloatingButton.scss +25 -0
  52. package/lib/theme/ApiExplorer/FloatingButton/index.d.ts +8 -0
  53. package/lib/theme/ApiExplorer/FloatingButton/index.js +28 -0
  54. package/{lib-next/theme/ApiDemoPanel/FormFileUpload/styles.module.css → lib/theme/ApiExplorer/FormFileUpload/_FormFileUpload.scss} +32 -35
  55. package/lib/theme/ApiExplorer/FormFileUpload/index.d.ts +7 -0
  56. package/lib/theme/ApiExplorer/FormFileUpload/index.js +161 -0
  57. package/lib/theme/ApiExplorer/FormItem/_FormItem.scss +21 -0
  58. package/lib/theme/ApiExplorer/FormItem/index.d.ts +10 -0
  59. package/lib/theme/ApiExplorer/FormItem/index.js +44 -0
  60. package/lib/theme/ApiExplorer/FormMultiSelect/_FormMultiSelect.scss +30 -0
  61. package/lib/theme/ApiExplorer/FormMultiSelect/index.d.ts +9 -0
  62. package/lib/theme/ApiExplorer/FormMultiSelect/index.js +51 -0
  63. package/{src/theme/ApiDemoPanel/FormSelect/styles.module.css → lib/theme/ApiExplorer/FormSelect/_FormSelect.scss} +15 -23
  64. package/lib/theme/ApiExplorer/FormSelect/index.d.ts +8 -0
  65. package/lib/theme/ApiExplorer/FormSelect/index.js +35 -0
  66. package/lib/theme/ApiExplorer/FormTextInput/_FormTextInput.scss +34 -0
  67. package/lib/theme/ApiExplorer/FormTextInput/index.d.ts +9 -0
  68. package/lib/theme/ApiExplorer/FormTextInput/index.js +73 -0
  69. package/lib/theme/ApiExplorer/LiveEditor/_LiveEditor.scss +15 -0
  70. package/lib/theme/ApiExplorer/LiveEditor/index.d.ts +6 -0
  71. package/lib/theme/ApiExplorer/LiveEditor/index.js +154 -0
  72. package/lib/theme/ApiExplorer/MethodEndpoint/_MethodEndpoint.scss +22 -0
  73. package/lib/theme/ApiExplorer/MethodEndpoint/index.d.ts +7 -0
  74. package/lib/theme/ApiExplorer/MethodEndpoint/index.js +83 -0
  75. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamArrayFormItem.d.ts +6 -0
  76. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamArrayFormItem.js +194 -0
  77. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamBooleanFormItem.d.ts +6 -0
  78. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamBooleanFormItem.js +63 -0
  79. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamMultiSelectFormItem.d.ts +6 -0
  80. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamMultiSelectFormItem.js +89 -0
  81. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamSelectFormItem.d.ts +6 -0
  82. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamSelectFormItem.js +63 -0
  83. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamTextFormItem.d.ts +6 -0
  84. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamTextFormItem.js +38 -0
  85. package/{src/theme/ApiDemoPanel/ParamOptions/styles.module.css → lib/theme/ApiExplorer/ParamOptions/_ParamOptions.scss} +38 -92
  86. package/lib/theme/ApiExplorer/ParamOptions/index.d.ts +7 -0
  87. package/lib/theme/ApiExplorer/ParamOptions/index.js +210 -0
  88. package/lib/theme/ApiExplorer/ParamOptions/slice.d.ts +17 -0
  89. package/{lib-next/theme/ApiDemoPanel → lib/theme/ApiExplorer}/ParamOptions/slice.js +7 -5
  90. package/lib/theme/ApiExplorer/Request/_Request.scss +122 -0
  91. package/lib/theme/ApiExplorer/Request/index.d.ts +6 -0
  92. package/lib/theme/ApiExplorer/Request/index.js +365 -0
  93. package/lib/theme/ApiExplorer/Request/makeRequest.d.ts +4 -0
  94. package/{lib-next/theme/ApiDemoPanel/Execute → lib/theme/ApiExplorer/Request}/makeRequest.js +10 -9
  95. package/lib/theme/ApiExplorer/Response/_Response.scss +119 -0
  96. package/lib/theme/ApiExplorer/Response/index.d.ts +6 -0
  97. package/lib/theme/ApiExplorer/Response/index.js +190 -0
  98. package/lib/theme/ApiExplorer/Response/slice.d.ts +17 -0
  99. package/lib/theme/ApiExplorer/Response/slice.js +51 -0
  100. package/lib/theme/ApiExplorer/SecuritySchemes/index.d.ts +3 -0
  101. package/lib/theme/ApiExplorer/SecuritySchemes/index.js +380 -0
  102. package/{src/theme/ApiDemoPanel/Request/styles.module.css → lib/theme/ApiExplorer/Server/_Server.scss} +15 -7
  103. package/lib/theme/ApiExplorer/Server/index.d.ts +3 -0
  104. package/lib/theme/ApiExplorer/Server/index.js +187 -0
  105. package/lib/theme/ApiExplorer/Server/slice.d.ts +13 -0
  106. package/{lib-next/theme/ApiDemoPanel → lib/theme/ApiExplorer}/Server/slice.js +10 -5
  107. package/lib/theme/ApiExplorer/buildPostmanRequest.d.ts +20 -0
  108. package/{lib-next/theme/ApiDemoPanel → lib/theme/ApiExplorer}/buildPostmanRequest.js +27 -40
  109. package/lib/theme/ApiExplorer/index.d.ts +7 -0
  110. package/lib/theme/ApiExplorer/index.js +37 -0
  111. package/lib/theme/ApiExplorer/persistanceMiddleware.d.ts +3 -0
  112. package/{lib-next/theme/ApiDemoPanel → lib/theme/ApiExplorer}/persistanceMiddleware.js +11 -14
  113. package/lib/theme/ApiExplorer/storage-utils.d.ts +4 -0
  114. package/lib/theme/{ApiDemoPanel → ApiExplorer}/storage-utils.js +14 -13
  115. package/lib/theme/ApiItem/Layout/index.d.ts +4 -0
  116. package/lib/theme/ApiItem/Layout/index.js +78 -56
  117. package/lib/theme/ApiItem/hooks.d.ts +12 -0
  118. package/lib/theme/ApiItem/hooks.js +5 -10
  119. package/lib/theme/ApiItem/index.d.ts +4 -0
  120. package/lib/theme/ApiItem/index.js +141 -118
  121. package/lib/theme/ApiItem/store.d.ts +46 -0
  122. package/lib/theme/ApiItem/store.js +44 -34
  123. package/lib/theme/ApiLogo/index.d.ts +2 -0
  124. package/lib/theme/ApiLogo/index.js +34 -32
  125. package/lib/theme/ApiTabs/_ApiTabs.scss +140 -0
  126. package/lib/theme/ApiTabs/index.js +105 -190
  127. package/lib/theme/DiscriminatorTabs/_DiscriminatorTabs.scss +97 -0
  128. package/lib/theme/DiscriminatorTabs/index.js +102 -189
  129. package/lib/theme/Markdown/Details/_Details.scss +119 -0
  130. package/lib/theme/MimeTabs/_MimeTabs.scss +69 -0
  131. package/lib/theme/MimeTabs/index.js +125 -199
  132. package/lib/theme/ParamsItem/_ParamsItem.scss +54 -0
  133. package/lib/theme/ParamsItem/index.js +9 -8
  134. package/lib/theme/ResponseSamples/_ResponseSamples.scss +3 -0
  135. package/lib/theme/ResponseSamples/index.js +2 -7
  136. package/lib/theme/SchemaItem/_SchemaItem.scss +89 -0
  137. package/lib/theme/SchemaItem/index.js +31 -22
  138. package/lib/theme/SchemaTabs/_SchemaTabs.scss +64 -0
  139. package/lib/theme/SchemaTabs/index.js +97 -185
  140. package/lib/theme/styles.scss +160 -0
  141. package/lib/types.d.ts +157 -0
  142. package/lib/types.js +8 -1
  143. package/package.json +17 -23
  144. package/src/index.ts +33 -3
  145. package/src/theme/ApiDemoPanel/ApiCodeBlock/ExpandButton/index.js +165 -0
  146. package/src/theme/ApiDemoPanel/ApiCodeBlock/Line/_Line.scss +46 -0
  147. package/src/theme/{ApiDemoPanel → ApiExplorer}/Accept/index.tsx +2 -2
  148. package/src/theme/ApiExplorer/ApiCodeBlock/Container/_Container.scss +7 -0
  149. package/src/theme/ApiExplorer/ApiCodeBlock/Container/index.js +29 -0
  150. package/src/theme/ApiExplorer/ApiCodeBlock/Content/Element.js +30 -0
  151. package/src/theme/ApiExplorer/ApiCodeBlock/Content/String.js +134 -0
  152. package/src/theme/ApiExplorer/ApiCodeBlock/Content/_Content.scss +91 -0
  153. package/src/theme/ApiExplorer/ApiCodeBlock/CopyButton/_CopyButton.scss +44 -0
  154. package/src/theme/ApiExplorer/ApiCodeBlock/CopyButton/index.js +74 -0
  155. package/src/theme/ApiExplorer/ApiCodeBlock/ExitButton/_ExitButton.scss +16 -0
  156. package/src/theme/ApiExplorer/ApiCodeBlock/ExitButton/index.js +47 -0
  157. package/src/theme/ApiExplorer/ApiCodeBlock/ExpandButton/_ExpandButton.scss +62 -0
  158. package/src/theme/ApiExplorer/ApiCodeBlock/ExpandButton/index.js +156 -0
  159. package/src/theme/ApiExplorer/ApiCodeBlock/Line/_Line.scss +46 -0
  160. package/src/theme/ApiExplorer/ApiCodeBlock/Line/index.js +47 -0
  161. package/src/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/_WordWrapButton.scss +10 -0
  162. package/src/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/index.js +44 -0
  163. package/src/theme/ApiExplorer/ApiCodeBlock/index.js +40 -0
  164. package/src/theme/{ApiDemoPanel → ApiExplorer}/Authorization/index.tsx +3 -3
  165. package/src/theme/{ApiDemoPanel → ApiExplorer}/Authorization/slice.ts +1 -1
  166. package/src/theme/{ApiDemoPanel → ApiExplorer}/Body/index.tsx +64 -41
  167. package/src/theme/{ApiDemoPanel/Curl → ApiExplorer/CodeSnippets}/index.tsx +94 -34
  168. package/src/theme/ApiExplorer/CodeTabs/_CodeTabs.scss +291 -0
  169. package/src/theme/ApiExplorer/CodeTabs/index.js +174 -0
  170. package/src/theme/{ApiDemoPanel → ApiExplorer}/ContentType/index.tsx +2 -2
  171. package/src/theme/ApiExplorer/FloatingButton/_FloatingButton.scss +25 -0
  172. package/src/theme/{ApiDemoPanel → ApiExplorer}/FloatingButton/index.tsx +1 -3
  173. package/src/theme/{ApiDemoPanel/FormFileUpload/styles.module.css → ApiExplorer/FormFileUpload/_FormFileUpload.scss} +32 -35
  174. package/src/theme/{ApiDemoPanel → ApiExplorer}/FormFileUpload/index.tsx +10 -6
  175. package/src/theme/ApiExplorer/FormItem/_FormItem.scss +21 -0
  176. package/src/theme/{ApiDemoPanel → ApiExplorer}/FormItem/index.tsx +8 -12
  177. package/src/theme/ApiExplorer/FormMultiSelect/_FormMultiSelect.scss +30 -0
  178. package/src/theme/{ApiDemoPanel → ApiExplorer}/FormMultiSelect/index.tsx +6 -3
  179. package/{lib/theme/ApiDemoPanel/FormSelect/styles.module.css → src/theme/ApiExplorer/FormSelect/_FormSelect.scss} +15 -23
  180. package/src/theme/{ApiDemoPanel → ApiExplorer}/FormSelect/index.tsx +5 -3
  181. package/src/theme/ApiExplorer/FormTextInput/_FormTextInput.scss +34 -0
  182. package/src/theme/ApiExplorer/FormTextInput/index.tsx +80 -0
  183. package/src/theme/ApiExplorer/LiveEditor/_LiveEditor.scss +15 -0
  184. package/src/theme/ApiExplorer/LiveEditor/index.tsx +112 -0
  185. package/src/theme/ApiExplorer/MethodEndpoint/_MethodEndpoint.scss +22 -0
  186. package/src/theme/ApiExplorer/MethodEndpoint/index.tsx +87 -0
  187. package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamArrayFormItem.tsx +156 -0
  188. package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamBooleanFormItem.tsx +64 -0
  189. package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamMultiSelectFormItem.tsx +86 -0
  190. package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamSelectFormItem.tsx +65 -0
  191. package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamTextFormItem.tsx +38 -0
  192. package/{lib-next/theme/ApiDemoPanel/ParamOptions/styles.module.css → src/theme/ApiExplorer/ParamOptions/_ParamOptions.scss} +38 -92
  193. package/src/theme/ApiExplorer/ParamOptions/index.tsx +145 -0
  194. package/src/theme/ApiExplorer/Request/_Request.scss +122 -0
  195. package/src/theme/ApiExplorer/Request/index.tsx +286 -0
  196. package/src/theme/{ApiDemoPanel/Execute → ApiExplorer/Request}/makeRequest.ts +9 -6
  197. package/src/theme/ApiExplorer/Response/_Response.scss +119 -0
  198. package/src/theme/ApiExplorer/Response/index.tsx +154 -0
  199. package/src/theme/{ApiDemoPanel → ApiExplorer}/Response/slice.ts +22 -1
  200. package/src/theme/{ApiDemoPanel → ApiExplorer}/SecuritySchemes/index.tsx +5 -3
  201. package/{lib/theme/ApiDemoPanel/Request/styles.module.css → src/theme/ApiExplorer/Server/_Server.scss} +15 -7
  202. package/src/theme/{ApiDemoPanel → ApiExplorer}/Server/index.tsx +13 -17
  203. package/src/theme/{ApiDemoPanel → ApiExplorer}/buildPostmanRequest.ts +2 -2
  204. package/src/theme/{ApiDemoPanel → ApiExplorer}/index.tsx +14 -17
  205. package/src/theme/{ApiDemoPanel → ApiExplorer}/persistanceMiddleware.ts +1 -1
  206. package/src/theme/ApiItem/index.tsx +7 -7
  207. package/src/theme/ApiItem/store.ts +7 -7
  208. package/src/theme/ApiTabs/_ApiTabs.scss +140 -0
  209. package/src/theme/ApiTabs/index.js +105 -190
  210. package/src/theme/DiscriminatorTabs/_DiscriminatorTabs.scss +97 -0
  211. package/src/theme/DiscriminatorTabs/index.js +102 -189
  212. package/src/theme/Markdown/Details/_Details.scss +119 -0
  213. package/src/theme/MimeTabs/_MimeTabs.scss +69 -0
  214. package/src/theme/MimeTabs/index.js +125 -199
  215. package/src/theme/ParamsItem/_ParamsItem.scss +54 -0
  216. package/src/theme/ParamsItem/index.js +9 -8
  217. package/src/theme/ResponseSamples/_ResponseSamples.scss +3 -0
  218. package/src/theme/ResponseSamples/index.js +2 -7
  219. package/src/theme/SchemaItem/_SchemaItem.scss +89 -0
  220. package/src/theme/SchemaItem/index.js +31 -22
  221. package/src/theme/SchemaTabs/_SchemaTabs.scss +64 -0
  222. package/src/theme/SchemaTabs/index.js +97 -185
  223. package/src/theme/styles.scss +160 -0
  224. package/src/theme-openapi.d.ts +90 -47
  225. package/tsconfig.json +6 -3
  226. package/lib/postman-code-generators.d.ts +0 -9
  227. package/lib/react-magic-dropzone.d.ts +0 -9
  228. package/lib/theme/ApiDemoPanel/Accept/index.js +0 -32
  229. package/lib/theme/ApiDemoPanel/Accept/slice.js +0 -31
  230. package/lib/theme/ApiDemoPanel/Authorization/index.js +0 -107
  231. package/lib/theme/ApiDemoPanel/Authorization/slice.js +0 -123
  232. package/lib/theme/ApiDemoPanel/Body/index.js +0 -256
  233. package/lib/theme/ApiDemoPanel/Body/slice.js +0 -102
  234. package/lib/theme/ApiDemoPanel/CodeTabs/index.js +0 -161
  235. package/lib/theme/ApiDemoPanel/CodeTabs/styles.module.css +0 -17
  236. package/lib/theme/ApiDemoPanel/ContentType/index.js +0 -32
  237. package/lib/theme/ApiDemoPanel/ContentType/slice.js +0 -31
  238. package/lib/theme/ApiDemoPanel/Curl/index.js +0 -240
  239. package/lib/theme/ApiDemoPanel/Curl/styles.module.css +0 -84
  240. package/lib/theme/ApiDemoPanel/Execute/index.js +0 -151
  241. package/lib/theme/ApiDemoPanel/Execute/makeRequest.js +0 -181
  242. package/lib/theme/ApiDemoPanel/Export/index.js +0 -47
  243. package/lib/theme/ApiDemoPanel/FloatingButton/index.js +0 -30
  244. package/lib/theme/ApiDemoPanel/FloatingButton/styles.module.css +0 -26
  245. package/lib/theme/ApiDemoPanel/FormFileUpload/index.js +0 -83
  246. package/lib/theme/ApiDemoPanel/FormFileUpload/styles.module.css +0 -75
  247. package/lib/theme/ApiDemoPanel/FormItem/index.js +0 -38
  248. package/lib/theme/ApiDemoPanel/FormItem/styles.module.css +0 -12
  249. package/lib/theme/ApiDemoPanel/FormMultiSelect/index.js +0 -45
  250. package/lib/theme/ApiDemoPanel/FormMultiSelect/styles.module.css +0 -38
  251. package/lib/theme/ApiDemoPanel/FormSelect/index.js +0 -34
  252. package/lib/theme/ApiDemoPanel/FormTextInput/index.js +0 -28
  253. package/lib/theme/ApiDemoPanel/FormTextInput/styles.module.css +0 -21
  254. package/lib/theme/ApiDemoPanel/LiveEditor/index.js +0 -62
  255. package/lib/theme/ApiDemoPanel/LiveEditor/styles.module.css +0 -35
  256. package/lib/theme/ApiDemoPanel/MethodEndpoint/index.js +0 -56
  257. package/lib/theme/ApiDemoPanel/ParamOptions/index.js +0 -216
  258. package/lib/theme/ApiDemoPanel/ParamOptions/slice.js +0 -34
  259. package/lib/theme/ApiDemoPanel/ParamOptions/styles.module.css +0 -176
  260. package/lib/theme/ApiDemoPanel/Request/index.js +0 -67
  261. package/lib/theme/ApiDemoPanel/Response/index.js +0 -66
  262. package/lib/theme/ApiDemoPanel/Response/slice.js +0 -36
  263. package/lib/theme/ApiDemoPanel/SecuritySchemes/index.js +0 -257
  264. package/lib/theme/ApiDemoPanel/Server/index.js +0 -104
  265. package/lib/theme/ApiDemoPanel/Server/slice.js +0 -40
  266. package/lib/theme/ApiDemoPanel/Server/styles.module.css +0 -56
  267. package/lib/theme/ApiDemoPanel/buildPostmanRequest.js +0 -303
  268. package/lib/theme/ApiDemoPanel/index.js +0 -41
  269. package/lib/theme/ApiDemoPanel/persistanceMiddleware.js +0 -59
  270. package/lib/theme/ApiDemoPanel/postman-collection.d.ts +0 -10
  271. package/lib/theme/ApiDemoPanel/react-modal.d.ts +0 -8
  272. package/lib/theme/ApiTabs/styles.module.css +0 -120
  273. package/lib/theme/DiscriminatorTabs/styles.module.css +0 -119
  274. package/lib/theme/MimeTabs/styles.module.css +0 -126
  275. package/lib/theme/ParamsItem/styles.module.css +0 -24
  276. package/lib/theme/ResponseSamples/styles.module.css +0 -7
  277. package/lib/theme/SchemaItem/styles.module.css +0 -38
  278. package/lib/theme/SchemaTabs/styles.module.css +0 -110
  279. package/lib/theme/styles.css +0 -520
  280. package/lib/theme-classic.d.ts +0 -13
  281. package/lib/theme-openapi.d.ts +0 -234
  282. package/lib/theme-translations.d.ts +0 -9
  283. package/lib-next/index.js +0 -29
  284. package/lib-next/markdown/createDescription.js +0 -13
  285. package/lib-next/markdown/schema.js +0 -153
  286. package/lib-next/markdown/utils.js +0 -44
  287. package/lib-next/postman-code-generators.d.ts +0 -9
  288. package/lib-next/react-magic-dropzone.d.ts +0 -9
  289. package/lib-next/theme/ApiDemoPanel/Accept/index.js +0 -30
  290. package/lib-next/theme/ApiDemoPanel/Authorization/auth-types.js +0 -29
  291. package/lib-next/theme/ApiDemoPanel/Authorization/index.js +0 -142
  292. package/lib-next/theme/ApiDemoPanel/Body/index.js +0 -324
  293. package/lib-next/theme/ApiDemoPanel/CodeTabs/index.js +0 -201
  294. package/lib-next/theme/ApiDemoPanel/CodeTabs/styles.module.css +0 -17
  295. package/lib-next/theme/ApiDemoPanel/ContentType/index.js +0 -30
  296. package/lib-next/theme/ApiDemoPanel/Curl/index.js +0 -283
  297. package/lib-next/theme/ApiDemoPanel/Curl/styles.module.css +0 -84
  298. package/lib-next/theme/ApiDemoPanel/Execute/index.js +0 -167
  299. package/lib-next/theme/ApiDemoPanel/Export/index.js +0 -45
  300. package/lib-next/theme/ApiDemoPanel/FloatingButton/index.js +0 -22
  301. package/lib-next/theme/ApiDemoPanel/FloatingButton/styles.module.css +0 -26
  302. package/lib-next/theme/ApiDemoPanel/FormFileUpload/index.js +0 -106
  303. package/lib-next/theme/ApiDemoPanel/FormItem/index.js +0 -36
  304. package/lib-next/theme/ApiDemoPanel/FormItem/styles.module.css +0 -12
  305. package/lib-next/theme/ApiDemoPanel/FormMultiSelect/index.js +0 -45
  306. package/lib-next/theme/ApiDemoPanel/FormMultiSelect/styles.module.css +0 -38
  307. package/lib-next/theme/ApiDemoPanel/FormSelect/index.js +0 -26
  308. package/lib-next/theme/ApiDemoPanel/FormSelect/styles.module.css +0 -51
  309. package/lib-next/theme/ApiDemoPanel/FormTextInput/index.js +0 -24
  310. package/lib-next/theme/ApiDemoPanel/FormTextInput/styles.module.css +0 -21
  311. package/lib-next/theme/ApiDemoPanel/LiveEditor/index.js +0 -59
  312. package/lib-next/theme/ApiDemoPanel/LiveEditor/styles.module.css +0 -35
  313. package/lib-next/theme/ApiDemoPanel/MethodEndpoint/index.js +0 -53
  314. package/lib-next/theme/ApiDemoPanel/ParamOptions/index.js +0 -292
  315. package/lib-next/theme/ApiDemoPanel/Request/index.js +0 -60
  316. package/lib-next/theme/ApiDemoPanel/Request/styles.module.css +0 -18
  317. package/lib-next/theme/ApiDemoPanel/Response/index.js +0 -67
  318. package/lib-next/theme/ApiDemoPanel/Response/slice.js +0 -23
  319. package/lib-next/theme/ApiDemoPanel/SecuritySchemes/index.js +0 -274
  320. package/lib-next/theme/ApiDemoPanel/Server/index.js +0 -132
  321. package/lib-next/theme/ApiDemoPanel/Server/styles.module.css +0 -56
  322. package/lib-next/theme/ApiDemoPanel/index.js +0 -28
  323. package/lib-next/theme/ApiDemoPanel/storage-utils.js +0 -33
  324. package/lib-next/theme/ApiItem/Layout/index.js +0 -68
  325. package/lib-next/theme/ApiItem/Layout/styles.module.css +0 -17
  326. package/lib-next/theme/ApiItem/hooks.js +0 -10
  327. package/lib-next/theme/ApiItem/index.js +0 -155
  328. package/lib-next/theme/ApiItem/store.js +0 -38
  329. package/lib-next/theme/ApiLogo/index.js +0 -48
  330. package/lib-next/theme/ApiTabs/index.js +0 -277
  331. package/lib-next/theme/ApiTabs/styles.module.css +0 -120
  332. package/lib-next/theme/DiscriminatorTabs/index.js +0 -272
  333. package/lib-next/theme/DiscriminatorTabs/styles.module.css +0 -119
  334. package/lib-next/theme/MimeTabs/index.js +0 -295
  335. package/lib-next/theme/MimeTabs/styles.module.css +0 -126
  336. package/lib-next/theme/ParamsItem/index.js +0 -135
  337. package/lib-next/theme/ParamsItem/styles.module.css +0 -24
  338. package/lib-next/theme/ResponseSamples/index.js +0 -27
  339. package/lib-next/theme/ResponseSamples/styles.module.css +0 -7
  340. package/lib-next/theme/SchemaItem/index.js +0 -114
  341. package/lib-next/theme/SchemaItem/styles.module.css +0 -38
  342. package/lib-next/theme/SchemaTabs/index.js +0 -270
  343. package/lib-next/theme/SchemaTabs/styles.module.css +0 -110
  344. package/lib-next/theme/styles.css +0 -520
  345. package/lib-next/theme-classic.d.ts +0 -13
  346. package/lib-next/theme-openapi.d.ts +0 -234
  347. package/lib-next/theme-translations.d.ts +0 -9
  348. package/lib-next/types.js +0 -1
  349. package/src/theme/ApiDemoPanel/Body/json2xml.js +0 -43
  350. package/src/theme/ApiDemoPanel/CodeTabs/index.tsx +0 -239
  351. package/src/theme/ApiDemoPanel/CodeTabs/styles.module.css +0 -17
  352. package/src/theme/ApiDemoPanel/Curl/languages.json +0 -1386
  353. package/src/theme/ApiDemoPanel/Curl/styles.module.css +0 -84
  354. package/src/theme/ApiDemoPanel/Execute/index.tsx +0 -189
  355. package/src/theme/ApiDemoPanel/FloatingButton/styles.module.css +0 -26
  356. package/src/theme/ApiDemoPanel/FormItem/styles.module.css +0 -12
  357. package/src/theme/ApiDemoPanel/FormMultiSelect/styles.module.css +0 -38
  358. package/src/theme/ApiDemoPanel/FormTextInput/index.tsx +0 -34
  359. package/src/theme/ApiDemoPanel/FormTextInput/styles.module.css +0 -21
  360. package/src/theme/ApiDemoPanel/LiveEditor/index.tsx +0 -75
  361. package/src/theme/ApiDemoPanel/LiveEditor/styles.module.css +0 -35
  362. package/src/theme/ApiDemoPanel/MethodEndpoint/index.tsx +0 -62
  363. package/src/theme/ApiDemoPanel/ParamOptions/index.tsx +0 -326
  364. package/src/theme/ApiDemoPanel/Request/index.tsx +0 -71
  365. package/src/theme/ApiDemoPanel/Response/index.tsx +0 -75
  366. package/src/theme/ApiDemoPanel/Server/styles.module.css +0 -56
  367. package/src/theme/ApiDemoPanel/postman-collection.d.ts +0 -10
  368. package/src/theme/ApiDemoPanel/react-modal.d.ts +0 -8
  369. package/src/theme/ApiTabs/styles.module.css +0 -120
  370. package/src/theme/DiscriminatorTabs/styles.module.css +0 -119
  371. package/src/theme/MimeTabs/styles.module.css +0 -126
  372. package/src/theme/ParamsItem/styles.module.css +0 -24
  373. package/src/theme/ResponseSamples/styles.module.css +0 -7
  374. package/src/theme/SchemaItem/styles.module.css +0 -38
  375. package/src/theme/SchemaTabs/styles.module.css +0 -110
  376. package/src/theme/styles.css +0 -520
  377. /package/{lib-next/theme/ApiDemoPanel → lib/theme/ApiExplorer}/Body/json2xml.js +0 -0
  378. /package/{lib-next/theme/ApiDemoPanel/Curl → lib/theme/ApiExplorer/CodeSnippets}/languages.json +0 -0
  379. /package/src/theme/{ApiDemoPanel → ApiExplorer}/Accept/slice.ts +0 -0
  380. /package/src/theme/{ApiDemoPanel → ApiExplorer}/Authorization/auth-types.ts +0 -0
  381. /package/{lib/theme/ApiDemoPanel → src/theme/ApiExplorer}/Body/json2xml.js +0 -0
  382. /package/src/theme/{ApiDemoPanel → ApiExplorer}/Body/slice.ts +0 -0
  383. /package/{lib/theme/ApiDemoPanel/Curl → src/theme/ApiExplorer/CodeSnippets}/languages.json +0 -0
  384. /package/src/theme/{ApiDemoPanel → ApiExplorer}/ContentType/slice.ts +0 -0
  385. /package/src/theme/{ApiDemoPanel → ApiExplorer}/Export/index.tsx +0 -0
  386. /package/src/theme/{ApiDemoPanel → ApiExplorer}/ParamOptions/slice.ts +0 -0
  387. /package/src/theme/{ApiDemoPanel → ApiExplorer}/Server/slice.ts +0 -0
  388. /package/{lib-next/theme/ApiDemoPanel → src/theme/ApiExplorer}/postman-collection.d.ts +0 -0
  389. /package/{lib-next/theme/ApiDemoPanel → src/theme/ApiExplorer}/react-modal.d.ts +0 -0
  390. /package/src/theme/{ApiDemoPanel → ApiExplorer}/storage-utils.ts +0 -0
@@ -0,0 +1,74 @@
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
+ import React, { useCallback, useState, useRef, useEffect } from "react";
9
+
10
+ import { translate } from "@docusaurus/Translate";
11
+ import clsx from "clsx";
12
+ // @ts-expect-error: TODO, we need to make theme-classic have type: module
13
+ import copy from "copy-text-to-clipboard";
14
+
15
+ export default function CopyButton({ code, className }) {
16
+ const [isCopied, setIsCopied] = useState(false);
17
+ const copyTimeout = useRef(undefined);
18
+ const handleCopyCode = useCallback(() => {
19
+ copy(code);
20
+ setIsCopied(true);
21
+ copyTimeout.current = window.setTimeout(() => {
22
+ setIsCopied(false);
23
+ }, 1000);
24
+ }, [code]);
25
+ useEffect(() => () => window.clearTimeout(copyTimeout.current), []);
26
+ return (
27
+ <button
28
+ type="button"
29
+ aria-label={
30
+ isCopied
31
+ ? translate({
32
+ id: "theme.CodeBlock.copied",
33
+ message: "Copied",
34
+ description: "The copied button label on code blocks",
35
+ })
36
+ : translate({
37
+ id: "theme.CodeBlock.copyButtonAriaLabel",
38
+ message: "Copy code to clipboard",
39
+ description: "The ARIA label for copy code blocks button",
40
+ })
41
+ }
42
+ title={translate({
43
+ id: "theme.CodeBlock.copy",
44
+ message: "Copy",
45
+ description: "The copy button label on code blocks",
46
+ })}
47
+ className={clsx(
48
+ "clean-btn",
49
+ className,
50
+ "openapi-explorer__code-block-copy-btn",
51
+ isCopied && "openapi-explorer__code-block-copy-btn--copied"
52
+ )}
53
+ onClick={handleCopyCode}
54
+ >
55
+ <span
56
+ className="openapi-explorer__code-block-copy-btn-icons"
57
+ aria-hidden="true"
58
+ >
59
+ <svg
60
+ className="openapi-explorer__code-block-copy-btn-icon"
61
+ viewBox="0 0 24 24"
62
+ >
63
+ <path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z" />
64
+ </svg>
65
+ <svg
66
+ className="openapi-explorer__code-block-copy-btn-icon--success"
67
+ viewBox="0 0 24 24"
68
+ >
69
+ <path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" />
70
+ </svg>
71
+ </span>
72
+ </button>
73
+ );
74
+ }
@@ -0,0 +1,16 @@
1
+ .openapi-explorer__code-block-exit-btn-icons {
2
+ position: relative;
3
+ width: 1.125rem;
4
+ height: 1.125rem;
5
+ }
6
+
7
+ .openapi-explorer__code-block-exit-btn-icon {
8
+ position: absolute;
9
+ top: 0;
10
+ left: 0;
11
+ fill: currentColor;
12
+ opacity: inherit;
13
+ width: inherit;
14
+ height: inherit;
15
+ transition: all 0.15s ease;
16
+ }
@@ -0,0 +1,47 @@
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
+ import React from "react";
9
+
10
+ import { translate } from "@docusaurus/Translate";
11
+ import clsx from "clsx";
12
+
13
+ export default function ExitButton({ className, handler }) {
14
+ return (
15
+ <button
16
+ type="button"
17
+ aria-label={translate({
18
+ id: "theme.CodeBlock.exitButtonAriaLabel",
19
+ message: "Exit expanded view",
20
+ description: "The ARIA label for exit expanded view button",
21
+ })}
22
+ title={translate({
23
+ id: "theme.CodeBlock.copy",
24
+ message: "Copy",
25
+ description: "The exit button label on code blocks",
26
+ })}
27
+ className={clsx(
28
+ "clean-btn",
29
+ "openapi-explorer__code-block-exit-btn",
30
+ className
31
+ )}
32
+ onClick={handler}
33
+ >
34
+ <span
35
+ className="openapi-explorer__code-block-exit-btn-icons"
36
+ aria-hidden="true"
37
+ >
38
+ <svg
39
+ className="openapi-explorer__code-block-exit-btn-icon"
40
+ viewBox="0 0 384 512"
41
+ >
42
+ <path d="M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z" />
43
+ </svg>
44
+ </span>
45
+ </button>
46
+ );
47
+ }
@@ -0,0 +1,62 @@
1
+ .openapi-explorer__expand-modal-content {
2
+ padding: none;
3
+ border: thin solid var(--ifm-toc-border-color);
4
+ border-radius: var(--ifm-global-radius);
5
+ max-width: 95%;
6
+ width: 65vw;
7
+ height: 65vh;
8
+ overflow: auto;
9
+ }
10
+
11
+ .openapi-explorer__expand-modal-overlay {
12
+ display: flex;
13
+ align-items: center;
14
+ justify-content: center;
15
+ position: fixed;
16
+ inset: 0px;
17
+ background-color: rgba(0, 0, 0, 0.9);
18
+ z-index: 201;
19
+ }
20
+
21
+ .theme-code-block:hover .openapi-explorer__code-block-expand-btn--copied {
22
+ opacity: 1 !important;
23
+ }
24
+
25
+ .openapi-explorer__code-block-expand-btn-icons {
26
+ position: relative;
27
+ width: 1.125rem;
28
+ height: 1.125rem;
29
+ }
30
+
31
+ .openapi-explorer__code-block-expand-btn-icon,
32
+ .openapi-explorer__code-block-expand-btn-icon--success {
33
+ position: absolute;
34
+ top: 0;
35
+ left: 0;
36
+ fill: currentColor;
37
+ opacity: inherit;
38
+ width: inherit;
39
+ height: inherit;
40
+ transition: all 0.15s ease;
41
+ }
42
+
43
+ .openapi-explorer__code-block-expand-btn-icon--success {
44
+ top: 50%;
45
+ left: 50%;
46
+ transform: translate(-50%, -50%) scale(0.33);
47
+ opacity: 0;
48
+ color: #00d600;
49
+ }
50
+
51
+ .openapi-explorer__code-block-expand-btn--copied
52
+ .openapi-explorer__code-block-expand-btn-icon {
53
+ transform: scale(0.33);
54
+ opacity: 0;
55
+ }
56
+
57
+ .openapi-explorer__code-block-expand-btn--copied
58
+ .openapi-explorer__code-block-expand-btn-icon--success {
59
+ transform: translate(-50%, -50%) scale(1);
60
+ opacity: 1;
61
+ transition-delay: 0.075s;
62
+ }
@@ -0,0 +1,156 @@
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
+ import React, { useEffect, useState } from "react";
9
+
10
+ import { usePrismTheme } from "@docusaurus/theme-common";
11
+ import { translate } from "@docusaurus/Translate";
12
+ import Container from "@theme/ApiExplorer/ApiCodeBlock/Container";
13
+ import CopyButton from "@theme/ApiExplorer/ApiCodeBlock/CopyButton";
14
+ import ExitButton from "@theme/ApiExplorer/ApiCodeBlock/ExitButton";
15
+ import Line from "@theme/ApiExplorer/ApiCodeBlock/Line";
16
+ import clsx from "clsx";
17
+ import Highlight, { defaultProps } from "prism-react-renderer";
18
+ import Modal from "react-modal";
19
+
20
+ export default function ExpandButton({
21
+ code,
22
+ className,
23
+ language,
24
+ showLineNumbers,
25
+ blockClassName,
26
+ title,
27
+ lineClassNames,
28
+ }) {
29
+ const [isModalOpen, setIsModalOpen] = useState(false);
30
+ const prismTheme = usePrismTheme();
31
+
32
+ useEffect(() => {
33
+ Modal.setAppElement("body");
34
+ }, []);
35
+
36
+ return (
37
+ <>
38
+ <button
39
+ type="button"
40
+ aria-label={
41
+ isModalOpen
42
+ ? translate({
43
+ id: "theme.CodeBlock.expanded",
44
+ message: "Expanded",
45
+ description: "The expanded button label on code blocks",
46
+ })
47
+ : translate({
48
+ id: "theme.CodeBlock.expandButtonAriaLabel",
49
+ message: "Expand code to fullscreen",
50
+ description: "The ARIA label for expand code blocks button",
51
+ })
52
+ }
53
+ title={translate({
54
+ id: "theme.CodeBlock.expand",
55
+ message: "Expand",
56
+ description: "The expand button label on code blocks",
57
+ })}
58
+ className={clsx(
59
+ "clean-btn",
60
+ className,
61
+ "openapi-explorer__code-block-expand-btn",
62
+ isModalOpen && "openapi-explorer__code-block-expand-btn--copied"
63
+ )}
64
+ onClick={() => setIsModalOpen(true)}
65
+ >
66
+ <span
67
+ className="openapi-explorer__code-block-expand-btn-icons"
68
+ aria-hidden="true"
69
+ >
70
+ <svg
71
+ className="openapi-explorer__code-block-expand-btn-icon"
72
+ viewBox="0 0 448 512"
73
+ >
74
+ <path d="M32 32C14.3 32 0 46.3 0 64v96c0 17.7 14.3 32 32 32s32-14.3 32-32V96h64c17.7 0 32-14.3 32-32s-14.3-32-32-32H32zM64 352c0-17.7-14.3-32-32-32s-32 14.3-32 32v96c0 17.7 14.3 32 32 32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H64V352zM320 32c-17.7 0-32 14.3-32 32s14.3 32 32 32h64v64c0 17.7 14.3 32 32 32s32-14.3 32-32V64c0-17.7-14.3-32-32-32H320zM448 352c0-17.7-14.3-32-32-32s-32 14.3-32 32v64H320c-17.7 0-32 14.3-32 32s14.3 32 32 32h96c17.7 0 32-14.3 32-32V352z" />
75
+ </svg>
76
+ <svg
77
+ className="openapi-explorer__code-block-expand-btn-icon--success"
78
+ viewBox="0 0 24 24"
79
+ >
80
+ <path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" />
81
+ </svg>
82
+ </span>
83
+ </button>
84
+ <Modal
85
+ className="openapi-explorer__expand-modal-content"
86
+ overlayClassName="openapi-explorer__expand-modal-overlay"
87
+ isOpen={isModalOpen}
88
+ onRequestClose={() => setIsModalOpen(false)}
89
+ contentLabel="Code Snippet"
90
+ >
91
+ <Container
92
+ as="div"
93
+ className={clsx(
94
+ "openapi-explorer__code-block-container",
95
+ language &&
96
+ !blockClassName.includes(`language-${language}`) &&
97
+ `language-${language}`
98
+ )}
99
+ >
100
+ {title && (
101
+ <div className="openapi-explorer__code-block-title">{title}</div>
102
+ )}
103
+ <div className="openapi-explorer__code-block-content">
104
+ <Highlight
105
+ {...defaultProps}
106
+ theme={prismTheme}
107
+ code={code}
108
+ language={language ?? "text"}
109
+ >
110
+ {({ className, tokens, getLineProps, getTokenProps }) => (
111
+ <pre
112
+ /* eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex */
113
+ tabIndex={0}
114
+ className={clsx(
115
+ className,
116
+ "openapi-explorer__code-block",
117
+ "thin-scrollbar"
118
+ )}
119
+ >
120
+ <code
121
+ className={clsx(
122
+ "openapi-explorer__code-block-lines",
123
+ showLineNumbers &&
124
+ "openapi-explorer__code-block-lines-numbers"
125
+ )}
126
+ >
127
+ {tokens.map((line, i) => (
128
+ <Line
129
+ key={i}
130
+ line={line}
131
+ getLineProps={getLineProps}
132
+ getTokenProps={getTokenProps}
133
+ classNames={lineClassNames[i]}
134
+ showLineNumbers={showLineNumbers}
135
+ />
136
+ ))}
137
+ </code>
138
+ </pre>
139
+ )}
140
+ </Highlight>
141
+ <div className="openapi-explorer__code-block-btn-group">
142
+ <CopyButton
143
+ className="openapi-explorer__code-block-code-btn"
144
+ code={code}
145
+ />
146
+ <ExitButton
147
+ className="openapi-explorer__code-block-code-btn"
148
+ handler={() => setIsModalOpen(false)}
149
+ />
150
+ </div>
151
+ </div>
152
+ </Container>
153
+ </Modal>
154
+ </>
155
+ );
156
+ }
@@ -0,0 +1,46 @@
1
+ /* Intentionally has zero specificity, so that to be able to override
2
+ the background in custom CSS file due bug https://github.com/facebook/docusaurus/issues/3678 */
3
+ :where(:root) {
4
+ --docusaurus-highlighted-code-line-bg: rgb(72 77 91);
5
+ }
6
+
7
+ :where([data-theme="dark"]) {
8
+ --docusaurus-highlighted-code-line-bg: rgb(100 100 100);
9
+ }
10
+
11
+ .theme-code-block-highlighted-line {
12
+ background-color: var(--docusaurus-highlighted-code-line-bg);
13
+ display: block;
14
+ margin: 0 calc(-1 * var(--ifm-pre-padding));
15
+ padding: 0 var(--ifm-pre-padding);
16
+ }
17
+
18
+ .openapi-explorer__code-block-code-line {
19
+ display: table-row;
20
+ counter-increment: line-count;
21
+ }
22
+
23
+ .openapi-explorer__code-block-code-line-number {
24
+ display: table-cell;
25
+ text-align: right;
26
+ width: 1%;
27
+ position: sticky;
28
+ left: 0;
29
+ padding: 0 var(--ifm-pre-padding);
30
+ background: var(--ifm-pre-background);
31
+ overflow-wrap: normal;
32
+ }
33
+
34
+ .openapi-explorer__code-block-code-line-number::before {
35
+ content: counter(line-count);
36
+ opacity: 0.4;
37
+ }
38
+
39
+ :global(.theme-code-block-highlighted-line)
40
+ .openapi-explorer__code-block-code-line-number::before {
41
+ opacity: 0.8;
42
+ }
43
+
44
+ .openapi-explorer__code-block-code-line-number {
45
+ padding-right: var(--ifm-pre-padding);
46
+ }
@@ -0,0 +1,47 @@
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
+ import React from "react";
9
+
10
+ import clsx from "clsx";
11
+
12
+ export default function CodeBlockLine({
13
+ line,
14
+ classNames,
15
+ showLineNumbers,
16
+ getLineProps,
17
+ getTokenProps,
18
+ }) {
19
+ if (line.length === 1 && line[0].content === "\n") {
20
+ line[0].content = "";
21
+ }
22
+ const lineProps = getLineProps({
23
+ line,
24
+ className: clsx(
25
+ classNames,
26
+ showLineNumbers && "openapi-explorer__code-block-code-line"
27
+ ),
28
+ });
29
+ const lineTokens = line.map((token, key) => (
30
+ <span key={key} {...getTokenProps({ token, key })} />
31
+ ));
32
+ return (
33
+ <span {...lineProps}>
34
+ {showLineNumbers ? (
35
+ <>
36
+ <span className="openapi-explorer__code-block-code-line-number" />
37
+ <span className="openapi-explorer__code-block-code-line-content">
38
+ {lineTokens}
39
+ </span>
40
+ </>
41
+ ) : (
42
+ lineTokens
43
+ )}
44
+ <br />
45
+ </span>
46
+ );
47
+ }
@@ -0,0 +1,10 @@
1
+ .openapi-explorer__code-block-word-wrap-btn-icon {
2
+ width: 1.2rem;
3
+ height: 1.2rem;
4
+ }
5
+
6
+ .openapi-explorer__code-block-word-wrap-btn--enabled {
7
+ .openapi-explorer__code-block-word-wrap-btn-icon {
8
+ color: var(--ifm-color-primary);
9
+ }
10
+ }
@@ -0,0 +1,44 @@
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
+ import React from "react";
9
+
10
+ import { translate } from "@docusaurus/Translate";
11
+ import clsx from "clsx";
12
+
13
+ export default function WordWrapButton({ className, onClick, isEnabled }) {
14
+ const title = translate({
15
+ id: "theme.CodeBlock.wordWrapToggle",
16
+ message: "Toggle word wrap",
17
+ description:
18
+ "The title attribute for toggle word wrapping button of code block lines",
19
+ });
20
+ return (
21
+ <button
22
+ type="button"
23
+ onClick={onClick}
24
+ className={clsx(
25
+ "clean-btn",
26
+ className,
27
+ isEnabled && "openapi-explorer__code-block-word-wrap-btn--enabled"
28
+ )}
29
+ aria-label={title}
30
+ title={title}
31
+ >
32
+ <svg
33
+ className="openapi-explorer__code-block-word-wrap-btn-icon"
34
+ viewBox="0 0 24 24"
35
+ aria-hidden="true"
36
+ >
37
+ <path
38
+ fill="currentColor"
39
+ d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"
40
+ />
41
+ </svg>
42
+ </button>
43
+ );
44
+ }
@@ -0,0 +1,40 @@
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
+ import React, { isValidElement } from "react";
9
+
10
+ import useIsBrowser from "@docusaurus/useIsBrowser";
11
+ import ElementContent from "@theme/ApiExplorer/ApiCodeBlock/Content/Element";
12
+ import StringContent from "@theme/ApiExplorer/ApiCodeBlock/Content/String";
13
+ /**
14
+ * Best attempt to make the children a plain string so it is copyable. If there
15
+ * are react elements, we will not be able to copy the content, and it will
16
+ * return `children` as-is; otherwise, it concatenates the string children
17
+ * together.
18
+ */
19
+ function maybeStringifyChildren(children) {
20
+ if (React.Children.toArray(children).some((el) => isValidElement(el))) {
21
+ return children;
22
+ }
23
+ // The children is now guaranteed to be one/more plain strings
24
+ return Array.isArray(children) ? children.join("") : children;
25
+ }
26
+ export default function ApiCodeBlock({ children: rawChildren, ...props }) {
27
+ // The Prism theme on SSR is always the default theme but the site theme can
28
+ // be in a different mode. React hydration doesn't update DOM styles that come
29
+ // from SSR. Hence force a re-render after mounting to apply the current
30
+ // relevant styles.
31
+ const isBrowser = useIsBrowser();
32
+ const children = maybeStringifyChildren(rawChildren);
33
+ const CodeBlockComp =
34
+ typeof children === "string" ? StringContent : ElementContent;
35
+ return (
36
+ <CodeBlockComp key={String(isBrowser)} {...props}>
37
+ {children}
38
+ </CodeBlockComp>
39
+ );
40
+ }
@@ -0,0 +1,3 @@
1
+ export declare function getAuthDataKeys(security: {
2
+ [key: string]: any;
3
+ }): string[];
@@ -1,16 +1,12 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.getAuthDataKeys = getAuthDataKeys;
7
2
  /* ============================================================================
8
3
  * Copyright (c) Palo Alto Networks
9
4
  *
10
5
  * This source code is licensed under the MIT license found in the
11
6
  * LICENSE file in the root directory of this source tree.
12
7
  * ========================================================================== */
13
-
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.getAuthDataKeys = void 0;
14
10
  function getAuthDataKeys(security) {
15
11
  // Bearer Auth
16
12
  if (security.type === "http" && security.scheme === "bearer") {
@@ -19,17 +15,15 @@ function getAuthDataKeys(security) {
19
15
  if (security.type === "oauth2") {
20
16
  return ["token"];
21
17
  }
22
-
23
18
  // Basic Auth
24
19
  if (security.type === "http" && security.scheme === "basic") {
25
20
  return ["username", "password"];
26
21
  }
27
-
28
22
  // API Auth
29
23
  if (security.type === "apiKey") {
30
24
  return ["apiKey"];
31
25
  }
32
-
33
26
  // none
34
27
  return [];
35
- }
28
+ }
29
+ exports.getAuthDataKeys = getAuthDataKeys;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare function Authorization(): JSX.Element | null;
3
+ export default Authorization;