@scalar/api-reference 1.49.2 → 1.49.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/dist/_virtual/_plugin-vue_export-helper.js +8 -0
- package/dist/blocks/index.js +4 -2
- package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js +9 -0
- package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js.map +1 -0
- package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.script.js +106 -0
- package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.script.js.map +1 -0
- package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.js +9 -0
- package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.js.map +1 -0
- package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.script.js +121 -0
- package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.script.js.map +1 -0
- package/dist/blocks/scalar-client-selector-block/helpers/featured-clients.js +27 -0
- package/dist/blocks/scalar-client-selector-block/helpers/featured-clients.js.map +1 -0
- package/dist/blocks/scalar-client-selector-block/index.d.ts +1 -1
- package/dist/blocks/scalar-info-block/components/DownloadLink.vue.js +9 -0
- package/dist/blocks/scalar-info-block/components/DownloadLink.vue.js.map +1 -0
- package/dist/blocks/scalar-info-block/components/DownloadLink.vue.script.js +55 -0
- package/dist/blocks/scalar-info-block/components/DownloadLink.vue.script.js.map +1 -0
- package/dist/blocks/scalar-info-block/components/InfoBlock.vue.js +7 -0
- package/dist/blocks/scalar-info-block/components/InfoBlock.vue.js.map +1 -0
- package/dist/blocks/scalar-info-block/components/InfoBlock.vue.script.js +69 -0
- package/dist/blocks/scalar-info-block/components/InfoBlock.vue.script.js.map +1 -0
- package/dist/blocks/scalar-info-block/components/InfoDescription.vue.js +9 -0
- package/dist/blocks/scalar-info-block/components/InfoDescription.vue.js.map +1 -0
- package/dist/blocks/scalar-info-block/components/InfoDescription.vue.script.js +68 -0
- package/dist/blocks/scalar-info-block/components/InfoDescription.vue.script.js.map +1 -0
- package/dist/blocks/scalar-info-block/components/InfoLinks.vue.js +7 -0
- package/dist/blocks/scalar-info-block/components/InfoLinks.vue.js.map +1 -0
- package/dist/blocks/scalar-info-block/components/InfoLinks.vue.script.js +40 -0
- package/dist/blocks/scalar-info-block/components/InfoLinks.vue.script.js.map +1 -0
- package/dist/blocks/scalar-info-block/components/InfoMarkdownSection.vue.js +7 -0
- package/dist/blocks/scalar-info-block/components/InfoMarkdownSection.vue.js.map +1 -0
- package/dist/blocks/scalar-info-block/components/InfoMarkdownSection.vue.script.js +35 -0
- package/dist/blocks/scalar-info-block/components/InfoMarkdownSection.vue.script.js.map +1 -0
- package/dist/blocks/scalar-info-block/components/InfoVersion.vue.js +7 -0
- package/dist/blocks/scalar-info-block/components/InfoVersion.vue.js.map +1 -0
- package/dist/blocks/scalar-info-block/components/InfoVersion.vue.script.js +25 -0
- package/dist/blocks/scalar-info-block/components/InfoVersion.vue.script.js.map +1 -0
- package/dist/blocks/scalar-info-block/components/IntroductionCard.vue.js +9 -0
- package/dist/blocks/scalar-info-block/components/IntroductionCard.vue.js.map +1 -0
- package/dist/blocks/scalar-info-block/components/IntroductionCard.vue.script.js +15 -0
- package/dist/blocks/scalar-info-block/components/IntroductionCard.vue.script.js.map +1 -0
- package/dist/blocks/scalar-info-block/components/IntroductionCardItem.vue.js +14 -0
- package/dist/blocks/scalar-info-block/components/IntroductionCardItem.vue.js.map +1 -0
- package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.js +9 -0
- package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.js.map +1 -0
- package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.script.js +92 -0
- package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.script.js.map +1 -0
- package/dist/blocks/scalar-info-block/components/OpenApiVersion.vue.js +7 -0
- package/dist/blocks/scalar-info-block/components/OpenApiVersion.vue.js.map +1 -0
- package/dist/blocks/scalar-info-block/components/OpenApiVersion.vue.script.js +19 -0
- package/dist/blocks/scalar-info-block/components/OpenApiVersion.vue.script.js.map +1 -0
- package/dist/blocks/scalar-info-block/index.d.ts +2 -2
- package/dist/blocks/scalar-server-selector-block/components/Selector.vue.js +7 -0
- package/dist/blocks/scalar-server-selector-block/components/Selector.vue.js.map +1 -0
- package/dist/blocks/scalar-server-selector-block/components/Selector.vue.script.js +71 -0
- package/dist/blocks/scalar-server-selector-block/components/Selector.vue.script.js.map +1 -0
- package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.js +7 -0
- package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.js.map +1 -0
- package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.script.js +69 -0
- package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.script.js.map +1 -0
- package/dist/blocks/scalar-server-selector-block/index.d.ts +1 -1
- package/dist/browser/standalone.js +35377 -34973
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/AgentScalar/AgentScalarButton.vue.js +7 -0
- package/dist/components/AgentScalar/AgentScalarButton.vue.js.map +1 -0
- package/dist/components/AgentScalar/AgentScalarButton.vue.script.js +21 -0
- package/dist/components/AgentScalar/AgentScalarButton.vue.script.js.map +1 -0
- package/dist/components/AgentScalar/AgentScalarChatInterface.vue.js +7 -0
- package/dist/components/AgentScalar/AgentScalarChatInterface.vue.js.map +1 -0
- package/dist/{AgentScalarChatInterface-MUbtSqMw.js → components/AgentScalar/AgentScalarChatInterface.vue.script.js} +5 -6
- package/dist/components/AgentScalar/AgentScalarChatInterface.vue.script.js.map +1 -0
- package/dist/components/AgentScalar/AgentScalarDrawer.vue.d.ts +0 -1
- package/dist/components/AgentScalar/AgentScalarDrawer.vue.d.ts.map +1 -1
- package/dist/components/AgentScalar/AgentScalarDrawer.vue.js +9 -0
- package/dist/components/AgentScalar/AgentScalarDrawer.vue.js.map +1 -0
- package/dist/components/AgentScalar/AgentScalarDrawer.vue.script.js +65 -0
- package/dist/components/AgentScalar/AgentScalarDrawer.vue.script.js.map +1 -0
- package/dist/components/AgentScalar/OpenMCPButton.vue.js +9 -0
- package/dist/components/AgentScalar/OpenMCPButton.vue.js.map +1 -0
- package/dist/components/AgentScalar/OpenMCPButton.vue.script.js +184 -0
- package/dist/components/AgentScalar/OpenMCPButton.vue.script.js.map +1 -0
- package/dist/components/AgentScalar/index.d.ts +3 -3
- package/dist/components/Anchor/Anchor.vue.js +7 -0
- package/dist/components/Anchor/Anchor.vue.js.map +1 -0
- package/dist/components/Anchor/Anchor.vue.script.js +40 -0
- package/dist/components/Anchor/Anchor.vue.script.js.map +1 -0
- package/dist/components/Anchor/WithBreadcrumb.vue.js +7 -0
- package/dist/components/Anchor/WithBreadcrumb.vue.js.map +1 -0
- package/dist/components/Anchor/WithBreadcrumb.vue.script.js +32 -0
- package/dist/components/Anchor/WithBreadcrumb.vue.script.js.map +1 -0
- package/dist/components/Anchor/index.d.ts +2 -2
- package/dist/components/ApiReference.vue.d.ts.map +1 -1
- package/dist/components/ApiReference.vue.js +12 -0
- package/dist/components/ApiReference.vue.js.map +1 -0
- package/dist/components/ApiReference.vue.script.js +662 -0
- package/dist/components/ApiReference.vue.script.js.map +1 -0
- package/dist/components/Badge/Badge.vue.js +9 -0
- package/dist/components/Badge/Badge.vue.js.map +1 -0
- package/dist/components/Badge/Badge.vue.script.js +22 -0
- package/dist/components/Badge/Badge.vue.script.js.map +1 -0
- package/dist/components/Badge/index.d.ts +1 -1
- package/dist/components/ClassicHeader.vue.js +16 -0
- package/dist/components/ClassicHeader.vue.js.map +1 -0
- package/dist/components/Content/Auth/Auth.vue.js +7 -0
- package/dist/components/Content/Auth/Auth.vue.js.map +1 -0
- package/dist/components/Content/Auth/Auth.vue.script.js +70 -0
- package/dist/components/Content/Auth/Auth.vue.script.js.map +1 -0
- package/dist/components/Content/Auth/helpers/get-default-security.js +64 -0
- package/dist/components/Content/Auth/helpers/get-default-security.js.map +1 -0
- package/dist/components/Content/Auth/index.d.ts +1 -1
- package/dist/components/Content/Content.vue.js +8 -0
- package/dist/components/Content/Content.vue.js.map +1 -0
- package/dist/components/Content/Content.vue.script.js +192 -0
- package/dist/components/Content/Content.vue.script.js.map +1 -0
- package/dist/components/Content/Models/Model.vue.js +7 -0
- package/dist/components/Content/Models/Model.vue.js.map +1 -0
- package/dist/components/Content/Models/Model.vue.script.js +61 -0
- package/dist/components/Content/Models/Model.vue.script.js.map +1 -0
- package/dist/components/Content/Models/ModelTag.vue.js +7 -0
- package/dist/components/Content/Models/ModelTag.vue.js.map +1 -0
- package/dist/components/Content/Models/ModelTag.vue.script.js +69 -0
- package/dist/components/Content/Models/ModelTag.vue.script.js.map +1 -0
- package/dist/components/Content/Models/components/ClassicLayout.vue.js +9 -0
- package/dist/components/Content/Models/components/ClassicLayout.vue.js.map +1 -0
- package/dist/components/Content/Models/components/ClassicLayout.vue.script.js +81 -0
- package/dist/components/Content/Models/components/ClassicLayout.vue.script.js.map +1 -0
- package/dist/components/Content/Models/components/ModernLayout.vue.js +7 -0
- package/dist/components/Content/Models/components/ModernLayout.vue.js.map +1 -0
- package/dist/components/Content/Models/components/ModernLayout.vue.script.js +66 -0
- package/dist/components/Content/Models/components/ModernLayout.vue.script.js.map +1 -0
- package/dist/components/Content/Models/index.d.ts +2 -2
- package/dist/components/Content/Operations/TraversedEntry.vue.js +7 -0
- package/dist/components/Content/Operations/TraversedEntry.vue.js.map +1 -0
- package/dist/components/Content/Operations/TraversedEntry.vue.script.js +213 -0
- package/dist/components/Content/Operations/TraversedEntry.vue.script.js.map +1 -0
- package/dist/components/Content/Schema/RenderString.vue.js +7 -0
- package/dist/components/Content/Schema/RenderString.vue.js.map +1 -0
- package/dist/components/Content/Schema/RenderString.vue.script.js +36 -0
- package/dist/components/Content/Schema/RenderString.vue.script.js.map +1 -0
- package/dist/components/Content/Schema/Schema.vue.d.ts +1 -1
- package/dist/components/Content/Schema/Schema.vue.js +9 -0
- package/dist/components/Content/Schema/Schema.vue.js.map +1 -0
- package/dist/components/Content/Schema/Schema.vue.script.js +184 -0
- package/dist/components/Content/Schema/Schema.vue.script.js.map +1 -0
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts +2 -2
- package/dist/components/Content/Schema/SchemaComposition.vue.js +7 -0
- package/dist/components/Content/Schema/SchemaComposition.vue.js.map +1 -0
- package/dist/components/Content/Schema/SchemaComposition.vue.script.js +146 -0
- package/dist/components/Content/Schema/SchemaComposition.vue.script.js.map +1 -0
- package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.js +9 -0
- package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.js.map +1 -0
- package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.script.js +29 -0
- package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.script.js.map +1 -0
- package/dist/components/Content/Schema/SchemaEnums.vue.js +9 -0
- package/dist/components/Content/Schema/SchemaEnums.vue.js.map +1 -0
- package/dist/components/Content/Schema/SchemaEnums.vue.script.js +108 -0
- package/dist/components/Content/Schema/SchemaEnums.vue.script.js.map +1 -0
- package/dist/components/Content/Schema/SchemaHeading.vue.js +9 -0
- package/dist/components/Content/Schema/SchemaHeading.vue.js.map +1 -0
- package/dist/components/Content/Schema/SchemaHeading.vue.script.js +45 -0
- package/dist/components/Content/Schema/SchemaHeading.vue.script.js.map +1 -0
- package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.js +7 -0
- package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.js.map +1 -0
- package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.script.js +55 -0
- package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.script.js.map +1 -0
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts +1 -1
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.js +7 -0
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.js.map +1 -0
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.script.js +161 -0
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.script.js.map +1 -0
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.js +9 -0
- package/dist/components/Content/Schema/SchemaProperty.vue.js.map +1 -0
- package/dist/components/Content/Schema/SchemaProperty.vue.script.js +256 -0
- package/dist/components/Content/Schema/SchemaProperty.vue.script.js.map +1 -0
- package/dist/components/Content/Schema/SchemaPropertyDefault.vue.js +9 -0
- package/dist/components/Content/Schema/SchemaPropertyDefault.vue.js.map +1 -0
- package/dist/components/Content/Schema/SchemaPropertyDefault.vue.script.js +35 -0
- package/dist/components/Content/Schema/SchemaPropertyDefault.vue.script.js.map +1 -0
- package/dist/components/Content/Schema/SchemaPropertyDetail.vue.js +9 -0
- package/dist/components/Content/Schema/SchemaPropertyDetail.vue.js.map +1 -0
- package/dist/components/Content/Schema/SchemaPropertyDetail.vue.script.js +30 -0
- package/dist/components/Content/Schema/SchemaPropertyDetail.vue.script.js.map +1 -0
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js +9 -0
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js.map +1 -0
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.script.js +67 -0
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.script.js.map +1 -0
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +9 -0
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js.map +1 -0
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.script.js +251 -0
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.script.js.map +1 -0
- package/dist/components/Content/Schema/helpers/format-example.js +26 -0
- package/dist/components/Content/Schema/helpers/format-example.js.map +1 -0
- package/dist/components/Content/Schema/helpers/format-value.js +22 -0
- package/dist/components/Content/Schema/helpers/format-value.js.map +1 -0
- package/dist/components/Content/Schema/helpers/get-compositions-to-render.d.ts +1 -1
- package/dist/components/Content/Schema/helpers/get-compositions-to-render.js +32 -0
- package/dist/components/Content/Schema/helpers/get-compositions-to-render.js.map +1 -0
- package/dist/components/Content/Schema/helpers/get-enum-values.js +22 -0
- package/dist/components/Content/Schema/helpers/get-enum-values.js.map +1 -0
- package/dist/components/Content/Schema/helpers/get-property-description.js +36 -0
- package/dist/components/Content/Schema/helpers/get-property-description.js.map +1 -0
- package/dist/components/Content/Schema/helpers/get-ref-name.js +19 -0
- package/dist/components/Content/Schema/helpers/get-ref-name.js.map +1 -0
- package/dist/components/Content/Schema/helpers/get-schema-type.js +49 -0
- package/dist/components/Content/Schema/helpers/get-schema-type.js.map +1 -0
- package/dist/components/Content/Schema/helpers/has-complex-array-items.js +53 -0
- package/dist/components/Content/Schema/helpers/has-complex-array-items.js.map +1 -0
- package/dist/components/Content/Schema/helpers/is-empty-schema-object.js +18 -0
- package/dist/components/Content/Schema/helpers/is-empty-schema-object.js.map +1 -0
- package/dist/components/Content/Schema/helpers/is-type-object.js +18 -0
- package/dist/components/Content/Schema/helpers/is-type-object.js.map +1 -0
- package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +175 -0
- package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js.map +1 -0
- package/dist/components/Content/Schema/helpers/optimize-value-for-display.js +68 -0
- package/dist/components/Content/Schema/helpers/optimize-value-for-display.js.map +1 -0
- package/dist/components/Content/Schema/helpers/schema-composition.js +11 -0
- package/dist/components/Content/Schema/helpers/schema-composition.js.map +1 -0
- package/dist/components/Content/Schema/helpers/schema-name.js +23 -0
- package/dist/components/Content/Schema/helpers/schema-name.js.map +1 -0
- package/dist/components/Content/Schema/helpers/should-display-description.js +17 -0
- package/dist/components/Content/Schema/helpers/should-display-description.js.map +1 -0
- package/dist/components/Content/Schema/helpers/should-display-heading.js +18 -0
- package/dist/components/Content/Schema/helpers/should-display-heading.js.map +1 -0
- package/dist/components/Content/Schema/helpers/should-render-array-item-composition.js +20 -0
- package/dist/components/Content/Schema/helpers/should-render-array-item-composition.js.map +1 -0
- package/dist/components/Content/Schema/helpers/sort-property-names.js +45 -0
- package/dist/components/Content/Schema/helpers/sort-property-names.js.map +1 -0
- package/dist/components/Content/Schema/index.d.ts +4 -4
- package/dist/components/Content/Tags/Tag.vue.js +7 -0
- package/dist/components/Content/Tags/Tag.vue.js.map +1 -0
- package/dist/components/Content/Tags/Tag.vue.script.js +56 -0
- package/dist/components/Content/Tags/Tag.vue.script.js.map +1 -0
- package/dist/components/Content/Tags/components/ClassicLayout.vue.js +9 -0
- package/dist/components/Content/Tags/components/ClassicLayout.vue.js.map +1 -0
- package/dist/components/Content/Tags/components/ClassicLayout.vue.script.js +49 -0
- package/dist/components/Content/Tags/components/ClassicLayout.vue.script.js.map +1 -0
- package/dist/components/Content/Tags/components/ModernLayout.vue.js +9 -0
- package/dist/components/Content/Tags/components/ModernLayout.vue.js.map +1 -0
- package/dist/components/Content/Tags/components/ModernLayout.vue.script.js +63 -0
- package/dist/components/Content/Tags/components/ModernLayout.vue.script.js.map +1 -0
- package/dist/components/Content/Tags/components/TagSection.vue.js +7 -0
- package/dist/components/Content/Tags/components/TagSection.vue.js.map +1 -0
- package/dist/components/Content/Tags/components/TagSection.vue.script.js +78 -0
- package/dist/components/Content/Tags/components/TagSection.vue.script.js.map +1 -0
- package/dist/components/Content/Tags/index.d.ts +1 -1
- package/dist/components/Content/index.d.ts +2 -2
- package/dist/components/GettingStarted.vue.js +9 -0
- package/dist/components/GettingStarted.vue.js.map +1 -0
- package/dist/components/GettingStarted.vue.script.js +71 -0
- package/dist/components/GettingStarted.vue.script.js.map +1 -0
- package/dist/components/HttpMethod/HttpMethod.vue.js +7 -0
- package/dist/components/HttpMethod/HttpMethod.vue.js.map +1 -0
- package/dist/components/HttpMethod/HttpMethod.vue.script.js +33 -0
- package/dist/components/HttpMethod/HttpMethod.vue.script.js.map +1 -0
- package/dist/components/HttpMethod/index.d.ts +1 -1
- package/dist/components/IntersectionObserver.vue.js +7 -0
- package/dist/components/IntersectionObserver.vue.js.map +1 -0
- package/dist/components/IntersectionObserver.vue.script.js +45 -0
- package/dist/components/IntersectionObserver.vue.script.js.map +1 -0
- package/dist/components/Lazy/Lazy.vue.js +7 -0
- package/dist/components/Lazy/Lazy.vue.js.map +1 -0
- package/dist/components/Lazy/Lazy.vue.script.js +101 -0
- package/dist/components/Lazy/Lazy.vue.script.js.map +1 -0
- package/dist/components/LinkList/LinkList.vue.js +9 -0
- package/dist/components/LinkList/LinkList.vue.js.map +1 -0
- package/dist/components/LinkList/LinkList.vue.script.js +53 -0
- package/dist/components/LinkList/LinkList.vue.script.js.map +1 -0
- package/dist/components/LinkList/index.d.ts +1 -1
- package/dist/components/LoadingSkeleton.vue.js +9 -0
- package/dist/components/LoadingSkeleton.vue.js.map +1 -0
- package/dist/components/LoadingSkeleton.vue.script.js +20 -0
- package/dist/components/LoadingSkeleton.vue.script.js.map +1 -0
- package/dist/components/MobileHeader.vue.d.ts.map +1 -1
- package/dist/components/MobileHeader.vue.js +7 -0
- package/dist/components/MobileHeader.vue.js.map +1 -0
- package/dist/components/MobileHeader.vue.script.js +43 -0
- package/dist/components/MobileHeader.vue.script.js.map +1 -0
- package/dist/components/OperationPath.vue.js +9 -0
- package/dist/components/OperationPath.vue.js.map +1 -0
- package/dist/components/OperationPath.vue.script.js +24 -0
- package/dist/components/OperationPath.vue.script.js.map +1 -0
- package/dist/components/OperationsList/OperationsList.vue.js +9 -0
- package/dist/components/OperationsList/OperationsList.vue.js.map +1 -0
- package/dist/components/OperationsList/OperationsList.vue.script.js +49 -0
- package/dist/components/OperationsList/OperationsList.vue.script.js.map +1 -0
- package/dist/components/OperationsList/OperationsListItem.vue.js +9 -0
- package/dist/components/OperationsList/OperationsListItem.vue.js.map +1 -0
- package/dist/components/OperationsList/OperationsListItem.vue.script.js +51 -0
- package/dist/components/OperationsList/OperationsListItem.vue.script.js.map +1 -0
- package/dist/components/OperationsList/index.d.ts +1 -1
- package/dist/components/RenderPlugins/RenderPlugins.vue.js +7 -0
- package/dist/components/RenderPlugins/RenderPlugins.vue.js.map +1 -0
- package/dist/components/RenderPlugins/RenderPlugins.vue.script.js +44 -0
- package/dist/components/RenderPlugins/RenderPlugins.vue.script.js.map +1 -0
- package/dist/components/RenderPlugins/index.d.ts +1 -1
- package/dist/components/ScreenReader.vue.js +9 -0
- package/dist/components/ScreenReader.vue.js.map +1 -0
- package/dist/components/ScreenReader.vue.script.js +22 -0
- package/dist/components/ScreenReader.vue.script.js.map +1 -0
- package/dist/components/Section/CompactSection.vue.js +9 -0
- package/dist/components/Section/CompactSection.vue.js.map +1 -0
- package/dist/components/Section/CompactSection.vue.script.js +56 -0
- package/dist/components/Section/CompactSection.vue.script.js.map +1 -0
- package/dist/components/Section/Section.vue.js +9 -0
- package/dist/components/Section/Section.vue.js.map +1 -0
- package/dist/components/Section/Section.vue.script.js +23 -0
- package/dist/components/Section/Section.vue.script.js.map +1 -0
- package/dist/components/Section/SectionAccordion.vue.js +9 -0
- package/dist/components/Section/SectionAccordion.vue.js.map +1 -0
- package/dist/components/Section/SectionAccordion.vue.script.js +60 -0
- package/dist/components/Section/SectionAccordion.vue.script.js.map +1 -0
- package/dist/components/Section/SectionColumn.vue.js +14 -0
- package/dist/components/Section/SectionColumn.vue.js.map +1 -0
- package/dist/components/Section/SectionColumns.vue.js +14 -0
- package/dist/components/Section/SectionColumns.vue.js.map +1 -0
- package/dist/components/Section/SectionContainer.vue.js +9 -0
- package/dist/components/Section/SectionContainer.vue.js.map +1 -0
- package/dist/components/Section/SectionContainer.vue.script.js +19 -0
- package/dist/components/Section/SectionContainer.vue.script.js.map +1 -0
- package/dist/components/Section/SectionContainerAccordion.vue.js +9 -0
- package/dist/components/Section/SectionContainerAccordion.vue.js.map +1 -0
- package/dist/components/Section/SectionContainerAccordion.vue.script.js +40 -0
- package/dist/components/Section/SectionContainerAccordion.vue.script.js.map +1 -0
- package/dist/components/Section/SectionContent.vue.js +9 -0
- package/dist/components/Section/SectionContent.vue.js.map +1 -0
- package/dist/components/Section/SectionContent.vue.script.js +23 -0
- package/dist/components/Section/SectionContent.vue.script.js.map +1 -0
- package/dist/components/Section/SectionHeader.vue.js +9 -0
- package/dist/components/Section/SectionHeader.vue.js.map +1 -0
- package/dist/components/Section/SectionHeader.vue.script.js +23 -0
- package/dist/components/Section/SectionHeader.vue.script.js.map +1 -0
- package/dist/components/Section/SectionHeaderTag.vue.js +9 -0
- package/dist/components/Section/SectionHeaderTag.vue.js.map +1 -0
- package/dist/components/Section/SectionHeaderTag.vue.script.js +18 -0
- package/dist/components/Section/SectionHeaderTag.vue.script.js.map +1 -0
- package/dist/components/Section/index.d.ts +10 -10
- package/dist/components/SectionFlare/SectionFlare.vue.js +14 -0
- package/dist/components/SectionFlare/SectionFlare.vue.js.map +1 -0
- package/dist/components/SectionFlare/index.d.ts +1 -1
- package/dist/components/ShowMoreButton.vue.js +9 -0
- package/dist/components/ShowMoreButton.vue.js.map +1 -0
- package/dist/components/ShowMoreButton.vue.script.js +22 -0
- package/dist/components/ShowMoreButton.vue.script.js.map +1 -0
- package/dist/components/index.d.ts +5 -5
- package/dist/components/index.js +20 -102
- package/dist/{urls-gPTXGgbj.js → consts/urls.js} +2 -2
- package/dist/consts/urls.js.map +1 -0
- package/dist/features/Operation/Operation.vue.js +7 -0
- package/dist/features/Operation/Operation.vue.js.map +1 -0
- package/dist/features/Operation/Operation.vue.script.js +115 -0
- package/dist/features/Operation/Operation.vue.script.js.map +1 -0
- package/dist/features/Operation/components/ContentTypeSelect.vue.js +7 -0
- package/dist/features/Operation/components/ContentTypeSelect.vue.js.map +1 -0
- package/dist/features/Operation/components/ContentTypeSelect.vue.script.js +75 -0
- package/dist/features/Operation/components/ContentTypeSelect.vue.script.js.map +1 -0
- package/dist/features/Operation/components/Header.vue.js +7 -0
- package/dist/features/Operation/components/Header.vue.js.map +1 -0
- package/dist/features/Operation/components/Header.vue.script.js +42 -0
- package/dist/features/Operation/components/Header.vue.script.js.map +1 -0
- package/dist/features/Operation/components/Headers.vue.js +9 -0
- package/dist/features/Operation/components/Headers.vue.js.map +1 -0
- package/dist/features/Operation/components/Headers.vue.script.js +58 -0
- package/dist/features/Operation/components/Headers.vue.script.js.map +1 -0
- package/dist/features/Operation/components/OperationParameters.vue.d.ts +1 -1
- package/dist/features/Operation/components/OperationParameters.vue.js +7 -0
- package/dist/features/Operation/components/OperationParameters.vue.js.map +1 -0
- package/dist/features/Operation/components/OperationParameters.vue.script.js +108 -0
- package/dist/features/Operation/components/OperationParameters.vue.script.js.map +1 -0
- package/dist/features/Operation/components/OperationResponses.vue.d.ts +1 -1
- package/dist/features/Operation/components/OperationResponses.vue.js +7 -0
- package/dist/features/Operation/components/OperationResponses.vue.js.map +1 -0
- package/dist/features/Operation/components/OperationResponses.vue.script.js +48 -0
- package/dist/features/Operation/components/OperationResponses.vue.script.js.map +1 -0
- package/dist/features/Operation/components/ParameterList.vue.d.ts +1 -1
- package/dist/features/Operation/components/ParameterList.vue.js +7 -0
- package/dist/features/Operation/components/ParameterList.vue.js.map +1 -0
- package/dist/features/Operation/components/ParameterList.vue.script.js +53 -0
- package/dist/features/Operation/components/ParameterList.vue.script.js.map +1 -0
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.js +9 -0
- package/dist/features/Operation/components/ParameterListItem.vue.js.map +1 -0
- package/dist/features/Operation/components/ParameterListItem.vue.script.js +161 -0
- package/dist/features/Operation/components/ParameterListItem.vue.script.js.map +1 -0
- package/dist/features/Operation/components/RequestBody.vue.js +9 -0
- package/dist/features/Operation/components/RequestBody.vue.js.map +1 -0
- package/dist/features/Operation/components/RequestBody.vue.script.js +154 -0
- package/dist/features/Operation/components/RequestBody.vue.script.js.map +1 -0
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +1 -1
- package/dist/features/Operation/components/callbacks/Callback.vue.js +9 -0
- package/dist/features/Operation/components/callbacks/Callback.vue.js.map +1 -0
- package/dist/features/Operation/components/callbacks/Callback.vue.script.js +62 -0
- package/dist/features/Operation/components/callbacks/Callback.vue.script.js.map +1 -0
- package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts +1 -1
- package/dist/features/Operation/components/callbacks/Callbacks.vue.js +7 -0
- package/dist/features/Operation/components/callbacks/Callbacks.vue.js.map +1 -0
- package/dist/features/Operation/components/callbacks/Callbacks.vue.script.js +67 -0
- package/dist/features/Operation/components/callbacks/Callbacks.vue.script.js.map +1 -0
- package/dist/features/Operation/helpers/filter-selected-security.js +30 -0
- package/dist/features/Operation/helpers/filter-selected-security.js.map +1 -0
- package/dist/features/Operation/helpers/get-first-server.js +27 -0
- package/dist/features/Operation/helpers/get-first-server.js.map +1 -0
- package/dist/features/Operation/index.d.ts +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.js +9 -0
- package/dist/features/Operation/layouts/ClassicLayout.vue.js.map +1 -0
- package/dist/features/Operation/layouts/ClassicLayout.vue.script.js +243 -0
- package/dist/features/Operation/layouts/ClassicLayout.vue.script.js.map +1 -0
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.js +9 -0
- package/dist/features/Operation/layouts/ModernLayout.vue.js.map +1 -0
- package/dist/features/Operation/layouts/ModernLayout.vue.script.js +243 -0
- package/dist/features/Operation/layouts/ModernLayout.vue.script.js.map +1 -0
- package/dist/features/Search/components/SearchButton.vue.js +7 -0
- package/dist/features/Search/components/SearchButton.vue.js.map +1 -0
- package/dist/features/Search/components/SearchButton.vue.script.js +77 -0
- package/dist/features/Search/components/SearchButton.vue.script.js.map +1 -0
- package/dist/features/Search/components/SearchModal.vue.js +9 -0
- package/dist/features/Search/components/SearchModal.vue.js.map +1 -0
- package/dist/features/Search/components/SearchModal.vue.script.js +115 -0
- package/dist/features/Search/components/SearchModal.vue.script.js.map +1 -0
- package/dist/features/Search/components/SearchResult.vue.d.ts +1 -1
- package/dist/features/Search/components/SearchResult.vue.js +7 -0
- package/dist/features/Search/components/SearchResult.vue.js.map +1 -0
- package/dist/features/Search/components/SearchResult.vue.script.js +69 -0
- package/dist/features/Search/components/SearchResult.vue.script.js.map +1 -0
- package/dist/features/Search/helpers/create-fuse-instance.d.ts +1 -1
- package/dist/features/Search/helpers/create-fuse-instance.js +52 -0
- package/dist/features/Search/helpers/create-fuse-instance.js.map +1 -0
- package/dist/features/Search/helpers/create-search-index.d.ts +1 -1
- package/dist/features/Search/helpers/create-search-index.js +127 -0
- package/dist/features/Search/helpers/create-search-index.js.map +1 -0
- package/dist/features/Search/hooks/useSearchIndex.js +31 -0
- package/dist/features/Search/hooks/useSearchIndex.js.map +1 -0
- package/dist/features/Search/index.d.ts +2 -2
- package/dist/features/Search/types.d.ts +1 -1
- package/dist/features/ask-agent-button/AskAgentButton.vue.js +9 -0
- package/dist/features/ask-agent-button/AskAgentButton.vue.js.map +1 -0
- package/dist/features/ask-agent-button/AskAgentButton.vue.script.js +49 -0
- package/dist/features/ask-agent-button/AskAgentButton.vue.script.js.map +1 -0
- package/dist/features/developer-tools/DeveloperTools.vue.js +7 -0
- package/dist/features/developer-tools/DeveloperTools.vue.js.map +1 -0
- package/dist/features/developer-tools/DeveloperTools.vue.script.js +49 -0
- package/dist/features/developer-tools/DeveloperTools.vue.script.js.map +1 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarBlurb.vue.js +13 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarBlurb.vue.js.map +1 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.js +7 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.js.map +1 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.script.js +38 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.script.js.map +1 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.js +7 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.js.map +1 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.script.js +112 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.script.js.map +1 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.js +7 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.js.map +1 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.script.js +60 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.script.js.map +1 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.js +7 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.js.map +1 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.script.js +35 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.script.js.map +1 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.js +7 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.js.map +1 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.script.js +68 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.script.js.map +1 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.js +7 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.js.map +1 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.script.js +80 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.script.js.map +1 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.js +7 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.js.map +1 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.script.js +66 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.script.js.map +1 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.js +7 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.js.map +1 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.script.js +44 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.script.js.map +1 -0
- package/dist/features/developer-tools/components/DeployApiReference.vue.js +7 -0
- package/dist/features/developer-tools/components/DeployApiReference.vue.js.map +1 -0
- package/dist/features/developer-tools/components/DeployApiReference.vue.script.js +26 -0
- package/dist/features/developer-tools/components/DeployApiReference.vue.script.js.map +1 -0
- package/dist/features/developer-tools/components/ModifyConfiguration.vue.js +7 -0
- package/dist/features/developer-tools/components/ModifyConfiguration.vue.js.map +1 -0
- package/dist/features/developer-tools/components/ModifyConfiguration.vue.script.js +86 -0
- package/dist/features/developer-tools/components/ModifyConfiguration.vue.script.js.map +1 -0
- package/dist/features/developer-tools/components/ShareApiReference.vue.js +7 -0
- package/dist/features/developer-tools/components/ShareApiReference.vue.js.map +1 -0
- package/dist/features/developer-tools/components/ShareApiReference.vue.script.js +26 -0
- package/dist/features/developer-tools/components/ShareApiReference.vue.script.js.map +1 -0
- package/dist/features/developer-tools/index.d.ts +1 -1
- package/dist/features/example-responses/ExampleResponse.vue.js +9 -0
- package/dist/features/example-responses/ExampleResponse.vue.js.map +1 -0
- package/dist/features/example-responses/ExampleResponse.vue.script.js +56 -0
- package/dist/features/example-responses/ExampleResponse.vue.script.js.map +1 -0
- package/dist/features/example-responses/ExampleResponseTab.vue.js +9 -0
- package/dist/features/example-responses/ExampleResponseTab.vue.js.map +1 -0
- package/dist/features/example-responses/ExampleResponseTab.vue.script.js +21 -0
- package/dist/features/example-responses/ExampleResponseTab.vue.script.js.map +1 -0
- package/dist/features/example-responses/ExampleResponseTabList.vue.js +9 -0
- package/dist/features/example-responses/ExampleResponseTabList.vue.js.map +1 -0
- package/dist/features/example-responses/ExampleResponseTabList.vue.script.js +31 -0
- package/dist/features/example-responses/ExampleResponseTabList.vue.script.js.map +1 -0
- package/dist/features/example-responses/ExampleResponses.vue.js +9 -0
- package/dist/features/example-responses/ExampleResponses.vue.js.map +1 -0
- package/dist/features/example-responses/ExampleResponses.vue.script.js +157 -0
- package/dist/features/example-responses/ExampleResponses.vue.script.js.map +1 -0
- package/dist/features/example-responses/ExampleSchema.vue.js +7 -0
- package/dist/features/example-responses/ExampleSchema.vue.js.map +1 -0
- package/dist/features/example-responses/ExampleSchema.vue.script.js +42 -0
- package/dist/features/example-responses/ExampleSchema.vue.script.js.map +1 -0
- package/dist/features/example-responses/has-response-content.js +37 -0
- package/dist/features/example-responses/has-response-content.js.map +1 -0
- package/dist/features/example-responses/index.d.ts +1 -1
- package/dist/features/external-docs/ExternalDocs.vue.js +7 -0
- package/dist/features/external-docs/ExternalDocs.vue.js.map +1 -0
- package/dist/features/external-docs/ExternalDocs.vue.script.js +37 -0
- package/dist/features/external-docs/ExternalDocs.vue.script.js.map +1 -0
- package/dist/features/external-docs/index.d.ts +1 -1
- package/dist/features/index.d.ts +2 -2
- package/dist/features/index.js +4 -3
- package/dist/features/info-object/Contact.vue.js +7 -0
- package/dist/features/info-object/Contact.vue.js.map +1 -0
- package/dist/features/info-object/Contact.vue.script.js +37 -0
- package/dist/features/info-object/Contact.vue.script.js.map +1 -0
- package/dist/features/info-object/License.vue.js +7 -0
- package/dist/features/info-object/License.vue.js.map +1 -0
- package/dist/features/info-object/License.vue.script.js +32 -0
- package/dist/features/info-object/License.vue.script.js.map +1 -0
- package/dist/features/info-object/TermsOfService.vue.js +7 -0
- package/dist/features/info-object/TermsOfService.vue.js.map +1 -0
- package/dist/features/info-object/TermsOfService.vue.script.js +29 -0
- package/dist/features/info-object/TermsOfService.vue.script.js.map +1 -0
- package/dist/features/info-object/index.d.ts +3 -3
- package/dist/features/multiple-documents/DocumentSelector.vue.js +7 -0
- package/dist/features/multiple-documents/DocumentSelector.vue.js.map +1 -0
- package/dist/features/multiple-documents/DocumentSelector.vue.script.js +48 -0
- package/dist/features/multiple-documents/DocumentSelector.vue.script.js.map +1 -0
- package/dist/features/specification-extension/SpecificationExtension.vue.js +7 -0
- package/dist/features/specification-extension/SpecificationExtension.vue.js.map +1 -0
- package/dist/features/specification-extension/SpecificationExtension.vue.script.js +56 -0
- package/dist/features/specification-extension/SpecificationExtension.vue.script.js.map +1 -0
- package/dist/features/specification-extension/helpers.js +15 -0
- package/dist/features/specification-extension/helpers.js.map +1 -0
- package/dist/features/specification-extension/index.d.ts +2 -2
- package/dist/features/test-request-button/TestRequestButton.vue.js +9 -0
- package/dist/features/test-request-button/TestRequestButton.vue.js.map +1 -0
- package/dist/features/test-request-button/TestRequestButton.vue.script.js +47 -0
- package/dist/features/test-request-button/TestRequestButton.vue.script.js.map +1 -0
- package/dist/features/test-request-button/index.d.ts +1 -1
- package/dist/features/x-badges/XBadges.vue.js +7 -0
- package/dist/features/x-badges/XBadges.vue.js.map +1 -0
- package/dist/features/x-badges/XBadges.vue.script.js +31 -0
- package/dist/features/x-badges/XBadges.vue.script.js.map +1 -0
- package/dist/features/x-badges/index.d.ts +1 -1
- package/dist/helpers/color-mode.js +15 -0
- package/dist/helpers/color-mode.js.map +1 -0
- package/dist/helpers/download.js +77 -0
- package/dist/helpers/download.js.map +1 -0
- package/dist/helpers/id-routing.js +107 -0
- package/dist/helpers/id-routing.js.map +1 -0
- package/dist/helpers/index.d.ts +8 -8
- package/dist/helpers/index.js +8 -2
- package/dist/{lazy-bus-CV8Ox5hD.js → helpers/lazy-bus.js} +3 -106
- package/dist/helpers/lazy-bus.js.map +1 -0
- package/dist/helpers/load-from-perssistance.js +23 -0
- package/dist/helpers/load-from-perssistance.js.map +1 -0
- package/dist/helpers/map-config-plugins.js +44 -0
- package/dist/helpers/map-config-plugins.js.map +1 -0
- package/dist/helpers/map-config-to-workspace-store.js +24 -0
- package/dist/helpers/map-config-to-workspace-store.js.map +1 -0
- package/dist/helpers/normalize-configurations.js +66 -0
- package/dist/helpers/normalize-configurations.js.map +1 -0
- package/dist/helpers/openapi.js +132 -0
- package/dist/helpers/openapi.js.map +1 -0
- package/dist/{storage--3JuzjCI.js → helpers/storage.js} +2 -2
- package/dist/helpers/storage.js.map +1 -0
- package/dist/helpers/upload-temp-document.js +24 -0
- package/dist/helpers/upload-temp-document.js.map +1 -0
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.js +2 -2
- package/dist/{use-agent-Bnm1de0n.js → hooks/use-agent.js} +2 -2
- package/dist/hooks/use-agent.js.map +1 -0
- package/dist/{use-intersection-8QqPi2O-.js → hooks/use-intersection.js} +2 -2
- package/dist/hooks/use-intersection.js.map +1 -0
- package/dist/index.d.ts +5 -5
- package/dist/index.js +6 -6
- package/dist/plugins/hooks/usePluginManager.d.ts +1 -1
- package/dist/plugins/hooks/usePluginManager.js +16 -0
- package/dist/plugins/hooks/usePluginManager.js.map +1 -0
- package/dist/plugins/index.d.ts +3 -3
- package/dist/plugins/index.js +3 -1
- package/dist/plugins/persistance-plugin.js +39 -0
- package/dist/plugins/persistance-plugin.js.map +1 -0
- package/dist/plugins/plugin-manager.js +32 -0
- package/dist/plugins/plugin-manager.js.map +1 -0
- package/dist/ssr.d.ts +2 -2
- package/dist/ssr.js +6 -6
- package/dist/standalone/lib/html-api.js +73 -0
- package/dist/standalone/lib/html-api.js.map +1 -0
- package/dist/style.css +7878 -6432
- package/package.json +12 -12
- package/dist/AgentScalarChatInterface-MUbtSqMw.js.map +0 -1
- package/dist/ExternalDocs-phu7GxpZ.js +0 -272
- package/dist/ExternalDocs-phu7GxpZ.js.map +0 -1
- package/dist/MobileHeader-DAm6yQX0.js +0 -1373
- package/dist/MobileHeader-DAm6yQX0.js.map +0 -1
- package/dist/Operation-CvpVIkc3.js +0 -3829
- package/dist/Operation-CvpVIkc3.js.map +0 -1
- package/dist/SearchButton-xzhIpMCZ.js +0 -621
- package/dist/SearchButton-xzhIpMCZ.js.map +0 -1
- package/dist/ServerSelector-5y29y2BJ.js +0 -852
- package/dist/ServerSelector-5y29y2BJ.js.map +0 -1
- package/dist/components/index.js.map +0 -1
- package/dist/lazy-bus-CV8Ox5hD.js.map +0 -1
- package/dist/normalize-configurations-DcVpOEjD.js +0 -232
- package/dist/normalize-configurations-DcVpOEjD.js.map +0 -1
- package/dist/plugins-4EyiUD_A.js +0 -80
- package/dist/plugins-4EyiUD_A.js.map +0 -1
- package/dist/src-DJwsRvMU.js +0 -1686
- package/dist/src-DJwsRvMU.js.map +0 -1
- package/dist/storage--3JuzjCI.js.map +0 -1
- package/dist/urls-gPTXGgbj.js.map +0 -1
- package/dist/use-agent-Bnm1de0n.js.map +0 -1
- package/dist/use-intersection-8QqPi2O-.js.map +0 -1
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { isTypeObject } from "./helpers/is-type-object.js";
|
|
2
|
+
import { sortPropertyNames } from "./helpers/sort-property-names.js";
|
|
3
|
+
import SchemaProperty_default from "./SchemaProperty.vue.js";
|
|
4
|
+
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, defineComponent, openBlock, renderList, unref } from "vue";
|
|
5
|
+
import { resolve } from "@scalar/workspace-store/resolve";
|
|
6
|
+
//#region src/components/Content/Schema/SchemaObjectProperties.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
+
var SchemaObjectProperties_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
8
|
+
__name: "SchemaObjectProperties",
|
|
9
|
+
props: {
|
|
10
|
+
schema: {},
|
|
11
|
+
discriminator: {},
|
|
12
|
+
compact: { type: Boolean },
|
|
13
|
+
hideHeading: { type: Boolean },
|
|
14
|
+
level: {},
|
|
15
|
+
hideModelNames: { type: Boolean },
|
|
16
|
+
breadcrumb: {},
|
|
17
|
+
eventBus: {},
|
|
18
|
+
options: {}
|
|
19
|
+
},
|
|
20
|
+
setup(__props) {
|
|
21
|
+
/**
|
|
22
|
+
* Sorts properties by required status first, then alphabetically.
|
|
23
|
+
* Required properties appear first, followed by optional properties.
|
|
24
|
+
*/
|
|
25
|
+
const sortedProperties = computed(() => sortPropertyNames(__props.schema, __props.discriminator, __props.options));
|
|
26
|
+
/**
|
|
27
|
+
* Get the display name for additional properties.
|
|
28
|
+
*
|
|
29
|
+
* Checks x-additionalPropertiesName extension first, then falls back to the
|
|
30
|
+
* propertyNames schema title if available.
|
|
31
|
+
*/
|
|
32
|
+
const getAdditionalPropertiesName = (_additionalProperties, _propertyNames) => {
|
|
33
|
+
const additionalProperties = typeof _additionalProperties === "boolean" ? _additionalProperties : resolve.schema(_additionalProperties);
|
|
34
|
+
if (typeof additionalProperties === "object" && typeof additionalProperties["x-additionalPropertiesName"] === "string" && additionalProperties["x-additionalPropertiesName"].trim().length > 0) return `${additionalProperties["x-additionalPropertiesName"].trim()}`;
|
|
35
|
+
if (_propertyNames) {
|
|
36
|
+
const resolved = resolve.schema(_propertyNames);
|
|
37
|
+
if (resolved?.title) return resolved.title;
|
|
38
|
+
}
|
|
39
|
+
return "propertyName";
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Extract enum values from the propertyNames schema.
|
|
43
|
+
*
|
|
44
|
+
* JSON Schema's propertyNames keyword constrains which keys are valid
|
|
45
|
+
* in an object with additionalProperties. When it contains an enum,
|
|
46
|
+
* these are the allowed key names.
|
|
47
|
+
*/
|
|
48
|
+
const getPropertyNamesEnum = (_propertyNames) => {
|
|
49
|
+
if (!_propertyNames) return;
|
|
50
|
+
const resolved = resolve.schema(_propertyNames);
|
|
51
|
+
if (resolved && "enum" in resolved && Array.isArray(resolved.enum) && resolved.enum.length > 0) return resolved.enum;
|
|
52
|
+
};
|
|
53
|
+
/** Enum values for the property keys, derived from propertyNames if present. */
|
|
54
|
+
const additionalPropertiesEnum = computed(() => {
|
|
55
|
+
if (!isTypeObject(__props.schema) || !__props.schema.additionalProperties) return;
|
|
56
|
+
return getPropertyNamesEnum(__props.schema.propertyNames);
|
|
57
|
+
});
|
|
58
|
+
/**
|
|
59
|
+
* Get the value for additional properties.
|
|
60
|
+
*
|
|
61
|
+
* When additionalProperties is true or an empty object, it should render as { type: 'anything' }.
|
|
62
|
+
*/
|
|
63
|
+
const getAdditionalPropertiesValue = (additionalProperties) => {
|
|
64
|
+
if (additionalProperties === true || typeof additionalProperties === "object" && Object.keys(additionalProperties).length === 0 || typeof additionalProperties !== "object" || !("type" in additionalProperties)) return {
|
|
65
|
+
type: "anything",
|
|
66
|
+
...typeof additionalProperties === "object" ? additionalProperties : {}
|
|
67
|
+
};
|
|
68
|
+
return additionalProperties;
|
|
69
|
+
};
|
|
70
|
+
return (_ctx, _cache) => {
|
|
71
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
72
|
+
unref(isTypeObject)(__props.schema) && __props.schema.properties ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(sortedProperties.value, (property) => {
|
|
73
|
+
return openBlock(), createBlock(SchemaProperty_default, {
|
|
74
|
+
key: property,
|
|
75
|
+
breadcrumb: __props.breadcrumb,
|
|
76
|
+
compact: __props.compact,
|
|
77
|
+
discriminator: __props.discriminator,
|
|
78
|
+
eventBus: __props.eventBus,
|
|
79
|
+
hideHeading: __props.hideHeading,
|
|
80
|
+
hideModelNames: __props.hideModelNames,
|
|
81
|
+
level: __props.level,
|
|
82
|
+
name: property,
|
|
83
|
+
options: __props.options,
|
|
84
|
+
required: __props.schema.required?.includes(property),
|
|
85
|
+
schema: unref(resolve).schema(__props.schema.properties[property])
|
|
86
|
+
}, null, 8, [
|
|
87
|
+
"breadcrumb",
|
|
88
|
+
"compact",
|
|
89
|
+
"discriminator",
|
|
90
|
+
"eventBus",
|
|
91
|
+
"hideHeading",
|
|
92
|
+
"hideModelNames",
|
|
93
|
+
"level",
|
|
94
|
+
"name",
|
|
95
|
+
"options",
|
|
96
|
+
"required",
|
|
97
|
+
"schema"
|
|
98
|
+
]);
|
|
99
|
+
}), 128)) : createCommentVNode("", true),
|
|
100
|
+
unref(isTypeObject)(__props.schema) && __props.schema.patternProperties ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(Object.entries(__props.schema.patternProperties), ([key, property]) => {
|
|
101
|
+
return openBlock(), createBlock(SchemaProperty_default, {
|
|
102
|
+
key,
|
|
103
|
+
breadcrumb: __props.breadcrumb,
|
|
104
|
+
compact: __props.compact,
|
|
105
|
+
discriminator: __props.discriminator,
|
|
106
|
+
eventBus: __props.eventBus,
|
|
107
|
+
hideHeading: __props.hideHeading,
|
|
108
|
+
hideModelNames: __props.hideModelNames,
|
|
109
|
+
level: __props.level,
|
|
110
|
+
name: key,
|
|
111
|
+
options: __props.options,
|
|
112
|
+
schema: unref(resolve).schema(property)
|
|
113
|
+
}, null, 8, [
|
|
114
|
+
"breadcrumb",
|
|
115
|
+
"compact",
|
|
116
|
+
"discriminator",
|
|
117
|
+
"eventBus",
|
|
118
|
+
"hideHeading",
|
|
119
|
+
"hideModelNames",
|
|
120
|
+
"level",
|
|
121
|
+
"name",
|
|
122
|
+
"options",
|
|
123
|
+
"schema"
|
|
124
|
+
]);
|
|
125
|
+
}), 128)) : createCommentVNode("", true),
|
|
126
|
+
unref(isTypeObject)(__props.schema) && __props.schema.additionalProperties ? (openBlock(), createBlock(SchemaProperty_default, {
|
|
127
|
+
key: 2,
|
|
128
|
+
breadcrumb: __props.breadcrumb,
|
|
129
|
+
compact: __props.compact,
|
|
130
|
+
discriminator: __props.discriminator,
|
|
131
|
+
eventBus: __props.eventBus,
|
|
132
|
+
hideHeading: __props.hideHeading,
|
|
133
|
+
hideModelNames: __props.hideModelNames,
|
|
134
|
+
level: __props.level,
|
|
135
|
+
name: getAdditionalPropertiesName(__props.schema.additionalProperties, __props.schema.propertyNames),
|
|
136
|
+
noncollapsible: "",
|
|
137
|
+
options: __props.options,
|
|
138
|
+
propertyNamesEnum: additionalPropertiesEnum.value,
|
|
139
|
+
schema: getAdditionalPropertiesValue(__props.schema.additionalProperties),
|
|
140
|
+
variant: "additionalProperties"
|
|
141
|
+
}, null, 8, [
|
|
142
|
+
"breadcrumb",
|
|
143
|
+
"compact",
|
|
144
|
+
"discriminator",
|
|
145
|
+
"eventBus",
|
|
146
|
+
"hideHeading",
|
|
147
|
+
"hideModelNames",
|
|
148
|
+
"level",
|
|
149
|
+
"name",
|
|
150
|
+
"options",
|
|
151
|
+
"propertyNamesEnum",
|
|
152
|
+
"schema"
|
|
153
|
+
])) : createCommentVNode("", true)
|
|
154
|
+
], 64);
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
//#endregion
|
|
159
|
+
export { SchemaObjectProperties_vue_vue_type_script_setup_true_lang_default as default };
|
|
160
|
+
|
|
161
|
+
//# sourceMappingURL=SchemaObjectProperties.vue.script.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SchemaObjectProperties.vue.script.js","names":[],"sources":["../../../../src/components/Content/Schema/SchemaObjectProperties.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { resolve } from '@scalar/workspace-store/resolve'\nimport type {\n DiscriminatorObject,\n SchemaObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport { isTypeObject } from '@/components/Content/Schema/helpers/is-type-object'\nimport { sortPropertyNames } from '@/components/Content/Schema/helpers/sort-property-names'\nimport type { SchemaOptions } from '@/components/Content/Schema/types'\n\nimport SchemaProperty from './SchemaProperty.vue'\n\nconst { schema, discriminator, options } = defineProps<{\n schema: SchemaObject\n discriminator?: DiscriminatorObject\n compact?: boolean\n hideHeading?: boolean\n level?: number\n hideModelNames?: boolean\n breadcrumb?: string[]\n eventBus: WorkspaceEventBus | null\n options: SchemaOptions\n}>()\n\n/**\n * Sorts properties by required status first, then alphabetically.\n * Required properties appear first, followed by optional properties.\n */\nconst sortedProperties = computed(() =>\n sortPropertyNames(schema, discriminator, options),\n)\n\n/**\n * Get the display name for additional properties.\n *\n * Checks x-additionalPropertiesName extension first, then falls back to the\n * propertyNames schema title if available.\n */\nconst getAdditionalPropertiesName = (\n _additionalProperties: Extract<\n SchemaObject,\n { type: 'object' }\n >['additionalProperties'],\n _propertyNames?: Extract<SchemaObject, { type: 'object' }>['propertyNames'],\n) => {\n const additionalProperties =\n typeof _additionalProperties === 'boolean'\n ? _additionalProperties\n : resolve.schema(_additionalProperties)\n\n if (\n typeof additionalProperties === 'object' &&\n typeof additionalProperties['x-additionalPropertiesName'] === 'string' &&\n additionalProperties['x-additionalPropertiesName'].trim().length > 0\n ) {\n return `${additionalProperties['x-additionalPropertiesName'].trim()}`\n }\n\n // Fall back to the propertyNames title when available\n if (_propertyNames) {\n const resolved = resolve.schema(_propertyNames)\n if (resolved?.title) {\n return resolved.title\n }\n }\n\n return 'propertyName'\n}\n\n/**\n * Extract enum values from the propertyNames schema.\n *\n * JSON Schema's propertyNames keyword constrains which keys are valid\n * in an object with additionalProperties. When it contains an enum,\n * these are the allowed key names.\n */\nconst getPropertyNamesEnum = (\n _propertyNames?: Extract<SchemaObject, { type: 'object' }>['propertyNames'],\n): string[] | undefined => {\n if (!_propertyNames) {\n return undefined\n }\n\n const resolved = resolve.schema(_propertyNames)\n if (\n resolved &&\n 'enum' in resolved &&\n Array.isArray(resolved.enum) &&\n resolved.enum.length > 0\n ) {\n return resolved.enum as string[]\n }\n\n return undefined\n}\n\n/** Enum values for the property keys, derived from propertyNames if present. */\nconst additionalPropertiesEnum = computed(() => {\n if (!isTypeObject(schema) || !schema.additionalProperties) {\n return undefined\n }\n return getPropertyNamesEnum(schema.propertyNames)\n})\n\n/**\n * Get the value for additional properties.\n *\n * When additionalProperties is true or an empty object, it should render as { type: 'anything' }.\n */\nconst getAdditionalPropertiesValue = (\n additionalProperties: Extract<\n SchemaObject,\n { type: 'object' }\n >['additionalProperties'],\n): SchemaObject => {\n if (\n additionalProperties === true ||\n (typeof additionalProperties === 'object' &&\n Object.keys(additionalProperties).length === 0) ||\n typeof additionalProperties !== 'object' ||\n !('type' in additionalProperties)\n ) {\n return {\n // @ts-expect-error - ask hans\n type: 'anything',\n ...(typeof additionalProperties === 'object' ? additionalProperties : {}),\n }\n }\n\n return additionalProperties\n}\n</script>\n\n<template>\n <!-- Properties -->\n <template v-if=\"isTypeObject(schema) && schema.properties\">\n <SchemaProperty\n v-for=\"property in sortedProperties\"\n :key=\"property\"\n :breadcrumb\n :compact\n :discriminator\n :eventBus=\"eventBus\"\n :hideHeading\n :hideModelNames\n :level\n :name=\"property\"\n :options=\"options\"\n :required=\"schema.required?.includes(property)\"\n :schema=\"resolve.schema(schema.properties[property])\" />\n </template>\n\n <!-- patternProperties -->\n <template v-if=\"isTypeObject(schema) && schema.patternProperties\">\n <SchemaProperty\n v-for=\"[key, property] in Object.entries(schema.patternProperties)\"\n :key=\"key\"\n :breadcrumb\n :compact\n :discriminator\n :eventBus=\"eventBus\"\n :hideHeading\n :hideModelNames=\"hideModelNames\"\n :level\n :name=\"key\"\n :options=\"options\"\n :schema=\"resolve.schema(property)\" />\n </template>\n\n <!-- additionalProperties -->\n <template v-if=\"isTypeObject(schema) && schema.additionalProperties\">\n <SchemaProperty\n :breadcrumb\n :compact\n :discriminator\n :eventBus=\"eventBus\"\n :hideHeading\n :hideModelNames\n :level\n :name=\"\n getAdditionalPropertiesName(\n schema.additionalProperties,\n schema.propertyNames,\n )\n \"\n noncollapsible\n :options=\"options\"\n :propertyNamesEnum=\"additionalPropertiesEnum\"\n :schema=\"getAdditionalPropertiesValue(schema.additionalProperties)\"\n variant=\"additionalProperties\" />\n </template>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;EA+BA,MAAM,mBAAmB,eACvB,kBAAkB,QAAA,QAAQ,QAAA,eAAe,QAAA,QAAQ,CACnD;;;;;;;EAQA,MAAM,+BACJ,uBAIA,mBACG;GACH,MAAM,uBACJ,OAAO,0BAA0B,YAC7B,wBACA,QAAQ,OAAO,sBAAqB;AAE1C,OACE,OAAO,yBAAyB,YAChC,OAAO,qBAAqB,kCAAkC,YAC9D,qBAAqB,8BAA8B,MAAM,CAAC,SAAS,EAEnE,QAAO,GAAG,qBAAqB,8BAA8B,MAAM;AAIrE,OAAI,gBAAgB;IAClB,MAAM,WAAW,QAAQ,OAAO,eAAc;AAC9C,QAAI,UAAU,MACZ,QAAO,SAAS;;AAIpB,UAAO;;;;;;;;;EAUT,MAAM,wBACJ,mBACyB;AACzB,OAAI,CAAC,eACH;GAGF,MAAM,WAAW,QAAQ,OAAO,eAAc;AAC9C,OACE,YACA,UAAU,YACV,MAAM,QAAQ,SAAS,KAAK,IAC5B,SAAS,KAAK,SAAS,EAEvB,QAAO,SAAS;;;EAOpB,MAAM,2BAA2B,eAAe;AAC9C,OAAI,CAAC,aAAa,QAAA,OAAO,IAAI,CAAC,QAAA,OAAO,qBACnC;AAEF,UAAO,qBAAqB,QAAA,OAAO,cAAa;IACjD;;;;;;EAOD,MAAM,gCACJ,yBAIiB;AACjB,OACE,yBAAyB,QACxB,OAAO,yBAAyB,YAC/B,OAAO,KAAK,qBAAqB,CAAC,WAAW,KAC/C,OAAO,yBAAyB,YAChC,EAAE,UAAU,sBAEZ,QAAO;IAEL,MAAM;IACN,GAAI,OAAO,yBAAyB,WAAW,uBAAuB,EAAE;IAC1E;AAGF,UAAO;;;;IAMS,MAAA,aAAY,CAAC,QAAA,OAAM,IAAK,QAAA,OAAO,cAAA,UAAA,KAAA,EAC7C,mBAa0D,UAAA,EAAA,KAAA,GAAA,EAAA,WAZrC,iBAAA,QAAZ,aAAQ;yBADjB,YAa0D,wBAAA;MAXvD,KAAK;MACL,YAAA,QAAA;MACA,SAAA,QAAA;MACA,eAAA,QAAA;MACA,UAAU,QAAA;MACV,aAAA,QAAA;MACA,gBAAA,QAAA;MACA,OAAA,QAAA;MACA,MAAM;MACN,SAAS,QAAA;MACT,UAAU,QAAA,OAAO,UAAU,SAAS,SAAQ;MAC5C,QAAQ,MAAA,QAAO,CAAC,OAAO,QAAA,OAAO,WAAW,UAAQ;;;;;;;;;;;;;;;IAItC,MAAA,aAAY,CAAC,QAAA,OAAM,IAAK,QAAA,OAAO,qBAAA,UAAA,KAAA,EAC7C,mBAYuC,UAAA,EAAA,KAAA,GAAA,EAAA,WAXX,OAAO,QAAQ,QAAA,OAAO,kBAAiB,GAAA,CAAzD,KAAK,cAAQ;yBADvB,YAYuC,wBAAA;MAV/B;MACL,YAAA,QAAA;MACA,SAAA,QAAA;MACA,eAAA,QAAA;MACA,UAAU,QAAA;MACV,aAAA,QAAA;MACA,gBAAgB,QAAA;MAChB,OAAA,QAAA;MACA,MAAM;MACN,SAAS,QAAA;MACT,QAAQ,MAAA,QAAO,CAAC,OAAO,SAAQ;;;;;;;;;;;;;;IAIpB,MAAA,aAAY,CAAC,QAAA,OAAM,IAAK,QAAA,OAAO,wBAAA,WAAA,EAC7C,YAkBmC,wBAAA;;KAjBhC,YAAA,QAAA;KACA,SAAA,QAAA;KACA,eAAA,QAAA;KACA,UAAU,QAAA;KACV,aAAA,QAAA;KACA,gBAAA,QAAA;KACA,OAAA,QAAA;KACA,MAAe,4BAAuC,QAAA,OAAO,sBAAgC,QAAA,OAAO,cAAA;KAMrG,gBAAA;KACC,SAAS,QAAA;KACT,mBAAmB,yBAAA;KACnB,QAAQ,6BAA6B,QAAA,OAAO,qBAAoB;KACjE,SAAQ"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
2
2
|
import type { DiscriminatorObject, SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
3
3
|
import { type Component } from 'vue';
|
|
4
|
-
import type { SchemaOptions } from '
|
|
4
|
+
import type { SchemaOptions } from '../../../components/Content/Schema/types';
|
|
5
5
|
/**
|
|
6
6
|
* Note: We're taking in a prop called `value` which should be a JSON Schema.
|
|
7
7
|
*
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import SchemaProperty_vue_vue_type_script_setup_true_lang_default from "./SchemaProperty.vue.script.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
//#region src/components/Content/Schema/SchemaProperty.vue
|
|
5
|
+
var SchemaProperty_default = /* @__PURE__ */ _plugin_vue_export_helper_default(SchemaProperty_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-a72e0d1d"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { SchemaProperty_default as default };
|
|
8
|
+
|
|
9
|
+
//# sourceMappingURL=SchemaProperty.vue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SchemaProperty.vue.js","names":[],"sources":["../../../../src/components/Content/Schema/SchemaProperty.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarMarkdown, ScalarWrappingText } from '@scalar/components'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { resolve } from '@scalar/workspace-store/resolve'\nimport type {\n DiscriminatorObject,\n SchemaObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { isArraySchema } from '@scalar/workspace-store/schemas/v3.1/strict/type-guards'\nimport { computed, type Component } from 'vue'\n\nimport { WithBreadcrumb } from '@/components/Anchor'\nimport { isTypeObject } from '@/components/Content/Schema/helpers/is-type-object'\nimport type { SchemaOptions } from '@/components/Content/Schema/types'\nimport { SpecificationExtension } from '@/features/specification-extension'\n\nimport { getCompositionsToRender } from './helpers/get-compositions-to-render'\nimport { getEnumValues } from './helpers/get-enum-values'\nimport { getPropertyDescription } from './helpers/get-property-description'\nimport { hasComplexArrayItems } from './helpers/has-complex-array-items'\nimport { optimizeValueForDisplay } from './helpers/optimize-value-for-display'\nimport { shouldDisplayDescription } from './helpers/should-display-description'\nimport { shouldDisplayHeading } from './helpers/should-display-heading'\nimport Schema from './Schema.vue'\nimport SchemaComposition from './SchemaComposition.vue'\nimport SchemaEnums from './SchemaEnums.vue'\nimport SchemaPropertyHeading from './SchemaPropertyHeading.vue'\n\n/**\n * Note: We're taking in a prop called `value` which should be a JSON Schema.\n *\n * We're using `optimizeValueForDisplay` to merge null types in compositions (anyOf, allOf, oneOf, not).\n * So you should basically use the optimizedValue everywhere in the component.\n */\n\nconst props = withDefaults(\n defineProps<{\n is?: string | Component\n schema: SchemaObject | undefined\n noncollapsible?: boolean\n level?: number\n name?: string\n required?: boolean\n compact?: boolean\n discriminator?: DiscriminatorObject\n description?: string\n hideModelNames?: boolean\n hideHeading?: boolean\n /** When the root schema was resolved from a $ref, pass the ref name for display (e.g. \"Data\"). */\n modelName?: string | null\n variant?: 'additionalProperties' | 'patternProperties'\n breadcrumb?: string[]\n eventBus: WorkspaceEventBus | null\n options: SchemaOptions\n /** Enum values for property names (from JSON Schema propertyNames keyword). */\n propertyNamesEnum?: string[]\n }>(),\n {\n level: 0,\n required: false,\n compact: false,\n hideModelNames: false,\n },\n)\n\n/** Simplified composition with `null` type. */\nconst optimizedValue = computed(() => optimizeValueForDisplay(props.schema))\n\nconst childBreadcrumb = computed<string[] | undefined>(() =>\n props.breadcrumb && props.name\n ? [...props.breadcrumb, props.name]\n : undefined,\n)\n\nconst shouldHaveLink = computed(() => props.level <= 1)\n\n/** Checks if array items have complex structure */\nconst hasComplexArrayItemsComputed = computed(() =>\n hasComplexArrayItems(optimizedValue.value),\n)\n\n/** Check if enum should be displayed (from value schema or from propertyNames) */\nconst hasEnum = computed(() => enumValues.value.length > 0)\n\n/** Determine if object properties should be displayed */\nconst shouldRenderObjectProperties = computed(() => {\n const value = optimizedValue.value\n if (!value) {\n return false\n }\n\n return (\n isTypeObject(value) &&\n ('properties' in value || 'additionalProperties' in value)\n )\n})\n\n/** Determine if array of objects should be rendered */\nconst shouldRenderArrayOfObjects = computed(() => {\n const value = optimizedValue.value\n if (!value || !isArraySchema(value) || typeof value.items !== 'object') {\n return false\n }\n\n return hasComplexArrayItemsComputed.value\n})\n\n/** Extract enum values from schema or array items */\nconst enumValues = computed(() => getEnumValues(optimizedValue.value))\n\n/** Generate property description from type/format */\nconst propertyDescription = computed(() =>\n getPropertyDescription(optimizedValue.value),\n)\n\n/** Determine if description should be displayed */\nconst displayDescription = computed(() =>\n shouldDisplayDescription(optimizedValue.value, props.description),\n)\n\n/**\n * When the property already renders the description, avoid repeating it in the nested object schema card.\n */\nconst objectSchemaForChildren = computed(() => {\n const value = optimizedValue.value\n if (!value || !displayDescription.value || !('description' in value)) {\n return value\n }\n\n const { description: _description, ...schemaWithoutDescription } = value\n return schemaWithoutDescription as SchemaObject\n})\n\n/** Determine if property heading should be displayed */\nconst shouldDisplayHeadingComputed = computed(() =>\n shouldDisplayHeading(optimizedValue.value, props.name, props.required),\n)\n\n/** Computes which compositions should be rendered and with which values */\nconst compositionsToRender = computed(() =>\n getCompositionsToRender(optimizedValue.value),\n)\n\n/** Get resolved array items for rendering */\nconst resolvedArrayItems = computed(() => {\n const value = optimizedValue.value\n if (!value || !isArraySchema(value) || typeof value.items !== 'object') {\n return undefined\n }\n return resolve.schema(value.items)\n})\n\n/** Check if discriminator matches current property */\nconst isDiscriminatorProperty = computed(() =>\n Boolean(props.name && props.discriminator?.propertyName === props.name),\n)\n</script>\n<template>\n <component\n :is=\"is ?? 'li'\"\n class=\"property\"\n :class=\"[\n `property--level-${level}`,\n {\n 'property--compact': compact,\n 'property--deprecated': optimizedValue?.deprecated,\n },\n ]\">\n <SchemaPropertyHeading\n v-if=\"shouldDisplayHeadingComputed\"\n class=\"group\"\n :enum=\"hasEnum\"\n :hideModelNames\n :isDiscriminator=\"isDiscriminatorProperty\"\n :modelName=\"modelName\"\n :required\n :value=\"optimizedValue\">\n <template\n v-if=\"name\"\n #name>\n <WithBreadcrumb\n :breadcrumb=\"shouldHaveLink ? childBreadcrumb : undefined\"\n :eventBus=\"eventBus\">\n <span\n v-if=\"variant === 'patternProperties'\"\n class=\"property-name-pattern-properties\">\n <ScalarWrappingText\n preset=\"property\"\n :text=\"name\" />\n </span>\n <span\n v-else-if=\"variant === 'additionalProperties'\"\n class=\"property-name-additional-properties\">\n <ScalarWrappingText\n preset=\"property\"\n :text=\"name\" />\n </span>\n <ScalarWrappingText\n v-else\n preset=\"property\"\n :text=\"name\" />\n </WithBreadcrumb>\n </template>\n <template\n v-if=\"optimizedValue?.example !== undefined\"\n #example>\n Example:\n {{ optimizedValue.example }}\n </template>\n </SchemaPropertyHeading>\n\n <!-- Description -->\n <div\n v-if=\"displayDescription || propertyDescription\"\n class=\"property-description\">\n <ScalarMarkdown\n :value=\"displayDescription || propertyDescription || ''\" />\n </div>\n\n <!-- Enum for property names -->\n <SchemaEnums\n v-if=\"propertyNamesEnum && propertyNamesEnum.length > 0\"\n propertyNames\n :value=\"{ enum: propertyNamesEnum } as SchemaObject\" />\n\n <!-- Enum values -->\n <SchemaEnums\n v-if=\"enumValues.length > 0\"\n :value=\"optimizedValue\" />\n\n <!-- Object -->\n <div\n v-if=\"shouldRenderObjectProperties\"\n class=\"children\">\n <Schema\n :breadcrumb=\"childBreadcrumb\"\n :compact=\"compact\"\n :eventBus=\"eventBus\"\n :level=\"level + 1\"\n :name=\"name\"\n :noncollapsible=\"noncollapsible\"\n :options=\"options\"\n :schema=\"objectSchemaForChildren\" />\n </div>\n\n <!-- Array of objects or nested arrays -->\n <div\n v-if=\"shouldRenderArrayOfObjects && resolvedArrayItems\"\n class=\"children\">\n <Schema\n :compact=\"compact\"\n :eventBus=\"eventBus\"\n :level=\"level + 1\"\n :name=\"name\"\n :noncollapsible=\"noncollapsible\"\n :options=\"options\"\n :schema=\"resolve.schema(resolvedArrayItems)\" />\n </div>\n\n <!-- Compositions -->\n <SchemaComposition\n v-for=\"compositionData in compositionsToRender\"\n :key=\"compositionData.composition\"\n :breadcrumb=\"breadcrumb\"\n :compact=\"compact\"\n :composition=\"compositionData.composition\"\n :discriminator=\"schema?.discriminator\"\n :eventBus=\"eventBus\"\n :hideHeading=\"hideHeading\"\n :level=\"level\"\n :name=\"name\"\n :noncollapsible=\"noncollapsible\"\n :options=\"options\"\n :schema=\"compositionData.value\" />\n <SpecificationExtension :value=\"optimizedValue\" />\n </component>\n</template>\n\n<style scoped>\n.property {\n color: var(--scalar-color-1);\n display: flex;\n flex-direction: column;\n padding: 10px;\n font-size: var(--scalar-small);\n position: relative;\n}\n\n/** Remove top padding for top level schema card */\n.property.property--level-0:has(\n > .property-rule\n > .schema-card\n > .schema-properties.schema-properties-open\n > ul\n > li.property\n ) {\n padding-top: 0;\n}\n\n.property--compact.property--level-0,\n.property--compact.property--level-1 {\n padding: 10px 0;\n}\n\n.composition-panel .property.property.property.property--level-0 {\n padding: 0px;\n}\n\n.property--compact.property--level-0\n .composition-panel\n .property--compact.property--level-1 {\n padding: 8px;\n}\n\n/* if a property doesn't have a heading, remove the top padding */\n.property:has(> .property-rule:nth-of-type(1)):not(.property--compact) {\n padding-top: 8px;\n padding-bottom: 8px;\n}\n\n.property--deprecated {\n background: repeating-linear-gradient(\n -45deg,\n var(--scalar-background-2) 0,\n var(--scalar-background-2) 2px,\n transparent 2px,\n transparent 5px\n );\n background-size: 100%;\n}\n\n.property--deprecated > * {\n opacity: 0.75;\n}\n\n.property-description {\n margin-top: 6px;\n line-height: 1.4;\n font-size: var(--scalar-small);\n}\n\n.property-description:has(+ .property-rule) {\n margin-bottom: 9px;\n}\n\n:deep(.property-description) * {\n color: var(--scalar-color-2) !important;\n}\n\n.property:not(:last-of-type) {\n border-bottom: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n\n.property-description + .children,\n.children + .property-rule {\n margin-top: 9px;\n}\n\n.children {\n display: flex;\n flex-direction: column;\n}\n\n.children .property--compact.property--level-1 {\n padding: 12px;\n}\n\n.property-example-value {\n all: unset;\n font-family: var(--scalar-font-code);\n padding: 6px;\n border-top: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n\n.property-rule {\n border-radius: var(--scalar-radius-lg);\n display: flex;\n flex-direction: column;\n}\n\n.property-rule\n :deep(\n .composition-panel\n .schema-card--level-1\n > .schema-properties.schema-properties-open\n ) {\n border-radius: 0 0 var(--scalar-radius-lg) var(--scalar-radius-lg);\n}\n\n.property-rule\n :deep(.composition-panel > .schema-card > .schema-card-description) {\n padding: 10px;\n border-left: var(--scalar-border-width) solid var(--scalar-border-color);\n border-right: var(--scalar-border-width) solid var(--scalar-border-color);\n\n & + .schema-properties {\n margin-top: 0;\n }\n}\n\n.property-example {\n background: transparent;\n border: none;\n display: flex;\n flex-direction: row;\n gap: 8px;\n}\n\n.property-example-label,\n.property-example-value {\n padding: 3px 0 0 0;\n}\n\n.property-example-value {\n background: var(--scalar-background-2);\n border-top: 0;\n border-radius: var(--scalar-radius);\n padding: 3px 4px;\n}\n\n.property-name {\n font-family: var(--scalar-font-code);\n font-weight: var(--scalar-semibold);\n}\n\n.property-name-additional-properties::before,\n.property-name-pattern-properties::before {\n text-transform: uppercase;\n font-size: var(--scalar-micro);\n display: inline-block;\n padding: 2px 4px;\n border-radius: var(--scalar-radius);\n color: var(--scalar-color-1);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n background-color: var(--scalar-background-2);\n margin-right: 4px;\n}\n\n.property-name-pattern-properties::before {\n content: 'regex';\n}\n\n.property-name-additional-properties,\n.property-name-pattern-properties {\n border: 1px dashed var(--scalar-border-color);\n color: var(--scalar-color-accent);\n display: inline-block;\n padding: 2px;\n border-radius: var(--scalar-radius);\n}\n</style>\n"],"mappings":""}
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
import WithBreadcrumb_default from "../../Anchor/WithBreadcrumb.vue.js";
|
|
2
|
+
import SpecificationExtension_default from "../../../features/specification-extension/SpecificationExtension.vue.js";
|
|
3
|
+
import { isTypeObject } from "./helpers/is-type-object.js";
|
|
4
|
+
import { hasComplexArrayItems } from "./helpers/has-complex-array-items.js";
|
|
5
|
+
import { getCompositionsToRender } from "./helpers/get-compositions-to-render.js";
|
|
6
|
+
import { getEnumValues } from "./helpers/get-enum-values.js";
|
|
7
|
+
import { getPropertyDescription } from "./helpers/get-property-description.js";
|
|
8
|
+
import { optimizeValueForDisplay } from "./helpers/optimize-value-for-display.js";
|
|
9
|
+
import { shouldDisplayDescription } from "./helpers/should-display-description.js";
|
|
10
|
+
import { shouldDisplayHeading } from "./helpers/should-display-heading.js";
|
|
11
|
+
import SchemaComposition_default from "./SchemaComposition.vue.js";
|
|
12
|
+
import SchemaEnums_default from "./SchemaEnums.vue.js";
|
|
13
|
+
import SchemaPropertyHeading_default from "./SchemaPropertyHeading.vue.js";
|
|
14
|
+
import Schema_default from "./Schema.vue.js";
|
|
15
|
+
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createSlots, createTextVNode, createVNode, defineComponent, normalizeClass, openBlock, renderList, resolveDynamicComponent, toDisplayString, unref, withCtx } from "vue";
|
|
16
|
+
import { ScalarMarkdown, ScalarWrappingText } from "@scalar/components";
|
|
17
|
+
import { resolve } from "@scalar/workspace-store/resolve";
|
|
18
|
+
import { isArraySchema } from "@scalar/workspace-store/schemas/v3.1/strict/type-guards";
|
|
19
|
+
//#region src/components/Content/Schema/SchemaProperty.vue?vue&type=script&setup=true&lang.ts
|
|
20
|
+
var _hoisted_1 = {
|
|
21
|
+
key: 0,
|
|
22
|
+
class: "property-name-pattern-properties"
|
|
23
|
+
};
|
|
24
|
+
var _hoisted_2 = {
|
|
25
|
+
key: 1,
|
|
26
|
+
class: "property-name-additional-properties"
|
|
27
|
+
};
|
|
28
|
+
var _hoisted_3 = {
|
|
29
|
+
key: 1,
|
|
30
|
+
class: "property-description"
|
|
31
|
+
};
|
|
32
|
+
var _hoisted_4 = {
|
|
33
|
+
key: 4,
|
|
34
|
+
class: "children"
|
|
35
|
+
};
|
|
36
|
+
var _hoisted_5 = {
|
|
37
|
+
key: 5,
|
|
38
|
+
class: "children"
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Note: We're taking in a prop called `value` which should be a JSON Schema.
|
|
42
|
+
*
|
|
43
|
+
* We're using `optimizeValueForDisplay` to merge null types in compositions (anyOf, allOf, oneOf, not).
|
|
44
|
+
* So you should basically use the optimizedValue everywhere in the component.
|
|
45
|
+
*/
|
|
46
|
+
var SchemaProperty_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
47
|
+
__name: "SchemaProperty",
|
|
48
|
+
props: {
|
|
49
|
+
is: {},
|
|
50
|
+
schema: {},
|
|
51
|
+
noncollapsible: { type: Boolean },
|
|
52
|
+
level: { default: 0 },
|
|
53
|
+
name: {},
|
|
54
|
+
required: {
|
|
55
|
+
type: Boolean,
|
|
56
|
+
default: false
|
|
57
|
+
},
|
|
58
|
+
compact: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
default: false
|
|
61
|
+
},
|
|
62
|
+
discriminator: {},
|
|
63
|
+
description: {},
|
|
64
|
+
hideModelNames: {
|
|
65
|
+
type: Boolean,
|
|
66
|
+
default: false
|
|
67
|
+
},
|
|
68
|
+
hideHeading: { type: Boolean },
|
|
69
|
+
modelName: {},
|
|
70
|
+
variant: {},
|
|
71
|
+
breadcrumb: {},
|
|
72
|
+
eventBus: {},
|
|
73
|
+
options: {},
|
|
74
|
+
propertyNamesEnum: {}
|
|
75
|
+
},
|
|
76
|
+
setup(__props) {
|
|
77
|
+
const props = __props;
|
|
78
|
+
/** Simplified composition with `null` type. */
|
|
79
|
+
const optimizedValue = computed(() => optimizeValueForDisplay(props.schema));
|
|
80
|
+
const childBreadcrumb = computed(() => props.breadcrumb && props.name ? [...props.breadcrumb, props.name] : void 0);
|
|
81
|
+
const shouldHaveLink = computed(() => props.level <= 1);
|
|
82
|
+
/** Checks if array items have complex structure */
|
|
83
|
+
const hasComplexArrayItemsComputed = computed(() => hasComplexArrayItems(optimizedValue.value));
|
|
84
|
+
/** Check if enum should be displayed (from value schema or from propertyNames) */
|
|
85
|
+
const hasEnum = computed(() => enumValues.value.length > 0);
|
|
86
|
+
/** Determine if object properties should be displayed */
|
|
87
|
+
const shouldRenderObjectProperties = computed(() => {
|
|
88
|
+
const value = optimizedValue.value;
|
|
89
|
+
if (!value) return false;
|
|
90
|
+
return isTypeObject(value) && ("properties" in value || "additionalProperties" in value);
|
|
91
|
+
});
|
|
92
|
+
/** Determine if array of objects should be rendered */
|
|
93
|
+
const shouldRenderArrayOfObjects = computed(() => {
|
|
94
|
+
const value = optimizedValue.value;
|
|
95
|
+
if (!value || !isArraySchema(value) || typeof value.items !== "object") return false;
|
|
96
|
+
return hasComplexArrayItemsComputed.value;
|
|
97
|
+
});
|
|
98
|
+
/** Extract enum values from schema or array items */
|
|
99
|
+
const enumValues = computed(() => getEnumValues(optimizedValue.value));
|
|
100
|
+
/** Generate property description from type/format */
|
|
101
|
+
const propertyDescription = computed(() => getPropertyDescription(optimizedValue.value));
|
|
102
|
+
/** Determine if description should be displayed */
|
|
103
|
+
const displayDescription = computed(() => shouldDisplayDescription(optimizedValue.value, props.description));
|
|
104
|
+
/**
|
|
105
|
+
* When the property already renders the description, avoid repeating it in the nested object schema card.
|
|
106
|
+
*/
|
|
107
|
+
const objectSchemaForChildren = computed(() => {
|
|
108
|
+
const value = optimizedValue.value;
|
|
109
|
+
if (!value || !displayDescription.value || !("description" in value)) return value;
|
|
110
|
+
const { description: _description, ...schemaWithoutDescription } = value;
|
|
111
|
+
return schemaWithoutDescription;
|
|
112
|
+
});
|
|
113
|
+
/** Determine if property heading should be displayed */
|
|
114
|
+
const shouldDisplayHeadingComputed = computed(() => shouldDisplayHeading(optimizedValue.value, props.name, props.required));
|
|
115
|
+
/** Computes which compositions should be rendered and with which values */
|
|
116
|
+
const compositionsToRender = computed(() => getCompositionsToRender(optimizedValue.value));
|
|
117
|
+
/** Get resolved array items for rendering */
|
|
118
|
+
const resolvedArrayItems = computed(() => {
|
|
119
|
+
const value = optimizedValue.value;
|
|
120
|
+
if (!value || !isArraySchema(value) || typeof value.items !== "object") return;
|
|
121
|
+
return resolve.schema(value.items);
|
|
122
|
+
});
|
|
123
|
+
/** Check if discriminator matches current property */
|
|
124
|
+
const isDiscriminatorProperty = computed(() => Boolean(props.name && props.discriminator?.propertyName === props.name));
|
|
125
|
+
return (_ctx, _cache) => {
|
|
126
|
+
return openBlock(), createBlock(resolveDynamicComponent(__props.is ?? "li"), { class: normalizeClass(["property", [`property--level-${__props.level}`, {
|
|
127
|
+
"property--compact": __props.compact,
|
|
128
|
+
"property--deprecated": optimizedValue.value?.deprecated
|
|
129
|
+
}]]) }, {
|
|
130
|
+
default: withCtx(() => [
|
|
131
|
+
shouldDisplayHeadingComputed.value ? (openBlock(), createBlock(SchemaPropertyHeading_default, {
|
|
132
|
+
key: 0,
|
|
133
|
+
class: "group",
|
|
134
|
+
enum: hasEnum.value,
|
|
135
|
+
hideModelNames: __props.hideModelNames,
|
|
136
|
+
isDiscriminator: isDiscriminatorProperty.value,
|
|
137
|
+
modelName: __props.modelName,
|
|
138
|
+
required: __props.required,
|
|
139
|
+
value: optimizedValue.value
|
|
140
|
+
}, createSlots({ _: 2 }, [__props.name ? {
|
|
141
|
+
name: "name",
|
|
142
|
+
fn: withCtx(() => [createVNode(unref(WithBreadcrumb_default), {
|
|
143
|
+
breadcrumb: shouldHaveLink.value ? childBreadcrumb.value : void 0,
|
|
144
|
+
eventBus: __props.eventBus
|
|
145
|
+
}, {
|
|
146
|
+
default: withCtx(() => [__props.variant === "patternProperties" ? (openBlock(), createElementBlock("span", _hoisted_1, [createVNode(unref(ScalarWrappingText), {
|
|
147
|
+
preset: "property",
|
|
148
|
+
text: __props.name
|
|
149
|
+
}, null, 8, ["text"])])) : __props.variant === "additionalProperties" ? (openBlock(), createElementBlock("span", _hoisted_2, [createVNode(unref(ScalarWrappingText), {
|
|
150
|
+
preset: "property",
|
|
151
|
+
text: __props.name
|
|
152
|
+
}, null, 8, ["text"])])) : (openBlock(), createBlock(unref(ScalarWrappingText), {
|
|
153
|
+
key: 2,
|
|
154
|
+
preset: "property",
|
|
155
|
+
text: __props.name
|
|
156
|
+
}, null, 8, ["text"]))]),
|
|
157
|
+
_: 1
|
|
158
|
+
}, 8, ["breadcrumb", "eventBus"])]),
|
|
159
|
+
key: "0"
|
|
160
|
+
} : void 0, optimizedValue.value?.example !== void 0 ? {
|
|
161
|
+
name: "example",
|
|
162
|
+
fn: withCtx(() => [createTextVNode(" Example: " + toDisplayString(optimizedValue.value.example), 1)]),
|
|
163
|
+
key: "1"
|
|
164
|
+
} : void 0]), 1032, [
|
|
165
|
+
"enum",
|
|
166
|
+
"hideModelNames",
|
|
167
|
+
"isDiscriminator",
|
|
168
|
+
"modelName",
|
|
169
|
+
"required",
|
|
170
|
+
"value"
|
|
171
|
+
])) : createCommentVNode("", true),
|
|
172
|
+
displayDescription.value || propertyDescription.value ? (openBlock(), createElementBlock("div", _hoisted_3, [createVNode(unref(ScalarMarkdown), { value: displayDescription.value || propertyDescription.value || "" }, null, 8, ["value"])])) : createCommentVNode("", true),
|
|
173
|
+
__props.propertyNamesEnum && __props.propertyNamesEnum.length > 0 ? (openBlock(), createBlock(SchemaEnums_default, {
|
|
174
|
+
key: 2,
|
|
175
|
+
propertyNames: "",
|
|
176
|
+
value: { enum: __props.propertyNamesEnum }
|
|
177
|
+
}, null, 8, ["value"])) : createCommentVNode("", true),
|
|
178
|
+
enumValues.value.length > 0 ? (openBlock(), createBlock(SchemaEnums_default, {
|
|
179
|
+
key: 3,
|
|
180
|
+
value: optimizedValue.value
|
|
181
|
+
}, null, 8, ["value"])) : createCommentVNode("", true),
|
|
182
|
+
shouldRenderObjectProperties.value ? (openBlock(), createElementBlock("div", _hoisted_4, [createVNode(Schema_default, {
|
|
183
|
+
breadcrumb: childBreadcrumb.value,
|
|
184
|
+
compact: __props.compact,
|
|
185
|
+
eventBus: __props.eventBus,
|
|
186
|
+
level: __props.level + 1,
|
|
187
|
+
name: __props.name,
|
|
188
|
+
noncollapsible: __props.noncollapsible,
|
|
189
|
+
options: __props.options,
|
|
190
|
+
schema: objectSchemaForChildren.value
|
|
191
|
+
}, null, 8, [
|
|
192
|
+
"breadcrumb",
|
|
193
|
+
"compact",
|
|
194
|
+
"eventBus",
|
|
195
|
+
"level",
|
|
196
|
+
"name",
|
|
197
|
+
"noncollapsible",
|
|
198
|
+
"options",
|
|
199
|
+
"schema"
|
|
200
|
+
])])) : createCommentVNode("", true),
|
|
201
|
+
shouldRenderArrayOfObjects.value && resolvedArrayItems.value ? (openBlock(), createElementBlock("div", _hoisted_5, [createVNode(Schema_default, {
|
|
202
|
+
compact: __props.compact,
|
|
203
|
+
eventBus: __props.eventBus,
|
|
204
|
+
level: __props.level + 1,
|
|
205
|
+
name: __props.name,
|
|
206
|
+
noncollapsible: __props.noncollapsible,
|
|
207
|
+
options: __props.options,
|
|
208
|
+
schema: unref(resolve).schema(resolvedArrayItems.value)
|
|
209
|
+
}, null, 8, [
|
|
210
|
+
"compact",
|
|
211
|
+
"eventBus",
|
|
212
|
+
"level",
|
|
213
|
+
"name",
|
|
214
|
+
"noncollapsible",
|
|
215
|
+
"options",
|
|
216
|
+
"schema"
|
|
217
|
+
])])) : createCommentVNode("", true),
|
|
218
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(compositionsToRender.value, (compositionData) => {
|
|
219
|
+
return openBlock(), createBlock(SchemaComposition_default, {
|
|
220
|
+
key: compositionData.composition,
|
|
221
|
+
breadcrumb: __props.breadcrumb,
|
|
222
|
+
compact: __props.compact,
|
|
223
|
+
composition: compositionData.composition,
|
|
224
|
+
discriminator: __props.schema?.discriminator,
|
|
225
|
+
eventBus: __props.eventBus,
|
|
226
|
+
hideHeading: __props.hideHeading,
|
|
227
|
+
level: __props.level,
|
|
228
|
+
name: __props.name,
|
|
229
|
+
noncollapsible: __props.noncollapsible,
|
|
230
|
+
options: __props.options,
|
|
231
|
+
schema: compositionData.value
|
|
232
|
+
}, null, 8, [
|
|
233
|
+
"breadcrumb",
|
|
234
|
+
"compact",
|
|
235
|
+
"composition",
|
|
236
|
+
"discriminator",
|
|
237
|
+
"eventBus",
|
|
238
|
+
"hideHeading",
|
|
239
|
+
"level",
|
|
240
|
+
"name",
|
|
241
|
+
"noncollapsible",
|
|
242
|
+
"options",
|
|
243
|
+
"schema"
|
|
244
|
+
]);
|
|
245
|
+
}), 128)),
|
|
246
|
+
createVNode(unref(SpecificationExtension_default), { value: optimizedValue.value }, null, 8, ["value"])
|
|
247
|
+
]),
|
|
248
|
+
_: 1
|
|
249
|
+
}, 8, ["class"]);
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
//#endregion
|
|
254
|
+
export { SchemaProperty_vue_vue_type_script_setup_true_lang_default as default };
|
|
255
|
+
|
|
256
|
+
//# sourceMappingURL=SchemaProperty.vue.script.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SchemaProperty.vue.script.js","names":[],"sources":["../../../../src/components/Content/Schema/SchemaProperty.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarMarkdown, ScalarWrappingText } from '@scalar/components'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { resolve } from '@scalar/workspace-store/resolve'\nimport type {\n DiscriminatorObject,\n SchemaObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { isArraySchema } from '@scalar/workspace-store/schemas/v3.1/strict/type-guards'\nimport { computed, type Component } from 'vue'\n\nimport { WithBreadcrumb } from '@/components/Anchor'\nimport { isTypeObject } from '@/components/Content/Schema/helpers/is-type-object'\nimport type { SchemaOptions } from '@/components/Content/Schema/types'\nimport { SpecificationExtension } from '@/features/specification-extension'\n\nimport { getCompositionsToRender } from './helpers/get-compositions-to-render'\nimport { getEnumValues } from './helpers/get-enum-values'\nimport { getPropertyDescription } from './helpers/get-property-description'\nimport { hasComplexArrayItems } from './helpers/has-complex-array-items'\nimport { optimizeValueForDisplay } from './helpers/optimize-value-for-display'\nimport { shouldDisplayDescription } from './helpers/should-display-description'\nimport { shouldDisplayHeading } from './helpers/should-display-heading'\nimport Schema from './Schema.vue'\nimport SchemaComposition from './SchemaComposition.vue'\nimport SchemaEnums from './SchemaEnums.vue'\nimport SchemaPropertyHeading from './SchemaPropertyHeading.vue'\n\n/**\n * Note: We're taking in a prop called `value` which should be a JSON Schema.\n *\n * We're using `optimizeValueForDisplay` to merge null types in compositions (anyOf, allOf, oneOf, not).\n * So you should basically use the optimizedValue everywhere in the component.\n */\n\nconst props = withDefaults(\n defineProps<{\n is?: string | Component\n schema: SchemaObject | undefined\n noncollapsible?: boolean\n level?: number\n name?: string\n required?: boolean\n compact?: boolean\n discriminator?: DiscriminatorObject\n description?: string\n hideModelNames?: boolean\n hideHeading?: boolean\n /** When the root schema was resolved from a $ref, pass the ref name for display (e.g. \"Data\"). */\n modelName?: string | null\n variant?: 'additionalProperties' | 'patternProperties'\n breadcrumb?: string[]\n eventBus: WorkspaceEventBus | null\n options: SchemaOptions\n /** Enum values for property names (from JSON Schema propertyNames keyword). */\n propertyNamesEnum?: string[]\n }>(),\n {\n level: 0,\n required: false,\n compact: false,\n hideModelNames: false,\n },\n)\n\n/** Simplified composition with `null` type. */\nconst optimizedValue = computed(() => optimizeValueForDisplay(props.schema))\n\nconst childBreadcrumb = computed<string[] | undefined>(() =>\n props.breadcrumb && props.name\n ? [...props.breadcrumb, props.name]\n : undefined,\n)\n\nconst shouldHaveLink = computed(() => props.level <= 1)\n\n/** Checks if array items have complex structure */\nconst hasComplexArrayItemsComputed = computed(() =>\n hasComplexArrayItems(optimizedValue.value),\n)\n\n/** Check if enum should be displayed (from value schema or from propertyNames) */\nconst hasEnum = computed(() => enumValues.value.length > 0)\n\n/** Determine if object properties should be displayed */\nconst shouldRenderObjectProperties = computed(() => {\n const value = optimizedValue.value\n if (!value) {\n return false\n }\n\n return (\n isTypeObject(value) &&\n ('properties' in value || 'additionalProperties' in value)\n )\n})\n\n/** Determine if array of objects should be rendered */\nconst shouldRenderArrayOfObjects = computed(() => {\n const value = optimizedValue.value\n if (!value || !isArraySchema(value) || typeof value.items !== 'object') {\n return false\n }\n\n return hasComplexArrayItemsComputed.value\n})\n\n/** Extract enum values from schema or array items */\nconst enumValues = computed(() => getEnumValues(optimizedValue.value))\n\n/** Generate property description from type/format */\nconst propertyDescription = computed(() =>\n getPropertyDescription(optimizedValue.value),\n)\n\n/** Determine if description should be displayed */\nconst displayDescription = computed(() =>\n shouldDisplayDescription(optimizedValue.value, props.description),\n)\n\n/**\n * When the property already renders the description, avoid repeating it in the nested object schema card.\n */\nconst objectSchemaForChildren = computed(() => {\n const value = optimizedValue.value\n if (!value || !displayDescription.value || !('description' in value)) {\n return value\n }\n\n const { description: _description, ...schemaWithoutDescription } = value\n return schemaWithoutDescription as SchemaObject\n})\n\n/** Determine if property heading should be displayed */\nconst shouldDisplayHeadingComputed = computed(() =>\n shouldDisplayHeading(optimizedValue.value, props.name, props.required),\n)\n\n/** Computes which compositions should be rendered and with which values */\nconst compositionsToRender = computed(() =>\n getCompositionsToRender(optimizedValue.value),\n)\n\n/** Get resolved array items for rendering */\nconst resolvedArrayItems = computed(() => {\n const value = optimizedValue.value\n if (!value || !isArraySchema(value) || typeof value.items !== 'object') {\n return undefined\n }\n return resolve.schema(value.items)\n})\n\n/** Check if discriminator matches current property */\nconst isDiscriminatorProperty = computed(() =>\n Boolean(props.name && props.discriminator?.propertyName === props.name),\n)\n</script>\n<template>\n <component\n :is=\"is ?? 'li'\"\n class=\"property\"\n :class=\"[\n `property--level-${level}`,\n {\n 'property--compact': compact,\n 'property--deprecated': optimizedValue?.deprecated,\n },\n ]\">\n <SchemaPropertyHeading\n v-if=\"shouldDisplayHeadingComputed\"\n class=\"group\"\n :enum=\"hasEnum\"\n :hideModelNames\n :isDiscriminator=\"isDiscriminatorProperty\"\n :modelName=\"modelName\"\n :required\n :value=\"optimizedValue\">\n <template\n v-if=\"name\"\n #name>\n <WithBreadcrumb\n :breadcrumb=\"shouldHaveLink ? childBreadcrumb : undefined\"\n :eventBus=\"eventBus\">\n <span\n v-if=\"variant === 'patternProperties'\"\n class=\"property-name-pattern-properties\">\n <ScalarWrappingText\n preset=\"property\"\n :text=\"name\" />\n </span>\n <span\n v-else-if=\"variant === 'additionalProperties'\"\n class=\"property-name-additional-properties\">\n <ScalarWrappingText\n preset=\"property\"\n :text=\"name\" />\n </span>\n <ScalarWrappingText\n v-else\n preset=\"property\"\n :text=\"name\" />\n </WithBreadcrumb>\n </template>\n <template\n v-if=\"optimizedValue?.example !== undefined\"\n #example>\n Example:\n {{ optimizedValue.example }}\n </template>\n </SchemaPropertyHeading>\n\n <!-- Description -->\n <div\n v-if=\"displayDescription || propertyDescription\"\n class=\"property-description\">\n <ScalarMarkdown\n :value=\"displayDescription || propertyDescription || ''\" />\n </div>\n\n <!-- Enum for property names -->\n <SchemaEnums\n v-if=\"propertyNamesEnum && propertyNamesEnum.length > 0\"\n propertyNames\n :value=\"{ enum: propertyNamesEnum } as SchemaObject\" />\n\n <!-- Enum values -->\n <SchemaEnums\n v-if=\"enumValues.length > 0\"\n :value=\"optimizedValue\" />\n\n <!-- Object -->\n <div\n v-if=\"shouldRenderObjectProperties\"\n class=\"children\">\n <Schema\n :breadcrumb=\"childBreadcrumb\"\n :compact=\"compact\"\n :eventBus=\"eventBus\"\n :level=\"level + 1\"\n :name=\"name\"\n :noncollapsible=\"noncollapsible\"\n :options=\"options\"\n :schema=\"objectSchemaForChildren\" />\n </div>\n\n <!-- Array of objects or nested arrays -->\n <div\n v-if=\"shouldRenderArrayOfObjects && resolvedArrayItems\"\n class=\"children\">\n <Schema\n :compact=\"compact\"\n :eventBus=\"eventBus\"\n :level=\"level + 1\"\n :name=\"name\"\n :noncollapsible=\"noncollapsible\"\n :options=\"options\"\n :schema=\"resolve.schema(resolvedArrayItems)\" />\n </div>\n\n <!-- Compositions -->\n <SchemaComposition\n v-for=\"compositionData in compositionsToRender\"\n :key=\"compositionData.composition\"\n :breadcrumb=\"breadcrumb\"\n :compact=\"compact\"\n :composition=\"compositionData.composition\"\n :discriminator=\"schema?.discriminator\"\n :eventBus=\"eventBus\"\n :hideHeading=\"hideHeading\"\n :level=\"level\"\n :name=\"name\"\n :noncollapsible=\"noncollapsible\"\n :options=\"options\"\n :schema=\"compositionData.value\" />\n <SpecificationExtension :value=\"optimizedValue\" />\n </component>\n</template>\n\n<style scoped>\n.property {\n color: var(--scalar-color-1);\n display: flex;\n flex-direction: column;\n padding: 10px;\n font-size: var(--scalar-small);\n position: relative;\n}\n\n/** Remove top padding for top level schema card */\n.property.property--level-0:has(\n > .property-rule\n > .schema-card\n > .schema-properties.schema-properties-open\n > ul\n > li.property\n ) {\n padding-top: 0;\n}\n\n.property--compact.property--level-0,\n.property--compact.property--level-1 {\n padding: 10px 0;\n}\n\n.composition-panel .property.property.property.property--level-0 {\n padding: 0px;\n}\n\n.property--compact.property--level-0\n .composition-panel\n .property--compact.property--level-1 {\n padding: 8px;\n}\n\n/* if a property doesn't have a heading, remove the top padding */\n.property:has(> .property-rule:nth-of-type(1)):not(.property--compact) {\n padding-top: 8px;\n padding-bottom: 8px;\n}\n\n.property--deprecated {\n background: repeating-linear-gradient(\n -45deg,\n var(--scalar-background-2) 0,\n var(--scalar-background-2) 2px,\n transparent 2px,\n transparent 5px\n );\n background-size: 100%;\n}\n\n.property--deprecated > * {\n opacity: 0.75;\n}\n\n.property-description {\n margin-top: 6px;\n line-height: 1.4;\n font-size: var(--scalar-small);\n}\n\n.property-description:has(+ .property-rule) {\n margin-bottom: 9px;\n}\n\n:deep(.property-description) * {\n color: var(--scalar-color-2) !important;\n}\n\n.property:not(:last-of-type) {\n border-bottom: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n\n.property-description + .children,\n.children + .property-rule {\n margin-top: 9px;\n}\n\n.children {\n display: flex;\n flex-direction: column;\n}\n\n.children .property--compact.property--level-1 {\n padding: 12px;\n}\n\n.property-example-value {\n all: unset;\n font-family: var(--scalar-font-code);\n padding: 6px;\n border-top: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n\n.property-rule {\n border-radius: var(--scalar-radius-lg);\n display: flex;\n flex-direction: column;\n}\n\n.property-rule\n :deep(\n .composition-panel\n .schema-card--level-1\n > .schema-properties.schema-properties-open\n ) {\n border-radius: 0 0 var(--scalar-radius-lg) var(--scalar-radius-lg);\n}\n\n.property-rule\n :deep(.composition-panel > .schema-card > .schema-card-description) {\n padding: 10px;\n border-left: var(--scalar-border-width) solid var(--scalar-border-color);\n border-right: var(--scalar-border-width) solid var(--scalar-border-color);\n\n & + .schema-properties {\n margin-top: 0;\n }\n}\n\n.property-example {\n background: transparent;\n border: none;\n display: flex;\n flex-direction: row;\n gap: 8px;\n}\n\n.property-example-label,\n.property-example-value {\n padding: 3px 0 0 0;\n}\n\n.property-example-value {\n background: var(--scalar-background-2);\n border-top: 0;\n border-radius: var(--scalar-radius);\n padding: 3px 4px;\n}\n\n.property-name {\n font-family: var(--scalar-font-code);\n font-weight: var(--scalar-semibold);\n}\n\n.property-name-additional-properties::before,\n.property-name-pattern-properties::before {\n text-transform: uppercase;\n font-size: var(--scalar-micro);\n display: inline-block;\n padding: 2px 4px;\n border-radius: var(--scalar-radius);\n color: var(--scalar-color-1);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n background-color: var(--scalar-background-2);\n margin-right: 4px;\n}\n\n.property-name-pattern-properties::before {\n content: 'regex';\n}\n\n.property-name-additional-properties,\n.property-name-pattern-properties {\n border: 1px dashed var(--scalar-border-color);\n color: var(--scalar-color-accent);\n display: inline-block;\n padding: 2px;\n border-radius: var(--scalar-radius);\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmCA,MAAM,QAAQ;;EA+Bd,MAAM,iBAAiB,eAAe,wBAAwB,MAAM,OAAO,CAAA;EAE3E,MAAM,kBAAkB,eACtB,MAAM,cAAc,MAAM,OACtB,CAAC,GAAG,MAAM,YAAY,MAAM,KAAI,GAChC,KAAA,EACN;EAEA,MAAM,iBAAiB,eAAe,MAAM,SAAS,EAAC;;EAGtD,MAAM,+BAA+B,eACnC,qBAAqB,eAAe,MAAM,CAC5C;;EAGA,MAAM,UAAU,eAAe,WAAW,MAAM,SAAS,EAAC;;EAG1D,MAAM,+BAA+B,eAAe;GAClD,MAAM,QAAQ,eAAe;AAC7B,OAAI,CAAC,MACH,QAAO;AAGT,UACE,aAAa,MAAM,KAClB,gBAAgB,SAAS,0BAA0B;IAEvD;;EAGD,MAAM,6BAA6B,eAAe;GAChD,MAAM,QAAQ,eAAe;AAC7B,OAAI,CAAC,SAAS,CAAC,cAAc,MAAM,IAAI,OAAO,MAAM,UAAU,SAC5D,QAAO;AAGT,UAAO,6BAA6B;IACrC;;EAGD,MAAM,aAAa,eAAe,cAAc,eAAe,MAAM,CAAA;;EAGrE,MAAM,sBAAsB,eAC1B,uBAAuB,eAAe,MAAM,CAC9C;;EAGA,MAAM,qBAAqB,eACzB,yBAAyB,eAAe,OAAO,MAAM,YAAY,CACnE;;;;EAKA,MAAM,0BAA0B,eAAe;GAC7C,MAAM,QAAQ,eAAe;AAC7B,OAAI,CAAC,SAAS,CAAC,mBAAmB,SAAS,EAAE,iBAAiB,OAC5D,QAAO;GAGT,MAAM,EAAE,aAAa,cAAc,GAAG,6BAA6B;AACnE,UAAO;IACR;;EAGD,MAAM,+BAA+B,eACnC,qBAAqB,eAAe,OAAO,MAAM,MAAM,MAAM,SAAS,CACxE;;EAGA,MAAM,uBAAuB,eAC3B,wBAAwB,eAAe,MAAM,CAC/C;;EAGA,MAAM,qBAAqB,eAAe;GACxC,MAAM,QAAQ,eAAe;AAC7B,OAAI,CAAC,SAAS,CAAC,cAAc,MAAM,IAAI,OAAO,MAAM,UAAU,SAC5D;AAEF,UAAO,QAAQ,OAAO,MAAM,MAAK;IAClC;;EAGD,MAAM,0BAA0B,eAC9B,QAAQ,MAAM,QAAQ,MAAM,eAAe,iBAAiB,MAAM,KAAK,CACzE;;uBAGE,YAqHY,wBApHL,QAAA,MAAE,KAAA,EAAA,EACP,OAAK,eAAA,CAAC,YAAU,CAAA,mBACmB,QAAA,SAAA;yBAA8C,QAAA;4BAAyC,eAAA,OAAgB;;2BAgDlH;KAxChB,6BAAA,SAAA,WAAA,EADR,YAyCwB,+BAAA;;MAvCtB,OAAM;MACL,MAAM,QAAA;MACN,gBAAA,QAAA;MACA,iBAAiB,wBAAA;MACjB,WAAW,QAAA;MACX,UAAA,QAAA;MACA,OAAO,eAAA;+BAEA,QAAA,OAAA;YACL;wBAsBgB,CArBjB,YAqBiB,MAAA,uBAAA,EAAA;OApBd,YAAY,eAAA,QAAiB,gBAAA,QAAkB,KAAA;OAC/C,UAAU,QAAA;;8BAOJ,CALC,QAAA,YAAO,uBAAA,WAAA,EADf,mBAMO,QANP,YAMO,CAHL,YAEiB,MAAA,mBAAA,EAAA;QADf,QAAO;QACN,MAAM,QAAA;kCAGE,QAAA,YAAO,0BAAA,WAAA,EADpB,mBAMO,QANP,YAMO,CAHL,YAEiB,MAAA,mBAAA,EAAA;QADf,QAAO;QACN,MAAM,QAAA;gDAEX,YAGiB,MAAA,mBAAA,EAAA;;QADf,QAAO;QACN,MAAM,QAAA;;;;;iBAIL,eAAA,OAAgB,YAAY,KAAA,IAAA;YACjC;wBAED,CAAA,gBAFS,eAET,gBAAG,eAAA,MAAe,QAAO,EAAA,EAAA,CAAA,CAAA;;;;;;;;;;KAMrB,mBAAA,SAAsB,oBAAA,SAAA,WAAA,EAD9B,mBAKM,OALN,YAKM,CAFJ,YAC6D,MAAA,eAAA,EAAA,EAA1D,OAAO,mBAAA,SAAsB,oBAAA,SAAmB,IAAA,EAAA,MAAA,GAAA,CAAA,QAAA,CAAA,CAAA,CAAA,IAAA,mBAAA,IAAA,KAAA;KAK7C,QAAA,qBAAqB,QAAA,kBAAkB,SAAM,KAAA,WAAA,EADrD,YAGyD,qBAAA;;MADvD,eAAA;MACC,OAAK,EAAA,MAAU,QAAA,mBAAiB;;KAI3B,WAAA,MAAW,SAAM,KAAA,WAAA,EADzB,YAE4B,qBAAA;;MAAzB,OAAO,eAAA;;KAIF,6BAAA,SAAA,WAAA,EADR,mBAYM,OAZN,YAYM,CATJ,YAQsC,gBAAA;MAPnC,YAAY,gBAAA;MACZ,SAAS,QAAA;MACT,UAAU,QAAA;MACV,OAAO,QAAA,QAAK;MACZ,MAAM,QAAA;MACN,gBAAgB,QAAA;MAChB,SAAS,QAAA;MACT,QAAQ,wBAAA;;;;;;;;;;;KAKL,2BAAA,SAA8B,mBAAA,SAAA,WAAA,EADtC,mBAWM,OAXN,YAWM,CARJ,YAOiD,gBAAA;MAN9C,SAAS,QAAA;MACT,UAAU,QAAA;MACV,OAAO,QAAA,QAAK;MACZ,MAAM,QAAA;MACN,gBAAgB,QAAA;MAChB,SAAS,QAAA;MACT,QAAQ,MAAA,QAAO,CAAC,OAAO,mBAAA,MAAkB;;;;;;;;;;uBAI9C,mBAaoC,UAAA,MAAA,WAZR,qBAAA,QAAnB,oBAAe;0BADxB,YAaoC,2BAAA;OAXjC,KAAK,gBAAgB;OACrB,YAAY,QAAA;OACZ,SAAS,QAAA;OACT,aAAa,gBAAgB;OAC7B,eAAe,QAAA,QAAQ;OACvB,UAAU,QAAA;OACV,aAAa,QAAA;OACb,OAAO,QAAA;OACP,MAAM,QAAA;OACN,gBAAgB,QAAA;OAChB,SAAS,QAAA;OACT,QAAQ,gBAAgB;;;;;;;;;;;;;;;KAC3B,YAAkD,MAAA,+BAAA,EAAA,EAAzB,OAAO,eAAA,OAAc,EAAA,MAAA,GAAA,CAAA,QAAA,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import SchemaPropertyDefault_vue_vue_type_script_setup_true_lang_default from "./SchemaPropertyDefault.vue.script.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
//#region src/components/Content/Schema/SchemaPropertyDefault.vue
|
|
5
|
+
var SchemaPropertyDefault_default = /* @__PURE__ */ _plugin_vue_export_helper_default(SchemaPropertyDefault_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-4da5c70a"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { SchemaPropertyDefault_default as default };
|
|
8
|
+
|
|
9
|
+
//# sourceMappingURL=SchemaPropertyDefault.vue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SchemaPropertyDefault.vue.js","names":[],"sources":["../../../../src/components/Content/Schema/SchemaPropertyDefault.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarIcon } from '@scalar/components'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\n\nimport { formatValue } from './helpers/format-value'\n\ndefineProps<{\n value?: unknown\n}>()\n\nconst { copyToClipboard } = useClipboard()\n</script>\n<template>\n <template v-if=\"value !== undefined\">\n <div class=\"property-default\">\n <button\n class=\"property-default-label\"\n type=\"button\">\n <span>Default</span>\n </button>\n <div class=\"property-default-value-list\">\n <button\n class=\"property-default-value group\"\n type=\"button\"\n @click=\"copyToClipboard(formatValue(value))\">\n <span>\n {{ formatValue(value) }}\n </span>\n <ScalarIcon\n class=\"group-hover:text-c-1 text-c-3 ml-auto min-h-3 min-w-3\"\n icon=\"Clipboard\"\n size=\"xs\" />\n </button>\n </div>\n </div>\n </template>\n</template>\n\n<style scoped>\n.property-default {\n display: flex;\n flex-direction: column;\n font-size: var(--scalar-mini);\n position: relative;\n}\n.property-default:hover:before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 20px;\n border-radius: var(--scalar-radius);\n}\n.property-default:hover .property-default-label span {\n color: var(--scalar-color-1);\n}\n.property-default-label span {\n color: var(--scalar-color-3);\n position: relative;\n border-bottom: var(--scalar-border-width) dotted currentColor;\n}\n.property-default-value {\n font-family: var(--scalar-font-code);\n display: flex;\n gap: 8px;\n align-items: center;\n width: 100%;\n padding: 6px;\n}\n.property-default-value span {\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.property-default-value :deep(svg) {\n color: var(--scalar-color-3);\n}\n\n.property-default-value:hover :deep(svg) {\n color: var(--scalar-color-1);\n}\n\n.property-default-value {\n background: var(--scalar-background-2);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n border-radius: var(--scalar-radius);\n}\n.property-default-value-list {\n position: absolute;\n top: 18px;\n left: 50%;\n transform: translate3d(-50%, 0, 0);\n overflow: auto;\n background-color: var(--scalar-background-1);\n box-shadow: var(--scalar-shadow-1);\n border-radius: var(--scalar-radius-lg);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n padding: 9px;\n min-width: 200px;\n max-width: 300px;\n flex-direction: column;\n gap: 3px;\n display: none;\n z-index: 2;\n}\n.property-default:hover .property-default-value-list,\n.property-default:focus-within .property-default-value-list {\n display: flex;\n}\n</style>\n"],"mappings":""}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { formatValue } from "./helpers/format-value.js";
|
|
2
|
+
import { createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, openBlock, toDisplayString, unref } from "vue";
|
|
3
|
+
import { ScalarIcon } from "@scalar/components";
|
|
4
|
+
import { useClipboard } from "@scalar/use-hooks/useClipboard";
|
|
5
|
+
//#region src/components/Content/Schema/SchemaPropertyDefault.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
+
var _hoisted_1 = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "property-default"
|
|
9
|
+
};
|
|
10
|
+
var _hoisted_2 = { class: "property-default-value-list" };
|
|
11
|
+
var SchemaPropertyDefault_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
12
|
+
__name: "SchemaPropertyDefault",
|
|
13
|
+
props: { value: {} },
|
|
14
|
+
setup(__props) {
|
|
15
|
+
const { copyToClipboard } = useClipboard();
|
|
16
|
+
return (_ctx, _cache) => {
|
|
17
|
+
return __props.value !== void 0 ? (openBlock(), createElementBlock("div", _hoisted_1, [_cache[1] || (_cache[1] = createElementVNode("button", {
|
|
18
|
+
class: "property-default-label",
|
|
19
|
+
type: "button"
|
|
20
|
+
}, [createElementVNode("span", null, "Default")], -1)), createElementVNode("div", _hoisted_2, [createElementVNode("button", {
|
|
21
|
+
class: "property-default-value group",
|
|
22
|
+
type: "button",
|
|
23
|
+
onClick: _cache[0] || (_cache[0] = ($event) => unref(copyToClipboard)(unref(formatValue)(__props.value)))
|
|
24
|
+
}, [createElementVNode("span", null, toDisplayString(unref(formatValue)(__props.value)), 1), createVNode(unref(ScalarIcon), {
|
|
25
|
+
class: "group-hover:text-c-1 text-c-3 ml-auto min-h-3 min-w-3",
|
|
26
|
+
icon: "Clipboard",
|
|
27
|
+
size: "xs"
|
|
28
|
+
})])])])) : createCommentVNode("", true);
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
//#endregion
|
|
33
|
+
export { SchemaPropertyDefault_vue_vue_type_script_setup_true_lang_default as default };
|
|
34
|
+
|
|
35
|
+
//# sourceMappingURL=SchemaPropertyDefault.vue.script.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SchemaPropertyDefault.vue.script.js","names":[],"sources":["../../../../src/components/Content/Schema/SchemaPropertyDefault.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarIcon } from '@scalar/components'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\n\nimport { formatValue } from './helpers/format-value'\n\ndefineProps<{\n value?: unknown\n}>()\n\nconst { copyToClipboard } = useClipboard()\n</script>\n<template>\n <template v-if=\"value !== undefined\">\n <div class=\"property-default\">\n <button\n class=\"property-default-label\"\n type=\"button\">\n <span>Default</span>\n </button>\n <div class=\"property-default-value-list\">\n <button\n class=\"property-default-value group\"\n type=\"button\"\n @click=\"copyToClipboard(formatValue(value))\">\n <span>\n {{ formatValue(value) }}\n </span>\n <ScalarIcon\n class=\"group-hover:text-c-1 text-c-3 ml-auto min-h-3 min-w-3\"\n icon=\"Clipboard\"\n size=\"xs\" />\n </button>\n </div>\n </div>\n </template>\n</template>\n\n<style scoped>\n.property-default {\n display: flex;\n flex-direction: column;\n font-size: var(--scalar-mini);\n position: relative;\n}\n.property-default:hover:before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 20px;\n border-radius: var(--scalar-radius);\n}\n.property-default:hover .property-default-label span {\n color: var(--scalar-color-1);\n}\n.property-default-label span {\n color: var(--scalar-color-3);\n position: relative;\n border-bottom: var(--scalar-border-width) dotted currentColor;\n}\n.property-default-value {\n font-family: var(--scalar-font-code);\n display: flex;\n gap: 8px;\n align-items: center;\n width: 100%;\n padding: 6px;\n}\n.property-default-value span {\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.property-default-value :deep(svg) {\n color: var(--scalar-color-3);\n}\n\n.property-default-value:hover :deep(svg) {\n color: var(--scalar-color-1);\n}\n\n.property-default-value {\n background: var(--scalar-background-2);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n border-radius: var(--scalar-radius);\n}\n.property-default-value-list {\n position: absolute;\n top: 18px;\n left: 50%;\n transform: translate3d(-50%, 0, 0);\n overflow: auto;\n background-color: var(--scalar-background-1);\n box-shadow: var(--scalar-shadow-1);\n border-radius: var(--scalar-radius-lg);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n padding: 9px;\n min-width: 200px;\n max-width: 300px;\n flex-direction: column;\n gap: 3px;\n display: none;\n z-index: 2;\n}\n.property-default:hover .property-default-value-list,\n.property-default:focus-within .property-default-value-list {\n display: flex;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;EAUA,MAAM,EAAE,oBAAoB,cAAa;;UAGvB,QAAA,UAAU,KAAA,KAAA,WAAA,EACxB,mBAoBM,OApBN,YAoBM,CAAA,OAAA,OAAA,OAAA,KAnBJ,mBAIS,UAAA;IAHP,OAAM;IACN,MAAK;OACL,mBAAoB,QAAA,MAAd,UAAO,CAAA,EAAA,GAAA,GAEf,mBAaM,OAbN,YAaM,CAZJ,mBAWS,UAAA;IAVP,OAAM;IACN,MAAK;IACJ,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,MAAA,gBAAe,CAAC,MAAA,YAAW,CAAC,QAAA,MAAK,CAAA;OACzC,mBAEO,QAAA,MAAA,gBADF,MAAA,YAAW,CAAC,QAAA,MAAK,CAAA,EAAA,EAAA,EAEtB,YAGc,MAAA,WAAA,EAAA;IAFZ,OAAM;IACN,MAAK;IACL,MAAK"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import SchemaPropertyDetail_vue_vue_type_script_setup_true_lang_default from "./SchemaPropertyDetail.vue.script.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
//#region src/components/Content/Schema/SchemaPropertyDetail.vue
|
|
5
|
+
var SchemaPropertyDetail_default = /* @__PURE__ */ _plugin_vue_export_helper_default(SchemaPropertyDetail_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-1295f965"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { SchemaPropertyDetail_default as default };
|
|
8
|
+
|
|
9
|
+
//# sourceMappingURL=SchemaPropertyDetail.vue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SchemaPropertyDetail.vue.js","names":[],"sources":["../../../../src/components/Content/Schema/SchemaPropertyDetail.vue"],"sourcesContent":["<script lang=\"ts\" setup>\ndefineProps<{\n truncate?: boolean\n code?: boolean\n}>()\n</script>\n<template>\n <span\n class=\"property-detail\"\n :class=\"{ 'property-detail-truncate': truncate }\">\n <div\n v-if=\"$slots.prefix\"\n class=\"property-detail-prefix\">\n <slot name=\"prefix\" /> \n </div>\n <code\n v-if=\"code\"\n class=\"property-detail-value\">\n <slot />\n </code>\n <span\n v-else\n class=\"property-detail-value\">\n <slot />\n </span>\n </span>\n</template>\n<style scoped>\n.property-detail {\n display: inline-flex;\n}\n.property-detail + .property-detail:before {\n display: block;\n content: '·';\n margin: 0 0.5ch;\n}\n.property-detail-truncate {\n overflow: hidden;\n}\n\n.property-detail-truncate > .property-detail-value {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.property-detail-prefix {\n color: var(--scalar-color-2);\n}\n\ncode.property-detail-value {\n font-family: var(--scalar-font-code);\n font-size: var(--scalar-font-size-3);\n color: var(--scalar-color-2);\n background: color-mix(\n in srgb,\n var(--scalar-background-2),\n var(--scalar-background-1)\n );\n padding: 0 4px;\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n border-radius: var(--scalar-radius);\n}\n</style>\n"],"mappings":""}
|