@redocly/reference-docs 2.13.1 → 2.13.4

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 (330) hide show
  1. package/bin/cli/commands/redocly-docs-cli.min.js +29 -29
  2. package/bin/cli/commands/redocly-docs-cli.min.js.LICENSE.txt +1 -1
  3. package/dist/console.redocly-reference-docs.min.js +1 -1
  4. package/dist/oauth2-redirect.js +1 -1
  5. package/dist/redocly-reference-docs.min.js +514 -514
  6. package/lib/components/Endpoint/Endpoint.d.ts +2 -2
  7. package/lib/components/Endpoint/ServerList.d.ts +2 -2
  8. package/lib/components/Endpoint/Summary.d.ts +3 -3
  9. package/lib/components/NextSectionButton.d.ts +2 -2
  10. package/lib/components/Overlay.d.ts +1 -1
  11. package/lib/components/Panel/PanelComponent.d.ts +2 -1
  12. package/lib/components/ProProviders.d.ts +2 -2
  13. package/lib/components/RedoclyReferenceDocs.d.ts +3 -3
  14. package/lib/components/Samples/ExampleSwitch.d.ts +1 -1
  15. package/lib/components/Samples/SamplesTabs.d.ts +1 -1
  16. package/lib/components/Samples/use-example-key.d.ts +1 -1
  17. package/lib/components/Search/MenuItemProSearch.d.ts +2 -2
  18. package/lib/components/Search/MenuItemProSearch.js +1 -1
  19. package/lib/components/Search/ProSearchBox.d.ts +5 -5
  20. package/lib/components/Search/SearchField.d.ts +1 -1
  21. package/lib/components/StoreProvider.d.ts +3 -2
  22. package/lib/components/Tabs/CollapsingTabs/CollapsingTabs.d.ts +1 -1
  23. package/lib/components/Tabs/CollapsingTabs/CollapsingTabsBase.d.ts +2 -2
  24. package/lib/components/VersionSwitcher.d.ts +2 -2
  25. package/lib/components/common/CheckboxList.d.ts +3 -2
  26. package/lib/components/common/Dropdown/Dropdown.d.ts +1 -1
  27. package/lib/components/common/Dropdown/types.d.ts +1 -1
  28. package/lib/components/common/FileUpload/helper.d.ts +1 -1
  29. package/lib/components/common/TextField.d.ts +1 -1
  30. package/lib/components/console/ActionPanel.d.ts +2 -2
  31. package/lib/components/console/AuthPanel.d.ts +4 -4
  32. package/lib/components/console/CodemirrorInput.d.ts +1 -1
  33. package/lib/components/console/Console.d.ts +6 -6
  34. package/lib/components/console/OAuth2Flow.d.ts +4 -4
  35. package/lib/components/console/OAuth2TokenInput.d.ts +1 -1
  36. package/lib/components/console/OpenIDConnect.d.ts +3 -3
  37. package/lib/components/console/OperationParameters.d.ts +1 -1
  38. package/lib/components/console/RequestBody.d.ts +2 -2
  39. package/lib/components/console/RequestBodyForm.d.ts +1 -1
  40. package/lib/components/console/ResponseBody.d.ts +1 -1
  41. package/lib/components/console/ResponsePanel.d.ts +1 -1
  42. package/lib/components/console/ServerDropdown.d.ts +1 -1
  43. package/lib/components/console/utils.d.ts +1 -1
  44. package/lib/components/pluggable/RedocExample.d.ts +2 -2
  45. package/lib/components/pluggable/RedocRequestBody.d.ts +1 -1
  46. package/lib/components/pluggable/RedocResponse.d.ts +1 -1
  47. package/lib/components/pluggable/RedocSchema.d.ts +2 -2
  48. package/lib/components/pluggable/styled.components.d.ts +1 -1
  49. package/lib/components/styled.elements.d.ts +3 -2
  50. package/lib/models/code-sample-options.d.ts +1 -1
  51. package/lib/redoc-lib/src/common-elements/LinkToField.d.ts +2 -2
  52. package/lib/redoc-lib/src/common-elements/Tooltip.d.ts +1 -1
  53. package/lib/redoc-lib/src/common-elements/linkify.d.ts +3 -2
  54. package/lib/redoc-lib/src/common-elements/perfect-scrollbar.d.ts +3 -2
  55. package/lib/redoc-lib/src/components/ApiInfo/ApiInfo.d.ts +1 -1
  56. package/lib/redoc-lib/src/components/ApiLogo/ApiLogo.d.ts +1 -1
  57. package/lib/redoc-lib/src/components/ApiLogo/styled.elements.d.ts +1 -1
  58. package/lib/redoc-lib/src/components/CallbackSamples/CallbackReqSamples.d.ts +1 -1
  59. package/lib/redoc-lib/src/components/CallbackSamples/CallbackSamples.d.ts +2 -2
  60. package/lib/redoc-lib/src/components/Callbacks/CallbackDetails.d.ts +1 -1
  61. package/lib/redoc-lib/src/components/Callbacks/CallbackOperation.d.ts +1 -1
  62. package/lib/redoc-lib/src/components/Callbacks/CallbackSummary.d.ts +2 -2
  63. package/lib/redoc-lib/src/components/Callbacks/CallbacksList.d.ts +1 -1
  64. package/lib/redoc-lib/src/components/ContentItems/ContentItems.d.ts +3 -3
  65. package/lib/redoc-lib/src/components/DownloadButton/DownloadButton.d.ts +1 -1
  66. package/lib/redoc-lib/src/components/DownloadButton/DownloadButton.js +1 -1
  67. package/lib/redoc-lib/src/components/DropdownOrLabel/DropdownOrLabel.d.ts +1 -1
  68. package/lib/redoc-lib/src/components/ErrorBoundary.d.ts +2 -1
  69. package/lib/redoc-lib/src/components/ExternalDocumentation/ExternalDocumentation.d.ts +1 -1
  70. package/lib/redoc-lib/src/components/Fields/Field.d.ts +3 -3
  71. package/lib/redoc-lib/src/components/Fields/FieldDetails.d.ts +1 -1
  72. package/lib/redoc-lib/src/components/GenericChildrenSwitcher/GenericChildrenSwitcher.d.ts +1 -1
  73. package/lib/redoc-lib/src/components/Markdown/AdvancedMarkdown.d.ts +3 -3
  74. package/lib/redoc-lib/src/components/Markdown/SanitizedMdBlock.d.ts +1 -1
  75. package/lib/redoc-lib/src/components/Markdown/styled.elements.d.ts +1 -1
  76. package/lib/redoc-lib/src/components/MediaTypeSwitch/MediaTypesSwitch.d.ts +2 -2
  77. package/lib/redoc-lib/src/components/Operation/Operation.d.ts +1 -1
  78. package/lib/redoc-lib/src/components/OptionsProvider.d.ts +1 -1
  79. package/lib/redoc-lib/src/components/Parameters/ParametersGroup.d.ts +1 -1
  80. package/lib/redoc-lib/src/components/PayloadSamples/Example.d.ts +1 -1
  81. package/lib/redoc-lib/src/components/PayloadSamples/MediaTypeSamples.d.ts +1 -1
  82. package/lib/redoc-lib/src/components/PayloadSamples/PayloadSamples.d.ts +1 -1
  83. package/lib/redoc-lib/src/components/PayloadSamples/exernalExampleHook.d.ts +1 -1
  84. package/lib/redoc-lib/src/components/RequestSamples/CodeSample.d.ts +2 -2
  85. package/lib/redoc-lib/src/components/RequestSamples/RequestSamples.d.ts +1 -1
  86. package/lib/redoc-lib/src/components/RequestSamples/languageSwitchEvent.d.ts +3 -2
  87. package/lib/redoc-lib/src/components/RequestSamples/useCodeSamples.d.ts +1 -1
  88. package/lib/redoc-lib/src/components/Responses/Response.d.ts +1 -1
  89. package/lib/redoc-lib/src/components/Responses/ResponseDetails.d.ts +1 -1
  90. package/lib/redoc-lib/src/components/Responses/ResponseHeaders.d.ts +1 -1
  91. package/lib/redoc-lib/src/components/Responses/ResponseSummary.d.ts +2 -2
  92. package/lib/redoc-lib/src/components/Responses/ResponsesList.d.ts +1 -1
  93. package/lib/redoc-lib/src/components/Schema/ArraySchema.d.ts +1 -1
  94. package/lib/redoc-lib/src/components/Schema/DiscriminatorDropdown.d.ts +2 -2
  95. package/lib/redoc-lib/src/components/Schema/ObjectSchema.d.ts +1 -1
  96. package/lib/redoc-lib/src/components/Schema/OneOfSchema.d.ts +1 -1
  97. package/lib/redoc-lib/src/components/Schema/Schema.d.ts +1 -1
  98. package/lib/redoc-lib/src/components/SchemaDefinition/SchemaDefinition.d.ts +2 -2
  99. package/lib/redoc-lib/src/components/SearchBox/SearchBox.d.ts +3 -3
  100. package/lib/redoc-lib/src/components/SecurityRequirement/SecurityRequirement.d.ts +1 -1
  101. package/lib/redoc-lib/src/components/SecuritySchemes/SecuritySchemes.d.ts +2 -2
  102. package/lib/redoc-lib/src/components/SideMenu/MenuItem.d.ts +3 -3
  103. package/lib/redoc-lib/src/components/SideMenu/MenuItem.js +1 -1
  104. package/lib/redoc-lib/src/components/SideMenu/SideMenu.d.ts +3 -3
  105. package/lib/redoc-lib/src/components/SourceCode/SourceCode.d.ts +2 -2
  106. package/lib/redoc-lib/src/components/StickySidebar/StickyResponsiveSidebar.d.ts +3 -2
  107. package/lib/redoc-lib/src/components/StoreBuilder.d.ts +1 -1
  108. package/lib/redoc-lib/src/components/helper.d.ts +1 -1
  109. package/lib/redoc-lib/src/services/MarkdownRenderer.d.ts +3 -3
  110. package/lib/redoc-lib/src/services/MenuBuilder.d.ts +3 -3
  111. package/lib/redoc-lib/src/services/OpenAPIParser.d.ts +1 -1
  112. package/lib/redoc-lib/src/services/RedocNormalizedOptions.d.ts +7 -5
  113. package/lib/redoc-lib/src/services/RedocNormalizedOptions.js +1 -1
  114. package/lib/redoc-lib/src/services/ScrollService.d.ts +1 -1
  115. package/lib/redoc-lib/src/services/SpecStore.d.ts +3 -3
  116. package/lib/redoc-lib/src/services/models/ApiInfo.d.ts +2 -2
  117. package/lib/redoc-lib/src/services/models/Callback.d.ts +3 -3
  118. package/lib/redoc-lib/src/services/models/Example.d.ts +2 -2
  119. package/lib/redoc-lib/src/services/models/Field.d.ts +5 -4
  120. package/lib/redoc-lib/src/services/models/Group.model.d.ts +4 -4
  121. package/lib/redoc-lib/src/services/models/MediaContent.d.ts +5 -5
  122. package/lib/redoc-lib/src/services/models/MediaType.d.ts +5 -5
  123. package/lib/redoc-lib/src/services/models/Operation.d.ts +8 -8
  124. package/lib/redoc-lib/src/services/models/RequestBody.d.ts +4 -4
  125. package/lib/redoc-lib/src/services/models/Response.d.ts +4 -4
  126. package/lib/redoc-lib/src/services/models/Schema.d.ts +5 -5
  127. package/lib/redoc-lib/src/services/models/SecurityRequirement.d.ts +2 -2
  128. package/lib/redoc-lib/src/services/models/SecuritySchemes.d.ts +2 -2
  129. package/lib/redoc-lib/src/services/models/Webhook.d.ts +3 -3
  130. package/lib/redoc-lib/src/styled-components.d.ts +2 -2
  131. package/lib/redoc-lib/src/types/open-api.d.ts +2 -2
  132. package/lib/redoc-lib/src/utils/helpers.d.ts +3 -3
  133. package/lib/redoc-lib/src/utils/helpers.js +1 -1
  134. package/lib/redoc-lib/src/utils/loadAndBundleSpec.d.ts +1 -1
  135. package/lib/redoc-lib/src/utils/media-css.d.ts +1 -1
  136. package/lib/redoc-lib/src/utils/openapi.d.ts +3 -3
  137. package/lib/services/ProMenu.d.ts +2 -2
  138. package/lib/services/ProStore.d.ts +13 -26
  139. package/lib/services/ProStore.js +1 -1
  140. package/lib/services/SearchStore.d.ts +3 -2
  141. package/lib/services/VersionedSpecStore.d.ts +3 -2
  142. package/lib/services/code-samples/generator.d.ts +3 -3
  143. package/lib/services/code-samples/httpsnippet/helpers/code-helpers.d.ts +2 -2
  144. package/lib/services/code-samples/httpsnippet/index.d.ts +2 -2
  145. package/lib/services/code-samples/httpsnippet/targets/csharp/httpclient.d.ts +2 -2
  146. package/lib/services/code-samples/httpsnippet/targets/go/native.d.ts +2 -2
  147. package/lib/services/code-samples/httpsnippet/targets/java/httpclient.d.ts +2 -2
  148. package/lib/services/code-samples/httpsnippet/targets/java8/apachehttp.d.ts +2 -2
  149. package/lib/services/code-samples/httpsnippet/targets/javascript/fetch.d.ts +2 -2
  150. package/lib/services/code-samples/httpsnippet/targets/node/fetch.d.ts +2 -2
  151. package/lib/services/code-samples/httpsnippet/targets/php/curl.d.ts +2 -2
  152. package/lib/services/code-samples/httpsnippet/targets/php/utils.d.ts +1 -1
  153. package/lib/services/code-samples/httpsnippet/targets/python/requests.d.ts +2 -2
  154. package/lib/services/code-samples/httpsnippet/targets/ruby/native.d.ts +2 -2
  155. package/lib/services/code-samples/httpsnippet/targets/shell/curl.d.ts +2 -2
  156. package/lib/services/extendTheme.d.ts +2 -2
  157. package/lib/services/history/FakeHistoryService.d.ts +2 -2
  158. package/lib/services/history/ProHashHistoryService.d.ts +2 -2
  159. package/lib/services/history/PushStateHistoryService.d.ts +3 -2
  160. package/lib/services/history/helpers.d.ts +1 -1
  161. package/lib/services/index.d.ts +1 -0
  162. package/lib/services/index.js +1 -1
  163. package/lib/services/types.d.ts +24 -0
  164. package/lib/services/types.js +2 -0
  165. package/lib/services/utils.js +1 -1
  166. package/lib/standalone.d.ts +3 -3
  167. package/lib/utils.js +1 -1
  168. package/lib-esm/components/Endpoint/Endpoint.d.ts +2 -2
  169. package/lib-esm/components/Endpoint/ServerList.d.ts +2 -2
  170. package/lib-esm/components/Endpoint/Summary.d.ts +3 -3
  171. package/lib-esm/components/NextSectionButton.d.ts +2 -2
  172. package/lib-esm/components/Overlay.d.ts +1 -1
  173. package/lib-esm/components/Panel/PanelComponent.d.ts +2 -1
  174. package/lib-esm/components/ProProviders.d.ts +2 -2
  175. package/lib-esm/components/RedoclyReferenceDocs.d.ts +3 -3
  176. package/lib-esm/components/Samples/ExampleSwitch.d.ts +1 -1
  177. package/lib-esm/components/Samples/SamplesTabs.d.ts +1 -1
  178. package/lib-esm/components/Samples/use-example-key.d.ts +1 -1
  179. package/lib-esm/components/Search/MenuItemProSearch.d.ts +2 -2
  180. package/lib-esm/components/Search/MenuItemProSearch.js +1 -1
  181. package/lib-esm/components/Search/ProSearchBox.d.ts +5 -5
  182. package/lib-esm/components/Search/SearchField.d.ts +1 -1
  183. package/lib-esm/components/StoreProvider.d.ts +3 -2
  184. package/lib-esm/components/Tabs/CollapsingTabs/CollapsingTabs.d.ts +1 -1
  185. package/lib-esm/components/Tabs/CollapsingTabs/CollapsingTabsBase.d.ts +2 -2
  186. package/lib-esm/components/VersionSwitcher.d.ts +2 -2
  187. package/lib-esm/components/common/CheckboxList.d.ts +3 -2
  188. package/lib-esm/components/common/Dropdown/Dropdown.d.ts +1 -1
  189. package/lib-esm/components/common/Dropdown/types.d.ts +1 -1
  190. package/lib-esm/components/common/FileUpload/helper.d.ts +1 -1
  191. package/lib-esm/components/common/TextField.d.ts +1 -1
  192. package/lib-esm/components/console/ActionPanel.d.ts +2 -2
  193. package/lib-esm/components/console/AuthPanel.d.ts +4 -4
  194. package/lib-esm/components/console/CodemirrorInput.d.ts +1 -1
  195. package/lib-esm/components/console/Console.d.ts +6 -6
  196. package/lib-esm/components/console/OAuth2Flow.d.ts +4 -4
  197. package/lib-esm/components/console/OAuth2TokenInput.d.ts +1 -1
  198. package/lib-esm/components/console/OpenIDConnect.d.ts +3 -3
  199. package/lib-esm/components/console/OperationParameters.d.ts +1 -1
  200. package/lib-esm/components/console/RequestBody.d.ts +2 -2
  201. package/lib-esm/components/console/RequestBodyForm.d.ts +1 -1
  202. package/lib-esm/components/console/ResponseBody.d.ts +1 -1
  203. package/lib-esm/components/console/ResponsePanel.d.ts +1 -1
  204. package/lib-esm/components/console/ServerDropdown.d.ts +1 -1
  205. package/lib-esm/components/console/utils.d.ts +1 -1
  206. package/lib-esm/components/pluggable/RedocExample.d.ts +2 -2
  207. package/lib-esm/components/pluggable/RedocRequestBody.d.ts +1 -1
  208. package/lib-esm/components/pluggable/RedocResponse.d.ts +1 -1
  209. package/lib-esm/components/pluggable/RedocSchema.d.ts +2 -2
  210. package/lib-esm/components/pluggable/styled.components.d.ts +1 -1
  211. package/lib-esm/components/styled.elements.d.ts +3 -2
  212. package/lib-esm/models/code-sample-options.d.ts +1 -1
  213. package/lib-esm/redoc-lib/src/common-elements/LinkToField.d.ts +2 -2
  214. package/lib-esm/redoc-lib/src/common-elements/Tooltip.d.ts +1 -1
  215. package/lib-esm/redoc-lib/src/common-elements/linkify.d.ts +3 -2
  216. package/lib-esm/redoc-lib/src/common-elements/perfect-scrollbar.d.ts +3 -2
  217. package/lib-esm/redoc-lib/src/components/ApiInfo/ApiInfo.d.ts +1 -1
  218. package/lib-esm/redoc-lib/src/components/ApiLogo/ApiLogo.d.ts +1 -1
  219. package/lib-esm/redoc-lib/src/components/ApiLogo/styled.elements.d.ts +1 -1
  220. package/lib-esm/redoc-lib/src/components/CallbackSamples/CallbackReqSamples.d.ts +1 -1
  221. package/lib-esm/redoc-lib/src/components/CallbackSamples/CallbackSamples.d.ts +2 -2
  222. package/lib-esm/redoc-lib/src/components/Callbacks/CallbackDetails.d.ts +1 -1
  223. package/lib-esm/redoc-lib/src/components/Callbacks/CallbackOperation.d.ts +1 -1
  224. package/lib-esm/redoc-lib/src/components/Callbacks/CallbackSummary.d.ts +2 -2
  225. package/lib-esm/redoc-lib/src/components/Callbacks/CallbacksList.d.ts +1 -1
  226. package/lib-esm/redoc-lib/src/components/ContentItems/ContentItems.d.ts +3 -3
  227. package/lib-esm/redoc-lib/src/components/DownloadButton/DownloadButton.d.ts +1 -1
  228. package/lib-esm/redoc-lib/src/components/DownloadButton/DownloadButton.js +1 -1
  229. package/lib-esm/redoc-lib/src/components/DropdownOrLabel/DropdownOrLabel.d.ts +1 -1
  230. package/lib-esm/redoc-lib/src/components/ErrorBoundary.d.ts +2 -1
  231. package/lib-esm/redoc-lib/src/components/ExternalDocumentation/ExternalDocumentation.d.ts +1 -1
  232. package/lib-esm/redoc-lib/src/components/Fields/Field.d.ts +3 -3
  233. package/lib-esm/redoc-lib/src/components/Fields/FieldDetails.d.ts +1 -1
  234. package/lib-esm/redoc-lib/src/components/GenericChildrenSwitcher/GenericChildrenSwitcher.d.ts +1 -1
  235. package/lib-esm/redoc-lib/src/components/Markdown/AdvancedMarkdown.d.ts +3 -3
  236. package/lib-esm/redoc-lib/src/components/Markdown/SanitizedMdBlock.d.ts +1 -1
  237. package/lib-esm/redoc-lib/src/components/Markdown/styled.elements.d.ts +1 -1
  238. package/lib-esm/redoc-lib/src/components/MediaTypeSwitch/MediaTypesSwitch.d.ts +2 -2
  239. package/lib-esm/redoc-lib/src/components/Operation/Operation.d.ts +1 -1
  240. package/lib-esm/redoc-lib/src/components/OptionsProvider.d.ts +1 -1
  241. package/lib-esm/redoc-lib/src/components/Parameters/ParametersGroup.d.ts +1 -1
  242. package/lib-esm/redoc-lib/src/components/PayloadSamples/Example.d.ts +1 -1
  243. package/lib-esm/redoc-lib/src/components/PayloadSamples/MediaTypeSamples.d.ts +1 -1
  244. package/lib-esm/redoc-lib/src/components/PayloadSamples/PayloadSamples.d.ts +1 -1
  245. package/lib-esm/redoc-lib/src/components/PayloadSamples/exernalExampleHook.d.ts +1 -1
  246. package/lib-esm/redoc-lib/src/components/RequestSamples/CodeSample.d.ts +2 -2
  247. package/lib-esm/redoc-lib/src/components/RequestSamples/RequestSamples.d.ts +1 -1
  248. package/lib-esm/redoc-lib/src/components/RequestSamples/languageSwitchEvent.d.ts +3 -2
  249. package/lib-esm/redoc-lib/src/components/RequestSamples/useCodeSamples.d.ts +1 -1
  250. package/lib-esm/redoc-lib/src/components/Responses/Response.d.ts +1 -1
  251. package/lib-esm/redoc-lib/src/components/Responses/ResponseDetails.d.ts +1 -1
  252. package/lib-esm/redoc-lib/src/components/Responses/ResponseHeaders.d.ts +1 -1
  253. package/lib-esm/redoc-lib/src/components/Responses/ResponseSummary.d.ts +2 -2
  254. package/lib-esm/redoc-lib/src/components/Responses/ResponsesList.d.ts +1 -1
  255. package/lib-esm/redoc-lib/src/components/Schema/ArraySchema.d.ts +1 -1
  256. package/lib-esm/redoc-lib/src/components/Schema/DiscriminatorDropdown.d.ts +2 -2
  257. package/lib-esm/redoc-lib/src/components/Schema/ObjectSchema.d.ts +1 -1
  258. package/lib-esm/redoc-lib/src/components/Schema/OneOfSchema.d.ts +1 -1
  259. package/lib-esm/redoc-lib/src/components/Schema/Schema.d.ts +1 -1
  260. package/lib-esm/redoc-lib/src/components/SchemaDefinition/SchemaDefinition.d.ts +2 -2
  261. package/lib-esm/redoc-lib/src/components/SearchBox/SearchBox.d.ts +3 -3
  262. package/lib-esm/redoc-lib/src/components/SecurityRequirement/SecurityRequirement.d.ts +1 -1
  263. package/lib-esm/redoc-lib/src/components/SecuritySchemes/SecuritySchemes.d.ts +2 -2
  264. package/lib-esm/redoc-lib/src/components/SideMenu/MenuItem.d.ts +3 -3
  265. package/lib-esm/redoc-lib/src/components/SideMenu/MenuItem.js +1 -1
  266. package/lib-esm/redoc-lib/src/components/SideMenu/SideMenu.d.ts +3 -3
  267. package/lib-esm/redoc-lib/src/components/SourceCode/SourceCode.d.ts +2 -2
  268. package/lib-esm/redoc-lib/src/components/StickySidebar/StickyResponsiveSidebar.d.ts +3 -2
  269. package/lib-esm/redoc-lib/src/components/StoreBuilder.d.ts +1 -1
  270. package/lib-esm/redoc-lib/src/components/helper.d.ts +1 -1
  271. package/lib-esm/redoc-lib/src/services/MarkdownRenderer.d.ts +3 -3
  272. package/lib-esm/redoc-lib/src/services/MenuBuilder.d.ts +3 -3
  273. package/lib-esm/redoc-lib/src/services/OpenAPIParser.d.ts +1 -1
  274. package/lib-esm/redoc-lib/src/services/RedocNormalizedOptions.d.ts +7 -5
  275. package/lib-esm/redoc-lib/src/services/RedocNormalizedOptions.js +1 -1
  276. package/lib-esm/redoc-lib/src/services/ScrollService.d.ts +1 -1
  277. package/lib-esm/redoc-lib/src/services/SpecStore.d.ts +3 -3
  278. package/lib-esm/redoc-lib/src/services/models/ApiInfo.d.ts +2 -2
  279. package/lib-esm/redoc-lib/src/services/models/Callback.d.ts +3 -3
  280. package/lib-esm/redoc-lib/src/services/models/Example.d.ts +2 -2
  281. package/lib-esm/redoc-lib/src/services/models/Field.d.ts +5 -4
  282. package/lib-esm/redoc-lib/src/services/models/Group.model.d.ts +4 -4
  283. package/lib-esm/redoc-lib/src/services/models/MediaContent.d.ts +5 -5
  284. package/lib-esm/redoc-lib/src/services/models/MediaType.d.ts +5 -5
  285. package/lib-esm/redoc-lib/src/services/models/Operation.d.ts +8 -8
  286. package/lib-esm/redoc-lib/src/services/models/RequestBody.d.ts +4 -4
  287. package/lib-esm/redoc-lib/src/services/models/Response.d.ts +4 -4
  288. package/lib-esm/redoc-lib/src/services/models/Schema.d.ts +5 -5
  289. package/lib-esm/redoc-lib/src/services/models/SecurityRequirement.d.ts +2 -2
  290. package/lib-esm/redoc-lib/src/services/models/SecuritySchemes.d.ts +2 -2
  291. package/lib-esm/redoc-lib/src/services/models/Webhook.d.ts +3 -3
  292. package/lib-esm/redoc-lib/src/styled-components.d.ts +2 -2
  293. package/lib-esm/redoc-lib/src/types/open-api.d.ts +2 -2
  294. package/lib-esm/redoc-lib/src/utils/helpers.d.ts +3 -3
  295. package/lib-esm/redoc-lib/src/utils/helpers.js +1 -1
  296. package/lib-esm/redoc-lib/src/utils/loadAndBundleSpec.d.ts +1 -1
  297. package/lib-esm/redoc-lib/src/utils/media-css.d.ts +1 -1
  298. package/lib-esm/redoc-lib/src/utils/openapi.d.ts +3 -3
  299. package/lib-esm/services/ProMenu.d.ts +2 -2
  300. package/lib-esm/services/ProStore.d.ts +13 -26
  301. package/lib-esm/services/ProStore.js +1 -1
  302. package/lib-esm/services/SearchStore.d.ts +3 -2
  303. package/lib-esm/services/VersionedSpecStore.d.ts +3 -2
  304. package/lib-esm/services/code-samples/generator.d.ts +3 -3
  305. package/lib-esm/services/code-samples/httpsnippet/helpers/code-helpers.d.ts +2 -2
  306. package/lib-esm/services/code-samples/httpsnippet/index.d.ts +2 -2
  307. package/lib-esm/services/code-samples/httpsnippet/targets/csharp/httpclient.d.ts +2 -2
  308. package/lib-esm/services/code-samples/httpsnippet/targets/go/native.d.ts +2 -2
  309. package/lib-esm/services/code-samples/httpsnippet/targets/java/httpclient.d.ts +2 -2
  310. package/lib-esm/services/code-samples/httpsnippet/targets/java8/apachehttp.d.ts +2 -2
  311. package/lib-esm/services/code-samples/httpsnippet/targets/javascript/fetch.d.ts +2 -2
  312. package/lib-esm/services/code-samples/httpsnippet/targets/node/fetch.d.ts +2 -2
  313. package/lib-esm/services/code-samples/httpsnippet/targets/php/curl.d.ts +2 -2
  314. package/lib-esm/services/code-samples/httpsnippet/targets/php/utils.d.ts +1 -1
  315. package/lib-esm/services/code-samples/httpsnippet/targets/python/requests.d.ts +2 -2
  316. package/lib-esm/services/code-samples/httpsnippet/targets/ruby/native.d.ts +2 -2
  317. package/lib-esm/services/code-samples/httpsnippet/targets/shell/curl.d.ts +2 -2
  318. package/lib-esm/services/extendTheme.d.ts +2 -2
  319. package/lib-esm/services/history/FakeHistoryService.d.ts +2 -2
  320. package/lib-esm/services/history/ProHashHistoryService.d.ts +2 -2
  321. package/lib-esm/services/history/PushStateHistoryService.d.ts +3 -2
  322. package/lib-esm/services/history/helpers.d.ts +1 -1
  323. package/lib-esm/services/index.d.ts +1 -0
  324. package/lib-esm/services/index.js +1 -1
  325. package/lib-esm/services/types.d.ts +24 -0
  326. package/lib-esm/services/types.js +2 -0
  327. package/lib-esm/services/utils.js +1 -1
  328. package/lib-esm/standalone.d.ts +3 -3
  329. package/lib-esm/utils.js +1 -1
  330. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
