@redocly/openapi-docs 3.4.0-rc.5 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (401) hide show
  1. package/dist/redocly-openapi-docs.min.js +1565 -1367
  2. package/lib/components/ApiInfo/ApiInfo.js +1 -1
  3. package/lib/components/ApiInfo/Metadata.d.ts +3 -1
  4. package/lib/components/ApiInfo/Metadata.js +1 -1
  5. package/lib/components/CallbackSamples/CallbackSamples.d.ts +2 -1
  6. package/lib/components/CallbackSamples/CallbackSamples.js +1 -1
  7. package/lib/components/Callbacks/CallbackDetails.d.ts +2 -1
  8. package/lib/components/Callbacks/CallbackDetails.js +1 -1
  9. package/lib/components/Callbacks/CallbackOperation.js +1 -1
  10. package/lib/components/Callbacks/CallbackSummary.d.ts +3 -2
  11. package/lib/components/Callbacks/CallbackSummary.js +1 -1
  12. package/lib/components/Callbacks/CallbacksList.d.ts +0 -1
  13. package/lib/components/Callbacks/styled.d.ts +1 -1
  14. package/lib/components/Content/Content.d.ts +0 -1
  15. package/lib/components/Content/useAutoScroll.js +1 -1
  16. package/lib/components/ContentItem/ContentItem.d.ts +0 -1
  17. package/lib/components/ContentItem/useIsExpanded.js +1 -1
  18. package/lib/components/ContentItems/ContentItems.d.ts +0 -1
  19. package/lib/components/ContentItems/helpers.js +1 -1
  20. package/lib/components/Discriminator/Discriminator.d.ts +2 -1
  21. package/lib/components/Discriminator/Discriminator.js +1 -1
  22. package/lib/components/ExpandAllButton/ExpandAllButton.js +1 -1
  23. package/lib/components/ExpandAllButton/getAllNestedSchema.d.ts +4 -4
  24. package/lib/components/ExpandAllButton/useUpdateExpandedFields.js +1 -1
  25. package/lib/components/ExternalDocumentation/ExternalDocumentation.d.ts +0 -1
  26. package/lib/components/Language/LanguageList.d.ts +0 -1
  27. package/lib/components/Language/styled.d.ts +12 -13
  28. package/lib/components/MediaTypeSwitch/MediaTypesSwitch.js +1 -1
  29. package/lib/components/OperationItem/Description.js +1 -1
  30. package/lib/components/OperationItem/OperationItem.d.ts +0 -1
  31. package/lib/components/OperationItem/OperationItem.js +2 -2
  32. package/lib/components/Overview/Overview.d.ts +8 -3
  33. package/lib/components/Overview/Overview.js +1 -1
  34. package/lib/components/PageFooter/PageFooter.d.ts +0 -1
  35. package/lib/components/PageFooter/PageFooter.js +1 -1
  36. package/lib/components/PanelItem/styled.d.ts +5 -6
  37. package/lib/components/PayloadSamples/Example.js +1 -1
  38. package/lib/components/PayloadSamples/ExampleValue.d.ts +0 -1
  39. package/lib/components/PayloadSamples/ExampleValue.js +1 -1
  40. package/lib/components/PayloadSamples/ExternalExample.js +1 -1
  41. package/lib/components/PayloadSamples/MediaTypeSamples.d.ts +0 -1
  42. package/lib/components/PayloadSamples/MediaTypeSamples.js +1 -1
  43. package/lib/components/PayloadSamples/PayloadSamples.d.ts +0 -1
  44. package/lib/components/PayloadSamples/PayloadSamples.js +1 -1
  45. package/lib/components/PayloadSamples/useExternalExample.js +1 -1
  46. package/lib/components/PropertyDetails/DescriptionEnums.d.ts +1 -1
  47. package/lib/components/PropertyDetails/DescriptionEnums.js +2 -2
  48. package/lib/components/PropertyDetails/EnumValues.d.ts +0 -1
  49. package/lib/components/PropertyDetails/EnumValues.js +1 -1
  50. package/lib/components/PropertyDetails/Examples.js +1 -1
  51. package/lib/components/PropertyDetails/Extensions.d.ts +0 -1
  52. package/lib/components/PropertyDetails/FieldDetail.d.ts +1 -1
  53. package/lib/components/PropertyDetails/FieldDetail.js +1 -1
  54. package/lib/components/PropertyDetails/FieldDetails.d.ts +0 -1
  55. package/lib/components/PropertyDetails/FieldDetails.js +4 -3
  56. package/lib/components/PropertyDetails/Pattern.js +1 -1
  57. package/lib/components/PropertyDetails/PlusCircleIcon.js +1 -1
  58. package/lib/components/PropertyDetails/PropertyDetails.d.ts +0 -1
  59. package/lib/components/PropertyDetails/SchemaTypeInfo.js +1 -1
  60. package/lib/components/PropertyDetails/SimpleEnums.d.ts +1 -1
  61. package/lib/components/PropertyDetails/SimpleEnums.js +1 -1
  62. package/lib/components/PropertyDetails/styled.d.ts +1 -10
  63. package/lib/components/PropertyDetails/types.d.ts +3 -0
  64. package/lib/components/RedoclyOpenAPIDocs/Providers.js +1 -1
  65. package/lib/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocs.js +1 -1
  66. package/lib/components/RedoclyOpenAPIDocs/styled.d.ts +0 -4
  67. package/lib/components/RedoclyOpenAPIDocs/styled.js +1 -30
  68. package/lib/components/RedoclyOpenAPIDocs/types.d.ts +0 -3
  69. package/lib/components/RedoclyOpenAPIDocs/utils.js +1 -1
  70. package/lib/components/RenderHook/RenderHook.js +1 -1
  71. package/lib/components/Replay/EmbeddedReplay.d.ts +0 -1
  72. package/lib/components/Replay/EmbeddedReplay.js +1 -1
  73. package/lib/components/Replay/Replay.d.ts +0 -1
  74. package/lib/components/Replay/Replay.js +2 -9
  75. package/lib/components/Replay/utils.js +1 -1
  76. package/lib/components/Request/RequestDetails.d.ts +0 -1
  77. package/lib/components/Request/RequestDetails.js +1 -1
  78. package/lib/components/Request/types.d.ts +2 -0
  79. package/lib/components/RequestParameters/Body.d.ts +0 -1
  80. package/lib/components/RequestParameters/ParametersGroup.d.ts +0 -1
  81. package/lib/components/RequestParameters/RequestParameters.js +1 -1
  82. package/lib/components/RequestSamples/CodeSample.d.ts +0 -1
  83. package/lib/components/RequestSamples/RequestSamples.d.ts +0 -1
  84. package/lib/components/RequestSamples/useCodeSamples.js +1 -1
  85. package/lib/components/ResponseSamples/Summary.js +1 -1
  86. package/lib/components/Responses/OperationResponseList.js +1 -1
  87. package/lib/components/Responses/ResponseDetails.d.ts +0 -1
  88. package/lib/components/Responses/ResponseHeaders.d.ts +0 -1
  89. package/lib/components/Responses/ResponseHeaders.js +1 -1
  90. package/lib/components/Responses/styled.d.ts +1 -2
  91. package/lib/components/RightPanel/RightPanel.js +1 -1
  92. package/lib/components/Samples/use-example-key.js +1 -1
  93. package/lib/components/Schema/ArraySchema.d.ts +0 -1
  94. package/lib/components/Schema/ObjectSchema.d.ts +0 -1
  95. package/lib/components/Schema/ObjectSchema.js +1 -1
  96. package/lib/components/Schema/OneOfSchema.d.ts +0 -1
  97. package/lib/components/Schema/OneOfSchema.js +1 -1
  98. package/lib/components/Schema/RecursiveSchema.d.ts +0 -1
  99. package/lib/components/Schema/RecursiveSchema.js +1 -1
  100. package/lib/components/Schema/Schema.d.ts +0 -1
  101. package/lib/components/Schema/SubSchema.js +1 -1
  102. package/lib/components/Schema/helpers.d.ts +1 -1
  103. package/lib/components/Schema/helpers.js +1 -1
  104. package/lib/components/Schema/useOneOfLocationIdx.js +1 -1
  105. package/lib/components/SchemaDefinition/SchemaDefinition.d.ts +0 -1
  106. package/lib/components/SectionContent/SectionContent.js +1 -1
  107. package/lib/components/SectionItem/SectionItem.d.ts +0 -1
  108. package/lib/components/Security/Divider.js +1 -1
  109. package/lib/components/Security/OAuthFlow.js +1 -1
  110. package/lib/components/Security/Security.js +1 -1
  111. package/lib/components/Security/SecurityButton.js +1 -1
  112. package/lib/components/Security/SecurityFlow.js +1 -1
  113. package/lib/components/Security/SecurityModal.js +1 -1
  114. package/lib/components/Security/SecuritySchemeItem.js +1 -1
  115. package/lib/components/Security/helper.js +1 -1
  116. package/lib/components/SelectOrLabel/SelectOrLabel.js +2 -2
  117. package/lib/components/ServerList/ServerList.d.ts +1 -1
  118. package/lib/components/ServerList/ServerList.js +1 -1
  119. package/lib/components/ServerList/types.d.ts +4 -1
  120. package/lib/components/ServerListDropdown/ServerListDropdown.js +1 -1
  121. package/lib/components/ServerListDropdown/styled.d.ts +0 -1
  122. package/lib/components/SideMenu/SideMenu.d.ts +0 -1
  123. package/lib/components/SideMenu/hooks/useMenuItems.js +1 -1
  124. package/lib/components/Tabs/Tabs.js +1 -1
  125. package/lib/components/Tabs/useTabsState.js +1 -1
  126. package/lib/components/TagItem/OperationNavigationItems.d.ts +9 -0
  127. package/lib/components/TagItem/OperationNavigationItems.js +37 -0
  128. package/lib/components/TagItem/OperationsNavigation.d.ts +1 -7
  129. package/lib/components/TagItem/OperationsNavigation.js +1 -40
  130. package/lib/components/TagItem/TagItem.js +1 -1
  131. package/lib/components/TagItem/styled.d.ts +1 -0
  132. package/lib/components/TagItem/styled.js +6 -0
  133. package/lib/components/TagItem/types.d.ts +5 -0
  134. package/lib/components/TagItem/types.js +2 -0
  135. package/lib/components/common/Badges.d.ts +2 -2
  136. package/lib/components/common/BodyContent/BodyContent.d.ts +0 -1
  137. package/lib/components/common/BodyContent/BodyContent.js +1 -1
  138. package/lib/components/common/ClearButton/ClearButton.d.ts +0 -1
  139. package/lib/components/common/ClearButton/styled.d.ts +0 -1
  140. package/lib/components/common/ConstraintsView.d.ts +0 -1
  141. package/lib/components/common/ExpandableExample/ExpandableExample.js +1 -1
  142. package/lib/components/common/Extensions.d.ts +0 -1
  143. package/lib/components/common/Fields/fields-layout.d.ts +3 -3
  144. package/lib/components/common/Fields/fields.d.ts +1 -2
  145. package/lib/components/common/LinkToField.js +1 -1
  146. package/lib/components/common/Select/Select.d.ts +0 -1
  147. package/lib/components/common/Select/styled.d.ts +11 -12
  148. package/lib/components/common/Skeleton/Skeleton.d.ts +1 -1
  149. package/lib/components/common/Skeleton/Skeleton.js +2 -2
  150. package/lib/components/common/linkify.js +2 -2
  151. package/lib/components/common/panels.d.ts +7 -7
  152. package/lib/components/common/panels.js +2 -2
  153. package/lib/components/pluggable/styled.components.d.ts +3 -3
  154. package/lib/events/creator.js +1 -1
  155. package/lib/hoc/utils.js +1 -1
  156. package/lib/hoc/withRouter.js +1 -1
  157. package/lib/hoc/withStore.js +1 -1
  158. package/lib/hooks/index.d.ts +1 -0
  159. package/lib/hooks/index.js +1 -1
  160. package/lib/hooks/useActivateExample.js +1 -1
  161. package/lib/hooks/useActiveWithFallback.js +1 -1
  162. package/lib/hooks/useDimensions.js +1 -1
  163. package/lib/hooks/useLicense.js +1 -1
  164. package/lib/hooks/usePrevious.js +1 -1
  165. package/lib/hooks/useRouter.d.ts +1 -1
  166. package/lib/hooks/useTranslate.d.ts +2 -0
  167. package/lib/hooks/useTranslate.js +2 -0
  168. package/lib/hooks/useUppercase2LowercaseRedirect.js +1 -1
  169. package/lib/index.js +1 -1
  170. package/lib/jotai/app.d.ts +2 -4
  171. package/lib/jotai/app.js +1 -1
  172. package/lib/jotai/operation.js +1 -1
  173. package/lib/models/callback.js +1 -1
  174. package/lib/models/example.js +1 -1
  175. package/lib/models/field.js +1 -1
  176. package/lib/models/group.js +1 -1
  177. package/lib/models/mediaContent.js +1 -1
  178. package/lib/models/mediaType.js +1 -1
  179. package/lib/models/operation.js +1 -1
  180. package/lib/models/request.js +1 -1
  181. package/lib/models/response.js +1 -1
  182. package/lib/models/schema.js +1 -1
  183. package/lib/models/security.js +1 -1
  184. package/lib/models/tab.d.ts +1 -1
  185. package/lib/services/OpenAPIParser.js +1 -1
  186. package/lib/services/check.js +1 -1
  187. package/lib/services/code-samples/generator.d.ts +3 -1
  188. package/lib/services/code-samples/generator.js +1 -1
  189. package/lib/services/code-samples/httpsnippet/helpers/code-helpers.js +1 -1
  190. package/lib/services/code-samples/httpsnippet/targets/index.d.ts +2 -2
  191. package/lib/services/code-samples/httpsnippet/targets/java/httpclient.js +1 -1
  192. package/lib/services/code-samples/httpsnippet/targets/java8/apachehttp.js +1 -1
  193. package/lib/services/code-samples/httpsnippet/targets/javascript/fetch.js +1 -1
  194. package/lib/services/code-samples/httpsnippet/targets/javascript/index.d.ts +1 -1
  195. package/lib/services/code-samples/httpsnippet/targets/node/fetch.js +1 -1
  196. package/lib/services/code-samples/httpsnippet/targets/php/utils.js +1 -1
  197. package/lib/services/code-samples/httpsnippet/targets/r/utils.js +1 -1
  198. package/lib/services/code-samples/httpsnippet/targets/shell/index.d.ts +1 -1
  199. package/lib/services/config-options/helpers.js +1 -1
  200. package/lib/services/config-options/normalizeOptions.js +1 -1
  201. package/lib/services/history/helpers.js +1 -1
  202. package/lib/services/menu/builder.js +1 -1
  203. package/lib/services/menu/markdown.js +1 -1
  204. package/lib/services/menu/operation.js +1 -1
  205. package/lib/services/menu/tags.js +1 -1
  206. package/lib/services/utils.js +1 -1
  207. package/lib/standalone.js +1 -1
  208. package/lib/utils/areArraysEqual.js +1 -1
  209. package/lib/utils/argValuesHelpers.js +1 -1
  210. package/lib/utils/compose.d.ts +1 -1
  211. package/lib/utils/convertExamplesFormat.d.ts +2 -0
  212. package/lib/utils/convertExamplesFormat.js +2 -0
  213. package/lib/utils/cookies.js +1 -1
  214. package/lib/utils/createParsedDocument.js +1 -1
  215. package/lib/utils/debounce.js +1 -1
  216. package/lib/utils/debug.js +1 -1
  217. package/lib/utils/dom.js +1 -1
  218. package/lib/utils/environments.js +1 -1
  219. package/lib/utils/helpers.d.ts +2 -2
  220. package/lib/utils/helpers.js +1 -1
  221. package/lib/utils/highlight.js +1 -1
  222. package/lib/utils/isMobile.js +1 -1
  223. package/lib/utils/loadAndBundleSpec.js +1 -1
  224. package/lib/utils/local-storage.js +1 -1
  225. package/lib/utils/object.js +1 -1
  226. package/lib/utils/openapi.d.ts +2 -1
  227. package/lib/utils/openapi.js +1 -1
  228. package/lib/utils/parameters.js +1 -1
  229. package/lib/utils/path.js +1 -1
  230. package/lib/utils/replaceVariables.js +1 -1
  231. package/lib/utils/saveTextBeforeHeading.js +1 -1
  232. package/lib/utils/security-details.js +1 -1
  233. package/lib/utils/session-storage.js +1 -1
  234. package/lib/utils/sort.js +1 -1
  235. package/lib/utils/string.js +1 -1
  236. package/lib/utils/test-utils.js +1 -1
  237. package/lib/utils/theme-helpers.js +2 -2
  238. package/lib-esm/components/ApiInfo/ApiInfo.js +1 -1
  239. package/lib-esm/components/ApiInfo/Metadata.d.ts +3 -1
  240. package/lib-esm/components/ApiInfo/Metadata.js +1 -1
  241. package/lib-esm/components/CallbackSamples/CallbackSamples.d.ts +2 -1
  242. package/lib-esm/components/CallbackSamples/CallbackSamples.js +1 -1
  243. package/lib-esm/components/Callbacks/CallbackDetails.d.ts +2 -1
  244. package/lib-esm/components/Callbacks/CallbackDetails.js +1 -1
  245. package/lib-esm/components/Callbacks/CallbackOperation.js +1 -1
  246. package/lib-esm/components/Callbacks/CallbackSummary.d.ts +3 -2
  247. package/lib-esm/components/Callbacks/CallbackSummary.js +1 -1
  248. package/lib-esm/components/Callbacks/CallbacksList.d.ts +0 -1
  249. package/lib-esm/components/Callbacks/styled.d.ts +1 -1
  250. package/lib-esm/components/Content/Content.d.ts +0 -1
  251. package/lib-esm/components/ContentItem/ContentItem.d.ts +0 -1
  252. package/lib-esm/components/ContentItems/ContentItems.d.ts +0 -1
  253. package/lib-esm/components/Discriminator/Discriminator.d.ts +2 -1
  254. package/lib-esm/components/Discriminator/Discriminator.js +1 -1
  255. package/lib-esm/components/ExpandAllButton/ExpandAllButton.js +1 -1
  256. package/lib-esm/components/ExpandAllButton/getAllNestedSchema.d.ts +4 -4
  257. package/lib-esm/components/ExternalDocumentation/ExternalDocumentation.d.ts +0 -1
  258. package/lib-esm/components/Language/LanguageList.d.ts +0 -1
  259. package/lib-esm/components/Language/styled.d.ts +12 -13
  260. package/lib-esm/components/MediaTypeSwitch/MediaTypesSwitch.js +1 -1
  261. package/lib-esm/components/OperationItem/OperationItem.d.ts +0 -1
  262. package/lib-esm/components/OperationItem/OperationItem.js +2 -2
  263. package/lib-esm/components/Overview/Overview.d.ts +8 -3
  264. package/lib-esm/components/Overview/Overview.js +1 -1
  265. package/lib-esm/components/PageFooter/PageFooter.d.ts +0 -1
  266. package/lib-esm/components/PanelItem/styled.d.ts +5 -6
  267. package/lib-esm/components/PayloadSamples/Example.js +1 -1
  268. package/lib-esm/components/PayloadSamples/ExampleValue.d.ts +0 -1
  269. package/lib-esm/components/PayloadSamples/MediaTypeSamples.d.ts +0 -1
  270. package/lib-esm/components/PayloadSamples/MediaTypeSamples.js +1 -1
  271. package/lib-esm/components/PayloadSamples/PayloadSamples.d.ts +0 -1
  272. package/lib-esm/components/PayloadSamples/PayloadSamples.js +1 -1
  273. package/lib-esm/components/PropertyDetails/DescriptionEnums.d.ts +1 -1
  274. package/lib-esm/components/PropertyDetails/DescriptionEnums.js +1 -1
  275. package/lib-esm/components/PropertyDetails/EnumValues.d.ts +0 -1
  276. package/lib-esm/components/PropertyDetails/EnumValues.js +1 -1
  277. package/lib-esm/components/PropertyDetails/Examples.js +1 -1
  278. package/lib-esm/components/PropertyDetails/Extensions.d.ts +0 -1
  279. package/lib-esm/components/PropertyDetails/FieldDetail.d.ts +1 -1
  280. package/lib-esm/components/PropertyDetails/FieldDetail.js +1 -1
  281. package/lib-esm/components/PropertyDetails/FieldDetails.d.ts +0 -1
  282. package/lib-esm/components/PropertyDetails/FieldDetails.js +4 -3
  283. package/lib-esm/components/PropertyDetails/Pattern.js +1 -1
  284. package/lib-esm/components/PropertyDetails/PropertyDetails.d.ts +0 -1
  285. package/lib-esm/components/PropertyDetails/SimpleEnums.d.ts +1 -1
  286. package/lib-esm/components/PropertyDetails/SimpleEnums.js +1 -1
  287. package/lib-esm/components/PropertyDetails/styled.d.ts +1 -10
  288. package/lib-esm/components/PropertyDetails/types.d.ts +3 -0
  289. package/lib-esm/components/RedoclyOpenAPIDocs/Providers.js +1 -1
  290. package/lib-esm/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocs.js +1 -1
  291. package/lib-esm/components/RedoclyOpenAPIDocs/styled.d.ts +0 -4
  292. package/lib-esm/components/RedoclyOpenAPIDocs/styled.js +1 -30
  293. package/lib-esm/components/RedoclyOpenAPIDocs/types.d.ts +0 -3
  294. package/lib-esm/components/Replay/EmbeddedReplay.d.ts +0 -1
  295. package/lib-esm/components/Replay/EmbeddedReplay.js +1 -1
  296. package/lib-esm/components/Replay/Replay.d.ts +0 -1
  297. package/lib-esm/components/Replay/Replay.js +2 -9
  298. package/lib-esm/components/Request/RequestDetails.d.ts +0 -1
  299. package/lib-esm/components/Request/RequestDetails.js +1 -1
  300. package/lib-esm/components/Request/types.d.ts +2 -0
  301. package/lib-esm/components/RequestParameters/Body.d.ts +0 -1
  302. package/lib-esm/components/RequestParameters/ParametersGroup.d.ts +0 -1
  303. package/lib-esm/components/RequestParameters/RequestParameters.js +1 -1
  304. package/lib-esm/components/RequestSamples/CodeSample.d.ts +0 -1
  305. package/lib-esm/components/RequestSamples/RequestSamples.d.ts +0 -1
  306. package/lib-esm/components/RequestSamples/useCodeSamples.js +1 -1
  307. package/lib-esm/components/ResponseSamples/Summary.js +1 -1
  308. package/lib-esm/components/Responses/OperationResponseList.js +1 -1
  309. package/lib-esm/components/Responses/ResponseDetails.d.ts +0 -1
  310. package/lib-esm/components/Responses/ResponseHeaders.d.ts +0 -1
  311. package/lib-esm/components/Responses/ResponseHeaders.js +1 -1
  312. package/lib-esm/components/Responses/styled.d.ts +1 -2
  313. package/lib-esm/components/RightPanel/RightPanel.js +1 -1
  314. package/lib-esm/components/Schema/ArraySchema.d.ts +0 -1
  315. package/lib-esm/components/Schema/ObjectSchema.d.ts +0 -1
  316. package/lib-esm/components/Schema/ObjectSchema.js +1 -1
  317. package/lib-esm/components/Schema/OneOfSchema.d.ts +0 -1
  318. package/lib-esm/components/Schema/OneOfSchema.js +1 -1
  319. package/lib-esm/components/Schema/RecursiveSchema.d.ts +0 -1
  320. package/lib-esm/components/Schema/RecursiveSchema.js +1 -1
  321. package/lib-esm/components/Schema/Schema.d.ts +0 -1
  322. package/lib-esm/components/Schema/SubSchema.js +1 -1
  323. package/lib-esm/components/Schema/helpers.d.ts +1 -1
  324. package/lib-esm/components/Schema/helpers.js +1 -1
  325. package/lib-esm/components/SchemaDefinition/SchemaDefinition.d.ts +0 -1
  326. package/lib-esm/components/SectionItem/SectionItem.d.ts +0 -1
  327. package/lib-esm/components/Security/OAuthFlow.js +1 -1
  328. package/lib-esm/components/Security/SecurityFlow.js +1 -1
  329. package/lib-esm/components/Security/SecurityModal.js +1 -1
  330. package/lib-esm/components/ServerList/ServerList.d.ts +1 -1
  331. package/lib-esm/components/ServerList/ServerList.js +1 -1
  332. package/lib-esm/components/ServerList/types.d.ts +4 -1
  333. package/lib-esm/components/ServerListDropdown/ServerListDropdown.js +1 -1
  334. package/lib-esm/components/ServerListDropdown/styled.d.ts +0 -1
  335. package/lib-esm/components/SideMenu/SideMenu.d.ts +0 -1
  336. package/lib-esm/components/TagItem/OperationNavigationItems.d.ts +9 -0
  337. package/lib-esm/components/TagItem/OperationNavigationItems.js +37 -0
  338. package/lib-esm/components/TagItem/OperationsNavigation.d.ts +1 -7
  339. package/lib-esm/components/TagItem/OperationsNavigation.js +1 -40
  340. package/lib-esm/components/TagItem/TagItem.js +2 -2
  341. package/lib-esm/components/TagItem/styled.d.ts +1 -0
  342. package/lib-esm/components/TagItem/styled.js +6 -0
  343. package/lib-esm/components/TagItem/types.d.ts +5 -0
  344. package/lib-esm/components/TagItem/types.js +2 -0
  345. package/lib-esm/components/common/Badges.d.ts +2 -2
  346. package/lib-esm/components/common/BodyContent/BodyContent.d.ts +0 -1
  347. package/lib-esm/components/common/BodyContent/BodyContent.js +1 -1
  348. package/lib-esm/components/common/ClearButton/ClearButton.d.ts +0 -1
  349. package/lib-esm/components/common/ClearButton/styled.d.ts +0 -1
  350. package/lib-esm/components/common/ConstraintsView.d.ts +0 -1
  351. package/lib-esm/components/common/ExpandableExample/ExpandableExample.js +1 -1
  352. package/lib-esm/components/common/Extensions.d.ts +0 -1
  353. package/lib-esm/components/common/Fields/fields-layout.d.ts +3 -3
  354. package/lib-esm/components/common/Fields/fields.d.ts +1 -2
  355. package/lib-esm/components/common/Select/Select.d.ts +0 -1
  356. package/lib-esm/components/common/Select/styled.d.ts +11 -12
  357. package/lib-esm/components/common/Skeleton/Skeleton.d.ts +1 -1
  358. package/lib-esm/components/common/panels.d.ts +7 -7
  359. package/lib-esm/components/common/panels.js +2 -2
  360. package/lib-esm/components/pluggable/styled.components.d.ts +3 -3
  361. package/lib-esm/hooks/index.d.ts +1 -0
  362. package/lib-esm/hooks/index.js +1 -1
  363. package/lib-esm/hooks/useRouter.d.ts +1 -1
  364. package/lib-esm/hooks/useTranslate.d.ts +2 -0
  365. package/lib-esm/hooks/useTranslate.js +2 -0
  366. package/lib-esm/jotai/app.d.ts +2 -4
  367. package/lib-esm/jotai/app.js +1 -1
  368. package/lib-esm/models/mediaType.js +1 -1
  369. package/lib-esm/models/tab.d.ts +1 -1
  370. package/lib-esm/services/code-samples/generator.d.ts +3 -1
  371. package/lib-esm/services/code-samples/generator.js +1 -1
  372. package/lib-esm/services/code-samples/httpsnippet/targets/index.d.ts +2 -2
  373. package/lib-esm/services/code-samples/httpsnippet/targets/java/httpclient.js +1 -1
  374. package/lib-esm/services/code-samples/httpsnippet/targets/java8/apachehttp.js +1 -1
  375. package/lib-esm/services/code-samples/httpsnippet/targets/javascript/fetch.js +1 -1
  376. package/lib-esm/services/code-samples/httpsnippet/targets/javascript/index.d.ts +1 -1
  377. package/lib-esm/services/code-samples/httpsnippet/targets/node/fetch.js +1 -1
  378. package/lib-esm/services/code-samples/httpsnippet/targets/shell/index.d.ts +1 -1
  379. package/lib-esm/utils/compose.d.ts +1 -1
  380. package/lib-esm/utils/convertExamplesFormat.d.ts +2 -0
  381. package/lib-esm/utils/convertExamplesFormat.js +2 -0
  382. package/lib-esm/utils/helpers.d.ts +2 -2
  383. package/lib-esm/utils/openapi.d.ts +2 -1
  384. package/lib-esm/utils/openapi.js +1 -1
  385. package/package.json +15 -14
  386. package/lib/components/UnsupportedFeatureScreen/UnsupportedFeatureScreen.d.ts +0 -1
  387. package/lib/components/UnsupportedFeatureScreen/UnsupportedFeatureScreen.js +0 -18
  388. package/lib/components/UnsupportedFeatureScreen/index.d.ts +0 -1
  389. package/lib/components/UnsupportedFeatureScreen/index.js +0 -2
  390. package/lib/setupTests.d.ts +0 -2
  391. package/lib/setupTests.js +0 -2
  392. package/lib/testProviders.d.ts +0 -3
  393. package/lib/testProviders.js +0 -2
  394. package/lib-esm/components/UnsupportedFeatureScreen/UnsupportedFeatureScreen.d.ts +0 -1
  395. package/lib-esm/components/UnsupportedFeatureScreen/UnsupportedFeatureScreen.js +0 -18
  396. package/lib-esm/components/UnsupportedFeatureScreen/index.d.ts +0 -1
  397. package/lib-esm/components/UnsupportedFeatureScreen/index.js +0 -2
  398. package/lib-esm/setupTests.d.ts +0 -2
  399. package/lib-esm/setupTests.js +0 -2
  400. package/lib-esm/testProviders.d.ts +0 -3
  401. package/lib-esm/testProviders.js +0 -2
