@redocly/openapi-docs 0.0.0-beta-20240223133421 → 0.0.0-beta-20240227165736

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 (452) hide show
  1. package/dist/redocly-openapi-docs.min.js +9870 -8755
  2. package/lib/components/ApiInfo/ApiInfo.js +1 -1
  3. package/lib/components/ApiInfo/Metadata.js +1 -1
  4. package/lib/components/CallbackSamples/CallbackSamples.d.ts +2 -2
  5. package/lib/components/CallbackSamples/CallbackSamples.js +2 -3
  6. package/lib/components/Callbacks/CallbackDetails.d.ts +2 -2
  7. package/lib/components/Callbacks/CallbackDetails.js +1 -1
  8. package/lib/components/Callbacks/CallbackOperation.js +1 -1
  9. package/lib/components/Callbacks/CallbackSummary.js +2 -13
  10. package/lib/components/Callbacks/CallbacksList.d.ts +2 -2
  11. package/lib/components/Callbacks/CallbacksList.js +1 -1
  12. package/lib/components/Content/Content.d.ts +2 -2
  13. package/lib/components/Content/Content.js +1 -1
  14. package/lib/components/ContentItem/ContentItem.d.ts +2 -2
  15. package/lib/components/ContentItem/ContentItem.js +1 -1
  16. package/lib/components/ContentItems/ContentItems.d.ts +2 -2
  17. package/lib/components/ContentItems/ContentItems.js +1 -1
  18. package/lib/components/Discriminator/Discriminator.d.ts +2 -2
  19. package/lib/components/Discriminator/Discriminator.js +1 -1
  20. package/lib/components/Download/DownloadSpecification.d.ts +1 -2
  21. package/lib/components/Download/DownloadSpecification.js +1 -5
  22. package/lib/components/DropdownOrLabel/DropdownOrLabel.js +2 -2
  23. package/lib/components/ErrorBoundary/ErrorBoundary.js +2 -2
  24. package/lib/components/ExternalDocumentation/ExternalDocumentation.d.ts +2 -2
  25. package/lib/components/ExternalDocumentation/ExternalDocumentation.js +2 -2
  26. package/lib/components/Language/LanguageDropdown.js +1 -1
  27. package/lib/components/Language/LanguageItem.d.ts +1 -2
  28. package/lib/components/Language/LanguageItem.js +1 -1
  29. package/lib/components/Language/LanguageList.d.ts +2 -2
  30. package/lib/components/Language/LanguageList.js +1 -1
  31. package/lib/components/Language/_tests_/LanguageDropdown.test.js +1 -1
  32. package/lib/components/Language/styled.d.ts +0 -1
  33. package/lib/components/Language/styled.js +2 -9
  34. package/lib/components/Markdown/Markdown.js +1 -1
  35. package/lib/components/MediaTypeSwitch/MediaTypesSwitch.d.ts +1 -2
  36. package/lib/components/MediaTypeSwitch/MediaTypesSwitch.js +1 -1
  37. package/lib/components/OperationItem/Description.d.ts +1 -2
  38. package/lib/components/OperationItem/Description.js +1 -1
  39. package/lib/components/OperationItem/OperationItem.d.ts +2 -2
  40. package/lib/components/OperationItem/OperationItem.js +2 -2
  41. package/lib/components/Overlay.js +1 -1
  42. package/lib/components/Overview/Overview.js +1 -1
  43. package/lib/components/PageFooter/PageFooter.d.ts +3 -3
  44. package/lib/components/PageFooter/PageFooter.js +1 -1
  45. package/lib/components/PanelItem/PanelItem.d.ts +1 -2
  46. package/lib/components/PanelItem/PanelItem.js +1 -1
  47. package/lib/components/PayloadSamples/Example.js +1 -1
  48. package/lib/components/PayloadSamples/ExampleValue.js +1 -1
  49. package/lib/components/PayloadSamples/ExternalExample.js +1 -1
  50. package/lib/components/PayloadSamples/MediaTypeSamples.d.ts +2 -2
  51. package/lib/components/PayloadSamples/MediaTypeSamples.js +1 -1
  52. package/lib/components/PayloadSamples/PayloadSamples.d.ts +2 -2
  53. package/lib/components/PayloadSamples/PayloadSamples.js +1 -1
  54. package/lib/components/PropertyDetails/DescriptionEnums.d.ts +1 -2
  55. package/lib/components/PropertyDetails/DescriptionEnums.js +2 -2
  56. package/lib/components/PropertyDetails/EnumValues.d.ts +2 -2
  57. package/lib/components/PropertyDetails/EnumValues.js +1 -1
  58. package/lib/components/PropertyDetails/Examples.d.ts +1 -2
  59. package/lib/components/PropertyDetails/Examples.js +1 -1
  60. package/lib/components/PropertyDetails/Extensions.d.ts +2 -2
  61. package/lib/components/PropertyDetails/Extensions.js +2 -2
  62. package/lib/components/PropertyDetails/FieldDetail.d.ts +2 -2
  63. package/lib/components/PropertyDetails/FieldDetail.js +1 -1
  64. package/lib/components/PropertyDetails/FieldDetails.d.ts +2 -2
  65. package/lib/components/PropertyDetails/FieldDetails.js +1 -1
  66. package/lib/components/PropertyDetails/Pattern.js +1 -1
  67. package/lib/components/PropertyDetails/PlusCircleIcon.d.ts +1 -2
  68. package/lib/components/PropertyDetails/PlusCircleIcon.js +1 -1
  69. package/lib/components/PropertyDetails/PropertyDetails.d.ts +2 -2
  70. package/lib/components/PropertyDetails/PropertyDetails.js +1 -1
  71. package/lib/components/PropertyDetails/SchemaTypeInfo.d.ts +1 -2
  72. package/lib/components/PropertyDetails/SchemaTypeInfo.js +1 -1
  73. package/lib/components/PropertyDetails/SimpleEnums.d.ts +1 -2
  74. package/lib/components/PropertyDetails/SimpleEnums.js +1 -1
  75. package/lib/components/PropertyDetails/styled.d.ts +0 -1
  76. package/lib/components/PropertyDetails/styled.js +1 -10
  77. package/lib/components/RedoclyOpenAPIDocs/Providers.d.ts +1 -2
  78. package/lib/components/RedoclyOpenAPIDocs/Providers.js +1 -1
  79. package/lib/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocs.d.ts +1 -2
  80. package/lib/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocs.js +1 -1
  81. package/lib/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocsMultiStandalone.js +1 -1
  82. package/lib/components/RenderHook/RenderHook.js +1 -1
  83. package/lib/components/Replay/Replay.d.ts +2 -2
  84. package/lib/components/Replay/Replay.js +1 -1
  85. package/lib/components/RequestParameters/Body.d.ts +2 -2
  86. package/lib/components/RequestParameters/Body.js +1 -1
  87. package/lib/components/RequestParameters/ParametersGroup.d.ts +2 -2
  88. package/lib/components/RequestParameters/ParametersGroup.js +1 -1
  89. package/lib/components/RequestParameters/RequestParameters.js +1 -1
  90. package/lib/components/RequestSamples/CodeSample.d.ts +2 -2
  91. package/lib/components/RequestSamples/CodeSample.js +1 -1
  92. package/lib/components/RequestSamples/Example.d.ts +1 -2
  93. package/lib/components/RequestSamples/Example.js +1 -1
  94. package/lib/components/RequestSamples/RequestSamples.d.ts +2 -2
  95. package/lib/components/RequestSamples/RequestSamples.js +6 -1
  96. package/lib/components/ResponseSamples/ResponseSamples.d.ts +1 -2
  97. package/lib/components/ResponseSamples/ResponseSamples.js +1 -1
  98. package/lib/components/ResponseSamples/Summary.js +1 -1
  99. package/lib/components/Responses/OperationResponseList.d.ts +1 -2
  100. package/lib/components/Responses/OperationResponseList.js +1 -1
  101. package/lib/components/Responses/ResponseDetails.d.ts +2 -2
  102. package/lib/components/Responses/ResponseDetails.js +1 -1
  103. package/lib/components/Responses/ResponseHeaders.d.ts +2 -2
  104. package/lib/components/Responses/ResponseHeaders.js +1 -1
  105. package/lib/components/RightPanel/RightPanel.js +1 -1
  106. package/lib/components/Samples/ExampleSwitch.js +1 -1
  107. package/lib/components/Schema/ArraySchema.d.ts +2 -2
  108. package/lib/components/Schema/ArraySchema.js +1 -1
  109. package/lib/components/Schema/ObjectSchema.d.ts +2 -2
  110. package/lib/components/Schema/ObjectSchema.js +1 -1
  111. package/lib/components/Schema/OneOfSchema.d.ts +2 -2
  112. package/lib/components/Schema/OneOfSchema.js +1 -1
  113. package/lib/components/Schema/RecursiveSchema.d.ts +2 -2
  114. package/lib/components/Schema/RecursiveSchema.js +1 -1
  115. package/lib/components/Schema/Schema.d.ts +2 -2
  116. package/lib/components/Schema/Schema.js +1 -1
  117. package/lib/components/SchemaDefinition/SchemaDefinition.d.ts +2 -2
  118. package/lib/components/SchemaDefinition/SchemaDefinition.js +1 -1
  119. package/lib/components/Search/MenuItemSearch.js +1 -1
  120. package/lib/components/Search/Search.d.ts +2 -2
  121. package/lib/components/Search/Search.js +1 -1
  122. package/lib/components/Search/SearchBox.js +1 -1
  123. package/lib/components/Search/SearchField.js +1 -1
  124. package/lib/components/Search/styled.js +2 -2
  125. package/lib/components/SectionContent/SectionContent.js +1 -1
  126. package/lib/components/SectionItem/SectionItem.d.ts +2 -2
  127. package/lib/components/SectionItem/SectionItem.js +1 -1
  128. package/lib/components/Security/Divider.d.ts +1 -2
  129. package/lib/components/Security/Divider.js +1 -1
  130. package/lib/components/Security/OAuthFlow.d.ts +2 -2
  131. package/lib/components/Security/OAuthFlow.js +1 -1
  132. package/lib/components/Security/Security.js +1 -1
  133. package/lib/components/Security/SecurityButton.js +6 -10
  134. package/lib/components/Security/SecurityFlow.js +1 -1
  135. package/lib/components/Security/SecurityModal.js +8 -17
  136. package/lib/components/Security/SecuritySchemeItem.d.ts +1 -2
  137. package/lib/components/Security/SecuritySchemeItem.js +4 -4
  138. package/lib/components/SecurityRequirement/PanelDescription.js +1 -1
  139. package/lib/components/SecurityRequirement/RequiredScopesRow.js +1 -1
  140. package/lib/components/SecurityRequirement/RequirementElement.js +1 -1
  141. package/lib/components/SecurityRequirement/SecurityDefs.js +1 -1
  142. package/lib/components/SecurityRequirement/SecurityRequirement.d.ts +2 -2
  143. package/lib/components/SecurityRequirement/SecurityRequirement.js +1 -1
  144. package/lib/components/SecuritySchemes/OAuthFlow.d.ts +2 -2
  145. package/lib/components/SecuritySchemes/OAuthFlow.js +1 -1
  146. package/lib/components/SeeMore/SeeMore.js +1 -1
  147. package/lib/components/ServerList/ServerList.js +1 -1
  148. package/lib/components/ServerListDropdown/ServerListDropdown.js +1 -1
  149. package/lib/components/ServerListDropdown/styled.js +0 -3
  150. package/lib/components/SideMenu/Actions.d.ts +1 -2
  151. package/lib/components/SideMenu/Actions.js +1 -1
  152. package/lib/components/SideMenu/MenuItem.d.ts +2 -2
  153. package/lib/components/SideMenu/MenuItem.js +1 -1
  154. package/lib/components/SideMenu/MenuItemEternalLink.d.ts +2 -2
  155. package/lib/components/SideMenu/MenuItemEternalLink.js +1 -1
  156. package/lib/components/SideMenu/MenuItemLink.d.ts +2 -2
  157. package/lib/components/SideMenu/MenuItemLink.js +1 -1
  158. package/lib/components/SideMenu/MenuItems.d.ts +2 -2
  159. package/lib/components/SideMenu/MenuItems.js +1 -1
  160. package/lib/components/SideMenu/MenuOperationItemContent.d.ts +2 -2
  161. package/lib/components/SideMenu/MenuOperationItemContent.js +2 -2
  162. package/lib/components/SideMenu/SideMenu.d.ts +2 -2
  163. package/lib/components/SideMenu/SideMenu.js +1 -1
  164. package/lib/components/StickySidebar/StickyResponsiveSidebar.d.ts +2 -2
  165. package/lib/components/StickySidebar/StickyResponsiveSidebar.js +2 -2
  166. package/lib/components/Tabs/Tabs.d.ts +1 -2
  167. package/lib/components/Tabs/Tabs.js +1 -1
  168. package/lib/components/TagItem/OperationsNavigation.d.ts +3 -3
  169. package/lib/components/TagItem/OperationsNavigation.js +16 -14
  170. package/lib/components/TagItem/TagItem.d.ts +1 -2
  171. package/lib/components/TagItem/TagItem.js +1 -1
  172. package/lib/components/VersionSwitcher.js +1 -1
  173. package/lib/components/ViewNested/ViewNested.d.ts +2 -2
  174. package/lib/components/ViewNested/ViewNested.js +1 -13
  175. package/lib/components/common/BodyContent/BodyContent.d.ts +2 -2
  176. package/lib/components/common/BodyContent/BodyContent.js +1 -1
  177. package/lib/components/common/ClearButton/ClearButton.d.ts +2 -2
  178. package/lib/components/common/ClearButton/ClearButton.js +1 -1
  179. package/lib/components/common/ConstraintsView.d.ts +2 -2
  180. package/lib/components/common/ConstraintsView.js +1 -1
  181. package/lib/components/common/Dropdown/Dropdown.d.ts +2 -2
  182. package/lib/components/common/Dropdown/Dropdown.js +1 -1
  183. package/lib/components/common/DropdownTheme/Dropdown.d.ts +1 -2
  184. package/lib/components/common/DropdownTheme/Dropdown.js +2 -10
  185. package/lib/components/common/Extensions.d.ts +2 -2
  186. package/lib/components/common/Extensions.js +2 -2
  187. package/lib/components/common/Fields/fields.d.ts +5 -1
  188. package/lib/components/common/Fields/fields.js +2 -6
  189. package/lib/components/common/LinearProgress.js +2 -2
  190. package/lib/components/common/LinkToField.js +1 -1
  191. package/lib/components/common/SchemaSelection/SchemaSelection.d.ts +1 -2
  192. package/lib/components/common/SchemaSelection/SchemaSelection.js +1 -1
  193. package/lib/components/common/Skeleton/Skeleton.js +2 -2
  194. package/lib/components/common/linkify.js +1 -1
  195. package/lib/components/common/perfect-scrollbar.js +2 -2
  196. package/lib/components/pluggable/PullRight.d.ts +1 -2
  197. package/lib/components/pluggable/PullRight.js +1 -1
  198. package/lib/components/pluggable/RedocExample.js +1 -1
  199. package/lib/components/pluggable/RedocRequestBody.js +1 -1
  200. package/lib/components/pluggable/RedocResponse.js +1 -1
  201. package/lib/components/pluggable/RedocSchema.js +1 -1
  202. package/lib/hoc/withRouter.js +1 -1
  203. package/lib/hoc/withStore.js +1 -1
  204. package/lib/icons/CSharpIcon/CSharpIcon.d.ts +2 -3
  205. package/lib/icons/CSharpIcon/CSharpIcon.js +1 -1
  206. package/lib/icons/CurlIcon/CurlIcon.d.ts +2 -3
  207. package/lib/icons/CurlIcon/CurlIcon.js +1 -1
  208. package/lib/icons/GOIcon/GOIcon.d.ts +2 -3
  209. package/lib/icons/GOIcon/GOIcon.js +1 -1
  210. package/lib/icons/JavaIcon/JavaIcon.d.ts +2 -3
  211. package/lib/icons/JavaIcon/JavaIcon.js +1 -1
  212. package/lib/icons/JavaScriptIcon/JavaScriptIcon.d.ts +2 -3
  213. package/lib/icons/JavaScriptIcon/JavaScriptIcon.js +1 -1
  214. package/lib/icons/NodeJSIcon/NodeJSIcon.d.ts +2 -3
  215. package/lib/icons/NodeJSIcon/NodeJSIcon.js +1 -1
  216. package/lib/icons/PHPIcon/PHPIcon.d.ts +2 -3
  217. package/lib/icons/PHPIcon/PHPIcon.js +1 -1
  218. package/lib/icons/PythonIcon/PythonIcon.d.ts +2 -3
  219. package/lib/icons/PythonIcon/PythonIcon.js +1 -1
  220. package/lib/icons/RIcon/RIcon.d.ts +2 -3
  221. package/lib/icons/RIcon/RIcon.js +1 -1
  222. package/lib/icons/RubyIcon/RubyIcon.d.ts +2 -3
  223. package/lib/icons/RubyIcon/RubyIcon.js +1 -1
  224. package/lib/services/search/SearchStore.js +19 -8
  225. package/lib/standalone.js +1 -1
  226. package/lib/testProviders.js +1 -1
  227. package/lib-esm/components/ApiInfo/ApiInfo.js +1 -1
  228. package/lib-esm/components/ApiInfo/Metadata.js +1 -1
  229. package/lib-esm/components/CallbackSamples/CallbackSamples.d.ts +2 -2
  230. package/lib-esm/components/CallbackSamples/CallbackSamples.js +2 -3
  231. package/lib-esm/components/Callbacks/CallbackDetails.d.ts +2 -2
  232. package/lib-esm/components/Callbacks/CallbackDetails.js +1 -1
  233. package/lib-esm/components/Callbacks/CallbackOperation.js +1 -1
  234. package/lib-esm/components/Callbacks/CallbackSummary.js +2 -13
  235. package/lib-esm/components/Callbacks/CallbacksList.d.ts +2 -2
  236. package/lib-esm/components/Callbacks/CallbacksList.js +1 -1
  237. package/lib-esm/components/Content/Content.d.ts +2 -2
  238. package/lib-esm/components/Content/Content.js +1 -1
  239. package/lib-esm/components/ContentItem/ContentItem.d.ts +2 -2
  240. package/lib-esm/components/ContentItem/ContentItem.js +1 -1
  241. package/lib-esm/components/ContentItems/ContentItems.d.ts +2 -2
  242. package/lib-esm/components/ContentItems/ContentItems.js +1 -1
  243. package/lib-esm/components/Discriminator/Discriminator.d.ts +2 -2
  244. package/lib-esm/components/Discriminator/Discriminator.js +1 -1
  245. package/lib-esm/components/Download/DownloadSpecification.d.ts +1 -2
  246. package/lib-esm/components/Download/DownloadSpecification.js +1 -5
  247. package/lib-esm/components/DropdownOrLabel/DropdownOrLabel.js +2 -2
  248. package/lib-esm/components/ErrorBoundary/ErrorBoundary.js +2 -2
  249. package/lib-esm/components/ExternalDocumentation/ExternalDocumentation.d.ts +2 -2
  250. package/lib-esm/components/ExternalDocumentation/ExternalDocumentation.js +3 -3
  251. package/lib-esm/components/Language/LanguageDropdown.js +1 -1
  252. package/lib-esm/components/Language/LanguageItem.d.ts +1 -2
  253. package/lib-esm/components/Language/LanguageItem.js +1 -1
  254. package/lib-esm/components/Language/LanguageList.d.ts +2 -2
  255. package/lib-esm/components/Language/LanguageList.js +1 -1
  256. package/lib-esm/components/Language/_tests_/LanguageDropdown.test.js +1 -1
  257. package/lib-esm/components/Language/styled.d.ts +0 -1
  258. package/lib-esm/components/Language/styled.js +1 -8
  259. package/lib-esm/components/Markdown/Markdown.js +1 -1
  260. package/lib-esm/components/MediaTypeSwitch/MediaTypesSwitch.d.ts +1 -2
  261. package/lib-esm/components/MediaTypeSwitch/MediaTypesSwitch.js +1 -1
  262. package/lib-esm/components/OperationItem/Description.d.ts +1 -2
  263. package/lib-esm/components/OperationItem/Description.js +1 -1
  264. package/lib-esm/components/OperationItem/OperationItem.d.ts +2 -2
  265. package/lib-esm/components/OperationItem/OperationItem.js +2 -2
  266. package/lib-esm/components/Overlay.js +1 -1
  267. package/lib-esm/components/Overview/Overview.js +1 -1
  268. package/lib-esm/components/PageFooter/PageFooter.d.ts +3 -3
  269. package/lib-esm/components/PageFooter/PageFooter.js +1 -1
  270. package/lib-esm/components/PanelItem/PanelItem.d.ts +1 -2
  271. package/lib-esm/components/PanelItem/PanelItem.js +1 -1
  272. package/lib-esm/components/PayloadSamples/Example.js +1 -1
  273. package/lib-esm/components/PayloadSamples/ExampleValue.js +1 -1
  274. package/lib-esm/components/PayloadSamples/ExternalExample.js +1 -1
  275. package/lib-esm/components/PayloadSamples/MediaTypeSamples.d.ts +2 -2
  276. package/lib-esm/components/PayloadSamples/MediaTypeSamples.js +1 -1
  277. package/lib-esm/components/PayloadSamples/PayloadSamples.d.ts +2 -2
  278. package/lib-esm/components/PayloadSamples/PayloadSamples.js +1 -1
  279. package/lib-esm/components/PropertyDetails/DescriptionEnums.d.ts +1 -2
  280. package/lib-esm/components/PropertyDetails/DescriptionEnums.js +2 -2
  281. package/lib-esm/components/PropertyDetails/EnumValues.d.ts +2 -2
  282. package/lib-esm/components/PropertyDetails/EnumValues.js +1 -1
  283. package/lib-esm/components/PropertyDetails/Examples.d.ts +1 -2
  284. package/lib-esm/components/PropertyDetails/Examples.js +1 -1
  285. package/lib-esm/components/PropertyDetails/Extensions.d.ts +2 -2
  286. package/lib-esm/components/PropertyDetails/Extensions.js +2 -2
  287. package/lib-esm/components/PropertyDetails/FieldDetail.d.ts +2 -2
  288. package/lib-esm/components/PropertyDetails/FieldDetail.js +1 -1
  289. package/lib-esm/components/PropertyDetails/FieldDetails.d.ts +2 -2
  290. package/lib-esm/components/PropertyDetails/FieldDetails.js +1 -1
  291. package/lib-esm/components/PropertyDetails/Pattern.js +1 -1
  292. package/lib-esm/components/PropertyDetails/PlusCircleIcon.d.ts +1 -2
  293. package/lib-esm/components/PropertyDetails/PlusCircleIcon.js +1 -1
  294. package/lib-esm/components/PropertyDetails/PropertyDetails.d.ts +2 -2
  295. package/lib-esm/components/PropertyDetails/PropertyDetails.js +1 -1
  296. package/lib-esm/components/PropertyDetails/SchemaTypeInfo.d.ts +1 -2
  297. package/lib-esm/components/PropertyDetails/SchemaTypeInfo.js +1 -1
  298. package/lib-esm/components/PropertyDetails/SimpleEnums.d.ts +1 -2
  299. package/lib-esm/components/PropertyDetails/SimpleEnums.js +1 -1
  300. package/lib-esm/components/PropertyDetails/styled.d.ts +0 -1
  301. package/lib-esm/components/PropertyDetails/styled.js +1 -10
  302. package/lib-esm/components/RedoclyOpenAPIDocs/Providers.d.ts +1 -2
  303. package/lib-esm/components/RedoclyOpenAPIDocs/Providers.js +1 -1
  304. package/lib-esm/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocs.d.ts +1 -2
  305. package/lib-esm/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocs.js +1 -1
  306. package/lib-esm/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocsMultiStandalone.js +1 -1
  307. package/lib-esm/components/RenderHook/RenderHook.js +1 -1
  308. package/lib-esm/components/Replay/Replay.d.ts +2 -2
  309. package/lib-esm/components/Replay/Replay.js +1 -1
  310. package/lib-esm/components/RequestParameters/Body.d.ts +2 -2
  311. package/lib-esm/components/RequestParameters/Body.js +1 -1
  312. package/lib-esm/components/RequestParameters/ParametersGroup.d.ts +2 -2
  313. package/lib-esm/components/RequestParameters/ParametersGroup.js +1 -1
  314. package/lib-esm/components/RequestParameters/RequestParameters.js +1 -1
  315. package/lib-esm/components/RequestSamples/CodeSample.d.ts +2 -2
  316. package/lib-esm/components/RequestSamples/CodeSample.js +1 -1
  317. package/lib-esm/components/RequestSamples/Example.d.ts +1 -2
  318. package/lib-esm/components/RequestSamples/Example.js +1 -1
  319. package/lib-esm/components/RequestSamples/RequestSamples.d.ts +2 -2
  320. package/lib-esm/components/RequestSamples/RequestSamples.js +6 -1
  321. package/lib-esm/components/ResponseSamples/ResponseSamples.d.ts +1 -2
  322. package/lib-esm/components/ResponseSamples/ResponseSamples.js +1 -1
  323. package/lib-esm/components/ResponseSamples/Summary.js +1 -1
  324. package/lib-esm/components/Responses/OperationResponseList.d.ts +1 -2
  325. package/lib-esm/components/Responses/OperationResponseList.js +1 -1
  326. package/lib-esm/components/Responses/ResponseDetails.d.ts +2 -2
  327. package/lib-esm/components/Responses/ResponseDetails.js +1 -1
  328. package/lib-esm/components/Responses/ResponseHeaders.d.ts +2 -2
  329. package/lib-esm/components/Responses/ResponseHeaders.js +1 -1
  330. package/lib-esm/components/RightPanel/RightPanel.js +1 -1
  331. package/lib-esm/components/Samples/ExampleSwitch.js +1 -1
  332. package/lib-esm/components/Schema/ArraySchema.d.ts +2 -2
  333. package/lib-esm/components/Schema/ArraySchema.js +1 -1
  334. package/lib-esm/components/Schema/ObjectSchema.d.ts +2 -2
  335. package/lib-esm/components/Schema/ObjectSchema.js +1 -1
  336. package/lib-esm/components/Schema/OneOfSchema.d.ts +2 -2
  337. package/lib-esm/components/Schema/OneOfSchema.js +1 -1
  338. package/lib-esm/components/Schema/RecursiveSchema.d.ts +2 -2
  339. package/lib-esm/components/Schema/RecursiveSchema.js +1 -1
  340. package/lib-esm/components/Schema/Schema.d.ts +2 -2
  341. package/lib-esm/components/Schema/Schema.js +1 -1
  342. package/lib-esm/components/SchemaDefinition/SchemaDefinition.d.ts +2 -2
  343. package/lib-esm/components/SchemaDefinition/SchemaDefinition.js +1 -1
  344. package/lib-esm/components/Search/MenuItemSearch.js +1 -1
  345. package/lib-esm/components/Search/Search.d.ts +2 -2
  346. package/lib-esm/components/Search/Search.js +1 -1
  347. package/lib-esm/components/Search/SearchBox.js +1 -1
  348. package/lib-esm/components/Search/SearchField.js +1 -1
  349. package/lib-esm/components/Search/styled.js +2 -2
  350. package/lib-esm/components/SectionContent/SectionContent.js +1 -1
  351. package/lib-esm/components/SectionItem/SectionItem.d.ts +2 -2
  352. package/lib-esm/components/SectionItem/SectionItem.js +1 -1
  353. package/lib-esm/components/Security/Divider.d.ts +1 -2
  354. package/lib-esm/components/Security/Divider.js +1 -1
  355. package/lib-esm/components/Security/OAuthFlow.d.ts +2 -2
  356. package/lib-esm/components/Security/OAuthFlow.js +1 -1
  357. package/lib-esm/components/Security/Security.js +1 -1
  358. package/lib-esm/components/Security/SecurityButton.js +6 -10
  359. package/lib-esm/components/Security/SecurityFlow.js +1 -1
  360. package/lib-esm/components/Security/SecurityModal.js +8 -17
  361. package/lib-esm/components/Security/SecuritySchemeItem.d.ts +1 -2
  362. package/lib-esm/components/Security/SecuritySchemeItem.js +4 -4
  363. package/lib-esm/components/SecurityRequirement/PanelDescription.js +1 -1
  364. package/lib-esm/components/SecurityRequirement/RequiredScopesRow.js +1 -1
  365. package/lib-esm/components/SecurityRequirement/RequirementElement.js +1 -1
  366. package/lib-esm/components/SecurityRequirement/SecurityDefs.js +1 -1
  367. package/lib-esm/components/SecurityRequirement/SecurityRequirement.d.ts +2 -2
  368. package/lib-esm/components/SecurityRequirement/SecurityRequirement.js +1 -1
  369. package/lib-esm/components/SecuritySchemes/OAuthFlow.d.ts +2 -2
  370. package/lib-esm/components/SecuritySchemes/OAuthFlow.js +1 -1
  371. package/lib-esm/components/SeeMore/SeeMore.js +1 -1
  372. package/lib-esm/components/ServerList/ServerList.js +1 -1
  373. package/lib-esm/components/ServerListDropdown/ServerListDropdown.js +1 -1
  374. package/lib-esm/components/ServerListDropdown/styled.js +0 -3
  375. package/lib-esm/components/SideMenu/Actions.d.ts +1 -2
  376. package/lib-esm/components/SideMenu/Actions.js +1 -1
  377. package/lib-esm/components/SideMenu/MenuItem.d.ts +2 -2
  378. package/lib-esm/components/SideMenu/MenuItem.js +1 -1
  379. package/lib-esm/components/SideMenu/MenuItemEternalLink.d.ts +2 -2
  380. package/lib-esm/components/SideMenu/MenuItemEternalLink.js +1 -1
  381. package/lib-esm/components/SideMenu/MenuItemLink.d.ts +2 -2
  382. package/lib-esm/components/SideMenu/MenuItemLink.js +1 -1
  383. package/lib-esm/components/SideMenu/MenuItems.d.ts +2 -2
  384. package/lib-esm/components/SideMenu/MenuItems.js +1 -1
  385. package/lib-esm/components/SideMenu/MenuOperationItemContent.d.ts +2 -2
  386. package/lib-esm/components/SideMenu/MenuOperationItemContent.js +2 -2
  387. package/lib-esm/components/SideMenu/SideMenu.d.ts +2 -2
  388. package/lib-esm/components/SideMenu/SideMenu.js +1 -1
  389. package/lib-esm/components/StickySidebar/StickyResponsiveSidebar.d.ts +2 -2
  390. package/lib-esm/components/StickySidebar/StickyResponsiveSidebar.js +2 -2
  391. package/lib-esm/components/Tabs/Tabs.d.ts +1 -2
  392. package/lib-esm/components/Tabs/Tabs.js +1 -1
  393. package/lib-esm/components/TagItem/OperationsNavigation.d.ts +3 -3
  394. package/lib-esm/components/TagItem/OperationsNavigation.js +16 -14
  395. package/lib-esm/components/TagItem/TagItem.d.ts +1 -2
  396. package/lib-esm/components/TagItem/TagItem.js +1 -1
  397. package/lib-esm/components/VersionSwitcher.js +1 -1
  398. package/lib-esm/components/ViewNested/ViewNested.d.ts +2 -2
  399. package/lib-esm/components/ViewNested/ViewNested.js +1 -13
  400. package/lib-esm/components/common/BodyContent/BodyContent.d.ts +2 -2
  401. package/lib-esm/components/common/BodyContent/BodyContent.js +1 -1
  402. package/lib-esm/components/common/ClearButton/ClearButton.d.ts +2 -2
  403. package/lib-esm/components/common/ClearButton/ClearButton.js +1 -1
  404. package/lib-esm/components/common/ConstraintsView.d.ts +2 -2
  405. package/lib-esm/components/common/ConstraintsView.js +1 -1
  406. package/lib-esm/components/common/Dropdown/Dropdown.d.ts +2 -2
  407. package/lib-esm/components/common/Dropdown/Dropdown.js +1 -1
  408. package/lib-esm/components/common/DropdownTheme/Dropdown.d.ts +1 -2
  409. package/lib-esm/components/common/DropdownTheme/Dropdown.js +2 -10
  410. package/lib-esm/components/common/Extensions.d.ts +2 -2
  411. package/lib-esm/components/common/Extensions.js +2 -2
  412. package/lib-esm/components/common/Fields/fields.d.ts +5 -1
  413. package/lib-esm/components/common/Fields/fields.js +2 -6
  414. package/lib-esm/components/common/LinearProgress.js +2 -2
  415. package/lib-esm/components/common/LinkToField.js +1 -1
  416. package/lib-esm/components/common/SchemaSelection/SchemaSelection.d.ts +1 -2
  417. package/lib-esm/components/common/SchemaSelection/SchemaSelection.js +1 -1
  418. package/lib-esm/components/common/Skeleton/Skeleton.js +2 -2
  419. package/lib-esm/components/common/linkify.js +2 -2
  420. package/lib-esm/components/common/perfect-scrollbar.js +2 -2
  421. package/lib-esm/components/pluggable/PullRight.d.ts +1 -2
  422. package/lib-esm/components/pluggable/PullRight.js +1 -1
  423. package/lib-esm/components/pluggable/RedocExample.js +1 -1
  424. package/lib-esm/components/pluggable/RedocRequestBody.js +1 -1
  425. package/lib-esm/components/pluggable/RedocResponse.js +1 -1
  426. package/lib-esm/components/pluggable/RedocSchema.js +1 -1
  427. package/lib-esm/hoc/withRouter.js +1 -1
  428. package/lib-esm/hoc/withStore.js +1 -1
  429. package/lib-esm/icons/CSharpIcon/CSharpIcon.d.ts +2 -3
  430. package/lib-esm/icons/CSharpIcon/CSharpIcon.js +1 -1
  431. package/lib-esm/icons/CurlIcon/CurlIcon.d.ts +2 -3
  432. package/lib-esm/icons/CurlIcon/CurlIcon.js +1 -1
  433. package/lib-esm/icons/GOIcon/GOIcon.d.ts +2 -3
  434. package/lib-esm/icons/GOIcon/GOIcon.js +1 -1
  435. package/lib-esm/icons/JavaIcon/JavaIcon.d.ts +2 -3
  436. package/lib-esm/icons/JavaIcon/JavaIcon.js +1 -1
  437. package/lib-esm/icons/JavaScriptIcon/JavaScriptIcon.d.ts +2 -3
  438. package/lib-esm/icons/JavaScriptIcon/JavaScriptIcon.js +1 -1
  439. package/lib-esm/icons/NodeJSIcon/NodeJSIcon.d.ts +2 -3
  440. package/lib-esm/icons/NodeJSIcon/NodeJSIcon.js +1 -1
  441. package/lib-esm/icons/PHPIcon/PHPIcon.d.ts +2 -3
  442. package/lib-esm/icons/PHPIcon/PHPIcon.js +1 -1
  443. package/lib-esm/icons/PythonIcon/PythonIcon.d.ts +2 -3
  444. package/lib-esm/icons/PythonIcon/PythonIcon.js +1 -1
  445. package/lib-esm/icons/RIcon/RIcon.d.ts +2 -3
  446. package/lib-esm/icons/RIcon/RIcon.js +1 -1
  447. package/lib-esm/icons/RubyIcon/RubyIcon.d.ts +2 -3
  448. package/lib-esm/icons/RubyIcon/RubyIcon.js +1 -1
  449. package/lib-esm/services/search/SearchStore.js +19 -8
  450. package/lib-esm/standalone.js +1 -1
  451. package/lib-esm/testProviders.js +1 -1
  452. package/package.json +4 -4