- import { OpenAPIExternalDocumentation, OpenAPITag } from '../../types';
2
- import { MarkdownHeading } from '../MarkdownRenderer';
3
- import { ContentItemModel } from '../MenuBuilder';
4
- import { IMenuItem, MenuItemGroupType } from '../MenuStore';
1
+ import type { OpenAPIExternalDocumentation, OpenAPITag } from '../../types';
2
+ import type { MarkdownHeading } from '../MarkdownRenderer';
3
+ import type { ContentItemModel } from '../MenuBuilder';
4
+ import type { IMenuItem, MenuItemGroupType } from '../MenuStore';
5
5
  /**
6
6
  * Operations Group model ready to be used by components
7
7
  */
@@ -1,9 +1,9 @@
1
- import { OpenAPIMediaType } from '../../types';
1
+ import type { OpenAPIMediaType } from '../../types';
2
2
  import { MediaTypeModel } from './MediaType';
3
- import { OpenAPIParser } from '../OpenAPIParser';
4
- import { RedocProNormalizedOptions } from '../../../../services/ProStore';
5
- import { OperationModel } from './Operation';
6
- import { ResponseModel } from './Response';
3
+ import type { OpenAPIParser } from '../OpenAPIParser';
4
+ import type { RedocProNormalizedOptions } from '../../../../services/ProStore';
5
+ import type { OperationModel } from './Operation';
6
+ import type { ResponseModel } from './Response';
7
7
  /**
8
8
  * MediaContent model ready to be sued by React components
9
9
  * Contains multiple MediaTypes and keeps track of the currently active one
@@ -1,10 +1,10 @@
1
- import { OpenAPIMediaType } from '../../types';
2
- import { RedocProNormalizedOptions } from '../../../../services/ProStore';
1
+ import type { OpenAPIMediaType } from '../../types';
2
+ import type { RedocProNormalizedOptions } from '../../../../services/ProStore';
3
3
  import { SchemaModel } from './Schema';
4
- import { OpenAPIParser } from '../OpenAPIParser';
4
+ import type { OpenAPIParser } from '../OpenAPIParser';
5
5
  import { ExampleModel } from './Example';
6
- import { OperationModel } from './Operation';
7
- import { ResponseModel } from './Response';
6
+ import type { OperationModel } from './Operation';
7
+ import type { ResponseModel } from './Response';
8
8
  export declare class MediaTypeModel {
9
9
  options: RedocProNormalizedOptions;
10
10
  examples?: {
@@ -1,16 +1,16 @@
1
- import { IMenuItem } from '../MenuStore';
2
- import { GroupModel } from './Group.model';
1
+ import type { IMenuItem } from '../MenuStore';
2
+ import type { GroupModel } from './Group.model';
3
3
  import { SecurityRequirementModel } from './SecurityRequirement';
4
- import { OpenAPIExternalDocumentation, OpenAPIServer, OpenAPIXCodeSample, Server } from '../../types';
5
- import { ContentItemModel, ExtendedOpenAPIOperation } from '../MenuBuilder';
6
- import { OpenAPIParser } from '../OpenAPIParser';
7
- import { Unstable_ExternalCodeSample } from '../RedocNormalizedOptions';
4
+ import type { OpenAPIExternalDocumentation, OpenAPIServer, OpenAPIXCodeSample, Server } from '../../types';
5
+ import type { ContentItemModel, ExtendedOpenAPIOperation } from '../MenuBuilder';
6
+ import type { OpenAPIParser } from '../OpenAPIParser';
7
+ import type { Unstable_ExternalCodeSample } from '../RedocNormalizedOptions';
8
8
  import { CallbackModel } from './Callback';
9
9
  import { FieldModel } from './Field';
10
- import { MediaContentModel } from './MediaContent';
10
+ import type { MediaContentModel } from './MediaContent';
11
11
  import { RequestBodyModel } from './RequestBody';
12
12
  import { ResponseModel } from './Response';
13
- import { RedocProNormalizedOptions } from '../../../../services';
13
+ import type { RedocProNormalizedOptions } from '../../../../services';
14
14
  export interface Sample {
15
15
  lang: string;
16
16
  label?: string;
@@ -1,8 +1,8 @@
1
- import { OpenAPIRequestBody, Referenced } from '../../types';
2
- import { OpenAPIParser } from '../OpenAPIParser';
3
- import { RedocProNormalizedOptions } from '../../../../services/ProStore';
1
+ import type { OpenAPIRequestBody, Referenced } from '../../types';
2
+ import type { OpenAPIParser } from '../OpenAPIParser';
3
+ import type { RedocProNormalizedOptions } from '../../../../services/ProStore';
4
4
  import { MediaContentModel } from './MediaContent';
5
- import { OperationModel } from './Operation';
5
+ import type { OperationModel } from './Operation';
6
6
  declare type RequestBodyProps = {
7
7
  parser: OpenAPIParser;
8
8
  infoOrRef: Referenced<OpenAPIRequestBody>;
@@ -1,9 +1,9 @@
1
- import { OpenAPIResponse, Referenced } from '../../types';
2
- import { OpenAPIParser } from '../OpenAPIParser';
3
- import { RedocProNormalizedOptions } from '../../../../services/ProStore';
1
+ import type { OpenAPIResponse, Referenced } from '../../types';
2
+ import type { OpenAPIParser } from '../OpenAPIParser';
3
+ import type { RedocProNormalizedOptions } from '../../../../services/ProStore';
4
4
  import { FieldModel } from './Field';
5
5
  import { MediaContentModel } from './MediaContent';
6
- import { OperationModel } from './Operation';
6
+ import type { OperationModel } from './Operation';
7
7
  declare type ResponseProps = {
8
8
  parser: OpenAPIParser;
9
9
  code: string;
@@ -1,9 +1,9 @@
1
- import { OpenAPIExternalDocumentation, OpenAPISchema, Referenced } from '../../types';
2
- import { OpenAPIParser } from '../OpenAPIParser';
3
- import { RedocProNormalizedOptions } from '../../../../services';
1
+ import type { OpenAPIExternalDocumentation, OpenAPISchema, Referenced } from '../../types';
2
+ import type { OpenAPIParser } from '../OpenAPIParser';
3
+ import type { RedocProNormalizedOptions } from '../../../../services';
4
4
  import { FieldModel } from './Field';
5
- import { MergedOpenAPISchema, ResponseModel } from '../';
6
- import { OperationModel } from './Operation';
5
+ import type { MergedOpenAPISchema, ResponseModel } from '../';
6
+ import type { OperationModel } from './Operation';
7
7
  export declare type Deps = {
8
8
  parentFieldFullPath?: string;
9
9
  operation?: OperationModel;
@@ -1,5 +1,5 @@
1
- import { OpenAPISecurityRequirement, OpenAPISecurityScheme } from '../../types';
2
- import { OpenAPIParser } from '../OpenAPIParser';
1
+ import type { OpenAPISecurityRequirement, OpenAPISecurityScheme } from '../../types';
2
+ import type { OpenAPIParser } from '../OpenAPIParser';
3
3
  export interface SecurityScheme extends OpenAPISecurityScheme {
4
4
  id: string;
5
5
  sectionId: string;
@@ -1,5 +1,5 @@
1
- import { OpenAPISecurityScheme, Referenced } from '../../types';
2
- import { OpenAPIParser } from '../OpenAPIParser';
1
+ import type { OpenAPISecurityScheme, Referenced } from '../../types';
2
+ import type { OpenAPIParser } from '../OpenAPIParser';
3
3
  export declare class SecuritySchemeModel {
4
4
  id: string;
5
5
  sectionId: string;
@@ -1,7 +1,7 @@
1
- import { OpenAPIPath, Referenced } from '../../types';
2
- import { OpenAPIParser } from '../OpenAPIParser';
1
+ import type { OpenAPIPath, Referenced } from '../../types';
2
+ import type { OpenAPIParser } from '../OpenAPIParser';
3
3
  import { OperationModel } from './Operation';
4
- import { RedocProNormalizedOptions } from '../../../../services';
4
+ import type { RedocProNormalizedOptions } from '../../../../services';
5
5
  export declare class WebhookModel {
6
6
  operations: OperationModel[];
7
7
  constructor(parser: OpenAPIParser, options: RedocProNormalizedOptions, infoOrRef?: Referenced<OpenAPIPath>);
@@ -1,6 +1,6 @@
1
1
  import * as styledComponents from 'styled-components';
2
- import { ResolvedThemeInterface, MediaValue } from './theme';
3
- import { ProTheme } from '../../services/extendTheme';
2
+ import type { ResolvedThemeInterface, MediaValue } from './theme';
3
+ import type { ProTheme } from '../../services/extendTheme';
4
4
  export type { ResolvedThemeInterface, MediaValue };
5
5
  declare const styled: styledComponents.ThemedStyledInterface<ProTheme>, css: styledComponents.ThemedCssFunction<ProTheme>, createGlobalStyle: <P extends object = {}>(first: TemplateStringsArray | styledComponents.CSSObject | styledComponents.InterpolationFunction<styledComponents.ThemedStyledProps<P, ProTheme>>, ...interpolations: styledComponents.Interpolation<styledComponents.ThemedStyledProps<P, ProTheme>>[]) => styledComponents.GlobalStyleComponent<P, ProTheme>, keyframes: (strings: TemplateStringsArray | styledComponents.CSSKeyframes, ...interpolations: styledComponents.SimpleInterpolation[]) => styledComponents.Keyframes, ThemeProvider: styledComponents.ThemeProviderComponent<ProTheme, ProTheme>;
6
6
  export { css, createGlobalStyle, keyframes, ThemeProvider };
@@ -1,5 +1,5 @@
1
- import { Omit } from './index';
2
- import { Sample } from '../services';
1
+ import type { Omit } from './index';
2
+ import type { Sample } from '../services';
3
3
  export interface OpenAPIDefinition {
4
4
  openapi: string;
5
5
  info: OpenAPIInfo;
@@ -20,9 +20,9 @@ export declare function flattenByProp<T extends GenericObject, P extends keyof T
20
20
  export declare function stripTrailingSlash(path: string): string;
21
21
  export declare function isNumeric(value: unknown): value is number;
22
22
  export declare function appendToMdHeading(md: string, heading: string, content: string): string;
23
- export declare const mergeObjects: (target: GenericObject, ...sources: GenericObject[]) => any;
24
- export declare const isObject: (item: any) => boolean;
25
- export declare const isMergebleObject: (item: any) => boolean;
23
+ export declare const mergeObjects: (target: GenericObject, ...sources: GenericObject[]) => GenericObject;
24
+ export declare const isObject: (item: unknown) => item is "object";
25
+ export declare const isMergeableObject: (item: unknown) => boolean;
26
26
  /**
27
27
  * slugify() returns empty string when failed to slugify.
28
28
  * so try to return minimum slugified-string with failed one which keeps original value
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getSchemaTitle=exports.sanitizeItemId=exports.unescapeHTMLChars=exports.removeQueryString=exports.titleize=exports.getBasePath=exports.resolveUrl=exports.isAbsoluteUrl=exports.safeSlugify=exports.isMergebleObject=exports.isObject=exports.mergeObjects=exports.appendToMdHeading=exports.isNumeric=exports.stripTrailingSlash=exports.flattenByProp=exports.mapValues=exports.mapWithLast=void 0;var tslib_1=require("tslib"),slugify_1=(0,tslib_1.__importDefault)(require("slugify")),url_1=require("url"),media_css_1=require("./media-css"),openapi_1=require("./openapi"),JsonPointer_1=(0,tslib_1.__importDefault)(require("./JsonPointer"));function mapWithLast(e,r){for(var t=[],s=0;s<e.length-1;s++)t.push(r(e[s],!1));return 0!==e.length&&t.push(r(e[e.length-1],!0)),t}function mapValues(e,r){var t={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=r(e[s],s,e));return t}function flattenByProp(e,r){var t=[],s=function(e){for(var i=0,n=e;i<n.length;i++){var a=n[i];t.push(a),a[r]&&s(a[r])}};return s(e),t}function stripTrailingSlash(e){return e.endsWith("/")?e.substring(0,e.length-1):e}function isNumeric(e){return!isNaN(parseFloat(e))&&isFinite(e)}function appendToMdHeading(e,r,t){var s=new RegExp("(^|\\n)#\\s?"+r+"\\s*\\n","i"),i=new RegExp("((\\n|^)#\\s*"+r+"\\s*(\\n|$)(?:.|\\n)*?)(\\n#|$)","i");if(s.test(e))return e.replace(i,"$1\n\n"+t+"\n$4");var n=""===e||e.endsWith("\n\n")?"":e.endsWith("\n")?"\n":"\n\n";return""+e+n+"# "+r+"\n\n"+t}exports.mapWithLast=mapWithLast,exports.mapValues=mapValues,exports.flattenByProp=flattenByProp,exports.stripTrailingSlash=stripTrailingSlash,exports.isNumeric=isNumeric,exports.appendToMdHeading=appendToMdHeading;var mergeObjects=function(e){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];if(!r.length)return e;var s=r.shift();return void 0===s?e:((0,exports.isMergebleObject)(e)&&(0,exports.isMergebleObject)(s)&&Object.keys(s).forEach((function(r){var t;(0,exports.isMergebleObject)(s[r])?(e[r]||(e[r]={}),["string","number"].includes(typeof e[r])&&(s[r][media_css_1.ZERO_BREAKPOINT]||0===s[r][media_css_1.ZERO_BREAKPOINT]||console.warn('Theme resolver: using default value of "'+e[r]+'" for "'+r+'". This is not recommended. Prefer adding default value by providing "'+media_css_1.ZERO_BREAKPOINT+'" property to '+JSON.stringify(s[r])+"."),e[r]=((t={})[media_css_1.ZERO_BREAKPOINT]=e[r],t)),(0,exports.mergeObjects)(e[r],s[r])):e[r]=s[r]})),exports.mergeObjects.apply(void 0,(0,tslib_1.__spreadArray)([e],r,!1)))};exports.mergeObjects=mergeObjects;var isObject=function(e){return null!==e&&"object"==typeof e};exports.isObject=isObject;var isMergebleObject=function(e){return(0,exports.isObject)(e)&&!Array.isArray(e)};function safeSlugify(e){return(0,slugify_1.default)(e)||e.toString().toLowerCase().replace(/\s+/g,"-").replace(/&/g,"-and-").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,"")}function isAbsoluteUrl(e){return/(?:^[a-z][a-z0-9+.-]*:|\/\/)/i.test(e)}function resolveUrl(e,r){var t;if(r.startsWith("//"))t=""+((0,url_1.parse)(e).protocol||"https:")+r;else if(isAbsoluteUrl(r))t=r;else if(r.startsWith("/")){var s=(0,url_1.parse)(e);t=(0,url_1.format)((0,tslib_1.__assign)((0,tslib_1.__assign)({},s),{pathname:r}))}else t=stripTrailingSlash(e)+"/"+r;return stripTrailingSlash(t)}function getBasePath(e){try{return parseURL(e).pathname}catch(r){return e}}function titleize(e){return e.charAt(0).toUpperCase()+e.slice(1)}function removeQueryString(e){try{var r=parseURL(e);return r.search="",r.toString()}catch(r){return e}}function parseURL(e){return"undefined"==typeof URL?new(require("url").URL)(e):new URL(e)}function unescapeHTMLChars(e){return e.replace(/&#(\d+);/g,(function(e,r){return String.fromCharCode(parseInt(r,10))})).replace(/&amp;/g,"&")}function sanitizeItemId(e){return e&&e.replace(/#/g,"_")}function getSchemaTitle(e,r){return r||(0,openapi_1.isNamedDefinition)(e)&&JsonPointer_1.default.baseName(e)||""}exports.isMergebleObject=isMergebleObject,exports.safeSlugify=safeSlugify,exports.isAbsoluteUrl=isAbsoluteUrl,exports.resolveUrl=resolveUrl,exports.getBasePath=getBasePath,exports.titleize=titleize,exports.removeQueryString=removeQueryString,exports.unescapeHTMLChars=unescapeHTMLChars,exports.sanitizeItemId=sanitizeItemId,exports.getSchemaTitle=getSchemaTitle;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getSchemaTitle=exports.sanitizeItemId=exports.unescapeHTMLChars=exports.removeQueryString=exports.titleize=exports.getBasePath=exports.resolveUrl=exports.isAbsoluteUrl=exports.safeSlugify=exports.isMergeableObject=exports.isObject=exports.mergeObjects=exports.appendToMdHeading=exports.isNumeric=exports.stripTrailingSlash=exports.flattenByProp=exports.mapValues=exports.mapWithLast=void 0;var tslib_1=require("tslib"),slugify_1=(0,tslib_1.__importDefault)(require("slugify")),url_1=require("url"),media_css_1=require("./media-css"),openapi_1=require("./openapi"),JsonPointer_1=(0,tslib_1.__importDefault)(require("./JsonPointer"));function mapWithLast(e,r){for(var t=[],s=0;s<e.length-1;s++)t.push(r(e[s],!1));return 0!==e.length&&t.push(r(e[e.length-1],!0)),t}function mapValues(e,r){var t={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=r(e[s],s,e));return t}function flattenByProp(e,r){var t=[],s=function(e){for(var i=0,n=e;i<n.length;i++){var a=n[i];t.push(a),a[r]&&s(a[r])}};return s(e),t}function stripTrailingSlash(e){return e.endsWith("/")?e.substring(0,e.length-1):e}function isNumeric(e){return!isNaN(parseFloat(e))&&isFinite(e)}function appendToMdHeading(e,r,t){var s=new RegExp("(^|\\n)#\\s?"+r+"\\s*\\n","i"),i=new RegExp("((\\n|^)#\\s*"+r+"\\s*(\\n|$)(?:.|\\n)*?)(\\n#|$)","i");if(s.test(e))return e.replace(i,"$1\n\n"+t+"\n$4");var n=""===e||e.endsWith("\n\n")?"":e.endsWith("\n")?"\n":"\n\n";return""+e+n+"# "+r+"\n\n"+t}exports.mapWithLast=mapWithLast,exports.mapValues=mapValues,exports.flattenByProp=flattenByProp,exports.stripTrailingSlash=stripTrailingSlash,exports.isNumeric=isNumeric,exports.appendToMdHeading=appendToMdHeading;var mergeObjects=function(e){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];if(!r.length)return e;var s=r.shift();return void 0===s?e:((0,exports.isMergeableObject)(e)&&(0,exports.isMergeableObject)(s)&&Object.keys(s).forEach((function(r){var t;(0,exports.isMergeableObject)(s[r])?(e[r]||(e[r]={}),["string","number"].includes(typeof e[r])&&(s[r][media_css_1.ZERO_BREAKPOINT]||0===s[r][media_css_1.ZERO_BREAKPOINT]||console.warn('Theme resolver: using default value of "'+e[r]+'" for "'+r+'". This is not recommended. Prefer adding default value by providing "'+media_css_1.ZERO_BREAKPOINT+'" property to '+JSON.stringify(s[r])+"."),e[r]=((t={})[media_css_1.ZERO_BREAKPOINT]=e[r],t)),(0,exports.mergeObjects)(e[r],s[r])):e[r]=s[r]})),exports.mergeObjects.apply(void 0,(0,tslib_1.__spreadArray)([e],r,!1)))};exports.mergeObjects=mergeObjects;var isObject=function(e){return null!==e&&"object"==typeof e};exports.isObject=isObject;var isMergeableObject=function(e){return(0,exports.isObject)(e)&&!Array.isArray(e)};function safeSlugify(e){return(0,slugify_1.default)(e)||e.toString().toLowerCase().replace(/\s+/g,"-").replace(/&/g,"-and-").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,"")}function isAbsoluteUrl(e){return/(?:^[a-z][a-z0-9+.-]*:|\/\/)/i.test(e)}function resolveUrl(e,r){var t;if(r.startsWith("//"))t=""+((0,url_1.parse)(e).protocol||"https:")+r;else if(isAbsoluteUrl(r))t=r;else if(r.startsWith("/")){var s=(0,url_1.parse)(e);t=(0,url_1.format)((0,tslib_1.__assign)((0,tslib_1.__assign)({},s),{pathname:r}))}else t=stripTrailingSlash(e)+"/"+r;return stripTrailingSlash(t)}function getBasePath(e){try{return parseURL(e).pathname}catch(r){return e}}function titleize(e){return e.charAt(0).toUpperCase()+e.slice(1)}function removeQueryString(e){try{var r=parseURL(e);return r.search="",r.toString()}catch(r){return e}}function parseURL(e){return"undefined"==typeof URL?new(require("url").URL)(e):new URL(e)}function unescapeHTMLChars(e){return e.replace(/&#(\d+);/g,(function(e,r){return String.fromCharCode(parseInt(r,10))})).replace(/&amp;/g,"&")}function sanitizeItemId(e){return e&&e.replace(/#/g,"_")}function getSchemaTitle(e,r){return r||(0,openapi_1.isNamedDefinition)(e)&&JsonPointer_1.default.baseName(e)||""}exports.isMergeableObject=isMergeableObject,exports.safeSlugify=safeSlugify,exports.isAbsoluteUrl=isAbsoluteUrl,exports.resolveUrl=resolveUrl,exports.getBasePath=getBasePath,exports.titleize=titleize,exports.removeQueryString=removeQueryString,exports.unescapeHTMLChars=unescapeHTMLChars,exports.sanitizeItemId=sanitizeItemId,exports.getSchemaTitle=getSchemaTitle;
2
2
  //# sourceMappingURL=helpers.js.map
@@ -1,4 +1,4 @@
1
- import { Document } from '@redocly/openapi-core';
1
+ import type { Document } from '@redocly/openapi-core';
2
2
  import type { OpenAPIDefinition } from '../types';
3
3
  export declare function loadAndBundleDefinition(specUrlOrObject: GenericObject | string): Promise<OpenAPIDefinition>;
4
4
  export declare function createParsedDocument(specUrlOrObject: GenericObject | string): Document;
@@ -1,4 +1,4 @@
1
- import { MediaValue } from '../theme';
1
+ import type { MediaValue } from '../theme';
2
2
  export declare const ZERO_BREAKPOINT = "_";
3
3
  export declare function mediaMap<T extends string | number>(breakpoints: {
4
4
  [size: string]: string;
@@ -1,6 +1,6 @@
1
- import { FieldModel } from '../services/models';
2
- import { OpenAPIParser } from '../services/OpenAPIParser';
3
- import { OpenAPIEncoding, OpenAPIMediaType, OpenAPIOperation, OpenAPIParameter, OpenAPIParameterStyle, OpenAPISchema, OpenAPIServer, Referenced, OpenAPIResponse, OpenAPIRequestBody } from '../types';
1
+ import type { FieldModel } from '../services/models';
2
+ import type { OpenAPIParser } from '../services/OpenAPIParser';
3
+ import type { OpenAPIEncoding, OpenAPIMediaType, OpenAPIOperation, OpenAPIParameter, OpenAPIParameterStyle, OpenAPISchema, OpenAPIServer, Referenced, OpenAPIResponse, OpenAPIRequestBody } from '../types';
4
4
  export declare function isStatusCode(statusCode: string): boolean;
5
5
  export declare function getStatusCodeType(statusCode: string | number, defaultAsError?: boolean): string;
6
6
  export declare function isOperationName(key: string): boolean;
@@ -1,5 +1,5 @@
1
- import { IMenuItem, ScrollService, HistoryService, MenuItemType, SchemaModel, SpecStore } from '../redoc-lib';
2
- import { RedocProNormalizedOptions } from './ProStore';
1
+ import type { IMenuItem, ScrollService, HistoryService, MenuItemType, SchemaModel, SpecStore } from '../redoc-lib';
2
+ import type { RedocProNormalizedOptions } from './ProStore';
3
3
  import { VersionedSpecStore } from './VersionedSpecStore';
4
4
  export declare type ExtendedMenuItem = Omit<IMenuItem, 'type'> & {
5
5
  type: MenuItemType | 'spec';
@@ -1,29 +1,16 @@
1
- import { IValueDidChange } from 'mobx';
2
- import { ContentItemModel, IMenuItem, MarkerService, OperationModel, RedocNormalizedOptions, RedocRawOptions, SearchStore, SpecStore, OpenAPIExternalDocumentation, OpenAPIDefinition } from '../redoc-lib';
1
+ import type { IValueDidChange } from 'mobx';
2
+ import type { ContentItemModel, IMenuItem, OpenAPIDefinition, OpenAPIExternalDocumentation, OperationModel, RedocRawOptions, SearchStore } from '../redoc-lib';
3
+ import { MarkerService, RedocNormalizedOptions, SpecStore } from '../redoc-lib';
3
4
  import { ProMenu } from './ProMenu';
4
- import { SearchResultMeta } from './SearchStore';
5
- import { ThemeExtension } from './extendTheme';
6
- import { SpecVersions, VersionedSpecStore } from './VersionedSpecStore';
7
- import { LicenseInfo } from './check';
8
- import { CodeSamplesConfig, Languages } from './code-samples/';
9
- import { Events, LayoutVariant } from './store-types';
10
- export declare type Normalized<T> = {
11
- [P in keyof T]-?: T[P];
12
- };
13
- export declare type RedocProTheme = RedocRawOptions['theme'] & ThemeExtension;
14
- export declare type MarkdownItemsPagination = 'none' | 'section';
15
- export declare type Pagination = 'none' | 'section' | 'item';
16
- export declare type ExternalLink = ExternalLinkLink | ExternalLinkSeparator;
17
- export declare type ExternalLinkLink = {
18
- label: string;
19
- link: string;
20
- target?: string;
21
- separatorLine?: boolean;
22
- };
23
- export declare type ExternalLinkSeparator = {
24
- separator?: string;
25
- separatorLine?: boolean;
26
- };
5
+ import type { SearchResultMeta } from './SearchStore';
6
+ import type { SpecVersions } from './VersionedSpecStore';
7
+ import { VersionedSpecStore } from './VersionedSpecStore';
8
+ import type { LicenseInfo } from './check';
9
+ import type { CodeSamplesConfig, Languages } from './code-samples/';
10
+ import type { Events } from './store-types';
11
+ import { LayoutVariant } from './store-types';
12
+ import type { ExternalLink, MarkdownItemsPagination, Normalized, Pagination, RedocProTheme } from './types';
13
+ import { SideNavStyle } from './types';
27
14
  export declare type RedocProUserOptionsExt = {
28
15
  licenseKey?: string;
29
16
  searchMode?: 'default' | 'path-only';
@@ -31,7 +18,7 @@ export declare type RedocProUserOptionsExt = {
31
18
  searchTagTitleBoost?: number | string;
32
19
  searchFieldLevelBoost?: number | string;
33
20
  searchAutoExpand?: boolean;
34
- sideNavStyle?: 'summary-only' | 'path-first';
21
+ sideNavStyle?: SideNavStyle;
35
22
  showConsole?: boolean;
36
23
  hideLogo?: boolean;
37
24
  whiteLabel?: boolean;
@@ -1,2 +1,2 @@
1
- "use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.ProStore=exports.NestingGroup=void 0;var tslib_1=require("tslib"),mobx_1=require("mobx"),openapi_core_1=require("@redocly/openapi-core"),decko_1=require("decko"),redoc_lib_1=require("../redoc-lib"),history_1=require("./history"),ProMenu_1=require("./ProMenu"),SearchStore_1=require("./SearchStore"),extendTheme_1=require("./extendTheme"),pluggable_1=require("../components/pluggable"),VersionedSpecStore_1=require("./VersionedSpecStore"),check_1=(0,tslib_1.__importDefault)(require("./check")),utils_1=require("./utils"),utils_2=require("../utils"),store_types_1=require("./store-types"),global="undefined"==typeof window?{__REDOCLY_SEARCH_URL:void 0}:window,NestingGroup=function(){function e(e,t,i,o){var n=this;Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"absoluteIdx",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"description",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"linkable",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"items",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"parent",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"externalDocs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"active",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"expanded",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"depth",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"level",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),(0,mobx_1.makeObservable)(this),this.id="section/"+e,this.type="nesting-group",this.name=i||"",this.level=1,this.depth=1,this.description="",this.parent=void 0,this.expanded=!1,this.items=t,this.linkable=!!o,t.forEach((function(e){return e.parent=n})),increaseDepthDeep(t)}return Object.defineProperty(e.prototype,"activate",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.active=!0}}),Object.defineProperty(e.prototype,"expand",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.expanded=!0,this.parent&&this.parent.expand()}}),Object.defineProperty(e.prototype,"collapse",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.expanded=!1}}),Object.defineProperty(e.prototype,"deactivate",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.active=!1}}),(0,tslib_1.__decorate)([mobx_1.observable],e.prototype,"active",void 0),(0,tslib_1.__decorate)([mobx_1.observable],e.prototype,"expanded",void 0),(0,tslib_1.__decorate)([mobx_1.action],e.prototype,"activate",null),(0,tslib_1.__decorate)([mobx_1.action],e.prototype,"expand",null),(0,tslib_1.__decorate)([mobx_1.action],e.prototype,"collapse",null),(0,tslib_1.__decorate)([mobx_1.action],e.prototype,"deactivate",null),e}();function increaseDepthDeep(e){Array.isArray(e)&&e.forEach((function(e){e.depth++,e.parent&&"group"===e.parent.type&&(e.depth=e.parent.depth),increaseDepthDeep(e.items)}))}exports.NestingGroup=NestingGroup;var ProStore=function(){function e(e,t,i,o){var n=this;void 0===i&&(i={}),void 0===o&&(o=!0),Object.defineProperty(this,"rawOptions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"menu",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"definition",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"marker",{enumerable:!0,configurable:!0,writable:!0,value:new redoc_lib_1.MarkerService}),Object.defineProperty(this,"scroll",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"disposer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"search",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"tryItOperation",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"showRightPanel",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"layout",{enumerable:!0,configurable:!0,writable:!0,value:store_types_1.LayoutVariant.THREE_PANEL}),Object.defineProperty(this,"activeSampleLanguage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"isLoading",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"l",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),(0,mobx_1.makeObservable)(this),this.initProOptions(i),redoc_lib_1.IS_BROWSER&&(this.l=(0,check_1.default)(i.licenseKey),this.l.then((function(e){e.valid&&e.allowed&&!e.expired||e.local||(n.menu.items=[],n.menu.flatItems=n.menu.flatItems.slice(0,1),n.menu.renderItems=[])})));var r="object"==typeof e&&"versions"in e,a=this.options.disableSidebar?new history_1.FakeHistoryService(this.options):"browser"===this.options.routingStrategy?new history_1.PushStateHistoryService(this.options,r):new history_1.ProHashHistoryService(this.options,r);this.definition=r?new VersionedSpecStore_1.VersionedSpecStore(e,this.options,a.currentId.split("/")[0]):new redoc_lib_1.SpecStore(e,t,this.options),i.downloadDefinitionUrl&&(this.definition.info.downloadFileName=""),this.scroll=new redoc_lib_1.ScrollService(this.options),this.options.disableSidebar||ProMenu_1.ProMenu.updateOnHistory(a.currentId,this.scroll),this.menu=new ProMenu_1.ProMenu(this.definition,this.scroll,this.options,a),this.menu.initOnHistory(),this.options.disableSearch||this.initSearch(this.options,o),this.disposer=(0,mobx_1.observe)(this.menu,"none"===this.options.pagination?"activeItemIdx":"activeRenderItemIdx",(function(e){setTimeout((function(){return n.updateMarkOnMenu(e.newValue)}))})),(0,utils_2.setGlobalStore)(this)}return Object.defineProperty(e.prototype,"initProOptions",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t,i,o,n,r;e=deepClone(e),this.rawOptions=(0,extendTheme_1.extendTheme)(e),this.options=new redoc_lib_1.RedocNormalizedOptions(this.rawOptions,DEFAULT_OPTIONS),this.options.showConsole=null===(t=this.rawOptions.showConsole)||void 0===t||t,this.options.hideRightPanel=null!==(i=this.rawOptions.hideRightPanel)&&void 0!==i&&i,this.showRightPanel=!this.options.hideRightPanel,this.options.showRightPanelToggle=null===(o=this.rawOptions.showRightPanelToggle)||void 0===o||o,this.options.showChangeLayoutButton=null===(n=this.rawOptions.showChangeLayoutButton)||void 0===n||n,this.options.layout=this.rawOptions.layout||store_types_1.LayoutVariant.THREE_PANEL,this.options.defaultSampleLanguage=this.rawOptions.defaultSampleLanguage||"",this.options.deepLinkSeparator=this.rawOptions.deepLinkSeparator||"/",this.options.deepLinkPrefix=this.rawOptions.deepLinkPrefix||"!",this.options.disableDeepLinks=this.rawOptions.disableDeepLinks||!1,this.options.sideNavStyle=this.rawOptions.sideNavStyle||"summary-only",this.options.whiteLabel=!!this.rawOptions.whiteLabel,this.options.hideLogo=!!this.rawOptions.hideLogo,this.options.hideInfoSection=!!this.rawOptions.hideInfoSection,this.options.oAuth2RedirectURI=this.rawOptions.oAuth2RedirectURI||null,this.options.oAuth2RedirectURI=this.rawOptions.oAuth2RedirectURI||null,this.options.events=this.rawOptions.events||{},this.options.corsProxyUrl=this.rawOptions.corsProxyUrl?addTrailingSlash(this.rawOptions.corsProxyUrl):null,this.options.authCorsProxyUrl=this.rawOptions.authCorsProxyUrl?addTrailingSlash(this.rawOptions.authCorsProxyUrl):null,this.options.theme.scrollYOffset=this.options.scrollYOffset,this.options.linkForId=this.rawOptions.linkForId||null,this.options.generateDeepLink=this.rawOptions.generateDeepLink||null,this.options.onDeepLinkClick=this.rawOptions.onDeepLinkClick||null,this.options.requestInterceptor=this.rawOptions.requestInterceptor||null,this.options.sidebarLinks=this.rawOptions.sidebarLinks||{};var a="object"==typeof this.rawOptions.layout?this.rawOptions.layout:null;if(this.options.pagination=this.rawOptions.pagination||"none",this.options.routingStrategy="none"===this.options.pagination?"hash":"browser",!(null===(r=this.rawOptions)||void 0===r?void 0:r.pagination)&&(null==a?void 0:a.scope))switch(console.warn('"layout.scope" and "routingStrategy" settings are deprecated. Please, use "pagination" instead.'),null==a?void 0:a.scope){case"all":default:this.options.pagination="none",this.options.routingStrategy="hash";break;case"section":this.options.pagination="section",this.options.routingStrategy="browser";break;case"item":this.options.pagination="item",this.options.routingStrategy="browser"}this.options.markdownItemsPagination="none",!1!==this.rawOptions.showNextButton&&(this.options.showNextButton=!0),this.options.disableSidebar=!!e.disableSidebar,this.options.disableSidebar&&(this.options.theme.sidebar.width="0px"),this.options.skipBundleAndConvert=!!e.skipBundleAndConvert,this.options.routingBasePath=e.routingBasePath&&(0,utils_1.normalizePath)(e.routingBasePath)||"",this.options.searchAutoExpand=!1!==e.searchAutoExpand,this.options.searchMode=e.searchMode||"default",this.options.ctrlFHijack=void 0===e.ctrlFHijack||e.ctrlFHijack,this.options.disablePaginationLoadingAnimation=!!e.disablePaginationLoadingAnimation||"none"===this.options.pagination,this.options.showConsole,this.options.generateCodeSamples=e.generateCodeSamples||{languages:[]},this.options.searchMaxDepth=this.rawOptions.searchMaxDepth||SearchStore_1.DEFAULT_SEARCH_MAX_DEPTH}}),Object.defineProperty(e.prototype,"initSearch",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var i=this;global.__REDOCLY_SEARCH_URL?this.search=new SearchStore_1.RemoteSearch(global.__REDOCLY_SEARCH_URL):this.search=new SearchStore_1.DeepSearchStore(e),t&&setTimeout((function(){var e;return null===(e=i.search)||void 0===e?void 0:e.indexItems(i.menu.items)}),50),this.definition instanceof VersionedSpecStore_1.VersionedSpecStore&&(0,mobx_1.observe)(this.definition,"activeVersionIdx",(function(t){var o,n,r=i.definition;null===(o=i.search)||void 0===o||o.dispose(),i.search=new SearchStore_1.DeepSearchStore(e);var a=r.versions[t.newValue]._searchIndexName;if(redoc_lib_1.IS_BROWSER&&a){var s=r.versions[t.newValue]._searchIndexName,l=new URL(window.location.href);l.pathname=joinURLs(i.options.routingBasePath,s),null===(n=i.search)||void 0===n||n.fromExternalJS(l.toString(),__redoc_state.searchIndexExport),i.observeAllAndRemark()}else setTimeout((function(){var e;null===(e=i.search)||void 0===e||e.indexItems(i.menu.items)}),0)})),redoc_lib_1.IS_BROWSER&&this.observeAllAndRemark()}}),Object.defineProperty(e.prototype,"onDidMount",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(this.menu.updateOnHistory(),this.updateMarkOnMenu(this.menu.activeItemIdx),this.layout=(0,utils_2.fromLocalStorage)("layoutVariant")||this.options.layout||this.layout,this.activeSampleLanguage=(0,utils_2.fromLocalStorage)("activeSampleLanguage")||this.options.defaultSampleLanguage,this.options.showRightPanelToggle){var e=(0,utils_2.fromSessionStorage)("showRightPanelToggleState");e&&(this.showRightPanel="true"===e)}}}),Object.defineProperty(e.prototype,"toggleRightPanel",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.showRightPanel=null!=e?e:!this.showRightPanel,(0,utils_2.toSessionStorage)("showRightPanelToggleState",JSON.stringify(this.showRightPanel))}}),Object.defineProperty(e.prototype,"toggleLayout",{enumerable:!1,configurable:!0,writable:!0,value:function(e){void 0===e&&(e=store_types_1.LayoutVariant.THREE_PANEL),this.layout=e,(0,utils_2.toLocalStorage)("layoutVariant",e)}}),Object.defineProperty(e.prototype,"disableConsole",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.options.showConsole=!1}}),Object.defineProperty(e.prototype,"enableConsole",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.options.showConsole=!0}}),Object.defineProperty(e.prototype,"tryItOut",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.tryItOperation=e}}),Object.defineProperty(e.prototype,"setActiveSampleLanguage",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(this.activeSampleLanguage===e)return this.stopLoader();this.activeSampleLanguage=e,(0,utils_2.toLocalStorage)("activeSampleLanguage",e)}}),Object.defineProperty(e.prototype,"activateSampleLanguage",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.setActiveSampleLanguage(e)}}),Object.defineProperty(e.prototype,"startLoader",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.isLoading||(this.isLoading=!0)}}),Object.defineProperty(e.prototype,"stopLoader",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.isLoading&&(this.isLoading=!1)}}),Object.defineProperty(e.prototype,"dereferenceSpecForTryIt",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t,i,o,n;return(0,tslib_1.__awaiter)(this,void 0,void 0,(function(){var r,a,s,l,p,u,c,d;return(0,tslib_1.__generator)(this,(function(h){switch(h.label){case 0:return r=this.definition.parser.definition,a=JSON.parse(JSON.stringify(r)),s=(0,tslib_1.__assign)((0,tslib_1.__assign)({},getSpecVersionObj(a)),{components:a.components,paths:(c={},c[e.path]=(d={},d[e.httpVerb]=null===(i=null===(t=a.paths)||void 0===t?void 0:t[e.path])||void 0===i?void 0:i[e.httpVerb],d.parameters=null===(n=null===(o=a.paths)||void 0===o?void 0:o[e.path])||void 0===n?void 0:n.parameters,d),c)}),l=new openapi_core_1.Config({}),p=(0,redoc_lib_1.createParsedDocument)(s),u={config:l,doc:p,dereference:!0},[4,(0,openapi_core_1.bundle)(u)];case 1:return h.sent(),[2,a]}}))}))}}),Object.defineProperty(e.prototype,"observeAllAndRemark",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this,t=function(i){for(var o=0,n=i;o<n.length;o++){var r=n[o];if("operation"===r.type)for(var a=0,s=r.responses;a<s.length;a++){var l=s[a];(0,mobx_1.observe)(l,"expanded",(function(t){return e.remark(t)}))}else"tag"===r.type&&t(r.items||[])}};t(this.menu.renderItems),"none"!==this.options.pagination&&(0,mobx_1.observe)(this.menu,"renderItems",(function(){return t(e.menu.renderItems)}))}}),Object.defineProperty(e.prototype,"remark",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;e.newValue&&setTimeout((function(){return t.marker.mark()}),0)}}),Object.defineProperty(e,"fromJS",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var i,o=new e(t.definition.data,t.definition.url,t.options,!1);(0,utils_2.setGlobalStore)(o),o.menu.activeItemIdx=void 0!==t.menu.activeItemIdx?t.menu.activeItemIdx:-1,o.definition instanceof VersionedSpecStore_1.VersionedSpecStore&&t.definition.activeVersionIdx&&(o.definition.activeVersionIdx=t.definition.activeVersionIdx||0);var n=o.menu.flatItems[o.menu.activeItemIdx];if(n&&o.menu.activate(n,!1),!o.options.disableSearch){var r=new URL(window.location.href);r.pathname=t.searchIndexPath&&t.searchIndexPath.startsWith("/")?t.searchIndexPath:r.pathname+(r.pathname.endsWith("/")?"":"/")+t.searchIndexPath,null===(i=o.search)||void 0===i||i.fromExternalJS(r.toString(),t.searchIndexExport)}return t.tryItOperationId&&(o.tryItOperation=o.menu.flatItems.find((function(e){return e.id===t.tryItOperationId}))),setTimeout((function(){return o.observeAllAndRemark()}),0),o}}),Object.defineProperty(e.prototype,"toJS",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e;return(0,tslib_1.__awaiter)(this,void 0,void 0,(function(){var t,i;return(0,tslib_1.__generator)(this,(function(o){switch(o.label){case 0:return i={menu:{activeItemIdx:this.menu.activeItemIdx},definition:this.definition instanceof VersionedSpecStore_1.VersionedSpecStore?{url:void 0,data:this.definition.toJS()}:{url:this.definition.parser.definitionUrl,data:this.definition.parser.definition}},this.search?[4,this.search.toJS()]:[3,2];case 1:return t=o.sent(),[3,3];case 2:t=void 0,o.label=3;case 3:return[2,(i.searchIndex=t,i.options=this.rawOptions,i.tryItOperationId=null===(e=this.tryItOperation)||void 0===e?void 0:e.id,i)]}}))}))}}),Object.defineProperty(e.prototype,"dispose",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.scroll.dispose(),this.menu.dispose(),this.search&&this.search.dispose(),this.disposer()}}),Object.defineProperty(e.prototype,"updateMarkOnMenu",{enumerable:!1,configurable:!0,writable:!0,value:function(e){for(var t=Math.max(0,e),i=Math.min(this.menu.flatItems.length,t+5),o=[],n=t;n<i;n++){(r=this.menu.getElementAt(n))&&(r&&o.push(r))}if("item"===this.options.pagination){var r,a=(this.menu.flatItems[e]||{}).parent;if(null==a?void 0:a.absoluteIdx)(r=this.menu.getElementAt(a.absoluteIdx))&&o.push(r)}this.marker.addOnly(o),this.marker.mark()}}),(0,tslib_1.__decorate)([mobx_1.observable],e.prototype,"search",void 0),(0,tslib_1.__decorate)([mobx_1.observable],e.prototype,"tryItOperation",void 0),(0,tslib_1.__decorate)([mobx_1.observable],e.prototype,"showRightPanel",void 0),(0,tslib_1.__decorate)([mobx_1.observable],e.prototype,"layout",void 0),(0,tslib_1.__decorate)([mobx_1.observable],e.prototype,"activeSampleLanguage",void 0),(0,tslib_1.__decorate)([mobx_1.observable],e.prototype,"isLoading",void 0),(0,tslib_1.__decorate)([mobx_1.action],e.prototype,"onDidMount",null),(0,tslib_1.__decorate)([mobx_1.action],e.prototype,"toggleRightPanel",null),(0,tslib_1.__decorate)([mobx_1.action],e.prototype,"toggleLayout",null),(0,tslib_1.__decorate)([mobx_1.action],e.prototype,"disableConsole",null),(0,tslib_1.__decorate)([mobx_1.action],e.prototype,"enableConsole",null),(0,tslib_1.__decorate)([mobx_1.action],e.prototype,"tryItOut",null),(0,tslib_1.__decorate)([mobx_1.action],e.prototype,"setActiveSampleLanguage",null),(0,tslib_1.__decorate)([decko_1.bind,(0,decko_1.debounce)(500)],e.prototype,"activateSampleLanguage",null),(0,tslib_1.__decorate)([mobx_1.action],e.prototype,"startLoader",null),(0,tslib_1.__decorate)([mobx_1.action],e.prototype,"stopLoader",null),e}();exports.ProStore=ProStore;var DEFAULT_OPTIONS={ignoreNamedSchemas:["java.io.ObjectStreamField"],allowedMdComponents:(_a={RedocResponse:{component:pluggable_1.RedocResponse,propsSelector:function(e){return{store:e}}},PullRight:{component:pluggable_1.PullRight,propsSelector:function(){return{}}}},_a[redoc_lib_1.SECURITY_DEFINITIONS_COMPONENT_NAME]={component:redoc_lib_1.SecurityDefs,propsSelector:function(e){return{securitySchemes:e.definition.securitySchemes}}},_a[redoc_lib_1.SECURITY_DEFINITIONS_JSX_NAME]={component:redoc_lib_1.SecurityDefs,propsSelector:function(e){return{securitySchemes:e.definition.securitySchemes}}},_a[redoc_lib_1.SCHEMA_DEFINITION_JSX_NAME]={component:redoc_lib_1.SchemaDefinition,propsSelector:function(e){return{parser:e.definition.parser,options:e.options,layout:e.layout,showRightPanel:e.showRightPanel}}},_a)};function joinURLs(e,t){return e.endsWith("/")&&(e=e.slice(0,-1)),t.startsWith("/")&&(t=t.substring(1)),e+"/"+t}function addTrailingSlash(e){return e.endsWith("/")?e:e+"/"}function getSpecVersionObj(e){return e.openapi?{openapi:e.openapi}:e.swagger?{swagger:e.swagger}:void 0}function deepClone(e){if("object"!=typeof e||null===e)return e;var t=Array.isArray(e)?[]:{};for(var i in e){var o=e[i];t[i]=deepClone(o)}return t}
1
+ "use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.ProStore=exports.NestingGroup=void 0;var tslib_1=require("tslib"),mobx_1=require("mobx"),openapi_core_1=require("@redocly/openapi-core"),decko_1=require("decko"),redoc_lib_1=require("../redoc-lib"),history_1=require("./history"),ProMenu_1=require("./ProMenu"),SearchStore_1=require("./SearchStore"),extendTheme_1=require("./extendTheme"),pluggable_1=require("../components/pluggable"),VersionedSpecStore_1=require("./VersionedSpecStore"),check_1=(0,tslib_1.__importDefault)(require("./check")),utils_1=require("./utils"),utils_2=require("../utils"),store_types_1=require("./store-types"),types_1=require("./types"),global="undefined"==typeof window?{__REDOCLY_SEARCH_URL:void 0}:window,NestingGroup=function(){function e(e,t,i,o){var n=this;Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"absoluteIdx",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"description",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"linkable",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"items",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"parent",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"externalDocs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"active",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"expanded",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"depth",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"level",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),(0,mobx_1.makeObservable)(this),this.id="section/"+e,this.type="nesting-group",this.name=i||"",this.level=1,this.depth=1,this.description="",this.parent=void 0,this.expanded=!1,this.items=t,this.linkable=!!o,t.forEach((function(e){return e.parent=n})),increaseDepthDeep(t)}return Object.defineProperty(e.prototype,"activate",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.active=!0}}),Object.defineProperty(e.prototype,"expand",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.expanded=!0,this.parent&&this.parent.expand()}}),Object.defineProperty(e.prototype,"collapse",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.expanded=!1}}),Object.defineProperty(e.prototype,"deactivate",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.active=!1}}),(0,tslib_1.__decorate)([mobx_1.observable],e.prototype,"active",void 0),(0,tslib_1.__decorate)([mobx_1.observable],e.prototype,"expanded",void 0),(0,tslib_1.__decorate)([mobx_1.action],e.prototype,"activate",null),(0,tslib_1.__decorate)([mobx_1.action],e.prototype,"expand",null),(0,tslib_1.__decorate)([mobx_1.action],e.prototype,"collapse",null),(0,tslib_1.__decorate)([mobx_1.action],e.prototype,"deactivate",null),e}();function increaseDepthDeep(e){Array.isArray(e)&&e.forEach((function(e){e.depth++,e.parent&&"group"===e.parent.type&&(e.depth=e.parent.depth),increaseDepthDeep(e.items)}))}exports.NestingGroup=NestingGroup;var ProStore=function(){function e(e,t,i,o){var n=this;void 0===i&&(i={}),void 0===o&&(o=!0),Object.defineProperty(this,"rawOptions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"menu",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"definition",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"marker",{enumerable:!0,configurable:!0,writable:!0,value:new redoc_lib_1.MarkerService}),Object.defineProperty(this,"scroll",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"disposer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"search",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"tryItOperation",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"showRightPanel",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"layout",{enumerable:!0,configurable:!0,writable:!0,value:store_types_1.LayoutVariant.THREE_PANEL}),Object.defineProperty(this,"activeSampleLanguage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"isLoading",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"l",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),(0,mobx_1.makeObservable)(this),this.initProOptions(i),redoc_lib_1.IS_BROWSER&&(this.l=(0,check_1.default)(i.licenseKey),this.l.then((function(e){e.valid&&e.allowed&&!e.expired||e.local||(n.menu.items=[],n.menu.flatItems=n.menu.flatItems.slice(0,1),n.menu.renderItems=[])})));var r="object"==typeof e&&"versions"in e,a=this.options.disableSidebar?new history_1.FakeHistoryService(this.options):"browser"===this.options.routingStrategy?new history_1.PushStateHistoryService(this.options,r):new history_1.ProHashHistoryService(this.options,r);this.definition=r?new VersionedSpecStore_1.VersionedSpecStore(e,this.options,a.currentId.split("/")[0]):new redoc_lib_1.SpecStore(e,t,this.options),i.downloadDefinitionUrl&&(this.definition.info.downloadFileName=""),this.scroll=new redoc_lib_1.ScrollService(this.options),this.options.disableSidebar||ProMenu_1.ProMenu.updateOnHistory(a.currentId,this.scroll),this.menu=new ProMenu_1.ProMenu(this.definition,this.scroll,this.options,a),this.menu.initOnHistory(),this.options.disableSearch||this.initSearch(this.options,o),this.disposer=(0,mobx_1.observe)(this.menu,"none"===this.options.pagination?"activeItemIdx":"activeRenderItemIdx",(function(e){setTimeout((function(){return n.updateMarkOnMenu(e.newValue)}))})),(0,utils_2.setGlobalStore)(this)}return Object.defineProperty(e.prototype,"initProOptions",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t,i,o,n,r;e=deepClone(e),this.rawOptions=(0,extendTheme_1.extendTheme)(e),this.options=new redoc_lib_1.RedocNormalizedOptions(this.rawOptions,DEFAULT_OPTIONS),this.options.showConsole=null===(t=this.rawOptions.showConsole)||void 0===t||t,this.options.hideRightPanel=null!==(i=this.rawOptions.hideRightPanel)&&void 0!==i&&i,this.showRightPanel=!this.options.hideRightPanel,this.options.showRightPanelToggle=null===(o=this.rawOptions.showRightPanelToggle)||void 0===o||o,this.options.showChangeLayoutButton=null===(n=this.rawOptions.showChangeLayoutButton)||void 0===n||n,this.options.layout=this.rawOptions.layout||store_types_1.LayoutVariant.THREE_PANEL,this.options.defaultSampleLanguage=this.rawOptions.defaultSampleLanguage||"",this.options.deepLinkSeparator=this.rawOptions.deepLinkSeparator||"/",this.options.deepLinkPrefix=this.rawOptions.deepLinkPrefix||"!",this.options.disableDeepLinks=this.rawOptions.disableDeepLinks||!1,this.options.sideNavStyle=this.rawOptions.sideNavStyle||types_1.SideNavStyle.SummaryOnly,this.options.whiteLabel=!!this.rawOptions.whiteLabel,this.options.hideLogo=!!this.rawOptions.hideLogo,this.options.hideInfoSection=!!this.rawOptions.hideInfoSection,this.options.oAuth2RedirectURI=this.rawOptions.oAuth2RedirectURI||null,this.options.oAuth2RedirectURI=this.rawOptions.oAuth2RedirectURI||null,this.options.events=this.rawOptions.events||{},this.options.corsProxyUrl=this.rawOptions.corsProxyUrl?addTrailingSlash(this.rawOptions.corsProxyUrl):null,this.options.authCorsProxyUrl=this.rawOptions.authCorsProxyUrl?addTrailingSlash(this.rawOptions.authCorsProxyUrl):null,this.options.theme.scrollYOffset=this.options.scrollYOffset,this.options.linkForId=this.rawOptions.linkForId||null,this.options.generateDeepLink=this.rawOptions.generateDeepLink||null,this.options.onDeepLinkClick=this.rawOptions.onDeepLinkClick||null,this.options.requestInterceptor=this.rawOptions.requestInterceptor||null,this.options.sidebarLinks=this.rawOptions.sidebarLinks||{};var a="object"==typeof this.rawOptions.layout?this.rawOptions.layout:null;if(this.options.pagination=this.rawOptions.pagination||"none",this.options.routingStrategy="none"===this.options.pagination?"hash":"browser",!(null===(r=this.rawOptions)||void 0===r?void 0:r.pagination)&&(null==a?void 0:a.scope))switch(console.warn('"layout.scope" and "routingStrategy" settings are deprecated. Please, use "pagination" instead.'),null==a?void 0:a.scope){case"all":default:this.options.pagination="none",this.options.routingStrategy="hash";break;case"section":this.options.pagination="section",this.options.routingStrategy="browser";break;case"item":this.options.pagination="item",this.options.routingStrategy="browser"}this.options.markdownItemsPagination="none",!1!==this.rawOptions.showNextButton&&(this.options.showNextButton=!0),this.options.disableSidebar=!!e.disableSidebar,this.options.disableSidebar&&(this.options.theme.sidebar.width="0px"),this.options.skipBundleAndConvert=!!e.skipBundleAndConvert,this.options.routingBasePath=e.routingBasePath&&(0,utils_1.normalizePath)(e.routingBasePath)||"",this.options.searchAutoExpand=!1!==e.searchAutoExpand,this.options.searchMode=e.searchMode||"default",this.options.ctrlFHijack=void 0===e.ctrlFHijack||e.ctrlFHijack,this.options.disablePaginationLoadingAnimation=!!e.disablePaginationLoadingAnimation||"none"===this.options.pagination,this.options.showConsole,this.options.generateCodeSamples=e.generateCodeSamples||{languages:[]},this.options.searchMaxDepth=this.rawOptions.searchMaxDepth||SearchStore_1.DEFAULT_SEARCH_MAX_DEPTH}}),Object.defineProperty(e.prototype,"initSearch",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var i=this;global.__REDOCLY_SEARCH_URL?this.search=new SearchStore_1.RemoteSearch(global.__REDOCLY_SEARCH_URL):this.search=new SearchStore_1.DeepSearchStore(e),t&&setTimeout((function(){var e;return null===(e=i.search)||void 0===e?void 0:e.indexItems(i.menu.items)}),50),this.definition instanceof VersionedSpecStore_1.VersionedSpecStore&&(0,mobx_1.observe)(this.definition,"activeVersionIdx",(function(t){var o,n,r=i.definition;null===(o=i.search)||void 0===o||o.dispose(),i.search=new SearchStore_1.DeepSearchStore(e);var a=r.versions[t.newValue]._searchIndexName;if(redoc_lib_1.IS_BROWSER&&a){var s=r.versions[t.newValue]._searchIndexName,l=new URL(window.location.href);l.pathname=joinURLs(i.options.routingBasePath,s),null===(n=i.search)||void 0===n||n.fromExternalJS(l.toString(),__redoc_state.searchIndexExport),i.observeAllAndRemark()}else setTimeout((function(){var e;null===(e=i.search)||void 0===e||e.indexItems(i.menu.items)}),0)})),redoc_lib_1.IS_BROWSER&&this.observeAllAndRemark()}}),Object.defineProperty(e.prototype,"onDidMount",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(this.menu.updateOnHistory(),this.updateMarkOnMenu(this.menu.activeItemIdx),this.layout=(0,utils_2.fromLocalStorage)("layoutVariant")||this.options.layout||this.layout,this.activeSampleLanguage=(0,utils_2.fromLocalStorage)("activeSampleLanguage")||this.options.defaultSampleLanguage,this.options.showRightPanelToggle){var e=(0,utils_2.fromSessionStorage)("showRightPanelToggleState");e&&(this.showRightPanel="true"===e)}}}),Object.defineProperty(e.prototype,"toggleRightPanel",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.showRightPanel=null!=e?e:!this.showRightPanel,(0,utils_2.toSessionStorage)("showRightPanelToggleState",JSON.stringify(this.showRightPanel))}}),Object.defineProperty(e.prototype,"toggleLayout",{enumerable:!1,configurable:!0,writable:!0,value:function(e){void 0===e&&(e=store_types_1.LayoutVariant.THREE_PANEL),this.layout=e,(0,utils_2.toLocalStorage)("layoutVariant",e)}}),Object.defineProperty(e.prototype,"disableConsole",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.options.showConsole=!1}}),Object.defineProperty(e.prototype,"enableConsole",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.options.showConsole=!0}}),Object.defineProperty(e.prototype,"tryItOut",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.tryItOperation=e}}),Object.defineProperty(e.prototype,"setActiveSampleLanguage",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(this.activeSampleLanguage===e)return this.stopLoader();this.activeSampleLanguage=e,(0,utils_2.toLocalStorage)("activeSampleLanguage",e)}}),Object.defineProperty(e.prototype,"activateSampleLanguage",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.setActiveSampleLanguage(e)}}),Object.defineProperty(e.prototype,"startLoader",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.isLoading||(this.isLoading=!0)}}),Object.defineProperty(e.prototype,"stopLoader",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.isLoading&&(this.isLoading=!1)}}),Object.defineProperty(e.prototype,"dereferenceSpecForTryIt",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t,i,o,n;return(0,tslib_1.__awaiter)(this,void 0,void 0,(function(){var r,a,s,l,p,u,c,d;return(0,tslib_1.__generator)(this,(function(h){switch(h.label){case 0:return r=this.definition.parser.definition,a=JSON.parse(JSON.stringify(r)),s=(0,tslib_1.__assign)((0,tslib_1.__assign)({},getSpecVersionObj(a)),{components:a.components,paths:(c={},c[e.path]=(d={},d[e.httpVerb]=null===(i=null===(t=a.paths)||void 0===t?void 0:t[e.path])||void 0===i?void 0:i[e.httpVerb],d.parameters=null===(n=null===(o=a.paths)||void 0===o?void 0:o[e.path])||void 0===n?void 0:n.parameters,d),c)}),l=new openapi_core_1.Config({}),p=(0,redoc_lib_1.createParsedDocument)(s),u={config:l,doc:p,dereference:!0},[4,(0,openapi_core_1.bundle)(u)];case 1:return h.sent(),[2,a]}}))}))}}),Object.defineProperty(e.prototype,"observeAllAndRemark",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this,t=function(i){for(var o=0,n=i;o<n.length;o++){var r=n[o];if("operation"===r.type)for(var a=0,s=r.responses;a<s.length;a++){var l=s[a];(0,mobx_1.observe)(l,"expanded",(function(t){return e.remark(t)}))}else"tag"===r.type&&t(r.items||[])}};t(this.menu.renderItems),"none"!==this.options.pagination&&(0,mobx_1.observe)(this.menu,"renderItems",(function(){return t(e.menu.renderItems)}))}}),Object.defineProperty(e.prototype,"remark",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;e.newValue&&setTimeout((function(){return t.marker.mark()}),0)}}),Object.defineProperty(e,"fromJS",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var i,o=new e(t.definition.data,t.definition.url,t.options,!1);(0,utils_2.setGlobalStore)(o),o.menu.activeItemIdx=void 0!==t.menu.activeItemIdx?t.menu.activeItemIdx:-1,o.definition instanceof VersionedSpecStore_1.VersionedSpecStore&&t.definition.activeVersionIdx&&(o.definition.activeVersionIdx=t.definition.activeVersionIdx||0);var n=o.menu.flatItems[o.menu.activeItemIdx];if(n&&o.menu.activate(n,!1),!o.options.disableSearch){var r=new URL(window.location.href);r.pathname=t.searchIndexPath&&t.searchIndexPath.startsWith("/")?t.searchIndexPath:r.pathname+(r.pathname.endsWith("/")?"":"/")+t.searchIndexPath,null===(i=o.search)||void 0===i||i.fromExternalJS(r.toString(),t.searchIndexExport)}return t.tryItOperationId&&(o.tryItOperation=o.menu.flatItems.find((function(e){return e.id===t.tryItOperationId}))),setTimeout((function(){return o.observeAllAndRemark()}),0),o}}),Object.defineProperty(e.prototype,"toJS",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e;return(0,tslib_1.__awaiter)(this,void 0,void 0,(function(){var t,i;return(0,tslib_1.__generator)(this,(function(o){switch(o.label){case 0:return i={menu:{activeItemIdx:this.menu.activeItemIdx},definition:this.definition instanceof VersionedSpecStore_1.VersionedSpecStore?{url:void 0,data:this.definition.toJS()}:{url:this.definition.parser.definitionUrl,data:this.definition.parser.definition}},this.search?[4,this.search.toJS()]:[3,2];case 1:return t=o.sent(),[3,3];case 2:t=void 0,o.label=3;case 3:return[2,(i.searchIndex=t,i.options=this.rawOptions,i.tryItOperationId=null===(e=this.tryItOperation)||void 0===e?void 0:e.id,i)]}}))}))}}),Object.defineProperty(e.prototype,"dispose",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.scroll.dispose(),this.menu.dispose(),this.search&&this.search.dispose(),this.disposer()}}),Object.defineProperty(e.prototype,"updateMarkOnMenu",{enumerable:!1,configurable:!0,writable:!0,value:function(e){for(var t=Math.max(0,e),i=Math.min(this.menu.flatItems.length,t+5),o=[],n=t;n<i;n++){(r=this.menu.getElementAt(n))&&(r&&o.push(r))}if("item"===this.options.pagination){var r,a=(this.menu.flatItems[e]||{}).parent;if(null==a?void 0:a.absoluteIdx)(r=this.menu.getElementAt(a.absoluteIdx))&&o.push(r)}this.marker.addOnly(o),this.marker.mark()}}),(0,tslib_1.__decorate)([mobx_1.observable],e.prototype,"search",void 0),(0,tslib_1.__decorate)([mobx_1.observable],e.prototype,"tryItOperation",void 0),(0,tslib_1.__decorate)([mobx_1.observable],e.prototype,"showRightPanel",void 0),(0,tslib_1.__decorate)([mobx_1.observable],e.prototype,"layout",void 0),(0,tslib_1.__decorate)([mobx_1.observable],e.prototype,"activeSampleLanguage",void 0),(0,tslib_1.__decorate)([mobx_1.observable],e.prototype,"isLoading",void 0),(0,tslib_1.__decorate)([mobx_1.action],e.prototype,"onDidMount",null),(0,tslib_1.__decorate)([mobx_1.action],e.prototype,"toggleRightPanel",null),(0,tslib_1.__decorate)([mobx_1.action],e.prototype,"toggleLayout",null),(0,tslib_1.__decorate)([mobx_1.action],e.prototype,"disableConsole",null),(0,tslib_1.__decorate)([mobx_1.action],e.prototype,"enableConsole",null),(0,tslib_1.__decorate)([mobx_1.action],e.prototype,"tryItOut",null),(0,tslib_1.__decorate)([mobx_1.action],e.prototype,"setActiveSampleLanguage",null),(0,tslib_1.__decorate)([decko_1.bind,(0,decko_1.debounce)(500)],e.prototype,"activateSampleLanguage",null),(0,tslib_1.__decorate)([mobx_1.action],e.prototype,"startLoader",null),(0,tslib_1.__decorate)([mobx_1.action],e.prototype,"stopLoader",null),e}();exports.ProStore=ProStore;var DEFAULT_OPTIONS={ignoreNamedSchemas:["java.io.ObjectStreamField"],allowedMdComponents:(_a={RedocResponse:{component:pluggable_1.RedocResponse,propsSelector:function(e){return{store:e}}},PullRight:{component:pluggable_1.PullRight,propsSelector:function(){return{}}}},_a[redoc_lib_1.SECURITY_DEFINITIONS_COMPONENT_NAME]={component:redoc_lib_1.SecurityDefs,propsSelector:function(e){return{securitySchemes:e.definition.securitySchemes}}},_a[redoc_lib_1.SECURITY_DEFINITIONS_JSX_NAME]={component:redoc_lib_1.SecurityDefs,propsSelector:function(e){return{securitySchemes:e.definition.securitySchemes}}},_a[redoc_lib_1.SCHEMA_DEFINITION_JSX_NAME]={component:redoc_lib_1.SchemaDefinition,propsSelector:function(e){return{parser:e.definition.parser,options:e.options,layout:e.layout,showRightPanel:e.showRightPanel}}},_a)};function joinURLs(e,t){return e.endsWith("/")&&(e=e.slice(0,-1)),t.startsWith("/")&&(t=t.substring(1)),e+"/"+t}function addTrailingSlash(e){return e.endsWith("/")?e:e+"/"}function getSpecVersionObj(e){return e.openapi?{openapi:e.openapi}:e.swagger?{swagger:e.swagger}:void 0}function deepClone(e){if("object"!=typeof e||null===e)return e;var t=Array.isArray(e)?[]:{};for(var i in e){var o=e[i];t[i]=deepClone(o)}return t}
2
2
  //# sourceMappingURL=ProStore.js.map
@@ -1,5 +1,6 @@
1
- import { IMenuItem, OperationModel, RedocNormalizedOptions, SearchResult, SearchStore } from '../redoc-lib';
2
- import { RedocProUserOptionsExt } from './ProStore';
1
+ import type { IMenuItem, OperationModel, RedocNormalizedOptions, SearchResult } from '../redoc-lib';
2
+ import { SearchStore } from '../redoc-lib';
3
+ import type { RedocProUserOptionsExt } from './ProStore';
3
4
  export declare type SearchResultMeta = {
4
5
  place?: string;
5
6
  path?: string[];
@@ -1,5 +1,6 @@
1
- import { SpecStore, OpenAPIDefinition, ApiInfoModel, OpenAPIParser, OpenAPIExternalDocumentation, SecuritySchemesModel, ContentItemModel } from '../redoc-lib';
2
- import { RedocProNormalizedOptions } from './ProStore';
1
+ import type { OpenAPIDefinition, ApiInfoModel, OpenAPIParser, OpenAPIExternalDocumentation, SecuritySchemesModel, ContentItemModel } from '../redoc-lib';
2
+ import { SpecStore } from '../redoc-lib';
3
+ import type { RedocProNormalizedOptions } from './ProStore';
3
4
  interface VersionInfo {
4
5
  id: string;
5
6
  title: string;
@@ -1,6 +1,6 @@
1
- import { OperationModel, ServerVariables } from '../../redoc-lib';
2
- import * as HAR from './har';
3
- import { Languages } from './types';
1
+ import type { OperationModel, ServerVariables } from '../../redoc-lib';
2
+ import type * as HAR from './har';
3
+ import type { Languages } from './types';
4
4
  export declare type CustomHAR = HAR.Request & {
5
5
  securityOAuth2ExtraCalls?: HAR.Request[];
6
6
  basicAuth?: {
@@ -1,5 +1,5 @@
1
- import { SnippetRequest } from '../index';
2
- import { CodeBuilder } from './code-builder';
1
+ import type { SnippetRequest } from '../index';
2
+ import type { CodeBuilder } from './code-builder';
3
3
  export declare function getPreserveTransformer({ body, authorizationHeader, }: {
4
4
  body?: boolean;
5
5
  authorizationHeader?: boolean;
@@ -1,5 +1,5 @@
1
- import { CustomHAR } from '..';
2
- import { PostData } from '../har';
1
+ import type { CustomHAR } from '..';
2
+ import type { PostData } from '../har';
3
3
  interface ParsedUrlQueryInput {
4
4
  [key: string]: string | number | boolean | string[] | number[] | boolean[] | undefined | null;
5
5
  }
@@ -1,5 +1,5 @@
1
- import { CSharpCodeSampleConfig } from '../../../types';
2
- import { LanguageHandler } from '../..';
1
+ import type { CSharpCodeSampleConfig } from '../../../types';
2
+ import type { LanguageHandler } from '../..';
3
3
  declare const handler: LanguageHandler<CSharpCodeSampleConfig['options']>;
4
4
  export declare const info: {
5
5
  key: string;
@@ -1,5 +1,5 @@
1
- import { LanguageHandler } from '../..';
2
- import { GoCodeSampleConfig } from '../../../types';
1
+ import type { LanguageHandler } from '../..';
2
+ import type { GoCodeSampleConfig } from '../../../types';
3
3
  declare const handler: LanguageHandler<GoCodeSampleConfig['options']>;
4
4
  export declare const info: {
5
5
  key: string;
@@ -1,5 +1,5 @@
1
- import { JavaCodeSampleConfig } from '../../../types';
2
- import { LanguageHandler } from '../..';
1
+ import type { JavaCodeSampleConfig } from '../../../types';
2
+ import type { LanguageHandler } from '../..';
3
3
  declare const handler: LanguageHandler<JavaCodeSampleConfig['options']>;
4
4
  export declare const info: {
5
5
  key: string;
@@ -1,5 +1,5 @@
1
- import { Java8CodeSampleConfig } from '../../../types';
2
- import { LanguageHandler } from '../..';
1
+ import type { Java8CodeSampleConfig } from '../../../types';
2
+ import type { LanguageHandler } from '../..';
3
3
  declare const handler: LanguageHandler<Java8CodeSampleConfig['options']>;
4
4
  export declare const info: {
5
5
  key: string;
@@ -1,5 +1,5 @@
1
- import { LanguageHandler } from '../..';
2
- import { JavaScriptCodeSampleConfig } from '../../../types';
1
+ import type { LanguageHandler } from '../..';
2
+ import type { JavaScriptCodeSampleConfig } from '../../../types';
3
3
  declare const handler: LanguageHandler<JavaScriptCodeSampleConfig['options']>;
4
4
  export declare const info: {
5
5
  key: string;
@@ -1,5 +1,5 @@
1
- import { LanguageHandler } from '../..';
2
- import { NodeJsCodeSampleConfig } from '../../../types';
1
+ import type { LanguageHandler } from '../..';
2
+ import type { NodeJsCodeSampleConfig } from '../../../types';
3
3
  declare const handler: LanguageHandler<NodeJsCodeSampleConfig['options']>;
4
4
  export declare const info: {
5
5
  key: string;
@@ -1,5 +1,5 @@
1
- import { LanguageHandler } from '../..';
2
- import { PHPCodeSampleConfig } from '../../../types';
1
+ import type { LanguageHandler } from '../..';
2
+ import type { PHPCodeSampleConfig } from '../../../types';
3
3
  declare const handler: LanguageHandler<PHPCodeSampleConfig['options']>;
4
4
  export declare const info: {
5
5
  key: string;
@@ -1,2 +1,2 @@
1
- import { Input, ObjectToPhpArrayOptions } from './types';
1
+ import type { Input, ObjectToPhpArrayOptions } from './types';
2
2
  export declare function objectToPhpArray(input: Input, options: ObjectToPhpArrayOptions, pad?: string): string;
@@ -1,4 +1,4 @@
1
- import { LanguageHandler } from '../..';
2
- import { PythonCodeSampleConfig } from '../../../types';
1
+ import type { LanguageHandler } from '../..';
2
+ import type { PythonCodeSampleConfig } from '../../../types';
3
3
  declare const handler: LanguageHandler<PythonCodeSampleConfig['options']>;
4
4
  export default handler;
@@ -1,5 +1,5 @@
1
- import { LanguageHandler } from '../..';
2
- import { RubyCodeSampleConfig } from '../../../types';
1
+ import type { LanguageHandler } from '../..';
2
+ import type { RubyCodeSampleConfig } from '../../../types';
3
3
  declare const handler: LanguageHandler<RubyCodeSampleConfig['options']>;
4
4
  export declare const info: {
5
5
  key: string;
@@ -1,5 +1,5 @@
1
- import { LanguageHandler } from '../..';
2
- import { cURULCodeSampleConfig } from '../../../types';
1
+ import type { LanguageHandler } from '../..';
2
+ import type { cURULCodeSampleConfig } from '../../../types';
3
3
  declare const handler: LanguageHandler<cURULCodeSampleConfig['options']>;
4
4
  export declare const info: {
5
5
  key: string;
@@ -1,5 +1,5 @@
1
- import { RedocProRawOptions } from './ProStore';
2
- import { ResolvedThemeInterface, MediaValue } from '../redoc-lib';
1
+ import type { RedocProRawOptions } from './ProStore';
2
+ import type { ResolvedThemeInterface, MediaValue } from '../redoc-lib';
3
3
  export declare function extendTheme(options: RedocProRawOptions): RedocProRawOptions;
4
4
  interface Typography {
5
5
  fontSize?: MediaValue;
@@ -1,6 +1,6 @@
1
1
  import EventEmitter from 'eventemitter3';
2
- import { HistoryService } from '../../redoc-lib';
3
- import { RedocProNormalizedOptions } from '../ProStore';
2
+ import type { HistoryService } from '../../redoc-lib';
3
+ import type { RedocProNormalizedOptions } from '../ProStore';
4
4
  export declare class FakeHistoryService implements Interface<HistoryService> {
5
5
  options: RedocProNormalizedOptions;
6
6
  _emitter: EventEmitter<string | symbol, any>;
@@ -1,5 +1,5 @@
1
- import { HistoryService } from '../../redoc-lib';
2
- import { RedocProNormalizedOptions } from '../ProStore';
1
+ import type { HistoryService } from '../../redoc-lib';
2
+ import type { RedocProNormalizedOptions } from '../ProStore';
3
3
  /**
4
4
  * Used for multi-version and multispec in SSR mode.
5
5
  * Allows rendering each version on separate path but keeps hash-routing for inner routes
@@ -1,5 +1,6 @@
1
- import { HistoryService } from '../../redoc-lib';
2
- import { MarkdownItemsPagination, Pagination, RedocProNormalizedOptions } from '../ProStore';
1
+ import type { HistoryService } from '../../redoc-lib';
2
+ import type { RedocProNormalizedOptions } from '../ProStore';
3
+ import type { MarkdownItemsPagination, Pagination } from '../types';
3
4
  export declare class PushStateHistoryService implements Interface<HistoryService> {
4
5
  options: RedocProNormalizedOptions;
5
6
  private multispec;
@@ -1,4 +1,4 @@
1
- import { FieldModel } from '../../redoc-lib';
1
+ import type { FieldModel } from '../../redoc-lib';
2
2
  export declare function isSameHash(a: string, b: string): boolean;
3
3
  export declare function constructFieldDeepFragment(field: FieldModel): string | null;
4
4
  export declare function joinWithSeparator(base?: string, path?: string, sep?: string): string;
@@ -2,3 +2,4 @@ export * from './ProStore';
2
2
  export * from './history';
3
3
  export * from './store-types';
4
4
  export * from './code-samples';
5
+ export * from './types';