@redocly/openapi-docs 3.12.0 → 3.12.2

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 (384) hide show
  1. package/dist/redocly-openapi-docs.min.js +753 -750
  2. package/lib/components/ApiInfo/ApiInfo.js +29 -1
  3. package/lib/components/ApiInfo/Metadata.js +29 -1
  4. package/lib/components/ApiInfo/index.js +2 -1
  5. package/lib/components/ApiInfo/styled.js +16 -8
  6. package/lib/components/CallbackSamples/CallbackSamples.js +25 -4
  7. package/lib/components/CallbackSamples/index.js +2 -1
  8. package/lib/components/Callbacks/CallbackDetails.js +17 -3
  9. package/lib/components/Callbacks/CallbackOperation.js +24 -3
  10. package/lib/components/Callbacks/CallbackSummary.js +19 -3
  11. package/lib/components/Callbacks/CallbacksList.js +16 -1
  12. package/lib/components/Callbacks/index.js +4 -1
  13. package/lib/components/Callbacks/styled.js +6 -3
  14. package/lib/components/Content/Content.js +10 -1
  15. package/lib/components/Content/index.js +2 -1
  16. package/lib/components/Content/useAutoScroll.js +50 -1
  17. package/lib/components/ContentItem/ContentItem.js +31 -1
  18. package/lib/components/ContentItem/index.js +2 -1
  19. package/lib/components/ContentItem/useIsExpanded.js +33 -1
  20. package/lib/components/ContentItems/ContentItems.js +19 -1
  21. package/lib/components/ContentItems/Items.js +13 -1
  22. package/lib/components/ContentItems/VirtualList.js +35 -1
  23. package/lib/components/ContentItems/helpers.js +49 -1
  24. package/lib/components/ContentItems/index.js +2 -1
  25. package/lib/components/ContentItems/useScrollOnRender.js +26 -1
  26. package/lib/components/Discriminator/Discriminator.js +27 -2
  27. package/lib/components/Discriminator/index.js +2 -1
  28. package/lib/components/Download/DownloadSpecification.js +46 -4
  29. package/lib/components/Download/index.js +2 -1
  30. package/lib/components/Download/types.js +2 -0
  31. package/lib/components/Download/useDownloadInfo.js +42 -1
  32. package/lib/components/ErrorBoundary/ErrorBoundary.js +22 -2
  33. package/lib/components/ErrorBoundary/index.js +2 -1
  34. package/lib/components/ExpandAllButton/ExpandAllButton.js +31 -2
  35. package/lib/components/ExpandAllButton/index.js +2 -1
  36. package/lib/components/ExternalDocumentation/ExternalDocumentation.js +18 -4
  37. package/lib/components/ExternalDocumentation/index.js +2 -1
  38. package/lib/components/Language/LanguageDropdown.js +21 -1
  39. package/lib/components/Language/LanguageItem.js +33 -1
  40. package/lib/components/Language/LanguageList.js +93 -1
  41. package/lib/components/Language/_tests_/LanguageDropdown.test.js +23 -1
  42. package/lib/components/Language/constants.js +3 -1
  43. package/lib/components/Language/index.js +4 -1
  44. package/lib/components/Language/styled.js +29 -15
  45. package/lib/components/Markdown/Markdown.js +64 -1
  46. package/lib/components/Markdown/index.js +3 -1
  47. package/lib/components/Markdown/types.js +2 -0
  48. package/lib/components/MediaTypeSwitch/MediaTypesSwitch.js +51 -1
  49. package/lib/components/MediaTypeSwitch/index.js +2 -1
  50. package/lib/components/OperationItem/Description.js +9 -1
  51. package/lib/components/OperationItem/OperationItem.js +70 -5
  52. package/lib/components/OperationItem/_tests_/OperationItem.test.js +70 -1
  53. package/lib/components/OperationItem/_tests_/__mocks__/mock-intersection-observer.js +40 -1
  54. package/lib/components/OperationItem/index.js +2 -1
  55. package/lib/components/OperationItem/types.js +2 -0
  56. package/lib/components/Overlay.js +48 -3
  57. package/lib/components/Overview/Overview.js +20 -1
  58. package/lib/components/Overview/index.js +2 -1
  59. package/lib/components/PageFooter/PageFooter.js +19 -1
  60. package/lib/components/PageFooter/index.js +2 -1
  61. package/lib/components/Panel/ResponsePanel.js +12 -6
  62. package/lib/components/Panel/Trigger.js +4 -2
  63. package/lib/components/Panel/index.js +3 -1
  64. package/lib/components/PanelItem/PanelItem.js +6 -1
  65. package/lib/components/PanelItem/index.js +3 -1
  66. package/lib/components/PanelItem/styled.js +20 -10
  67. package/lib/components/PayloadSamples/Example.js +6 -1
  68. package/lib/components/PayloadSamples/ExampleValue.js +30 -1
  69. package/lib/components/PayloadSamples/MediaTypeSamples.js +36 -2
  70. package/lib/components/PayloadSamples/PayloadSamples.js +26 -1
  71. package/lib/components/PayloadSamples/index.js +7 -1
  72. package/lib/components/PayloadSamples/styled.js +9 -4
  73. package/lib/components/PayloadSamples/types.js +2 -0
  74. package/lib/components/PropertyDetails/DescriptionEnums.js +19 -3
  75. package/lib/components/PropertyDetails/EnumValues.js +37 -1
  76. package/lib/components/PropertyDetails/Examples.js +26 -1
  77. package/lib/components/PropertyDetails/Extensions.js +17 -2
  78. package/lib/components/PropertyDetails/FieldDetail.js +15 -2
  79. package/lib/components/PropertyDetails/FieldDetails.js +51 -6
  80. package/lib/components/PropertyDetails/Pattern.js +21 -1
  81. package/lib/components/PropertyDetails/PlusCircleIcon.js +10 -4
  82. package/lib/components/PropertyDetails/PropertyDetails.js +22 -5
  83. package/lib/components/PropertyDetails/SchemaTypeInfo.js +10 -2
  84. package/lib/components/PropertyDetails/SimpleEnums.js +13 -2
  85. package/lib/components/PropertyDetails/cycleColorsByLevel.js +18 -1
  86. package/lib/components/PropertyDetails/index.js +4 -1
  87. package/lib/components/PropertyDetails/styled.js +15 -7
  88. package/lib/components/PropertyDetails/types.js +2 -0
  89. package/lib/components/RedoclyOpenAPIDocs/Providers.js +114 -1
  90. package/lib/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocs.js +57 -1
  91. package/lib/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocsStandalone.js +86 -1
  92. package/lib/components/RedoclyOpenAPIDocs/index.js +5 -1
  93. package/lib/components/RedoclyOpenAPIDocs/styled.js +4 -2
  94. package/lib/components/RedoclyOpenAPIDocs/types.js +2 -0
  95. package/lib/components/RedoclyOpenAPIDocs/utils.js +33 -1
  96. package/lib/components/RenderHook/RenderHook.js +17 -1
  97. package/lib/components/RenderHook/index.js +2 -1
  98. package/lib/components/Replay/EmbeddedReplay.js +41 -3
  99. package/lib/components/Replay/Replay.js +99 -1
  100. package/lib/components/Replay/index.js +3 -1
  101. package/lib/components/Replay/utils.js +208 -1
  102. package/lib/components/Request/RequestDetails.js +33 -2
  103. package/lib/components/Request/types.js +2 -0
  104. package/lib/components/RequestParameters/Body.js +8 -1
  105. package/lib/components/RequestParameters/ParametersGroup.js +19 -4
  106. package/lib/components/RequestParameters/RequestParameters.js +40 -1
  107. package/lib/components/RequestParameters/index.js +4 -1
  108. package/lib/components/RequestSamples/CodeSample.js +55 -2
  109. package/lib/components/RequestSamples/Example.js +37 -1
  110. package/lib/components/RequestSamples/RequestSamples.js +89 -5
  111. package/lib/components/RequestSamples/index.js +3 -1
  112. package/lib/components/RequestSamples/useCodeSamples.js +92 -1
  113. package/lib/components/ResponseSamples/ResponseSamples.js +47 -1
  114. package/lib/components/ResponseSamples/Summary.js +9 -1
  115. package/lib/components/ResponseSamples/index.js +2 -1
  116. package/lib/components/Responses/OperationResponseList.js +42 -2
  117. package/lib/components/Responses/ResponseDetails.js +18 -1
  118. package/lib/components/Responses/ResponseHeaders.js +15 -1
  119. package/lib/components/Responses/index.js +6 -1
  120. package/lib/components/Responses/styled.js +14 -6
  121. package/lib/components/Responses/types.js +2 -0
  122. package/lib/components/RightPanel/RightPanel.js +21 -1
  123. package/lib/components/RightPanel/index.js +2 -1
  124. package/lib/components/Samples/ExampleSwitch.js +33 -1
  125. package/lib/components/Samples/index.js +3 -1
  126. package/lib/components/Samples/use-example-key.js +12 -1
  127. package/lib/components/Schema/ArraySchema.js +45 -1
  128. package/lib/components/Schema/ObjectSchema.js +29 -1
  129. package/lib/components/Schema/OneOfSchema.js +47 -3
  130. package/lib/components/Schema/RecursiveSchema.js +10 -1
  131. package/lib/components/Schema/Schema.js +63 -2
  132. package/lib/components/Schema/SubSchema.js +20 -1
  133. package/lib/components/Schema/helpers.js +16 -1
  134. package/lib/components/Schema/index.js +5 -1
  135. package/lib/components/Schema/types.js +2 -0
  136. package/lib/components/Schema/useOneOfLocationIdx.js +11 -1
  137. package/lib/components/SchemaDefinition/SchemaDefinition.js +65 -2
  138. package/lib/components/SchemaDefinition/index.js +2 -1
  139. package/lib/components/SectionContent/SectionContent.js +49 -6
  140. package/lib/components/SectionContent/index.js +2 -1
  141. package/lib/components/SectionItem/SectionItem.js +14 -1
  142. package/lib/components/SectionItem/index.js +2 -1
  143. package/lib/components/Security/Divider.js +9 -2
  144. package/lib/components/Security/OAuthFlow.js +11 -1
  145. package/lib/components/Security/OAuthScopes.js +59 -9
  146. package/lib/components/Security/Security.js +15 -1
  147. package/lib/components/Security/SecurityButton.js +31 -7
  148. package/lib/components/Security/SecurityFlow.js +28 -4
  149. package/lib/components/Security/SecurityModal.js +34 -5
  150. package/lib/components/Security/SecuritySchemeItem.js +15 -4
  151. package/lib/components/Security/helper.js +16 -1
  152. package/lib/components/Security/index.js +11 -1
  153. package/lib/components/Security/styled.js +6 -3
  154. package/lib/components/SelectOrLabel/SelectOrLabel.js +12 -2
  155. package/lib/components/SelectOrLabel/index.js +2 -1
  156. package/lib/components/ServerList/ServerList.js +36 -10
  157. package/lib/components/ServerList/index.js +2 -1
  158. package/lib/components/ServerList/types.js +2 -0
  159. package/lib/components/ServerListDropdown/ServerListDropdown.js +54 -1
  160. package/lib/components/ServerListDropdown/index.js +2 -1
  161. package/lib/components/ServerListDropdown/styled.js +15 -6
  162. package/lib/components/SideMenu/SideMenu.js +13 -2
  163. package/lib/components/SideMenu/hooks/useMenuItems.js +110 -1
  164. package/lib/components/SideMenu/index.js +2 -1
  165. package/lib/components/SideMenu/types.js +2 -0
  166. package/lib/components/StickySidebar/SidebarActions.js +14 -2
  167. package/lib/components/StickySidebar/StickyResponsiveSidebar.js +37 -7
  168. package/lib/components/StickySidebar/index.js +2 -1
  169. package/lib/components/Tabs/Tabs.js +16 -5
  170. package/lib/components/Tabs/index.js +3 -1
  171. package/lib/components/Tabs/useTabsState.js +22 -1
  172. package/lib/components/TagItem/OperationNavigationItems.js +18 -4
  173. package/lib/components/TagItem/OperationsNavigation.js +46 -2
  174. package/lib/components/TagItem/TagItem.js +40 -7
  175. package/lib/components/TagItem/index.js +2 -1
  176. package/lib/components/TagItem/styled.js +5 -2
  177. package/lib/components/TagItem/types.js +2 -0
  178. package/lib/components/ViewNested/ViewNested.js +42 -9
  179. package/lib/components/ViewNested/index.js +2 -1
  180. package/lib/components/common/Badges.js +21 -5
  181. package/lib/components/common/BodyContent/BodyContent.js +31 -4
  182. package/lib/components/common/BodyContent/index.js +2 -1
  183. package/lib/components/common/ClearButton/ClearButton.js +5 -1
  184. package/lib/components/common/ClearButton/index.js +3 -1
  185. package/lib/components/common/ClearButton/styled.js +5 -2
  186. package/lib/components/common/ClearButton/types.js +2 -0
  187. package/lib/components/common/CodeBlockPanel.js +7 -3
  188. package/lib/components/common/ConstraintsView.js +14 -2
  189. package/lib/components/common/Dropdown/Dropdown.js +22 -4
  190. package/lib/components/common/Dropdown/index.js +2 -1
  191. package/lib/components/common/ExpandableExample/ExpandableExample.js +24 -3
  192. package/lib/components/common/ExpandableExample/index.js +2 -1
  193. package/lib/components/common/Extensions.js +17 -2
  194. package/lib/components/common/Fields/fields-layout.js +76 -51
  195. package/lib/components/common/Fields/fields.js +39 -17
  196. package/lib/components/common/Fields/index.js +3 -1
  197. package/lib/components/common/LinkToField.js +33 -6
  198. package/lib/components/common/OperationItemTitle.js +12 -6
  199. package/lib/components/common/SchemaSelection/SchemaSelection.js +51 -1
  200. package/lib/components/common/SchemaSelection/index.js +2 -1
  201. package/lib/components/common/Select/Select.js +21 -1
  202. package/lib/components/common/Select/index.js +3 -1
  203. package/lib/components/common/Select/styled.js +17 -9
  204. package/lib/components/common/Select/types.js +2 -0
  205. package/lib/components/common/Skeleton/LanguageListSkeleton.js +16 -6
  206. package/lib/components/common/Skeleton/Skeleton.js +15 -5
  207. package/lib/components/common/Skeleton/index.js +3 -1
  208. package/lib/components/common/headers.js +4 -2
  209. package/lib/components/common/index.js +14 -1
  210. package/lib/components/common/linkify.js +28 -4
  211. package/lib/components/common/mixins.js +4 -2
  212. package/lib/components/common/panels.js +52 -29
  213. package/lib/components/common/schema.js +16 -8
  214. package/lib/components/common/styled.js +15 -7
  215. package/lib/components/index.js +25 -1
  216. package/lib/components/pluggable/RedocExample.js +20 -1
  217. package/lib/components/pluggable/RedocSchema.js +22 -1
  218. package/lib/components/pluggable/index.js +3 -1
  219. package/lib/components/pluggable/styled.components.js +9 -4
  220. package/lib/constants.js +30 -1
  221. package/lib/empty.js +7 -1
  222. package/lib/events/codeSampleCopy.js +19 -1
  223. package/lib/events/creator.js +5 -1
  224. package/lib/events/index.js +8 -1
  225. package/lib/events/languageSwitch.js +18 -1
  226. package/lib/events/panelToggle.js +16 -1
  227. package/lib/events/serverSwitch.js +13 -1
  228. package/lib/events/tryItOpen.js +12 -1
  229. package/lib/events/tryItSent.js +12 -1
  230. package/lib/events/types.js +11 -1
  231. package/lib/hoc/types.js +2 -0
  232. package/lib/hoc/utils.js +4 -1
  233. package/lib/hoc/withRouter.js +17 -1
  234. package/lib/hoc/withStore.js +28 -1
  235. package/lib/hooks/index.js +9 -1
  236. package/lib/hooks/useActivateExample.js +35 -1
  237. package/lib/hooks/useActiveWithFallback.js +12 -1
  238. package/lib/hooks/useContentItems.js +10 -1
  239. package/lib/hooks/useLicense.js +17 -1
  240. package/lib/hooks/usePerformanceMetrics.js +26 -1
  241. package/lib/hooks/useRouter.js +17 -1
  242. package/lib/hooks/useTelemetry.js +5 -1
  243. package/lib/hooks/useTranslate.js +6 -1
  244. package/lib/hooks/useUppercase2LowercaseRedirect.js +12 -1
  245. package/lib/icons/CSharpIcon/CSharpIcon.js +7 -1
  246. package/lib/icons/CSharpIcon/index.js +2 -1
  247. package/lib/icons/CurlIcon/CurlIcon.js +8 -2
  248. package/lib/icons/CurlIcon/index.js +2 -1
  249. package/lib/icons/GOIcon/GOIcon.js +7 -1
  250. package/lib/icons/GOIcon/index.js +2 -1
  251. package/lib/icons/JavaIcon/JavaIcon.js +7 -1
  252. package/lib/icons/JavaIcon/index.js +2 -1
  253. package/lib/icons/JavaScriptIcon/JavaScriptIcon.js +7 -1
  254. package/lib/icons/JavaScriptIcon/index.js +2 -1
  255. package/lib/icons/NodeJSIcon/NodeJSIcon.js +7 -1
  256. package/lib/icons/NodeJSIcon/index.js +2 -1
  257. package/lib/icons/PHPIcon/PHPIcon.js +7 -1
  258. package/lib/icons/PHPIcon/index.js +2 -1
  259. package/lib/icons/PayloadIcon/PayloadIcon.js +7 -1
  260. package/lib/icons/PayloadIcon/index.js +2 -1
  261. package/lib/icons/PythonIcon/PythonIcon.js +7 -1
  262. package/lib/icons/PythonIcon/index.js +2 -1
  263. package/lib/icons/RIcon/RIcon.js +7 -1
  264. package/lib/icons/RIcon/index.js +2 -1
  265. package/lib/icons/RubyIcon/RubyIcon.js +7 -1
  266. package/lib/icons/RubyIcon/index.js +2 -1
  267. package/lib/index.js +49 -1
  268. package/lib/jotai/app.js +113 -1
  269. package/lib/jotai/operation.js +28 -1
  270. package/lib/jotai/replay.js +5 -1
  271. package/lib/jotai/store.js +8 -1
  272. package/lib/jotai/use-write-atom.js +9 -1
  273. package/lib/models/callback.js +28 -1
  274. package/lib/models/code-sample-options.js +2 -0
  275. package/lib/models/example.js +17 -1
  276. package/lib/models/field.js +109 -1
  277. package/lib/models/group.js +38 -1
  278. package/lib/models/index.js +14 -1
  279. package/lib/models/mediaContent.js +26 -1
  280. package/lib/models/mediaType.js +153 -1
  281. package/lib/models/operation.js +166 -1
  282. package/lib/models/request.js +25 -1
  283. package/lib/models/response.js +46 -1
  284. package/lib/models/schema.js +474 -2
  285. package/lib/models/security.js +84 -1
  286. package/lib/models/tab.js +2 -0
  287. package/lib/models/types.js +2 -0
  288. package/lib/services/OpenAPIParser.js +321 -1
  289. package/lib/services/check.js +104 -1
  290. package/lib/services/code-samples/constants.js +16 -1
  291. package/lib/services/code-samples/generator.js +540 -1
  292. package/lib/services/code-samples/httpsnippet/helpers/code-builder.js +252 -3
  293. package/lib/services/code-samples/httpsnippet/helpers/code-helpers.js +90 -2
  294. package/lib/services/code-samples/httpsnippet/helpers/constants.js +28 -1
  295. package/lib/services/code-samples/httpsnippet/helpers/lodash-int.js +173 -1
  296. package/lib/services/code-samples/httpsnippet/helpers/mocks/code-helpers-mock.js +76 -37
  297. package/lib/services/code-samples/httpsnippet/helpers/reducer.js +16 -1
  298. package/lib/services/code-samples/httpsnippet/helpers/shell.js +20 -1
  299. package/lib/services/code-samples/httpsnippet/helpers/string-utility.js +19 -1
  300. package/lib/services/code-samples/httpsnippet/index.js +166 -1
  301. package/lib/services/code-samples/httpsnippet/targets/__mocks__/mock.js +2340 -146
  302. package/lib/services/code-samples/httpsnippet/targets/csharp/httpclient.js +227 -2
  303. package/lib/services/code-samples/httpsnippet/targets/csharp/index.js +11 -1
  304. package/lib/services/code-samples/httpsnippet/targets/csharpNewtonsoft/httpclient.js +185 -2
  305. package/lib/services/code-samples/httpsnippet/targets/csharpNewtonsoft/index.js +11 -1
  306. package/lib/services/code-samples/httpsnippet/targets/go/index.js +11 -1
  307. package/lib/services/code-samples/httpsnippet/targets/go/native.js +222 -3
  308. package/lib/services/code-samples/httpsnippet/targets/index.js +28 -1
  309. package/lib/services/code-samples/httpsnippet/targets/java/httpclient.js +184 -3
  310. package/lib/services/code-samples/httpsnippet/targets/java/index.js +11 -1
  311. package/lib/services/code-samples/httpsnippet/targets/java8/apachehttp.js +223 -2
  312. package/lib/services/code-samples/httpsnippet/targets/java8/index.js +11 -1
  313. package/lib/services/code-samples/httpsnippet/targets/javascript/fetch.js +147 -1
  314. package/lib/services/code-samples/httpsnippet/targets/javascript/index.js +11 -1
  315. package/lib/services/code-samples/httpsnippet/targets/node/fetch.js +199 -1
  316. package/lib/services/code-samples/httpsnippet/targets/node/index.js +11 -1
  317. package/lib/services/code-samples/httpsnippet/targets/php/curl.js +203 -5
  318. package/lib/services/code-samples/httpsnippet/targets/php/index.js +11 -1
  319. package/lib/services/code-samples/httpsnippet/targets/php/types.js +2 -0
  320. package/lib/services/code-samples/httpsnippet/targets/php/utils.js +106 -5
  321. package/lib/services/code-samples/httpsnippet/targets/python/index.js +11 -1
  322. package/lib/services/code-samples/httpsnippet/targets/python/requests.js +185 -6
  323. package/lib/services/code-samples/httpsnippet/targets/r/httr.js +111 -1
  324. package/lib/services/code-samples/httpsnippet/targets/r/index.js +11 -1
  325. package/lib/services/code-samples/httpsnippet/targets/r/utils.js +18 -6
  326. package/lib/services/code-samples/httpsnippet/targets/ruby/index.js +11 -1
  327. package/lib/services/code-samples/httpsnippet/targets/ruby/native.js +169 -1
  328. package/lib/services/code-samples/httpsnippet/targets/shell/curl.js +94 -6
  329. package/lib/services/code-samples/httpsnippet/targets/shell/index.js +11 -1
  330. package/lib/services/code-samples/index.js +3 -1
  331. package/lib/services/code-samples/types.js +2 -0
  332. package/lib/services/config-options/helpers.js +49 -1
  333. package/lib/services/config-options/index.js +3 -1
  334. package/lib/services/config-options/normalizeOptions.js +83 -1
  335. package/lib/services/config-options/types.js +2 -0
  336. package/lib/services/history/helpers.js +63 -1
  337. package/lib/services/history/index.js +2 -1
  338. package/lib/services/index.js +9 -1
  339. package/lib/services/menu/builder.js +47 -1
  340. package/lib/services/menu/index.js +2 -1
  341. package/lib/services/menu/markdown.js +93 -1
  342. package/lib/services/menu/operation.js +50 -1
  343. package/lib/services/menu/tags.js +166 -1
  344. package/lib/services/types.js +2 -0
  345. package/lib/services/utils.js +83 -1
  346. package/lib/standalone.js +68 -1
  347. package/lib/styled-components.js +6 -1
  348. package/lib/types/app.js +2 -0
  349. package/lib/types/index.js +4 -1
  350. package/lib/types/open-api.js +2 -0
  351. package/lib/types/security.js +2 -0
  352. package/lib/utils/JsonPointer.js +84 -1
  353. package/lib/utils/areArraysEqual.js +4 -1
  354. package/lib/utils/argValuesHelpers.js +35 -1
  355. package/lib/utils/compose.js +2 -1
  356. package/lib/utils/configure-helpers.js +223 -1
  357. package/lib/utils/convertSwagger2OpenAPI.js +14 -1
  358. package/lib/utils/cookies.js +73 -1
  359. package/lib/utils/debounce.js +22 -1
  360. package/lib/utils/debug.js +11 -1
  361. package/lib/utils/dom.js +65 -1
  362. package/lib/utils/environments.js +13 -1
  363. package/lib/utils/helpers.js +222 -12
  364. package/lib/utils/index.js +25 -1
  365. package/lib/utils/isMobile.js +13 -1
  366. package/lib/utils/loadAndBundleSpec.js +32 -1
  367. package/lib/utils/local-storage.js +12 -1
  368. package/lib/utils/object.js +31 -1
  369. package/lib/utils/openapi.js +592 -1
  370. package/lib/utils/parameters.js +13 -1
  371. package/lib/utils/path.js +22 -1
  372. package/lib/utils/queryString.js +60 -1
  373. package/lib/utils/replaceVariables.js +14 -1
  374. package/lib/utils/saveTextBeforeHeading.js +35 -1
  375. package/lib/utils/security-details.js +49 -1
  376. package/lib/utils/session-storage.js +12 -1
  377. package/lib/utils/simplifyAstStructure.js +22 -1
  378. package/lib/utils/sort.js +21 -1
  379. package/lib/utils/string.js +65 -1
  380. package/lib/utils/telemetry.js +7 -1
  381. package/lib/utils/test-utils.js +26 -1
  382. package/lib/utils/theme-helpers.js +24 -3
  383. package/lib/utils/url.js +38 -1
  384. package/package.json +4 -4