@@ -1,2 +1,2 @@
1
- import React,{useState}from"react";import{Tag,ToggleButton}from"../common";const MAX_PATTERN_LENGTH=45;export function Pattern({pattern:t,hideSchemaPattern:e}){const[n,a]=useState(!1);if(!t||e)return null;return React.createElement(React.Fragment,null,React.createElement(Tag,null,n||t.length<MAX_PATTERN_LENGTH?t:`${t.slice(0,MAX_PATTERN_LENGTH)}...`),t.length>MAX_PATTERN_LENGTH&&React.createElement(ToggleButton,{onClick:()=>{a(!n)}},n?"Hide pattern":"Show pattern"))}
1
+ import{jsx as _jsx,Fragment as _Fragment,jsxs as _jsxs}from"react/jsx-runtime";import{useState}from"react";import{Tag,ToggleButton}from"../common";const MAX_PATTERN_LENGTH=45;export function Pattern({pattern:t,hideSchemaPattern:e}){const[n,r]=useState(!1);if(!t||e)return null;return _jsxs(_Fragment,{children:[_jsx(Tag,{children:n||t.length<MAX_PATTERN_LENGTH?t:`${t.slice(0,MAX_PATTERN_LENGTH)}...`}),t.length>MAX_PATTERN_LENGTH&&_jsx(ToggleButton,{onClick:()=>{r(!n)},children:n?"Hide pattern":"Show pattern"})]})}
2
2
  //# sourceMappingURL=Pattern.js.map
