@redocly/openapi-docs 3.12.0-rc.7 → 3.12.1
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.
- package/dist/redocly-openapi-docs.min.js +2153 -1963
- package/lib/components/ApiInfo/ApiInfo.js +29 -1
- package/lib/components/ApiInfo/Metadata.js +29 -1
- package/lib/components/ApiInfo/index.js +2 -1
- package/lib/components/ApiInfo/styled.js +17 -8
- package/lib/components/CallbackSamples/CallbackSamples.js +25 -4
- package/lib/components/CallbackSamples/index.js +2 -1
- package/lib/components/Callbacks/CallbackDetails.js +17 -3
- package/lib/components/Callbacks/CallbackOperation.js +24 -3
- package/lib/components/Callbacks/CallbackSummary.js +19 -3
- package/lib/components/Callbacks/CallbacksList.js +16 -1
- package/lib/components/Callbacks/index.js +4 -1
- package/lib/components/Callbacks/styled.js +6 -3
- package/lib/components/Content/Content.js +10 -1
- package/lib/components/Content/index.js +2 -1
- package/lib/components/Content/useAutoScroll.js +50 -1
- package/lib/components/ContentItem/ContentItem.js +31 -1
- package/lib/components/ContentItem/index.js +2 -1
- package/lib/components/ContentItem/useIsExpanded.js +33 -1
- package/lib/components/ContentItems/ContentItems.js +19 -1
- package/lib/components/ContentItems/Items.js +13 -1
- package/lib/components/ContentItems/VirtualList.js +35 -1
- package/lib/components/ContentItems/helpers.js +49 -1
- package/lib/components/ContentItems/index.js +2 -1
- package/lib/components/ContentItems/useScrollOnRender.js +26 -1
- package/lib/components/Discriminator/Discriminator.js +27 -2
- package/lib/components/Discriminator/index.js +2 -1
- package/lib/components/Download/DownloadSpecification.js +46 -4
- package/lib/components/Download/index.js +2 -1
- package/lib/components/Download/types.js +2 -0
- package/lib/components/Download/useDownloadInfo.js +42 -1
- package/lib/components/ErrorBoundary/ErrorBoundary.js +22 -2
- package/lib/components/ErrorBoundary/index.js +2 -1
- package/lib/components/ExpandAllButton/ExpandAllButton.js +31 -2
- package/lib/components/ExpandAllButton/index.js +2 -1
- package/lib/components/ExternalDocumentation/ExternalDocumentation.js +18 -4
- package/lib/components/ExternalDocumentation/index.js +2 -1
- package/lib/components/Language/LanguageDropdown.js +21 -1
- package/lib/components/Language/LanguageItem.js +33 -1
- package/lib/components/Language/LanguageList.js +93 -1
- package/lib/components/Language/_tests_/LanguageDropdown.test.js +23 -1
- package/lib/components/Language/constants.js +3 -1
- package/lib/components/Language/index.js +4 -1
- package/lib/components/Language/styled.js +29 -15
- package/lib/components/Markdown/Markdown.js +64 -1
- package/lib/components/Markdown/index.js +3 -1
- package/lib/components/Markdown/types.js +2 -0
- package/lib/components/MediaTypeSwitch/MediaTypesSwitch.js +51 -1
- package/lib/components/MediaTypeSwitch/index.js +2 -1
- package/lib/components/OperationItem/Description.d.ts +1 -4
- package/lib/components/OperationItem/Description.js +9 -1
- package/lib/components/OperationItem/OperationItem.js +70 -5
- package/lib/components/OperationItem/_tests_/OperationItem.test.js +70 -1
- package/lib/components/OperationItem/_tests_/__mocks__/mock-intersection-observer.js +40 -1
- package/lib/components/OperationItem/index.js +2 -1
- package/lib/components/OperationItem/types.js +2 -0
- package/lib/components/Overlay.js +48 -3
- package/lib/components/Overview/Overview.js +20 -1
- package/lib/components/Overview/index.js +2 -1
- package/lib/components/PageFooter/PageFooter.js +19 -1
- package/lib/components/PageFooter/index.js +2 -1
- package/lib/components/Panel/ResponsePanel.js +12 -6
- package/lib/components/Panel/Trigger.js +4 -2
- package/lib/components/Panel/index.js +3 -1
- package/lib/components/PanelItem/PanelItem.js +6 -1
- package/lib/components/PanelItem/index.js +3 -1
- package/lib/components/PanelItem/styled.js +20 -10
- package/lib/components/PayloadSamples/Example.js +6 -1
- package/lib/components/PayloadSamples/ExampleValue.js +30 -1
- package/lib/components/PayloadSamples/MediaTypeSamples.js +36 -2
- package/lib/components/PayloadSamples/PayloadSamples.js +26 -1
- package/lib/components/PayloadSamples/index.js +7 -1
- package/lib/components/PayloadSamples/styled.js +9 -4
- package/lib/components/PayloadSamples/types.js +2 -0
- package/lib/components/PropertyDetails/DescriptionEnums.js +19 -3
- package/lib/components/PropertyDetails/EnumValues.js +37 -1
- package/lib/components/PropertyDetails/Examples.js +26 -1
- package/lib/components/PropertyDetails/Extensions.js +17 -2
- package/lib/components/PropertyDetails/FieldDetail.js +15 -2
- package/lib/components/PropertyDetails/FieldDetails.js +51 -6
- package/lib/components/PropertyDetails/Pattern.js +21 -1
- package/lib/components/PropertyDetails/PlusCircleIcon.js +10 -4
- package/lib/components/PropertyDetails/PropertyDetails.js +22 -5
- package/lib/components/PropertyDetails/SchemaTypeInfo.js +10 -2
- package/lib/components/PropertyDetails/SimpleEnums.js +13 -2
- package/lib/components/PropertyDetails/cycleColorsByLevel.js +18 -1
- package/lib/components/PropertyDetails/index.js +4 -1
- package/lib/components/PropertyDetails/styled.js +15 -7
- package/lib/components/PropertyDetails/types.js +2 -0
- package/lib/components/RedoclyOpenAPIDocs/Providers.js +114 -1
- package/lib/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocs.js +57 -1
- package/lib/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocsStandalone.js +86 -1
- package/lib/components/RedoclyOpenAPIDocs/index.js +5 -1
- package/lib/components/RedoclyOpenAPIDocs/styled.js +4 -2
- package/lib/components/RedoclyOpenAPIDocs/types.js +2 -0
- package/lib/components/RedoclyOpenAPIDocs/utils.js +33 -1
- package/lib/components/RenderHook/RenderHook.js +17 -1
- package/lib/components/RenderHook/index.js +2 -1
- package/lib/components/Replay/EmbeddedReplay.js +41 -3
- package/lib/components/Replay/Replay.js +99 -1
- package/lib/components/Replay/index.js +3 -1
- package/lib/components/Replay/utils.js +208 -1
- package/lib/components/Request/RequestDetails.js +33 -2
- package/lib/components/Request/types.js +2 -0
- package/lib/components/RequestParameters/Body.js +8 -1
- package/lib/components/RequestParameters/ParametersGroup.js +19 -4
- package/lib/components/RequestParameters/RequestParameters.js +40 -1
- package/lib/components/RequestParameters/index.js +4 -1
- package/lib/components/RequestSamples/CodeSample.js +55 -2
- package/lib/components/RequestSamples/Example.js +37 -1
- package/lib/components/RequestSamples/RequestSamples.js +89 -5
- package/lib/components/RequestSamples/index.js +3 -1
- package/lib/components/RequestSamples/useCodeSamples.js +92 -1
- package/lib/components/ResponseSamples/ResponseSamples.js +47 -1
- package/lib/components/ResponseSamples/Summary.js +9 -1
- package/lib/components/ResponseSamples/index.js +2 -1
- package/lib/components/Responses/OperationResponseList.js +42 -2
- package/lib/components/Responses/ResponseDetails.js +18 -1
- package/lib/components/Responses/ResponseHeaders.js +15 -1
- package/lib/components/Responses/index.js +6 -1
- package/lib/components/Responses/styled.js +14 -6
- package/lib/components/Responses/types.js +2 -0
- package/lib/components/RightPanel/RightPanel.js +21 -1
- package/lib/components/RightPanel/index.js +2 -1
- package/lib/components/Samples/ExampleSwitch.js +33 -1
- package/lib/components/Samples/index.js +3 -1
- package/lib/components/Samples/use-example-key.js +12 -1
- package/lib/components/Schema/ArraySchema.js +45 -1
- package/lib/components/Schema/ObjectSchema.js +29 -1
- package/lib/components/Schema/OneOfSchema.js +47 -3
- package/lib/components/Schema/RecursiveSchema.js +10 -1
- package/lib/components/Schema/Schema.js +63 -2
- package/lib/components/Schema/SubSchema.js +20 -1
- package/lib/components/Schema/helpers.js +16 -1
- package/lib/components/Schema/index.js +5 -1
- package/lib/components/Schema/types.js +2 -0
- package/lib/components/Schema/useOneOfLocationIdx.js +11 -1
- package/lib/components/SchemaDefinition/SchemaDefinition.js +65 -2
- package/lib/components/SchemaDefinition/index.js +2 -1
- package/lib/components/SectionContent/SectionContent.js +49 -6
- package/lib/components/SectionContent/index.js +2 -1
- package/lib/components/SectionItem/SectionItem.js +14 -1
- package/lib/components/SectionItem/index.js +2 -1
- package/lib/components/Security/Divider.js +9 -2
- package/lib/components/Security/OAuthFlow.js +11 -1
- package/lib/components/Security/OAuthScopes.js +59 -9
- package/lib/components/Security/Security.js +15 -1
- package/lib/components/Security/SecurityButton.js +31 -7
- package/lib/components/Security/SecurityFlow.js +28 -4
- package/lib/components/Security/SecurityModal.js +34 -5
- package/lib/components/Security/SecuritySchemeItem.js +15 -4
- package/lib/components/Security/helper.js +16 -1
- package/lib/components/Security/index.js +11 -1
- package/lib/components/Security/styled.js +6 -3
- package/lib/components/SelectOrLabel/SelectOrLabel.js +12 -2
- package/lib/components/SelectOrLabel/index.js +2 -1
- package/lib/components/ServerList/ServerList.js +36 -10
- package/lib/components/ServerList/index.js +2 -1
- package/lib/components/ServerList/types.js +2 -0
- package/lib/components/ServerListDropdown/ServerListDropdown.js +54 -1
- package/lib/components/ServerListDropdown/index.js +2 -1
- package/lib/components/ServerListDropdown/styled.js +15 -6
- package/lib/components/SideMenu/SideMenu.js +13 -2
- package/lib/components/SideMenu/hooks/useMenuItems.js +110 -1
- package/lib/components/SideMenu/index.js +2 -1
- package/lib/components/SideMenu/types.js +2 -0
- package/lib/components/StickySidebar/SidebarActions.js +14 -2
- package/lib/components/StickySidebar/StickyResponsiveSidebar.js +37 -7
- package/lib/components/StickySidebar/index.js +2 -1
- package/lib/components/Tabs/Tabs.js +16 -5
- package/lib/components/Tabs/index.js +3 -1
- package/lib/components/Tabs/useTabsState.js +22 -1
- package/lib/components/TagItem/OperationNavigationItems.js +18 -4
- package/lib/components/TagItem/OperationsNavigation.js +46 -2
- package/lib/components/TagItem/TagItem.js +41 -8
- package/lib/components/TagItem/index.js +2 -1
- package/lib/components/TagItem/styled.js +5 -2
- package/lib/components/TagItem/types.js +2 -0
- package/lib/components/ViewNested/ViewNested.js +42 -9
- package/lib/components/ViewNested/index.js +2 -1
- package/lib/components/common/Badges.js +21 -5
- package/lib/components/common/BodyContent/BodyContent.js +31 -4
- package/lib/components/common/BodyContent/index.js +2 -1
- package/lib/components/common/ClearButton/ClearButton.js +5 -1
- package/lib/components/common/ClearButton/index.js +3 -1
- package/lib/components/common/ClearButton/styled.js +5 -2
- package/lib/components/common/ClearButton/types.js +2 -0
- package/lib/components/common/CodeBlockPanel.js +7 -3
- package/lib/components/common/ConstraintsView.js +14 -2
- package/lib/components/common/Dropdown/Dropdown.js +22 -4
- package/lib/components/common/Dropdown/index.js +2 -1
- package/lib/components/common/ExpandableExample/ExpandableExample.js +24 -3
- package/lib/components/common/ExpandableExample/index.js +2 -1
- package/lib/components/common/Extensions.js +17 -2
- package/lib/components/common/Fields/fields-layout.js +76 -51
- package/lib/components/common/Fields/fields.js +39 -17
- package/lib/components/common/Fields/index.js +3 -1
- package/lib/components/common/LinkToField.js +33 -6
- package/lib/components/common/OperationItemTitle.d.ts +1 -0
- package/lib/components/common/OperationItemTitle.js +16 -5
- package/lib/components/common/SchemaSelection/SchemaSelection.js +51 -1
- package/lib/components/common/SchemaSelection/index.js +2 -1
- package/lib/components/common/Select/Select.js +21 -1
- package/lib/components/common/Select/index.js +3 -1
- package/lib/components/common/Select/styled.js +17 -9
- package/lib/components/common/Select/types.js +2 -0
- package/lib/components/common/Skeleton/LanguageListSkeleton.js +16 -6
- package/lib/components/common/Skeleton/Skeleton.js +15 -5
- package/lib/components/common/Skeleton/index.js +3 -1
- package/lib/components/common/headers.js +4 -2
- package/lib/components/common/index.js +14 -1
- package/lib/components/common/linkify.js +28 -4
- package/lib/components/common/mixins.js +4 -2
- package/lib/components/common/panels.js +58 -33
- package/lib/components/common/schema.js +16 -8
- package/lib/components/common/styled.js +15 -7
- package/lib/components/index.js +25 -1
- package/lib/components/pluggable/RedocExample.js +20 -1
- package/lib/components/pluggable/RedocSchema.js +22 -1
- package/lib/components/pluggable/index.js +3 -1
- package/lib/components/pluggable/styled.components.js +9 -4
- package/lib/constants.js +30 -1
- package/lib/empty.js +7 -1
- package/lib/events/codeSampleCopy.js +19 -1
- package/lib/events/creator.js +5 -1
- package/lib/events/index.js +8 -1
- package/lib/events/languageSwitch.js +18 -1
- package/lib/events/panelToggle.js +16 -1
- package/lib/events/serverSwitch.js +13 -1
- package/lib/events/tryItOpen.js +12 -1
- package/lib/events/tryItSent.js +12 -1
- package/lib/events/types.js +11 -1
- package/lib/hoc/types.js +2 -0
- package/lib/hoc/utils.js +4 -1
- package/lib/hoc/withRouter.js +17 -1
- package/lib/hoc/withStore.js +28 -1
- package/lib/hooks/index.js +9 -1
- package/lib/hooks/useActivateExample.js +35 -1
- package/lib/hooks/useActiveWithFallback.js +12 -1
- package/lib/hooks/useContentItems.js +10 -1
- package/lib/hooks/useLicense.js +17 -1
- package/lib/hooks/usePerformanceMetrics.js +26 -1
- package/lib/hooks/useRouter.js +17 -1
- package/lib/hooks/useTelemetry.js +5 -1
- package/lib/hooks/useTranslate.js +6 -1
- package/lib/hooks/useUppercase2LowercaseRedirect.js +12 -1
- package/lib/icons/CSharpIcon/CSharpIcon.js +7 -1
- package/lib/icons/CSharpIcon/index.js +2 -1
- package/lib/icons/CurlIcon/CurlIcon.js +8 -2
- package/lib/icons/CurlIcon/index.js +2 -1
- package/lib/icons/GOIcon/GOIcon.js +7 -1
- package/lib/icons/GOIcon/index.js +2 -1
- package/lib/icons/JavaIcon/JavaIcon.js +7 -1
- package/lib/icons/JavaIcon/index.js +2 -1
- package/lib/icons/JavaScriptIcon/JavaScriptIcon.js +7 -1
- package/lib/icons/JavaScriptIcon/index.js +2 -1
- package/lib/icons/NodeJSIcon/NodeJSIcon.js +7 -1
- package/lib/icons/NodeJSIcon/index.js +2 -1
- package/lib/icons/PHPIcon/PHPIcon.js +7 -1
- package/lib/icons/PHPIcon/index.js +2 -1
- package/lib/icons/PayloadIcon/PayloadIcon.js +7 -1
- package/lib/icons/PayloadIcon/index.js +2 -1
- package/lib/icons/PythonIcon/PythonIcon.js +7 -1
- package/lib/icons/PythonIcon/index.js +2 -1
- package/lib/icons/RIcon/RIcon.js +7 -1
- package/lib/icons/RIcon/index.js +2 -1
- package/lib/icons/RubyIcon/RubyIcon.js +7 -1
- package/lib/icons/RubyIcon/index.js +2 -1
- package/lib/index.js +49 -1
- package/lib/jotai/app.js +113 -1
- package/lib/jotai/operation.js +28 -1
- package/lib/jotai/replay.js +5 -1
- package/lib/jotai/store.js +8 -1
- package/lib/jotai/use-write-atom.js +9 -1
- package/lib/models/callback.js +28 -1
- package/lib/models/code-sample-options.js +2 -0
- package/lib/models/example.js +17 -1
- package/lib/models/field.js +109 -1
- package/lib/models/group.js +38 -1
- package/lib/models/index.js +14 -1
- package/lib/models/mediaContent.js +26 -1
- package/lib/models/mediaType.js +153 -1
- package/lib/models/operation.js +166 -1
- package/lib/models/request.js +25 -1
- package/lib/models/response.js +46 -1
- package/lib/models/schema.js +474 -2
- package/lib/models/security.js +84 -1
- package/lib/models/tab.js +2 -0
- package/lib/models/types.js +2 -0
- package/lib/services/OpenAPIParser.js +321 -1
- package/lib/services/check.js +104 -1
- package/lib/services/code-samples/constants.js +16 -1
- package/lib/services/code-samples/generator.js +540 -1
- package/lib/services/code-samples/httpsnippet/helpers/code-builder.d.ts +5 -1
- package/lib/services/code-samples/httpsnippet/helpers/code-builder.js +252 -3
- package/lib/services/code-samples/httpsnippet/helpers/code-helpers.d.ts +2 -2
- package/lib/services/code-samples/httpsnippet/helpers/code-helpers.js +90 -2
- package/lib/services/code-samples/httpsnippet/helpers/constants.js +28 -1
- package/lib/services/code-samples/httpsnippet/helpers/lodash-int.js +173 -1
- package/lib/services/code-samples/httpsnippet/helpers/mocks/code-helpers-mock.js +76 -37
- package/lib/services/code-samples/httpsnippet/helpers/reducer.js +16 -1
- package/lib/services/code-samples/httpsnippet/helpers/shell.js +20 -1
- package/lib/services/code-samples/httpsnippet/helpers/string-utility.js +19 -1
- package/lib/services/code-samples/httpsnippet/index.js +166 -1
- package/lib/services/code-samples/httpsnippet/targets/__mocks__/mock.js +2340 -146
- package/lib/services/code-samples/httpsnippet/targets/csharp/httpclient.js +227 -2
- package/lib/services/code-samples/httpsnippet/targets/csharp/index.js +11 -1
- package/lib/services/code-samples/httpsnippet/targets/csharpNewtonsoft/httpclient.js +185 -2
- package/lib/services/code-samples/httpsnippet/targets/csharpNewtonsoft/index.js +11 -1
- package/lib/services/code-samples/httpsnippet/targets/go/index.js +11 -1
- package/lib/services/code-samples/httpsnippet/targets/go/native.js +222 -3
- package/lib/services/code-samples/httpsnippet/targets/index.js +28 -1
- package/lib/services/code-samples/httpsnippet/targets/java/httpclient.js +184 -3
- package/lib/services/code-samples/httpsnippet/targets/java/index.js +11 -1
- package/lib/services/code-samples/httpsnippet/targets/java8/apachehttp.js +223 -2
- package/lib/services/code-samples/httpsnippet/targets/java8/index.js +11 -1
- package/lib/services/code-samples/httpsnippet/targets/javascript/fetch.js +147 -1
- package/lib/services/code-samples/httpsnippet/targets/javascript/index.js +11 -1
- package/lib/services/code-samples/httpsnippet/targets/node/fetch.js +199 -1
- package/lib/services/code-samples/httpsnippet/targets/node/index.js +11 -1
- package/lib/services/code-samples/httpsnippet/targets/php/curl.js +203 -5
- package/lib/services/code-samples/httpsnippet/targets/php/index.js +11 -1
- package/lib/services/code-samples/httpsnippet/targets/php/types.js +2 -0
- package/lib/services/code-samples/httpsnippet/targets/php/utils.js +106 -5
- package/lib/services/code-samples/httpsnippet/targets/python/index.js +11 -1
- package/lib/services/code-samples/httpsnippet/targets/python/requests.js +185 -6
- package/lib/services/code-samples/httpsnippet/targets/r/httr.js +111 -1
- package/lib/services/code-samples/httpsnippet/targets/r/index.js +11 -1
- package/lib/services/code-samples/httpsnippet/targets/r/utils.js +18 -6
- package/lib/services/code-samples/httpsnippet/targets/ruby/index.js +11 -1
- package/lib/services/code-samples/httpsnippet/targets/ruby/native.js +169 -1
- package/lib/services/code-samples/httpsnippet/targets/shell/curl.js +94 -6
- package/lib/services/code-samples/httpsnippet/targets/shell/index.js +11 -1
- package/lib/services/code-samples/index.js +3 -1
- package/lib/services/code-samples/types.js +2 -0
- package/lib/services/config-options/helpers.js +49 -1
- package/lib/services/config-options/index.js +3 -1
- package/lib/services/config-options/normalizeOptions.js +83 -1
- package/lib/services/config-options/types.js +2 -0
- package/lib/services/history/helpers.js +63 -1
- package/lib/services/history/index.js +2 -1
- package/lib/services/index.js +9 -1
- package/lib/services/menu/builder.js +47 -1
- package/lib/services/menu/index.js +2 -1
- package/lib/services/menu/markdown.js +93 -1
- package/lib/services/menu/operation.js +50 -1
- package/lib/services/menu/tags.js +166 -1
- package/lib/services/types.d.ts +0 -3
- package/lib/services/types.js +2 -0
- package/lib/services/utils.js +83 -1
- package/lib/standalone.js +68 -1
- package/lib/styled-components.js +6 -1
- package/lib/types/app.js +2 -0
- package/lib/types/index.js +4 -1
- package/lib/types/open-api.d.ts +1 -0
- package/lib/types/open-api.js +2 -0
- package/lib/types/security.js +2 -0
- package/lib/utils/JsonPointer.js +84 -1
- package/lib/utils/areArraysEqual.js +4 -1
- package/lib/utils/argValuesHelpers.js +35 -1
- package/lib/utils/compose.js +2 -1
- package/lib/utils/configure-helpers.js +223 -1
- package/lib/utils/convertSwagger2OpenAPI.js +14 -1
- package/lib/utils/cookies.js +73 -1
- package/lib/utils/debounce.js +22 -1
- package/lib/utils/debug.js +11 -1
- package/lib/utils/dom.js +65 -1
- package/lib/utils/environments.js +13 -1
- package/lib/utils/helpers.js +222 -12
- package/lib/utils/index.js +25 -1
- package/lib/utils/isMobile.js +13 -1
- package/lib/utils/loadAndBundleSpec.js +32 -1
- package/lib/utils/local-storage.js +12 -1
- package/lib/utils/object.js +31 -1
- package/lib/utils/openapi.js +592 -1
- package/lib/utils/parameters.js +13 -1
- package/lib/utils/path.js +22 -1
- package/lib/utils/queryString.js +60 -1
- package/lib/utils/replaceVariables.js +14 -1
- package/lib/utils/saveTextBeforeHeading.js +35 -1
- package/lib/utils/security-details.js +49 -1
- package/lib/utils/session-storage.js +12 -1
- package/lib/utils/simplifyAstStructure.js +22 -1
- package/lib/utils/sort.js +21 -1
- package/lib/utils/string.js +65 -1
- package/lib/utils/telemetry.js +7 -1
- package/lib/utils/test-utils.js +26 -1
- package/lib/utils/theme-helpers.js +24 -3
- package/lib/utils/url.js +38 -1
- package/package.json +5 -5
|
@@ -1,22 +1,32 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { memo } from 'react';
|
|
3
|
+
import { styled } from '../../../styled-components.js';
|
|
4
|
+
const Container = styled.div `
|
|
2
5
|
width: 100%;
|
|
3
6
|
display: flex;
|
|
4
7
|
justify-content: space-between;
|
|
5
8
|
gap: var(--spacing-xs);
|
|
6
9
|
padding: var(--spacing-xs) 0;
|
|
7
|
-
|
|
10
|
+
`;
|
|
11
|
+
const Item = styled.div `
|
|
8
12
|
display: flex;
|
|
9
13
|
flex-direction: column;
|
|
10
14
|
width: 100%;
|
|
11
15
|
justify-content: center;
|
|
12
16
|
align-items: center;
|
|
13
17
|
gap: var(--spacing-sm);
|
|
14
|
-
|
|
18
|
+
`;
|
|
19
|
+
const SkeletonBox = styled.div `
|
|
15
20
|
display: inline-block;
|
|
16
|
-
height: ${({type
|
|
21
|
+
height: ${({ type }) => type === 'icon' ? 'var(--control-height-sm)' : 'calc(var(--control-height-sm) * 0.5)'};
|
|
17
22
|
position: relative;
|
|
18
23
|
overflow: hidden;
|
|
19
24
|
background-color: var(--layer-color-hover);
|
|
20
25
|
border-radius: var(--border-radius);
|
|
21
|
-
width: ${({type
|
|
22
|
-
`;
|
|
26
|
+
width: ${({ type }) => (type === 'icon' ? 'var(--control-height-sm)' : '64px')};
|
|
27
|
+
`;
|
|
28
|
+
function LanguageListSkeletonComponent() {
|
|
29
|
+
return (_jsxs(Container, { children: [_jsxs(Item, { children: [_jsx(SkeletonBox, { type: "icon" }), _jsx(SkeletonBox, { type: "label" })] }), _jsxs(Item, { children: [_jsx(SkeletonBox, { type: "icon" }), _jsx(SkeletonBox, { type: "label" })] }), _jsxs(Item, { children: [_jsx(SkeletonBox, { type: "icon" }), _jsx(SkeletonBox, { type: "label" })] }), _jsxs(Item, { children: [_jsx(SkeletonBox, { type: "icon" }), _jsx(SkeletonBox, { type: "label" })] })] }));
|
|
30
|
+
}
|
|
31
|
+
export const LanguageListSkeleton = memo(LanguageListSkeletonComponent);
|
|
32
|
+
//# sourceMappingURL=LanguageListSkeleton.js.map
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { keyframes } from 'styled-components';
|
|
3
|
+
import { H2 } from '@redocly/theme/components/Typography/H2';
|
|
4
|
+
import { Section, SamplesMiddlePanel } from '../panels.js';
|
|
5
|
+
import { styled } from '../../../styled-components.js';
|
|
6
|
+
const shimmer = keyframes `
|
|
2
7
|
100% {
|
|
3
8
|
transform: translateX(100%);
|
|
4
9
|
}
|
|
5
|
-
|
|
10
|
+
`;
|
|
11
|
+
export const SkeletonBox = styled.div `
|
|
6
12
|
display: inline-block;
|
|
7
13
|
height: 1em;
|
|
8
14
|
position: relative;
|
|
@@ -10,7 +16,7 @@ import{jsx as r,jsxs as o}from"react/jsx-runtime";import{keyframes as e}from"sty
|
|
|
10
16
|
background-color: var(--bg-color-raised);
|
|
11
17
|
border-radius: var(--border-radius);
|
|
12
18
|
margin-top: var(--spacing-base);
|
|
13
|
-
width: ${({width
|
|
19
|
+
width: ${({ width }) => width || '100%'};
|
|
14
20
|
|
|
15
21
|
&::after {
|
|
16
22
|
position: absolute;
|
|
@@ -26,7 +32,11 @@ import{jsx as r,jsxs as o}from"react/jsx-runtime";import{keyframes as e}from"sty
|
|
|
26
32
|
rgba(255, 255, 255, 0.5) 60%,
|
|
27
33
|
rgba(255, 255, 255, 0)
|
|
28
34
|
);
|
|
29
|
-
animation: ${
|
|
35
|
+
animation: ${shimmer} 2s infinite;
|
|
30
36
|
content: '';
|
|
31
37
|
}
|
|
32
|
-
`;
|
|
38
|
+
`;
|
|
39
|
+
export function Skeleton() {
|
|
40
|
+
return (_jsx(Section, { children: _jsxs(SamplesMiddlePanel, { children: [_jsx(H2, { children: _jsx(SkeletonBox, { width: "40%" }) }), _jsx(SkeletonBox, { width: "80%" }), _jsx(SkeletonBox, { width: "90%" }), _jsx(SkeletonBox, { width: "83%" }), _jsx(SkeletonBox, { width: "80%" })] }) }));
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=Skeleton.js.map
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import{styled
|
|
1
|
+
import { styled } from '../../styled-components.js';
|
|
2
|
+
export const FieldsGroupHeader = styled.h5 `
|
|
2
3
|
color: var(--text-color-secondary);
|
|
3
4
|
font-weight: bold;
|
|
4
5
|
text-transform: uppercase;
|
|
5
6
|
font-size: 14px;
|
|
6
7
|
line-height: 20px;
|
|
7
|
-
`;
|
|
8
|
+
`;
|
|
9
|
+
//# sourceMappingURL=headers.js.map
|
|
@@ -1 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
export { Select } from './Select/index.js';
|
|
2
|
+
export { ShareLinkToField, generateDeepLink } from './LinkToField.js';
|
|
3
|
+
export { deprecatedCss } from './mixins.js';
|
|
4
|
+
export { Container, HttpVerb, MimeLabel } from './styled.js';
|
|
5
|
+
export { CodeBlockPanel } from './CodeBlockPanel.js';
|
|
6
|
+
export { CustomBadges, StyledBadge, NavigationBadge } from './Badges.js';
|
|
7
|
+
export { ExpandableExample } from './ExpandableExample/index.js';
|
|
8
|
+
export * from './Fields/index.js';
|
|
9
|
+
export * from './panels.js';
|
|
10
|
+
export { FieldsGroupHeader } from './headers.js';
|
|
11
|
+
export { ShareLink, Link } from './linkify.js';
|
|
12
|
+
export * from './schema.js';
|
|
13
|
+
export { Skeleton } from './Skeleton/index.js';
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +1,24 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useAtomValue } from 'jotai';
|
|
3
|
+
import { Link as LinkRouter } from 'react-router-dom';
|
|
4
|
+
import { LinkIcon } from '@redocly/theme/icons/LinkIcon/LinkIcon';
|
|
5
|
+
import { globalOptionsAtom } from '../../jotai/store.js';
|
|
6
|
+
import { tryDecodeURIComponent } from '../../utils/index.js';
|
|
7
|
+
import { styled } from '../../styled-components.js';
|
|
8
|
+
export function Link(props) {
|
|
9
|
+
const { routingBasePath, unstable_hooks, onDeepLinkClick } = useAtomValue(globalOptionsAtom);
|
|
10
|
+
const link = props.security
|
|
11
|
+
? unstable_hooks?.replaceSecurityLink?.({ securityRequirementId: props.to })
|
|
12
|
+
: props.to;
|
|
13
|
+
const linkHandler = onDeepLinkClick && {
|
|
14
|
+
onClick: (e) => {
|
|
15
|
+
e.preventDefault();
|
|
16
|
+
onDeepLinkClick((routingBasePath || '') + link);
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
return link ? (_jsx(LinkRouter, { "aria-label": props['aria-label'] || `link to ${link}`, id: tryDecodeURIComponent(props.id || ''), className: props.className || '', to: link?.startsWith('#') ? link : (routingBasePath || '') + link, ...linkHandler, children: props.children })) : props.children ? (_jsxs("span", { "aria-label": props['aria-label'] || `link to ${link}`, className: props.className, children: [' ', props.children, ' '] })) : null;
|
|
20
|
+
}
|
|
21
|
+
export const StyledShareLink = styled(Link) `
|
|
2
22
|
position: absolute;
|
|
3
23
|
top: 50%;
|
|
4
24
|
left: 0;
|
|
@@ -6,15 +26,19 @@ import{jsx as n,jsxs as c}from"react/jsx-runtime";import{useAtomValue as m}from"
|
|
|
6
26
|
padding-right: var(--heading-anchor-offset-right);
|
|
7
27
|
z-index: 1;
|
|
8
28
|
|
|
9
|
-
${
|
|
29
|
+
${LinkIcon} {
|
|
10
30
|
opacity: 0;
|
|
11
31
|
transition:
|
|
12
32
|
visibility 0.3s linear,
|
|
13
33
|
opacity 0.3s linear;
|
|
14
34
|
}
|
|
15
35
|
|
|
16
|
-
:hover ${
|
|
36
|
+
:hover ${LinkIcon}, :focus ${LinkIcon} {
|
|
17
37
|
visibility: visible;
|
|
18
38
|
opacity: 1;
|
|
19
39
|
}
|
|
20
|
-
`;
|
|
40
|
+
`;
|
|
41
|
+
export function ShareLink(props) {
|
|
42
|
+
return (_jsx(StyledShareLink, { ...props, children: _jsx(LinkIcon, { size: "13px", color: "--heading-anchor-color" }) }));
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=linkify.js.map
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import{css
|
|
1
|
+
import { css } from 'styled-components';
|
|
2
|
+
export const deprecatedCss = css `
|
|
2
3
|
text-decoration: line-through;
|
|
3
4
|
color: var(--schemas-property-deprecated-text-color);
|
|
4
|
-
`;
|
|
5
|
+
`;
|
|
6
|
+
//# sourceMappingURL=mixins.js.map
|
|
@@ -1,43 +1,63 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { css } from 'styled-components';
|
|
2
|
+
import { LayoutVariant } from '@redocly/config';
|
|
3
|
+
import { H2 } from '@redocly/theme/components/Typography/H2';
|
|
4
|
+
import { Markdown } from '@redocly/theme/components/Markdown/Markdown';
|
|
5
|
+
import { breakpoints } from '@redocly/theme/core/openapi';
|
|
6
|
+
import { SECTION_ATTR } from '../../constants.js';
|
|
7
|
+
import { styled } from '../../styled-components.js';
|
|
8
|
+
export const SamplesMiddlePanel = styled.div `
|
|
9
|
+
${({ compact, isStacked, fullWidth }) => {
|
|
10
|
+
const vPadding = compact ? 0 : 'var(--spacing-vertical)';
|
|
11
|
+
return css `
|
|
3
12
|
display: flex;
|
|
4
13
|
flex-direction: column;
|
|
5
14
|
width: 100%;
|
|
6
|
-
padding: ${
|
|
15
|
+
padding: ${vPadding} var(--panel-gap-horizontal);
|
|
7
16
|
|
|
8
17
|
&:empty {
|
|
9
18
|
display: none;
|
|
10
19
|
}
|
|
11
20
|
|
|
12
|
-
@media screen and (min-width: ${
|
|
13
|
-
width: ${
|
|
14
|
-
padding-left: ${
|
|
15
|
-
|
|
21
|
+
@media screen and (min-width: ${breakpoints.large}) {
|
|
22
|
+
width: ${fullWidth || isStacked ? '100%' : 'calc(100% - var(--panel-samples-width))'};
|
|
23
|
+
padding-left: ${isStacked
|
|
24
|
+
? 'var(--panel-gap-horizontal)'
|
|
25
|
+
: 'calc(var(--panel-gap-horizontal) * 2)'};
|
|
26
|
+
padding-right: ${isStacked ? 'var(--panel-gap-vertical)' : 'var(--panel-gap-horizontal)'};
|
|
16
27
|
padding-top: 0;
|
|
17
|
-
padding-bottom: ${
|
|
28
|
+
padding-bottom: ${isStacked ? 'var(--spacing-vertical)' : 0};
|
|
18
29
|
}
|
|
19
30
|
|
|
20
31
|
@media print {
|
|
21
32
|
width: 100%;
|
|
22
|
-
padding-top: ${
|
|
23
|
-
padding-bottom: ${
|
|
33
|
+
padding-top: ${vPadding};
|
|
34
|
+
padding-bottom: ${vPadding};
|
|
24
35
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
36
|
+
`;
|
|
37
|
+
}};
|
|
38
|
+
|
|
39
|
+
${({ compact }) => compact &&
|
|
40
|
+
css `
|
|
41
|
+
& & {
|
|
42
|
+
padding-left: 0;
|
|
43
|
+
padding-right: 0;
|
|
44
|
+
}
|
|
45
|
+
`}
|
|
30
46
|
|
|
31
|
-
&:last-child > ${
|
|
32
|
-
${
|
|
47
|
+
&:last-child > ${Markdown} :last-child,
|
|
48
|
+
${Markdown} article :last-child {
|
|
33
49
|
margin-bottom: 0;
|
|
34
50
|
}
|
|
35
|
-
|
|
36
|
-
|
|
51
|
+
`;
|
|
52
|
+
export const Section = styled.div.attrs((props) => ({
|
|
53
|
+
[SECTION_ATTR]: props.sectionId,
|
|
54
|
+
id: props.id,
|
|
55
|
+
})) `
|
|
37
56
|
padding: 0;
|
|
38
57
|
width: 100%;
|
|
39
58
|
|
|
40
|
-
${({expanded
|
|
59
|
+
${({ expanded }) => expanded &&
|
|
60
|
+
css `
|
|
41
61
|
background-color: var(--layer-color);
|
|
42
62
|
border-bottom: 1px solid var(--border-color-secondary);
|
|
43
63
|
--code-block-bg-color: var(--bg-color);
|
|
@@ -48,10 +68,11 @@ import{css as o}from"styled-components";import{LayoutVariant as p}from"@redocly/
|
|
|
48
68
|
min-height: initial;
|
|
49
69
|
}
|
|
50
70
|
|
|
51
|
-
@media screen and (min-width: ${
|
|
71
|
+
@media screen and (min-width: ${breakpoints.medium}) {
|
|
52
72
|
padding-top: var(--spacing-xs);
|
|
53
73
|
|
|
54
|
-
${({expanded
|
|
74
|
+
${({ expanded }) => !expanded &&
|
|
75
|
+
css `
|
|
55
76
|
padding-bottom: var(--spacing-xs);
|
|
56
77
|
`}
|
|
57
78
|
}
|
|
@@ -60,7 +81,8 @@ import{css as o}from"styled-components";import{LayoutVariant as p}from"@redocly/
|
|
|
60
81
|
padding: 0;
|
|
61
82
|
}
|
|
62
83
|
|
|
63
|
-
${({underlined
|
|
84
|
+
${({ underlined }) => underlined &&
|
|
85
|
+
css `
|
|
64
86
|
position: relative;
|
|
65
87
|
|
|
66
88
|
&:not(:last-of-type):after {
|
|
@@ -72,10 +94,11 @@ import{css as o}from"styled-components";import{LayoutVariant as p}from"@redocly/
|
|
|
72
94
|
border-bottom: 1px solid var(--border-color-primary);
|
|
73
95
|
}
|
|
74
96
|
`}
|
|
75
|
-
${
|
|
97
|
+
${H2} {
|
|
76
98
|
position: relative;
|
|
77
99
|
}
|
|
78
|
-
|
|
100
|
+
`;
|
|
101
|
+
export const SamplesPanel = styled.div `
|
|
79
102
|
color: var(--panel-samples-text-color);
|
|
80
103
|
width: 100%;
|
|
81
104
|
height: fit-content;
|
|
@@ -92,12 +115,12 @@ import{css as o}from"styled-components";import{LayoutVariant as p}from"@redocly/
|
|
|
92
115
|
display: none;
|
|
93
116
|
}
|
|
94
117
|
|
|
95
|
-
@media screen and (min-width: ${
|
|
96
|
-
width: ${({isStacked
|
|
118
|
+
@media screen and (min-width: ${breakpoints.large}) {
|
|
119
|
+
width: ${({ isStacked }) => (isStacked ? '100%' : 'var(--panel-samples-width)')};
|
|
97
120
|
padding-top: 0;
|
|
98
121
|
padding-bottom: 0;
|
|
99
|
-
padding-left: ${({isStacked
|
|
100
|
-
padding-right: ${({isStacked
|
|
122
|
+
padding-left: ${({ isStacked }) => isStacked ? 'var(--panel-gap-vertical)' : 'var(--panel-gap-horizontal)'};
|
|
123
|
+
padding-right: ${({ isStacked }) => isStacked ? 'var(--panel-gap-horizontal)' : 'calc(var(--panel-gap-horizontal) * 2)'};
|
|
101
124
|
}
|
|
102
125
|
|
|
103
126
|
@media print {
|
|
@@ -105,18 +128,20 @@ import{css as o}from"styled-components";import{LayoutVariant as p}from"@redocly/
|
|
|
105
128
|
padding-top: var(--spacing-vertical);
|
|
106
129
|
padding-bottom: var(--spacing-vertical);
|
|
107
130
|
}
|
|
108
|
-
|
|
131
|
+
`;
|
|
132
|
+
export const Row = styled.div `
|
|
109
133
|
display: flex;
|
|
110
134
|
flex-direction: column;
|
|
111
135
|
justify-content: space-between;
|
|
112
136
|
width: 100%;
|
|
113
137
|
padding: 0;
|
|
114
138
|
|
|
115
|
-
@media screen and (min-width: ${
|
|
116
|
-
flex-direction: ${({layout
|
|
139
|
+
@media screen and (min-width: ${breakpoints.large}) {
|
|
140
|
+
flex-direction: ${({ layout }) => (layout !== LayoutVariant.STACKED ? 'row' : 'column')};
|
|
117
141
|
}
|
|
118
142
|
|
|
119
143
|
@media print {
|
|
120
144
|
flex-direction: column;
|
|
121
145
|
}
|
|
122
|
-
`;
|
|
146
|
+
`;
|
|
147
|
+
//# sourceMappingURL=panels.js.map
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import{css
|
|
1
|
+
import { css } from 'styled-components';
|
|
2
|
+
import { deprecatedCss } from './mixins.js';
|
|
3
|
+
import { styled } from '../../styled-components.js';
|
|
4
|
+
export const OneOfButton = styled.button `
|
|
2
5
|
border: 1px solid var(--schema-buttons-border-color);
|
|
3
6
|
height: 24px;
|
|
4
7
|
border-radius: var(--border-radius);
|
|
@@ -24,9 +27,10 @@ import{css as e}from"styled-components";import{deprecatedCss as t}from"./mixins.
|
|
|
24
27
|
background-color: var(--schema-buttons-bg-color-active);
|
|
25
28
|
}
|
|
26
29
|
|
|
27
|
-
${({deprecated
|
|
30
|
+
${({ deprecated }) => deprecated && deprecatedCss};
|
|
28
31
|
|
|
29
|
-
${({selected
|
|
32
|
+
${({ selected }) => selected &&
|
|
33
|
+
css `
|
|
30
34
|
border-color: var(--schema-buttons-selected-border-color);
|
|
31
35
|
background-color: var(--schema-buttons-selected-bg-color);
|
|
32
36
|
color: var(--schema-buttons-selected-text-color);
|
|
@@ -38,19 +42,22 @@ import{css as e}from"styled-components";import{deprecatedCss as t}from"./mixins.
|
|
|
38
42
|
background-color: var(--schema-buttons-active-hover-background-color);
|
|
39
43
|
}
|
|
40
44
|
`}
|
|
41
|
-
|
|
45
|
+
`;
|
|
46
|
+
export const OneOfList = styled.div `
|
|
42
47
|
display: inline;
|
|
43
48
|
|
|
44
49
|
flex-wrap: wrap;
|
|
45
50
|
margin: 4px -3px;
|
|
46
51
|
margin-left: 10px;
|
|
47
52
|
|
|
48
|
-
${
|
|
53
|
+
${OneOfButton} {
|
|
49
54
|
margin: 2px;
|
|
50
55
|
}
|
|
51
|
-
|
|
56
|
+
`;
|
|
57
|
+
export const Wrapper = styled.div `
|
|
52
58
|
margin-bottom: 1em;
|
|
53
|
-
|
|
59
|
+
`;
|
|
60
|
+
export const SelectionTitle = styled.div `
|
|
54
61
|
font-size: var(--font-size-sm);
|
|
55
62
|
line-height: var(--line-height-sm);
|
|
56
63
|
color: var(--tag-basic-content-color);
|
|
@@ -70,4 +77,5 @@ import{css as e}from"styled-components";import{deprecatedCss as t}from"./mixins.
|
|
|
70
77
|
bottom: calc(-1 * var(--spacing-xs));
|
|
71
78
|
left: var(--spacing-xs);
|
|
72
79
|
}
|
|
73
|
-
`;
|
|
80
|
+
`;
|
|
81
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import{Tag
|
|
1
|
+
import { Tag } from '@redocly/theme/components/Tag/Tag';
|
|
2
|
+
import { styled } from '../../styled-components.js';
|
|
3
|
+
export const Container = styled.div `
|
|
2
4
|
display: flex;
|
|
3
5
|
flex-direction: column;
|
|
4
6
|
margin: var(--spacing-unit) var(--spacing-md) var(--spacing-sm);
|
|
5
|
-
|
|
7
|
+
`;
|
|
8
|
+
export const HttpVerb = styled(Tag) `
|
|
6
9
|
text-transform: uppercase;
|
|
7
10
|
background-color: unset;
|
|
8
11
|
border: none;
|
|
@@ -13,7 +16,8 @@ import{Tag as o}from"@redocly/theme/components/Tag/Tag";import{styled as r}from"
|
|
|
13
16
|
font-size: var(--font-size-sm);
|
|
14
17
|
line-height: var(--line-height-sm);
|
|
15
18
|
align-self: flex-end;
|
|
16
|
-
|
|
19
|
+
`;
|
|
20
|
+
export const MimeLabel = styled.div `
|
|
17
21
|
background-color: var(--panel-samples-dropdown-bg-color);
|
|
18
22
|
color: var(--panel-samples-text-color);
|
|
19
23
|
font-family: inherit;
|
|
@@ -23,7 +27,8 @@ import{Tag as o}from"@redocly/theme/components/Tag/Tag";import{styled as r}from"
|
|
|
23
27
|
font-size: var(--docs-dropdown-font-size);
|
|
24
28
|
border: var(--panel-samples-dropdown-border);
|
|
25
29
|
border-radius: var(--border-radius-md);
|
|
26
|
-
|
|
30
|
+
`;
|
|
31
|
+
export const ArrayLabel = styled.span `
|
|
27
32
|
display: flex;
|
|
28
33
|
align-items: center;
|
|
29
34
|
gap: var(--spacing-xs);
|
|
@@ -34,7 +39,8 @@ import{Tag as o}from"@redocly/theme/components/Tag/Tag";import{styled as r}from"
|
|
|
34
39
|
flex: auto;
|
|
35
40
|
border-top: 1px solid var(--border-color-primary);
|
|
36
41
|
}
|
|
37
|
-
|
|
42
|
+
`;
|
|
43
|
+
export const LabelValue = styled.span `
|
|
38
44
|
padding: 0 var(--spacing-xs);
|
|
39
45
|
border-radius: var(--border-radius);
|
|
40
46
|
border: 1px solid var(--border-color-secondary);
|
|
@@ -42,7 +48,8 @@ import{Tag as o}from"@redocly/theme/components/Tag/Tag";import{styled as r}from"
|
|
|
42
48
|
font-size: var(--font-size-sm);
|
|
43
49
|
line-height: var(--line-height-sm);
|
|
44
50
|
color: var(--tag-basic-content-color);
|
|
45
|
-
|
|
51
|
+
`;
|
|
52
|
+
export const ArrayClosingLabel = styled(ArrayLabel) `
|
|
46
53
|
margin-top: 0;
|
|
47
54
|
margin-left: auto;
|
|
48
55
|
|
|
@@ -55,4 +62,5 @@ import{Tag as o}from"@redocly/theme/components/Tag/Tag";import{styled as r}from"
|
|
|
55
62
|
flex: auto;
|
|
56
63
|
border-top: 1px solid var(--border-color-primary);
|
|
57
64
|
}
|
|
58
|
-
`;
|
|
65
|
+
`;
|
|
66
|
+
//# sourceMappingURL=styled.js.map
|
package/lib/components/index.js
CHANGED
|
@@ -1 +1,25 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './RedoclyOpenAPIDocs/index.js';
|
|
2
|
+
export * from './pluggable/index.js';
|
|
3
|
+
// Common
|
|
4
|
+
export * from './common/index.js';
|
|
5
|
+
// Redoc-lib
|
|
6
|
+
export * from './ApiInfo/index.js';
|
|
7
|
+
export { SectionItem } from './SectionItem/index.js';
|
|
8
|
+
export { ContentItem } from './ContentItem/index.js';
|
|
9
|
+
export { ContentItems } from './ContentItems/index.js';
|
|
10
|
+
export { Discriminator } from './Discriminator/index.js';
|
|
11
|
+
export * from './Schema/index.js';
|
|
12
|
+
export { OperationItem } from './OperationItem/index.js';
|
|
13
|
+
export * from './Markdown/index.js';
|
|
14
|
+
export * from './Responses/index.js';
|
|
15
|
+
export * from './ResponseSamples/ResponseSamples.js';
|
|
16
|
+
export { PayloadSamples, ExampleValue, Example, SelectWrapper } from './PayloadSamples/index.js';
|
|
17
|
+
export * from './MediaTypeSwitch/index.js';
|
|
18
|
+
export * from './RequestParameters/index.js';
|
|
19
|
+
export * from './SelectOrLabel/index.js';
|
|
20
|
+
export * from './ErrorBoundary/index.js';
|
|
21
|
+
export * from './SideMenu/index.js';
|
|
22
|
+
export * from './StickySidebar/StickyResponsiveSidebar.js';
|
|
23
|
+
export * from './SchemaDefinition/SchemaDefinition.js';
|
|
24
|
+
export * from './RequestSamples/RequestSamples.js';
|
|
25
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1,20 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useAtomValue } from 'jotai';
|
|
3
|
+
import { getExamples } from '../../models/index.js';
|
|
4
|
+
import { Row } from '../common/index.js';
|
|
5
|
+
import { ExamplesWrap } from './styled.components.js';
|
|
6
|
+
import { Example } from '../PayloadSamples/index.js';
|
|
7
|
+
import { globalParserAtom } from '../../jotai/store.js';
|
|
8
|
+
import { layoutAtom } from '../../jotai/app.js';
|
|
9
|
+
export const RedocExample = ({ pointer, mimeType, encoding }) => {
|
|
10
|
+
const parser = useAtomValue(globalParserAtom);
|
|
11
|
+
const layout = useAtomValue(layoutAtom);
|
|
12
|
+
const example = getExamples({
|
|
13
|
+
parser,
|
|
14
|
+
infoOrRef: { $ref: pointer },
|
|
15
|
+
mime: mimeType,
|
|
16
|
+
encoding,
|
|
17
|
+
});
|
|
18
|
+
return (_jsx(Row, { layout: layout, children: _jsx(ExamplesWrap, { children: _jsx(Example, { example: example, mimeType: mimeType }) }) }));
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=RedocExample.js.map
|
|
@@ -1 +1,22 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useAtomValue } from 'jotai';
|
|
3
|
+
import { getSchema } from '../../models/index.js';
|
|
4
|
+
import { Row } from '../common/index.js';
|
|
5
|
+
import { FullWidthPanel } from './styled.components.js';
|
|
6
|
+
import { Schema } from '../Schema/index.js';
|
|
7
|
+
import { globalStoreAtom } from '../../jotai/store.js';
|
|
8
|
+
export const RedocSchema = ({ pointer, schema, disableDeepLinks, slug, onOneOfChange, }) => {
|
|
9
|
+
const { options, parser } = useAtomValue(globalStoreAtom);
|
|
10
|
+
const schemaOrRef = schema || { $ref: pointer };
|
|
11
|
+
const schemaModel = getSchema({
|
|
12
|
+
parser,
|
|
13
|
+
schemaOrRef,
|
|
14
|
+
pointer: pointer || '',
|
|
15
|
+
options,
|
|
16
|
+
deps: {
|
|
17
|
+
operation: { pointer: 'RedocSchema' },
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
return (_jsx(Row, { children: _jsx(FullWidthPanel, { children: _jsx(Schema, { schema: schemaModel, level: 1, disableDeepLinks: disableDeepLinks, slug: slug, onOneOfChange: onOneOfChange }) }) }));
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=RedocSchema.js.map
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
export { RedocSchema } from './RedocSchema.js';
|
|
2
|
+
export { RedocExample } from './RedocExample.js';
|
|
3
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,12 +1,17 @@
|
|
|
1
|
-
import{SamplesMiddlePanel
|
|
1
|
+
import { SamplesMiddlePanel } from '../common/panels.js';
|
|
2
|
+
import { styled } from '../../styled-components.js';
|
|
3
|
+
export const SamplesWrap = styled.div `
|
|
2
4
|
padding: calc(var(--spacing-unit) * 4);
|
|
3
5
|
border-radius: var(--panel-border-radius);
|
|
4
6
|
border: var(--panel-samples-border);
|
|
5
7
|
background-color: var(--panel-samples-bg-color);
|
|
6
|
-
|
|
8
|
+
`;
|
|
9
|
+
export const ExamplesWrap = styled(SamplesWrap) `
|
|
7
10
|
width: 100%;
|
|
8
|
-
|
|
11
|
+
`;
|
|
12
|
+
export const FullWidthPanel = styled(SamplesMiddlePanel) `
|
|
9
13
|
padding-left: var(--spacing-horizontal);
|
|
10
14
|
padding-right: var(--spacing-horizontal);
|
|
11
15
|
width: 100%;
|
|
12
|
-
`;
|
|
16
|
+
`;
|
|
17
|
+
//# sourceMappingURL=styled.components.js.map
|
package/lib/constants.js
CHANGED
|
@@ -1 +1,30 @@
|
|
|
1
|
-
|
|
1
|
+
export var WindowReferenceOptions;
|
|
2
|
+
(function (WindowReferenceOptions) {
|
|
3
|
+
WindowReferenceOptions["ON_DEEP_LINK_CLICK"] = "onDeepLinkClick";
|
|
4
|
+
WindowReferenceOptions["REQUEST_INTERCEPTOR"] = "requestInterceptor";
|
|
5
|
+
WindowReferenceOptions["HOOKS"] = "hooks";
|
|
6
|
+
})(WindowReferenceOptions || (WindowReferenceOptions = {}));
|
|
7
|
+
export var MediaTypes;
|
|
8
|
+
(function (MediaTypes) {
|
|
9
|
+
MediaTypes["OCTET_STREAM"] = "application/octet-stream";
|
|
10
|
+
MediaTypes["MULTIPART"] = "multipart/form-data";
|
|
11
|
+
MediaTypes["URL_ENCODED"] = "application/x-www-form-urlencoded";
|
|
12
|
+
MediaTypes["JSON"] = "application/json";
|
|
13
|
+
MediaTypes["XML"] = "application/xml";
|
|
14
|
+
})(MediaTypes || (MediaTypes = {}));
|
|
15
|
+
export const SECTION_ATTR = 'data-section-id';
|
|
16
|
+
export const FIELD_ATTR = 'data-field-id';
|
|
17
|
+
export const GROUP_DEPTH = 0;
|
|
18
|
+
export const LEGACY_REGEXP = '^ {0,3}<!-- ReDoc-Inject:\\s+?<({component}).*?/?>\\s+?-->\\s*$';
|
|
19
|
+
// prettier-ignore
|
|
20
|
+
export const MDX_COMPONENT_REGEXP = '(?:^ {0,3}<({component})([\\s\\S]*?)>([\\s\\S]*?)</\\2>' // with children
|
|
21
|
+
+ '|^ {0,3}<({component})([\\s\\S]*?)(?:/>|\\n{2,}))'; // self-closing
|
|
22
|
+
export const COMPONENT_REGEXP = '(?:' + LEGACY_REGEXP + '|' + MDX_COMPONENT_REGEXP + ')';
|
|
23
|
+
export const DEFAULT_TAG_SLUG = 'other';
|
|
24
|
+
export const DEFAULT_WEBHOOKS_TAG_NAME = 'webhooks';
|
|
25
|
+
export const LOADING_STATE = {
|
|
26
|
+
NOT_LOADED: 'NOT_LOADED',
|
|
27
|
+
LOADING: 'LOADING',
|
|
28
|
+
LOADED: 'LOADED',
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=constants.js.map
|
package/lib/empty.js
CHANGED
|
@@ -1 +1,19 @@
|
|
|
1
|
-
import{createTrackingEvent
|
|
1
|
+
import { createTrackingEvent } from './creator.js';
|
|
2
|
+
import { AnalyticsEventType } from './types.js';
|
|
3
|
+
const codeSampleCopyEvent = createTrackingEvent(AnalyticsEventType.CodeSampleCopied);
|
|
4
|
+
export const createCodeSampleCopyEvent = ({ operation, type, lang = '', label = '', activeMimeName, activeExampleName, }) => {
|
|
5
|
+
return codeSampleCopyEvent({
|
|
6
|
+
resource: 'Redocly_CodeSample',
|
|
7
|
+
action: 'CodeSampleCopied',
|
|
8
|
+
operationId: operation.id,
|
|
9
|
+
operationPath: operation.path,
|
|
10
|
+
operationHttpVerb: operation.httpVerb,
|
|
11
|
+
operationSummary: operation.name,
|
|
12
|
+
exampleId: activeExampleName,
|
|
13
|
+
exampleMimeType: activeMimeName,
|
|
14
|
+
label,
|
|
15
|
+
lang,
|
|
16
|
+
type,
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=codeSampleCopy.js.map
|
package/lib/events/creator.js
CHANGED