@@ -1 +1,2 @@
1
- import{PHPIcon as P}from"./PHPIcon.js";export{P as PHPIcon};
1
+ export { PHPIcon } from './PHPIcon.js';
2
+ //# sourceMappingURL=index.js.map
@@ -1 +1,7 @@
1
- import{jsx as C,jsxs as o}from"react/jsx-runtime";import{styled as e}from"../../styled-components.js";const l=()=>o("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[C("circle",{cx:"16",cy:"16",r:"12",fill:"#1F7CFF"}),C("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.05 12.22C11.05 10.9939 12.0439 10 13.27 10C13.5682 10 13.81 10.2418 13.81 10.54C13.81 10.8382 13.5682 11.08 13.27 11.08C12.6404 11.08 12.13 11.5904 12.13 12.22V14.6409C12.13 15.15 11.9423 15.6306 11.6179 16C11.9423 16.3694 12.13 16.85 12.13 17.3591V19.78C12.13 20.4096 12.6404 20.92 13.27 20.92C13.5682 20.92 13.81 21.1618 13.81 21.46C13.81 21.7582 13.5682 22 13.27 22C12.0439 22 11.05 21.0061 11.05 19.78V17.3591C11.05 16.9909 10.8435 16.6539 10.5159 16.4867C10.3351 16.3996 10.21 16.2145 10.21 16C10.21 15.7855 10.3351 15.6004 10.5158 15.5133C10.8435 15.3461 11.05 15.0091 11.05 14.6409V12.22ZM18.73 10C19.9561 10 20.95 10.9939 20.95 12.22V14.6409C20.95 15.0091 21.1566 15.3461 21.4842 15.5133C21.6649 15.6004 21.79 15.7855 21.79 16C21.79 16.2145 21.6649 16.3996 21.4842 16.4867C21.1566 16.6539 20.95 16.9909 20.95 17.3591V19.78C20.95 21.0061 19.9561 22 18.73 22C18.4318 22 18.19 21.7582 18.19 21.46C18.19 21.1618 18.4318 20.92 18.73 20.92C19.3596 20.92 19.87 20.4096 19.87 19.78V17.3591C19.87 16.85 20.0577 16.3694 20.3821 16C20.0577 15.6306 19.87 15.15 19.87 14.6409V12.22C19.87 11.5904 19.3596 11.08 18.73 11.08C18.4318 11.08 18.19 10.8382 18.19 10.54C18.19 10.2418 18.4318 10 18.73 10Z",fill:"white"})]}),n=e(l).attrs(()=>({"data-component-name":"icons/PayloadIcon"}))``;export{l as Icon,n as PayloadIcon};
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { styled } from '../../styled-components.js';
3
+ export const Icon = () => (_jsxs("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("circle", { cx: "16", cy: "16", r: "12", fill: "#1F7CFF" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11.05 12.22C11.05 10.9939 12.0439 10 13.27 10C13.5682 10 13.81 10.2418 13.81 10.54C13.81 10.8382 13.5682 11.08 13.27 11.08C12.6404 11.08 12.13 11.5904 12.13 12.22V14.6409C12.13 15.15 11.9423 15.6306 11.6179 16C11.9423 16.3694 12.13 16.85 12.13 17.3591V19.78C12.13 20.4096 12.6404 20.92 13.27 20.92C13.5682 20.92 13.81 21.1618 13.81 21.46C13.81 21.7582 13.5682 22 13.27 22C12.0439 22 11.05 21.0061 11.05 19.78V17.3591C11.05 16.9909 10.8435 16.6539 10.5159 16.4867C10.3351 16.3996 10.21 16.2145 10.21 16C10.21 15.7855 10.3351 15.6004 10.5158 15.5133C10.8435 15.3461 11.05 15.0091 11.05 14.6409V12.22ZM18.73 10C19.9561 10 20.95 10.9939 20.95 12.22V14.6409C20.95 15.0091 21.1566 15.3461 21.4842 15.5133C21.6649 15.6004 21.79 15.7855 21.79 16C21.79 16.2145 21.6649 16.3996 21.4842 16.4867C21.1566 16.6539 20.95 16.9909 20.95 17.3591V19.78C20.95 21.0061 19.9561 22 18.73 22C18.4318 22 18.19 21.7582 18.19 21.46C18.19 21.1618 18.4318 20.92 18.73 20.92C19.3596 20.92 19.87 20.4096 19.87 19.78V17.3591C19.87 16.85 20.0577 16.3694 20.3821 16C20.0577 15.6306 19.87 15.15 19.87 14.6409V12.22C19.87 11.5904 19.3596 11.08 18.73 11.08C18.4318 11.08 18.19 10.8382 18.19 10.54C18.19 10.2418 18.4318 10 18.73 10Z", fill: "white" })] }));
4
+ export const PayloadIcon = styled(Icon).attrs(() => ({
5
+ 'data-component-name': 'icons/PayloadIcon',
6
+ })) ``;
7
+ //# sourceMappingURL=PayloadIcon.js.map
@@ -1 +1,2 @@
1
- import{PayloadIcon as r}from"./PayloadIcon.js";export{r as PayloadIcon};
1
+ export { PayloadIcon } from './PayloadIcon.js';
2
+ //# sourceMappingURL=index.js.map
@@ -1 +1,7 @@
1
- import{jsx as t,jsxs as i}from"react/jsx-runtime";import{styled as e}from"../../styled-components.js";const n=()=>i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:[i("g",{clipPath:"url(#clip0_6336_14290)",children:[t("path",{d:"M5.5928 9.36167e-05C5.12601 0.00226256 4.68024 0.0420729 4.28801 0.111479C3.13253 0.315613 2.92274 0.742882 2.92274 1.53084V2.57149H5.65327V2.91838H2.92274H1.898C1.10444 2.91838 0.409568 3.39536 0.192222 4.30273C-0.0584838 5.3428 -0.069604 5.99182 0.192222 7.07781C0.386317 7.88618 0.849843 8.46217 1.64341 8.46217H2.58223V7.21466C2.58223 6.3134 3.36201 5.51842 4.28801 5.51842H7.01535C7.77454 5.51842 8.38061 4.89333 8.38061 4.13088V1.53084C8.38061 0.790854 7.75634 0.234979 7.01535 0.111479C6.54628 0.0333971 6.05959 -0.00207535 5.5928 9.36167e-05ZM4.11616 0.837072C4.3982 0.837072 4.62853 1.07116 4.62853 1.35899C4.62853 1.6458 4.3982 1.87773 4.11616 1.87773C3.8331 1.87773 3.60378 1.6458 3.60378 1.35899C3.60378 1.07116 3.8331 0.837072 4.11616 0.837072Z",fill:"url(#paint0_linear_6336_14290)"}),t("path",{d:"M8.72123 2.91797V4.13047C8.72123 5.07051 7.92426 5.86171 7.01545 5.86171H4.28811C3.54105 5.86171 2.92285 6.5011 2.92285 7.24925V9.84929C2.92285 10.5893 3.56632 11.0245 4.28811 11.2368C5.15244 11.491 5.98129 11.5369 7.01545 11.2368C7.70287 11.0378 8.38071 10.6373 8.38071 9.84929V8.80864H5.65337V8.46176H8.38071H9.74598C10.5395 8.46176 10.8353 7.90823 11.1112 7.0774C11.3963 6.22208 11.3842 5.39955 11.1112 4.30232C10.9151 3.51232 10.5406 2.91797 9.74598 2.91797H8.72123ZM7.1873 9.50241C7.47036 9.50241 7.69967 9.73434 7.69967 10.0211C7.69967 10.309 7.47036 10.5431 7.1873 10.5431C6.90526 10.5431 6.67493 10.309 6.67493 10.0211C6.67493 9.73434 6.90526 9.50241 7.1873 9.50241Z",fill:"url(#paint1_linear_6336_14290)"})]}),i("defs",{children:[i("linearGradient",{id:"paint0_linear_6336_14290",x1:"-3.4002e-08",y1:"-2.95366e-08",x2:"6.29629",y2:"5.36531",gradientUnits:"userSpaceOnUse",children:[t("stop",{stopColor:"#5A9FD4"}),t("stop",{offset:"1",stopColor:"#306998"})]}),i("linearGradient",{id:"paint1_linear_6336_14290",x1:"7.12169",y1:"9.93365",x2:"4.86282",y2:"6.76831",gradientUnits:"userSpaceOnUse",children:[t("stop",{stopColor:"#FFD43B"}),t("stop",{offset:"1",stopColor:"#FFE873"})]}),t("clipPath",{id:"clip0_6336_14290",children:t("rect",{width:"11.5",height:"11.5",fill:"white"})})]})]}),l=e(n).attrs(()=>({"data-component-name":"icons/PythonIcon"}))``;export{n as Icon,l as PythonIcon};
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { styled } from '../../styled-components.js';
3
+ export const Icon = () => (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", children: [_jsxs("g", { clipPath: "url(#clip0_6336_14290)", children: [_jsx("path", { d: "M5.5928 9.36167e-05C5.12601 0.00226256 4.68024 0.0420729 4.28801 0.111479C3.13253 0.315613 2.92274 0.742882 2.92274 1.53084V2.57149H5.65327V2.91838H2.92274H1.898C1.10444 2.91838 0.409568 3.39536 0.192222 4.30273C-0.0584838 5.3428 -0.069604 5.99182 0.192222 7.07781C0.386317 7.88618 0.849843 8.46217 1.64341 8.46217H2.58223V7.21466C2.58223 6.3134 3.36201 5.51842 4.28801 5.51842H7.01535C7.77454 5.51842 8.38061 4.89333 8.38061 4.13088V1.53084C8.38061 0.790854 7.75634 0.234979 7.01535 0.111479C6.54628 0.0333971 6.05959 -0.00207535 5.5928 9.36167e-05ZM4.11616 0.837072C4.3982 0.837072 4.62853 1.07116 4.62853 1.35899C4.62853 1.6458 4.3982 1.87773 4.11616 1.87773C3.8331 1.87773 3.60378 1.6458 3.60378 1.35899C3.60378 1.07116 3.8331 0.837072 4.11616 0.837072Z", fill: "url(#paint0_linear_6336_14290)" }), _jsx("path", { d: "M8.72123 2.91797V4.13047C8.72123 5.07051 7.92426 5.86171 7.01545 5.86171H4.28811C3.54105 5.86171 2.92285 6.5011 2.92285 7.24925V9.84929C2.92285 10.5893 3.56632 11.0245 4.28811 11.2368C5.15244 11.491 5.98129 11.5369 7.01545 11.2368C7.70287 11.0378 8.38071 10.6373 8.38071 9.84929V8.80864H5.65337V8.46176H8.38071H9.74598C10.5395 8.46176 10.8353 7.90823 11.1112 7.0774C11.3963 6.22208 11.3842 5.39955 11.1112 4.30232C10.9151 3.51232 10.5406 2.91797 9.74598 2.91797H8.72123ZM7.1873 9.50241C7.47036 9.50241 7.69967 9.73434 7.69967 10.0211C7.69967 10.309 7.47036 10.5431 7.1873 10.5431C6.90526 10.5431 6.67493 10.309 6.67493 10.0211C6.67493 9.73434 6.90526 9.50241 7.1873 9.50241Z", fill: "url(#paint1_linear_6336_14290)" })] }), _jsxs("defs", { children: [_jsxs("linearGradient", { id: "paint0_linear_6336_14290", x1: "-3.4002e-08", y1: "-2.95366e-08", x2: "6.29629", y2: "5.36531", gradientUnits: "userSpaceOnUse", children: [_jsx("stop", { stopColor: "#5A9FD4" }), _jsx("stop", { offset: "1", stopColor: "#306998" })] }), _jsxs("linearGradient", { id: "paint1_linear_6336_14290", x1: "7.12169", y1: "9.93365", x2: "4.86282", y2: "6.76831", gradientUnits: "userSpaceOnUse", children: [_jsx("stop", { stopColor: "#FFD43B" }), _jsx("stop", { offset: "1", stopColor: "#FFE873" })] }), _jsx("clipPath", { id: "clip0_6336_14290", children: _jsx("rect", { width: "11.5", height: "11.5", fill: "white" }) })] })] }));
4
+ export const PythonIcon = styled(Icon).attrs(() => ({
5
+ 'data-component-name': 'icons/PythonIcon',
6
+ })) ``;
7
+ //# sourceMappingURL=PythonIcon.js.map
@@ -1 +1,2 @@
1
- import{PythonIcon as r}from"./PythonIcon.js";export{r as PythonIcon};
1
+ export { PythonIcon } from './PythonIcon.js';
2
+ //# sourceMappingURL=index.js.map
@@ -1 +1,7 @@
1
- import{jsx as t,jsxs as o}from"react/jsx-runtime";import{styled as e}from"../../styled-components.js";const i=()=>o("svg",{xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid",width:"724",height:"561",viewBox:"0 0 724 561",children:[o("defs",{children:[o("linearGradient",{id:"gradientFill-1",x1:"0",x2:"1",y1:"0",y2:"1",gradientUnits:"objectBoundingBox",spreadMethod:"pad",children:[t("stop",{offset:"0",stopColor:"rgb(203,206,208)",stopOpacity:"1"}),t("stop",{offset:"1",stopColor:"rgb(132,131,139)",stopOpacity:"1"})]}),o("linearGradient",{id:"gradientFill-2",x1:"0",x2:"1",y1:"0",y2:"1",gradientUnits:"objectBoundingBox",spreadMethod:"pad",children:[t("stop",{offset:"0",stopColor:"rgb(39,109,195)",stopOpacity:"1"}),t("stop",{offset:"1",stopColor:"rgb(22,92,170)",stopOpacity:"1"})]})]}),t("path",{d:"M361.453,485.937 C162.329,485.937 0.906,377.828 0.906,244.469 C0.906,111.109 162.329,3.000 361.453,3.000 C560.578,3.000 722.000,111.109 722.000,244.469 C722.000,377.828 560.578,485.937 361.453,485.937 ZM416.641,97.406 C265.289,97.406 142.594,171.314 142.594,262.484 C142.594,353.654 265.289,427.562 416.641,427.562 C567.992,427.562 679.687,377.033 679.687,262.484 C679.687,147.971 567.992,97.406 416.641,97.406 Z",fill:"url(#gradientFill-1)",fillRule:"evenodd"}),t("path",{d:"M550.000,377.000 C550.000,377.000 571.822,383.585 584.500,390.000 C588.899,392.226 596.510,396.668 602.000,402.500 C607.378,408.212 610.000,414.000 610.000,414.000 L696.000,559.000 L557.000,559.062 L492.000,437.000 C492.000,437.000 478.690,414.131 470.500,407.500 C463.668,401.969 460.755,400.000 454.000,400.000 C449.298,400.000 420.974,400.000 420.974,400.000 L421.000,558.974 L298.000,559.026 L298.000,152.938 L545.000,152.938 C545.000,152.938 657.500,154.967 657.500,262.000 C657.500,369.033 550.000,377.000 550.000,377.000 ZM496.500,241.024 L422.037,240.976 L422.000,310.026 L496.500,310.002 C496.500,310.002 531.000,309.895 531.000,274.877 C531.000,239.155 496.500,241.024 496.500,241.024 Z",fill:"url(#gradientFill-2)",fillRule:"evenodd"})]}),d=e(i).attrs(()=>({"data-component-name":"icons/RIcon"}))``;export{i as Icon,d as RIcon};
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { styled } from '../../styled-components.js';
3
+ export const Icon = () => (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", preserveAspectRatio: "xMidYMid", width: "724", height: "561", viewBox: "0 0 724 561", children: [_jsxs("defs", { children: [_jsxs("linearGradient", { id: "gradientFill-1", x1: "0", x2: "1", y1: "0", y2: "1", gradientUnits: "objectBoundingBox", spreadMethod: "pad", children: [_jsx("stop", { offset: "0", stopColor: "rgb(203,206,208)", stopOpacity: "1" }), _jsx("stop", { offset: "1", stopColor: "rgb(132,131,139)", stopOpacity: "1" })] }), _jsxs("linearGradient", { id: "gradientFill-2", x1: "0", x2: "1", y1: "0", y2: "1", gradientUnits: "objectBoundingBox", spreadMethod: "pad", children: [_jsx("stop", { offset: "0", stopColor: "rgb(39,109,195)", stopOpacity: "1" }), _jsx("stop", { offset: "1", stopColor: "rgb(22,92,170)", stopOpacity: "1" })] })] }), _jsx("path", { d: "M361.453,485.937 C162.329,485.937 0.906,377.828 0.906,244.469 C0.906,111.109 162.329,3.000 361.453,3.000 C560.578,3.000 722.000,111.109 722.000,244.469 C722.000,377.828 560.578,485.937 361.453,485.937 ZM416.641,97.406 C265.289,97.406 142.594,171.314 142.594,262.484 C142.594,353.654 265.289,427.562 416.641,427.562 C567.992,427.562 679.687,377.033 679.687,262.484 C679.687,147.971 567.992,97.406 416.641,97.406 Z", fill: "url(#gradientFill-1)", fillRule: "evenodd" }), _jsx("path", { d: "M550.000,377.000 C550.000,377.000 571.822,383.585 584.500,390.000 C588.899,392.226 596.510,396.668 602.000,402.500 C607.378,408.212 610.000,414.000 610.000,414.000 L696.000,559.000 L557.000,559.062 L492.000,437.000 C492.000,437.000 478.690,414.131 470.500,407.500 C463.668,401.969 460.755,400.000 454.000,400.000 C449.298,400.000 420.974,400.000 420.974,400.000 L421.000,558.974 L298.000,559.026 L298.000,152.938 L545.000,152.938 C545.000,152.938 657.500,154.967 657.500,262.000 C657.500,369.033 550.000,377.000 550.000,377.000 ZM496.500,241.024 L422.037,240.976 L422.000,310.026 L496.500,310.002 C496.500,310.002 531.000,309.895 531.000,274.877 C531.000,239.155 496.500,241.024 496.500,241.024 Z", fill: "url(#gradientFill-2)", fillRule: "evenodd" })] }));
4
+ export const RIcon = styled(Icon).attrs(() => ({
5
+ 'data-component-name': 'icons/RIcon',
6
+ })) ``;
7
+ //# sourceMappingURL=RIcon.js.map
@@ -1 +1,2 @@
1
- import{RIcon as c}from"./RIcon.js";export{c as RIcon};
1
+ export { RIcon } from './RIcon.js';
2
+ //# sourceMappingURL=index.js.map
@@ -1 +1,7 @@
1
- import{jsx as o,jsxs as e}from"react/jsx-runtime";import{styled as t}from"../../styled-components.js";const l=()=>e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:[e("g",{clipPath:"url(#clip0_6351_16623)",children:[o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.74747 6.58131L2.03809 9.97151L9.43066 9.46987L10 2.01562L7.74747 6.58131Z",fill:"url(#paint0_linear_6351_16623)"}),o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.4423 9.46549L8.8069 5.07999L7.07617 7.36535L9.4423 9.46549Z",fill:"url(#paint1_linear_6351_16623)"}),o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.45103 9.46503L4.79606 9.09961L2.0625 9.96222L9.45103 9.46503Z",fill:"url(#paint2_linear_6351_16623)"}),o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.06988 9.96392L3.23275 6.1543L0.673828 6.70146L2.06988 9.96392Z",fill:"url(#paint3_linear_6351_16623)"}),o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.07647 7.37869L6.00647 3.1875L2.94434 6.05784L7.07647 7.37869Z",fill:"url(#paint4_linear_6351_16623)"}),o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.75724 3.24496L6.86268 0.880859L6.05664 3.48672L9.75724 3.24496Z",fill:"url(#paint5_linear_6351_16623)"}),o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.40341 0.0380086L6.701 0.978805L5.62695 0.0253906L8.40341 0.0380086Z",fill:"url(#paint6_linear_6351_16623)"}),o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 7.97912L0.713168 6.67845L0.136274 5.12897L0 7.97912Z",fill:"url(#paint7_linear_6351_16623)"}),o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.0976562 5.08L0.678083 6.72639L3.20016 6.16055L6.07959 3.48453L6.89218 0.903447L5.61267 0L3.43733 0.814112C2.75197 1.45157 1.42204 2.71286 1.37409 2.73659C1.32665 2.76081 0.49588 4.33099 0.0976562 5.08Z",fill:"white"}),o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.13575 2.1231C3.62114 0.650327 5.53604 -0.219808 6.27091 0.521624C7.00533 1.26306 6.2265 3.0649 4.74111 4.53717C3.25572 6.00943 1.36454 6.92752 0.630172 6.18609C-0.104699 5.44516 0.65036 3.59536 2.13575 2.1231Z",fill:"url(#paint8_linear_6351_16623)"}),o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.06934 9.96236L3.22312 6.14062L7.05495 7.37163C5.6695 8.67078 4.12859 9.76905 2.06934 9.96236Z",fill:"url(#paint9_linear_6351_16623)"}),o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.08496 3.47728L7.06866 7.37371C8.22598 6.15683 9.26469 4.8486 9.7734 3.23047L6.08496 3.47728Z",fill:"url(#paint10_linear_6351_16623)"}),o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.76328 3.25002C10.157 2.06191 10.2478 0.357474 8.39141 0.0410156L6.86816 0.882382L9.76328 3.25002Z",fill:"url(#paint11_linear_6351_16623)"}),o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 7.96238C0.0545097 9.92326 1.46924 9.95249 2.07187 9.9697L0.679857 6.71875L0 7.96238Z",fill:"#9E1209"}),o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.08984 3.48401C6.97916 4.03062 8.77147 5.12839 8.80781 5.14858C8.86428 5.18037 9.58053 3.94078 9.74305 3.24023L6.08984 3.48401Z",fill:"url(#paint12_radial_6351_16623)"}),o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.22168 6.14062L4.7641 9.11645C5.67613 8.62182 6.39031 8.01919 7.04442 7.37365L3.22168 6.14062Z",fill:"url(#paint13_radial_6351_16623)"}),o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.673622 6.72331L0.455078 9.32564C0.867434 9.8889 1.43474 9.93786 2.0298 9.89395C1.59928 8.82243 0.739235 6.6799 0.673622 6.72331Z",fill:"url(#paint14_linear_6351_16623)"}),o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.85938 0.889009L9.92352 1.31903C9.76 0.626051 9.2578 0.17887 8.4018 0.0390625L6.85938 0.889009Z",fill:"url(#paint15_linear_6351_16623)"})]}),e("defs",{children:[e("linearGradient",{id:"paint0_linear_6351_16623",x1:"8.78586",y1:"10.8784",x2:"6.67627",y2:"7.15383",gradientUnits:"userSpaceOnUse",children:[o("stop",{stopColor:"#FB7655"}),o("stop",{offset:"0.41",stopColor:"#E42B1E"}),o("stop",{offset:"0.99",stopColor:"#990000"}),o("stop",{offset:"1",stopColor:"#990000"})]}),e("linearGradient",{id:"paint1_linear_6351_16623",x1:"9.83628",y1:"7.75033",x2:"7.11749",y2:"5.92586",gradientUnits:"userSpaceOnUse",children:[o("stop",{stopColor:"#871101"}),o("stop",{offset:"0.99",stopColor:"#911209"}),o("stop",{offset:"1",stopColor:"#911209"})]}),e("linearGradient",{id:"paint2_linear_6351_16623",x1:"7.66112",y1:"10.9916",x2:"4.94241",y2:"9.16714",gradientUnits:"userSpaceOnUse",children:[o("stop",{stopColor:"#871101"}),o("stop",{offset:"0.99",stopColor:"#911209"}),o("stop",{offset:"1",stopColor:"#911209"})]}),e("linearGradient",{id:"paint3_linear_6351_16623",x1:"1.95361",y1:"6.4299",x2:"2.37508",y2:"9.16906",gradientUnits:"userSpaceOnUse",children:[o("stop",{stopColor:"white"}),o("stop",{offset:"0.23",stopColor:"#E57252"}),o("stop",{offset:"0.46",stopColor:"#DE3B20"}),o("stop",{offset:"0.99",stopColor:"#A60003"}),o("stop",{offset:"1",stopColor:"#A60003"})]}),e("linearGradient",{id:"paint4_linear_6351_16623",x1:"4.85231",y1:"3.87267",x2:"5.00761",y2:"6.66815",gradientUnits:"userSpaceOnUse",children:[o("stop",{stopColor:"white"}),o("stop",{offset:"0.23",stopColor:"#E4714E"}),o("stop",{offset:"0.56",stopColor:"#BE1A0D"}),o("stop",{offset:"0.99",stopColor:"#A80D00"}),o("stop",{offset:"1",stopColor:"#A80D00"})]}),e("linearGradient",{id:"paint5_linear_6351_16623",x1:"7.42458",y1:"1.28721",x2:"7.88948",y2:"3.2907",gradientUnits:"userSpaceOnUse",children:[o("stop",{stopColor:"white"}),o("stop",{offset:"0.18",stopColor:"#E46342"}),o("stop",{offset:"0.4",stopColor:"#C82410"}),o("stop",{offset:"0.99",stopColor:"#A80D00"}),o("stop",{offset:"1",stopColor:"#A80D00"})]}),e("linearGradient",{id:"paint6_linear_6351_16623",x1:"6.00479",y1:"0.581667",x2:"8.00815",y2:"-0.420014",gradientUnits:"userSpaceOnUse",children:[o("stop",{stopColor:"white"}),o("stop",{offset:"0.54",stopColor:"#C81F11"}),o("stop",{offset:"0.99",stopColor:"#BF0905"}),o("stop",{offset:"1",stopColor:"#BF0905"})]}),e("linearGradient",{id:"paint7_linear_6351_16623",x1:"0.197007",y1:"5.73133",x2:"0.361894",y2:"7.38217",gradientUnits:"userSpaceOnUse",children:[o("stop",{stopColor:"white"}),o("stop",{offset:"0.31",stopColor:"#DE4024"}),o("stop",{offset:"0.99",stopColor:"#BF190B"}),o("stop",{offset:"1",stopColor:"#BF190B"})]}),e("linearGradient",{id:"paint8_linear_6351_16623",x1:"-0.936764",y1:"7.82917",x2:"6.81425",y2:"-0.141038",gradientUnits:"userSpaceOnUse",children:[o("stop",{stopColor:"#BD0012"}),o("stop",{offset:"0.07",stopColor:"white"}),o("stop",{offset:"0.17",stopColor:"white"}),o("stop",{offset:"0.27",stopColor:"#C82F1C"}),o("stop",{offset:"0.33",stopColor:"#820C01"}),o("stop",{offset:"0.46",stopColor:"#A31601"}),o("stop",{offset:"0.72",stopColor:"#B31301"}),o("stop",{offset:"0.99",stopColor:"#E82609"}),o("stop",{offset:"1",stopColor:"#E82609"})]}),e("linearGradient",{id:"paint9_linear_6351_16623",x1:"5.00048",y1:"8.63258",x2:"2.6658",y2:"8.05637",gradientUnits:"userSpaceOnUse",children:[o("stop",{stopColor:"#8C0C01"}),o("stop",{offset:"0.54",stopColor:"#990C00"}),o("stop",{offset:"0.99",stopColor:"#A80D0E"}),o("stop",{offset:"1",stopColor:"#A80D0E"})]}),e("linearGradient",{id:"paint10_linear_6351_16623",x1:"9.01061",y1:"5.83051",x2:"6.93656",y2:"3.9716",gradientUnits:"userSpaceOnUse",children:[o("stop",{stopColor:"#7E110B"}),o("stop",{offset:"0.99",stopColor:"#9E0C00"}),o("stop",{offset:"1",stopColor:"#9E0C00"})]}),e("linearGradient",{id:"paint11_linear_6351_16623",x1:"9.77255",y1:"2.41961",x2:"8.73942",y2:"1.31512",gradientUnits:"userSpaceOnUse",children:[o("stop",{stopColor:"#79130D"}),o("stop",{offset:"0.99",stopColor:"#9E120B"}),o("stop",{offset:"1",stopColor:"#9E120B"})]}),e("radialGradient",{id:"paint12_radial_6351_16623",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(7.2589 4.00782) scale(2.54164 2.54164)",children:[o("stop",{stopColor:"#A80D00"}),o("stop",{offset:"0.99",stopColor:"#7E0E08"}),o("stop",{offset:"1",stopColor:"#7E0E08"})]}),e("radialGradient",{id:"paint13_radial_6351_16623",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(3.73964 7.35654) scale(3.37878)",children:[o("stop",{stopColor:"#A30C00"}),o("stop",{offset:"0.99",stopColor:"#800E08"}),o("stop",{offset:"1",stopColor:"#800E08"})]}),e("linearGradient",{id:"paint14_linear_6351_16623",x1:"1.3459",y1:"9.96087",x2:"0.503971",y2:"7.10447",gradientUnits:"userSpaceOnUse",children:[o("stop",{stopColor:"#8B2114"}),o("stop",{offset:"0.43",stopColor:"#9E100A"}),o("stop",{offset:"0.99",stopColor:"#B3100C"}),o("stop",{offset:"1",stopColor:"#B3100C"})]}),e("linearGradient",{id:"paint15_linear_6351_16623",x1:"7.80527",y1:"0.494718",x2:"9.69282",y2:"1.32791",gradientUnits:"userSpaceOnUse",children:[o("stop",{stopColor:"#B31000"}),o("stop",{offset:"0.44",stopColor:"#910F08"}),o("stop",{offset:"0.99",stopColor:"#791C12"}),o("stop",{offset:"1",stopColor:"#791C12"})]}),o("clipPath",{id:"clip0_6351_16623",children:o("rect",{width:"10",height:"9.97224",fill:"white"})})]})]}),p=t(l).attrs(()=>({"data-component-name":"icons/RubyIcon"}))``;export{l as Icon,p as RubyIcon};
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { styled } from '../../styled-components.js';
3
+ export const Icon = () => (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", children: [_jsxs("g", { clipPath: "url(#clip0_6351_16623)", children: [_jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.74747 6.58131L2.03809 9.97151L9.43066 9.46987L10 2.01562L7.74747 6.58131Z", fill: "url(#paint0_linear_6351_16623)" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9.4423 9.46549L8.8069 5.07999L7.07617 7.36535L9.4423 9.46549Z", fill: "url(#paint1_linear_6351_16623)" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9.45103 9.46503L4.79606 9.09961L2.0625 9.96222L9.45103 9.46503Z", fill: "url(#paint2_linear_6351_16623)" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M2.06988 9.96392L3.23275 6.1543L0.673828 6.70146L2.06988 9.96392Z", fill: "url(#paint3_linear_6351_16623)" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.07647 7.37869L6.00647 3.1875L2.94434 6.05784L7.07647 7.37869Z", fill: "url(#paint4_linear_6351_16623)" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9.75724 3.24496L6.86268 0.880859L6.05664 3.48672L9.75724 3.24496Z", fill: "url(#paint5_linear_6351_16623)" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M8.40341 0.0380086L6.701 0.978805L5.62695 0.0253906L8.40341 0.0380086Z", fill: "url(#paint6_linear_6351_16623)" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M0 7.97912L0.713168 6.67845L0.136274 5.12897L0 7.97912Z", fill: "url(#paint7_linear_6351_16623)" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M0.0976562 5.08L0.678083 6.72639L3.20016 6.16055L6.07959 3.48453L6.89218 0.903447L5.61267 0L3.43733 0.814112C2.75197 1.45157 1.42204 2.71286 1.37409 2.73659C1.32665 2.76081 0.49588 4.33099 0.0976562 5.08Z", fill: "white" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M2.13575 2.1231C3.62114 0.650327 5.53604 -0.219808 6.27091 0.521624C7.00533 1.26306 6.2265 3.0649 4.74111 4.53717C3.25572 6.00943 1.36454 6.92752 0.630172 6.18609C-0.104699 5.44516 0.65036 3.59536 2.13575 2.1231Z", fill: "url(#paint8_linear_6351_16623)" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M2.06934 9.96236L3.22312 6.14062L7.05495 7.37163C5.6695 8.67078 4.12859 9.76905 2.06934 9.96236Z", fill: "url(#paint9_linear_6351_16623)" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M6.08496 3.47728L7.06866 7.37371C8.22598 6.15683 9.26469 4.8486 9.7734 3.23047L6.08496 3.47728Z", fill: "url(#paint10_linear_6351_16623)" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9.76328 3.25002C10.157 2.06191 10.2478 0.357474 8.39141 0.0410156L6.86816 0.882382L9.76328 3.25002Z", fill: "url(#paint11_linear_6351_16623)" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M0 7.96238C0.0545097 9.92326 1.46924 9.95249 2.07187 9.9697L0.679857 6.71875L0 7.96238Z", fill: "#9E1209" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M6.08984 3.48401C6.97916 4.03062 8.77147 5.12839 8.80781 5.14858C8.86428 5.18037 9.58053 3.94078 9.74305 3.24023L6.08984 3.48401Z", fill: "url(#paint12_radial_6351_16623)" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M3.22168 6.14062L4.7641 9.11645C5.67613 8.62182 6.39031 8.01919 7.04442 7.37365L3.22168 6.14062Z", fill: "url(#paint13_radial_6351_16623)" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M0.673622 6.72331L0.455078 9.32564C0.867434 9.8889 1.43474 9.93786 2.0298 9.89395C1.59928 8.82243 0.739235 6.6799 0.673622 6.72331Z", fill: "url(#paint14_linear_6351_16623)" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M6.85938 0.889009L9.92352 1.31903C9.76 0.626051 9.2578 0.17887 8.4018 0.0390625L6.85938 0.889009Z", fill: "url(#paint15_linear_6351_16623)" })] }), _jsxs("defs", { children: [_jsxs("linearGradient", { id: "paint0_linear_6351_16623", x1: "8.78586", y1: "10.8784", x2: "6.67627", y2: "7.15383", gradientUnits: "userSpaceOnUse", children: [_jsx("stop", { stopColor: "#FB7655" }), _jsx("stop", { offset: "0.41", stopColor: "#E42B1E" }), _jsx("stop", { offset: "0.99", stopColor: "#990000" }), _jsx("stop", { offset: "1", stopColor: "#990000" })] }), _jsxs("linearGradient", { id: "paint1_linear_6351_16623", x1: "9.83628", y1: "7.75033", x2: "7.11749", y2: "5.92586", gradientUnits: "userSpaceOnUse", children: [_jsx("stop", { stopColor: "#871101" }), _jsx("stop", { offset: "0.99", stopColor: "#911209" }), _jsx("stop", { offset: "1", stopColor: "#911209" })] }), _jsxs("linearGradient", { id: "paint2_linear_6351_16623", x1: "7.66112", y1: "10.9916", x2: "4.94241", y2: "9.16714", gradientUnits: "userSpaceOnUse", children: [_jsx("stop", { stopColor: "#871101" }), _jsx("stop", { offset: "0.99", stopColor: "#911209" }), _jsx("stop", { offset: "1", stopColor: "#911209" })] }), _jsxs("linearGradient", { id: "paint3_linear_6351_16623", x1: "1.95361", y1: "6.4299", x2: "2.37508", y2: "9.16906", gradientUnits: "userSpaceOnUse", children: [_jsx("stop", { stopColor: "white" }), _jsx("stop", { offset: "0.23", stopColor: "#E57252" }), _jsx("stop", { offset: "0.46", stopColor: "#DE3B20" }), _jsx("stop", { offset: "0.99", stopColor: "#A60003" }), _jsx("stop", { offset: "1", stopColor: "#A60003" })] }), _jsxs("linearGradient", { id: "paint4_linear_6351_16623", x1: "4.85231", y1: "3.87267", x2: "5.00761", y2: "6.66815", gradientUnits: "userSpaceOnUse", children: [_jsx("stop", { stopColor: "white" }), _jsx("stop", { offset: "0.23", stopColor: "#E4714E" }), _jsx("stop", { offset: "0.56", stopColor: "#BE1A0D" }), _jsx("stop", { offset: "0.99", stopColor: "#A80D00" }), _jsx("stop", { offset: "1", stopColor: "#A80D00" })] }), _jsxs("linearGradient", { id: "paint5_linear_6351_16623", x1: "7.42458", y1: "1.28721", x2: "7.88948", y2: "3.2907", gradientUnits: "userSpaceOnUse", children: [_jsx("stop", { stopColor: "white" }), _jsx("stop", { offset: "0.18", stopColor: "#E46342" }), _jsx("stop", { offset: "0.4", stopColor: "#C82410" }), _jsx("stop", { offset: "0.99", stopColor: "#A80D00" }), _jsx("stop", { offset: "1", stopColor: "#A80D00" })] }), _jsxs("linearGradient", { id: "paint6_linear_6351_16623", x1: "6.00479", y1: "0.581667", x2: "8.00815", y2: "-0.420014", gradientUnits: "userSpaceOnUse", children: [_jsx("stop", { stopColor: "white" }), _jsx("stop", { offset: "0.54", stopColor: "#C81F11" }), _jsx("stop", { offset: "0.99", stopColor: "#BF0905" }), _jsx("stop", { offset: "1", stopColor: "#BF0905" })] }), _jsxs("linearGradient", { id: "paint7_linear_6351_16623", x1: "0.197007", y1: "5.73133", x2: "0.361894", y2: "7.38217", gradientUnits: "userSpaceOnUse", children: [_jsx("stop", { stopColor: "white" }), _jsx("stop", { offset: "0.31", stopColor: "#DE4024" }), _jsx("stop", { offset: "0.99", stopColor: "#BF190B" }), _jsx("stop", { offset: "1", stopColor: "#BF190B" })] }), _jsxs("linearGradient", { id: "paint8_linear_6351_16623", x1: "-0.936764", y1: "7.82917", x2: "6.81425", y2: "-0.141038", gradientUnits: "userSpaceOnUse", children: [_jsx("stop", { stopColor: "#BD0012" }), _jsx("stop", { offset: "0.07", stopColor: "white" }), _jsx("stop", { offset: "0.17", stopColor: "white" }), _jsx("stop", { offset: "0.27", stopColor: "#C82F1C" }), _jsx("stop", { offset: "0.33", stopColor: "#820C01" }), _jsx("stop", { offset: "0.46", stopColor: "#A31601" }), _jsx("stop", { offset: "0.72", stopColor: "#B31301" }), _jsx("stop", { offset: "0.99", stopColor: "#E82609" }), _jsx("stop", { offset: "1", stopColor: "#E82609" })] }), _jsxs("linearGradient", { id: "paint9_linear_6351_16623", x1: "5.00048", y1: "8.63258", x2: "2.6658", y2: "8.05637", gradientUnits: "userSpaceOnUse", children: [_jsx("stop", { stopColor: "#8C0C01" }), _jsx("stop", { offset: "0.54", stopColor: "#990C00" }), _jsx("stop", { offset: "0.99", stopColor: "#A80D0E" }), _jsx("stop", { offset: "1", stopColor: "#A80D0E" })] }), _jsxs("linearGradient", { id: "paint10_linear_6351_16623", x1: "9.01061", y1: "5.83051", x2: "6.93656", y2: "3.9716", gradientUnits: "userSpaceOnUse", children: [_jsx("stop", { stopColor: "#7E110B" }), _jsx("stop", { offset: "0.99", stopColor: "#9E0C00" }), _jsx("stop", { offset: "1", stopColor: "#9E0C00" })] }), _jsxs("linearGradient", { id: "paint11_linear_6351_16623", x1: "9.77255", y1: "2.41961", x2: "8.73942", y2: "1.31512", gradientUnits: "userSpaceOnUse", children: [_jsx("stop", { stopColor: "#79130D" }), _jsx("stop", { offset: "0.99", stopColor: "#9E120B" }), _jsx("stop", { offset: "1", stopColor: "#9E120B" })] }), _jsxs("radialGradient", { id: "paint12_radial_6351_16623", cx: "0", cy: "0", r: "1", gradientUnits: "userSpaceOnUse", gradientTransform: "translate(7.2589 4.00782) scale(2.54164 2.54164)", children: [_jsx("stop", { stopColor: "#A80D00" }), _jsx("stop", { offset: "0.99", stopColor: "#7E0E08" }), _jsx("stop", { offset: "1", stopColor: "#7E0E08" })] }), _jsxs("radialGradient", { id: "paint13_radial_6351_16623", cx: "0", cy: "0", r: "1", gradientUnits: "userSpaceOnUse", gradientTransform: "translate(3.73964 7.35654) scale(3.37878)", children: [_jsx("stop", { stopColor: "#A30C00" }), _jsx("stop", { offset: "0.99", stopColor: "#800E08" }), _jsx("stop", { offset: "1", stopColor: "#800E08" })] }), _jsxs("linearGradient", { id: "paint14_linear_6351_16623", x1: "1.3459", y1: "9.96087", x2: "0.503971", y2: "7.10447", gradientUnits: "userSpaceOnUse", children: [_jsx("stop", { stopColor: "#8B2114" }), _jsx("stop", { offset: "0.43", stopColor: "#9E100A" }), _jsx("stop", { offset: "0.99", stopColor: "#B3100C" }), _jsx("stop", { offset: "1", stopColor: "#B3100C" })] }), _jsxs("linearGradient", { id: "paint15_linear_6351_16623", x1: "7.80527", y1: "0.494718", x2: "9.69282", y2: "1.32791", gradientUnits: "userSpaceOnUse", children: [_jsx("stop", { stopColor: "#B31000" }), _jsx("stop", { offset: "0.44", stopColor: "#910F08" }), _jsx("stop", { offset: "0.99", stopColor: "#791C12" }), _jsx("stop", { offset: "1", stopColor: "#791C12" })] }), _jsx("clipPath", { id: "clip0_6351_16623", children: _jsx("rect", { width: "10", height: "9.97224", fill: "white" }) })] })] }));
4
+ export const RubyIcon = styled(Icon).attrs(() => ({
5
+ 'data-component-name': 'icons/RubyIcon',
6
+ })) ``;
7
+ //# sourceMappingURL=RubyIcon.js.map
@@ -1 +1,2 @@
1
- import{RubyIcon as b}from"./RubyIcon.js";export{b as RubyIcon};
1
+ export { RubyIcon } from './RubyIcon.js';
2
+ //# sourceMappingURL=index.js.map
package/lib/index.js CHANGED
@@ -1 +1,49 @@
1
- import{useAtomValue as e}from"jotai";import{globalOptionsAtom as o}from"./jotai/store.js";import{simplifyAstStructure as n}from"./utils/simplifyAstStructure.js";import{getOperation as x}from"./models/operation.js";import{getServerEnvName as l}from"./utils/environments.js";import{getTagOrGroup as d}from"./models/group.js";import{generateDeepLink as c}from"./components/common/LinkToField.js";import{RequestSamples as g}from"./components/RequestSamples/RequestSamples.js";import{ResponseSamples as P}from"./components/ResponseSamples/ResponseSamples.js";import{RedocSchema as I}from"./components/pluggable/RedocSchema.js";import{RedocExample as w}from"./components/pluggable/RedocExample.js";import{RedoclyOpenAPIDocs as v}from"./components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocs.js";import{StoreProvider as E}from"./components/RedoclyOpenAPIDocs/Providers.js";import{getMarkdownHeaderId as A}from"./components/RedoclyOpenAPIDocs/utils.js";import{safeSlugify as b}from"./utils/string.js";import{JsonPointer as L}from"./utils/JsonPointer.js";import{isOperationName as V}from"./utils/openapi.js";import{pathIncludesLink as F,normalizePath as H}from"./utils/path.js";import{saveTextBeforeHeading as z}from"./utils/saveTextBeforeHeading.js";import{OpenAPIParser as G}from"./services/OpenAPIParser.js";import{buildContentItems as _}from"./services/menu/builder.js";import{normalizeOptions as K}from"./services/config-options/normalizeOptions.js";import{makeDeepLink as U}from"./services/history/helpers.js";function p(){return e(o)}import{EmbeddedReplay as X}from"./components/Replay/EmbeddedReplay.js";import{convertOperationToReplayValue as Z}from"./components/Replay/utils.js";import{SectionContainer as ee}from"./components/SectionContent/index.js";import{Row as re}from"./components/common/panels.js";import{RightPanelContainer as pe}from"./components/SectionContent/index.js";import{Overview as ae}from"./components/Overview/index.js";import{SamplesMiddlePanel as fe,Section as xe,SamplesPanel as ie}from"./components/common/panels.js";import{Heading as se}from"./components/common/OperationItemTitle.js";import{Dropdown as ue}from"./components/common/Dropdown/index.js";import{Markdown as Se}from"./components/Markdown/index.js";import{FieldValueLabel as Oe,FieldLabel as Pe}from"./components/common/Fields/index.js";import{CodeBlockPanel as Ie}from"./components/common/index.js";import{OperationSamplesPanel as we}from"./components/OperationItem/OperationItem.js";import{ExternalDocumentation as ve}from"./components/ExternalDocumentation/index.js";import{PropertyDetails as Ee}from"./components/PropertyDetails/PropertyDetails.js";import{addMarkdownItems as Ae}from"./services/menu/markdown.js";import{getValueFromMdParsedExtension as be}from"./utils/helpers.js";import{ContentItem as Le}from"./components/ContentItem/index.js";import{ExampleSwitch as Ve}from"./components/Samples/ExampleSwitch.js";import{CustomBadges as Fe}from"./components/common/Badges.js";import{useDownloadInfo as Ne}from"./components/Download/useDownloadInfo.js";import{SECTION_ATTR as qe}from"./constants.js";export{Ie as CodeBlockPanel,Le as ContentItem,Fe as CustomBadges,ue as Dropdown,X as EmbeddedReplay,Ve as ExampleSwitch,ve as ExternalDocumentation,Pe as FieldLabel,Oe as FieldValueLabel,se as Heading,L as JsonPointer,Se as Markdown,G as OpenAPIParser,we as OperationSamplesPanel,ae as Overview,Ee as PropertyDetails,w as RedocExample,I as RedocSchema,v as RedoclyOpenAPIDocs,g as RequestSamples,P as ResponseSamples,pe as RightPanelContainer,re as Row,qe as SECTION_ATTR,fe as SamplesMiddlePanel,ie as SamplesPanel,xe as Section,ee as SectionContainer,E as StoreProvider,Ae as addMarkdownItems,_ as buildContentItems,Z as convertOperationToReplayValue,c as generateDeepLink,A as getMarkdownHeaderId,x as getOperation,l as getServerEnvName,d as getTagOrGroup,be as getValueFromMdParsedExtension,V as isOperationName,U as makeDeepLink,K as normalizeOptions,H as normalizePath,F as pathIncludesLink,b as safeSlugify,z as saveTextBeforeHeading,n as simplifyAstStructure,Ne as useDownloadInfo,p as useOpenapiDocsOptions};
1
+ import { useAtomValue } from 'jotai';
2
+ import { globalOptionsAtom } from './jotai/store.js';
3
+ export { simplifyAstStructure } from './utils/simplifyAstStructure.js';
4
+ export { getOperation } from './models/operation.js';
5
+ export { getServerEnvName } from './utils/environments.js';
6
+ export { getTagOrGroup } from './models/group.js';
7
+ export { generateDeepLink } from './components/common/LinkToField.js';
8
+ export { RequestSamples } from './components/RequestSamples/RequestSamples.js';
9
+ export { ResponseSamples } from './components/ResponseSamples/ResponseSamples.js';
10
+ export { RedocSchema } from './components/pluggable/RedocSchema.js';
11
+ export { RedocExample } from './components/pluggable/RedocExample.js';
12
+ export { RedoclyOpenAPIDocs } from './components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocs.js';
13
+ export { StoreProvider } from './components/RedoclyOpenAPIDocs/Providers.js';
14
+ export { getMarkdownHeaderId } from './components/RedoclyOpenAPIDocs/utils.js';
15
+ export { safeSlugify } from './utils/string.js';
16
+ export { JsonPointer } from './utils/JsonPointer.js';
17
+ export { isOperationName } from './utils/openapi.js';
18
+ export { pathIncludesLink, normalizePath } from './utils/path.js';
19
+ export { saveTextBeforeHeading } from './utils/saveTextBeforeHeading.js';
20
+ export { OpenAPIParser } from './services/OpenAPIParser.js';
21
+ export { buildContentItems } from './services/menu/builder.js';
22
+ export { normalizeOptions } from './services/config-options/normalizeOptions.js';
23
+ export { makeDeepLink } from './services/history/helpers.js';
24
+ export function useOpenapiDocsOptions() {
25
+ return useAtomValue(globalOptionsAtom);
26
+ }
27
+ export { EmbeddedReplay } from './components/Replay/EmbeddedReplay.js';
28
+ export { convertOperationToReplayValue } from './components/Replay/utils.js';
29
+ export { SectionContainer } from './components/SectionContent/index.js';
30
+ export { Row } from './components/common/panels.js';
31
+ export { RightPanelContainer } from './components/SectionContent/index.js';
32
+ export { Overview } from './components/Overview/index.js';
33
+ export { SamplesMiddlePanel, Section, SamplesPanel } from './components/common/panels.js';
34
+ export { Heading } from './components/common/OperationItemTitle.js';
35
+ export { Dropdown } from './components/common/Dropdown/index.js';
36
+ export { Markdown } from './components/Markdown/index.js';
37
+ export { FieldValueLabel, FieldLabel } from './components/common/Fields/index.js';
38
+ export { CodeBlockPanel } from './components/common/index.js';
39
+ export { OperationSamplesPanel } from './components/OperationItem/OperationItem.js';
40
+ export { ExternalDocumentation } from './components/ExternalDocumentation/index.js';
41
+ export { PropertyDetails } from './components/PropertyDetails/PropertyDetails.js';
42
+ export { addMarkdownItems } from './services/menu/markdown.js';
43
+ export { getValueFromMdParsedExtension } from './utils/helpers.js';
44
+ export { ContentItem } from './components/ContentItem/index.js';
45
+ export { ExampleSwitch } from './components/Samples/ExampleSwitch.js';
46
+ export { CustomBadges } from './components/common/Badges.js';
47
+ export { useDownloadInfo } from './components/Download/useDownloadInfo.js';
48
+ export { SECTION_ATTR } from './constants.js';
49
+ //# sourceMappingURL=index.js.map
package/lib/jotai/app.js CHANGED
@@ -1 +1,113 @@
1
- import{atom as a}from"jotai";import{atomWithStorage as v,createJSONStorage as d}from"jotai/utils";import{LayoutVariant as u}from"@redocly/config";import{IS_BROWSER as f}from"@redocly/theme/core/openapi";import{getCookie as y,removeCookie as A,setCookie as k}from"../utils/cookies.js";import{globalOptionsAtom as O}from"./store.js";import{mergeEnvData as m}from"../utils/environments.js";import{fromSessionStorage as x,safeJsonParse as S,toSessionStorage as C}from"../utils/index.js";const l={isSidebarOpened:!0,activeMimeName:"",layout:u.THREE_PANEL,language:"",environment:"",environments:{},userClaims:{}},b={getItem:e=>{const t=S(y(e,globalThis.redoclyCookieStorage?.getStore?.())),o=S(x(e));return{...l,...o,...t}},setItem:(e,t)=>{const{environments:o,...n}=t,r={environments:o};k(e,JSON.stringify(n)),C(e,JSON.stringify(r))},removeItem:e=>{A(e),sessionStorage.removeItem(e)}},s=v("redoc.appStore",l,b),g=a({}),h=a(e=>{const t=e(s),o=e(g);return m(t.environments,o?.environments||{})}),D=a(e=>{const t=e(s),o=e(g),n=m(t.environments,o?.environments||{}),r=o?.environment||t.environment,i=n[r]?r:Object.keys(n)[0];return[n[i]||{},i||""]},(e,t,{environment:o,environments:n})=>{const r=e(s);t(s,{...r,environment:o||r.environment,environments:m(r.environments||{},n)})}),K=a(e=>e(s).isSidebarOpened,(e,t,o)=>{const n=e(s);t(s,{...n,isSidebarOpened:o})}),P=a(e=>e(s).activeMimeName,(e,t,o)=>{const n=e(s);t(s,{...n,activeMimeName:o})}),W=a(e=>e(s).layout,(e,t,o=u.STACKED)=>{const n=e(s);t(s,{...n,layout:o})}),_=a(e=>e(s).userClaims,(e,t,o)=>{const n=e(s);t(s,{...n,userClaims:o})}),c=v("redoc.appSessionStore",{collapsedSidebar:!1,unsupportedFeatureScreen:!1},f?d(()=>sessionStorage):void 0),j=a(e=>e(c).collapsedSidebar,(e,t,o)=>{const n=e(c);t(c,{...n,collapsedSidebar:o})});function N({lang:e,label:t}){return(t||e).toLowerCase()}const w=a(e=>{const{codeSamples:t}=e(O),o=t.languages.map(({lang:r,label:i},p)=>({key:N({lang:r,label:i}),lang:r,title:i||r,order:p})),n=e(s).language||o[0]?.key;return{languages:o,activeLanguage:o.find(({key:r})=>r===n)?.key||o[0]?.key}},(e,t,o)=>{const n=e(s);t(s,{...n,language:o})});export{P as activeMimeNameAtom,c as appSessionStore,s as appStore,g as appStoreOverrideAtom,j as collapsedSidebarAtom,D as environmentAtom,h as environmentsAtom,N as getLangKey,K as isSidebarOpenedAtom,w as languageAtom,W as layoutAtom,_ as userClaimsAtom};
1
+ import { atom } from 'jotai';
2
+ import { atomWithStorage, createJSONStorage } from 'jotai/utils';
3
+ import { LayoutVariant } from '@redocly/config';
4
+ import { IS_BROWSER } from '@redocly/theme/core/openapi';
5
+ import { getCookie, removeCookie, setCookie } from '../utils/cookies.js';
6
+ import { globalOptionsAtom } from './store.js';
7
+ import { mergeEnvData } from '../utils/environments.js';
8
+ import { fromSessionStorage, safeJsonParse, toSessionStorage } from '../utils/index.js';
9
+ const defaultAppStoreValue = {
10
+ isSidebarOpened: true,
11
+ activeMimeName: '',
12
+ layout: LayoutVariant.THREE_PANEL,
13
+ language: '',
14
+ environment: '',
15
+ environments: {},
16
+ userClaims: {},
17
+ };
18
+ // get environment from sessionStorage and other values from cookies (so it works during SSR)
19
+ const customStorage = {
20
+ getItem: (ctx) => {
21
+ const cookieValue = safeJsonParse(getCookie(ctx, globalThis.redoclyCookieStorage?.getStore?.()));
22
+ const sessionValue = safeJsonParse(fromSessionStorage(ctx));
23
+ return {
24
+ ...defaultAppStoreValue,
25
+ ...sessionValue,
26
+ ...cookieValue,
27
+ };
28
+ },
29
+ setItem: (ctx, value) => {
30
+ const { environments, ...cookieValue } = value;
31
+ const sessionValue = { environments };
32
+ setCookie(ctx, JSON.stringify(cookieValue));
33
+ toSessionStorage(ctx, JSON.stringify(sessionValue));
34
+ },
35
+ removeItem: (ctx) => {
36
+ removeCookie(ctx);
37
+ sessionStorage.removeItem(ctx);
38
+ },
39
+ };
40
+ export const appStore = atomWithStorage('redoc.appStore', defaultAppStoreValue, customStorage);
41
+ // allow some parts of appStore to be overridden
42
+ export const appStoreOverrideAtom = atom({});
43
+ export const environmentsAtom = atom((get) => {
44
+ const state = get(appStore);
45
+ const override = get(appStoreOverrideAtom);
46
+ const envs = mergeEnvData(state.environments, override?.environments || {});
47
+ return envs;
48
+ });
49
+ export const environmentAtom = atom((get) => {
50
+ const state = get(appStore);
51
+ const override = get(appStoreOverrideAtom);
52
+ const envs = mergeEnvData(state.environments, override?.environments || {});
53
+ const selectedEnvironment = override?.environment || state.environment;
54
+ const envName = envs[selectedEnvironment] ? selectedEnvironment : Object.keys(envs)[0];
55
+ const env = envs[envName] || {};
56
+ return [env, envName || ''];
57
+ }, (get, set, { environment, environments }) => {
58
+ const state = get(appStore);
59
+ set(appStore, {
60
+ ...state,
61
+ environment: environment || state.environment,
62
+ environments: mergeEnvData(state.environments || {}, environments),
63
+ });
64
+ });
65
+ export const isSidebarOpenedAtom = atom((get) => get(appStore).isSidebarOpened, (get, set, isSidebarOpened) => {
66
+ const state = get(appStore);
67
+ set(appStore, { ...state, isSidebarOpened });
68
+ });
69
+ export const activeMimeNameAtom = atom((get) => get(appStore).activeMimeName, (get, set, activeMimeName) => {
70
+ const state = get(appStore);
71
+ set(appStore, { ...state, activeMimeName });
72
+ });
73
+ export const layoutAtom = atom((get) => get(appStore).layout, (get, set, layout = LayoutVariant.STACKED) => {
74
+ const state = get(appStore);
75
+ set(appStore, { ...state, layout });
76
+ });
77
+ export const userClaimsAtom = atom((get) => get(appStore).userClaims, (get, set, userClaims) => {
78
+ const state = get(appStore);
79
+ set(appStore, { ...state, userClaims });
80
+ });
81
+ /**
82
+ * appSessionStore saved to session storage
83
+ */
84
+ export const appSessionStore = atomWithStorage(// FIXME: get rid of it, need to remove versions code
85
+ 'redoc.appSessionStore', {
86
+ collapsedSidebar: false,
87
+ unsupportedFeatureScreen: false,
88
+ }, IS_BROWSER ? createJSONStorage(() => sessionStorage) : undefined);
89
+ export const collapsedSidebarAtom = atom((get) => get(appSessionStore).collapsedSidebar, (get, set, collapsedSidebar) => {
90
+ const state = get(appSessionStore);
91
+ set(appSessionStore, { ...state, collapsedSidebar });
92
+ });
93
+ export function getLangKey({ lang, label }) {
94
+ return (label || lang).toLowerCase();
95
+ }
96
+ export const languageAtom = atom((get) => {
97
+ const { codeSamples } = get(globalOptionsAtom);
98
+ const languages = codeSamples.languages.map(({ lang, label }, index) => ({
99
+ key: getLangKey({ lang, label }),
100
+ lang,
101
+ title: label || lang,
102
+ order: index,
103
+ }));
104
+ const activeLanguage = get(appStore).language || languages[0]?.key;
105
+ return {
106
+ languages,
107
+ activeLanguage: languages.find(({ key }) => key === activeLanguage)?.key || languages[0]?.key,
108
+ };
109
+ }, (get, set, activeLanguage) => {
110
+ const state = get(appStore);
111
+ set(appStore, { ...state, language: activeLanguage });
112
+ });
113
+ //# sourceMappingURL=app.js.map
@@ -1 +1,28 @@
1
- import{atom as a}from"jotai";import{atomFamily as s}from"jotai/utils";import u from"deepmerge";function l(e,t={},o){return{activeExampleName:o,activeOneOf:{[e]:0},requestValues:t,request:{expandedAll:void 0},response:{expandedAll:void 0}}}const r=a({}),c=s(e=>a(t=>t(r)?.[e]||l(e),(t,o,m)=>{const n=t(r),p=n[e]||l(e);o(r,{...n,[e]:u(p,m)})}));export{r as allOperations,l as getDefaultOperationStore,c as operationStore};
1
+ import { atom } from 'jotai';
2
+ import { atomFamily } from 'jotai/utils';
3
+ import merge from 'deepmerge';
4
+ export function getDefaultOperationStore(pointer, requestValues = {}, activeExampleName) {
5
+ return {
6
+ activeExampleName,
7
+ activeOneOf: {
8
+ [pointer]: 0,
9
+ },
10
+ requestValues: requestValues,
11
+ request: {
12
+ expandedAll: undefined,
13
+ },
14
+ response: {
15
+ expandedAll: undefined,
16
+ },
17
+ };
18
+ }
19
+ export const allOperations = atom({});
20
+ export const operationStore = atomFamily((pointer) => atom((get) => get(allOperations)?.[pointer] || getDefaultOperationStore(pointer), (get, set, update) => {
21
+ const prevStore = get(allOperations);
22
+ const prevValue = prevStore[pointer] || getDefaultOperationStore(pointer);
23
+ set(allOperations, {
24
+ ...prevStore,
25
+ [pointer]: merge(prevValue, update),
26
+ });
27
+ }));
28
+ //# sourceMappingURL=operation.js.map
@@ -1 +1,5 @@
1
- import{atom as o}from"jotai";import{LOADING_STATE as t}from"../constants.js";const p=o(t.NOT_LOADED),a=o([]);export{a as allOperationsAtom,p as replayStateAtom};
1
+ import { atom } from 'jotai';
2
+ import { LOADING_STATE } from '../constants.js';
3
+ export const replayStateAtom = atom(LOADING_STATE.NOT_LOADED);
4
+ export const allOperationsAtom = atom([]);
5
+ //# sourceMappingURL=replay.js.map
@@ -1 +1,8 @@
1
- import{atom as t}from"jotai";const r=t({parser:{},options:{}}),s=t(o=>o(r).parser),a=t(o=>o(r).options);export{a as globalOptionsAtom,s as globalParserAtom,r as globalStoreAtom};
1
+ import { atom } from 'jotai';
2
+ export const globalStoreAtom = atom({
3
+ parser: {},
4
+ options: {},
5
+ });
6
+ export const globalParserAtom = atom((get) => get(globalStoreAtom).parser);
7
+ export const globalOptionsAtom = atom((get) => get(globalStoreAtom).options);
8
+ //# sourceMappingURL=store.js.map
@@ -1 +1,9 @@
1
- import{useAtomCallback as r}from"jotai/utils";import{useCallback as o}from"react";const c=()=>r(o((a,t)=>t,[]))();export{c as useWriteAtom};
1
+ import { useAtomCallback } from 'jotai/utils';
2
+ import { useCallback } from 'react';
3
+ export const useWriteAtom = () => {
4
+ const writeAtomCallback = useAtomCallback(useCallback((_get, set) => {
5
+ return set;
6
+ }, []));
7
+ return writeAtomCallback();
8
+ };
9
+ //# sourceMappingURL=use-write-atom.js.map
@@ -1 +1,28 @@
1
- import{isOperationName as j,JsonPointer as u}from"../utils/index.js";import{getOperation as N}from"./operation.js";import{joinWithSeparator as O}from"../services/index.js";function y(r,e,i,p,c,f,m,h){const{resolved:a}=r.deref(i),s=[];for(const n of Object.keys(a)){const o=a[n],l=Object.keys(o).filter(j);for(const t of l){const b=o[t],k=N(r,{...b,pathName:n,pointer:u.join(p,["callbacks",e,t]),httpVerb:t,pathParameters:o.parameters||[],pathServers:o.servers},m,c,f,{isCallback:!0,id:O(e,t)},h);s.push(k)}}return{name:e,operations:s}}export{y as getCallback};
1
+ import { isOperationName, JsonPointer } from '../utils/index.js';
2
+ import { getOperation } from './operation.js';
3
+ import { joinWithSeparator } from '../services/index.js';
4
+ export function getCallback(parser, name, infoOrRef, parentPointer, options, href, parent, userClaims) {
5
+ const { resolved: paths } = parser.deref(infoOrRef);
6
+ const operations = [];
7
+ for (const pathName of Object.keys(paths)) {
8
+ const path = paths[pathName];
9
+ const operationNames = Object.keys(path).filter(isOperationName);
10
+ for (const operationName of operationNames) {
11
+ const operationInfo = path[operationName];
12
+ const operation = getOperation(parser, {
13
+ ...operationInfo,
14
+ pathName,
15
+ pointer: JsonPointer.join(parentPointer, ['callbacks', name, operationName]),
16
+ httpVerb: operationName,
17
+ pathParameters: path.parameters || [],
18
+ pathServers: path.servers,
19
+ }, parent, options, href, {
20
+ isCallback: true,
21
+ id: joinWithSeparator(name, operationName),
22
+ }, userClaims);
23
+ operations.push(operation);
24
+ }
25
+ }
26
+ return { name, operations };
27
+ }
28
+ //# sourceMappingURL=callback.js.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=code-sample-options.js.map
@@ -1 +1,17 @@
1
- import{getValueFromMdParsedExtension as o}from"../utils/index.js";function i({parser:r,infoOrRef:t,mime:s,encoding:n}){const{resolved:e}=r.deref(t),a=e.value,m=e.value,u=o(e,"summary"),c=o(e,"description");return{value:m,rawValue:a,summary:u,description:c,mime:s,encoding:n}}export{i as getExamples};
1
+ import { getValueFromMdParsedExtension } from '../utils/index.js';
2
+ export function getExamples({ parser, infoOrRef, mime, encoding }) {
3
+ const { resolved: example } = parser.deref(infoOrRef);
4
+ const rawValue = example.value;
5
+ const value = example.value;
6
+ const summary = getValueFromMdParsedExtension(example, 'summary');
7
+ const description = getValueFromMdParsedExtension(example, 'description');
8
+ return {
9
+ value,
10
+ rawValue,
11
+ summary,
12
+ description,
13
+ mime,
14
+ encoding,
15
+ };
16
+ }
17
+ //# sourceMappingURL=example.js.map
@@ -1 +1,109 @@
1
- import{REDOCLY_TEAMS_RBAC as r}from"@redocly/config";import{joinWithSeparator as w}from"../services/index.js";import{extractExtensions as I,getValueFromMdParsedExtension as E,mapValues as L,removePercentChart as R}from"../utils/index.js";import{getSchema as T}from"./schema.js";import{getExamples as _}from"./example.js";const F={path:{style:"simple",explode:!1},query:{style:"form",explode:!0},header:{style:"simple",explode:!1},cookie:{style:"form",explode:!0}};function N(l,i,p,a,d,x,P=p){const{resolved:e}=l.deref(i),g=i.kind||"field",f=i.name||e.name,n=e.in,S=!!e.required;let c=e.schema,u,s="",m;if(!c&&e.in&&e.content){s=Object.keys(e.content)[0];const t=e.content[s];c=t&&t?.example?{...l.deref(t.schema,x,!0).resolved,example:e.example||t.example}:t.schema}const h=w(d.parentFieldFullPath,R(f||"")),o=T({parser:l,schemaOrRef:c||{},pointer:p,options:a,baseRefsStack:x,absolutePointer:i.$ref||e.schema?.absolutePointer||P,deps:{...d,parentFieldFullPath:h,in:n}}),A=e.description===void 0?E(o,"description")||"":E(e,"description"),b=e.example||o.example,y=e.examples||e.content?.[s]?.examples,k=y?L(y,(t,v)=>_({parser:l,infoOrRef:t,mime:v,encoding:e.encoding})):void 0;s?u=s:e.style?m=e.style:n&&(m=F[n]?.style??"form");const C=e.explode===void 0&&n?F[n]?.explode??!0:!!e.explode,M=e.deprecated===void 0?o.deprecated:e.deprecated,V=a.showExtensions?I(e,a.showExtensions):void 0,q=o?.const||e?.const||"";return{deps:d||{},schema:o,name:f,required:S,description:A,example:b,examples:k,deprecated:M,in:n,kind:g,extensions:V,explode:C,style:m,const:q,serializationMime:u,fieldFullPath:h,[r]:e[r]||o[r]}}export{N as getField};
1
+ import { REDOCLY_TEAMS_RBAC } from '@redocly/config';
2
+ import { joinWithSeparator } from '../services/index.js';
3
+ import { extractExtensions, getValueFromMdParsedExtension, mapValues, removePercentChart, } from '../utils/index.js';
4
+ import { getSchema } from './schema.js';
5
+ import { getExamples } from './example.js';
6
+ const DEFAULT_SERIALIZATION = {
7
+ path: {
8
+ style: 'simple',
9
+ explode: false,
10
+ },
11
+ query: {
12
+ style: 'form',
13
+ explode: true,
14
+ },
15
+ header: {
16
+ style: 'simple',
17
+ explode: false,
18
+ },
19
+ cookie: {
20
+ style: 'form',
21
+ explode: true,
22
+ },
23
+ };
24
+ export function getField(parser, infoOrRef, pointer, options, deps, refsStack, absolutePointer = pointer) {
25
+ const { resolved: info } = parser.deref(infoOrRef);
26
+ const kind = infoOrRef.kind || 'field';
27
+ const name = infoOrRef.name || info.name;
28
+ const inValue = info.in;
29
+ const required = !!info.required;
30
+ let fieldSchema = info.schema;
31
+ let serializationMime;
32
+ let rawSerializationMime = '';
33
+ let style;
34
+ if (!fieldSchema && info.in && info.content) {
35
+ rawSerializationMime = Object.keys(info.content)[0];
36
+ const mediaContent = info.content[rawSerializationMime];
37
+ fieldSchema =
38
+ mediaContent && mediaContent?.example
39
+ ? {
40
+ ...parser.deref(mediaContent.schema, refsStack, true).resolved,
41
+ example: info.example || mediaContent.example,
42
+ }
43
+ : mediaContent.schema;
44
+ }
45
+ const fieldFullPath = joinWithSeparator(deps.parentFieldFullPath, removePercentChart(name || '')); // We need to remove percent chart for field full path for prevent URI malformed error
46
+ const schema = getSchema({
47
+ parser,
48
+ schemaOrRef: fieldSchema || {},
49
+ pointer,
50
+ options,
51
+ baseRefsStack: refsStack,
52
+ absolutePointer: infoOrRef['$ref'] || info.schema?.['absolutePointer'] || absolutePointer,
53
+ deps: {
54
+ ...deps,
55
+ parentFieldFullPath: fieldFullPath,
56
+ in: inValue,
57
+ },
58
+ });
59
+ const description = info.description === undefined
60
+ ? getValueFromMdParsedExtension(schema, 'description') || ''
61
+ : getValueFromMdParsedExtension(info, 'description');
62
+ const example = info.example || schema.example;
63
+ const infoExamples = info.examples || info.content?.[rawSerializationMime]?.examples;
64
+ const examples = infoExamples
65
+ ? mapValues(infoExamples, (example, name) => getExamples({
66
+ parser,
67
+ infoOrRef: example,
68
+ mime: name,
69
+ encoding: info.encoding,
70
+ }))
71
+ : undefined;
72
+ if (rawSerializationMime) {
73
+ serializationMime = rawSerializationMime;
74
+ }
75
+ else if (info.style) {
76
+ style = info.style;
77
+ }
78
+ else if (inValue) {
79
+ style = DEFAULT_SERIALIZATION[inValue]?.style ?? 'form'; // fallback to from in case "in" is invalid
80
+ }
81
+ const explode = info.explode === undefined && inValue
82
+ ? (DEFAULT_SERIALIZATION[inValue]?.explode ?? true)
83
+ : !!info.explode;
84
+ const deprecated = info.deprecated === undefined ? schema.deprecated : info.deprecated;
85
+ const extensions = options.showExtensions
86
+ ? extractExtensions(info, options.showExtensions)
87
+ : undefined;
88
+ const constValue = schema?.const || info?.const || '';
89
+ return {
90
+ deps: deps || {},
91
+ schema,
92
+ name,
93
+ required,
94
+ description,
95
+ example,
96
+ examples,
97
+ deprecated,
98
+ in: inValue,
99
+ kind,
100
+ extensions,
101
+ explode,
102
+ style,
103
+ const: constValue,
104
+ serializationMime,
105
+ fieldFullPath,
106
+ [REDOCLY_TEAMS_RBAC]: info[REDOCLY_TEAMS_RBAC] || schema[REDOCLY_TEAMS_RBAC],
107
+ };
108
+ }
109
+ //# sourceMappingURL=field.js.map
@@ -1 +1,38 @@
1
- import{REDOCLY_TEAMS_RBAC as m}from"@redocly/config";import{joinWithSeparator as x}from"../services/index.js";import{getValueFromMdParsedExtension as S,safeSlugify as o}from"../utils/index.js";import{getHref as v}from"../services/menu/operation.js";import{saveTextBeforeHeading as C}from"../utils/saveTextBeforeHeading.js";function B(n,e,i){let s;i?.id&&n==="schema"?s=x(i.id,o(e.name)):s=e.id||o(e.name);const t=e["x-displayName"]||e.name,c=e.level||1,d=e.isSchema,f=e.ast||void 0,l=C(S(e,"description")||""),a=e.items||[],h=e.externalDocs;return{id:s.toLowerCase(),type:n,parent:i,name:t,level:c,depth:0,isSchema:d,description:l,items:a,ast:f,externalDocs:h,href:v({id:s}),[m]:e[m]||i?.[m]}}export{B as getTagOrGroup};
1
+ import { REDOCLY_TEAMS_RBAC } from '@redocly/config';
2
+ import { joinWithSeparator } from '../services/index.js';
3
+ import { getValueFromMdParsedExtension, safeSlugify } from '../utils/index.js';
4
+ import { getHref } from '../services/menu/operation.js';
5
+ import { saveTextBeforeHeading } from '../utils/saveTextBeforeHeading.js';
6
+ export function getTagOrGroup(type, tagOrGroup, parent) {
7
+ let id;
8
+ if (parent?.id && type === 'schema') {
9
+ // handle schemas ids similar to how it is done for operations
10
+ id = joinWithSeparator(parent.id, safeSlugify(tagOrGroup.name));
11
+ }
12
+ else {
13
+ id = tagOrGroup.id || safeSlugify(tagOrGroup.name);
14
+ }
15
+ const name = tagOrGroup['x-displayName'] || tagOrGroup.name;
16
+ const level = tagOrGroup.level || 1;
17
+ const isSchema = tagOrGroup.isSchema;
18
+ const ast = tagOrGroup.ast || undefined;
19
+ const description = saveTextBeforeHeading(getValueFromMdParsedExtension(tagOrGroup, 'description') || '');
20
+ const items = tagOrGroup.items || [];
21
+ const externalDocs = tagOrGroup.externalDocs;
22
+ return {
23
+ id: id.toLowerCase(),
24
+ type,
25
+ parent,
26
+ name,
27
+ level,
28
+ depth: 0,
29
+ isSchema,
30
+ description,
31
+ items,
32
+ ast,
33
+ externalDocs,
34
+ href: getHref({ id }),
35
+ [REDOCLY_TEAMS_RBAC]: tagOrGroup[REDOCLY_TEAMS_RBAC] || parent?.[REDOCLY_TEAMS_RBAC],
36
+ };
37
+ }
38
+ //# sourceMappingURL=group.js.map
@@ -1 +1,14 @@
1
- export*from"./code-sample-options.js";import{getTagOrGroup as t}from"./group.js";import{getOperation as m,isPayloadSample as x}from"./operation.js";import{getRequestBody as a}from"./request.js";import{getExamples as i}from"./example.js";import{getActiveMediaType as l,getMediaContent as s}from"./mediaContent.js";import{getMediaType as y}from"./mediaType.js";import{getResponse as M}from"./response.js";import{getSchema as u}from"./schema.js";import{getField as O}from"./field.js";import{getCallback as S}from"./callback.js";export*from"./security.js";export*from"./types.js";export{l as getActiveMediaType,S as getCallback,i as getExamples,O as getField,s as getMediaContent,y as getMediaType,m as getOperation,a as getRequestBody,M as getResponse,u as getSchema,t as getTagOrGroup,x as isPayloadSample};
1
+ export * from './code-sample-options.js';
2
+ export { getTagOrGroup } from './group.js';
3
+ export { getOperation, isPayloadSample } from './operation.js';
4
+ export { getRequestBody } from './request.js';
5
+ export { getExamples } from './example.js';
6
+ export { getActiveMediaType, getMediaContent } from './mediaContent.js';
7
+ export { getMediaType } from './mediaType.js';
8
+ export { getResponse } from './response.js';
9
+ export { getSchema } from './schema.js';
10
+ export { getField } from './field.js';
11
+ export { getCallback } from './callback.js';
12
+ export * from './security.js';
13
+ export * from './types.js';
14
+ //# sourceMappingURL=index.js.map