@@ -1,8 +1,7 @@
1
- import React from 'react';
2
1
  interface CircleIconProps {
3
2
  sign: string;
4
3
  className?: string;
5
4
  color?: string;
6
5
  }
7
- export declare function CircleIcon({ sign, className, color }: CircleIconProps): React.JSX.Element;
6
+ export declare function CircleIcon({ sign, className, color }: CircleIconProps): import("react/jsx-runtime").JSX.Element;
8
7
  export {};
@@ -1,4 +1,4 @@
1
- import React from"react";import styled from"styled-components";export function CircleIcon({sign:o,className:r,color:e}){return React.createElement(StyledCircleIcon,{className:r,color:e},o)}const StyledCircleIcon=styled.span`
1
+ import{jsx as _jsx}from"react/jsx-runtime";import styled from"styled-components";export function CircleIcon({sign:o,className:r,color:e}){return _jsx(StyledCircleIcon,{className:r,color:e,children:o})}const StyledCircleIcon=styled.span`
2
2
  background-color: var(--bg-color);
3
3
  border-radius: 50%;
4
4
  border: 1px solid ${({color:o})=>o||"var(--border-color-primary)"};
@@ -1,3 +1,3 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import type { FieldProps } from './types';
3
- export declare const PropertyDetails: React.NamedExoticComponent<FieldProps>;
3
+ export declare const PropertyDetails: import("react").NamedExoticComponent<FieldProps>;
@@ -1,4 +1,4 @@
1
- import React,{memo}from"react";import styled from"styled-components";import{Schema}from"../Schema";import{FieldDetails}from"./FieldDetails";import{generateDeepLink}from"../common/LinkToField";function PropertyDetailsComponent({field:e,skipWriteOnly:r,skipReadOnly:t,level:i,showTitle:a,showExamples:s,renderDiscriminatorSwitch:o,isFirst:n,fieldParentsName:p}){const l=generateDeepLink(e),m=!e.schema.isPrimitive&&!e.schema.isCircular;return React.createElement(Wrapper,{isFist:n,expanded:m,className:"property"},React.createElement(FieldDetails,{field:e,showExamples:s,renderDiscriminatorSwitch:o,deepLink:l,fieldParentsName:p}),m&&React.createElement(Schema,{schema:e.schema,skipReadOnly:t,skipWriteOnly:r,showTitle:a,expandable:!0,level:i,fieldParentsName:[...p||[],e.name],deepLink:l}))}export const PropertyDetails=memo(PropertyDetailsComponent);const Wrapper=styled.div`
1
+ import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{memo}from"react";import styled from"styled-components";import{Schema}from"../Schema";import{FieldDetails}from"./FieldDetails";import{generateDeepLink}from"../common/LinkToField";function PropertyDetailsComponent({field:e,skipWriteOnly:r,skipReadOnly:i,level:s,showTitle:t,showExamples:a,renderDiscriminatorSwitch:o,isFirst:n,fieldParentsName:p}){const m=generateDeepLink(e),l=!e.schema.isPrimitive&&!e.schema.isCircular;return _jsxs(Wrapper,{isFist:n,expanded:l,className:"property",children:[_jsx(FieldDetails,{field:e,showExamples:a,renderDiscriminatorSwitch:o,deepLink:m,fieldParentsName:p}),l&&_jsx(Schema,{schema:e.schema,skipReadOnly:i,skipWriteOnly:r,showTitle:t,expandable:!0,level:s,fieldParentsName:[...p||[],e.name],deepLink:m})]})}export const PropertyDetails=memo(PropertyDetailsComponent);const Wrapper=styled.div`
2
2
  padding: ${({isFist:e})=>`var(--schema-${e?"fist-":""}property-details-spacing)`} 0
3
3
  ${({expanded:e})=>e?0:"var(--schema-property-details-spacing)"};
4
4
  ${({expanded:e})=>!e&&"border-bottom: 1px solid var(--border-color-primary)"};
@@ -1,7 +1,6 @@
1
- import React from 'react';
2
1
  type SchemaTypeInfoProps = {
3
2
  type?: string;
4
3
  className?: string;
5
4
  };
6
- export declare function SchemaTypeInfo({ type, className }: SchemaTypeInfoProps): React.JSX.Element | null;
5
+ export declare function SchemaTypeInfo({ type, className }: SchemaTypeInfoProps): import("react/jsx-runtime").JSX.Element | null;
7
6
  export {};
@@ -1,4 +1,4 @@
1
- import React from"react";import styled from"styled-components";export function SchemaTypeInfo({type:e,className:t}){return e?React.createElement(FieldLabel,{className:t},e):null}const FieldLabel=styled.em`
1
+ import{jsx as _jsx}from"react/jsx-runtime";import styled from"styled-components";export function SchemaTypeInfo({type:e,className:t}){return e?_jsx(FieldLabel,{className:t,children:e}):null}const FieldLabel=styled.em`
2
2
  vertical-align: middle;
3
3
  color: var(--schema-type-text-color);
4
4
  font-size: var(--font-size-base);
@@ -1,5 +1,4 @@
1
- import React from 'react';
2
1
  import type { ReactElement } from 'react';
3
2
  import type { SimpleEnumsProps } from './types';
4
3
  export declare function SimpleEnumsComponent({ enums, enumSkipQuotes, type, toggle, showToggleButton, toggleButtonText, }: SimpleEnumsProps): ReactElement;
5
- export declare const SimpleEnums: React.NamedExoticComponent<SimpleEnumsProps>;
4
+ export declare const SimpleEnums: import("react").NamedExoticComponent<SimpleEnumsProps>;
@@ -1,4 +1,4 @@
1
- import React,{memo}from"react";import styled from"styled-components";import{FieldLabel,Tag}from"../common";import{ToggleButton}from"./styled";export function SimpleEnumsComponent({enums:e,enumSkipQuotes:t,type:n,toggle:o,showToggleButton:m,toggleButtonText:l}){return React.createElement(Row,null,React.createElement(FieldLabel,null,"array"===n?"Items":""," ",1===e.length?"Value":"Enum"),e.map(((e,n)=>React.createElement(Tag,{key:e+n},t?String(e):JSON.stringify(e)))),m?React.createElement(ToggleButton,{onClick:o},l):null)}export const SimpleEnums=memo(SimpleEnumsComponent);const Row=styled.div`
1
+ import{jsxs as _jsxs,jsx as _jsx}from"react/jsx-runtime";import{memo}from"react";import styled from"styled-components";import{FieldLabel,Tag,ToggleButton}from"../common";export function SimpleEnumsComponent({enums:e,enumSkipQuotes:t,type:o,toggle:n,showToggleButton:s,toggleButtonText:m}){return _jsxs(Row,{children:[_jsxs(FieldLabel,{children:["array"===o?"Items":""," ",1===e.length?"Value":"Enum"]}),e.map(((e,o)=>_jsx(Tag,{children:t?String(e):JSON.stringify(e)},e+o))),s?_jsx(ToggleButton,{onClick:n,children:m}):null]})}export const SimpleEnums=memo(SimpleEnumsComponent);const Row=styled.div`
2
2
  display: flex;
3
3
  flex-wrap: wrap;
4
4
  align-items: center;