@@ -1,7 +1,7 @@
1
- import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";import{memo,useState,useCallback,useMemo}from"react";import styled from"styled-components";import{useAtomValue}from"jotai";import{Feedback,LayoutVariant,BeforeOpenApiOperation,AfterOpenApiOperation}from"@redocly/theme";import{SamplesMiddlePanel,SamplesPanel,ShareLink,Row,CustomBadges}from"../common";import{CallbacksList}from"../Callbacks";import{CallbackSamples}from"../CallbackSamples";import{RequestSamples}from"../RequestSamples";import{OperationResponseList}from"../Responses";import{ResponseSamples}from"../ResponseSamples";import{makeDeepLink}from"../../services";import{layoutAtom}from"../../jotai/app";import{globalStoreAtom}from"../../jotai/store";import{getOperation}from"../../models/operation";import{RenderHook}from"../RenderHook";import{Heading,Title}from"../common/OperationItemTitle";import{LinkToField}from"../common/LinkToField";import{RequestDetails}from"../Request/RequestDetails";import{StyledBadge}from"../common/Badges";const OperationSamplesPanel=styled(SamplesPanel)`
1
+ import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";import{memo,useState,useCallback,useMemo}from"react";import styled from"styled-components";import{useAtomValue}from"jotai";import{Feedback,LayoutVariant,BeforeOpenApiOperation,AfterOpenApiOperation}from"@redocly/theme";import{SamplesMiddlePanel,SamplesPanel,ShareLink,Row,CustomBadges}from"../common";import{CallbacksList}from"../Callbacks";import{CallbackSamples}from"../CallbackSamples";import{RequestSamples}from"../RequestSamples";import{OperationResponseList}from"../Responses";import{ResponseSamples}from"../ResponseSamples";import{makeDeepLink,joinWithSeparator}from"../../services";import{layoutAtom}from"../../jotai/app";import{globalStoreAtom}from"../../jotai/store";import{getOperation}from"../../models/operation";import{RenderHook}from"../RenderHook";import{Heading,Title}from"../common/OperationItemTitle";import{LinkToField}from"../common/LinkToField";import{RequestDetails}from"../Request/RequestDetails";import{StyledBadge}from"../common/Badges";import{useTranslate}from"../../hooks";function OperationItemComponent({item:{operationDefinition:e,parent:a,href:o}}){var t,s;const l=useTranslate(),{parser:i,options:n}=useAtomValue(globalStoreAtom),r=useAtomValue(layoutAtom),[p,d]=useState(),{unstable_hooks:m,feedback:c}=n,u=useMemo((()=>getOperation(i,e,a,n,o)),[o,e,n,a,i]),{name:k,deprecated:S,isWebhook:b,badges:x}=u,h=r===LayoutVariant.STACKED,j=(null==c?void 0:c.type)||"sentiment",f=!0!==(null==c?void 0:c.hide),[g,_]=useState(null),y=useCallback((e=>{p!==e&&d(e)}),[p]);return _jsxs(OperationRow,{layout:r,children:[_jsx(OperationSubRowStyled,{layout:r,children:_jsxs(SamplesMiddlePanel,{isStacked:h,children:[_jsx(RenderHook,{Hook:BeforeOpenApiOperation||(null==m?void 0:m.BeforeOperation),props:{operation:u}}),_jsxs(Heading,{"data-testid":"operation-item-header",children:[_jsx(ShareLink,{to:o,"aria-label":`link to ${k}`}),_jsx(CustomBadges,{badges:x,children:k}),S&&_jsx(StyledBadge,{deprecated:!0,children:l("openapi.badges.deprecated","Deprecated")}),b&&_jsx(StyledBadge,{children:l("openapi.badges.webhook","Webhook")})]})]})}),_jsxs(OperationSubRowStyled,{layout:r,children:[_jsx(SamplesMiddlePanel,{isStacked:h,children:_jsx(RequestDetails,{operation:u,translate:l})}),_jsx(OperationSamplesPanel,{isStacked:h,"data-testid":"samples-block",className:"panel-container-request-samples",children:_jsx(RequestSamples,{operation:u})})]}),_jsxs(OperationSubRowStyled,{layout:r,children:[_jsx(SamplesMiddlePanel,{isStacked:h,children:(null===(t=u.responses)||void 0===t?void 0:t.length)?_jsx(OperationResponseList,{responses:u.responses,operationId:u.id,operationPointer:u.pointer,callbackId:u.callbackId,activeResponseTab:p,onTabChange:y}):null}),_jsx(OperationSamplesPanel,{isStacked:h,"data-testid":"samples-block",className:"panel-container-response-samples",children:_jsx(ResponseSamples,{operation:u,activeResponseTab:p,onTabChange:y})})]}),_jsxs(OperationSubRowStyled,{layout:r,children:[_jsxs(SamplesMiddlePanel,{isStacked:h,children:[(null===(s=u.callbacks)||void 0===s?void 0:s.length)?_jsxs(_Fragment,{children:[_jsxs(Title,{children:[_jsx(LinkToField,{to:makeDeepLink(u.id,"callbacks")}),l("openapi.callbacks","Callbacks")]}),_jsx(CallbacksList,{callbacks:u.callbacks,onExpand:_,selectedCallback:g})]}):null,_jsx(RenderHook,{Hook:AfterOpenApiOperation||(null==m?void 0:m.AfterOperation),props:{operation:u}})]}),g?_jsx(OperationSamplesPanel,{isStacked:h,"data-testid":"samples-block",children:_jsx(CallbackSamples,{callback:g,translate:l})}):null]}),_jsx(OperationSubRowStyled,{layout:r,children:_jsx(SamplesMiddlePanel,{isStacked:h,fullWidth:!0,children:f?_jsx(FeedbackWrapper,{children:_jsx(Feedback,{type:j,settings:c.settings,path:joinWithSeparator(n.routingBasePath,u.href)})}):null})})]})}export const OperationItem=memo(OperationItemComponent);const OperationSamplesPanel=styled(SamplesPanel)`
2
2
  margin-left: auto;
