@redocly/openapi-docs 3.4.0-rc.5 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/redocly-openapi-docs.min.js +1565 -1367
- package/lib/components/ApiInfo/ApiInfo.js +1 -1
- package/lib/components/ApiInfo/Metadata.d.ts +3 -1
- package/lib/components/ApiInfo/Metadata.js +1 -1
- package/lib/components/CallbackSamples/CallbackSamples.d.ts +2 -1
- package/lib/components/CallbackSamples/CallbackSamples.js +1 -1
- package/lib/components/Callbacks/CallbackDetails.d.ts +2 -1
- package/lib/components/Callbacks/CallbackDetails.js +1 -1
- package/lib/components/Callbacks/CallbackOperation.js +1 -1
- package/lib/components/Callbacks/CallbackSummary.d.ts +3 -2
- package/lib/components/Callbacks/CallbackSummary.js +1 -1
- package/lib/components/Callbacks/CallbacksList.d.ts +0 -1
- package/lib/components/Callbacks/styled.d.ts +1 -1
- package/lib/components/Content/Content.d.ts +0 -1
- package/lib/components/Content/useAutoScroll.js +1 -1
- package/lib/components/ContentItem/ContentItem.d.ts +0 -1
- package/lib/components/ContentItem/useIsExpanded.js +1 -1
- package/lib/components/ContentItems/ContentItems.d.ts +0 -1
- package/lib/components/ContentItems/helpers.js +1 -1
- package/lib/components/Discriminator/Discriminator.d.ts +2 -1
- package/lib/components/Discriminator/Discriminator.js +1 -1
- package/lib/components/ExpandAllButton/ExpandAllButton.js +1 -1
- package/lib/components/ExpandAllButton/getAllNestedSchema.d.ts +4 -4
- package/lib/components/ExpandAllButton/useUpdateExpandedFields.js +1 -1
- package/lib/components/ExternalDocumentation/ExternalDocumentation.d.ts +0 -1
- package/lib/components/Language/LanguageList.d.ts +0 -1
- package/lib/components/Language/styled.d.ts +12 -13
- package/lib/components/MediaTypeSwitch/MediaTypesSwitch.js +1 -1
- package/lib/components/OperationItem/Description.js +1 -1
- package/lib/components/OperationItem/OperationItem.d.ts +0 -1
- package/lib/components/OperationItem/OperationItem.js +2 -2
- package/lib/components/Overview/Overview.d.ts +8 -3
- package/lib/components/Overview/Overview.js +1 -1
- package/lib/components/PageFooter/PageFooter.d.ts +0 -1
- package/lib/components/PageFooter/PageFooter.js +1 -1
- package/lib/components/PanelItem/styled.d.ts +5 -6
- package/lib/components/PayloadSamples/Example.js +1 -1
- package/lib/components/PayloadSamples/ExampleValue.d.ts +0 -1
- package/lib/components/PayloadSamples/ExampleValue.js +1 -1
- package/lib/components/PayloadSamples/ExternalExample.js +1 -1
- package/lib/components/PayloadSamples/MediaTypeSamples.d.ts +0 -1
- package/lib/components/PayloadSamples/MediaTypeSamples.js +1 -1
- package/lib/components/PayloadSamples/PayloadSamples.d.ts +0 -1
- package/lib/components/PayloadSamples/PayloadSamples.js +1 -1
- package/lib/components/PayloadSamples/useExternalExample.js +1 -1
- package/lib/components/PropertyDetails/DescriptionEnums.d.ts +1 -1
- package/lib/components/PropertyDetails/DescriptionEnums.js +2 -2
- package/lib/components/PropertyDetails/EnumValues.d.ts +0 -1
- package/lib/components/PropertyDetails/EnumValues.js +1 -1
- package/lib/components/PropertyDetails/Examples.js +1 -1
- package/lib/components/PropertyDetails/Extensions.d.ts +0 -1
- package/lib/components/PropertyDetails/FieldDetail.d.ts +1 -1
- package/lib/components/PropertyDetails/FieldDetail.js +1 -1
- package/lib/components/PropertyDetails/FieldDetails.d.ts +0 -1
- package/lib/components/PropertyDetails/FieldDetails.js +4 -3
- package/lib/components/PropertyDetails/Pattern.js +1 -1
- package/lib/components/PropertyDetails/PlusCircleIcon.js +1 -1
- package/lib/components/PropertyDetails/PropertyDetails.d.ts +0 -1
- package/lib/components/PropertyDetails/SchemaTypeInfo.js +1 -1
- package/lib/components/PropertyDetails/SimpleEnums.d.ts +1 -1
- package/lib/components/PropertyDetails/SimpleEnums.js +1 -1
- package/lib/components/PropertyDetails/styled.d.ts +1 -10
- package/lib/components/PropertyDetails/types.d.ts +3 -0
- package/lib/components/RedoclyOpenAPIDocs/Providers.js +1 -1
- package/lib/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocs.js +1 -1
- package/lib/components/RedoclyOpenAPIDocs/styled.d.ts +0 -4
- package/lib/components/RedoclyOpenAPIDocs/styled.js +1 -30
- package/lib/components/RedoclyOpenAPIDocs/types.d.ts +0 -3
- package/lib/components/RedoclyOpenAPIDocs/utils.js +1 -1
- package/lib/components/RenderHook/RenderHook.js +1 -1
- package/lib/components/Replay/EmbeddedReplay.d.ts +0 -1
- package/lib/components/Replay/EmbeddedReplay.js +1 -1
- package/lib/components/Replay/Replay.d.ts +0 -1
- package/lib/components/Replay/Replay.js +2 -9
- package/lib/components/Replay/utils.js +1 -1
- package/lib/components/Request/RequestDetails.d.ts +0 -1
- package/lib/components/Request/RequestDetails.js +1 -1
- package/lib/components/Request/types.d.ts +2 -0
- package/lib/components/RequestParameters/Body.d.ts +0 -1
- package/lib/components/RequestParameters/ParametersGroup.d.ts +0 -1
- package/lib/components/RequestParameters/RequestParameters.js +1 -1
- package/lib/components/RequestSamples/CodeSample.d.ts +0 -1
- package/lib/components/RequestSamples/RequestSamples.d.ts +0 -1
- package/lib/components/RequestSamples/useCodeSamples.js +1 -1
- package/lib/components/ResponseSamples/Summary.js +1 -1
- package/lib/components/Responses/OperationResponseList.js +1 -1
- package/lib/components/Responses/ResponseDetails.d.ts +0 -1
- package/lib/components/Responses/ResponseHeaders.d.ts +0 -1
- package/lib/components/Responses/ResponseHeaders.js +1 -1
- package/lib/components/Responses/styled.d.ts +1 -2
- package/lib/components/RightPanel/RightPanel.js +1 -1
- package/lib/components/Samples/use-example-key.js +1 -1
- package/lib/components/Schema/ArraySchema.d.ts +0 -1
- package/lib/components/Schema/ObjectSchema.d.ts +0 -1
- package/lib/components/Schema/ObjectSchema.js +1 -1
- package/lib/components/Schema/OneOfSchema.d.ts +0 -1
- package/lib/components/Schema/OneOfSchema.js +1 -1
- package/lib/components/Schema/RecursiveSchema.d.ts +0 -1
- package/lib/components/Schema/RecursiveSchema.js +1 -1
- package/lib/components/Schema/Schema.d.ts +0 -1
- package/lib/components/Schema/SubSchema.js +1 -1
- package/lib/components/Schema/helpers.d.ts +1 -1
- package/lib/components/Schema/helpers.js +1 -1
- package/lib/components/Schema/useOneOfLocationIdx.js +1 -1
- package/lib/components/SchemaDefinition/SchemaDefinition.d.ts +0 -1
- package/lib/components/SectionContent/SectionContent.js +1 -1
- package/lib/components/SectionItem/SectionItem.d.ts +0 -1
- package/lib/components/Security/Divider.js +1 -1
- package/lib/components/Security/OAuthFlow.js +1 -1
- package/lib/components/Security/Security.js +1 -1
- package/lib/components/Security/SecurityButton.js +1 -1
- package/lib/components/Security/SecurityFlow.js +1 -1
- package/lib/components/Security/SecurityModal.js +1 -1
- package/lib/components/Security/SecuritySchemeItem.js +1 -1
- package/lib/components/Security/helper.js +1 -1
- package/lib/components/SelectOrLabel/SelectOrLabel.js +2 -2
- package/lib/components/ServerList/ServerList.d.ts +1 -1
- package/lib/components/ServerList/ServerList.js +1 -1
- package/lib/components/ServerList/types.d.ts +4 -1
- package/lib/components/ServerListDropdown/ServerListDropdown.js +1 -1
- package/lib/components/ServerListDropdown/styled.d.ts +0 -1
- package/lib/components/SideMenu/SideMenu.d.ts +0 -1
- package/lib/components/SideMenu/hooks/useMenuItems.js +1 -1
- package/lib/components/Tabs/Tabs.js +1 -1
- package/lib/components/Tabs/useTabsState.js +1 -1
- package/lib/components/TagItem/OperationNavigationItems.d.ts +9 -0
- package/lib/components/TagItem/OperationNavigationItems.js +37 -0
- package/lib/components/TagItem/OperationsNavigation.d.ts +1 -7
- package/lib/components/TagItem/OperationsNavigation.js +1 -40
- package/lib/components/TagItem/TagItem.js +1 -1
- package/lib/components/TagItem/styled.d.ts +1 -0
- package/lib/components/TagItem/styled.js +6 -0
- package/lib/components/TagItem/types.d.ts +5 -0
- package/lib/components/TagItem/types.js +2 -0
- package/lib/components/common/Badges.d.ts +2 -2
- package/lib/components/common/BodyContent/BodyContent.d.ts +0 -1
- package/lib/components/common/BodyContent/BodyContent.js +1 -1
- package/lib/components/common/ClearButton/ClearButton.d.ts +0 -1
- package/lib/components/common/ClearButton/styled.d.ts +0 -1
- package/lib/components/common/ConstraintsView.d.ts +0 -1
- package/lib/components/common/ExpandableExample/ExpandableExample.js +1 -1
- package/lib/components/common/Extensions.d.ts +0 -1
- package/lib/components/common/Fields/fields-layout.d.ts +3 -3
- package/lib/components/common/Fields/fields.d.ts +1 -2
- package/lib/components/common/LinkToField.js +1 -1
- package/lib/components/common/Select/Select.d.ts +0 -1
- package/lib/components/common/Select/styled.d.ts +11 -12
- package/lib/components/common/Skeleton/Skeleton.d.ts +1 -1
- package/lib/components/common/Skeleton/Skeleton.js +2 -2
- package/lib/components/common/linkify.js +2 -2
- package/lib/components/common/panels.d.ts +7 -7
- package/lib/components/common/panels.js +2 -2
- package/lib/components/pluggable/styled.components.d.ts +3 -3
- package/lib/events/creator.js +1 -1
- package/lib/hoc/utils.js +1 -1
- package/lib/hoc/withRouter.js +1 -1
- package/lib/hoc/withStore.js +1 -1
- package/lib/hooks/index.d.ts +1 -0
- package/lib/hooks/index.js +1 -1
- package/lib/hooks/useActivateExample.js +1 -1
- package/lib/hooks/useActiveWithFallback.js +1 -1
- package/lib/hooks/useDimensions.js +1 -1
- package/lib/hooks/useLicense.js +1 -1
- package/lib/hooks/usePrevious.js +1 -1
- package/lib/hooks/useRouter.d.ts +1 -1
- package/lib/hooks/useTranslate.d.ts +2 -0
- package/lib/hooks/useTranslate.js +2 -0
- package/lib/hooks/useUppercase2LowercaseRedirect.js +1 -1
- package/lib/index.js +1 -1
- package/lib/jotai/app.d.ts +2 -4
- package/lib/jotai/app.js +1 -1
- package/lib/jotai/operation.js +1 -1
- package/lib/models/callback.js +1 -1
- package/lib/models/example.js +1 -1
- package/lib/models/field.js +1 -1
- package/lib/models/group.js +1 -1
- package/lib/models/mediaContent.js +1 -1
- package/lib/models/mediaType.js +1 -1
- package/lib/models/operation.js +1 -1
- package/lib/models/request.js +1 -1
- package/lib/models/response.js +1 -1
- package/lib/models/schema.js +1 -1
- package/lib/models/security.js +1 -1
- package/lib/models/tab.d.ts +1 -1
- package/lib/services/OpenAPIParser.js +1 -1
- package/lib/services/check.js +1 -1
- package/lib/services/code-samples/generator.d.ts +3 -1
- package/lib/services/code-samples/generator.js +1 -1
- package/lib/services/code-samples/httpsnippet/helpers/code-helpers.js +1 -1
- package/lib/services/code-samples/httpsnippet/targets/index.d.ts +2 -2
- package/lib/services/code-samples/httpsnippet/targets/java/httpclient.js +1 -1
- package/lib/services/code-samples/httpsnippet/targets/java8/apachehttp.js +1 -1
- package/lib/services/code-samples/httpsnippet/targets/javascript/fetch.js +1 -1
- package/lib/services/code-samples/httpsnippet/targets/javascript/index.d.ts +1 -1
- package/lib/services/code-samples/httpsnippet/targets/node/fetch.js +1 -1
- package/lib/services/code-samples/httpsnippet/targets/php/utils.js +1 -1
- package/lib/services/code-samples/httpsnippet/targets/r/utils.js +1 -1
- package/lib/services/code-samples/httpsnippet/targets/shell/index.d.ts +1 -1
- package/lib/services/config-options/helpers.js +1 -1
- package/lib/services/config-options/normalizeOptions.js +1 -1
- package/lib/services/history/helpers.js +1 -1
- package/lib/services/menu/builder.js +1 -1
- package/lib/services/menu/markdown.js +1 -1
- package/lib/services/menu/operation.js +1 -1
- package/lib/services/menu/tags.js +1 -1
- package/lib/services/utils.js +1 -1
- package/lib/standalone.js +1 -1
- package/lib/utils/areArraysEqual.js +1 -1
- package/lib/utils/argValuesHelpers.js +1 -1
- package/lib/utils/compose.d.ts +1 -1
- package/lib/utils/convertExamplesFormat.d.ts +2 -0
- package/lib/utils/convertExamplesFormat.js +2 -0
- package/lib/utils/cookies.js +1 -1
- package/lib/utils/createParsedDocument.js +1 -1
- package/lib/utils/debounce.js +1 -1
- package/lib/utils/debug.js +1 -1
- package/lib/utils/dom.js +1 -1
- package/lib/utils/environments.js +1 -1
- package/lib/utils/helpers.d.ts +2 -2
- package/lib/utils/helpers.js +1 -1
- package/lib/utils/highlight.js +1 -1
- package/lib/utils/isMobile.js +1 -1
- package/lib/utils/loadAndBundleSpec.js +1 -1
- package/lib/utils/local-storage.js +1 -1
- package/lib/utils/object.js +1 -1
- package/lib/utils/openapi.d.ts +2 -1
- package/lib/utils/openapi.js +1 -1
- package/lib/utils/parameters.js +1 -1
- package/lib/utils/path.js +1 -1
- package/lib/utils/replaceVariables.js +1 -1
- package/lib/utils/saveTextBeforeHeading.js +1 -1
- package/lib/utils/security-details.js +1 -1
- package/lib/utils/session-storage.js +1 -1
- package/lib/utils/sort.js +1 -1
- package/lib/utils/string.js +1 -1
- package/lib/utils/test-utils.js +1 -1
- package/lib/utils/theme-helpers.js +2 -2
- package/lib-esm/components/ApiInfo/ApiInfo.js +1 -1
- package/lib-esm/components/ApiInfo/Metadata.d.ts +3 -1
- package/lib-esm/components/ApiInfo/Metadata.js +1 -1
- package/lib-esm/components/CallbackSamples/CallbackSamples.d.ts +2 -1
- package/lib-esm/components/CallbackSamples/CallbackSamples.js +1 -1
- package/lib-esm/components/Callbacks/CallbackDetails.d.ts +2 -1
- package/lib-esm/components/Callbacks/CallbackDetails.js +1 -1
- package/lib-esm/components/Callbacks/CallbackOperation.js +1 -1
- package/lib-esm/components/Callbacks/CallbackSummary.d.ts +3 -2
- package/lib-esm/components/Callbacks/CallbackSummary.js +1 -1
- package/lib-esm/components/Callbacks/CallbacksList.d.ts +0 -1
- package/lib-esm/components/Callbacks/styled.d.ts +1 -1
- package/lib-esm/components/Content/Content.d.ts +0 -1
- package/lib-esm/components/ContentItem/ContentItem.d.ts +0 -1
- package/lib-esm/components/ContentItems/ContentItems.d.ts +0 -1
- package/lib-esm/components/Discriminator/Discriminator.d.ts +2 -1
- package/lib-esm/components/Discriminator/Discriminator.js +1 -1
- package/lib-esm/components/ExpandAllButton/ExpandAllButton.js +1 -1
- package/lib-esm/components/ExpandAllButton/getAllNestedSchema.d.ts +4 -4
- package/lib-esm/components/ExternalDocumentation/ExternalDocumentation.d.ts +0 -1
- package/lib-esm/components/Language/LanguageList.d.ts +0 -1
- package/lib-esm/components/Language/styled.d.ts +12 -13
- package/lib-esm/components/MediaTypeSwitch/MediaTypesSwitch.js +1 -1
- package/lib-esm/components/OperationItem/OperationItem.d.ts +0 -1
- package/lib-esm/components/OperationItem/OperationItem.js +2 -2
- package/lib-esm/components/Overview/Overview.d.ts +8 -3
- package/lib-esm/components/Overview/Overview.js +1 -1
- package/lib-esm/components/PageFooter/PageFooter.d.ts +0 -1
- package/lib-esm/components/PanelItem/styled.d.ts +5 -6
- package/lib-esm/components/PayloadSamples/Example.js +1 -1
- package/lib-esm/components/PayloadSamples/ExampleValue.d.ts +0 -1
- package/lib-esm/components/PayloadSamples/MediaTypeSamples.d.ts +0 -1
- package/lib-esm/components/PayloadSamples/MediaTypeSamples.js +1 -1
- package/lib-esm/components/PayloadSamples/PayloadSamples.d.ts +0 -1
- package/lib-esm/components/PayloadSamples/PayloadSamples.js +1 -1
- package/lib-esm/components/PropertyDetails/DescriptionEnums.d.ts +1 -1
- package/lib-esm/components/PropertyDetails/DescriptionEnums.js +1 -1
- package/lib-esm/components/PropertyDetails/EnumValues.d.ts +0 -1
- package/lib-esm/components/PropertyDetails/EnumValues.js +1 -1
- package/lib-esm/components/PropertyDetails/Examples.js +1 -1
- package/lib-esm/components/PropertyDetails/Extensions.d.ts +0 -1
- package/lib-esm/components/PropertyDetails/FieldDetail.d.ts +1 -1
- package/lib-esm/components/PropertyDetails/FieldDetail.js +1 -1
- package/lib-esm/components/PropertyDetails/FieldDetails.d.ts +0 -1
- package/lib-esm/components/PropertyDetails/FieldDetails.js +4 -3
- package/lib-esm/components/PropertyDetails/Pattern.js +1 -1
- package/lib-esm/components/PropertyDetails/PropertyDetails.d.ts +0 -1
- package/lib-esm/components/PropertyDetails/SimpleEnums.d.ts +1 -1
- package/lib-esm/components/PropertyDetails/SimpleEnums.js +1 -1
- package/lib-esm/components/PropertyDetails/styled.d.ts +1 -10
- package/lib-esm/components/PropertyDetails/types.d.ts +3 -0
- package/lib-esm/components/RedoclyOpenAPIDocs/Providers.js +1 -1
- package/lib-esm/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocs.js +1 -1
- package/lib-esm/components/RedoclyOpenAPIDocs/styled.d.ts +0 -4
- package/lib-esm/components/RedoclyOpenAPIDocs/styled.js +1 -30
- package/lib-esm/components/RedoclyOpenAPIDocs/types.d.ts +0 -3
- package/lib-esm/components/Replay/EmbeddedReplay.d.ts +0 -1
- package/lib-esm/components/Replay/EmbeddedReplay.js +1 -1
- package/lib-esm/components/Replay/Replay.d.ts +0 -1
- package/lib-esm/components/Replay/Replay.js +2 -9
- package/lib-esm/components/Request/RequestDetails.d.ts +0 -1
- package/lib-esm/components/Request/RequestDetails.js +1 -1
- package/lib-esm/components/Request/types.d.ts +2 -0
- package/lib-esm/components/RequestParameters/Body.d.ts +0 -1
- package/lib-esm/components/RequestParameters/ParametersGroup.d.ts +0 -1
- package/lib-esm/components/RequestParameters/RequestParameters.js +1 -1
- package/lib-esm/components/RequestSamples/CodeSample.d.ts +0 -1
- package/lib-esm/components/RequestSamples/RequestSamples.d.ts +0 -1
- package/lib-esm/components/RequestSamples/useCodeSamples.js +1 -1
- package/lib-esm/components/ResponseSamples/Summary.js +1 -1
- package/lib-esm/components/Responses/OperationResponseList.js +1 -1
- package/lib-esm/components/Responses/ResponseDetails.d.ts +0 -1
- package/lib-esm/components/Responses/ResponseHeaders.d.ts +0 -1
- package/lib-esm/components/Responses/ResponseHeaders.js +1 -1
- package/lib-esm/components/Responses/styled.d.ts +1 -2
- package/lib-esm/components/RightPanel/RightPanel.js +1 -1
- package/lib-esm/components/Schema/ArraySchema.d.ts +0 -1
- package/lib-esm/components/Schema/ObjectSchema.d.ts +0 -1
- package/lib-esm/components/Schema/ObjectSchema.js +1 -1
- package/lib-esm/components/Schema/OneOfSchema.d.ts +0 -1
- package/lib-esm/components/Schema/OneOfSchema.js +1 -1
- package/lib-esm/components/Schema/RecursiveSchema.d.ts +0 -1
- package/lib-esm/components/Schema/RecursiveSchema.js +1 -1
- package/lib-esm/components/Schema/Schema.d.ts +0 -1
- package/lib-esm/components/Schema/SubSchema.js +1 -1
- package/lib-esm/components/Schema/helpers.d.ts +1 -1
- package/lib-esm/components/Schema/helpers.js +1 -1
- package/lib-esm/components/SchemaDefinition/SchemaDefinition.d.ts +0 -1
- package/lib-esm/components/SectionItem/SectionItem.d.ts +0 -1
- package/lib-esm/components/Security/OAuthFlow.js +1 -1
- package/lib-esm/components/Security/SecurityFlow.js +1 -1
- package/lib-esm/components/Security/SecurityModal.js +1 -1
- package/lib-esm/components/ServerList/ServerList.d.ts +1 -1
- package/lib-esm/components/ServerList/ServerList.js +1 -1
- package/lib-esm/components/ServerList/types.d.ts +4 -1
- package/lib-esm/components/ServerListDropdown/ServerListDropdown.js +1 -1
- package/lib-esm/components/ServerListDropdown/styled.d.ts +0 -1
- package/lib-esm/components/SideMenu/SideMenu.d.ts +0 -1
- package/lib-esm/components/TagItem/OperationNavigationItems.d.ts +9 -0
- package/lib-esm/components/TagItem/OperationNavigationItems.js +37 -0
- package/lib-esm/components/TagItem/OperationsNavigation.d.ts +1 -7
- package/lib-esm/components/TagItem/OperationsNavigation.js +1 -40
- package/lib-esm/components/TagItem/TagItem.js +2 -2
- package/lib-esm/components/TagItem/styled.d.ts +1 -0
- package/lib-esm/components/TagItem/styled.js +6 -0
- package/lib-esm/components/TagItem/types.d.ts +5 -0
- package/lib-esm/components/TagItem/types.js +2 -0
- package/lib-esm/components/common/Badges.d.ts +2 -2
- package/lib-esm/components/common/BodyContent/BodyContent.d.ts +0 -1
- package/lib-esm/components/common/BodyContent/BodyContent.js +1 -1
- package/lib-esm/components/common/ClearButton/ClearButton.d.ts +0 -1
- package/lib-esm/components/common/ClearButton/styled.d.ts +0 -1
- package/lib-esm/components/common/ConstraintsView.d.ts +0 -1
- package/lib-esm/components/common/ExpandableExample/ExpandableExample.js +1 -1
- package/lib-esm/components/common/Extensions.d.ts +0 -1
- package/lib-esm/components/common/Fields/fields-layout.d.ts +3 -3
- package/lib-esm/components/common/Fields/fields.d.ts +1 -2
- package/lib-esm/components/common/Select/Select.d.ts +0 -1
- package/lib-esm/components/common/Select/styled.d.ts +11 -12
- package/lib-esm/components/common/Skeleton/Skeleton.d.ts +1 -1
- package/lib-esm/components/common/panels.d.ts +7 -7
- package/lib-esm/components/common/panels.js +2 -2
- package/lib-esm/components/pluggable/styled.components.d.ts +3 -3
- package/lib-esm/hooks/index.d.ts +1 -0
- package/lib-esm/hooks/index.js +1 -1
- package/lib-esm/hooks/useRouter.d.ts +1 -1
- package/lib-esm/hooks/useTranslate.d.ts +2 -0
- package/lib-esm/hooks/useTranslate.js +2 -0
- package/lib-esm/jotai/app.d.ts +2 -4
- package/lib-esm/jotai/app.js +1 -1
- package/lib-esm/models/mediaType.js +1 -1
- package/lib-esm/models/tab.d.ts +1 -1
- package/lib-esm/services/code-samples/generator.d.ts +3 -1
- package/lib-esm/services/code-samples/generator.js +1 -1
- package/lib-esm/services/code-samples/httpsnippet/targets/index.d.ts +2 -2
- package/lib-esm/services/code-samples/httpsnippet/targets/java/httpclient.js +1 -1
- package/lib-esm/services/code-samples/httpsnippet/targets/java8/apachehttp.js +1 -1
- package/lib-esm/services/code-samples/httpsnippet/targets/javascript/fetch.js +1 -1
- package/lib-esm/services/code-samples/httpsnippet/targets/javascript/index.d.ts +1 -1
- package/lib-esm/services/code-samples/httpsnippet/targets/node/fetch.js +1 -1
- package/lib-esm/services/code-samples/httpsnippet/targets/shell/index.d.ts +1 -1
- package/lib-esm/utils/compose.d.ts +1 -1
- package/lib-esm/utils/convertExamplesFormat.d.ts +2 -0
- package/lib-esm/utils/convertExamplesFormat.js +2 -0
- package/lib-esm/utils/helpers.d.ts +2 -2
- package/lib-esm/utils/openapi.d.ts +2 -1
- package/lib-esm/utils/openapi.js +1 -1
- package/package.json +15 -14
- package/lib/components/UnsupportedFeatureScreen/UnsupportedFeatureScreen.d.ts +0 -1
- package/lib/components/UnsupportedFeatureScreen/UnsupportedFeatureScreen.js +0 -18
- package/lib/components/UnsupportedFeatureScreen/index.d.ts +0 -1
- package/lib/components/UnsupportedFeatureScreen/index.js +0 -2
- package/lib/setupTests.d.ts +0 -2
- package/lib/setupTests.js +0 -2
- package/lib/testProviders.d.ts +0 -3
- package/lib/testProviders.js +0 -2
- package/lib-esm/components/UnsupportedFeatureScreen/UnsupportedFeatureScreen.d.ts +0 -1
- package/lib-esm/components/UnsupportedFeatureScreen/UnsupportedFeatureScreen.js +0 -18
- package/lib-esm/components/UnsupportedFeatureScreen/index.d.ts +0 -1
- package/lib-esm/components/UnsupportedFeatureScreen/index.js +0 -2
- package/lib-esm/setupTests.d.ts +0 -2
- package/lib-esm/setupTests.js +0 -2
- package/lib-esm/testProviders.d.ts +0 -3
- package/lib-esm/testProviders.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{memo}from"react";import{HeadersCaption,StyledHeadersProperties}from"./styled";import{PropertyDetails}from"../PropertyDetails";import{LinkToField}from"../common/LinkToField";function ResponseHeadersComponent({headers:e,deepLink:s}){return void 0===e||0===e.length?null:_jsxs(StyledHeadersProperties,{children:[_jsxs(HeadersCaption,{children:[s&&_jsx(LinkToField,{to:s}),"Headers"]}),e.map(((e,r)=>_jsx(PropertyDetails,{isFirst:0===r,field:e,disableDeepLinks:!s},e.name)))]})}export const ResponseHeaders=memo(ResponseHeadersComponent);
|
|
1
|
+
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{memo}from"react";import{HeadersCaption,StyledHeadersProperties}from"./styled";import{PropertyDetails}from"../PropertyDetails";import{LinkToField}from"../common/LinkToField";import{useTranslate}from"../../hooks";function ResponseHeadersComponent({headers:e,deepLink:s}){const r=useTranslate();return void 0===e||0===e.length?null:_jsxs(StyledHeadersProperties,{children:[_jsxs(HeadersCaption,{children:[s&&_jsx(LinkToField,{to:s}),r("openapi.header","Headers")]}),e.map(((e,r)=>_jsx(PropertyDetails,{isFirst:0===r,field:e,disableDeepLinks:!s},e.name)))]})}export const ResponseHeaders=memo(ResponseHeadersComponent);
|
|
2
2
|
//# sourceMappingURL=ResponseHeaders.js.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export declare const HeadersCaption: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
2
|
export declare const StyledHeadersProperties: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
3
|
export declare const Row: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
4
|
export declare const StyledTitle: import("styled-components").StyledComponent<"h4", any, {}, never>;
|
|
6
|
-
export declare const StyledDescription: import("styled-components").StyledComponent<({ source, ast, htmlWrap, ...props }: import("../Markdown").MarkdownProps) => import("react").ReactElement
|
|
5
|
+
export declare const StyledDescription: import("styled-components").StyledComponent<({ source, ast, htmlWrap, ...props }: import("../Markdown").MarkdownProps) => import("react").ReactElement | null, any, {}, never>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as _jsx,Fragment as _Fragment,jsxs as _jsxs}from"react/jsx-runtime";import{Markdown as MarkdownWrapper,Panel}from"@redocly/theme";import{useAtomValue}from"jotai";import{DownloadSpecification}from"../Download";import{Overview}from"../Overview";import{LanguageList}from"../Language";import{ServerList}from"../ServerList";import{globalStoreAtom}from"../../jotai/store";import{normalizeServers}from"../../utils";import{mergeInMockServer}from"../../models/operation";import{languageAtom}from"../../jotai/app";export const RightPanel=({item:{infoDefinition:e}})=>{const{options:{hideDownloadButtons:r,mockServer:
|
|
1
|
+
import{jsx as _jsx,Fragment as _Fragment,jsxs as _jsxs}from"react/jsx-runtime";import{Markdown as MarkdownWrapper,Panel}from"@redocly/theme";import{useAtomValue}from"jotai";import{DownloadSpecification}from"../Download";import{Overview}from"../Overview";import{LanguageList}from"../Language";import{ServerList}from"../ServerList";import{globalStoreAtom}from"../../jotai/store";import{normalizeServers}from"../../utils";import{mergeInMockServer}from"../../models/operation";import{languageAtom}from"../../jotai/app";import{useTranslate}from"../../hooks";export const RightPanel=({item:{infoDefinition:e}})=>{const a=useTranslate(),{options:{hideDownloadButtons:r,mockServer:o},parser:{definition:n,definitionUrl:i}}=useAtomValue(globalStoreAtom),{languages:s,activeLanguage:t}=useAtomValue(languageAtom),l=normalizeServers(i,mergeInMockServer(n.servers||[],o));return _jsxs(_Fragment,{children:[!r&&_jsx(Panel,{className:"panel-download",header:a("openapi.download.description.title","Download OpenAPI description"),isExpandable:!1,children:_jsx(DownloadSpecification,{})}),((null==e?void 0:e.license)||(null==e?void 0:e.contact)||(null==e?void 0:e.termsOfService))&&_jsx(Panel,{className:"panel-overview",header:a("openapi.info.title","Overview"),isExpandable:!1,children:_jsx(MarkdownWrapper,{children:_jsx(Overview,{info:e,translate:a})})}),!!(null==s?void 0:s.length)&&_jsx(Panel,{className:"panel-language-list",header:a("openapi.languages.title","Languages"),isExpandable:!1,children:_jsx(LanguageList,{languages:s,activeLanguage:t})}),!!l.length&&_jsx(Panel,{className:"panel-servers-list",header:a("openapi.servers.title","Servers"),isExpandable:!1,children:_jsx(ServerList,{servers:l,path:"/",translate:a})})]})};
|
|
2
2
|
//# sourceMappingURL=RightPanel.js.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import type { SchemaProps } from './types';
|
|
3
2
|
export declare const ArrayClosingLabel: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
4
3
|
export declare const ArraySchema: import("react").NamedExoticComponent<SchemaProps>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as _jsx,Fragment as _Fragment,jsxs as _jsxs}from"react/jsx-runtime";import{memo}from"react";import{useAtomValue}from"jotai";import{PropertiesTableCaption}from"../common";import{Discriminator}from"../Discriminator";import{globalOptionsAtom}from"../../jotai/store";import{PropertyDetails}from"../PropertyDetails";import{SubSchema}from"./SubSchema";import{getExpandByDefault}from"./helpers";function ObjectSchemaComponent({schema:e,showTitle:
|
|
1
|
+
import{jsx as _jsx,Fragment as _Fragment,jsxs as _jsxs}from"react/jsx-runtime";import{memo}from"react";import{useAtomValue}from"jotai";import{PropertiesTableCaption}from"../common";import{Discriminator}from"../Discriminator";import{globalOptionsAtom}from"../../jotai/store";import{PropertyDetails}from"../PropertyDetails";import{SubSchema}from"./SubSchema";import{getExpandByDefault}from"./helpers";import{useTranslate}from"../../hooks";function ObjectSchemaComponent({schema:e,showTitle:t,discriminator:r,level:i,skipWriteOnly:a,skipReadOnly:o,fieldParentsName:n,expandable:s,deepLink:m,required:l,disableDeepLinks:p,oneOfLevel:c}){const{fields:d=[],title:h}=e,f=useTranslate(),{schemasExpansionLevel:u}=useAtomValue(globalOptionsAtom),x=o||a?d.filter((e=>!(o&&e.schema.readOnly||a&&e.schema.writeOnly))):d,O=getExpandByDefault({required:l,level:i,schemasExpansionLevel:u});return _jsx(SubSchema,{expandable:s,expandByDefault:O,level:i,propertyLength:x.length,deepLink:m,operationPointer:e.operationPointer,children:_jsxs(_Fragment,{children:[t&&_jsx(PropertiesTableCaption,{children:h}),x.map(((e,s)=>_jsx(PropertyDetails,{isFirst:0===s,field:e,fieldParentsName:Number(i)>1?n:[],renderDiscriminatorSwitch:(null==r?void 0:r.fieldName)===e.name&&(null==r?void 0:r.parentSchema)?()=>_jsx(Discriminator,{parent:r.parentSchema,onChange:null==r?void 0:r.onChange,activeOneOfIdx:r.activeOneOfIdx,translate:f}):void 0,skipReadOnly:o,skipWriteOnly:a,showTitle:t,level:i,disableDeepLinks:p,oneOfLevel:c},e.name)))]})})}export const ObjectSchema=memo(ObjectSchemaComponent);
|
|
2
2
|
//# sourceMappingURL=ObjectSchema.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var __rest=this&&this.__rest||function(e,t){var o={};for(var
|
|
1
|
+
var __rest=this&&this.__rest||function(e,t){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(o[r[n]]=e[r[n]])}return o};import{jsxs as _jsxs,jsx as _jsx}from"react/jsx-runtime";import{memo}from"react";import{useAtom}from"jotai";import styled from"styled-components";import{StyledBadge,SelectionTitle}from"../common";import{Markdown}from"../Markdown";import{ConstraintsView}from"../common/ConstraintsView";import{Schema}from"./Schema";import{operationStore}from"../../jotai/operation";import{SchemaSelection}from"../common/SchemaSelection";import{useOneOfLocationIdx}from"./useOneOfLocationIdx";import{useTranslate}from"../../hooks";function OneOfSchemaComponent(e){var{schema:{oneOf:t},schema:o,oneOfLevel:r=1}=e,n=__rest(e,["schema","schema","oneOfLevel"]);const i=useTranslate(),[s]=useAtom(operationStore(o.operationPointer)),a=useOneOfLocationIdx(t,r),c=-1===a?0:a,m=t[void 0!==s.activeOneOf[o.pointer]?s.activeOneOf[o.pointer]:c];if(!m)return null;const p=t.map(((e,t)=>({label:e.title||e.typePrefix+e.displayType,value:t})));return _jsxs(Wrapper,{children:[_jsxs(SelectionTitle,{children:[o.oneOfType,":"]}),_jsx(SchemaSelection,{options:p,pointer:o.operationPointer,schema:o,defaultOneOfIdx:c}),m.deprecated&&_jsx(StyledBadge,{deprecated:!0,children:i("openapi.badges.deprecated","Deprecated")}),m.description&&_jsx(StyledDescription,{source:m.description}),_jsx(ConstraintsView,{constraints:m.constraints}),_jsx(Schema,Object.assign({},n,{schema:m,oneOfLevel:r+1}))]})}export const OneOfSchema=memo(OneOfSchemaComponent);const StyledDescription=styled(Markdown)`
|
|
2
2
|
margin-top: var(--spacing-xs);
|
|
3
3
|
font-size: var(--font-size-base);
|
|
4
4
|
line-height: var(--line-height-base);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{memo}from"react";import{RecursiveLabel,TypeName,TypeTitle}from"../common";function RecursiveSchemaComponent({schema:e}){return _jsxs("div",{children:[_jsx(TypeName,{children:e.displayType}),e.title&&_jsxs(TypeTitle,{children:[" ",e.title," "]}),
|
|
1
|
+
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{memo}from"react";import{RecursiveLabel,TypeName,TypeTitle}from"../common";import{useTranslate}from"../../hooks";function RecursiveSchemaComponent({schema:e}){const s=useTranslate();return _jsxs("div",{children:[_jsx(TypeName,{children:e.displayType}),e.title&&_jsxs(TypeTitle,{children:[" ",e.title," "]}),_jsxs(RecursiveLabel,{children:[" ",s("openapi.recursive","Recursive")," "]})]})}export const RecursiveSchema=memo(RecursiveSchemaComponent);
|
|
2
2
|
//# sourceMappingURL=RecursiveSchema.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as _jsx}from"react/jsx-runtime";import{memo}from"react";import{useLocation}from"react-router-dom";import{useAtom}from"jotai/index";import{useMount}from"@redocly/theme";import{pathIncludesLink}from"../../utils";import{operationStore}from"../../jotai/operation";import{extractTypeFromDeepLink}from"./helpers";import{ViewNested}from"../ViewNested";function SubSchemaComponent({expandByDefault:e,deepLink:o,level:t,expandable:r=!1,isArray:n="",propertyLength:
|
|
1
|
+
import{jsx as _jsx}from"react/jsx-runtime";import{memo}from"react";import{useLocation}from"react-router-dom";import{useAtom}from"jotai/index";import{useMount}from"@redocly/theme";import{pathIncludesLink}from"../../utils";import{operationStore}from"../../jotai/operation";import{extractTypeFromDeepLink}from"./helpers";import{ViewNested}from"../ViewNested";import{useTranslate}from"../../hooks";function SubSchemaComponent({expandByDefault:e,deepLink:o,level:t,expandable:r=!1,isArray:n="",propertyLength:a="",children:i,operationPointer:p}){var s;const m=useTranslate(),d=useLocation(),u=pathIncludesLink(d,o),c=extractTypeFromDeepLink(o),[l,x]=useAtom(operationStore(p)),h=null===(s=l[c])||void 0===s?void 0:s.expandedFields[o||""],f=e=>{c&&o&&x((t=>{var r;return Object.assign(Object.assign({},t),{[c]:{expandedFields:Object.assign(Object.assign({},(null===(r=t[c])||void 0===r?void 0:r.expandedFields)||{}),{[o]:e})}})}))};useMount((()=>{r&&(e||u)&&f(!0)}));const b=`${m("openapi.actions.show","Show")} ${1===Number(a)?"":a} ${n&&"array "}${1!==a?"properties":"property"}`;return _jsx(ViewNested,{expandByDefault:e||u,isExpandedFromParent:h,level:t,expandable:r,onChange:()=>{f(!h)},expandText:b,children:i})}export const SubSchema=memo(SubSchemaComponent);
|
|
2
2
|
//# sourceMappingURL=SubSchema.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SchemaProps } from './types';
|
|
2
2
|
export declare const extractTypeFromDeepLink: (str?: string) => string;
|
|
3
|
-
export declare function getExpandByDefault(
|
|
3
|
+
export declare function getExpandByDefault({ schemasExpansionLevel, level, required, }: Pick<SchemaProps, 'level' | 'required'> & {
|
|
4
4
|
schemasExpansionLevel?: number;
|
|
5
5
|
}): boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const extractTypeFromDeepLink=e=>{if(!e)return"";const
|
|
1
|
+
import{isUndefined}from"@redocly/theme";export const extractTypeFromDeepLink=e=>{if(!e)return"";const n=e.match(/t=(request|response)/);return n?n[1]:""};const DEFAULT_REQUIRE_EXPAND_LEVEL=4;export function getExpandByDefault({schemasExpansionLevel:e,level:n,required:t}){const r=Number(n)-1;return isUndefined(e)?Boolean(t)&&DEFAULT_REQUIRE_EXPAND_LEVEL>=r:e>=r}
|
|
2
2
|
//# sourceMappingURL=helpers.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as _jsx,Fragment as _Fragment,jsxs as _jsxs}from"react/jsx-runtime";import{memo}from"react";import styled from"styled-components";import{Markdown}from"../Markdown";import{SecuritySchemeItem}from"./SecuritySchemeItem";import{StyledLink,Tag}from"./styled";function OAuthFlowComponent({flow:e}){const
|
|
1
|
+
import{jsx as _jsx,Fragment as _Fragment,jsxs as _jsxs}from"react/jsx-runtime";import{memo}from"react";import styled from"styled-components";import{Markdown}from"../Markdown";import{SecuritySchemeItem}from"./SecuritySchemeItem";import{StyledLink,Tag}from"./styled";import{useTranslate}from"../../hooks";function OAuthFlowComponent({flow:e}){const r=Object.keys((null==e?void 0:e.scopes)||{}),o=useTranslate();return _jsxs(_Fragment,{children:[_jsx(SecuritySchemeItem,{label:`${o("openapi.authorizationUrl","Authorization URL")}:`,value:(null==e?void 0:e.authorizationUrl)&&_jsx(StyledLink,{target:"_blank",rel:"noopener noreferrer",href:null==e?void 0:e.authorizationUrl,children:null==e?void 0:e.authorizationUrl})}),_jsx(SecuritySchemeItem,{label:`${o("openapi.tokenUrl","Token URL")}:`,value:null==e?void 0:e.tokenUrl}),_jsx(SecuritySchemeItem,{label:`${o("openapi.refreshUrl","Refresh URL")}:`,value:null==e?void 0:e.refreshUrl}),r.length&&_jsxs(_Fragment,{children:[_jsx(SecuritySchemeItem,{label:`${o("openapi.scopes","Scopes")}:`,value:" "}),r.map((r=>_jsx(SecuritySchemeItem,{label:_jsx(StyledTag,{className:"tag-grey",children:r}),value:_jsx(Markdown,{source:(null==e?void 0:e.scopes[r])||""})},r)))]})||null]})}const StyledTag=styled(Tag)`
|
|
2
2
|
margin-left: var(--spacing-xs);
|
|
3
3
|
`;export const OAuthFlow=memo(OAuthFlowComponent);
|
|
4
4
|
//# sourceMappingURL=OAuthFlow.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as _jsx,Fragment as _Fragment,jsxs as _jsxs}from"react/jsx-runtime";import styled from"styled-components";import{SecuritySchemeItem}from"./SecuritySchemeItem";import{titleize}from"../../utils";import{OAuthFlow}from"./OAuthFlow";import{StyledLink,Tag}from"./styled";import{Markdown}from"../Markdown";import{getRequiredScopes}from"./helper";export function SecurityFlow({type:e,bearerFormat:r,name:t,flows:a,openIdConnectUrl:
|
|
1
|
+
import{jsx as _jsx,Fragment as _Fragment,jsxs as _jsxs}from"react/jsx-runtime";import styled from"styled-components";import{SecuritySchemeItem}from"./SecuritySchemeItem";import{titleize}from"../../utils";import{OAuthFlow}from"./OAuthFlow";import{StyledLink,Tag}from"./styled";import{Markdown}from"../Markdown";import{getRequiredScopes}from"./helper";import{useTranslate}from"../../hooks";export function SecurityFlow({type:e,bearerFormat:r,name:t,flows:a,openIdConnectUrl:o,description:i,id:s,securities:n,in:l}){const m=useTranslate();if(!e||!s)return null;const c=getRequiredScopes(s,n),p={http:_jsxs(_Fragment,{children:[_jsx(SecuritySchemeItem,{label:m("openapi.httpAuthorizationScheme","HTTP Authorization Scheme"),value:e}),_jsx(SecuritySchemeItem,{label:m("openapi.bearerFormat","Bearer Format"),value:r})]}),apiKey:_jsx(SecuritySchemeItem,{label:`${titleize(l||"")} ${m("openapi.parameterName","parameter name")}:`,value:t}),oauth2:_jsxs(_Fragment,{children:[_jsx(SecuritySchemeItem,{label:m("openapi.flowType","Flow type"),value:e}),a&&Object.keys(a).map((e=>_jsx(OAuthFlow,{flow:a[e]},e)))]}),openIdConnect:_jsx(SecuritySchemeItem,{label:m("openapi.connectUrl","Connect URL"),value:o&&_jsx(StyledLink,{target:"_blank",rel:"noopener noreferrer",href:o,children:o})})};return _jsxs(Wrapper,{children:[_jsx(TitleSchema,{children:s}),_jsx(Markdown,{source:i}),_jsxs(List,{children:[p[e]||null,_jsx(SecuritySchemeItem,{label:m("openapi.requiredScopes","Required scopes"),value:c.length&&_jsx(Row,{children:c.map((e=>_jsx(Tag,{className:"tag-grey",children:e},e)))})})]})]})}const Wrapper=styled.div`
|
|
2
2
|
background: var(--layer-color);
|
|
3
3
|
padding: var(--spacing-base);
|
|
4
4
|
border-radius: var(--border-radius);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{Fragment,useState,useRef}from"react";import styled from"styled-components";import{useOutsideClick,Typography,CloseIcon,SecurityIcon,Segmented,Button,useFocusTrap}from"@redocly/theme";import{SecurityFlow}from"./SecurityFlow";import{Divider}from"./Divider";export function SecurityModal({securities:e,onClose:t}){const
|
|
1
|
+
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{Fragment,useState,useRef}from"react";import styled from"styled-components";import{useOutsideClick,Typography,CloseIcon,SecurityIcon,Segmented,Button,useFocusTrap}from"@redocly/theme";import{SecurityFlow}from"./SecurityFlow";import{Divider}from"./Divider";import{useTranslate}from"../../hooks";export function SecurityModal({securities:e,onClose:t}){const s=useTranslate(),[o,i]=useState(0),r=useRef(null),{schemes:a}=e[o]||{};useOutsideClick(r,t),useFocusTrap(r);const n=e.map((({schemes:e},t)=>({label:e.map((({id:e})=>e)).join(" and "),value:t})));return _jsx(StyledBackground,{children:_jsxs(Wrapper,{ref:r,tabIndex:0,children:[_jsx(Close,{onClick:t,"data-testid":"close",variant:"ghost",icon:_jsx(CloseIcon,{})}),_jsxs(Title,{children:[_jsx(SecurityIcon,{size:"24px"}),s("openapi.security","Security")]}),_jsx(Segmented,{value:o,onChange:({value:e})=>i(e),options:n}),a.map(((t,s)=>_jsxs(Fragment,{children:[_jsx(SecurityFlow,Object.assign({},t,{securities:e})),s!==a.length-1&&_jsx(Divider,{label:"and"})]},t.id)))]})})}const Wrapper=styled.div`
|
|
2
2
|
background: var(--bg-color);
|
|
3
3
|
box-shadow: var(--bg-raised-shadow);
|
|
4
4
|
border-radius: var(--border-radius-lg);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
2
|
import type { ServerListProps } from './types';
|
|
3
|
-
export declare const ServerList: ({ servers, path }: ServerListProps) => ReactElement;
|
|
3
|
+
export declare const ServerList: ({ servers, path, translate }: ServerListProps) => ReactElement;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{CopyButton}from"@redocly/theme";import styled from"styled-components";import{PanelItemDescription,Title}from"../PanelItem";import{ViewNested}from"../ViewNested";import{Tag}from"../common";import{Markdown}from"../Markdown";export const ServerList=({servers:e,path:r})=>_jsx(ItemsList,{children:e.map((e=>{const
|
|
1
|
+
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{CopyButton}from"@redocly/theme";import styled from"styled-components";import{PanelItemDescription,Title}from"../PanelItem";import{ViewNested}from"../ViewNested";import{Tag}from"../common";import{Markdown}from"../Markdown";export const ServerList=({servers:e,path:r,translate:i})=>_jsx(ItemsList,{children:e.map((e=>{const a=e.url+r,t=Object.keys(e.variables||{}).length,s=1===t?"variable":"variables",o=`${t||""} ${i(`openapi.${s}`,s)}`;return _jsxs("div",{children:[_jsx(PanelItemDescription,{children:e.description}),_jsxs(TitleWrap,{children:[_jsx(Title,{suppressHydrationWarning:!0,children:a}),_jsx(CopyButton,{data:a},a)]}),e.variables&&_jsx(ViewNested,{expandText:`${i("openapi.actions.show","Show")} ${o}`,hideText:`${i("openapi.actions.hide","Hide")} ${o}`,expandByDefault:!1,expandable:!0,hideDivider:!0,children:_jsx(ServerVariablesContainer,{children:Object.entries(e.variables||{}).map((([e,r])=>_jsxs(ServerVariableContainer,{children:[_jsx(ServerVariableName,{children:e}),_jsxs(Variable,{children:[i("openapi.default","Default")," ",_jsx(StyledTag,{children:r.default})]}),_jsx(Description,{source:r.description}),r.enum&&_jsxs(Variable,{children:[i("openapi.enum","Enum")," ",_jsx(TagWrapper,{children:r.enum.map((e=>_jsx(StyledTag,{children:e},e)))})]})]},e)))})})]},e.url)}))});const ItemsList=styled.div`
|
|
2
2
|
& > div {
|
|
3
3
|
border-bottom: 1px solid var(--border-color-secondary);
|
|
4
4
|
margin-bottom: var(--spacing-xs);
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
+
import type { TFunction } from '@redocly/theme';
|
|
1
2
|
import type { OperationModel } from '../../models';
|
|
2
|
-
export type ServerListProps = Pick<OperationModel, 'servers' | 'path'
|
|
3
|
+
export type ServerListProps = Pick<OperationModel, 'servers' | 'path'> & {
|
|
4
|
+
translate: TFunction;
|
|
5
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{useMemo,useCallback}from"react";import{Dropdown,DropdownMenu}from"@redocly/theme";import{useAtom}from"jotai";import{HttpVerb}from"../common";import{PathWrapper,Path,StyledCopyButton,StyledDropdownMenuItem}from"./styled";import{PanelItem}from"../PanelItem";import{joinWithSeparator}from"../../services";import{replaceVariables}from"../../utils";import{environmentAtom}from"../../jotai/app";import{useActiveWithFallback}from"../../hooks";import{getServerEnvName}from"../../utils/environments";export const ServerListDropdown=({operation:e,className:r})=>{const[[t],o]=useAtom(environmentAtom),
|
|
1
|
+
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{useMemo,useCallback}from"react";import{Dropdown,DropdownMenu}from"@redocly/theme";import{useAtom}from"jotai";import{HttpVerb}from"../common";import{PathWrapper,Path,StyledCopyButton,StyledDropdownMenuItem}from"./styled";import{PanelItem}from"../PanelItem";import{joinWithSeparator}from"../../services";import{replaceVariables}from"../../utils";import{environmentAtom}from"../../jotai/app";import{useActiveWithFallback}from"../../hooks";import{getServerEnvName}from"../../utils/environments";export const ServerListDropdown=({operation:e,className:r})=>{const[[t],o]=useAtom(environmentAtom),s=useActiveWithFallback(e.servers.map((e=>Object.assign(Object.assign({},e),{key:e.url}))),t.server),a=useCallback((e=>{e.stopPropagation()}),[]),n=useCallback((r=>()=>{1!==e.servers.length&&o({environment:getServerEnvName(r)})}),[e.servers.length,o]),i=useMemo((()=>e.servers.map((r=>{const t=joinWithSeparator(replaceVariables(r),e.path);return _jsx(StyledDropdownMenuItem,{onAction:n(r),children:_jsx(PanelItem,{header:r.description,title:t,actions:[_jsx(StyledCopyButton,{data:t,toasterPlacement:"left",onCopyClick:a},t)],active:r.url===s,withCheckmark:!0})},t)}))),[e.servers,e.path,n,a,s]);return _jsx(Dropdown,{className:r,trigger:_jsxs(PathWrapper,{variant:"ghost",children:[_jsx(HttpVerb,{color:e.httpVerb,children:e.httpVerb}),_jsx(Path,{children:e.path})]}),withArrow:!0,children:_jsx(DropdownMenu,{children:i})})};
|
|
2
2
|
//# sourceMappingURL=ServerListDropdown.js.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { DropdownMenuItem } from '@redocly/theme';
|
|
3
2
|
export declare const PathWrapper: import("styled-components").StyledComponent<import("react").FC<import("@redocly/theme").ButtonProps>, any, import("@redocly/theme").ButtonProps, never>;
|
|
4
3
|
export declare const Path: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { TFunction } from '@redocly/theme';
|
|
2
|
+
import type { OperationsNavigationProps } from './types';
|
|
3
|
+
type OperationNavigationItemsProps = OperationsNavigationProps & {
|
|
4
|
+
title: string;
|
|
5
|
+
onClick: (link: string) => void;
|
|
6
|
+
translate: TFunction;
|
|
7
|
+
};
|
|
8
|
+
export declare const OperationNavigationItems: import("react").NamedExoticComponent<OperationNavigationItemsProps>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";import{memo}from"react";import styled from"styled-components";import{joinWithSeparator}from"../../services";import{encodeBackSlashes}from"../../utils";import{HttpVerb,NavigationBadge}from"../common";import{StyledButton}from"./styled";function OperationNavigationItemsComponent({title:e,items:t,onClick:a,routingBasePath:r,translate:o}){return _jsxs(_Fragment,{children:[_jsx(Heading,{children:e}),t.map((({id:e,href:t,httpVerb:i,path:n,deprecated:s,badges:l})=>_jsx(Item,{variant:"outlined",size:"large",onClick:()=>a(joinWithSeparator(r,encodeBackSlashes(t))),children:_jsxs("span",{children:[_jsx(HttpVerb,{color:s?"http-deprecated":i,children:i}),_jsx(Path,{children:n}),s&&_jsx(NavigationBadge,{deprecated:!0,children:o("openapi.badges.deprecated","Deprecated")}),null==l?void 0:l.map((({name:e,color:t})=>_jsx(NavigationBadge,{color:t,children:e},e)))]})},e)))]})}export const OperationNavigationItems=memo(OperationNavigationItemsComponent);const Heading=styled.span`
|
|
2
|
+
font-size: var(--font-size-base);
|
|
3
|
+
line-height: var(--line-height-base);
|
|
4
|
+
font-weight: var(--font-weight-bold);
|
|
5
|
+
color: var(--text-color-primary);
|
|
6
|
+
margin: var(--spacing-sm) 0 var(--spacing-xxs) 0;
|
|
7
|
+
`,Item=styled(StyledButton)`
|
|
8
|
+
border-radius: var(--border-radius);
|
|
9
|
+
background: var(--bg-color);
|
|
10
|
+
justify-content: space-between;
|
|
11
|
+
|
|
12
|
+
& > span {
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: baseline;
|
|
15
|
+
gap: var(--spacing-unit);
|
|
16
|
+
overflow-x: hidden;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&:hover {
|
|
20
|
+
background: var(--bg-color);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&:hover::after {
|
|
24
|
+
content: '→';
|
|
25
|
+
line-height: var(--line-height-base);
|
|
26
|
+
}
|
|
27
|
+
`,Path=styled.span`
|
|
28
|
+
font-family: var(--font-family-base);
|
|
29
|
+
font-size: var(--font-size-base);
|
|
30
|
+
line-height: var(--line-height-base);
|
|
31
|
+
color: var(--text-color-primary);
|
|
32
|
+
text-decoration: none;
|
|
33
|
+
white-space: nowrap;
|
|
34
|
+
text-overflow: ellipsis;
|
|
35
|
+
overflow-x: hidden;
|
|
36
|
+
`;
|
|
37
|
+
//# sourceMappingURL=OperationNavigationItems.js.map
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
import type { OperationMenuItem } from '../../models';
|
|
3
|
-
type OperationsNavigationProps = {
|
|
4
|
-
items: OperationMenuItem[];
|
|
5
|
-
routingBasePath: string;
|
|
6
|
-
};
|
|
1
|
+
import type { OperationsNavigationProps } from './types';
|
|
7
2
|
export declare function OperationsNavigationComponent({ items, routingBasePath, }: OperationsNavigationProps): import("react/jsx-runtime").JSX.Element | null;
|
|
8
3
|
export declare const OperationsNavigation: import("react").NamedExoticComponent<OperationsNavigationProps>;
|
|
9
|
-
export {};
|
|
@@ -1,46 +1,7 @@
|
|
|
1
|
-
import{jsx as _jsx,jsxs as _jsxs
|
|
1
|
+
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{useMemo,memo,useState,useCallback}from"react";import{useNavigate}from"react-router-dom";import{LayoutVariant}from"@redocly/theme";import styled from"styled-components";import{useAtomValue}from"jotai/index";import{SamplesPanel}from"../common";import{layoutAtom}from"../../jotai/app";import{OperationNavigationItems}from"./OperationNavigationItems";import{StyledButton}from"./styled";import{useTranslate}from"../../hooks";const MAX_OPERATIONS=8;export function OperationsNavigationComponent({items:o,routingBasePath:t}){const e=useTranslate(),[a,s]=useState(!1),i=useNavigate(),n=useAtomValue(layoutAtom)===LayoutVariant.STACKED,{operations:r,webhooks:p,count:m}=useMemo((()=>{const t=o.filter((o=>"operation"===o.type)),e=a?t:t.slice(0,MAX_OPERATIONS),{operations:s,webhooks:i}=e.reduce(((o,t)=>t.isWebhook?Object.assign(Object.assign({},o),{webhooks:[...o.webhooks,t]}):Object.assign(Object.assign({},o),{operations:[...o.operations,t]})),{operations:[],webhooks:[]});return{operations:s,webhooks:i,count:!a&&t.length>MAX_OPERATIONS?t.length-MAX_OPERATIONS:0}}),[a,o]),l=useCallback((o=>i(o)),[i]);return r.length||p.length?_jsxs(Wrapper,{isStacked:n,"data-testid":"operation-navigation-list",children:[r.length>0&&_jsx(OperationNavigationItems,{items:r,onClick:l,routingBasePath:t,translate:e,title:e("openapi.operations","Operations")}),p.length>0&&_jsx(OperationNavigationItems,{items:p,onClick:l,routingBasePath:t,translate:e,title:e("openapi.webhooks","Webhooks")}),!a&&Boolean(m)&&_jsxs(StyledButton,{variant:"link",size:"large","data-testid":"show-more-operations",fullWidth:!0,onClick:()=>s(!0),children:[e("openapi.actions.show","Show")," ",m," ",e("openapi.actions.more","more"),"..."]})]}):null}export const OperationsNavigation=memo(OperationsNavigationComponent);const Wrapper=styled(SamplesPanel)`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: var(--spacing-xxs);
|
|
5
5
|
padding-top: var(--spacing-xxl);
|
|
6
|
-
`,Heading=styled.span`
|
|
7
|
-
font-size: var(--font-size-base);
|
|
8
|
-
line-height: var(--line-height-base);
|
|
9
|
-
font-weight: var(--font-weight-bold);
|
|
10
|
-
color: var(--text-color-primary);
|
|
11
|
-
margin: var(--spacing-sm) 0 var(--spacing-xxs) 0;
|
|
12
|
-
`,StyledButton=styled(Button)`
|
|
13
|
-
& + & {
|
|
14
|
-
margin-left: 0;
|
|
15
|
-
}
|
|
16
|
-
`,Item=styled(StyledButton)`
|
|
17
|
-
border-radius: var(--border-radius);
|
|
18
|
-
background: var(--bg-color);
|
|
19
|
-
justify-content: space-between;
|
|
20
|
-
|
|
21
|
-
& > span {
|
|
22
|
-
display: flex;
|
|
23
|
-
align-items: baseline;
|
|
24
|
-
gap: var(--spacing-unit);
|
|
25
|
-
overflow-x: hidden;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
&:hover {
|
|
29
|
-
background: var(--bg-color);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
&:hover::after {
|
|
33
|
-
content: '→';
|
|
34
|
-
line-height: var(--line-height-base);
|
|
35
|
-
}
|
|
36
|
-
`,Path=styled.span`
|
|
37
|
-
font-family: var(--font-family-base);
|
|
38
|
-
font-size: var(--font-size-base);
|
|
39
|
-
line-height: var(--line-height-base);
|
|
40
|
-
color: var(--text-color-primary);
|
|
41
|
-
text-decoration: none;
|
|
42
|
-
white-space: nowrap;
|
|
43
|
-
text-overflow: ellipsis;
|
|
44
|
-
overflow-x: hidden;
|
|
45
6
|
`;
|
|
46
7
|
//# sourceMappingURL=OperationsNavigation.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{memo,useCallback}from"react";import{breakpoints,Button,H2,LayoutVariant,LinkIcon}from"@redocly/theme";import{useNavigate}from"react-router-dom";import styled from"styled-components";import{useAtomValue}from"jotai";import{Row,SamplesMiddlePanel,ShareLink}from"../common";import{Markdown}from"../Markdown";import{OperationsNavigation}from"./OperationsNavigation";import{layoutAtom}from"../../jotai/app";export function TagItemComponent({item:
|
|
1
|
+
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{memo,useCallback}from"react";import{breakpoints,Button,H2,LayoutVariant,LinkIcon}from"@redocly/theme";import{useNavigate}from"react-router-dom";import styled from"styled-components";import{useAtomValue}from"jotai";import{Row,SamplesMiddlePanel,ShareLink}from"../common";import{Markdown}from"../Markdown";import{OperationsNavigation}from"./OperationsNavigation";import{layoutAtom}from"../../jotai/app";import{useTranslate}from"../../hooks";export function TagItemComponent({item:a,routingBasePath:t="",isExpanded:o}){const e=useTranslate(),{description:i,name:n,href:r}=a,s=useNavigate(),m=useAtomValue(layoutAtom),d=useCallback((()=>{s(t+a.href)}),[a.href,s,t]),l=Boolean(a.items.length),p=m===LayoutVariant.STACKED;return _jsxs(Wrapper,{expanded:o,children:[_jsxs(Row,{layout:m,children:[_jsxs(SamplesMiddlePanel,{fullWidth:!l,isStacked:p,children:[_jsxs(Heading,{children:[_jsx(ShareLink,{to:r,"aria-label":`link to ${n}`}),n]}),_jsx(Markdown,{source:i})]}),l&&_jsx(OperationsNavigation,{items:a.items,routingBasePath:t})]}),l&&!o&&_jsxs(ShowButton,{type:"button",variant:"text",size:"medium",onClick:d,children:["+ ",e("openapi.actions.show","Show")]})]})}export const TagItem=memo(TagItemComponent);const Wrapper=styled.div`
|
|
2
2
|
padding-top: var(--spacing-lg);
|
|
3
|
-
padding-bottom: ${({expanded:
|
|
3
|
+
padding-bottom: ${({expanded:a})=>a?"var(--spacing-xxl)":""};
|
|
4
4
|
`,ShowButton=styled(Button)`
|
|
5
5
|
margin: var(--spacing-md) var(--spacing-xl) var(--spacing-xxs);
|
|
6
6
|
width: calc(100% - var(--spacing-xl) * 2);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const StyledButton: import("styled-components").StyledComponent<import("react").FC<import("@redocly/theme").ButtonProps>, any, import("@redocly/theme").ButtonProps, never>;
|
|
@@ -7,7 +7,7 @@ interface CustomBadgesProps {
|
|
|
7
7
|
export declare const CustomBadges: import("react").NamedExoticComponent<PropsWithChildren<CustomBadgesProps>>;
|
|
8
8
|
export declare const StyledBadge: import("styled-components").StyledComponent<typeof Badge, any, {}, never>;
|
|
9
9
|
export declare const NavigationBadge: import("styled-components").StyledComponent<typeof Badge, any, {
|
|
10
|
-
deprecated?: boolean
|
|
11
|
-
color?: string
|
|
10
|
+
deprecated?: boolean;
|
|
11
|
+
color?: string;
|
|
12
12
|
}, never>;
|
|
13
13
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";import{memo}from"react";import styled from"styled-components";import{useAtom}from"jotai";import{LinkIcon}from"@redocly/theme";import{Dropdown}from"../Dropdown";import{RequiredLabel}from"../Fields";import{ConstraintsView}from"../ConstraintsView";import{Schema}from"../../Schema";import{getActiveMediaType}from"../../../models";import{Markdown}from"../../Markdown";import{activeMimeNameAtom}from"../../../jotai/app";import{LinkToField}from"../LinkToField";function BodyContentComponent({required:e,skipReadOnly:o,skipWriteOnly:i,description:t,content:n,deepLink:r}){const
|
|
1
|
+
import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";import{memo}from"react";import styled from"styled-components";import{useAtom}from"jotai";import{LinkIcon}from"@redocly/theme";import{Dropdown}from"../Dropdown";import{RequiredLabel}from"../Fields";import{ConstraintsView}from"../ConstraintsView";import{Schema}from"../../Schema";import{getActiveMediaType}from"../../../models";import{Markdown}from"../../Markdown";import{activeMimeNameAtom}from"../../../jotai/app";import{LinkToField}from"../LinkToField";import{useTranslate}from"../../../hooks";function BodyContentComponent({required:e,skipReadOnly:o,skipWriteOnly:i,description:t,content:n,deepLink:r}){const a=useTranslate(),[s,m]=useAtom(activeMimeNameAtom);if(!n)return null;const{schema:l,examples:p,operation:d,name:c}=getActiveMediaType(n,s),g=n.mediaTypes.map((({name:e})=>({label:e,value:e})));return _jsxs(_Fragment,{children:[_jsxs(Title,{children:[r&&_jsx(LinkToField,{to:r}),a("openapi.body","Body"),_jsx(Dropdown,{options:g,value:c,triggerVariant:"ghost",triggerSize:"large",onChange:({value:e})=>m(e)})]}),e&&_jsx(RequiredLabel,{children:a("openapi.badges.required","required")}),_jsx(StyledMarkdown,{source:t}),"object"===(null==l?void 0:l.type)&&(null==l?void 0:l.constraints)&&_jsx(ConstraintsView,{constraints:(null==l?void 0:l.constraints)||[]}),_jsx(Schema,{skipReadOnly:o,skipWriteOnly:i,schema:l,examples:p,operation:d,level:1,disableDeepLinks:!r},"schema")]})}export const BodyContent=memo(BodyContentComponent);const StyledMarkdown=styled(Markdown)`
|
|
2
2
|
margin: var(--spacing-xxs) 0 0;
|
|
3
3
|
`,Title=styled.span`
|
|
4
4
|
position: relative;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import styled from"styled-components";import{Button}from"@redocly/theme";import{useMemo,useState}from"react";import{Markdown}from"../../Markdown";import{ExampleValue}from"../Fields";const MAX_EXAMPLE_LENGTH=150;export function ExpandableExample({value:e}){const[
|
|
1
|
+
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import styled from"styled-components";import{Button}from"@redocly/theme";import{useMemo,useState}from"react";import{Markdown}from"../../Markdown";import{ExampleValue}from"../Fields";import{useTranslate}from"../../../hooks";const MAX_EXAMPLE_LENGTH=150;export function ExpandableExample({value:e}){const s=useTranslate(),[o,a]=useState(!1),t=useMemo((()=>e.slice(0,MAX_EXAMPLE_LENGTH)),[e]);return _jsxs(Container,{children:[_jsx(Markdown,{source:o?e:t}),(e!==t||o)&&_jsx(ButtonWrap,{children:_jsx(Button,{variant:"link",size:"small",onClick:()=>{a(!o)},children:o?s("openapi.hideExample","Hide example"):s("openapi.showExample","Show example")})})]})}const Container=styled(ExampleValue)`
|
|
2
2
|
display: inline;
|
|
3
3
|
|
|
4
4
|
& * {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export declare const getCssVariable: (variable: string) => string;
|
|
2
2
|
export declare const PropertiesTableCaption: import("styled-components").StyledComponent<"caption", any, {}, never>;
|
|
3
3
|
export declare const PropertyCell: import("styled-components").StyledComponent<"td", any, {
|
|
4
|
-
kind?: string
|
|
4
|
+
kind?: string;
|
|
5
5
|
}, never>;
|
|
6
6
|
export declare const PropertyCellWithInner: import("styled-components").StyledComponent<"td", any, {
|
|
7
|
-
kind?: string
|
|
7
|
+
kind?: string;
|
|
8
8
|
}, never>;
|
|
9
9
|
export declare const PropertyNameCell: import("styled-components").StyledComponent<"td", any, {
|
|
10
|
-
kind?: string
|
|
10
|
+
kind?: string;
|
|
11
11
|
}, never>;
|
|
12
12
|
export declare const PropertyDetailsCell: import("styled-components").StyledComponent<"td", any, {}, never>;
|
|
13
13
|
export declare const PropertyBullet: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export declare const FieldLabel: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
3
2
|
export declare const TypePrefix: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
4
3
|
export declare const TypeName: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
@@ -36,4 +35,4 @@ export declare const ConstraintItem: import("styled-components").StyledComponent
|
|
|
36
35
|
export declare const ToggleButton: import("styled-components").StyledComponent<import("react").FC<import("@redocly/theme").ButtonProps>, any, import("@redocly/theme").ButtonProps & {
|
|
37
36
|
variant: "link";
|
|
38
37
|
size: "small";
|
|
39
|
-
}, "
|
|
38
|
+
}, "size" | "variant">;
|
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import type { SelectProps } from './types';
|
|
3
2
|
export declare const Select: import("styled-components").StyledComponent<import("react").NamedExoticComponent<SelectProps>, any, SelectProps & {
|
|
4
|
-
fullWidth?: boolean
|
|
5
|
-
variant?: "dark" | "light"
|
|
3
|
+
fullWidth?: boolean;
|
|
4
|
+
variant?: "dark" | "light";
|
|
6
5
|
}, never>;
|
|
7
6
|
export declare const SimpleSelect: import("styled-components").StyledComponent<import("react").NamedExoticComponent<SelectProps>, any, SelectProps & {
|
|
8
|
-
fullWidth?: boolean
|
|
9
|
-
variant?: "dark" | "light"
|
|
7
|
+
fullWidth?: boolean;
|
|
8
|
+
variant?: "dark" | "light";
|
|
10
9
|
}, never>;
|
|
11
10
|
export declare const CollapsingSelect: import("styled-components").StyledComponent<import("react").NamedExoticComponent<SelectProps>, any, SelectProps & {
|
|
12
|
-
fullWidth?: boolean
|
|
13
|
-
variant?: "dark" | "light"
|
|
11
|
+
fullWidth?: boolean;
|
|
12
|
+
variant?: "dark" | "light";
|
|
14
13
|
} & {
|
|
15
|
-
active?: boolean
|
|
14
|
+
active?: boolean;
|
|
16
15
|
}, never>;
|
|
17
|
-
export declare const Arrow: import("styled-components").StyledComponent<(props: import("@redocly/theme/lib/icons/types").IconProps) =>
|
|
16
|
+
export declare const Arrow: import("styled-components").StyledComponent<(props: import("@redocly/theme/lib/icons/types").IconProps) => React.JSX.Element, any, {
|
|
18
17
|
'data-component-name': string;
|
|
19
18
|
} & {
|
|
20
|
-
color?: string
|
|
21
|
-
size?: string
|
|
22
|
-
className?: string
|
|
19
|
+
color?: string;
|
|
20
|
+
size?: string;
|
|
21
|
+
className?: string;
|
|
23
22
|
} & import("react").SVGProps<SVGSVGElement>, "data-component-name">;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { LayoutVariant } from '@redocly/theme';
|
|
2
2
|
export declare const SamplesMiddlePanel: import("styled-components").StyledComponent<"div", any, {
|
|
3
|
-
compact?: boolean
|
|
4
|
-
isStacked?: boolean
|
|
5
|
-
fullWidth?: boolean
|
|
3
|
+
compact?: boolean;
|
|
4
|
+
isStacked?: boolean;
|
|
5
|
+
fullWidth?: boolean;
|
|
6
6
|
}, never>;
|
|
7
7
|
export declare const Section: import("styled-components").StyledComponent<"div", any, {
|
|
8
|
-
underlined?: boolean
|
|
9
|
-
sectionId?: string
|
|
10
|
-
expanded?: boolean
|
|
8
|
+
underlined?: boolean;
|
|
9
|
+
sectionId?: string;
|
|
10
|
+
expanded?: boolean;
|
|
11
11
|
}, never>;
|
|
12
12
|
export declare const SamplesPanel: import("styled-components").StyledComponent<"div", any, {
|
|
13
13
|
isStacked: boolean;
|
|
14
14
|
}, never>;
|
|
15
15
|
export declare const Row: import("styled-components").StyledComponent<"div", any, {
|
|
16
|
-
layout?: LayoutVariant
|
|
16
|
+
layout?: LayoutVariant;
|
|
17
17
|
}, never>;
|
|
@@ -10,7 +10,7 @@ import{H2,LayoutVariant,breakpoints,Markdown}from"@redocly/theme";import styled,
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
@media screen and (min-width: ${breakpoints.large}) {
|
|
13
|
-
width: ${t?"100%":"calc(100% - var(--panel-samples-width))"};
|
|
13
|
+
width: ${t||i?"100%":"calc(100% - var(--panel-samples-width))"};
|
|
14
14
|
padding-left: ${i?"var(--panel-gap-horizontal)":"calc(var(--panel-gap-horizontal) * 2)"};
|
|
15
15
|
padding-right: ${i?"var(--panel-gap-vertical)":"var(--panel-gap-horizontal)"};
|
|
16
16
|
padding-top: 0;
|
|
@@ -93,7 +93,7 @@ import{H2,LayoutVariant,breakpoints,Markdown}from"@redocly/theme";import styled,
|
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
@media screen and (min-width: ${breakpoints.large}) {
|
|
96
|
-
width: var(--panel-samples-width);
|
|
96
|
+
width: ${({isStacked:a})=>a?"100%":"var(--panel-samples-width)"};
|
|
97
97
|
padding-top: 0;
|
|
98
98
|
padding-bottom: 0;
|
|
99
99
|
padding-left: ${({isStacked:a})=>a?"var(--panel-gap-vertical)":"var(--panel-gap-horizontal)"};
|