@@ -1,4 +1,3 @@
1
- export declare const ToggleButton: import("styled-components").StyledComponent<"button", any, {}, never>;
2
1
  export declare const DescriptionEnumsBlock: import("styled-components").StyledComponent<"main", any, {
3
2
  compact?: boolean | undefined;
4
3
  inline?: boolean | undefined;
@@ -1,13 +1,4 @@
1
- import styled from"styled-components";import{Markdown as MarkdownWrapper}from"@redocly/theme";export const ToggleButton=styled.button`
2
- background: none;
3
- border: none;
4
- color: var(--link-color-primary);
5
- vertical-align: middle;
6
- font-size: 13px;
7
- line-height: 20px;
8
- padding: 0;
9
- cursor: pointer;
10
- `;export const DescriptionEnumsBlock=styled(MarkdownWrapper)`
1
+ import styled from"styled-components";import{Markdown as MarkdownWrapper}from"@redocly/theme";export const DescriptionEnumsBlock=styled(MarkdownWrapper)`
11
2
  table.md {
12
3
  margin: var(--spacing-xs) 0 0;
13
4
  display: table;
@@ -1,5 +1,4 @@
1
- import React from 'react';
2
1
  import type { PropsWithChildren, ReactElement } from 'react';
3
2
  import type { AppProviderProps, StoreProviderProps } from './types';
4
3
  export declare const AppProvider: ({ definitions, options, definitionUrl, definition, activeSampleLanguage, children, }: PropsWithChildren<AppProviderProps>) => ReactElement | null;
5
- export declare const StoreProvider: React.MemoExoticComponent<({ children, options: rawOptions, definitionUrl, definition, activeSampleLanguage, portalOptions, }: PropsWithChildren<StoreProviderProps>) => React.JSX.Element>;
4
+ export declare const StoreProvider: import("react").MemoExoticComponent<({ children, options: rawOptions, definitionUrl, definition, activeSampleLanguage, portalOptions, }: PropsWithChildren<StoreProviderProps>) => import("react/jsx-runtime").JSX.Element>;
@@ -1,2 +1,2 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,i,o){return new(i||(i=Promise))((function(n,a){function r(e){try{l(o.next(e))}catch(e){a(e)}}function s(e){try{l(o.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,s)}l((o=o.apply(e,t||[])).next())}))};import React,{cloneElement,isValidElement,memo,useCallback,useEffect,useMemo,useRef,useState}from"react";import{Tag}from"@markdoc/markdoc";import{Loading,markdoc}from"@redocly/theme";import{createStore,Provider}from"jotai";import{normalizeOptions,OpenAPIParser}from"../../services";import{getMarkdownHeaderId,loadMany,loadSingle,useDeepCompareMemoize}from"./utils";import{argValueToBoolean,fromLocalStorage}from"../../utils";import{SecurityDefs}from"../SecurityRequirement";import{SchemaDefinition}from"../SchemaDefinition";import{PullRight,RedocResponse}from"../pluggable";import{appLocalStore,appSessionStore,appStore}from"../../jotai/app";import{globalStore}from"../../jotai/store";import{operationStore}from"../../jotai/operation";import JotaiNexus from"../../jotai/nexus";export const AppProvider=({definitions:e,options:t,definitionUrl:i,definition:o,activeSampleLanguage:n,children:a})=>{const[,r]=useState(),[s,l]=useState(!0),[c,u]=useState(null);useEffect((()=>{!function(){__awaiter(this,void 0,void 0,(function*(){l(!0);try{u(e?yield loadMany(e):yield loadSingle(o,i,t))}catch(e){r((()=>{throw e}))}}))}()}),[e,o,i,t]);const p=useMemo((()=>{var e,o,a;if(c)return(null===(e=null==t?void 0:t.hooks)||void 0===e?void 0:e.onInit)&&(null===(a=null===(o=t.hooks)||void 0===o?void 0:o.onInit)||void 0===a||a.call(o,{store:{definition:c,options:t,definitionUrl:i,activeSampleLanguage:n}})),{definition:c,options:t,definitionUrl:i,activeSampleLanguage:n}}),useDeepCompareMemoize([c,t,i]));return useEffect((()=>{p&&l(!1)}),[p]),p?s?argValueToBoolean(null==t?void 0:t.hideLoading,!1)?null:React.createElement(Loading,{color:"--loading-spinner-color"}):isValidElement(a)?cloneElement(a,{store:p}):null:null};const DEFAULT_OPTIONS={ignoreNamedSchemas:["java.io.ObjectStreamField"],maxDisplayedEnumValues:10,markdocOptions:{tags:{securityDefinitions:{render:"SecurityDefinitions"},pullRight:{render:"PullRight",attributes:{htmlWrap:{type:String,default:!1}}},schemaDefinition:{render:"SchemaDefinition",attributes:{schemaRef:{type:String},exampleRef:{type:String},showReadOnly:{type:Boolean},showWriteOnly:{type:Boolean},htmlWrap:{type:String,default:!1}}}},nodes:{heading:{children:["inline"],attributes:{id:{type:String},level:{type:Number,required:!0,default:1}},transform(e,t){const i=e.transformAttributes(t),o=e.transformChildren(t),n="string"==typeof i.id?i.id:getMarkdownHeaderId(o);return new Tag("Heading",Object.assign(Object.assign({},i),{id:n,level:e.attributes.level}),o)}}},components:{SecurityDefinitions:SecurityDefs,SchemaDefinition:SchemaDefinition,RedocResponse:RedocResponse,PullRight:PullRight,Heading:markdoc.components.Heading}}};export const StoreProvider=memo((({children:e,options:t,definitionUrl:i,definition:o,activeSampleLanguage:n,portalOptions:a})=>{const r=useRef(),s=useCallback((()=>{var e;const n=normalizeOptions(Object.assign({},t),DEFAULT_OPTIONS),a=isVersioned(o)?(null===(e=o.versions)||void 0===e?void 0:e.map((({spec:e,id:t,title:i,url:o},a)=>{if(e){const r=t||`Definition_${a}`;return{id:r,title:i||`Definition_${a}`,url:o,parser:new OpenAPIParser(e,void 0,Object.assign(Object.assign({},n),{versionId:r}))}}})).filter(Boolean))||[]:[{url:i,parser:new OpenAPIParser(o,i,n)}];return{options:n,versions:a}}),[o,i,t]),l=useMemo((()=>{const e=createStore();r.current=e.set;const t=s(),i=t.options,o=JSON.parse(fromLocalStorage("appLocalStore")||"{}");if(e.set(appSessionStore,(e=>Object.assign(Object.assign({},e),{activeVersionIdx:0}))),e.set(appLocalStore,(e=>Object.assign(Object.assign({},e),{layout:o.layout||i.layout,activeSampleLanguage:n||o.activeSampleLanguage||i.defaultSampleLanguage}))),e.set(globalStore,(e=>Object.assign(Object.assign({},e),t))),e.set(appStore,{isSidebarOpened:!1,activeMimeName:(null==a?void 0:a.defaultMimeType)||"",menuNextLinks:[]}),null==a?void 0:a.operation){const{pointer:t,activeExampleName:i,activeServer:o}=a.operation;e.set(operationStore(t),(e=>Object.assign(Object.assign({},e),{activeExampleName:i,activeOneOf:{},activeServer:o,requestValues:{}})))}return e}),[n,s,null==a?void 0:a.defaultMimeType,null==a?void 0:a.operation]);return useEffect((()=>{r.current&&setTimeout((()=>{r.current(globalStore,s())}),0)}),[s,o]),React.createElement(Provider,{store:l,key:(null==a?void 0:a.definitionId)||"openapi"},React.createElement(JotaiNexus,null),e)}));const isVersioned=e=>"versions"in e;
1
+ var __awaiter=this&&this.__awaiter||function(e,t,i,o){return new(i||(i=Promise))((function(n,r){function a(e){try{l(o.next(e))}catch(e){r(e)}}function s(e){try{l(o.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(a,s)}l((o=o.apply(e,t||[])).next())}))};import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{cloneElement,isValidElement,memo,useCallback,useEffect,useMemo,useRef,useState}from"react";import{Tag}from"@markdoc/markdoc";import{Loading,markdoc}from"@redocly/theme";import{createStore,Provider}from"jotai";import{normalizeOptions,OpenAPIParser}from"../../services";import{getMarkdownHeaderId,loadMany,loadSingle,useDeepCompareMemoize}from"./utils";import{argValueToBoolean,fromLocalStorage}from"../../utils";import{SecurityDefs}from"../SecurityRequirement";import{SchemaDefinition}from"../SchemaDefinition";import{PullRight,RedocResponse}from"../pluggable";import{appLocalStore,appSessionStore,appStore}from"../../jotai/app";import{globalStore}from"../../jotai/store";import{operationStore}from"../../jotai/operation";import JotaiNexus from"../../jotai/nexus";export const AppProvider=({definitions:e,options:t,definitionUrl:i,definition:o,activeSampleLanguage:n,children:r})=>{const[,a]=useState(),[s,l]=useState(!0),[c,u]=useState(null);useEffect((()=>{!function(){__awaiter(this,void 0,void 0,(function*(){l(!0);try{u(e?yield loadMany(e):yield loadSingle(o,i,t))}catch(e){a((()=>{throw e}))}}))}()}),[e,o,i,t]);const p=useMemo((()=>{var e,o,r;if(c)return(null===(e=null==t?void 0:t.hooks)||void 0===e?void 0:e.onInit)&&(null===(r=null===(o=t.hooks)||void 0===o?void 0:o.onInit)||void 0===r||r.call(o,{store:{definition:c,options:t,definitionUrl:i,activeSampleLanguage:n}})),{definition:c,options:t,definitionUrl:i,activeSampleLanguage:n}}),useDeepCompareMemoize([c,t,i]));return useEffect((()=>{p&&l(!1)}),[p]),p?s?argValueToBoolean(null==t?void 0:t.hideLoading,!1)?null:_jsx(Loading,{color:"--loading-spinner-color"}):isValidElement(r)?cloneElement(r,{store:p}):null:null};const DEFAULT_OPTIONS={ignoreNamedSchemas:["java.io.ObjectStreamField"],maxDisplayedEnumValues:10,markdocOptions:{tags:{securityDefinitions:{render:"SecurityDefinitions"},pullRight:{render:"PullRight",attributes:{htmlWrap:{type:String,default:!1}}},schemaDefinition:{render:"SchemaDefinition",attributes:{schemaRef:{type:String},exampleRef:{type:String},showReadOnly:{type:Boolean},showWriteOnly:{type:Boolean},htmlWrap:{type:String,default:!1}}}},nodes:{heading:{children:["inline"],attributes:{id:{type:String},level:{type:Number,required:!0,default:1}},transform(e,t){const i=e.transformAttributes(t),o=e.transformChildren(t),n="string"==typeof i.id?i.id:getMarkdownHeaderId(o);return new Tag("Heading",Object.assign(Object.assign({},i),{id:n,level:e.attributes.level}),o)}}},components:{SecurityDefinitions:SecurityDefs,SchemaDefinition:SchemaDefinition,RedocResponse:RedocResponse,PullRight:PullRight,Heading:markdoc.components.Heading}}};export const StoreProvider=memo((({children:e,options:t,definitionUrl:i,definition:o,activeSampleLanguage:n,portalOptions:r})=>{const a=useRef(),s=useCallback((()=>{var e;const n=normalizeOptions(Object.assign({},t),DEFAULT_OPTIONS),r=isVersioned(o)?(null===(e=o.versions)||void 0===e?void 0:e.map((({spec:e,id:t,title:i,url:o},r)=>{if(e){const a=t||`Definition_${r}`;return{id:a,title:i||`Definition_${r}`,url:o,parser:new OpenAPIParser(e,void 0,Object.assign(Object.assign({},n),{versionId:a}))}}})).filter(Boolean))||[]:[{url:i,parser:new OpenAPIParser(o,i,n)}];return{options:n,versions:r}}),[o,i,t]),l=useMemo((()=>{const e=createStore();a.current=e.set;const t=s(),i=t.options,o=JSON.parse(fromLocalStorage("appLocalStore")||"{}");if(e.set(appSessionStore,(e=>Object.assign(Object.assign({},e),{activeVersionIdx:0}))),e.set(appLocalStore,(e=>Object.assign(Object.assign({},e),{layout:o.layout||i.layout,activeSampleLanguage:n||o.activeSampleLanguage||i.defaultSampleLanguage}))),e.set(globalStore,(e=>Object.assign(Object.assign({},e),t))),e.set(appStore,{isSidebarOpened:!1,activeMimeName:(null==r?void 0:r.defaultMimeType)||"",menuNextLinks:[]}),null==r?void 0:r.operation){const{pointer:t,activeExampleName:i,activeServer:o}=r.operation;e.set(operationStore(t),(e=>Object.assign(Object.assign({},e),{activeExampleName:i,activeOneOf:{},activeServer:o,requestValues:{}})))}return e}),[n,s,null==r?void 0:r.defaultMimeType,null==r?void 0:r.operation]);return useEffect((()=>{a.current&&setTimeout((()=>{a.current(globalStore,s())}),0)}),[s,o]),_jsxs(Provider,{store:l,children:[_jsx(JotaiNexus,{}),e]},(null==r?void 0:r.definitionId)||"openapi")}));const isVersioned=e=>"versions"in e;
2
2
  //# sourceMappingURL=Providers.js.map
@@ -1,5 +1,4 @@
1
- import React from 'react';
2
1
  import type { PropsWithChildren, ReactElement } from 'react';
3
2
  import type { RedoclyOpenAPIDocsProps, RedoclyOpenAPIDocsStandaloneProps } from './types';
4
- export declare function RedoclyOpenAPIDocs({ onLoaded, children, store, }: PropsWithChildren<Partial<RedoclyOpenAPIDocsProps>>): React.JSX.Element | null;
3
+ export declare function RedoclyOpenAPIDocs({ onLoaded, children, store, }: PropsWithChildren<Partial<RedoclyOpenAPIDocsProps>>): import("react/jsx-runtime").JSX.Element | null;
5
4
  export declare function RedoclyOpenAPIDocsStandalone({ definition, definitionUrl, options, activeItemId, activeSampleLanguage, activeDeepLink, }: RedoclyOpenAPIDocsStandaloneProps): ReactElement;
@@ -1,2 +1,2 @@
1
- import React,{useRef,memo}from"react";import{SidebarLogo,GlobalStyle,useMount,LayoutVariant}from"@redocly/theme";import{Search}from"../Search";import{AppProvider,StoreProvider}from"./Providers";import{Overlay}from"../Overlay";import{VersionSwitcher}from"../VersionSwitcher";import{ApiContentWrap,RedocWrapStyled,CssFixes}from"./styled";import{StickyResponsiveSidebar}from"../StickySidebar";import{ErrorBoundary}from"../ErrorBoundary";import{SideMenu}from"../SideMenu";import{Content}from"../Content";import{useContentItems}from"../../hooks";import{withRouter}from"../../hoc/withRouter";import{withStore}from"../../hoc/withStore";import{compose}from"../../utils";import{useLicense}from"../../hooks/useLicense";const RedoclyOpenAPIDocsComponent=compose(withRouter,withStore,memo)((({licenseKey:e,onLoaded:o,children:t,options:n,versions:i,layout:r,activeVersionIdx:a,onChangeActiveVersion:l,collapsedSidebar:c,parser:s})=>{var d,m,u,p,v;const f=useRef(null),{isValid:R,licenseInfo:S}=useLicense(e);useMount((()=>{null==o||o()}));const{disableSidebar:h,whiteLabel:y,hideLogo:E,hideFab:b,scrollYOffset:L,disableLoadingAnimation:g}=n||{},{flatItems:I,contentItems:C}=useContentItems({parser:s,options:n}),P=null===(m=null===(d=s.definition)||void 0===d?void 0:d.info)||void 0===m?void 0:m["x-logo"];return React.createElement(React.Fragment,null,React.createElement(GlobalStyle,null),React.createElement(RedocWrapStyled,{className:"redoc-wrap",ref:f},!R&&React.createElement(Overlay,{licenseInfo:S}),React.createElement(CssFixes,{whiteLabel:y,layout:r}),!h&&React.createElement(StickyResponsiveSidebar,{hideFab:b,scrollYOffset:L,className:"menu-content",collapsedSidebar:!c},!E&&React.createElement(SidebarLogo,{imageUrl:null==P?void 0:P.url,href:(null==P?void 0:P.href)||(null===(v=null===(p=null===(u=s.definition)||void 0===u?void 0:u.info)||void 0===p?void 0:p.contact)||void 0===v?void 0:v.url),altText:null==P?void 0:P.altText,backgroundColor:null==P?void 0:P.backgroundColor}),i.length>1&&React.createElement(VersionSwitcher,{versions:i,activeVersionIdx:a,onChange:l}),React.createElement(Search,{contentItems:C,flatItems:I,options:n}),React.createElement(SideMenu,{items:R?C:[]})),React.createElement(ApiContentWrap,{className:"api-content",id:"api-content",layout:r===LayoutVariant.THREE_PANEL?LayoutVariant.THREE_PANEL:LayoutVariant.STACKED,collapsedSidebar:c},React.createElement(Content,{items:R?C:[],routingBasePath:n.routingBasePath,disableLoadingAnimation:g}),t)))}));export function RedoclyOpenAPIDocs({onLoaded:e,children:o,store:t}){var n,i,r;return(null==t?void 0:t.definition)?React.createElement(StoreProvider,Object.assign({},t),React.createElement(RedoclyOpenAPIDocsComponent,{onLoaded:e,basePath:null===(n=t.options)||void 0===n?void 0:n.routingBasePath,licenseKey:null===(i=t.options)||void 0===i?void 0:i.licenseKey,enableRouter:null===(r=t.options)||void 0===r?void 0:r.enableRouter,portalOptions:null==t?void 0:t.portalOptions},o)):null}export function RedoclyOpenAPIDocsStandalone({definition:e,definitionUrl:o,options:t={},activeItemId:n,activeSampleLanguage:i,activeDeepLink:r}){const a=React.createElement(AppProvider,{definition:e,definitionUrl:o,options:t,activeItemId:n,activeSampleLanguage:i,activeDeepLink:r},React.createElement(RedoclyOpenAPIDocs,null));return t.disableErrorBoundary?a:React.createElement(ErrorBoundary,null,a)}
1
+ import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";import{useRef,memo}from"react";import{SidebarLogo,GlobalStyle,useMount,LayoutVariant}from"@redocly/theme";import{Search}from"../Search";import{AppProvider,StoreProvider}from"./Providers";import{Overlay}from"../Overlay";import{VersionSwitcher}from"../VersionSwitcher";import{ApiContentWrap,RedocWrapStyled,CssFixes}from"./styled";import{StickyResponsiveSidebar}from"../StickySidebar";import{ErrorBoundary}from"../ErrorBoundary";import{SideMenu}from"../SideMenu";import{Content}from"../Content";import{useContentItems}from"../../hooks";import{withRouter}from"../../hoc/withRouter";import{withStore}from"../../hoc/withStore";import{compose}from"../../utils";import{useLicense}from"../../hooks/useLicense";const RedoclyOpenAPIDocsComponent=compose(withRouter,withStore,memo)((({licenseKey:e,onLoaded:o,children:i,options:t,versions:n,layout:r,activeVersionIdx:s,onChangeActiveVersion:a,collapsedSidebar:l,parser:d})=>{var c,m,p,u,v;const f=useRef(null),{isValid:h,licenseInfo:S}=useLicense(e);useMount((()=>{null==o||o()}));const{disableSidebar:x,whiteLabel:y,hideLogo:b,hideFab:g,scrollYOffset:j,disableLoadingAnimation:L}=t||{},{flatItems:_,contentItems:I}=useContentItems({parser:d,options:t}),R=null===(m=null===(c=d.definition)||void 0===c?void 0:c.info)||void 0===m?void 0:m["x-logo"];return _jsxs(_Fragment,{children:[_jsx(GlobalStyle,{}),_jsxs(RedocWrapStyled,{className:"redoc-wrap",ref:f,children:[!h&&_jsx(Overlay,{licenseInfo:S}),_jsx(CssFixes,{whiteLabel:y,layout:r}),!x&&_jsxs(StickyResponsiveSidebar,{hideFab:g,scrollYOffset:j,className:"menu-content",collapsedSidebar:!l,children:[!b&&_jsx(SidebarLogo,{imageUrl:null==R?void 0:R.url,href:(null==R?void 0:R.href)||(null===(v=null===(u=null===(p=d.definition)||void 0===p?void 0:p.info)||void 0===u?void 0:u.contact)||void 0===v?void 0:v.url),altText:null==R?void 0:R.altText,backgroundColor:null==R?void 0:R.backgroundColor}),n.length>1&&_jsx(VersionSwitcher,{versions:n,activeVersionIdx:s,onChange:a}),_jsx(Search,{contentItems:I,flatItems:_,options:t}),_jsx(SideMenu,{items:h?I:[]})]}),_jsxs(ApiContentWrap,{className:"api-content",id:"api-content",layout:r===LayoutVariant.THREE_PANEL?LayoutVariant.THREE_PANEL:LayoutVariant.STACKED,collapsedSidebar:l,children:[_jsx(Content,{items:h?I:[],routingBasePath:t.routingBasePath,disableLoadingAnimation:L}),i]})]})]})}));export function RedoclyOpenAPIDocs({onLoaded:e,children:o,store:i}){var t,n,r;return(null==i?void 0:i.definition)?_jsx(StoreProvider,Object.assign({},i,{children:_jsx(RedoclyOpenAPIDocsComponent,{onLoaded:e,basePath:null===(t=i.options)||void 0===t?void 0:t.routingBasePath,licenseKey:null===(n=i.options)||void 0===n?void 0:n.licenseKey,enableRouter:null===(r=i.options)||void 0===r?void 0:r.enableRouter,portalOptions:null==i?void 0:i.portalOptions,children:o})})):null}export function RedoclyOpenAPIDocsStandalone({definition:e,definitionUrl:o,options:i={},activeItemId:t,activeSampleLanguage:n,activeDeepLink:r}){const s=_jsx(AppProvider,{definition:e,definitionUrl:o,options:i,activeItemId:t,activeSampleLanguage:n,activeDeepLink:r,children:_jsx(RedoclyOpenAPIDocs,{})});return i.disableErrorBoundary?s:_jsx(ErrorBoundary,{children:s})}
2
2
  //# sourceMappingURL=RedoclyOpenAPIDocs.js.map
@@ -1,2 +1,2 @@
1
- import React from"react";import{AppProvider}from"./Providers";import{RedoclyOpenAPIDocs}from"./RedoclyOpenAPIDocs";import{ErrorBoundary}from"../ErrorBoundary";export function RedoclyOpenAPIDocsMultiStandalone({definitions:o,options:e={}}){return React.createElement(ErrorBoundary,null,React.createElement(AppProvider,{definitions:o,options:e},React.createElement(RedoclyOpenAPIDocs,null)))}
1
+ import{jsx as _jsx}from"react/jsx-runtime";import{AppProvider}from"./Providers";import{RedoclyOpenAPIDocs}from"./RedoclyOpenAPIDocs";import{ErrorBoundary}from"../ErrorBoundary";export function RedoclyOpenAPIDocsMultiStandalone({definitions:o,options:r={}}){return _jsx(ErrorBoundary,{children:_jsx(AppProvider,{definitions:o,options:r,children:_jsx(RedoclyOpenAPIDocs,{})})})}
2
2
  //# sourceMappingURL=RedoclyOpenAPIDocsMultiStandalone.js.map
@@ -1,2 +1,2 @@
1
- import React from"react";export function RenderHook(e){if(!e.Hook)return null;const t=e.Hook(e.props),n=t&&t.html;return n?React.createElement("span",{dangerouslySetInnerHTML:{__html:n}}):t}export function getAccessModeLabelText(e,t){return t&&(e.readOnly?"read-only":e.writeOnly&&"write-only")||null}
1
+ import{jsx as _jsx}from"react/jsx-runtime";export function RenderHook(e){if(!e.Hook)return null;const n=e.Hook(e.props),r=n&&n.html;return r?_jsx("span",{dangerouslySetInnerHTML:{__html:r}}):n}export function getAccessModeLabelText(e,n){return n&&(e.readOnly?"read-only":e.writeOnly&&"write-only")||null}
2
2
  //# sourceMappingURL=RenderHook.js.map
@@ -1,8 +1,8 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import type { OperationModel } from '../../models';
3
3
  type ReplayProps = {
4
4
  operation: OperationModel;
5
5
  corsProxyUrl?: string;
6
6
  };
7
- export declare const Replay: React.NamedExoticComponent<ReplayProps>;
7
+ export declare const Replay: import("react").NamedExoticComponent<ReplayProps>;
8
8
  export {};
@@ -1,4 +1,4 @@
1
- import React,{Suspense,lazy,memo,useState}from"react";import{Button,RocketIcon,Portal,CircleDashIcon}from"@redocly/theme";import styled from"styled-components";import{useAtom,useAtomValue}from"jotai";import{convertParameters,convertRequestBody,convertRequestSecurity}from"./utils";import{globalOptionsAtom}from"../../jotai/store";import{replayStateAtom}from"../../jotai/replay";import{LOADING_STATE}from"../../constants";const ReplayOverlay=lazy((()=>import("@redocly/replay").then((e=>({default:e.ReplayOverlay})))));function ReplayComponent({operation:e,corsProxyUrl:t}){const{routingBasePath:r}=useAtomValue(globalOptionsAtom),[o,a]=useState(!1),[n,l]=useAtom(replayStateAtom),c=()=>{n!==LOADING_STATE.LOADING&&a(!o),n===LOADING_STATE.NOT_LOADED&&l(LOADING_STATE.LOADING)};return React.createElement(Wrapper,null,React.createElement("span",null,"Experience it firsthand in the API Explorer!"),React.createElement(Button,{onClick:c,variant:"primary",iconPosition:"left",icon:n===LOADING_STATE.LOADING?React.createElement(CircleDashIcon,null):React.createElement(RocketIcon,null)},n===LOADING_STATE.LOADING?"Loading...":"Try it"),o&&React.createElement(Suspense,null,React.createElement(Portal,{mountId:"api-content"},React.createElement(ReplayOverlay,{value:{name:e.name,method:e.httpVerb,parameters:convertParameters(e.parameters),body:convertRequestBody(e.requestBody),path:e.path,servers:e.servers,security:convertRequestSecurity(e.security)},onClose:c,corsProxyUrl:t,operationUrl:r+e.href,onLoad:()=>l(LOADING_STATE.LOADED)}))))}export const Replay=memo(ReplayComponent);const Wrapper=styled.div`
1
+ import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{Suspense,memo,useState}from"react";import{Button,RocketIcon,Portal,CircleDashIcon}from"@redocly/theme";import styled from"styled-components";import{useAtom,useAtomValue}from"jotai";import{ReplayOverlay}from"@redocly/replay";import{convertParameters,convertRequestBody,convertRequestSecurity}from"./utils";import{globalOptionsAtom}from"../../jotai/store";import{replayStateAtom}from"../../jotai/replay";import{LOADING_STATE}from"../../constants";function ReplayComponent({operation:e,corsProxyUrl:t}){const{routingBasePath:r}=useAtomValue(globalOptionsAtom),[o,a]=useState(!1),[s,n]=useAtom(replayStateAtom),i=()=>{s!==LOADING_STATE.LOADING&&a(!o),s===LOADING_STATE.NOT_LOADED&&n(LOADING_STATE.LOADING)};return _jsxs(Wrapper,{children:[_jsx("span",{children:"Experience it firsthand in the API Explorer!"}),_jsx(Button,{onClick:i,variant:"primary",iconPosition:"left",icon:s===LOADING_STATE.LOADING?_jsx(CircleDashIcon,{}):_jsx(RocketIcon,{}),children:s===LOADING_STATE.LOADING?"Loading...":"Try it"}),o&&_jsx(Suspense,{children:_jsx(Portal,{mountId:"api-content",children:_jsx(ReplayOverlay,{value:{name:e.name,method:e.httpVerb,parameters:convertParameters(e.parameters),body:convertRequestBody(e.requestBody),path:e.path,servers:e.servers,security:convertRequestSecurity(e.security)},onClose:i,corsProxyUrl:t,operationUrl:r+e.href,onLoad:()=>n(LOADING_STATE.LOADED)})})})]})}export const Replay=memo(ReplayComponent);const Wrapper=styled.div`
2
2
  display: flex;
3
3
  justify-content: space-between;
4
4
  align-items: center;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import type { MediaContentModel } from '../../models';
3
3
  interface BodyContentProps {
4
4
  content: MediaContentModel;
@@ -6,5 +6,5 @@ interface BodyContentProps {
6
6
  required?: boolean;
7
7
  deepLink: string;
8
8
  }
9
- export declare const Body: React.NamedExoticComponent<BodyContentProps>;
9
+ export declare const Body: import("react").NamedExoticComponent<BodyContentProps>;
10
10
  export {};
@@ -1,2 +1,2 @@
1
- import React,{memo}from"react";import{BodyContent}from"../common/BodyContent";function BodyComponent({content:e,description:o,required:t,deepLink:n}){return React.createElement(BodyContent,{content:e,required:t,description:o,skipReadOnly:e.isRequestType,skipWriteOnly:!e.isRequestType,deepLink:n})}export const Body=memo(BodyComponent);
1
+ import{jsx as _jsx}from"react/jsx-runtime";import{memo}from"react";import{BodyContent}from"../common/BodyContent";function BodyComponent({content:e,description:o,required:t,deepLink:n}){return _jsx(BodyContent,{content:e,required:t,description:o,skipReadOnly:e.isRequestType,skipWriteOnly:!e.isRequestType,deepLink:n})}export const Body=memo(BodyComponent);
2
2
  //# sourceMappingURL=Body.js.map
@@ -1,9 +1,9 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import type { FieldModel } from '../../models';
3
3
  interface ParametersGroupProps {
4
4
  title: string;
5
5
  parameters: FieldModel[];
6
6
  deepLink: string;
7
7
  }
8
- export declare const ParametersGroup: React.NamedExoticComponent<ParametersGroupProps>;
8
+ export declare const ParametersGroup: import("react").NamedExoticComponent<ParametersGroupProps>;
9
9
  export {};
@@ -1,4 +1,4 @@
1
- import React,{memo}from"react";import styled from"styled-components";import{LinkIcon}from"@redocly/theme";import{PropertyDetails}from"../PropertyDetails";import{LinkToField}from"../common/LinkToField";function ParametersGroupComponent({title:e,parameters:t,deepLink:r}){return t&&t.length?React.createElement(Wrapper,null,React.createElement(Title,null,React.createElement(LinkToField,{to:r}),e),t.map(((e,t)=>React.createElement(PropertyDetails,{key:e.name,isFirst:0===t,field:e,showExamples:!0})))):null}export const ParametersGroup=memo(ParametersGroupComponent);const Title=styled.span`
1
+ import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{memo}from"react";import styled from"styled-components";import{LinkIcon}from"@redocly/theme";import{PropertyDetails}from"../PropertyDetails";import{LinkToField}from"../common/LinkToField";function ParametersGroupComponent({title:e,parameters:r,deepLink:o}){return r&&r.length?_jsxs(Wrapper,{children:[_jsxs(Title,{children:[_jsx(LinkToField,{to:o}),e]}),r.map(((e,r)=>_jsx(PropertyDetails,{isFirst:0===r,field:e,showExamples:!0},e.name)))]}):null}export const ParametersGroup=memo(ParametersGroupComponent);const Title=styled.span`
2
2
  position: relative;
3
3
  display: flex;
4
4
  align-items: center;
@@ -1,2 +1,2 @@
1
- import React from"react";import{ParametersGroup}from"./ParametersGroup";import{Body}from"./Body";import{makeDeepLink}from"../../services";const PARAM_PLACES=["path","query","cookie","header"],PARAM_NAMES_MAP={[PARAM_PLACES[0]]:"Path",[PARAM_PLACES[1]]:"Query",[PARAM_PLACES[2]]:"Cookies",[PARAM_PLACES[3]]:"Headers"};export function RequestParameters({body:e,parameters:r=[],operationId:t}){if(!e&&!r.length)return null;const a=(e=>{const r={};return e.forEach((e=>{safePush(r,e.in,e)})),r})(r),o=r.length>0?PARAM_PLACES:[],{content:n,description:A,required:i}=e||{};return React.createElement(React.Fragment,null,o.map((e=>React.createElement(ParametersGroup,{key:e,title:PARAM_NAMES_MAP[e],parameters:a[e],deepLink:makeDeepLink(t,`request/${e}`)}))),n&&React.createElement(Body,{content:n,description:A,required:i,deepLink:makeDeepLink(t,"request/body")}))}function safePush(e,r="",t){e[r]||(e[r]=[]),e[r].push(t)}
1
+ import{jsx as _jsx,Fragment as _Fragment,jsxs as _jsxs}from"react/jsx-runtime";import{ParametersGroup}from"./ParametersGroup";import{Body}from"./Body";import{makeDeepLink}from"../../services";const PARAM_PLACES=["path","query","cookie","header"],PARAM_NAMES_MAP={[PARAM_PLACES[0]]:"Path",[PARAM_PLACES[1]]:"Query",[PARAM_PLACES[2]]:"Cookies",[PARAM_PLACES[3]]:"Headers"};export function RequestParameters({body:e,parameters:r=[],operationId:t}){if(!e&&!r.length)return null;const s=(e=>{const r={};return e.forEach((e=>{safePush(r,e.in,e)})),r})(r),o=r.length>0?PARAM_PLACES:[],{content:a,description:n,required:i}=e||{};return _jsxs(_Fragment,{children:[o.map((e=>_jsx(ParametersGroup,{title:PARAM_NAMES_MAP[e],parameters:s[e],deepLink:makeDeepLink(t,`request/${e}`)},e))),a&&_jsx(Body,{content:a,description:n,required:i,deepLink:makeDeepLink(t,"request/body")})]})}function safePush(e,r="",t){e[r]||(e[r]=[]),e[r].push(t)}
2
2
  //# sourceMappingURL=RequestParameters.js.map
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import type { MediaContentModel, OperationModel } from '../../models';
3
3
  import type { Unstable_ExternalCodeSample } from '../../services';
4
4
  import type { ExampleSwitchOptions } from '../Samples';
@@ -14,5 +14,5 @@ interface CodeSamplesProps extends ExampleSwitchOptions {
14
14
  onlyDefaultMimeType?: boolean;
15
15
  onCopyClick(): void;
16
16
  }
17
- export declare const CodeSample: React.NamedExoticComponent<CodeSamplesProps>;
17
+ export declare const CodeSample: import("react").NamedExoticComponent<CodeSamplesProps>;
18
18
  export {};
@@ -1,4 +1,4 @@
1
- var __rest=this&&this.__rest||function(e,o){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&o.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var l=0;for(r=Object.getOwnPropertySymbols(e);l<r.length;l++)o.indexOf(r[l])<0&&Object.prototype.propertyIsEnumerable.call(e,r[l])&&(t[r[l]]=e[r[l]])}return t};import React,{memo,useCallback}from"react";import{CodeBlock}from"@redocly/theme";import styled from"styled-components";import{DropdownOrLabel}from"../DropdownOrLabel";import{MediaTypesSwitch}from"../MediaTypeSwitch";import{DropdownWrapper}from"../PayloadSamples";import{Example}from"./Example";import{MimeLabel}from"../shared";import{Dropdown}from"../common/Dropdown";function CodeSampleComponent(e){var{onlyDefaultSample:o,onlyDefaultMimeType:t,content:r,onCopyClick:l}=e,a=__rest(e,["onlyDefaultSample","onlyDefaultMimeType","content","onCopyClick"]);const n=useCallback((e=>{var o,l,a;const n=t&&(null===(o=e.operation)||void 0===o?void 0:o.defaultMimeType);return(null!==(a=null===(l=null==r?void 0:r.mediaTypes)||void 0===l?void 0:l.length)&&void 0!==a?a:0)>1&&!n?React.createElement(DropdownWrapper,null,React.createElement(DropdownOrLabel,Object.assign({Label:MimeLabel,Dropdown:Dropdown,variant:"dark",fullWidth:!0},e))):null}),[r,t]),p=e=>a.source?React.createElement(StyledCodeBlock,{lang:a.lang,source:a.source,header:{controls:{copy:{onClick:l}}}}):React.createElement(StyledCodeBlock,{lang:a.lang,externalSource:{sample:a.externalSample,exampleName:e,operation:a.operation,pathParams:a.pathParams,properties:a.properties},header:{controls:{copy:{onClick:l}}}});return void 0===r||null!=a.source?p():React.createElement(MediaTypesSwitch,{content:r,renderDropdown:n},(e=>React.createElement(Example,{mediaType:e,mediaContent:r,renderSample:p,onlyDefaultSample:o})))}export const CodeSample=memo(CodeSampleComponent);const StyledCodeBlock=styled(CodeBlock)`
1
+ var __rest=this&&this.__rest||function(e,o){var r={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&o.indexOf(l)<0&&(r[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var t=0;for(l=Object.getOwnPropertySymbols(e);t<l.length;t++)o.indexOf(l[t])<0&&Object.prototype.propertyIsEnumerable.call(e,l[t])&&(r[l[t]]=e[l[t]])}return r};import{jsx as _jsx}from"react/jsx-runtime";import{memo,useCallback}from"react";import{CodeBlock}from"@redocly/theme";import styled from"styled-components";import{DropdownOrLabel}from"../DropdownOrLabel";import{MediaTypesSwitch}from"../MediaTypeSwitch";import{DropdownWrapper}from"../PayloadSamples";import{Example}from"./Example";import{MimeLabel}from"../shared";import{Dropdown}from"../common/Dropdown";function CodeSampleComponent(e){var{onlyDefaultSample:o,onlyDefaultMimeType:r,content:l,onCopyClick:t}=e,n=__rest(e,["onlyDefaultSample","onlyDefaultMimeType","content","onCopyClick"]);const a=useCallback((e=>{var o,t,n;const a=r&&(null===(o=e.operation)||void 0===o?void 0:o.defaultMimeType);return(null!==(n=null===(t=null==l?void 0:l.mediaTypes)||void 0===t?void 0:t.length)&&void 0!==n?n:0)>1&&!a?_jsx(DropdownWrapper,{children:_jsx(DropdownOrLabel,Object.assign({Label:MimeLabel,Dropdown:Dropdown,variant:"dark",fullWidth:!0},e))}):null}),[l,r]),p=e=>n.source?_jsx(StyledCodeBlock,{lang:n.lang,source:n.source,header:{controls:{copy:{onClick:t}}}}):_jsx(StyledCodeBlock,{lang:n.lang,externalSource:{sample:n.externalSample,exampleName:e,operation:n.operation,pathParams:n.pathParams,properties:n.properties},header:{controls:{copy:{onClick:t}}}});return void 0===l||null!=n.source?p():_jsx(MediaTypesSwitch,{content:l,renderDropdown:a,children:e=>_jsx(Example,{mediaType:e,mediaContent:l,renderSample:p,onlyDefaultSample:o})})}export const CodeSample=memo(CodeSampleComponent);const StyledCodeBlock=styled(CodeBlock)`
2
2
  border: none;
3
3
  margin: 0;
4
4
  `;
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import type { ReactElement } from 'react';
3
2
  import type { MediaContentModel, MediaTypeModel } from '../../models';
4
3
  interface ExampleProps {
@@ -7,5 +6,5 @@ interface ExampleProps {
7
6
  onlyDefaultSample?: boolean;
8
7
  renderSample: (exampleName?: string) => ReactElement;
9
8
  }
10
- export declare const Example: React.NamedExoticComponent<ExampleProps>;
9
+ export declare const Example: import("react").NamedExoticComponent<ExampleProps>;
11
10
  export {};
@@ -1,2 +1,2 @@
1
- import React,{memo}from"react";import{ExampleSwitch,useExampleKey}from"../Samples";import{useActivateExample}from"../../hooks";function ExampleComponent({mediaType:e,mediaContent:t,renderSample:m,onlyDefaultSample:a}){const l=e.examples||{},p=Object.keys(l),n=useActivateExample(t),{exampleKey:o,defaultExampleName:r}=useExampleKey(e.operation,l);if(!p.length||1===p.length)return m();if(r&&a)return m(o);return React.createElement(React.Fragment,null,React.createElement(ExampleSwitch,{examples:l,exampleKey:o,onChange:e=>n(e)}),m(o))}export const Example=memo(ExampleComponent);
1
+ import{jsx as _jsx,Fragment as _Fragment,jsxs as _jsxs}from"react/jsx-runtime";import{memo}from"react";import{ExampleSwitch,useExampleKey}from"../Samples";import{useActivateExample}from"../../hooks";function ExampleComponent({mediaType:e,mediaContent:m,renderSample:a,onlyDefaultSample:t}){const p=e.examples||{},n=Object.keys(p),o=useActivateExample(m),{exampleKey:r,defaultExampleName:s}=useExampleKey(e.operation,p);if(!n.length||1===n.length)return a();if(s&&t)return a(r);return _jsxs(_Fragment,{children:[_jsx(ExampleSwitch,{examples:p,exampleKey:r,onChange:e=>o(e)}),a(r)]})}export const Example=memo(ExampleComponent);
2
2
  //# sourceMappingURL=Example.js.map
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import type { MediaContentModel, OperationModel } from '../../models';
3
3
  interface RequestSamplesProps {
4
4
  operation: OperationModel;
@@ -10,5 +10,5 @@ interface RequestSamplesProps {
10
10
  onlyDefaultMimeType?: boolean;
11
11
  content?: MediaContentModel;
12
12
  }
13
- export declare const RequestSamples: React.NamedExoticComponent<RequestSamplesProps>;
13
+ export declare const RequestSamples: import("react").NamedExoticComponent<RequestSamplesProps>;
14
14
  export {};
@@ -1,2 +1,7 @@
1
- var __rest=this&&this.__rest||function(e,a){var o={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&a.indexOf(t)<0&&(o[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(t=Object.getOwnPropertySymbols(e);r<t.length;r++)a.indexOf(t[r])<0&&Object.prototype.propertyIsEnumerable.call(e,t[r])&&(o[t[r]]=e[t[r]])}return o};import React,{memo,useCallback,useEffect,useMemo}from"react";import{useAtomValue,useAtom}from"jotai";import{PanelHeader,Panel}from"@redocly/theme";import{PayloadSamples}from"../PayloadSamples";import{CodeSample}from"./CodeSample";import{useCodeSamples}from"./useCodeSamples";import{isPayloadSample}from"../../models";import{createCodeSampleCopyEvent}from"../../events";import{globalOptionsAtom}from"../../jotai/store";import{useTabsState}from"../Tabs";import{ServerListDropdown}from"../ServerListDropdown";import{LanguageDropdown}from"../Language";import{languageAtom}from"../../jotai/app";import{Replay}from"../Replay";function RequestSamplesComponent(e){var{operation:a,defaultLanguage:o="",disableHeader:t,content:r}=e,l=__rest(e,["operation","defaultLanguage","disableHeader","content"]);const[{activeLanguage:n},s]=useAtom(languageAtom),{events:m,corsProxyUrl:p}=useAtomValue(globalOptionsAtom),{samples:i,payload:c}=useCodeSamples(a),u=useCallback((({lang:e,title:o})=>()=>{var t;const r=createCodeSampleCopyEvent({operation:a,label:o,lang:e,type:"request"});null===(t=null==m?void 0:m.codeSamplesCopy)||void 0===t||t.call(m,r)}),[a,m]),d=useMemo((()=>i.map((({key:e,title:a})=>({key:e,title:a})))),[i]),y=useMemo((()=>i.find((({lang:e,key:a})=>[e,a].some((e=>e.toLowerCase()===o.toLowerCase()||e.toLowerCase()===n.key.toLowerCase()))))),[i,o,n.key]),{activeTab:g,handleTabChange:f}=useTabsState({tabs:d,defaultTab:y});useEffect((()=>{g.key!==n.key&&d.some((({key:e})=>e===n.key))&&f(n)}),[n,g.key,f,d]);const C=useCallback((e=>{f(e),s({activeLanguage:e})}),[f,s]),b=useMemo((()=>i.map((e=>e.key===g.key?React.createElement("div",{key:e.key+a.id},isPayloadSample(e)?React.createElement(PayloadSamples,Object.assign({content:e.requestBodyContent,onCopyClick:u(e)},l)):React.createElement(CodeSample,Object.assign({lang:e.lang,source:e.source,externalSample:e,content:null==c?void 0:c.requestBodyContent,operation:a,onCopyClick:u(e)},l))):null))),[g.key,u,a,null==c?void 0:c.requestBodyContent,l,i]);return i.length?React.createElement(Panel,{className:"panel-request-samples",header:t?void 0:()=>React.createElement(PanelHeader,{isExpandable:!1},React.createElement(ServerListDropdown,{operation:a}),React.createElement(LanguageDropdown,{activeTab:g,samples:i,onChange:C})),footer:React.createElement(Replay,{operation:a,corsProxyUrl:p}),isExpandable:!1},b):null}export const RequestSamples=memo(RequestSamplesComponent);
1
+ var __rest=this&&this.__rest||function(e,o){var a={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&o.indexOf(t)<0&&(a[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(t=Object.getOwnPropertySymbols(e);r<t.length;r++)o.indexOf(t[r])<0&&Object.prototype.propertyIsEnumerable.call(e,t[r])&&(a[t[r]]=e[t[r]])}return a};import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{memo,useCallback,useEffect,useMemo}from"react";import{useAtomValue,useAtom}from"jotai";import{PanelHeader,Panel}from"@redocly/theme";import styled from"styled-components";import{PayloadSamples}from"../PayloadSamples";import{CodeSample}from"./CodeSample";import{useCodeSamples}from"./useCodeSamples";import{isPayloadSample}from"../../models";import{createCodeSampleCopyEvent}from"../../events";import{globalOptionsAtom}from"../../jotai/store";import{useTabsState}from"../Tabs";import{ServerListDropdown}from"../ServerListDropdown";import{LanguageDropdown}from"../Language";import{languageAtom}from"../../jotai/app";import{Replay}from"../Replay";function RequestSamplesComponent(e){var{operation:o,defaultLanguage:a="",disableHeader:t,content:r}=e,s=__rest(e,["operation","defaultLanguage","disableHeader","content"]);const[{activeLanguage:l},n]=useAtom(languageAtom),{events:p,corsProxyUrl:m}=useAtomValue(globalOptionsAtom),{samples:i,payload:d}=useCodeSamples(o),u=useCallback((({lang:e,title:a})=>()=>{var t;const r=createCodeSampleCopyEvent({operation:o,label:a,lang:e,type:"request"});null===(t=null==p?void 0:p.codeSamplesCopy)||void 0===t||t.call(p,r)}),[o,p]),y=useMemo((()=>i.map((({key:e,title:o})=>({key:e,title:o})))),[i]),c=useMemo((()=>i.find((({lang:e,key:o})=>[e,o].some((e=>e.toLowerCase()===a.toLowerCase()||e.toLowerCase()===l.key.toLowerCase()))))),[i,a,l.key]),{activeTab:g,handleTabChange:f}=useTabsState({tabs:y,defaultTab:c});useEffect((()=>{g.key!==l.key&&y.some((({key:e})=>e===l.key))&&f(l)}),[l,g.key,f,y]);const S=useCallback((e=>{f(e),n({activeLanguage:e})}),[f,n]),C=useMemo((()=>i.map((e=>e.key===g.key?_jsx("div",{children:isPayloadSample(e)?_jsx(PayloadSamples,Object.assign({content:e.requestBodyContent,onCopyClick:u(e)},s)):_jsx(CodeSample,Object.assign({lang:e.lang,source:e.source,externalSample:e,content:null==d?void 0:d.requestBodyContent,operation:o,onCopyClick:u(e)},s))},e.key+o.id):null))),[g.key,u,o,null==d?void 0:d.requestBodyContent,s,i]);return i.length?_jsx(Panel,{className:"panel-request-samples",header:t?void 0:()=>_jsxs(StyledPanelHeader,{isExpandable:!1,children:[_jsx(StyledServerListDropdown,{operation:o}),_jsx(LanguageDropdown,{activeTab:g,samples:i,onChange:S})]}),footer:_jsx(Replay,{operation:o,corsProxyUrl:m}),isExpandable:!1,children:C}):null}export const RequestSamples=memo(RequestSamplesComponent);const StyledPanelHeader=styled(PanelHeader)`
2
+ flex-wrap: nowrap;
3
+ `,StyledServerListDropdown=styled(ServerListDropdown)`
4
+ padding-right: var(--spacing-base);
5
+ min-width: 0;
6
+ `;
2
7
  //# sourceMappingURL=RequestSamples.js.map
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import type { ReactElement } from 'react';
3
2
  import type { OperationModel } from '../../models';
4
3
  import type { TabType } from '../../models/tab';
@@ -8,5 +7,5 @@ export interface ResponseSamplesProps {
8
7
  onTabChange: (tab: TabType) => void;
9
8
  }
10
9
  declare function ResponseSamplesComponent({ operation, activeResponseTab, onTabChange, }: ResponseSamplesProps): ReactElement | null;
11
- export declare const ResponseSamples: React.MemoExoticComponent<typeof ResponseSamplesComponent>;
10
+ export declare const ResponseSamples: import("react").MemoExoticComponent<typeof ResponseSamplesComponent>;
12
11
  export {};
@@ -1,2 +1,2 @@
1
- import React,{memo,useCallback}from"react";import{useAtomValue}from"jotai";import{Panel}from"@redocly/theme";import{PayloadSamples}from"../PayloadSamples";import{createCodeSampleCopyEvent}from"../../events";import{globalOptionsAtom}from"../../jotai/store";import{Summary}from"./Summary";import{Tabs}from"../Tabs";function ResponseSamplesComponent({operation:e,activeResponseTab:o,onTabChange:a}){const{events:t}=useAtomValue(globalOptionsAtom),l=e.responses.filter((e=>{var o,a;return null!==(a=null===(o=e.content)||void 0===o?void 0:o.hasSample)&&void 0!==a&&a})),n=l.map((({code:e})=>({key:e,title:e}))),m=(null==n?void 0:n.find((({key:e})=>e===(null==o?void 0:o.key))))||(null==n?void 0:n[0]),r=useCallback((()=>{var o;const a=createCodeSampleCopyEvent({operation:e,type:"response"});null===(o=null==t?void 0:t.codeSamplesCopy)||void 0===o||o.call(t,a)}),[e,t]);if(!l.length)return null;return React.createElement(Panel,{className:"panel-response-samples",header:()=>React.createElement(Summary,{tabs:React.createElement(Tabs,{tabs:n,activeTab:m||(null==n?void 0:n[0]),onChange:a})}),isExpandable:!1},l.map((e=>e.code===m.key?React.createElement("div",{key:e.code},React.createElement(PayloadSamples,{content:e.content,onCopyClick:r})):null)))}export const ResponseSamples=memo(ResponseSamplesComponent);
1
+ import{jsx as _jsx}from"react/jsx-runtime";import{memo,useCallback}from"react";import{useAtomValue}from"jotai";import{Panel}from"@redocly/theme";import{PayloadSamples}from"../PayloadSamples";import{createCodeSampleCopyEvent}from"../../events";import{globalOptionsAtom}from"../../jotai/store";import{Summary}from"./Summary";import{Tabs}from"../Tabs";function ResponseSamplesComponent({operation:e,activeResponseTab:o,onTabChange:a}){const{events:l}=useAtomValue(globalOptionsAtom),n=e.responses.filter((e=>{var o,a;return null!==(a=null===(o=e.content)||void 0===o?void 0:o.hasSample)&&void 0!==a&&a})),t=n.map((({code:e})=>({key:e,title:e}))),s=(null==t?void 0:t.find((({key:e})=>e===(null==o?void 0:o.key))))||(null==t?void 0:t[0]),m=useCallback((()=>{var o;const a=createCodeSampleCopyEvent({operation:e,type:"response"});null===(o=null==l?void 0:l.codeSamplesCopy)||void 0===o||o.call(l,a)}),[e,l]);if(!n.length)return null;return _jsx(Panel,{className:"panel-response-samples",header:()=>_jsx(Summary,{tabs:_jsx(Tabs,{tabs:t,activeTab:s||(null==t?void 0:t[0]),onChange:a})}),isExpandable:!1,children:n.map((e=>e.code===s.key?_jsx("div",{children:_jsx(PayloadSamples,{content:e.content,onCopyClick:m})},e.code):null))})}export const ResponseSamples=memo(ResponseSamplesComponent);
2
2
  //# sourceMappingURL=ResponseSamples.js.map
@@ -1,2 +1,2 @@
1
- import React from"react";import{PanelHeader,PanelHeaderTitle}from"@redocly/theme";export const Summary=({tabs:e})=>React.createElement(PanelHeader,{isExpandable:!1},React.createElement(PanelHeaderTitle,{"data-cy":"title"},"Response"),e);
1
+ import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{PanelHeader,PanelHeaderTitle}from"@redocly/theme";export const Summary=({tabs:e})=>_jsxs(PanelHeader,{isExpandable:!1,children:[_jsx(PanelHeaderTitle,{"data-cy":"title",children:"Response"}),e]});
2
2
  //# sourceMappingURL=Summary.js.map
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import type { ReactNode } from 'react';
3
2
  import type { ResponseModel, OperationModel } from '../../models';
4
3
  import type { TabType } from '../../models/tab';
@@ -9,5 +8,5 @@ interface IOperationResponseList {
9
8
  activeResponseTab?: TabType;
10
9
  onTabChange?: (tab: TabType) => void;
11
10
  }
12
- export declare const OperationResponseList: React.NamedExoticComponent<IOperationResponseList>;
11
+ export declare const OperationResponseList: import("react").NamedExoticComponent<IOperationResponseList>;
13
12
  export {};
@@ -1,2 +1,2 @@
1
- import React,{memo}from"react";import{useLocation}from"react-router-dom";import{Tabs,useTabsState}from"../Tabs";import{ResponseDetails}from"./ResponseDetails";import{makeDeepLink}from"../../services";import{Row,StyledTitle}from"./styled";import{LinkToField}from"../common/LinkToField";import{pathIncludesLink}from"../../utils";export const OperationResponseList=memo((({responses:e,title:t,operation:a,activeResponseTab:o,onTabChange:n})=>{const s=useLocation(),i=e.map((({code:e})=>({key:e,title:e}))),r=i.find((({key:e})=>e===(null==o?void 0:o.key)||pathIncludesLink(s,a.id)&&pathIncludesLink(s,`c=${e}`))),{activeTab:l,handleTabChange:c}=useTabsState({tabs:i,defaultTab:r,onChange:n}),m=o||l;return React.createElement(React.Fragment,null,React.createElement(Row,null,t||React.createElement(StyledTitle,null,React.createElement(LinkToField,{to:makeDeepLink(a.id,`response&c=${m.key}`)}),"Responses"),React.createElement(Tabs,{tabs:i,activeTab:m,onChange:c})),e.map((e=>e.code===l.key?React.createElement("div",{key:e.code},React.createElement(ResponseDetails,{response:e,operationId:a.id})):null)))}));
1
+ import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";import{memo}from"react";import{useLocation}from"react-router-dom";import{Tabs,useTabsState}from"../Tabs";import{ResponseDetails}from"./ResponseDetails";import{makeDeepLink}from"../../services";import{Row,StyledTitle}from"./styled";import{LinkToField}from"../common/LinkToField";import{pathIncludesLink}from"../../utils";export const OperationResponseList=memo((({responses:e,title:s,operation:o,activeResponseTab:t,onTabChange:i})=>{const a=useLocation(),n=e.map((({code:e})=>({key:e,title:e}))),r=n.find((({key:e})=>e===(null==t?void 0:t.key)||pathIncludesLink(a,o.id)&&pathIncludesLink(a,`c=${e}`))),{activeTab:m,handleTabChange:p}=useTabsState({tabs:n,defaultTab:r,onChange:i}),l=t||m;return _jsxs(_Fragment,{children:[_jsxs(Row,{children:[s||_jsxs(StyledTitle,{children:[_jsx(LinkToField,{to:makeDeepLink(o.id,`response&c=${l.key}`)}),"Responses"]}),_jsx(Tabs,{tabs:n,activeTab:l,onChange:p})]}),e.map((e=>e.code===m.key?_jsx("div",{children:_jsx(ResponseDetails,{response:e,operationId:o.id})},e.code):null))]})}));
2
2
  //# sourceMappingURL=OperationResponseList.js.map
@@ -1,3 +1,3 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import type { ResponseProps } from './types';
3
- export declare const ResponseDetails: React.NamedExoticComponent<ResponseProps>;
3
+ export declare const ResponseDetails: import("react").NamedExoticComponent<ResponseProps>;
@@ -1,2 +1,2 @@
1
- import React,{memo}from"react";import{ResponseHeaders}from"./ResponseHeaders";import{StyledDescription}from"./styled";import{BodyContent}from"../common/BodyContent";import{makeDeepLink}from"../../services";function ResponseDetailsComponent({response:e,operationId:t}){const{description:o,headers:n,content:s,summary:r}=e;return React.createElement(React.Fragment,null,React.createElement(StyledDescription,{className:"redoc-markdown",source:r}),React.createElement(StyledDescription,{className:"redoc-markdown",source:o}),React.createElement(ResponseHeaders,{headers:n,deepLink:makeDeepLink(t,"response/headers")}),React.createElement(BodyContent,{content:s,skipWriteOnly:!0,deepLink:makeDeepLink(t,"response/body")}))}export const ResponseDetails=memo(ResponseDetailsComponent);
1
+ import{jsx as _jsx,Fragment as _Fragment,jsxs as _jsxs}from"react/jsx-runtime";import{memo}from"react";import{ResponseHeaders}from"./ResponseHeaders";import{StyledDescription}from"./styled";import{BodyContent}from"../common/BodyContent";import{makeDeepLink}from"../../services";function ResponseDetailsComponent({response:e,operationId:s}){const{description:o,headers:n,content:r,summary:t}=e;return _jsxs(_Fragment,{children:[_jsx(StyledDescription,{className:"redoc-markdown",source:t}),_jsx(StyledDescription,{className:"redoc-markdown",source:o}),_jsx(ResponseHeaders,{headers:n,deepLink:makeDeepLink(s,"response/headers")}),_jsx(BodyContent,{content:r,skipWriteOnly:!0,deepLink:makeDeepLink(s,"response/body")})]})}export const ResponseDetails=memo(ResponseDetailsComponent);
2
2
  //# sourceMappingURL=ResponseDetails.js.map
@@ -1,3 +1,3 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import type { ResponseHeadersProps } from './types';
3
- export declare const ResponseHeaders: React.NamedExoticComponent<ResponseHeadersProps>;
3
+ export declare const ResponseHeaders: import("react").NamedExoticComponent<ResponseHeadersProps>;
@@ -1,2 +1,2 @@
1
- import React,{memo}from"react";import{HeadersCaption,StyledHeadersProperties}from"./styled";import{PropertyDetails}from"../PropertyDetails";import{LinkToField}from"../common/LinkToField";function ResponseHeadersComponent({headers:e,deepLink:t}){return void 0===e||0===e.length?null:React.createElement(StyledHeadersProperties,null,React.createElement(HeadersCaption,null,React.createElement(LinkToField,{to:t}),"Headers"),e.map(((e,t)=>React.createElement(PropertyDetails,{key:e.name,isFirst:0===t,field:e,showExamples:!0}))))}export const ResponseHeaders=memo(ResponseHeadersComponent);
1
+ import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{memo}from"react";import{HeadersCaption,StyledHeadersProperties}from"./styled";import{PropertyDetails}from"../PropertyDetails";import{LinkToField}from"../common/LinkToField";function ResponseHeadersComponent({headers:e,deepLink:s}){return void 0===e||0===e.length?null:_jsxs(StyledHeadersProperties,{children:[_jsxs(HeadersCaption,{children:[_jsx(LinkToField,{to:s}),"Headers"]}),e.map(((e,s)=>_jsx(PropertyDetails,{isFirst:0===s,field:e,showExamples:!0},e.name)))]})}export const ResponseHeaders=memo(ResponseHeadersComponent);
2
2
  //# sourceMappingURL=ResponseHeaders.js.map
@@ -1,2 +1,2 @@
1
- import React from"react";import{Markdown as MarkdownWrapper,Panel}from"@redocly/theme";import{useAtomValue}from"jotai";import{DownloadSpecification}from"../Download";import{Overview}from"../Overview";import{LanguageList}from"../Language";import{ServerList}from"../ServerList";import{globalStoreAtom}from"../../jotai/store";import{normalizeServers}from"../../utils";import{mergeInMockServer}from"../../models/operation";import{languageAtom}from"../../jotai/app";export const RightPanel=({item:{infoDefinition:e}})=>{const{options:{hideDownloadButton:a,expandDefaultServerVariables:r,mockServer:t},parser:{definition:o,definitionUrl:n}}=useAtomValue(globalStoreAtom),{languages:l,activeLanguage:i}=useAtomValue(languageAtom),m=normalizeServers(n,mergeInMockServer(o.servers||[],t));return React.createElement(React.Fragment,null,!a&&React.createElement(Panel,{className:"panel-download",header:"Download OpenAPI description",isExpandable:!1},React.createElement(DownloadSpecification,null)),((null==e?void 0:e.license)||(null==e?void 0:e.contact)||(null==e?void 0:e.termsOfService))&&React.createElement(Panel,{className:"panel-overview",header:"Overview",isExpandable:!1},React.createElement(MarkdownWrapper,null,React.createElement(Overview,{info:e}))),!!(null==l?void 0:l.length)&&React.createElement(Panel,{className:"panel-language-list",header:"Languages",isExpandable:!1},React.createElement(LanguageList,{languages:l,activeLanguage:i})),!!m.length&&React.createElement(Panel,{className:"panel-servers-list",header:"Servers",isExpandable:!1},React.createElement(ServerList,{servers:m,path:"/",expandVariables:Boolean(r),hideHostname:!1})))};
1
+ import{jsx as _jsx,Fragment as _Fragment,jsxs as _jsxs}from"react/jsx-runtime";import{Markdown as MarkdownWrapper,Panel}from"@redocly/theme";import{useAtomValue}from"jotai";import{DownloadSpecification}from"../Download";import{Overview}from"../Overview";import{LanguageList}from"../Language";import{ServerList}from"../ServerList";import{globalStoreAtom}from"../../jotai/store";import{normalizeServers}from"../../utils";import{mergeInMockServer}from"../../models/operation";import{languageAtom}from"../../jotai/app";export const RightPanel=({item:{infoDefinition:e}})=>{const{options:{hideDownloadButton:a,expandDefaultServerVariables:r,mockServer:o},parser:{definition:n,definitionUrl:i}}=useAtomValue(globalStoreAtom),{languages:s,activeLanguage:l}=useAtomValue(languageAtom),t=normalizeServers(i,mergeInMockServer(n.servers||[],o));return _jsxs(_Fragment,{children:[!a&&_jsx(Panel,{className:"panel-download",header:"Download OpenAPI description",isExpandable:!1,children:_jsx(DownloadSpecification,{})}),((null==e?void 0:e.license)||(null==e?void 0:e.contact)||(null==e?void 0:e.termsOfService))&&_jsx(Panel,{className:"panel-overview",header:"Overview",isExpandable:!1,children:_jsx(MarkdownWrapper,{children:_jsx(Overview,{info:e})})}),!!(null==s?void 0:s.length)&&_jsx(Panel,{className:"panel-language-list",header:"Languages",isExpandable:!1,children:_jsx(LanguageList,{languages:s,activeLanguage:l})}),!!t.length&&_jsx(Panel,{className:"panel-servers-list",header:"Servers",isExpandable:!1,children:_jsx(ServerList,{servers:t,path:"/",expandVariables:Boolean(r),hideHostname:!1})})]})};
2
2
  //# sourceMappingURL=RightPanel.js.map
@@ -1,2 +1,2 @@
1
- import React,{useState,useEffect}from"react";import{WarnMessage,MimeLabel}from"../shared";import{FormControl,Dropdown}from"../common";import{DropdownOrLabel}from"../DropdownOrLabel/DropdownOrLabel";export const ExampleSwitch=({exampleKey:e,examples:a,onChange:o})=>{var t,r;const n=Object.keys(a),l=e?n.indexOf(e):0,[m,d]=useState(l>-1?l:0);useEffect((()=>d(l>-1?l:0)),[e,l]);const c=n.map(((e,o)=>({value:a[e].summary||e,idx:o})));return React.createElement(React.Fragment,null,"default"!==(null===(t=c[m])||void 0===t?void 0:t.value)&&React.createElement(FormControl,{"data-cy":"example-switch"},React.createElement(DropdownOrLabel,{Dropdown:Dropdown,Label:MimeLabel,variant:"dark",fullWidth:!0,options:c,value:null===(r=c[m])||void 0===r?void 0:r.value,onChange:({idx:e})=>{d(e),o(n[e])}})),e&&-1===l&&React.createElement(WarnMessage,null,"Provided sample not found"))};
1
+ import{jsx as _jsx,Fragment as _Fragment,jsxs as _jsxs}from"react/jsx-runtime";import{useState,useEffect}from"react";import{WarnMessage,MimeLabel}from"../shared";import{FormControl,Dropdown}from"../common";import{DropdownOrLabel}from"../DropdownOrLabel/DropdownOrLabel";export const ExampleSwitch=({exampleKey:e,examples:o,onChange:r})=>{var a,n;const s=Object.keys(o),t=e?s.indexOf(e):0,[l,m]=useState(t>-1?t:0);useEffect((()=>m(t>-1?t:0)),[e,t]);const d=s.map(((e,r)=>({value:o[e].summary||e,idx:r})));return _jsxs(_Fragment,{children:["default"!==(null===(a=d[l])||void 0===a?void 0:a.value)&&_jsx(FormControl,{"data-cy":"example-switch",children:_jsx(DropdownOrLabel,{Dropdown:Dropdown,Label:MimeLabel,variant:"dark",fullWidth:!0,options:d,value:null===(n=d[l])||void 0===n?void 0:n.value,onChange:({idx:e})=>{m(e),r(s[e])}})}),e&&-1===t&&_jsx(WarnMessage,{children:"Provided sample not found"})]})};
2
2
  //# sourceMappingURL=ExampleSwitch.js.map
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import type { SchemaProps } from './types';
3
3
  export declare const ArrayClosingLabel: import("styled-components").StyledComponent<"span", any, {}, never>;
4
- export declare const ArraySchema: React.NamedExoticComponent<SchemaProps>;
4
+ export declare const ArraySchema: import("react").NamedExoticComponent<SchemaProps>;
@@ -1,4 +1,4 @@
1
- var __rest=this&&this.__rest||function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var l=0;for(a=Object.getOwnPropertySymbols(e);l<a.length;l++)t.indexOf(a[l])<0&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(r[a[l]]=e[a[l]])}return r};import React,{memo}from"react";import styled from"styled-components";import{TypeName}from"../common";import{Schema}from"./Schema";import{ObjectSchema}from"./ObjectSchema";import{humanizeConstraints}from"../../utils";import{ViewNested}from"../ViewNested";function ArraySchemaComponent(e){var t,r,a,l,{schema:o,schema:{minItems:n,maxItems:i,items:c},fieldParentsName:s}=e,m=__rest(e,["schema","schema","fieldParentsName"]);const d=void 0===n&&void 0===i?"":`(${humanizeConstraints(o)})`;let p=s?[...s.slice(0,-1),s[s.length-1]+"[]"]:s;if(null==o?void 0:o.fields)return React.createElement(ObjectSchema,Object.assign({},m,{level:(null==m?void 0:m.level)||1,schema:o,fieldParentsName:p}));if(o.displayType&&!c&&!d.length)return React.createElement("div",null,React.createElement(TypeName,null,o.displayType));const b=(null===(t=null==c?void 0:c.fields)||void 0===t?void 0:t.length)||(null===(l=null===(a=null===(r=null==c?void 0:c.oneOf)||void 0===r?void 0:r[0])||void 0===a?void 0:a.fields)||void 0===l?void 0:l.length),y=1===m.level;return React.createElement(ViewNested,Object.assign({},m,{propertyLength:b,isArray:!0,expandable:!y}),React.createElement(React.Fragment,null,y&&React.createElement(ArrayLabel,null,React.createElement(LabelValue,null,"Array [")),React.createElement(Schema,Object.assign({},m,{schema:c,fieldParentsName:p,expandable:!1})),y&&React.createElement(ArrayClosingLabel,{className:"array-closing-label"},React.createElement(LabelValue,null,"]"))))}const ArrayLabel=styled.span`
1
+ var __rest=this&&this.__rest||function(e,r){var a={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&r.indexOf(o)<0&&(a[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var t=0;for(o=Object.getOwnPropertySymbols(e);t<o.length;t++)r.indexOf(o[t])<0&&Object.prototype.propertyIsEnumerable.call(e,o[t])&&(a[o[t]]=e[o[t]])}return a};import{jsx as _jsx,Fragment as _Fragment,jsxs as _jsxs}from"react/jsx-runtime";import{memo}from"react";import styled from"styled-components";import{TypeName}from"../common";import{Schema}from"./Schema";import{ObjectSchema}from"./ObjectSchema";import{humanizeConstraints}from"../../utils";import{ViewNested}from"../ViewNested";function ArraySchemaComponent(e){var r,a,o,t,{schema:n,schema:{minItems:s,maxItems:l,items:i},fieldParentsName:m}=e,c=__rest(e,["schema","schema","fieldParentsName"]);const d=void 0===s&&void 0===l?"":`(${humanizeConstraints(n)})`;let p=m?[...m.slice(0,-1),m[m.length-1]+"[]"]:m;if(null==n?void 0:n.fields)return _jsx(ObjectSchema,Object.assign({},c,{level:(null==c?void 0:c.level)||1,schema:n,fieldParentsName:p}));if(n.displayType&&!i&&!d.length)return _jsx("div",{children:_jsx(TypeName,{children:n.displayType})});const h=(null===(r=null==i?void 0:i.fields)||void 0===r?void 0:r.length)||(null===(t=null===(o=null===(a=null==i?void 0:i.oneOf)||void 0===a?void 0:a[0])||void 0===o?void 0:o.fields)||void 0===t?void 0:t.length),b=1===c.level;return _jsx(ViewNested,Object.assign({},c,{propertyLength:h,isArray:!0,expandable:!b,children:_jsxs(_Fragment,{children:[b&&_jsx(ArrayLabel,{children:_jsx(LabelValue,{children:"Array ["})}),_jsx(Schema,Object.assign({},c,{schema:i,fieldParentsName:p,expandable:!1})),b&&_jsx(ArrayClosingLabel,{className:"array-closing-label",children:_jsx(LabelValue,{children:"]"})})]})}))}const ArrayLabel=styled.span`
2
2
  display: flex;
3
3
  align-items: center;
4
4
  gap: var(--spacing-xs);
@@ -1,3 +1,3 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import type { ObjectSchemaProps } from './types';
3
- export declare const ObjectSchema: React.NamedExoticComponent<ObjectSchemaProps>;
3
+ export declare const ObjectSchema: import("react").NamedExoticComponent<ObjectSchemaProps>;
@@ -1,2 +1,2 @@
1
- import React,{memo}from"react";import{useAtomValue}from"jotai";import{PropertiesTableCaption}from"../common";import{Discriminator}from"../Discriminator";import{globalOptionsAtom}from"../../jotai/store";import{PropertyDetails}from"../PropertyDetails";import{ViewNested}from"../ViewNested";function ObjectSchemaComponent({schema:{fields:e=[],title:t},showTitle:a,discriminator:i,level:r,skipWriteOnly:n,skipReadOnly:o,fieldParentsName:l,expandable:m,deepLink:s}){const{expandSingleSchemaField:p,showObjectSchemaExamples:c,schemaExpansionLevel:d}=useAtomValue(globalOptionsAtom),h=o||n?e.filter((e=>!(o&&e.schema.readOnly||n&&e.schema.writeOnly))):e,f=p&&1===h.length||d>=Number(r);return React.createElement(ViewNested,{expandable:m,expandByDefault:f,level:r,propertyLength:h.length,deepLink:s},React.createElement(React.Fragment,null,a&&React.createElement(PropertiesTableCaption,null,t),h.map(((e,t)=>React.createElement(PropertyDetails,{key:e.name,isFirst:0===t,field:e,expandByDefault:f,fieldParentsName:Number(r)>1?l:[],renderDiscriminatorSwitch:(null==i?void 0:i.fieldName)===e.name&&(null==i?void 0:i.parentSchema)?()=>React.createElement(Discriminator,{parent:i.parentSchema,onChange:null==i?void 0:i.onChange}):void 0,showExamples:c,skipReadOnly:o,skipWriteOnly:n,showTitle:a,level:r})))))}export const ObjectSchema=memo(ObjectSchemaComponent);
1
+ import{jsx as _jsx,Fragment as _Fragment,jsxs as _jsxs}from"react/jsx-runtime";import{memo}from"react";import{useAtomValue}from"jotai";import{PropertiesTableCaption}from"../common";import{Discriminator}from"../Discriminator";import{globalOptionsAtom}from"../../jotai/store";import{PropertyDetails}from"../PropertyDetails";import{ViewNested}from"../ViewNested";function ObjectSchemaComponent({schema:{fields:e=[],title:t},showTitle:i,discriminator:r,level:a,skipWriteOnly:o,skipReadOnly:n,fieldParentsName:m,expandable:s,deepLink:l}){const{expandSingleSchemaField:p,showObjectSchemaExamples:c,schemaExpansionLevel:d}=useAtomValue(globalOptionsAtom),h=n||o?e.filter((e=>!(n&&e.schema.readOnly||o&&e.schema.writeOnly))):e,x=p&&1===h.length||d>=Number(a);return _jsx(ViewNested,{expandable:s,expandByDefault:x,level:a,propertyLength:h.length,deepLink:l,children:_jsxs(_Fragment,{children:[i&&_jsx(PropertiesTableCaption,{children:t}),h.map(((e,t)=>_jsx(PropertyDetails,{isFirst:0===t,field:e,expandByDefault:x,fieldParentsName:Number(a)>1?m:[],renderDiscriminatorSwitch:(null==r?void 0:r.fieldName)===e.name&&(null==r?void 0:r.parentSchema)?()=>_jsx(Discriminator,{parent:r.parentSchema,onChange:null==r?void 0:r.onChange}):void 0,showExamples:c,skipReadOnly:n,skipWriteOnly:o,showTitle:i,level:a},e.name)))]})})}export const ObjectSchema=memo(ObjectSchemaComponent);
2
2
  //# sourceMappingURL=ObjectSchema.js.map
@@ -1,3 +1,3 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import type { SchemaProps } from './types';
3
- export declare const OneOfSchema: React.NamedExoticComponent<SchemaProps>;
3
+ export declare const OneOfSchema: import("react").NamedExoticComponent<SchemaProps>;
@@ -1,4 +1,4 @@
1
- var __rest=this&&this.__rest||function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(o[n[r]]=e[n[r]])}return o};import React,{memo}from"react";import{useAtomValue,useAtom}from"jotai";import styled from"styled-components";import{BadgeStyle,SelectionTitle}from"../common";import{Markdown}from"../Markdown";import{ConstraintsView}from"../common/ConstraintsView";import{Schema}from"./Schema";import{globalOptionsAtom}from"../../jotai/store";import{operationStore}from"../../jotai/operation";import{SchemaSelection}from"../common/SchemaSelection";function OneOfSchemaComponent(e){var{schema:{oneOf:t},schema:o}=e,n=__rest(e,["schema","schema"]);const{hideOneOfDescription:r}=useAtomValue(globalOptionsAtom),[a]=useAtom(operationStore(o.deps.operation.pointer)),i=t[a.activeOneOf[o.pointer]||0];if(!i)return null;const c=t.map(((e,t)=>({label:e.title||e.typePrefix+e.displayType,value:t})));return React.createElement(React.Fragment,null,React.createElement(SelectionTitle,null,o.oneOfType,":"),React.createElement(SchemaSelection,{options:c,pointer:o.deps.operation.pointer,schema:o}),i.deprecated&&React.createElement(BadgeStyle,{deprecated:!0},"Deprecated"),!r&&i.description&&React.createElement(StyledDescription,{source:i.description}),React.createElement(ConstraintsView,{constraints:i.constraints}),React.createElement(Schema,Object.assign({},n,{schema:i})))}export const OneOfSchema=memo(OneOfSchemaComponent);const StyledDescription=styled(Markdown)`
1
+ var __rest=this&&this.__rest||function(e,t){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(o[r[n]]=e[r[n]])}return o};import{jsxs as _jsxs,jsx as _jsx,Fragment as _Fragment}from"react/jsx-runtime";import{memo}from"react";import{useAtomValue,useAtom}from"jotai";import styled from"styled-components";import{BadgeStyle,SelectionTitle}from"../common";import{Markdown}from"../Markdown";import{ConstraintsView}from"../common/ConstraintsView";import{Schema}from"./Schema";import{globalOptionsAtom}from"../../jotai/store";import{operationStore}from"../../jotai/operation";import{SchemaSelection}from"../common/SchemaSelection";function OneOfSchemaComponent(e){var{schema:{oneOf:t},schema:o}=e,r=__rest(e,["schema","schema"]);const{hideOneOfDescription:n}=useAtomValue(globalOptionsAtom),[i]=useAtom(operationStore(o.deps.operation.pointer)),s=t[i.activeOneOf[o.pointer]||0];if(!s)return null;const a=t.map(((e,t)=>({label:e.title||e.typePrefix+e.displayType,value:t})));return _jsxs(_Fragment,{children:[_jsxs(SelectionTitle,{children:[o.oneOfType,":"]}),_jsx(SchemaSelection,{options:a,pointer:o.deps.operation.pointer,schema:o}),s.deprecated&&_jsx(BadgeStyle,{deprecated:!0,children:"Deprecated"}),!n&&s.description&&_jsx(StyledDescription,{source:s.description}),_jsx(ConstraintsView,{constraints:s.constraints}),_jsx(Schema,Object.assign({},r,{schema:s}))]})}export const OneOfSchema=memo(OneOfSchemaComponent);const StyledDescription=styled(Markdown)`
2
2
  margin-top: var(--spacing-xs);
3
3
  font-size: var(--font-size-base);
4
4
  line-height: var(--line-height-base);
@@ -1,3 +1,3 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import type { SchemaProps } from './types';
3
- export declare const RecursiveSchema: React.NamedExoticComponent<SchemaProps>;
3
+ export declare const RecursiveSchema: import("react").NamedExoticComponent<SchemaProps>;
@@ -1,2 +1,2 @@
1
- import React,{memo}from"react";import{RecursiveLabel,TypeName,TypeTitle}from"../common";function RecursiveSchemaComponent({schema:e}){return React.createElement("div",null,React.createElement(TypeName,null,e.displayType),e.title&&React.createElement(TypeTitle,null," ",e.title," "),React.createElement(RecursiveLabel,null," Recursive "))}export const RecursiveSchema=memo(RecursiveSchemaComponent);
1
+ import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{memo}from"react";import{RecursiveLabel,TypeName,TypeTitle}from"../common";function RecursiveSchemaComponent({schema:e}){return _jsxs("div",{children:[_jsx(TypeName,{children:e.displayType}),e.title&&_jsxs(TypeTitle,{children:[" ",e.title," "]}),_jsx(RecursiveLabel,{children:" Recursive "})]})}export const RecursiveSchema=memo(RecursiveSchemaComponent);
2
2
  //# sourceMappingURL=RecursiveSchema.js.map
@@ -1,3 +1,3 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import type { SchemaProps } from './types';
3
- export declare const Schema: React.NamedExoticComponent<Partial<SchemaProps>>;
3
+ export declare const Schema: import("react").NamedExoticComponent<Partial<SchemaProps>>;