3
3
  --code-block-padding: var(--spacing-xs) 0 var(--spacing-xs) 20px;
4
- `;function OperationItemComponent({item:{operationDefinition:e,parent:a,href:o}}){var t,s;const{parser:l,options:i}=useAtomValue(globalStoreAtom),n=useAtomValue(layoutAtom),[r,p]=useState(),{unstable_hooks:d,feedback:m}=i,c=useMemo((()=>getOperation(l,e,a,i,o)),[o,e,i,a,l]),{name:u,deprecated:k,isWebhook:S,badges:x}=c,b=n===LayoutVariant.STACKED,h=(null==m?void 0:m.type)||"sentiment",j=!0!==(null==m?void 0:m.hide),[f,g]=useState(null);console.log("routerBasePath",i.routingBasePath+c.href);const _=useCallback((e=>{r!==e&&p(e)}),[r]);return _jsxs(OperationRow,{layout:n,children:[_jsx(OperationSubRowStyled,{layout:n,children:_jsxs(SamplesMiddlePanel,{isStacked:b,children:[_jsx(RenderHook,{Hook:BeforeOpenApiOperation||(null==d?void 0:d.BeforeOperation),props:{operation:c}}),_jsxs(Heading,{"data-testid":"operation-item-header",children:[_jsx(ShareLink,{to:o,"aria-label":`link to ${u}`}),_jsx(CustomBadges,{badges:x,children:u}),k&&_jsx(StyledBadge,{deprecated:!0,children:"Deprecated"}),S&&_jsx(StyledBadge,{children:"Webhook"})]})]})}),_jsxs(OperationSubRowStyled,{layout:n,children:[_jsx(SamplesMiddlePanel,{isStacked:b,children:_jsx(RequestDetails,{operation:c})}),_jsx(OperationSamplesPanel,{isStacked:b,"data-testid":"samples-block",className:"panel-container-request-samples",children:_jsx(RequestSamples,{operation:c})})]}),_jsxs(OperationSubRowStyled,{layout:n,children:[_jsx(SamplesMiddlePanel,{isStacked:b,children:(null===(t=c.responses)||void 0===t?void 0:t.length)?_jsx(OperationResponseList,{responses:c.responses,operationId:c.id,operationPointer:c.pointer,callbackId:c.callbackId,activeResponseTab:r,onTabChange:_}):null}),_jsx(OperationSamplesPanel,{isStacked:b,"data-testid":"samples-block",className:"panel-container-response-samples",children:_jsx(ResponseSamples,{operation:c,activeResponseTab:r,onTabChange:_})})]}),_jsxs(OperationSubRowStyled,{layout:n,children:[_jsxs(SamplesMiddlePanel,{isStacked:b,children:[(null===(s=c.callbacks)||void 0===s?void 0:s.length)?_jsxs(_Fragment,{children:[_jsxs(Title,{children:[_jsx(LinkToField,{to:makeDeepLink(c.id,"callbacks")}),"Callbacks"]}),_jsx(CallbacksList,{callbacks:c.callbacks,onExpand:g,selectedCallback:f})]}):null,_jsx(RenderHook,{Hook:AfterOpenApiOperation||(null==d?void 0:d.AfterOperation),props:{operation:c}})]}),f?_jsx(OperationSamplesPanel,{isStacked:b,"data-testid":"samples-block",children:_jsx(CallbackSamples,{callback:f})}):null]}),_jsx(OperationSubRowStyled,{layout:n,children:_jsx(SamplesMiddlePanel,{isStacked:b,fullWidth:!0,children:j?_jsx(FeedbackWrapper,{children:_jsx(Feedback,{type:h,settings:m.settings,path:i.routingBasePath+c.href})}):null})})]})}export const OperationItem=memo(OperationItemComponent);const FeedbackWrapper=styled.div`
4
+ `,FeedbackWrapper=styled.div`
5
5
  & > div {
6
6
  flex: 1 1 auto;
7
7
  display: flex;
@@ -1,4 +1,9 @@
1
+ import type { TFunction } from '@redocly/theme';
1
2
  import type { ReactElement } from 'react';
2
- export declare function Overview({ info }: {
3
- info: any;
4
- }): ReactElement;
3
+ import type { OpenAPIInfo } from '../../types';
4
+ type OverviewProps = {
5
+ info: OpenAPIInfo;
6
+ translate: TFunction;
7
+ };
8
+ export declare function Overview({ info, translate }: OverviewProps): ReactElement;
9
+ export {};
@@ -1,2 +1,2 @@
1
- import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";import{CopyButton,NewTabButton,EmailButton}from"@redocly/theme";import{PanelItem,PanelItemDescription,PanelItemsList}from"../PanelItem";export function Overview({info:e}){var t;const n=e.contact&&e.contact.url&&_jsx(PanelItem,{header:_jsx(PanelItemDescription,{children:"URL"}),title:_jsx("a",{href:e.contact.url,target:"_blank",rel:"noreferrer",children:e.contact.url}),actions:[_jsx(NewTabButton,{data:e.contact.url},"NewTabButton")]})||null,a=e.contact&&e.contact.email&&_jsx(PanelItem,{header:_jsx(PanelItemDescription,{children:e.contact.name||"E-mail"}),title:_jsx("a",{href:"mailto:"+e.contact.email,children:e.contact.email}),actions:[_jsx(CopyButton,{data:e.contact.email},"CopyButton"),_jsx(EmailButton,{data:e.contact.email},"EmailButton")]})||null,r=e.license&&_jsx(PanelItem,{header:_jsx(PanelItemDescription,{children:"License"}),title:e.license.identifier?e.license.identifier:_jsx("a",{href:e.license.url,target:"_blank",rel:"noreferrer",children:e.license.name}),actions:[_jsx(NewTabButton,{data:e.license.url},"NewTabButton")]})||null,l=e.termsOfService&&_jsx(PanelItem,{title:_jsx("a",{href:e.termsOfService,target:"_blank",rel:"noreferrer",children:"Terms of Service"}),actions:[_jsx(NewTabButton,{data:e.termsOfService},e.termsOfService)]})||null,i=(null===(t=e["x-links"])||void 0===t?void 0:t.map((e=>_jsx(PanelItem,{header:_jsx(PanelItemDescription,{children:e.name}),title:_jsx("a",{href:e.url,target:"_blank",rel:"noreferrer",children:e.url}),actions:[_jsx(NewTabButton,{data:e.url},"NewTabButton")]},e.url))))||null;return _jsx(_Fragment,{children:_jsxs(PanelItemsList,{children:[n,a,r,l,i]})})}
1
+ import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";import{CopyButton,NewTabButton,EmailButton}from"@redocly/theme";import{PanelItem,PanelItemDescription,PanelItemsList}from"../PanelItem";export function Overview({info:e,translate:t}){const n=e.contact&&e.contact.url&&_jsx(PanelItem,{header:_jsx(PanelItemDescription,{children:t("openapi.info.contact.url","URL")}),title:_jsx("a",{href:e.contact.url,target:"_blank",rel:"noreferrer",children:e.contact.url}),actions:[_jsx(NewTabButton,{data:e.contact.url},"NewTabButton")]})||null,a=e.contact&&e.contact.email&&_jsx(PanelItem,{header:_jsx(PanelItemDescription,{children:e.contact.name||t("openapi.info.contact.name","E-mail")}),title:_jsx("a",{href:"mailto:"+e.contact.email,children:e.contact.email}),actions:[_jsx(CopyButton,{data:e.contact.email},"CopyButton"),_jsx(EmailButton,{data:e.contact.email},"EmailButton")]})||null,r=e.license&&_jsx(PanelItem,{header:_jsx(PanelItemDescription,{children:t("openapi.info.license","License")}),title:e.license.identifier?e.license.identifier:_jsx("a",{href:e.license.url,target:"_blank",rel:"noreferrer",children:e.license.name}),actions:[_jsx(NewTabButton,{data:e.license.url||""},"NewTabButton")]})||null,i=e.termsOfService&&_jsx(PanelItem,{title:_jsx("a",{href:e.termsOfService,target:"_blank",rel:"noreferrer",children:t("openapi.info.termsOfService","Terms of Service")}),actions:[_jsx(NewTabButton,{data:e.termsOfService},e.termsOfService)]})||null;return _jsx(_Fragment,{children:_jsxs(PanelItemsList,{children:[n,a,r,i]})})}
2
2
  //# sourceMappingURL=Overview.js.map
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  export declare function PageFooterComponent(): import("react/jsx-runtime").JSX.Element | null;
3
2
  export declare const PageFooter: import("react").MemoExoticComponent<typeof PageFooterComponent>;
@@ -1,17 +1,16 @@
1
- /// <reference types="react" />
2
1
  export declare const PanelItemWrap: import("styled-components").StyledComponent<"span", any, {}, never>;
3
2
  export declare const Item: import("styled-components").StyledComponent<"span", any, {}, never>;
4
3
  export declare const Header: import("styled-components").StyledComponent<"span", any, {}, never>;
5
4
  export declare const Title: import("styled-components").StyledComponent<"span", any, {
6
- active?: boolean | undefined;
5
+ active?: boolean;
7
6
  }, never>;
8
7
  export declare const ActionsWrap: import("styled-components").StyledComponent<"div", any, {}, never>;
9
8
  export declare const PanelItemsList: import("styled-components").StyledComponent<"div", any, {}, never>;
10
9
  export declare const PanelItemDescription: import("styled-components").StyledComponent<"span", any, {}, never>;
11
- export declare const StyledCheckmarkIcon: import("styled-components").StyledComponent<(props: import("@redocly/theme/lib/icons/types").IconProps) => import("react").JSX.Element, any, {
10
+ export declare const StyledCheckmarkIcon: import("styled-components").StyledComponent<(props: import("@redocly/theme/lib/icons/types").IconProps) => React.JSX.Element, any, {
12
11
  'data-component-name': string;
13
12
  } & {
14
- color?: string | undefined;
15
- size?: string | undefined;
16
- className?: string | undefined;
13
+ color?: string;
14
+ size?: string;
15
+ className?: string;
17
16
  } & import("react").SVGProps<SVGSVGElement>, "data-component-name">;
@@ -1,2 +1,2 @@
1
- import{jsx as _jsx}from"react/jsx-runtime";import{ExampleValue}from"./ExampleValue";import{ExternalExample}from"./ExternalExample";export function Example({example:e,mimeType:l,onCopyClick:a}){return void 0===e.value&&e.externalValueUrl?e.externalValueUrl.endsWith(".pdf")?_jsx(ExampleValue,{value:"PDF file",mimeType:l,encoding:e.encoding,onCopyClick:a}):_jsx(ExternalExample,{example:e,mimeType:l,onCopyClick:a}):_jsx(ExampleValue,{value:e.value,mimeType:l,encoding:e.encoding,onCopyClick:a})}
1
+ import{jsx as _jsx}from"react/jsx-runtime";import{ExampleValue}from"./ExampleValue";import{ExternalExample}from"./ExternalExample";import{useTranslate}from"../../hooks";export function Example({example:e,mimeType:l,onCopyClick:a}){const m=useTranslate();return void 0===e.value&&e.externalValueUrl?e.externalValueUrl.endsWith(".pdf")?_jsx(ExampleValue,{value:m("openapi.pdfFileSample","PDF file"),mimeType:l,encoding:e.encoding,onCopyClick:a}):_jsx(ExternalExample,{example:e,mimeType:l,onCopyClick:a}):_jsx(ExampleValue,{value:e.value,mimeType:l,encoding:e.encoding,onCopyClick:a})}
2
2
  //# sourceMappingURL=Example.js.map
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { ExampleValueProps } from './types';
3
2
  export declare function ExampleValue({ value, mimeType, encoding, onCopyClick, }: ExampleValueProps): React.ReactNode;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { MediaTypeSamplesProps } from './types';
3
2
  export declare const MediaTypeSamples: import("react").NamedExoticComponent<MediaTypeSamplesProps>;
@@ -1,4 +1,4 @@
1
- import{jsx as _jsx,Fragment as _Fragment,jsxs as _jsxs}from"react/jsx-runtime";import{memo}from"react";import merge from"deepmerge";import styled from"styled-components";import{Markdown}from"../Markdown";import{Example}from"./Example";import{ExampleSwitch,useExampleKey}from"../Samples";import{arrayMergeStrategy}from"../../services/utils";import{StyledCodeBlock}from"./styled";function MediaTypeSamplesComponent({mediaType:e,properties:r,onChange:a,onCopyClick:m}){const o=e.examples||e.formExamples||{},s=e.name,t=Object.keys(o),{exampleKey:p}=useExampleKey(e.operation,o),n=1===t.length?Object.values(o)[0]:o[p];if(!t.length)return _jsx(StyledCodeBlock,{lang:"clike",source:"No response example",header:{controls:!1}});const l=r?Object.assign(Object.assign({},n),{value:merge(n.value,r,{arrayMerge:arrayMergeStrategy})}):n,i=l.description;return _jsxs(_Fragment,{children:[_jsx(ExampleSwitch,{examples:o,exampleKey:p,onChange:a}),i&&_jsx(StyledMarkdown,{source:i}),_jsx(Example,{example:l,mimeType:s,onCopyClick:m})]})}const StyledMarkdown=styled(Markdown)`
1
+ import{jsx as _jsx,Fragment as _Fragment,jsxs as _jsxs}from"react/jsx-runtime";import{memo}from"react";import merge from"deepmerge";import styled from"styled-components";import{Markdown}from"../Markdown";import{Example}from"./Example";import{ExampleSwitch,useExampleKey}from"../Samples";import{arrayMergeStrategy}from"../../services/utils";import{StyledCodeBlock}from"./styled";import{useTranslate}from"../../hooks";function MediaTypeSamplesComponent({mediaType:e,properties:r,onChange:a,onCopyClick:o}){const m=e.examples||e.formExamples||{},s=e.name,t=Object.keys(m),p=useTranslate(),{exampleKey:n}=useExampleKey(e.operation,m),l=1===t.length?Object.values(m)[0]:m[n];if(!t.length)return _jsx(StyledCodeBlock,{lang:"clike",source:p("openapi.noResponseExample","No response example"),header:{controls:!1}});const i=r?Object.assign(Object.assign({},l),{value:merge(l.value,r,{arrayMerge:arrayMergeStrategy})}):l,c=i.description;return _jsxs(_Fragment,{children:[_jsx(ExampleSwitch,{examples:m,exampleKey:n,onChange:a}),c&&_jsx(StyledMarkdown,{source:c}),_jsx(Example,{example:i,mimeType:s,onCopyClick:o})]})}const StyledMarkdown=styled(Markdown)`
2
2
  margin: 0 var(--spacing-md) var(--spacing-sm);
3
3
  `;export const MediaTypeSamples=memo(MediaTypeSamplesComponent);
4
4
  //# sourceMappingURL=MediaTypeSamples.js.map
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { PayloadSamplesProps } from './types';
3
2
  export declare const PayloadSamples: import("react").NamedExoticComponent<PayloadSamplesProps>;
@@ -1,2 +1,2 @@
1
- var __rest=this&&this.__rest||function(e,t){var o={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(o[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(o[a[r]]=e[a[r]])}return o};import{jsx as _jsx}from"react/jsx-runtime";import{memo,useCallback}from"react";import{useAtomValue}from"jotai";import{SelectOrLabel}from"../SelectOrLabel";import{MediaTypesSwitch}from"../MediaTypeSwitch";import{MimeLabel,Select}from"../common";import{MediaTypeSamples}from"./MediaTypeSamples";import{SelectWrapper,StyledCodeBlock}from"./styled";import{activeMimeNameAtom}from"../../jotai/app";import{useActivateExample}from"../../hooks";function PayloadSamplesComponent(e){var{onlyDefaultMimeType:t,content:o}=e,a=__rest(e,["onlyDefaultMimeType","content"]);const r=useActivateExample(o),l=useAtomValue(activeMimeNameAtom),m=t&&l,i=useCallback((e=>m?null:_jsx(SelectWrapper,{children:_jsx(SelectOrLabel,Object.assign({Label:MimeLabel,Select:Select,variant:"dark",fullWidth:!0},e))})),[m]),p=e=>r(e);return o?_jsx(MediaTypesSwitch,{content:o,renderSelect:i,children:e=>_jsx(MediaTypeSamples,Object.assign({mediaType:e},a,{onChange:p}),"samples")}):_jsx(StyledCodeBlock,{lang:"text",source:"No request payload",header:{controls:!1}})}export const PayloadSamples=memo(PayloadSamplesComponent);
1
+ var __rest=this&&this.__rest||function(e,t){var o={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(o[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(o[a[r]]=e[a[r]])}return o};import{jsx as _jsx}from"react/jsx-runtime";import{memo,useCallback}from"react";import{useAtomValue}from"jotai";import{SelectOrLabel}from"../SelectOrLabel";import{MediaTypesSwitch}from"../MediaTypeSwitch";import{MimeLabel,Select}from"../common";import{MediaTypeSamples}from"./MediaTypeSamples";import{SelectWrapper,StyledCodeBlock}from"./styled";import{activeMimeNameAtom}from"../../jotai/app";import{useActivateExample,useTranslate}from"../../hooks";import{convertExamplesFormat}from"../../utils/convertExamplesFormat";function PayloadSamplesComponent(e){var{onlyDefaultMimeType:t,content:o}=e,a=__rest(e,["onlyDefaultMimeType","content"]);const r=useActivateExample(o),l=useAtomValue(activeMimeNameAtom),m=t&&l,s=useTranslate(),p=useCallback((e=>m?null:_jsx(SelectWrapper,{children:_jsx(SelectOrLabel,Object.assign({Label:MimeLabel,Select:Select,variant:"dark",fullWidth:!0},e))})),[m]),n=e=>r(e);return o?_jsx(MediaTypesSwitch,{content:o,renderSelect:p,children:e=>{const t=convertExamplesFormat(e);return _jsx(MediaTypeSamples,Object.assign({mediaType:t},a,{onChange:n}),"samples")}}):_jsx(StyledCodeBlock,{lang:"text",source:s("openapi.noRequestPayload","No request payload"),header:{controls:!1}})}export const PayloadSamples=memo(PayloadSamplesComponent);
2
2
  //# sourceMappingURL=PayloadSamples.js.map
@@ -1,4 +1,4 @@
1
1
  import type { ReactElement } from 'react';
2
2
  import type { DescriptionEnumsProps } from './types';
3
- export declare function DescriptionEnumsComponent({ enums, toggle, showToggleButton, toggleButtonText, type, }: DescriptionEnumsProps): ReactElement;
3
+ export declare function DescriptionEnumsComponent({ enums, toggle, showToggleButton, toggleButtonText, type, translate, }: DescriptionEnumsProps): ReactElement;
4
4
  export declare const DescriptionEnums: import("react").NamedExoticComponent<DescriptionEnumsProps>;
@@ -6,5 +6,5 @@ import{jsxs as _jsxs,jsx as _jsx,Fragment as _Fragment}from"react/jsx-runtime";i
6
6
  p:only-of-type {
7
7
  margin: 0;
8
8
  }
9
- `;export function DescriptionEnumsComponent({enums:e,toggle:t,showToggleButton:n,toggleButtonText:o,type:r}){return _jsx(_Fragment,{children:_jsx(DescriptionEnumsBlock,{children:_jsxs("table",{className:"md",children:[_jsx("thead",{children:_jsxs("tr",{children:[_jsxs("th",{style:{width:"30%"},children:["array"===r?"Items":""," ",1===e.length?"Value":"Enum Value"]}),_jsx("th",{children:"Description"})]})}),_jsx("tbody",{children:e.map((({description:e,value:t})=>_jsxs("tr",{children:[_jsx(EnumValueStyled,{children:t}),_jsx(DescriptionValueStyled,{children:_jsx(Markdown,{source:e})})]},t)))}),n?_jsx("tfoot",{children:_jsx("tr",{children:_jsx("td",{colSpan:2,children:_jsx(ToggleButton,{onClick:t,children:o})})})}):null]})})})}export const DescriptionEnums=memo(DescriptionEnumsComponent);
9
+ `;export function DescriptionEnumsComponent({enums:e,toggle:t,showToggleButton:n,toggleButtonText:o,type:s,translate:r}){return _jsx(_Fragment,{children:_jsx(DescriptionEnumsBlock,{children:_jsxs("table",{className:"md",children:[_jsx("thead",{children:_jsxs("tr",{children:[_jsxs("th",{style:{width:"30%"},children:["array"===s?r("openapi.items","Items"):""," ",1===e.length?r("openapi.value","Value"):`${r("openapi.enum","Enum")} ${r("openapi.value","Value")}`]}),_jsx("th",{children:r("openapi.description","Description")})]})}),_jsx("tbody",{children:e.map((({description:e,value:t})=>_jsxs("tr",{children:[_jsx(EnumValueStyled,{children:t}),_jsx(DescriptionValueStyled,{children:_jsx(Markdown,{source:e})})]},t)))}),n?_jsx("tfoot",{children:_jsx("tr",{children:_jsx("td",{colSpan:2,children:_jsx(ToggleButton,{onClick:t,children:o})})})}):null]})})})}export const DescriptionEnums=memo(DescriptionEnumsComponent);
10
10
  //# sourceMappingURL=DescriptionEnums.js.map
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { EnumValuesProps } from './types';
3
2
  export declare const EnumValues: import("react").NamedExoticComponent<EnumValuesProps>;
@@ -1,2 +1,2 @@
1
- import{jsx as _jsx,Fragment as _Fragment}from"react/jsx-runtime";import{useState,memo,useCallback,useMemo}from"react";import{useAtomValue}from"jotai";import{SimpleEnums}from"./SimpleEnums";import{DescriptionEnums}from"./DescriptionEnums";import{globalOptionsAtom}from"../../jotai/store";function getEnums(e){return Array.isArray(e)&&e||Object.entries(e||{}).map((([e,t])=>({value:e,description:t})))}function EnumValuesComponent({values:e,type:t}){const[o,m]=useState(!0),{maxDisplayedEnumValues:n}=useAtomValue(globalOptionsAtom),s=useCallback((()=>{m(!o)}),[o]),r=!Array.isArray(e),u=getEnums(e),l=useMemo((()=>o&&n?u.slice(0,n):u),[u,o,n]);if(!u.length)return null;const a=!!n&&u.length>n,i=n?o?`+${u.length-n} more`:"Hide":"";return _jsx(_Fragment,{children:r?_jsx(DescriptionEnums,{enums:l,toggle:s,showToggleButton:a,toggleButtonText:i,type:t}):_jsx(SimpleEnums,{enums:l,type:t,toggle:s,toggleButtonText:i,showToggleButton:a})})}export const EnumValues=memo(EnumValuesComponent);
1
+ import{jsx as _jsx,Fragment as _Fragment}from"react/jsx-runtime";import{useState,memo,useCallback,useMemo}from"react";import{useAtomValue}from"jotai";import{SimpleEnums}from"./SimpleEnums";import{DescriptionEnums}from"./DescriptionEnums";import{globalOptionsAtom}from"../../jotai/store";import{useTranslate}from"../../hooks";function getEnums(e){return Array.isArray(e)&&e||Object.entries(e||{}).map((([e,t])=>({value:e,description:t})))}function EnumValuesComponent({values:e,type:t}){const o=useTranslate(),[s,n]=useState(!0),{maxDisplayedEnumValues:m}=useAtomValue(globalOptionsAtom),r=useCallback((()=>{n(!s)}),[s]),a=!Array.isArray(e),u=getEnums(e),i=useMemo((()=>s&&m?u.slice(0,m):u),[u,s,m]);if(!u.length)return null;const l=!!m&&u.length>m,p=m?s?`+${u.length-m} ${o("openapi.actions.more","more")}`:o("openapi.actions.hide","Hide"):"";return _jsx(_Fragment,{children:a?_jsx(DescriptionEnums,{enums:i,toggle:r,showToggleButton:l,toggleButtonText:p,type:t,translate:o}):_jsx(SimpleEnums,{enums:i,type:t,toggle:r,toggleButtonText:p,showToggleButton:l,translate:o})})}export const EnumValues=memo(EnumValuesComponent);
2
2
  //# sourceMappingURL=EnumValues.js.map
@@ -1,2 +1,2 @@
1
- import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";import{ExampleValue,FieldLabel}from"../common";import{normalizeText,serializeParameterValue}from"../../utils";import{ExampleWrap,ExamplesList,ExampleSummary,ExampleDescription}from"./styled";export function Examples({field:e}){return e.examples?_jsxs(_Fragment,{children:[_jsx(FieldLabel,{children:" Examples: "}),_jsx(ExamplesList,{children:Object.entries(e.examples).map((([r,a])=>{const l=normalizeText(a.description);return _jsxs(ExampleWrap,{children:[_jsxs(ExampleSummary,{children:[normalizeText(a.summary)||r," "]}),l&&_jsxs(ExampleDescription,{children:[l," "]}),_jsx(ExampleValue,{children:getSerializedValue(e,a.value)})]},r)}))})]}):null}export function getSerializedValue(e,r){return e.in?decodeURIComponent(serializeParameterValue(e,r)):r}
1
+ import{jsxs as _jsxs,jsx as _jsx,Fragment as _Fragment}from"react/jsx-runtime";import{ExampleValue,FieldLabel}from"../common";import{normalizeText,serializeParameterValue}from"../../utils";import{ExampleWrap,ExamplesList,ExampleSummary,ExampleDescription}from"./styled";import{useTranslate}from"../../hooks";export function Examples({field:e}){const a=useTranslate();return e.examples?_jsxs(_Fragment,{children:[_jsxs(FieldLabel,{children:[" ",a("openapi.examples","Examples"),": "]}),_jsx(ExamplesList,{children:Object.entries(e.examples).map((([a,r])=>{const l=normalizeText(r.description);return _jsxs(ExampleWrap,{children:[_jsxs(ExampleSummary,{children:[normalizeText(r.summary)||a," "]}),l&&_jsxs(ExampleDescription,{children:[l," "]}),_jsx(ExampleValue,{children:getSerializedValue(e,r.value)})]},a)}))})]}):null}export function getSerializedValue(e,a){return e.in?decodeURIComponent(serializeParameterValue(e,a)):a}
2
2
  //# sourceMappingURL=Examples.js.map
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { ExtensionsProps } from './types';
3
2
  export declare const Extensions: import("react").NamedExoticComponent<ExtensionsProps>;
@@ -1,7 +1,7 @@
1
- /// <reference types="react" />
2
1
  export interface FieldDetailProps {
3
2
  value?: any;
4
3
  label: string;
5
4
  raw?: boolean;
5
+ type?: 'default' | 'example' | 'other';
6
6
  }
7
7
  export declare const FieldDetail: import("react").NamedExoticComponent<FieldDetailProps>;
@@ -1,4 +1,4 @@
1
- import{jsxs as _jsxs,jsx as _jsx}from"react/jsx-runtime";import{memo}from"react";import styled from"styled-components";import{FieldLabel,DefaultValue,FieldValueLabel,ExpandableExample}from"../common";function FieldDetailComponent({value:e,label:l,raw:a}){if(void 0===e)return null;const i=a?String(e):JSON.stringify(e);return _jsxs(Wrapper,{children:[_jsxs(FieldLabel,{children:[" ",l," "]}),"Default"===l?_jsx(DefaultValue,{children:i}):"Example:"===l?_jsx(ExpandableExample,{value:i}):_jsx(FieldValueLabel,{children:i})]})}export const FieldDetail=memo(FieldDetailComponent);const Wrapper=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,DefaultValue,FieldValueLabel,ExpandableExample}from"../common";function FieldDetailComponent({value:e,label:l,raw:a,type:i="other"}){if(void 0===e)return null;const r=a?String(e):JSON.stringify(e);return _jsxs(Wrapper,{children:[_jsxs(FieldLabel,{children:[" ",l," "]}),"default"===i?_jsx(DefaultValue,{children:r}):"example"===i?_jsx(ExpandableExample,{value:r}):_jsx(FieldValueLabel,{children:r})]})}export const FieldDetail=memo(FieldDetailComponent);const Wrapper=styled.div`
2
2
  margin-top: var(--spacing-xxs);
3
3
  display: flex;
4
4
  align-items: baseline;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { FieldProps } from './types';
3
2
  export declare const FieldDetails: import("react").NamedExoticComponent<FieldProps>;
@@ -1,4 +1,4 @@
1
- import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";import{memo,useMemo}from"react";import{useAtomValue}from"jotai";import styled from"styled-components";import{LinkIcon}from"@redocly/theme";import{RecursiveLabel,Tag,AccessLabel,RequiredLabel,StyledBadge}from"../common";import{ExternalDocumentation}from"../ExternalDocumentation";import{Markdown}from"../Markdown";import{FieldDetail}from"./FieldDetail";import{Extensions}from"./Extensions";import{EnumValues}from"./EnumValues";import{Examples,getSerializedValue}from"./Examples";import{globalOptionsAtom}from"../../jotai/store";import{SchemaTypeInfo}from"./SchemaTypeInfo";import{LinkToField}from"../common/LinkToField";import{Pattern}from"./Pattern";import{getAccessModeLabelText}from"../RenderHook";function FieldDetailsComponent({field:e,renderDiscriminatorSwitch:t,deepLink:i,fieldParentsName:a=[]}){var o;const{hidePropertiesPrefix:r,hideSchemaTitles:s}=useAtomValue(globalOptionsAtom),{schema:n,description:l,example:m,deprecated:p,examples:c,kind:d,required:x,name:f}=e,h="header"===e.in,u=useMemo((()=>{if(void 0!==m||void 0!==c){if(void 0!==c)return _jsx(Examples,{field:e});{const t=!!e.in;return _jsx(FieldDetail,{label:"Example:",value:getSerializedValue(e,e.example),raw:t})}}return null}),[m,c,e]),y=getAccessModeLabelText(e.schema);return _jsxs(_Fragment,{children:[_jsxs(Row,{children:[f&&_jsxs(Name,{children:[i&&_jsx(LinkToField,{to:i}),!r&&a.map((e=>e+".")),_jsx(SchemaName,{className:"schema-name",children:f})]}),_jsx(SchemaTypeInfo,{type:n.typePrefix+n.displayType}),_jsx(SchemaTypeInfo,{type:n.displayFormat&&`(${n.displayFormat})`}),_jsx(SchemaTypeInfo,{type:n.contentEncoding}),_jsx(SchemaTypeInfo,{type:n.title&&!s?`(${n.title})`:""}),null===(o=n.constraints)||void 0===o?void 0:o.map((e=>_jsx(SchemaTypeInfo,{type:e},e))),p&&_jsx(StyledBadge,{deprecated:!0,children:"Deprecated"}),_jsx(Pattern,{pattern:n.pattern}),"additionalProperties"===d&&_jsx(Tag,{children:"additional property"}),"patternProperties"===d&&_jsx(Tag,{children:"pattern property"}),y&&_jsx(AccessLabel,{children:y}),x&&_jsx(RequiredLabel,{children:"required"}),n.isCircular&&_jsx(RecursiveLabel,{children:"Recursive"})]}),_jsx(StyledDescription,{source:l}),_jsx(FieldDetail,{raw:h,label:"Default",value:n.default}),_jsx(EnumValues,{type:n.type,values:n["x-enumDescriptions"]||n.enum}),u,_jsx(Extensions,{extensions:Object.assign(Object.assign({},e.extensions),n.extensions)}),n.externalDocs&&_jsx(ExternalDocumentation,{externalDocs:n.externalDocs,compact:!0}),null==t?void 0:t(),_jsx(FieldDetail,{label:"Value",value:e.const||void 0})]})}export const FieldDetails=memo(FieldDetailsComponent);const Row=styled.div`
1
+ import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";import{memo,useMemo}from"react";import{useAtomValue}from"jotai";import styled from"styled-components";import{LinkIcon}from"@redocly/theme";import{RecursiveLabel,Tag,AccessLabel,RequiredLabel,StyledBadge}from"../common";import{ExternalDocumentation}from"../ExternalDocumentation";import{Markdown}from"../Markdown";import{FieldDetail}from"./FieldDetail";import{Extensions}from"./Extensions";import{EnumValues}from"./EnumValues";import{Examples,getSerializedValue}from"./Examples";import{globalOptionsAtom}from"../../jotai/store";import{SchemaTypeInfo}from"./SchemaTypeInfo";import{LinkToField}from"../common/LinkToField";import{Pattern}from"./Pattern";import{getAccessModeLabelText}from"../RenderHook";import{useTranslate}from"../../hooks";function FieldDetailsComponent({field:e,renderDiscriminatorSwitch:a,deepLink:t,fieldParentsName:i=[]}){var o;const r=useTranslate(),{hidePropertiesPrefix:s,hideSchemaTitles:n}=useAtomValue(globalOptionsAtom),{schema:l,description:p,example:m,deprecated:d,examples:c,kind:x,required:f,name:u}=e,h="header"===e.in,y=useMemo((()=>{if(void 0!==m||void 0!==c){if(void 0!==c)return _jsx(Examples,{field:e});{const a=!!e.in;return _jsx(FieldDetail,{label:`${r("openapi.example","Example")}:`,value:getSerializedValue(e,e.example),raw:a})}}return null}),[m,c,e,r]),v=getAccessModeLabelText(e.schema);return _jsxs(_Fragment,{children:[_jsxs(Row,{children:[u&&_jsxs(Name,{children:[t&&_jsx(LinkToField,{to:t}),!s&&i.map((e=>e+".​")),_jsx(SchemaName,{className:"schema-name",children:u})]}),_jsx(SchemaTypeInfo,{type:l.typePrefix+l.displayType}),_jsx(SchemaTypeInfo,{type:l.displayFormat&&`(${l.displayFormat})`}),_jsx(SchemaTypeInfo,{type:l.contentEncoding}),_jsx(SchemaTypeInfo,{type:l.title&&!n?`(${l.title})`:""}),null===(o=l.constraints)||void 0===o?void 0:o.map((e=>_jsx(SchemaTypeInfo,{type:e},e))),d&&_jsx(StyledBadge,{deprecated:!0,children:r("openapi.badges.deprecated","Deprecated")}),_jsx(Pattern,{pattern:l.pattern}),"additionalProperties"===x&&_jsx(Tag,{children:r("openapi.additionalProperties","additional property")}),"patternProperties"===x&&_jsx(Tag,{children:r("openapi.patternProperties","pattern property")}),v&&_jsx(AccessLabel,{children:v}),f&&_jsx(RequiredLabel,{children:r("openapi.required","required")}),l.isCircular&&_jsx(RecursiveLabel,{children:r("openapi.recursive","Recursive")})]}),_jsx(StyledDescription,{source:p}),_jsx(FieldDetail,{raw:h,type:"default",label:r("openapi.default","Default"),value:l.default}),_jsx(EnumValues,{type:l.type,values:l["x-enumDescriptions"]||l.enum}),y,_jsx(Extensions,{extensions:Object.assign(Object.assign({},e.extensions),l.extensions)}),l.externalDocs&&_jsx(ExternalDocumentation,{externalDocs:l.externalDocs,compact:!0}),null==a?void 0:a(),_jsx(FieldDetail,{label:r("openapi.value","Value"),value:e.const||void 0})]})}export const FieldDetails=memo(FieldDetailsComponent);const Row=styled.div`
2
2
  display: flex;
3
3
  align-items: center;
4
4
  gap: calc(var(--spacing-xxs) / 4) var(--spacing-xxs);
@@ -19,8 +19,9 @@ import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";i
19
19
  font-size: var(--font-size-base);
20
20
  color: var(--text-color-description);
21
21
  max-width: 100%;
22
- display: flex;
23
- flex-wrap: wrap;
22
+ word-wrap: break-word;
23
+ overflow-wrap: break-word;
24
+ white-space: pre-wrap;
24
25
 
25
26
  :hover {
26
27
  ${LinkIcon} {
@@ -1,2 +1,2 @@
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}){const[e,n]=useState(!1);if(!t)return null;return _jsxs(_Fragment,{children:[_jsx(Tag,{children:e||t.length<MAX_PATTERN_LENGTH?t:`${t.slice(0,MAX_PATTERN_LENGTH)}...`}),t.length>MAX_PATTERN_LENGTH&&_jsx(ToggleButton,{onClick:()=>{n(!e)},children:e?"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";import{useTranslate}from"../../hooks";const MAX_PATTERN_LENGTH=45;export function Pattern({pattern:t}){const e=useTranslate(),[n,r]=useState(!1);if(!t)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?e("openapi.hidePattern","Hide pattern"):e("openapi.showPattern","Show pattern")})]})}
2
2
  //# sourceMappingURL=Pattern.js.map
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { FieldProps } from './types';
3
2
  export declare const PropertyDetails: import("react").NamedExoticComponent<FieldProps>;
@@ -1,4 +1,4 @@
1
1
  import type { ReactElement } from 'react';
2
2
  import type { SimpleEnumsProps } from './types';
3
- export declare function SimpleEnumsComponent({ enums, type, toggle, showToggleButton, toggleButtonText, }: SimpleEnumsProps): ReactElement;
3
+ export declare function SimpleEnumsComponent({ enums, type, toggle, showToggleButton, toggleButtonText, translate, }: SimpleEnumsProps): ReactElement;
4
4
  export declare const SimpleEnums: import("react").NamedExoticComponent<SimpleEnumsProps>;
@@ -1,4 +1,4 @@
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,type:o,toggle:t,showToggleButton:n,toggleButtonText:s}){return _jsxs(Row,{children:[_jsxs(FieldLabel,{children:["array"===o?"Items":""," ",1===e.length?"Value":"Enum"]}),e.map(((e,o)=>_jsx(Tag,{children:JSON.stringify(e)},e+o))),n?_jsx(ToggleButton,{onClick:t,children:s}):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,type:n,toggle:o,showToggleButton:t,toggleButtonText:s,translate:m}){return _jsxs(Row,{children:[_jsxs(FieldLabel,{children:["array"===n?m("openapi.items","Items"):""," ",1===e.length?m("openapi.value","Value"):m("openapi.enum","Enum")]}),e.map(((e,n)=>_jsx(Tag,{children:JSON.stringify(e)},e+n))),t?_jsx(ToggleButton,{onClick:o,children:s}):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,13 +1,4 @@
1
- /// <reference types="react" />
2
- export declare const DescriptionEnumsBlock: import("styled-components").StyledComponent<"main", any, {
3
- className?: string | undefined;
4
- compact?: boolean | undefined;
5
- inline?: boolean | undefined;
6
- base?: boolean | undefined;
7
- ref?: ((node: HTMLDivElement) => void) | undefined;
8
- } & {
9
- children?: import("react").ReactNode;
10
- }, never>;
1
+ export declare const DescriptionEnumsBlock: import("styled-components").StyledComponent<"main", any, import("@redocly/theme").MarkdownProps, never>;
11
2
  export declare const TypeWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
12
3
  export declare const ExampleDescription: import("styled-components").StyledComponent<"div", any, {}, never>;
13
4
  export declare const ExampleSummary: import("styled-components").StyledComponent<"label", any, {}, never>;
@@ -1,3 +1,4 @@
1
+ import type { TFunction } from '@redocly/theme';
1
2
  import type { ReactElement } from 'react';
2
3
  import type { SchemaOptions } from '../Schema';
3
4
  import type { FieldModel } from '../../models';
@@ -13,6 +14,7 @@ export interface SimpleEnumsProps {
13
14
  showToggleButton: boolean;
14
15
  toggleButtonText: string;
15
16
  type: string | string[];
17
+ translate: TFunction;
16
18
  }
17
19
  export type DescriptionEnumProp = Array<{
18
20
  value: string;
@@ -24,6 +26,7 @@ export interface DescriptionEnumsProps {
24
26
  showToggleButton: boolean;
25
27
  toggleButtonText: string;
26
28
  type: string | string[];
29
+ translate: TFunction;
27
30
  }
28
31
  export interface ExtensionsProps {
29
32
  extensions: {
@@ -1,2 +1,2 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,o,i){return new(o||(o=Promise))((function(n,r){function a(e){try{l(i.next(e))}catch(e){r(e)}}function s(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{cloneElement,isValidElement,memo,useCallback,useEffect,useMemo,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,loadSingle,useDeepCompareMemoize}from"./utils";import{argValueToBoolean,normalizeServers}from"../../utils";import{SchemaDefinition}from"../SchemaDefinition";import{appStore,appStoreOverrideAtom,environmentAtom,layoutAtom}from"../../jotai/app";import JotaiNexus from"../../jotai/nexus";import{mapObject}from"../../utils/object";import{mergeInMockServer}from"../../models/operation";import{getDefaultOperationStore,operationStore}from"../../jotai/operation";import{getServerEnvName}from"../../utils/environments";import{globalStoreAtom}from"../../jotai/store";export const AppProvider=({options:e,definitionUrl:t,definition:o,activeSampleLanguage:i,children:n})=>{const[,r]=useState(),[a,s]=useState(!0),[l,m]=useState(null);useEffect((()=>{!function(){__awaiter(this,void 0,void 0,(function*(){s(!0);try{m(yield loadSingle(o,t,e))}catch(e){r((()=>{throw e}))}}))}()}),[o,t,e]);const u=useMemo((()=>{var o,n,r;if(l)return(null===(o=null==e?void 0:e.unstable_hooks)||void 0===o?void 0:o.onInit)&&(null===(r=null===(n=e.unstable_hooks)||void 0===n?void 0:n.onInit)||void 0===r||r.call(n,{store:{definition:l,options:e,definitionUrl:t,activeSampleLanguage:i}})),{definition:l,options:e,definitionUrl:t,activeSampleLanguage:i}}),useDeepCompareMemoize([l,e,t]));return useEffect((()=>{u&&s(!1)}),[u]),u?a?argValueToBoolean(null==e?void 0:e.hideLoading,!1)?null:_jsx(Loading,{color:"--loading-spinner-color"}):isValidElement(n)?cloneElement(n,{store:u}):null:null};const DEFAULT_OPTIONS={ignoreNamedSchemas:["java.io.ObjectStreamField"],maxDisplayedEnumValues:10,markdocOptions:{tags:{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 o=e.transformAttributes(t),i=e.transformChildren(t),n="string"==typeof o.id?o.id:getMarkdownHeaderId(i);return new Tag("Heading",Object.assign(Object.assign({},o),{id:n,level:e.attributes.level}),i)}}},components:{SchemaDefinition:SchemaDefinition,Heading:markdoc.components.Heading}}};export const StoreProvider=memo((({children:e,options:t,definitionUrl:o,definition:i,withState:n})=>{const r=useCallback((()=>{const e=normalizeOptions(t,DEFAULT_OPTIONS);return{options:e,parser:new OpenAPIParser(i,o,e)}}),[i,o,t]),a=useMemo((()=>{var e;const t=createStore(),o=r();t.set(globalStoreAtom,o);const i=normalizeServers(o.parser.definitionUrl,mergeInMockServer((null===(e=o.parser.definition)||void 0===e?void 0:e.servers)||[],o.options.mockServer)),a=Object.fromEntries(i.map((e=>[getServerEnvName(e),Object.assign({server:e.url},mapObject(e.variables||{},(e=>e.default||"")))])));return t.sub(appStore,(()=>{})),t.set(environmentAtom,{environments:a}),n&&t.set(appStoreOverrideAtom,{environment:n.environment,environments:n.environments,activeMimeName:n.activeMimeName}),(null==n?void 0:n.operation)&&t.set(operationStore(n.operation.pointer),getDefaultOperationStore(n.operation.pointer,n.operation.state.requestValues)),t}),[r,n]);return useEffect((()=>{(null==n?void 0:n.layout)&&a.set(layoutAtom,null==n?void 0:n.layout)}),[a,null==n?void 0:n.layout]),_jsxs(Provider,{store:a,children:[_jsx(JotaiNexus,{}),e]})}));
1
+ var __awaiter=this&&this.__awaiter||function(e,t,o,i){return new(o||(o=Promise))((function(n,r){function a(e){try{l(i.next(e))}catch(e){r(e)}}function s(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{cloneElement,isValidElement,memo,useCallback,useEffect,useMemo,useState}from"react";import{Tag}from"@markdoc/markdoc";import{LayoutVariant,Loading,markdoc}from"@redocly/theme";import{createStore,Provider}from"jotai";import{normalizeOptions,OpenAPIParser}from"../../services";import{getMarkdownHeaderId,loadSingle,useDeepCompareMemoize}from"./utils";import{argValueToBoolean,normalizeServers}from"../../utils";import{SchemaDefinition}from"../SchemaDefinition";import{appStore,appStoreOverrideAtom,environmentAtom,layoutAtom}from"../../jotai/app";import JotaiNexus from"../../jotai/nexus";import{mapObject}from"../../utils/object";import{mergeInMockServer}from"../../models/operation";import{getDefaultOperationStore,operationStore}from"../../jotai/operation";import{getServerEnvName}from"../../utils/environments";import{globalStoreAtom}from"../../jotai/store";export const AppProvider=({options:e,definitionUrl:t,definition:o,activeSampleLanguage:i,children:n})=>{const[,r]=useState(),[a,s]=useState(!0),[l,m]=useState(null);useEffect((()=>{!function(){__awaiter(this,void 0,void 0,(function*(){s(!0);try{m(yield loadSingle(o,t,e))}catch(e){r((()=>{throw e}))}}))}()}),[o,t,e]);const u=useMemo((()=>{var o,n,r;if(l)return(null===(o=null==e?void 0:e.unstable_hooks)||void 0===o?void 0:o.onInit)&&(null===(r=null===(n=e.unstable_hooks)||void 0===n?void 0:n.onInit)||void 0===r||r.call(n,{store:{definition:l,options:e,definitionUrl:t,activeSampleLanguage:i}})),{definition:l,options:e,definitionUrl:t,activeSampleLanguage:i}}),useDeepCompareMemoize([l,e,t]));return useEffect((()=>{u&&s(!1)}),[u]),u?a?argValueToBoolean(null==e?void 0:e.hideLoading,!1)?null:_jsx(Loading,{color:"--loading-spinner-color"}):isValidElement(n)?cloneElement(n,{store:u}):null:null};const DEFAULT_OPTIONS={ignoreNamedSchemas:["java.io.ObjectStreamField"],maxDisplayedEnumValues:10,markdocOptions:{tags:{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 o=e.transformAttributes(t),i=e.transformChildren(t),n="string"==typeof o.id?o.id:getMarkdownHeaderId(i);return new Tag("Heading",Object.assign(Object.assign({},o),{id:n,level:e.attributes.level}),i)}}},components:{SchemaDefinition:SchemaDefinition,Heading:markdoc.components.Heading}}};export const StoreProvider=memo((({children:e,options:t,definitionUrl:o,definition:i,withState:n})=>{const r=useCallback((()=>{const e=normalizeOptions(t,DEFAULT_OPTIONS);return{options:e,parser:new OpenAPIParser(i,o,e)}}),[i,o,t]),a=useMemo((()=>{var e,t;const o=createStore(),i=r();o.set(globalStoreAtom,i);const a=normalizeServers(i.parser.definitionUrl,mergeInMockServer((null===(e=i.parser.definition)||void 0===e?void 0:e.servers)||[],i.options.mockServer)),s=Object.fromEntries(a.map((e=>[getServerEnvName(e),Object.assign({server:e.url},mapObject(e.variables||{},(e=>e.default||"")))])));return o.sub(appStore,(()=>{})),o.set(layoutAtom,(null===(t=i.options)||void 0===t?void 0:t.layout)||LayoutVariant.THREE_PANEL),o.set(environmentAtom,{environments:s}),n&&o.set(appStoreOverrideAtom,{environment:n.environment,environments:n.environments,activeMimeName:n.activeMimeName}),(null==n?void 0:n.operation)&&o.set(operationStore(n.operation.pointer),getDefaultOperationStore(n.operation.pointer,n.operation.state.requestValues)),o}),[r,n]);return useEffect((()=>{(null==n?void 0:n.layout)&&a.set(layoutAtom,null==n?void 0:n.layout)}),[a,null==n?void 0:n.layout]),_jsxs(Provider,{store:a,children:[_jsx(JotaiNexus,{}),e]})}));
2
2
  //# sourceMappingURL=Providers.js.map
@@ -1,2 +1,2 @@
1
- import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";import{useRef,memo}from"react";import{SidebarLogo,GlobalStyle as ThemeCommonStyle,useMount,LayoutVariant,ThreePanelLayout}from"@redocly/theme";import{UnsupportedFeatureScreen}from"../UnsupportedFeatureScreen";import{AppProvider,StoreProvider}from"./Providers";import{Overlay}from"../Overlay";import{RedocWrap,CssFixes}from"./styled";import{StickyResponsiveSidebar}from"../StickySidebar";import{SideMenu}from"../SideMenu";import{Content}from"../Content";import{useContentItems,useUppercase2LowercaseRedirect}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:i,layout:n,collapsedSidebar:r,parser:s,withCommonStyles:a})=>{var l,d,c,m,u;const p=useRef(null),{isValid:v,licenseInfo:f}=useLicense(e);useUppercase2LowercaseRedirect(),useMount((()=>{null==o||o()}));const{hideSidebar:h,scrollYOffset:S}=i||{},{contentItems:y}=useContentItems({parser:s,options:i}),x=null===(d=null===(l=s.definition)||void 0===l?void 0:l.info)||void 0===d?void 0:d["x-logo"];return _jsxs(_Fragment,{children:[a&&_jsx(ThemeCommonStyle,{}),_jsxs(RedocWrap,{className:"redoc-wrap",ref:p,children:[_jsx(UnsupportedFeatureScreen,{}),!v&&_jsx(Overlay,{licenseInfo:f}),_jsx(CssFixes,{layout:n}),!h&&_jsxs(StickyResponsiveSidebar,{scrollYOffset:S,className:"menu-content",collapsedSidebar:!r,children:[_jsx(SidebarLogo,{imageUrl:null==x?void 0:x.url,href:(null==x?void 0:x.href)||(null===(u=null===(m=null===(c=s.definition)||void 0===c?void 0:c.info)||void 0===m?void 0:m.contact)||void 0===u?void 0:u.url),altText:null==x?void 0:x.altText,backgroundColor:null==x?void 0:x.backgroundColor}),_jsx(SideMenu,{items:v?y:[]})]}),_jsxs(ThreePanelLayout,{className:"api-content",id:"api-content",layout:n===LayoutVariant.THREE_PANEL?LayoutVariant.THREE_PANEL:LayoutVariant.STACKED,collapsedSidebar:r,children:[_jsx(Content,{items:v?y:[],routingBasePath:i.routingBasePath}),t]})]})]})}));export function RedoclyOpenAPIDocs({onLoaded:e,children:o,store:t,withCommonStyles:i}){var n,r,s;return(null==t?void 0:t.definition)?_jsx(StoreProvider,Object.assign({},t,{children:_jsx(RedoclyOpenAPIDocsComponent,{onLoaded:e,basePath:null===(n=t.options)||void 0===n?void 0:n.routingBasePath,licenseKey:null===(r=t.options)||void 0===r?void 0:r.licenseKey,disableRouter:null===(s=t.options)||void 0===s?void 0:s.disableRouter,withCommonStyles:i,children:o})})):null}export function RedoclyOpenAPIDocsStandalone({definition:e,definitionUrl:o,options:t={},activeItemId:i,activeSampleLanguage:n,activeDeepLink:r}){return _jsx(AppProvider,{definition:e,definitionUrl:o,options:t,activeItemId:i,activeSampleLanguage:n,activeDeepLink:r,children:_jsx(RedoclyOpenAPIDocs,{withCommonStyles:!0})})}
1
+ import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";import{memo,useRef}from"react";import{GlobalStyle as ThemeCommonStyle,LayoutVariant,SidebarLogo,ThreePanelLayout,useMount}from"@redocly/theme";import{AppProvider,StoreProvider}from"./Providers";import{Overlay}from"../Overlay";import{RedocWrap}from"./styled";import{StickyResponsiveSidebar}from"../StickySidebar";import{SideMenu}from"../SideMenu";import{Content}from"../Content";import{useContentItems,useUppercase2LowercaseRedirect}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,layout:n,collapsedSidebar:r,parser:s,withCommonStyles:l})=>{var a,d,c,m,u;const p=useRef(null),{isValid:v,licenseInfo:f}=useLicense(e);useUppercase2LowercaseRedirect(),useMount((()=>{null==o||o()}));const{hideSidebar:h,scrollYOffset:y}=t||{},{contentItems:S}=useContentItems({parser:s,options:t}),x=null===(d=null===(a=s.definition)||void 0===a?void 0:a.info)||void 0===d?void 0:d["x-logo"];return _jsxs(_Fragment,{children:[l&&_jsx(ThemeCommonStyle,{}),_jsxs(RedocWrap,{className:"redoc-wrap",ref:p,children:[!v&&_jsx(Overlay,{licenseInfo:f}),!h&&_jsxs(StickyResponsiveSidebar,{scrollYOffset:y,className:"menu-content",collapsedSidebar:!r,children:[_jsx(SidebarLogo,{imageUrl:null==x?void 0:x.url,href:(null==x?void 0:x.href)||(null===(u=null===(m=null===(c=s.definition)||void 0===c?void 0:c.info)||void 0===m?void 0:m.contact)||void 0===u?void 0:u.url),altText:null==x?void 0:x.altText,backgroundColor:null==x?void 0:x.backgroundColor}),_jsx(SideMenu,{items:v?S:[]})]}),_jsxs(ThreePanelLayout,{className:"api-content",id:"api-content",layout:n===LayoutVariant.THREE_PANEL?LayoutVariant.THREE_PANEL:LayoutVariant.STACKED,collapsedSidebar:r,children:[_jsx(Content,{items:v?S:[],routingBasePath:t.routingBasePath}),i]})]})]})}));export function RedoclyOpenAPIDocs({onLoaded:e,children:o,store:i,withCommonStyles:t}){var n,r,s;return(null==i?void 0:i.definition)?_jsx(StoreProvider,Object.assign({},i,{children:_jsx(RedoclyOpenAPIDocsComponent,{onLoaded:e,basePath:null===(n=i.options)||void 0===n?void 0:n.routingBasePath,licenseKey:null===(r=i.options)||void 0===r?void 0:r.licenseKey,disableRouter:null===(s=i.options)||void 0===s?void 0:s.disableRouter,withCommonStyles:t,children:o})})):null}export function RedoclyOpenAPIDocsStandalone({definition:e,definitionUrl:o,options:i={},activeItemId:t,activeSampleLanguage:n,activeDeepLink:r}){return _jsx(AppProvider,{definition:e,definitionUrl:o,options:i,activeItemId:t,activeSampleLanguage:n,activeDeepLink:r,children:_jsx(RedoclyOpenAPIDocs,{withCommonStyles:!0})})}
2
2
  //# sourceMappingURL=RedoclyOpenAPIDocs.js.map
@@ -1,5 +1 @@
1
- import type { FlattenSimpleInterpolation } from 'styled-components';
2
- import type { CssFixesProps } from './types';
3
1
  export declare const RedocWrap: import("styled-components").StyledComponent<"div", any, {}, never>;
4
- export declare const getMarginFixesByName: (variableName: string) => FlattenSimpleInterpolation;
5
- export declare const CssFixes: import("styled-components").GlobalStyleComponent<CssFixesProps, import("styled-components").DefaultTheme>;
@@ -1,4 +1,4 @@
1
- import{breakpoints,LayoutVariant}from"@redocly/theme";import styled,{createGlobalStyle,css}from"styled-components";import{SamplesMiddlePanel,SamplesPanel}from"../common";export const RedocWrap=styled.div`
1
+ import styled from"styled-components";export const RedocWrap=styled.div`
2
2
  display: flex;
3
3
  position: relative;
4
4
  text-align: left;
@@ -18,34 +18,5 @@ import{breakpoints,LayoutVariant}from"@redocly/theme";import styled,{createGloba
18
18
  box-sizing: border-box;
19
19
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
20
20
  }
21
- `;export const getMarginFixesByName=a=>css`
22
- margin: 0 max(calc((100% - var(--panel-samples-width) - var(${a})) / 2), 0);
23
- `;export const CssFixes=createGlobalStyle`
24
- ${SamplesPanel} {
25
- ${({layout:a})=>{if(a===LayoutVariant.STACKED)return css`
26
- width: 100%;
27
- padding-left: var(--panel-gap-horizontal);
28
- `}}
29
- }
30
-
31
- ${SamplesMiddlePanel} {
32
- ${({layout:a})=>a===LayoutVariant.THREE_PANEL?css`
33
- margin: 0;
34
- @media screen and (min-width: ${breakpoints.small}) {
35
- ${getMarginFixesByName("--layout-panel-schemas-small-max-width")};
36
- }
37
- @media screen and (min-width: ${breakpoints.medium}) {
38
- max-width: var(--layout-panel-schemas-medium-max-width);
39
- ${getMarginFixesByName("--layout-panel-schemas-medium-max-width")};
40
- }
41
- @media screen and (min-width: ${breakpoints.large}) {
42
- max-width: var(--layout-panel-schemas-large-max-width);
43
- ${getMarginFixesByName("--layout-panel-schemas-large-max-width")};
44
- }
45
- `:a===LayoutVariant.STACKED?css`
46
- width: 100%;
47
- padding-right: var(--panel-gap-horizontal);
48
- `:void 0};
49
- }
50
21
  `;
51
22
  //# sourceMappingURL=styled.js.map
@@ -44,6 +44,3 @@ export interface RedoclyOpenAPIDocsStandaloneProps {
44
44
  activeSampleLanguage?: CodeSampleConfig['lang'];
45
45
  activeDeepLink?: string;
46
46
  }
47
- export interface CssFixesProps {
48
- layout: LayoutVariant;
49
- }
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { OpenAPIDefinition } from '../../types';
3
2
  import type { OperationModel } from '../../models';
4
3
  export type ReplayProps = {
@@ -1,4 +1,4 @@
1
- var __awaiter=this&&this.__awaiter||function(e,o,r,t){return new(r||(r=Promise))((function(n,a){function i(e){try{l(t.next(e))}catch(e){a(e)}}function p(e){try{l(t.throw(e))}catch(e){a(e)}}function l(e){var o;e.done?n(e.value):(o=e.value,o instanceof r?o:new r((function(e){e(o)}))).then(i,p)}l((t=t.apply(e,o||[])).next())}))};import{jsx as _jsx}from"react/jsx-runtime";import{Suspense,memo,useEffect,useState,lazy}from"react";import styled from"styled-components";import{useAtomValue}from"jotai";import{convertOperationToReplayValue}from"./utils";import{globalOptionsAtom}from"../../jotai/store";import{operationStore}from"../../jotai/operation";import{appStore,environmentsAtom}from"../../jotai/app";const EmbeddedReplayOrig=lazy((()=>__awaiter(void 0,void 0,void 0,(function*(){return import("@redocly/replay").then((e=>({default:e.EmbeddedReplay})))}))));function EmbeddedReplayComponent({operation:e,corsProxyUrl:o,fullOpenApi:r}){const{routingBasePath:t,mockServer:n}=useAtomValue(globalOptionsAtom),a=useAtomValue(operationStore(e.pointer)),i=useAtomValue(appStore),p=useAtomValue(environmentsAtom),[l,s]=useState(!1);return useEffect((()=>{s(!0)}),[]),_jsx(CompactWrapper,{children:l?_jsx(Suspense,{fallback:_jsx(LoadingWrapper,{children:"Loading..."}),children:_jsx(EmbeddedReplayOrig,{value:convertOperationToReplayValue(e,r,a,i),environment:i.environment,predefinedEnvValues:p,corsProxyUrl:o,operationUrl:t+e.href,mockServer:n,disableCollectionsTab:!0})}):_jsx(LoadingWrapper,{children:"Loading..."})})}export const EmbeddedReplay=memo(EmbeddedReplayComponent);const LoadingWrapper=styled.div`
1
+ var __awaiter=this&&this.__awaiter||function(e,o,r,t){return new(r||(r=Promise))((function(n,a){function i(e){try{l(t.next(e))}catch(e){a(e)}}function p(e){try{l(t.throw(e))}catch(e){a(e)}}function l(e){var o;e.done?n(e.value):(o=e.value,o instanceof r?o:new r((function(e){e(o)}))).then(i,p)}l((t=t.apply(e,o||[])).next())}))};import{jsx as _jsx}from"react/jsx-runtime";import{Suspense,memo,useEffect,useState,lazy}from"react";import styled from"styled-components";import{useAtomValue}from"jotai";import{convertOperationToReplayValue}from"./utils";import{globalOptionsAtom}from"../../jotai/store";import{operationStore}from"../../jotai/operation";import{appStore,environmentsAtom}from"../../jotai/app";import{useTranslate}from"../../hooks";const EmbeddedReplayOrig=lazy((()=>__awaiter(void 0,void 0,void 0,(function*(){return import("@redocly/replay").then((e=>({default:e.EmbeddedReplay})))}))));function EmbeddedReplayComponent({operation:e,corsProxyUrl:o,fullOpenApi:r}){const t=useTranslate(),{routingBasePath:n,mockServer:a}=useAtomValue(globalOptionsAtom),i=useAtomValue(operationStore(e.pointer)),p=useAtomValue(appStore),l=useAtomValue(environmentsAtom),[s,d]=useState(!1);return useEffect((()=>{d(!0)}),[]),_jsx(CompactWrapper,{children:s?_jsx(Suspense,{fallback:_jsx(LoadingWrapper,{children:t("openapi.loading","Loading...")}),children:_jsx(EmbeddedReplayOrig,{value:convertOperationToReplayValue(e,r,i,p),environment:p.environment,predefinedEnvValues:l,corsProxyUrl:o,operationUrl:n+e.href,mockServer:a,disableCollectionsTab:!0})}):_jsx(LoadingWrapper,{children:t("openapi.loading","Loading...")})})}export const EmbeddedReplay=memo(EmbeddedReplayComponent);const LoadingWrapper=styled.div`
2
2
  display: flex;
3
3
  justify-content: center;
4
4
  align-items: center;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { OperationModel } from '../../models';
3
2
  import type { OpenAPIDefinition } from '../../types';
4
3
  type ReplayProps = {
@@ -1,14 +1,7 @@
1
- var __awaiter=this&&this.__awaiter||function(e,o,t,r){return new(t||(t=Promise))((function(n,a){function i(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var o;e.done?n(e.value):(o=e.value,o instanceof t?o:new t((function(e){e(o)}))).then(i,s)}l((r=r.apply(e,o||[])).next())}))};import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{Suspense,memo,useCallback,useState,useRef,lazy}from"react";import{Button,RocketIcon,CircleDashIcon,Portal,useFocusTrap,useModalScrollLock}from"@redocly/theme";import styled from"styled-components";import{useAtom,useAtomValue,useSetAtom}from"jotai";const ReplayOverlay=lazy((()=>__awaiter(void 0,void 0,void 0,(function*(){return import("@redocly/replay").then((e=>({default:e.ReplayOverlay})))}))));import{globalOptionsAtom,globalStoreAtom}from"../../jotai/store";import{replayStateAtom}from"../../jotai/replay";import{operationStore}from"../../jotai/operation";import{LOADING_STATE}from"../../constants";import{activeMimeNameAtom,unsupportedFeatureScreenAtom,environmentAtom}from"../../jotai/app";import{isMobile}from"../../utils";import{convertOperationToReplayValue}from"./utils";function ReplayComponent({operation:e,corsProxyUrl:o,fullOpenApi:t}){var r,n;const a=useRef(null),{routingBasePath:i,mockServer:s,oAuth2RedirectURI:l}=useAtomValue(globalOptionsAtom),{parser:m}=useAtomValue(globalStoreAtom),[c,p]=useState(!1),[u,d]=useAtom(replayStateAtom),[,A]=useAtom(unsupportedFeatureScreenAtom),v=useSetAtom(operationStore(e.pointer)),[f,y]=useAtom(activeMimeNameAtom),[[,S],h]=useAtom(environmentAtom);useFocusTrap(a),useModalScrollLock(c);const x=useCallback((({requestValues:e,activeExampleName:o,activeMimeName:t,environment:r,environments:n,activeSecuritySchemeIds:a})=>{v((t=>Object.assign(Object.assign({},t),{requestValues:e,activeExampleName:o,activeSecuritySchemeIds:a}))),y(t||f),h({environment:r,environments:n})}),[v,y,f,h]),_=()=>{isMobile({tablet:!0})?A(!0):(u!==LOADING_STATE.LOADING&&p(!c),u===LOADING_STATE.NOT_LOADED&&d(LOADING_STATE.LOADING))};return _jsxs(Wrapper,{children:[_jsx("span",{children:"Experience it firsthand in the API Explorer!"}),_jsx(Button,{onClick:_,variant:"primary",iconPosition:"left",icon:u===LOADING_STATE.LOADING?_jsx(CircleDashIcon,{}):_jsx(RocketIcon,{}),children:u===LOADING_STATE.LOADING?"Loading...":"Try it"}),c&&_jsx(Suspense,{children:_jsx(Portal,{mountId:"api-content",children:_jsx("div",{ref:a,children:_jsx(ReplayOverlay,{value:convertOperationToReplayValue(e,t),onRequestChange:x,onClose:_,corsProxyUrl:o,operationUrl:i+e.href,onLoad:()=>d(LOADING_STATE.LOADED),mockServer:s,environment:S,apiId:null===(n=null===(r=null==m?void 0:m.definition.info)||void 0===r?void 0:r["x-metadata"])||void 0===n?void 0:n.apiId,oAuth2RedirectURI:l,definitionUrl:null==m?void 0:m.definitionUrl,disableCollectionsTab:!0})})})})]})}export const Replay=memo(ReplayComponent);const Wrapper=styled.div`
1
+ var __awaiter=this&&this.__awaiter||function(e,o,t,a){return new(t||(t=Promise))((function(r,n){function i(e){try{l(a.next(e))}catch(e){n(e)}}function s(e){try{l(a.throw(e))}catch(e){n(e)}}function l(e){var o;e.done?r(e.value):(o=e.value,o instanceof t?o:new t((function(e){e(o)}))).then(i,s)}l((a=a.apply(e,o||[])).next())}))};import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{memo,Suspense,useCallback,useRef,useState,lazy}from"react";import{Button,CircleDashIcon,Portal,RocketIcon,useFocusTrap,useModalScrollLock}from"@redocly/theme";import styled from"styled-components";import{useAtom,useAtomValue,useSetAtom}from"jotai";const ReplayOverlay=lazy((()=>__awaiter(void 0,void 0,void 0,(function*(){return import("@redocly/replay").then((e=>({default:e.ReplayOverlay})))}))));import{globalOptionsAtom,globalStoreAtom}from"../../jotai/store";import{replayStateAtom}from"../../jotai/replay";import{operationStore}from"../../jotai/operation";import{LOADING_STATE}from"../../constants";import{activeMimeNameAtom,environmentAtom}from"../../jotai/app";import{convertOperationToReplayValue}from"./utils";import{useTranslate}from"../../hooks";function ReplayComponent({operation:e,corsProxyUrl:o,fullOpenApi:t}){var a,r;const n=useTranslate(),i=useRef(null),{routingBasePath:s,mockServer:l,oAuth2RedirectURI:m}=useAtomValue(globalOptionsAtom),{parser:c}=useAtomValue(globalStoreAtom),[p,u]=useState(!1),[d,v]=useAtom(replayStateAtom),A=useSetAtom(operationStore(e.pointer)),[f,y]=useAtom(activeMimeNameAtom),[[,S],O]=useAtom(environmentAtom);useFocusTrap(i),useModalScrollLock(p);const _=useCallback((({requestValues:e,activeExampleName:o,activeMimeName:t,environment:a,environments:r,activeSecuritySchemeIds:n})=>{A((t=>Object.assign(Object.assign({},t),{requestValues:e,activeExampleName:o,activeSecuritySchemeIds:n}))),y(t||f),O({environment:a,environments:r})}),[A,y,f,O]),h=()=>{d!==LOADING_STATE.LOADING&&u(!p),d===LOADING_STATE.NOT_LOADED&&v(LOADING_STATE.LOADING)};return _jsxs(Wrapper,{children:[_jsx(Button,{onClick:h,variant:"primary",iconPosition:"left",icon:d===LOADING_STATE.LOADING?_jsx(CircleDashIcon,{}):_jsx(RocketIcon,{}),children:d===LOADING_STATE.LOADING?n("openapi.loading","Loading..."):n("openapi.tryIt","Try it")}),p&&_jsx(Suspense,{children:_jsx(Portal,{mountId:"api-content",children:_jsx("div",{ref:i,children:_jsx(ReplayOverlay,{value:convertOperationToReplayValue(e,t),onRequestChange:_,onClose:h,corsProxyUrl:o,operationUrl:s+e.href,onLoad:()=>v(LOADING_STATE.LOADED),mockServer:l,environment:S,apiId:null===(r=null===(a=null==c?void 0:c.definition.info)||void 0===a?void 0:a["x-metadata"])||void 0===r?void 0:r.apiId,oAuth2RedirectURI:m,definitionUrl:null==c?void 0:c.definitionUrl,disableCollectionsTab:!0})})})})]})}export const Replay=memo(ReplayComponent);const Wrapper=styled.div`
2
2
  display: flex;
3
- justify-content: space-between;
4
- align-items: center;
5
- gap: 10px;
3
+ justify-content: flex-end;
6
4
  border-top: var(--panel-border);
7
5
  padding: var(--spacing-base) var(--spacing-md) var(--spacing-md);
8
-
9
- & > span {
10
- font-weight: var(--font-weight-regular);
11
- color: var(--text-color-primary);
12
- }
13
6
  `;
14
7
  //# sourceMappingURL=Replay.js.map
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { RequestProps } from './types';
3
2
  export declare const RequestDetails: import("react").NamedExoticComponent<RequestProps>;
@@ -1,4 +1,4 @@
1
- import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";import{memo}from"react";import styled from"styled-components";import{Row}from"../common";import{Title}from"../common/OperationItemTitle";import{LinkToField}from"../common/LinkToField";import{makeDeepLink}from"../../services";import{Description}from"../OperationItem/Description";import{Security}from"../Security";import{ExpandAllButton,useUpdateExpandedFields}from"../ExpandAllButton";import{RequestParameters}from"../RequestParameters";function RequestDetailsComponent({operation:{id:e,description:t,externalDocs:o,parameters:r,requestBody:i,pointer:s,security:n,extensions:m,callbackId:a},title:p}){return useUpdateExpandedFields("request",r,null==i?void 0:i.content,s),_jsxs(_Fragment,{children:[_jsx(Row,{children:_jsxs(HeadingWrapper,{children:[_jsxs(Title,{children:[e&&_jsx(LinkToField,{to:makeDeepLink(e,"request")}),p||"Request",_jsx(ExpandAllButton,{operationPointer:s,type:"request"})]}),_jsx(Description,{description:t||o?t:void 0,externalDocs:o,extensions:m}),_jsx(Security,{securities:n})]})}),_jsx(RequestParameters,{parameters:r,body:i,operationId:e,callbackId:a})]})}const HeadingWrapper=styled.div`
1
+ import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";import{memo}from"react";import styled from"styled-components";import{Row}from"../common";import{Title}from"../common/OperationItemTitle";import{LinkToField}from"../common/LinkToField";import{makeDeepLink}from"../../services";import{Description}from"../OperationItem/Description";import{Security}from"../Security";import{ExpandAllButton,useUpdateExpandedFields}from"../ExpandAllButton";import{RequestParameters}from"../RequestParameters";function RequestDetailsComponent({operation:{id:e,description:t,externalDocs:o,parameters:r,requestBody:i,pointer:s,security:n,extensions:a,callbackId:m},title:p,translate:d}){return useUpdateExpandedFields("request",r,null==i?void 0:i.content,s),_jsxs(_Fragment,{children:[_jsx(Row,{children:_jsxs(HeadingWrapper,{children:[_jsxs(Title,{children:[e&&_jsx(LinkToField,{to:makeDeepLink(e,"request")}),p||(null==d?void 0:d("openapi.request","Request")),_jsx(ExpandAllButton,{operationPointer:s,type:"request"})]}),_jsx(Description,{description:t||o?t:void 0,externalDocs:o,extensions:a}),_jsx(Security,{securities:n})]})}),_jsx(RequestParameters,{parameters:r,body:i,operationId:e,callbackId:m})]})}const HeadingWrapper=styled.div`
2
2
  width: 100%;
3
3
  `;export const RequestDetails=memo(RequestDetailsComponent);
4
4
  //# sourceMappingURL=RequestDetails.js.map
@@ -1,6 +1,8 @@
1
+ import type { TFunction } from '@redocly/theme';
1
2
  import type { ReactNode } from 'react';
2
3
  import type { OperationModel } from '../../models';
3
4
  export interface RequestProps {
4
5
  operation: Pick<OperationModel, 'security' | 'pointer' | 'description' | 'externalDocs' | 'extensions' | 'parameters' | 'requestBody' | 'id' | 'callbackId'>;
5
6
  title?: string | ReactNode;
7
+ translate?: TFunction;
6
8
  }
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { MediaContentModel } from '../../models';
3
2
  interface BodyContentProps {
4
3
  content: MediaContentModel;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { FieldModel } from '../../models';
3
2
  interface ParametersGroupProps {
4
3
  title: string;
@@ -1,2 +1,2 @@
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,callbackId:n}){if(!e&&!r.length)return null;const s=(e=>{const r={};return e.forEach((e=>{safePush(r,e.in,e)})),r})(r),a=r.length>0?PARAM_PLACES:[],{content:o,description:i,required:A}=e||{};return _jsxs(_Fragment,{children:[a.map((e=>_jsx(ParametersGroup,{title:PARAM_NAMES_MAP[e],parameters:s[e],deepLink:generateDeepLink(t,n,e)},e))),o&&_jsx(Body,{content:o,description:i,required:A,deepLink:generateDeepLink(t,n)})]})}function safePush(e,r="",t){e[r]||(e[r]=[]),e[r].push(t)}function generateDeepLink(e,r,t="body"){return makeDeepLink(e,""+(r?`${r}/request/${t}`:`request/${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";import{useTranslate}from"../../hooks";const PARAM_PLACES=["path","query","cookie","header"];export function RequestParameters({body:e,parameters:r=[],operationId:t,callbackId:n}){const a=useTranslate();if(!e&&!r.length)return null;const o={[PARAM_PLACES[0]]:a("openapi.path","Path"),[PARAM_PLACES[1]]:a("openapi.query","Query"),[PARAM_PLACES[2]]:a("openapi.cookie","Cookies"),[PARAM_PLACES[3]]:a("openapi.header","Headers")},s=(e=>{const r={};return e.forEach((e=>{safePush(r,e.in,e)})),r})(r),i=r.length>0?PARAM_PLACES:[],{content:p,description:u,required:m}=e||{};return _jsxs(_Fragment,{children:[i.map((e=>_jsx(ParametersGroup,{title:o[e],parameters:s[e],deepLink:generateDeepLink(t,n,e)},e))),p&&_jsx(Body,{content:p,description:u,required:m,deepLink:generateDeepLink(t,n)})]})}function safePush(e,r="",t){e[r]||(e[r]=[]),e[r].push(t)}function generateDeepLink(e,r,t="body"){return makeDeepLink(e,""+(r?`${r}/request/${t}`:`request/${t}`))}
2
2
  //# sourceMappingURL=RequestParameters.js.map
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { OperationModel } from '../../models';
3
2
  import type { Unstable_ExternalCodeSample } from '../../services';
4
3
  import type { ExampleSwitchOptions } from '../Samples';
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { OperationModel } from '../../models';
3
2
  interface RequestSamplesProps {
4
3
  operation: OperationModel;
@@ -1,2 +1,2 @@
1
- import{useAtomValue}from"jotai";import{getCodeSample}from"../../services";import{globalStoreAtom}from"../../jotai/store";import{operationStore}from"../../jotai/operation";import{environmentAtom,getLangKey,languageAtom}from"../../jotai/app";export function useCodeSamples({payload:e,isWebhook:a,definitionSamples:t,pointer:o}){var n;const{parser:r,options:{codeSamples:l,generatedSamplesMaxDepth:s}}=useAtomValue(globalStoreAtom),i=useAtomValue(operationStore(o)),{languages:g}=useAtomValue(languageAtom),[m]=useAtomValue(environmentAtom),p=new Map(null==g?void 0:g.map((({key:e,order:a})=>[e,a]))),u=t.filter((e=>p.has(getLangKey(e)))),d=new Set(u.map(getLangKey));let c=[];if(!a){c=createCodeSamples((null===(n=l.languages)||void 0===n?void 0:n.filter((({lang:e,label:a})=>"Payload"!==e&&!d.has(getLangKey({lang:e,label:a})))))||[],l,r.definition,s,i,m)}const b=[...u,...c];e&&p.has(e.lang.toLowerCase())&&b.push(Object.assign(Object.assign({},e),{order:p.get(e.lang.toLowerCase())}));const S=b.map((e=>{var a;const t=null!==(a=e.label)&&void 0!==a?a:e.lang;return Object.assign({key:getLangKey(e),title:t,order:"number"==typeof p.get(t.toLowerCase())?p.get(t.toLowerCase()):9999},e)})).sort(((e,a)=>e.order-a.order));return{samples:S}}function createCodeSamples(e,{skipOptionalParameters:a,withOAuth2Call:t},o,n,r,l){return e.map((({lang:e,label:s,options:i})=>({lang:e,label:s,get:s=>getCodeSample(Object.assign(Object.assign({},s),{lang:e,options:Object.assign(Object.assign({},i),{skipOptionalParameters:a,withOAuth2Call:t,spec:o,generatedPayloadSamplesMaxDepth:n,store:r}),environment:l}))})))}
1
+ import{useAtomValue}from"jotai";import{getCodeSample}from"../../services";import{globalStoreAtom}from"../../jotai/store";import{operationStore}from"../../jotai/operation";import{environmentAtom,getLangKey,languageAtom}from"../../jotai/app";import{useTranslate}from"../../hooks";export function useCodeSamples({payload:e,isWebhook:a,definitionSamples:t,pointer:o}){var n;const{parser:r,options:{codeSamples:s,generatedSamplesMaxDepth:l}}=useAtomValue(globalStoreAtom),i=useAtomValue(operationStore(o)),{languages:g}=useAtomValue(languageAtom),[m]=useAtomValue(environmentAtom),p=useTranslate(),u=new Map(null==g?void 0:g.map((({key:e,order:a})=>[e,a]))),d=t.filter((e=>u.has(getLangKey(e)))),c=new Set(d.map(getLangKey));let b=[];if(!a){b=createCodeSamples((null===(n=s.languages)||void 0===n?void 0:n.filter((({lang:e,label:a})=>"Payload"!==e&&!c.has(getLangKey({lang:e,label:a})))))||[],s,r.definition,l,i,m,p)}const f=[...d,...b];e&&u.has(e.lang.toLowerCase())&&f.push(Object.assign(Object.assign({},e),{order:u.get(e.lang.toLowerCase())}));const S=f.map((e=>{var a;const t=null!==(a=e.label)&&void 0!==a?a:e.lang;return Object.assign({key:getLangKey(e),title:t,order:"number"==typeof u.get(t.toLowerCase())?u.get(t.toLowerCase()):9999},e)})).sort(((e,a)=>e.order-a.order));return{samples:S}}function createCodeSamples(e,{skipOptionalParameters:a,withOAuth2Call:t},o,n,r,s,l){return e.map((({lang:e,label:i,options:g})=>({lang:e,label:i,get:i=>getCodeSample(Object.assign(Object.assign({},i),{lang:e,options:Object.assign(Object.assign({},g),{skipOptionalParameters:a,withOAuth2Call:t,spec:o,generatedPayloadSamplesMaxDepth:n,store:r}),environment:s,translate:l}))})))}
2
2
  //# sourceMappingURL=useCodeSamples.js.map
@@ -1,2 +1,2 @@
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-testid":"title",children:"Response"}),e]});
1
+ import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{PanelHeader,PanelHeaderTitle}from"@redocly/theme";import{useTranslate}from"../../hooks";export const Summary=({tabs:e})=>{const s=useTranslate();return _jsxs(PanelHeader,{isExpandable:!1,children:[_jsx(PanelHeaderTitle,{"data-testid":"title",children:s("openapi.response","Response")}),e]})};
2
2
  //# sourceMappingURL=Summary.js.map
@@ -1,4 +1,4 @@
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 styled from"styled-components";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";import{ExpandAllButton}from"../ExpandAllButton";export const OperationResponseList=memo((({responses:e,renderTitle:o,operationId:t,operationPointer:s,activeResponseTab:n,onTabChange:a,callbackId:i})=>{const r=useLocation(),l=e.map((({code:e})=>({key:e,title:e}))),p=l.find((({key:e})=>e===n||pathIncludesLink(r,t)&&pathIncludesLink(r,`c=${e}`))),{activeTab:m,handleTabChange:d}=useTabsState({tabs:l,defaultTab:null==p?void 0:p.key,onChange:a}),c=l.find((e=>e.key===(n||m)));return c?_jsxs(_Fragment,{children:[_jsxs(TitleWrap,{children:[(null==o?void 0:o(c))||_jsxs(StyledTitle,{children:[_jsx(LinkToField,{to:makeDeepLink(t,`response&c=${c.key}`)}),"Responses"]}),_jsx(Tabs,{tabs:l,activeTab:c,onChange:d}),_jsx(ExpandAllButton,{type:"response",operationPointer:s})]}),e.map((e=>e.code===c.key?_jsx("div",{children:_jsx(ResponseDetails,{response:e,operationId:t,operationPointer:s,callbackId:i})},e.code):null))]}):null}));const TitleWrap=styled(Row)`
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 styled from"styled-components";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";import{ExpandAllButton}from"../ExpandAllButton";import{useTranslate}from"../../hooks";export const OperationResponseList=memo((({responses:e,renderTitle:o,operationId:s,operationPointer:t,activeResponseTab:n,onTabChange:a,callbackId:r})=>{const i=useLocation(),p=useTranslate(),l=e.map((({code:e})=>({key:e,title:e}))),m=l.find((({key:e})=>e===n||pathIncludesLink(i,s)&&pathIncludesLink(i,`c=${e}`))),{activeTab:d,handleTabChange:c}=useTabsState({tabs:l,defaultTab:null==m?void 0:m.key,onChange:a}),u=l.find((e=>e.key===(n||d)));return u?_jsxs(_Fragment,{children:[_jsxs(TitleWrap,{children:[(null==o?void 0:o(u))||_jsxs(StyledTitle,{children:[_jsx(LinkToField,{to:makeDeepLink(s,`response&c=${u.key}`)}),p("openapi.responses","Responses")]}),_jsx(Tabs,{tabs:l,activeTab:u,onChange:c}),_jsx(ExpandAllButton,{type:"response",operationPointer:t})]}),e.map((e=>e.code===u.key?_jsx("div",{children:_jsx(ResponseDetails,{response:e,operationId:s,operationPointer:t,callbackId:r})},e.code):null))]}):null}));const TitleWrap=styled(Row)`
2
2
  flex-wrap: wrap;
3
3
  gap: var(--spacing-unit);
4
4
  `;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { ResponseProps } from './types';
3
2
  export declare const ResponseDetails: import("react").NamedExoticComponent<ResponseProps>;