@scalar/api-reference 1.57.2 → 1.57.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 +9 -0
- 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 +1 -1
- package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js.map +1 -1
- package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.script.js +2 -1
- package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.script.js.map +1 -1
- package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.js +1 -1
- package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.js.map +1 -1
- package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.script.js +2 -1
- package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.script.js.map +1 -1
- package/dist/blocks/scalar-info-block/components/InfoBlock.vue.d.ts +2 -1
- package/dist/blocks/scalar-info-block/components/InfoBlock.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-info-block/components/InfoBlock.vue.js.map +1 -1
- package/dist/blocks/scalar-info-block/components/InfoBlock.vue.script.js.map +1 -1
- package/dist/blocks/scalar-info-block/components/InfoLinks.vue.d.ts +2 -1
- package/dist/blocks/scalar-info-block/components/InfoLinks.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-info-block/components/InfoLinks.vue.js.map +1 -1
- package/dist/blocks/scalar-info-block/components/InfoLinks.vue.script.js +2 -1
- package/dist/blocks/scalar-info-block/components/InfoLinks.vue.script.js.map +1 -1
- package/dist/blocks/scalar-info-block/components/InfoMarkdownSection.vue.js.map +1 -1
- package/dist/blocks/scalar-info-block/components/InfoMarkdownSection.vue.script.js +1 -1
- package/dist/blocks/scalar-info-block/components/InfoMarkdownSection.vue.script.js.map +1 -1
- package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.d.ts +2 -1
- package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.js +1 -1
- package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.js.map +1 -1
- package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.script.js.map +1 -1
- package/dist/blocks/scalar-server-selector-block/components/Selector.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-server-selector-block/components/Selector.vue.js.map +1 -1
- package/dist/blocks/scalar-server-selector-block/components/Selector.vue.script.js +2 -1
- package/dist/blocks/scalar-server-selector-block/components/Selector.vue.script.js.map +1 -1
- package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.js.map +1 -1
- package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.script.js +1 -1
- package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.script.js.map +1 -1
- package/dist/browser/standalone.js +282 -268
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/AgentScalar/AgentScalarDrawer.vue.js +1 -1
- package/dist/components/AgentScalar/AgentScalarDrawer.vue.js.map +1 -1
- package/dist/components/AgentScalar/AgentScalarDrawer.vue.script.js +1 -1
- package/dist/components/AgentScalar/AgentScalarDrawer.vue.script.js.map +1 -1
- package/dist/components/AgentScalar/OpenMCPButton.vue.js +1 -1
- package/dist/components/AgentScalar/OpenMCPButton.vue.js.map +1 -1
- package/dist/components/AgentScalar/OpenMCPButton.vue.script.js +1 -1
- package/dist/components/AgentScalar/OpenMCPButton.vue.script.js.map +1 -1
- package/dist/components/Anchor/Anchor.vue.d.ts.map +1 -1
- package/dist/components/Anchor/Anchor.vue.js.map +1 -1
- package/dist/components/Anchor/Anchor.vue.script.js +2 -1
- package/dist/components/Anchor/Anchor.vue.script.js.map +1 -1
- package/dist/components/ApiReference.vue.js +1 -1
- package/dist/components/ApiReference.vue.js.map +1 -1
- package/dist/components/ApiReference.vue.script.js +6 -4
- package/dist/components/ApiReference.vue.script.js.map +1 -1
- package/dist/components/Content/Content.vue.js.map +1 -1
- package/dist/components/Content/Content.vue.script.js +1 -1
- package/dist/components/Content/Content.vue.script.js.map +1 -1
- package/dist/components/Content/Models/components/ModernLayout.vue.js.map +1 -1
- package/dist/components/Content/Models/components/ModernLayout.vue.script.js +1 -1
- package/dist/components/Content/Models/components/ModernLayout.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.js +1 -1
- package/dist/components/Content/Schema/Schema.vue.js.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.script.js +2 -1
- package/dist/components/Content/Schema/Schema.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaComposition.vue.js.map +1 -1
- package/dist/components/Content/Schema/SchemaComposition.vue.script.js +1 -1
- package/dist/components/Content/Schema/SchemaComposition.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.js.map +1 -1
- package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.script.js +2 -1
- package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/SchemaEnums.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaEnums.vue.js.map +1 -1
- package/dist/components/Content/Schema/SchemaEnums.vue.script.js +1 -1
- package/dist/components/Content/Schema/SchemaEnums.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/SchemaHeading.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaHeading.vue.js.map +1 -1
- package/dist/components/Content/Schema/SchemaHeading.vue.script.js +1 -1
- package/dist/components/Content/Schema/SchemaHeading.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.js.map +1 -1
- package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.script.js +2 -1
- package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.js.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.script.js +2 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyDefault.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaPropertyDefault.vue.js.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyDefault.vue.script.js +1 -1
- package/dist/components/Content/Schema/SchemaPropertyDefault.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.script.js +16 -5
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.script.js +3 -3
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/helpers/format-example.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/format-example.js +12 -8
- package/dist/components/Content/Schema/helpers/format-example.js.map +1 -1
- package/dist/components/Content/Tags/components/ClassicLayout.vue.js +1 -1
- package/dist/components/Content/Tags/components/ClassicLayout.vue.js.map +1 -1
- package/dist/components/Content/Tags/components/ClassicLayout.vue.script.js +1 -1
- package/dist/components/Content/Tags/components/ClassicLayout.vue.script.js.map +1 -1
- package/dist/components/Content/Tags/components/TagSection.vue.js.map +1 -1
- package/dist/components/Content/Tags/components/TagSection.vue.script.js +1 -1
- package/dist/components/Content/Tags/components/TagSection.vue.script.js.map +1 -1
- package/dist/components/GettingStarted.vue.js +1 -1
- package/dist/components/GettingStarted.vue.js.map +1 -1
- package/dist/components/GettingStarted.vue.script.js +4 -4
- package/dist/components/GettingStarted.vue.script.js.map +1 -1
- package/dist/components/MobileHeader.vue.d.ts.map +1 -1
- package/dist/components/MobileHeader.vue.js.map +1 -1
- package/dist/components/MobileHeader.vue.script.js +2 -1
- package/dist/components/MobileHeader.vue.script.js.map +1 -1
- package/dist/components/OperationsList/OperationsList.vue.js +1 -1
- package/dist/components/OperationsList/OperationsList.vue.js.map +1 -1
- package/dist/components/OperationsList/OperationsList.vue.script.js +1 -1
- package/dist/components/OperationsList/OperationsList.vue.script.js.map +1 -1
- package/dist/components/RenderPlugins/RenderPlugins.vue.js.map +1 -1
- package/dist/components/RenderPlugins/RenderPlugins.vue.script.js +1 -1
- package/dist/components/RenderPlugins/RenderPlugins.vue.script.js.map +1 -1
- package/dist/features/Operation/components/ContentTypeSelect.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ContentTypeSelect.vue.js.map +1 -1
- package/dist/features/Operation/components/ContentTypeSelect.vue.script.js +3 -1
- package/dist/features/Operation/components/ContentTypeSelect.vue.script.js.map +1 -1
- package/dist/features/Operation/components/Headers.vue.js +1 -1
- package/dist/features/Operation/components/Headers.vue.js.map +1 -1
- package/dist/features/Operation/components/Headers.vue.script.js +1 -1
- package/dist/features/Operation/components/Headers.vue.script.js.map +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.js +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.js.map +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.script.js +2 -1
- package/dist/features/Operation/components/ParameterListItem.vue.script.js.map +1 -1
- package/dist/features/Operation/components/RequestBody.vue.js +1 -1
- package/dist/features/Operation/components/RequestBody.vue.js.map +1 -1
- package/dist/features/Operation/components/RequestBody.vue.script.js +1 -1
- package/dist/features/Operation/components/RequestBody.vue.script.js.map +1 -1
- package/dist/features/Operation/components/SecurityRequirementBadge.vue.js.map +1 -1
- package/dist/features/Operation/components/SecurityRequirementBadge.vue.script.js +1 -1
- package/dist/features/Operation/components/SecurityRequirementBadge.vue.script.js.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.js +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.js.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.script.js +3 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.script.js.map +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.js +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.js.map +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.script.js +2 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.script.js.map +1 -1
- package/dist/features/Search/components/SearchButton.vue.d.ts.map +1 -1
- package/dist/features/Search/components/SearchButton.vue.js.map +1 -1
- package/dist/features/Search/components/SearchButton.vue.script.js +3 -1
- package/dist/features/Search/components/SearchButton.vue.script.js.map +1 -1
- package/dist/features/Search/components/SearchModal.vue.d.ts +1 -1
- package/dist/features/Search/components/SearchModal.vue.d.ts.map +1 -1
- package/dist/features/Search/components/SearchModal.vue.js +1 -1
- package/dist/features/Search/components/SearchModal.vue.js.map +1 -1
- package/dist/features/Search/components/SearchModal.vue.script.js +3 -1
- package/dist/features/Search/components/SearchModal.vue.script.js.map +1 -1
- package/dist/features/Search/components/SearchResult.vue.js.map +1 -1
- package/dist/features/Search/components/SearchResult.vue.script.js +1 -1
- package/dist/features/Search/components/SearchResult.vue.script.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.script.js +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.script.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.d.ts.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.script.js +2 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.script.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.d.ts.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.script.js +4 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.script.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.d.ts.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.script.js +2 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.script.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.d.ts.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.script.js +2 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.script.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.d.ts.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.script.js +3 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.script.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.script.js +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.script.js.map +1 -1
- package/dist/features/developer-tools/components/DeployApiReference.vue.js.map +1 -1
- package/dist/features/developer-tools/components/DeployApiReference.vue.script.js +1 -1
- package/dist/features/developer-tools/components/DeployApiReference.vue.script.js.map +1 -1
- package/dist/features/developer-tools/components/ModifyConfiguration.vue.d.ts.map +1 -1
- package/dist/features/developer-tools/components/ModifyConfiguration.vue.js.map +1 -1
- package/dist/features/developer-tools/components/ModifyConfiguration.vue.script.js +2 -1
- package/dist/features/developer-tools/components/ModifyConfiguration.vue.script.js.map +1 -1
- package/dist/features/developer-tools/components/ShareApiReference.vue.js.map +1 -1
- package/dist/features/developer-tools/components/ShareApiReference.vue.script.js +1 -1
- package/dist/features/developer-tools/components/ShareApiReference.vue.script.js.map +1 -1
- package/dist/features/example-responses/ExampleResponse.vue.d.ts.map +1 -1
- package/dist/features/example-responses/ExampleResponse.vue.js +1 -1
- package/dist/features/example-responses/ExampleResponse.vue.js.map +1 -1
- package/dist/features/example-responses/ExampleResponse.vue.script.js +2 -1
- package/dist/features/example-responses/ExampleResponse.vue.script.js.map +1 -1
- package/dist/features/example-responses/ExampleResponseTabList.vue.js +1 -1
- package/dist/features/example-responses/ExampleResponseTabList.vue.js.map +1 -1
- package/dist/features/example-responses/ExampleResponseTabList.vue.script.js +1 -1
- package/dist/features/example-responses/ExampleResponseTabList.vue.script.js.map +1 -1
- package/dist/features/example-responses/ExampleResponses.vue.js +1 -1
- package/dist/features/example-responses/ExampleResponses.vue.js.map +1 -1
- package/dist/features/example-responses/ExampleResponses.vue.script.js +3 -1
- package/dist/features/example-responses/ExampleResponses.vue.script.js.map +1 -1
- package/dist/features/example-responses/ExampleSchema.vue.d.ts.map +1 -1
- package/dist/features/example-responses/ExampleSchema.vue.js.map +1 -1
- package/dist/features/example-responses/ExampleSchema.vue.script.js +2 -1
- package/dist/features/example-responses/ExampleSchema.vue.script.js.map +1 -1
- package/dist/features/info-object/Contact.vue.js.map +1 -1
- package/dist/features/info-object/Contact.vue.script.js +1 -1
- package/dist/features/info-object/Contact.vue.script.js.map +1 -1
- package/dist/features/info-object/License.vue.d.ts +2 -1
- package/dist/features/info-object/License.vue.d.ts.map +1 -1
- package/dist/features/info-object/License.vue.js.map +1 -1
- package/dist/features/info-object/License.vue.script.js +7 -7
- package/dist/features/info-object/License.vue.script.js.map +1 -1
- package/dist/features/multiple-documents/DocumentSelector.vue.js.map +1 -1
- package/dist/features/multiple-documents/DocumentSelector.vue.script.js +1 -1
- package/dist/features/multiple-documents/DocumentSelector.vue.script.js.map +1 -1
- package/dist/features/specification-extension/SpecificationExtension.vue.js.map +1 -1
- package/dist/features/specification-extension/SpecificationExtension.vue.script.js +1 -1
- package/dist/features/specification-extension/SpecificationExtension.vue.script.js.map +1 -1
- package/dist/style.css +567 -567
- package/dist/vue-styles.css +350 -350
- package/package.json +14 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiReferenceToolbarConfigLayoutOptions.vue.script.js","names":[],"sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarFormInputGroup
|
|
1
|
+
{"version":3,"file":"ApiReferenceToolbarConfigLayoutOptions.vue.script.js","names":[],"sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarFormInputGroup } from '@scalar/components/form'\nimport { ScalarToggleInput } from '@scalar/components/toggle'\nimport type { ApiReferenceConfiguration } from '@scalar/types/api-reference'\n\ntype LayoutOptions = {\n showSidebar?: boolean\n defaultOpenFirstTag?: boolean\n defaultOpenAllTags?: boolean\n expandAllModelSections?: boolean\n expandAllResponses?: boolean\n hideClientButton?: boolean\n hideDarkModeToggle?: boolean\n hideModels?: boolean\n hideSearch?: boolean\n hideTestRequestButton?: boolean\n showOperationId?: boolean\n}\n\nconst { configuration } = defineProps<{\n configuration?: Partial<ApiReferenceConfiguration>\n}>()\n\nconst model = defineModel<LayoutOptions>({\n default: {},\n})\n\nfunction getValue(key: keyof LayoutOptions, defaultValue: boolean = false) {\n return model.value[key] ?? configuration?.[key] ?? defaultValue\n}\n\nfunction setValue(\n key: keyof LayoutOptions,\n value: boolean,\n defaultValue: boolean = false,\n) {\n if (value !== defaultValue) {\n model.value = { ...model.value, [key]: value }\n } else {\n model.value = Object.fromEntries(\n Object.entries(model.value).filter(([k]) => key !== k),\n )\n }\n}\n</script>\n<template>\n <ScalarFormInputGroup>\n <ScalarToggleInput\n :modelValue=\"getValue('showSidebar', true)\"\n @update:modelValue=\"(v) => setValue('showSidebar', !!v, true)\">\n Show Sidebar\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('defaultOpenFirstTag', true)\"\n @update:modelValue=\"(v) => setValue('defaultOpenFirstTag', !!v, true)\">\n Default Open First Tag\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('defaultOpenAllTags')\"\n @update:modelValue=\"(v) => setValue('defaultOpenAllTags', !!v)\">\n Default Open All Tags\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('expandAllModelSections')\"\n @update:modelValue=\"(v) => setValue('expandAllModelSections', !!v)\">\n Expand All Model Sections\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('expandAllResponses')\"\n @update:modelValue=\"(v) => setValue('expandAllResponses', !!v)\">\n Expand All Responses\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('hideClientButton')\"\n @update:modelValue=\"(v) => setValue('hideClientButton', !!v)\">\n Hide Client Button\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('hideDarkModeToggle')\"\n @update:modelValue=\"(v) => setValue('hideDarkModeToggle', !!v)\">\n Hide Dark Mode Toggle\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('hideModels')\"\n @update:modelValue=\"(v) => setValue('hideModels', !!v)\">\n Hide Models\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('hideSearch')\"\n @update:modelValue=\"(v) => setValue('hideSearch', !!v)\">\n Hide Search\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('showOperationId')\"\n @update:modelValue=\"(v) => setValue('showOperationId', !!v)\">\n Show Operation ID\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('hideTestRequestButton')\"\n @update:modelValue=\"(v) => setValue('hideTestRequestButton', !!v)\">\n Hide Test Request Button\n </ScalarToggleInput>\n </ScalarFormInputGroup>\n</template>\n"],"mappings":";;;;;;;;;;;;EAuBA,MAAM,QAAQ,SAA0B,SAAA,aAEvC;EAED,SAAS,SAAS,KAA0B,eAAwB,OAAO;AACzE,UAAO,MAAM,MAAM,QAAQ,QAAA,gBAAgB,QAAQ;;EAGrD,SAAS,SACP,KACA,OACA,eAAwB,OACxB;AACA,OAAI,UAAU,aACZ,OAAM,QAAQ;IAAE,GAAG,MAAM;KAAQ,MAAM;IAAM;OAE7C,OAAM,QAAQ,OAAO,YACnB,OAAO,QAAQ,MAAM,MAAM,CAAC,QAAQ,CAAC,OAAO,QAAQ,EAAE,CACxD;;;uBAKF,YAwDuB,MAAA,qBAAA,EAAA,MAAA;2BAnDD;KAJpB,YAIoB,MAAA,kBAAA,EAAA;MAHjB,YAAY,SAAQ,eAAA,KAAA;MACpB,uBAAiB,OAAA,OAAA,OAAA,MAAG,MAAM,SAAQ,eAAA,CAAA,CAAkB,GAAC,KAAA;;6BAExD,CAAA,GAAA,OAAA,QAAA,OAAA,MAAA,CAAA,gBAFiE,kBAEjE,GAAA,CAAA,EAAA,CAAA;;;KACA,YAIoB,MAAA,kBAAA,EAAA;MAHjB,YAAY,SAAQ,uBAAA,KAAA;MACpB,uBAAiB,OAAA,OAAA,OAAA,MAAG,MAAM,SAAQ,uBAAA,CAAA,CAA0B,GAAC,KAAA;;6BAEhE,CAAA,GAAA,OAAA,QAAA,OAAA,MAAA,CAAA,gBAFyE,4BAEzE,GAAA,CAAA,EAAA,CAAA;;;KACA,YAIoB,MAAA,kBAAA,EAAA;MAHjB,YAAY,SAAQ,qBAAA;MACpB,uBAAiB,OAAA,OAAA,OAAA,MAAG,MAAM,SAAQ,sBAAA,CAAA,CAAyB,EAAC;;6BAE/D,CAAA,GAAA,OAAA,QAAA,OAAA,MAAA,CAAA,gBAFkE,2BAElE,GAAA,CAAA,EAAA,CAAA;;;KACA,YAIoB,MAAA,kBAAA,EAAA;MAHjB,YAAY,SAAQ,yBAAA;MACpB,uBAAiB,OAAA,OAAA,OAAA,MAAG,MAAM,SAAQ,0BAAA,CAAA,CAA6B,EAAC;;6BAEnE,CAAA,GAAA,OAAA,QAAA,OAAA,MAAA,CAAA,gBAFsE,+BAEtE,GAAA,CAAA,EAAA,CAAA;;;KACA,YAIoB,MAAA,kBAAA,EAAA;MAHjB,YAAY,SAAQ,qBAAA;MACpB,uBAAiB,OAAA,OAAA,OAAA,MAAG,MAAM,SAAQ,sBAAA,CAAA,CAAyB,EAAC;;6BAE/D,CAAA,GAAA,OAAA,QAAA,OAAA,MAAA,CAAA,gBAFkE,0BAElE,GAAA,CAAA,EAAA,CAAA;;;KACA,YAIoB,MAAA,kBAAA,EAAA;MAHjB,YAAY,SAAQ,mBAAA;MACpB,uBAAiB,OAAA,OAAA,OAAA,MAAG,MAAM,SAAQ,oBAAA,CAAA,CAAuB,EAAC;;6BAE7D,CAAA,GAAA,OAAA,QAAA,OAAA,MAAA,CAAA,gBAFgE,wBAEhE,GAAA,CAAA,EAAA,CAAA;;;KACA,YAIoB,MAAA,kBAAA,EAAA;MAHjB,YAAY,SAAQ,qBAAA;MACpB,uBAAiB,OAAA,OAAA,OAAA,MAAG,MAAM,SAAQ,sBAAA,CAAA,CAAyB,EAAC;;6BAE/D,CAAA,GAAA,OAAA,QAAA,OAAA,MAAA,CAAA,gBAFkE,2BAElE,GAAA,CAAA,EAAA,CAAA;;;KACA,YAIoB,MAAA,kBAAA,EAAA;MAHjB,YAAY,SAAQ,aAAA;MACpB,uBAAiB,OAAA,OAAA,OAAA,MAAG,MAAM,SAAQ,cAAA,CAAA,CAAiB,EAAC;;6BAEvD,CAAA,GAAA,OAAA,QAAA,OAAA,MAAA,CAAA,gBAF0D,iBAE1D,GAAA,CAAA,EAAA,CAAA;;;KACA,YAIoB,MAAA,kBAAA,EAAA;MAHjB,YAAY,SAAQ,aAAA;MACpB,uBAAiB,OAAA,OAAA,OAAA,MAAG,MAAM,SAAQ,cAAA,CAAA,CAAiB,EAAC;;6BAEvD,CAAA,GAAA,OAAA,QAAA,OAAA,MAAA,CAAA,gBAF0D,iBAE1D,GAAA,CAAA,EAAA,CAAA;;;KACA,YAIoB,MAAA,kBAAA,EAAA;MAHjB,YAAY,SAAQ,kBAAA;MACpB,uBAAiB,OAAA,OAAA,OAAA,MAAG,MAAM,SAAQ,mBAAA,CAAA,CAAsB,EAAC;;6BAE5D,CAAA,GAAA,OAAA,QAAA,OAAA,MAAA,CAAA,gBAF+D,uBAE/D,GAAA,CAAA,EAAA,CAAA;;;KACA,YAIoB,MAAA,kBAAA,EAAA;MAHjB,YAAY,SAAQ,wBAAA;MACpB,uBAAiB,OAAA,QAAA,OAAA,OAAG,MAAM,SAAQ,yBAAA,CAAA,CAA4B,EAAC;;6BAElE,CAAA,GAAA,OAAA,QAAA,OAAA,MAAA,CAAA,gBAFqE,8BAErE,GAAA,CAAA,EAAA,CAAA"}
|
package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiReferenceToolbarConfigTheme.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ApiReferenceToolbarConfigTheme.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue"],"names":[],"mappings":"AAwEA,OAAO,EAAkC,KAAK,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAgC7E,KAAK,gBAAgB,GAAG;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AA6IF,QAAA,MAAM,YAAY;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiReferenceToolbarConfigTheme.vue.js","names":[],"sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport {\
|
|
1
|
+
{"version":3,"file":"ApiReferenceToolbarConfigTheme.vue.js","names":[],"sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarCombobox } from '@scalar/components/combobox'\nimport { ScalarFormInput } from '@scalar/components/form'\nimport { ScalarListboxCheckbox } from '@scalar/components/listbox'\nimport { ScalarThemeSwatches } from '@scalar/components/theme-swatches'\nimport { ScalarIconCaretDown } from '@scalar/icons'\nimport { presets, themeIds, themeLabels, type ThemeId } from '@scalar/themes'\nimport { computed } from 'vue'\n\ntype ThemeOption = {\n id: Exclude<ThemeId, 'none'>\n label: string\n css: string\n}\n\nconst model = defineModel<ThemeId>()\n\nconst options = computed<ThemeOption[]>(() =>\n themeIds\n .filter((id) => id !== 'none')\n .map((id) => ({\n id,\n label: themeLabels[id],\n css: presets[id].theme,\n })),\n)\nconst selected = computed<ThemeOption>({\n get: () => {\n const theme = model.value ?? 'default'\n return (\n options.value.find((o) => o.id === theme) ??\n (options.value[0] as ThemeOption)\n )\n },\n set: (option) => (model.value = option.id),\n})\n</script>\n<template>\n <ScalarCombobox\n v-model=\"selected\"\n :options\n resize>\n <template #default=\"{ open }\">\n <ScalarFormInput>\n <div class=\"min-w-0 flex-1 truncate text-left\">\n {{ selected.label }}\n </div>\n <ScalarThemeSwatches\n class=\"mr-2\"\n :css=\"selected.css\" />\n <ScalarIconCaretDown\n class=\"size-3.5 transition-transform\"\n :class=\"{ 'rotate-180': open }\" />\n </ScalarFormInput>\n </template>\n <template #option=\"{ selected, option }\">\n <ScalarListboxCheckbox :selected />\n <span class=\"text-c-1 inline-block min-w-0 flex-1 truncate\">\n {{ option.label }}\n </span>\n <ScalarThemeSwatches :css=\"option.css\" />\n </template>\n </ScalarCombobox>\n</template>\n"],"mappings":""}
|
package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.script.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { computed, createBlock, createElementVNode, createVNode, defineComponent, normalizeClass, openBlock, toDisplayString, unref, useModel, withCtx } from "vue";
|
|
2
|
-
import { ScalarCombobox, ScalarFormInput, ScalarListboxCheckbox, ScalarThemeSwatches } from "@scalar/components";
|
|
3
2
|
import { presets, themeIds, themeLabels } from "@scalar/themes";
|
|
4
3
|
import { ScalarIconCaretDown } from "@scalar/icons";
|
|
4
|
+
import { ScalarCombobox } from "@scalar/components/combobox";
|
|
5
|
+
import { ScalarListboxCheckbox } from "@scalar/components/listbox";
|
|
6
|
+
import { ScalarFormInput } from "@scalar/components/form";
|
|
7
|
+
import { ScalarThemeSwatches } from "@scalar/components/theme-swatches";
|
|
5
8
|
//#region src/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue?vue&type=script&setup=true&lang.ts
|
|
6
9
|
var _hoisted_1 = { class: "min-w-0 flex-1 truncate text-left" };
|
|
7
10
|
var _hoisted_2 = { class: "text-c-1 inline-block min-w-0 flex-1 truncate" };
|
package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.script.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiReferenceToolbarConfigTheme.vue.script.js","names":[],"sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport {\
|
|
1
|
+
{"version":3,"file":"ApiReferenceToolbarConfigTheme.vue.script.js","names":[],"sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarCombobox } from '@scalar/components/combobox'\nimport { ScalarFormInput } from '@scalar/components/form'\nimport { ScalarListboxCheckbox } from '@scalar/components/listbox'\nimport { ScalarThemeSwatches } from '@scalar/components/theme-swatches'\nimport { ScalarIconCaretDown } from '@scalar/icons'\nimport { presets, themeIds, themeLabels, type ThemeId } from '@scalar/themes'\nimport { computed } from 'vue'\n\ntype ThemeOption = {\n id: Exclude<ThemeId, 'none'>\n label: string\n css: string\n}\n\nconst model = defineModel<ThemeId>()\n\nconst options = computed<ThemeOption[]>(() =>\n themeIds\n .filter((id) => id !== 'none')\n .map((id) => ({\n id,\n label: themeLabels[id],\n css: presets[id].theme,\n })),\n)\nconst selected = computed<ThemeOption>({\n get: () => {\n const theme = model.value ?? 'default'\n return (\n options.value.find((o) => o.id === theme) ??\n (options.value[0] as ThemeOption)\n )\n },\n set: (option) => (model.value = option.id),\n})\n</script>\n<template>\n <ScalarCombobox\n v-model=\"selected\"\n :options\n resize>\n <template #default=\"{ open }\">\n <ScalarFormInput>\n <div class=\"min-w-0 flex-1 truncate text-left\">\n {{ selected.label }}\n </div>\n <ScalarThemeSwatches\n class=\"mr-2\"\n :css=\"selected.css\" />\n <ScalarIconCaretDown\n class=\"size-3.5 transition-transform\"\n :class=\"{ 'rotate-180': open }\" />\n </ScalarFormInput>\n </template>\n <template #option=\"{ selected, option }\">\n <ScalarListboxCheckbox :selected />\n <span class=\"text-c-1 inline-block min-w-0 flex-1 truncate\">\n {{ option.label }}\n </span>\n <ScalarThemeSwatches :css=\"option.css\" />\n </template>\n </ScalarCombobox>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;EAeA,MAAM,QAAQ,SAAoB,SAAA,aAAC;EAEnC,MAAM,UAAU,eACd,SACG,QAAQ,OAAO,OAAO,OAAM,CAC5B,KAAK,QAAQ;GACZ;GACA,OAAO,YAAY;GACnB,KAAK,QAAQ,IAAI;GAClB,EAAE,CACP;EACA,MAAM,WAAW,SAAsB;GACrC,WAAW;IACT,MAAM,QAAQ,MAAM,SAAS;AAC7B,WACE,QAAQ,MAAM,MAAM,MAAM,EAAE,OAAO,MAAM,IACxC,QAAQ,MAAM;;GAGnB,MAAM,WAAY,MAAM,QAAQ,OAAO;GACxC,CAAA;;uBAGC,YAwBiB,MAAA,eAAA,EAAA;gBAvBN,SAAA;0EAAQ,QAAA;IAChB,SAAA,QAAA;IACD,QAAA;;IACW,SAAO,SAWE,EAXE,WAAI,CACxB,YAUkB,MAAA,gBAAA,EAAA,MAAA;4BAPV;MAFN,mBAEM,OAFN,YAEM,gBADD,SAAA,MAAS,MAAK,EAAA,EAAA;MAEnB,YAEwB,MAAA,oBAAA,EAAA;OADtB,OAAM;OACL,KAAK,SAAA,MAAS;;MACjB,YAEoC,MAAA,oBAAA,EAAA,EADlC,OAAK,eAAA,CAAC,iCAA+B,EAAA,cACb,MAAI,CAAA,CAAA,EAAA,EAAA,MAAA,GAAA,CAAA,QAAA,CAAA;;;;IAGvB,QAAM,SACoB,EADhB,UAAU,aAAM;KACnC,YAAmC,MAAA,sBAAA,EAAA,EAAX,UAAQ,EAAA,MAAA,GAAA,CAAA,WAAA,CAAA;KAChC,mBAEO,QAFP,YAEO,gBADF,OAAO,MAAK,EAAA,EAAA;KAEjB,YAAyC,MAAA,oBAAA,EAAA,EAAnB,KAAK,OAAO,KAAA,EAAA,MAAA,GAAA,CAAA,MAAA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiReferenceToolbarPopover.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarPopover.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ApiReferenceToolbarPopover.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarPopover.vue"],"names":[],"mappings":"AA4LA,QAAA,IAAI,OAAO;;CAAU,EAAE,QAAQ,IAAW,EAAE,QAAQ;;;CAAW,EAAE,QAAQ,IAAW,EAAE,QAAQ,IAAY,CAAE;AAC5G,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAC3C;IAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC3C;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC7C;IAAE,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC1C;IAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAG9C,QAAA,MAAM,UAAU,+QACd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiReferenceToolbarPopover.vue.js","names":[],"sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarPopover.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarFloatingBackdrop
|
|
1
|
+
{"version":3,"file":"ApiReferenceToolbarPopover.vue.js","names":[],"sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarPopover.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarFloatingBackdrop } from '@scalar/components/floating'\nimport { ScalarPopover } from '@scalar/components/popover'\nimport { ScalarIconCaretDown, ScalarIconInfo } from '@scalar/icons'\n</script>\n\n<template>\n <ScalarPopover\n class=\"max-h-[inherit] max-w-[inherit] p-0 text-base\"\n placement=\"bottom-end\"\n teleport>\n <template #default=\"{ open }\">\n <slot\n name=\"button\"\n :open>\n <button\n class=\"text-c-2 hover:text-c-1 hover:bg-b-2 flex items-center gap-1 rounded px-2 py-2.25 text-base leading-none\"\n type=\"button\">\n <slot name=\"label\" />\n <ScalarIconCaretDown\n class=\"size-3\"\n :class=\"{ 'rotate-180': open }\" />\n </button>\n </slot>\n </template>\n <template #popover=\"props\">\n <div class=\"custom-scroll bg-b-1 flex flex-col gap-7 rounded-lg p-7 pb-6\">\n <slot v-bind=\"props\" />\n </div>\n <div class=\"text-c-2 flex items-center justify-center gap-1 p-2 text-sm\">\n <ScalarIconInfo class=\"size-3.5 shrink-0\" />\n <div>\n <slot name=\"info\">\n \"<slot name=\"label\" />\" will only appear when running on localhost.\n </slot>\n </div>\n </div>\n </template>\n <template #backdrop>\n <ScalarFloatingBackdrop class=\"bg-b-2 rounded-lg\" />\n </template>\n </ScalarPopover>\n</template>\n"],"mappings":""}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { createBlock, createElementVNode, createTextVNode, createVNode, defineComponent, guardReactiveProps, normalizeClass, normalizeProps, openBlock, renderSlot, unref, withCtx } from "vue";
|
|
2
|
-
import { ScalarFloatingBackdrop, ScalarPopover } from "@scalar/components";
|
|
3
2
|
import { ScalarIconCaretDown, ScalarIconInfo } from "@scalar/icons";
|
|
3
|
+
import { ScalarPopover } from "@scalar/components/popover";
|
|
4
|
+
import { ScalarFloatingBackdrop } from "@scalar/components/floating";
|
|
4
5
|
//#region src/features/developer-tools/components/ApiReferenceToolbarPopover.vue?vue&type=script&setup=true&lang.ts
|
|
5
6
|
var _hoisted_1 = {
|
|
6
7
|
class: "text-c-2 hover:text-c-1 hover:bg-b-2 flex items-center gap-1 rounded px-2 py-2.25 text-base leading-none",
|
package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.script.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiReferenceToolbarPopover.vue.script.js","names":[],"sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarPopover.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarFloatingBackdrop
|
|
1
|
+
{"version":3,"file":"ApiReferenceToolbarPopover.vue.script.js","names":[],"sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarPopover.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarFloatingBackdrop } from '@scalar/components/floating'\nimport { ScalarPopover } from '@scalar/components/popover'\nimport { ScalarIconCaretDown, ScalarIconInfo } from '@scalar/icons'\n</script>\n\n<template>\n <ScalarPopover\n class=\"max-h-[inherit] max-w-[inherit] p-0 text-base\"\n placement=\"bottom-end\"\n teleport>\n <template #default=\"{ open }\">\n <slot\n name=\"button\"\n :open>\n <button\n class=\"text-c-2 hover:text-c-1 hover:bg-b-2 flex items-center gap-1 rounded px-2 py-2.25 text-base leading-none\"\n type=\"button\">\n <slot name=\"label\" />\n <ScalarIconCaretDown\n class=\"size-3\"\n :class=\"{ 'rotate-180': open }\" />\n </button>\n </slot>\n </template>\n <template #popover=\"props\">\n <div class=\"custom-scroll bg-b-1 flex flex-col gap-7 rounded-lg p-7 pb-6\">\n <slot v-bind=\"props\" />\n </div>\n <div class=\"text-c-2 flex items-center justify-center gap-1 p-2 text-sm\">\n <ScalarIconInfo class=\"size-3.5 shrink-0\" />\n <div>\n <slot name=\"info\">\n \"<slot name=\"label\" />\" will only appear when running on localhost.\n </slot>\n </div>\n </div>\n </template>\n <template #backdrop>\n <ScalarFloatingBackdrop class=\"bg-b-2 rounded-lg\" />\n </template>\n </ScalarPopover>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;uBAOE,YAkCgB,MAAA,cAAA,EAAA;IAjCd,OAAM;IACN,WAAU;IACV,UAAA;;IACW,SAAO,SAYT,EAZa,WAAI,CACxB,WAWO,KAAA,QAAA,UAAA,EATJ,MAAI,QASA,CARL,mBAOS,UAPT,YAOS,CAJP,WAAqB,KAAA,QAAA,QAAA,EACrB,YAEoC,MAAA,oBAAA,EAAA,EADlC,OAAK,eAAA,CAAC,UAAQ,EAAA,cACU,MAAI,CAAA,CAAA,EAAA,EAAA,MAAA,GAAA,CAAA,QAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;IAIzB,SAAO,SAAE,UAAK,CACvB,mBAEM,OAFN,YAEM,CADJ,WAAuB,KAAA,QAAA,WAAA,eAAA,mBAAT,MAAK,CAAA,CAAA,CAAA,CAAA,EAErB,mBAOM,OAPN,YAOM,CANJ,YAA4C,MAAA,eAAA,EAAA,EAA5B,OAAM,qBAAmB,CAAA,EACzC,mBAIM,OAAA,MAAA,CAHJ,WAEO,KAAA,QAAA,QAAA,EAAA,QAAA;+CAFW,OACf,GAAA;KAAA,WAAqB,KAAA,QAAA,QAAA;+CAAA,mDACxB,GAAA;;IAIK,UAAQ,cACmC,CAApD,YAAoD,MAAA,uBAAA,EAAA,EAA5B,OAAM,qBAAmB,CAAA,CAAA,CAAA"}
|
package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiReferenceToolbarRegisterButton.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ApiReferenceToolbarRegisterButton.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue"],"names":[],"mappings":"AAqFA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAE/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAKpE,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,cAAc,CAAA;IACzB,YAAY,EAAE,YAAY,CAAA;IAC1B,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;CAChB,CAAC;AA6DF,KAAK,gBAAgB,GAAG;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAKF,KAAK,iBAAiB,GAAG,WAAW,GAAG,gBAAgB,CAAC;AAiDxD,QAAA,IAAI,QAAQ,IAAW,CAAE;AACzB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAKhD,QAAA,MAAM,UAAU;;;;kFAGd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiReferenceToolbarRegisterButton.vue.js","names":[],"sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarButton
|
|
1
|
+
{"version":3,"file":"ApiReferenceToolbarRegisterButton.vue.js","names":[],"sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarButton } from '@scalar/components/button'\nimport { useLoadingState } from '@scalar/components/loading'\nimport type { ExternalUrls } from '@scalar/types/api-reference'\nimport { useToasts } from '@scalar/use-toasts'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport { nextTick } from 'vue'\n\nimport { uploadTempDocument } from '@/helpers/upload-temp-document'\n\nconst {\n sdks = [],\n workspace,\n externalUrls,\n} = defineProps<{\n workspace: WorkspaceStore\n externalUrls: ExternalUrls\n sdks?: string[]\n}>()\n\nconst tempDocUrl = defineModel<string>('url')\n\nconst { toast } = useToasts()\nconst loader = useLoadingState()\n\n/** Open the registration link in a new tab */\nfunction openRegisterLink(docUrl: string) {\n const url = new URL(`${externalUrls.dashboardUrl}/register`)\n url.searchParams.set('url', docUrl)\n sdks.forEach((sdk) => url.searchParams.append('sdk', sdk))\n\n window.open(url.toString(), '_blank')\n}\n\n/** Generate and open the registration link */\nasync function generateRegisterLink() {\n if (loader.isLoading || !workspace) {\n return\n }\n\n // If we have already have a temporary document URL, use it\n if (tempDocUrl.value) {\n openRegisterLink(tempDocUrl.value)\n return\n }\n\n loader.start()\n\n const document = workspace.exportActiveDocument('json')\n\n if (!document) {\n toast('Unable to export active document', 'error')\n await loader.invalidate()\n return\n }\n\n try {\n tempDocUrl.value = await uploadTempDocument(document, externalUrls)\n await loader.validate()\n openRegisterLink(tempDocUrl.value)\n\n await nextTick()\n\n await loader.clear()\n } catch (error) {\n const message =\n error instanceof Error ? error.message : 'An unknown error occurred'\n toast(message, 'error')\n await loader.invalidate()\n }\n}\n</script>\n<template>\n <ScalarButton\n class=\"h-auto p-2.5\"\n :loader\n @click=\"generateRegisterLink\">\n <slot>Generate</slot>\n </ScalarButton>\n</template>\n"],"mappings":""}
|
package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.script.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { uploadTempDocument } from "../../../helpers/upload-temp-document.js";
|
|
2
2
|
import { createBlock, createTextVNode, defineComponent, mergeModels, nextTick, openBlock, renderSlot, unref, useModel, withCtx } from "vue";
|
|
3
|
-
import { ScalarButton, useLoadingState } from "@scalar/components";
|
|
4
3
|
import { useToasts } from "@scalar/use-toasts";
|
|
4
|
+
import { useLoadingState } from "@scalar/components/loading";
|
|
5
|
+
import { ScalarButton } from "@scalar/components/button";
|
|
5
6
|
//#region src/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue?vue&type=script&setup=true&lang.ts
|
|
6
7
|
var ApiReferenceToolbarRegisterButton_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
7
8
|
__name: "ApiReferenceToolbarRegisterButton",
|
package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.script.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiReferenceToolbarRegisterButton.vue.script.js","names":[],"sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarButton
|
|
1
|
+
{"version":3,"file":"ApiReferenceToolbarRegisterButton.vue.script.js","names":[],"sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarButton } from '@scalar/components/button'\nimport { useLoadingState } from '@scalar/components/loading'\nimport type { ExternalUrls } from '@scalar/types/api-reference'\nimport { useToasts } from '@scalar/use-toasts'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport { nextTick } from 'vue'\n\nimport { uploadTempDocument } from '@/helpers/upload-temp-document'\n\nconst {\n sdks = [],\n workspace,\n externalUrls,\n} = defineProps<{\n workspace: WorkspaceStore\n externalUrls: ExternalUrls\n sdks?: string[]\n}>()\n\nconst tempDocUrl = defineModel<string>('url')\n\nconst { toast } = useToasts()\nconst loader = useLoadingState()\n\n/** Open the registration link in a new tab */\nfunction openRegisterLink(docUrl: string) {\n const url = new URL(`${externalUrls.dashboardUrl}/register`)\n url.searchParams.set('url', docUrl)\n sdks.forEach((sdk) => url.searchParams.append('sdk', sdk))\n\n window.open(url.toString(), '_blank')\n}\n\n/** Generate and open the registration link */\nasync function generateRegisterLink() {\n if (loader.isLoading || !workspace) {\n return\n }\n\n // If we have already have a temporary document URL, use it\n if (tempDocUrl.value) {\n openRegisterLink(tempDocUrl.value)\n return\n }\n\n loader.start()\n\n const document = workspace.exportActiveDocument('json')\n\n if (!document) {\n toast('Unable to export active document', 'error')\n await loader.invalidate()\n return\n }\n\n try {\n tempDocUrl.value = await uploadTempDocument(document, externalUrls)\n await loader.validate()\n openRegisterLink(tempDocUrl.value)\n\n await nextTick()\n\n await loader.clear()\n } catch (error) {\n const message =\n error instanceof Error ? error.message : 'An unknown error occurred'\n toast(message, 'error')\n await loader.invalidate()\n }\n}\n</script>\n<template>\n <ScalarButton\n class=\"h-auto p-2.5\"\n :loader\n @click=\"generateRegisterLink\">\n <slot>Generate</slot>\n </ScalarButton>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;EAoBA,MAAM,aAAa,SAAmB,SAAC,MAAK;EAE5C,MAAM,EAAE,UAAU,WAAU;EAC5B,MAAM,SAAS,iBAAgB;;EAG/B,SAAS,iBAAiB,QAAgB;GACxC,MAAM,MAAM,IAAI,IAAI,GAAG,QAAA,aAAa,aAAa,WAAU;AAC3D,OAAI,aAAa,IAAI,OAAO,OAAM;AAClC,WAAA,KAAK,SAAS,QAAQ,IAAI,aAAa,OAAO,OAAO,IAAI,CAAA;AAEzD,UAAO,KAAK,IAAI,UAAU,EAAE,SAAQ;;;EAItC,eAAe,uBAAuB;AACpC,OAAI,OAAO,aAAa,CAAC,QAAA,UACvB;AAIF,OAAI,WAAW,OAAO;AACpB,qBAAiB,WAAW,MAAK;AACjC;;AAGF,UAAO,OAAM;GAEb,MAAM,WAAW,QAAA,UAAU,qBAAqB,OAAM;AAEtD,OAAI,CAAC,UAAU;AACb,UAAM,oCAAoC,QAAO;AACjD,UAAM,OAAO,YAAW;AACxB;;AAGF,OAAI;AACF,eAAW,QAAQ,MAAM,mBAAmB,UAAU,QAAA,aAAY;AAClE,UAAM,OAAO,UAAS;AACtB,qBAAiB,WAAW,MAAK;AAEjC,UAAM,UAAS;AAEf,UAAM,OAAO,OAAM;YACZ,OAAO;AAGd,UADE,iBAAiB,QAAQ,MAAM,UAAU,6BAC5B,QAAO;AACtB,UAAM,OAAO,YAAW;;;;uBAK1B,YAKe,MAAA,aAAA,EAAA;IAJb,OAAM;IACL,QAAA,MAAA,OAAM;IACN,SAAO;;2BACa,CAArB,WAAqB,KAAA,QAAA,WAAA,EAAA,QAAA,CAAA,OAAA,OAAA,OAAA,KAAA,gBAAf,YAAQ,GAAA,EAAA,CAAA,CAAA,CAAA"}
|
package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiReferenceToolbarShareTemporary.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ApiReferenceToolbarShareTemporary.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue"],"names":[],"mappings":"AA6EA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAE/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAMpE,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,cAAc,CAAA;IACzB,YAAY,EAAE,YAAY,CAAA;CAC3B,CAAC;AAqCF,KAAK,gBAAgB,GAAG;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAKF,KAAK,iBAAiB,GAAG,WAAW,GAAG,gBAAgB,CAAC;AAoFxD,QAAA,MAAM,YAAY;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiReferenceToolbarShareTemporary.vue.js","names":[],"sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport {\
|
|
1
|
+
{"version":3,"file":"ApiReferenceToolbarShareTemporary.vue.js","names":[],"sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarButton } from '@scalar/components/button'\nimport { useLoadingState } from '@scalar/components/loading'\nimport { ScalarTextInputCopy } from '@scalar/components/text-input'\nimport type { ExternalUrls } from '@scalar/types/api-reference'\nimport { useToasts } from '@scalar/use-toasts'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\n\nimport { uploadTempDocument } from '@/helpers/upload-temp-document'\n\nimport ApiReferenceToolbarBlurb from './ApiReferenceToolbarBlurb.vue'\n\nconst { workspace, externalUrls } = defineProps<{\n workspace: WorkspaceStore\n externalUrls: ExternalUrls\n}>()\n\nconst { toast } = useToasts()\nconst loader = useLoadingState()\n\nconst tempDocUrl = defineModel<string>('url')\n\nasync function generateTemporaryLink() {\n if (loader.isLoading || !workspace || !!tempDocUrl.value) {\n return\n }\n\n loader.start()\n\n const document = workspace.exportActiveDocument('json')\n\n if (!document) {\n toast('Unable to export active document', 'error')\n await loader.invalidate()\n return\n }\n\n try {\n const url = await uploadTempDocument(document, externalUrls)\n await loader.validate({ duration: 900, persist: true }) // Wait to show the success state\n tempDocUrl.value = url\n } catch (error) {\n const message =\n error instanceof Error ? error.message : 'An unknown error occurred'\n toast(message, 'error')\n await loader.invalidate()\n }\n}\n</script>\n<template>\n <template v-if=\"tempDocUrl\">\n <ScalarTextInputCopy\n immediate\n :modelValue=\"tempDocUrl\"\n name=\"temporary-link\"\n :placeholder=\"`${externalUrls.registryUrl}/share/apis/…`\">\n </ScalarTextInputCopy>\n </template>\n <template v-else>\n <ScalarButton\n class=\"h-auto p-2.5\"\n :loader\n variant=\"gradient\"\n @click=\"generateTemporaryLink\">\n Upload Document\n </ScalarButton>\n </template>\n <ApiReferenceToolbarBlurb class=\"-mt-1\">\n Your document will automatically be deleted after 7 days.\n </ApiReferenceToolbarBlurb>\n</template>\n"],"mappings":""}
|
package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.script.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { uploadTempDocument } from "../../../helpers/upload-temp-document.js";
|
|
2
2
|
import ApiReferenceToolbarBlurb_default from "./ApiReferenceToolbarBlurb.vue.js";
|
|
3
3
|
import { Fragment, createBlock, createElementBlock, createTextVNode, createVNode, defineComponent, mergeModels, openBlock, unref, useModel, withCtx } from "vue";
|
|
4
|
-
import { ScalarButton, ScalarTextInputCopy, useLoadingState } from "@scalar/components";
|
|
5
4
|
import { useToasts } from "@scalar/use-toasts";
|
|
5
|
+
import { useLoadingState } from "@scalar/components/loading";
|
|
6
|
+
import { ScalarButton } from "@scalar/components/button";
|
|
7
|
+
import { ScalarTextInputCopy } from "@scalar/components/text-input";
|
|
6
8
|
//#region src/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue?vue&type=script&setup=true&lang.ts
|
|
7
9
|
var ApiReferenceToolbarShareTemporary_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
8
10
|
__name: "ApiReferenceToolbarShareTemporary",
|
package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.script.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiReferenceToolbarShareTemporary.vue.script.js","names":[],"sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport {\
|
|
1
|
+
{"version":3,"file":"ApiReferenceToolbarShareTemporary.vue.script.js","names":[],"sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarButton } from '@scalar/components/button'\nimport { useLoadingState } from '@scalar/components/loading'\nimport { ScalarTextInputCopy } from '@scalar/components/text-input'\nimport type { ExternalUrls } from '@scalar/types/api-reference'\nimport { useToasts } from '@scalar/use-toasts'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\n\nimport { uploadTempDocument } from '@/helpers/upload-temp-document'\n\nimport ApiReferenceToolbarBlurb from './ApiReferenceToolbarBlurb.vue'\n\nconst { workspace, externalUrls } = defineProps<{\n workspace: WorkspaceStore\n externalUrls: ExternalUrls\n}>()\n\nconst { toast } = useToasts()\nconst loader = useLoadingState()\n\nconst tempDocUrl = defineModel<string>('url')\n\nasync function generateTemporaryLink() {\n if (loader.isLoading || !workspace || !!tempDocUrl.value) {\n return\n }\n\n loader.start()\n\n const document = workspace.exportActiveDocument('json')\n\n if (!document) {\n toast('Unable to export active document', 'error')\n await loader.invalidate()\n return\n }\n\n try {\n const url = await uploadTempDocument(document, externalUrls)\n await loader.validate({ duration: 900, persist: true }) // Wait to show the success state\n tempDocUrl.value = url\n } catch (error) {\n const message =\n error instanceof Error ? error.message : 'An unknown error occurred'\n toast(message, 'error')\n await loader.invalidate()\n }\n}\n</script>\n<template>\n <template v-if=\"tempDocUrl\">\n <ScalarTextInputCopy\n immediate\n :modelValue=\"tempDocUrl\"\n name=\"temporary-link\"\n :placeholder=\"`${externalUrls.registryUrl}/share/apis/…`\">\n </ScalarTextInputCopy>\n </template>\n <template v-else>\n <ScalarButton\n class=\"h-auto p-2.5\"\n :loader\n variant=\"gradient\"\n @click=\"generateTemporaryLink\">\n Upload Document\n </ScalarButton>\n </template>\n <ApiReferenceToolbarBlurb class=\"-mt-1\">\n Your document will automatically be deleted after 7 days.\n </ApiReferenceToolbarBlurb>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;EAiBA,MAAM,EAAE,UAAU,WAAU;EAC5B,MAAM,SAAS,iBAAgB;EAE/B,MAAM,aAAa,SAAmB,SAAC,MAAK;EAE5C,eAAe,wBAAwB;AACrC,OAAI,OAAO,aAAa,CAAC,QAAA,aAAa,CAAC,CAAC,WAAW,MACjD;AAGF,UAAO,OAAM;GAEb,MAAM,WAAW,QAAA,UAAU,qBAAqB,OAAM;AAEtD,OAAI,CAAC,UAAU;AACb,UAAM,oCAAoC,QAAO;AACjD,UAAM,OAAO,YAAW;AACxB;;AAGF,OAAI;IACF,MAAM,MAAM,MAAM,mBAAmB,UAAU,QAAA,aAAY;AAC3D,UAAM,OAAO,SAAS;KAAE,UAAU;KAAK,SAAS;KAAM,CAAC;AACvD,eAAW,QAAQ;YACZ,OAAO;AAGd,UADE,iBAAiB,QAAQ,MAAM,UAAU,6BAC5B,QAAO;AACtB,UAAM,OAAO,YAAW;;;;2DAKV,WAAA,SAAA,WAAA,EACd,YAKsB,MAAA,oBAAA,EAAA;;IAJpB,WAAA;IACC,YAAY,WAAA;IACb,MAAK;IACJ,aAAW,GAAK,QAAA,aAAa,YAAW;+DAI3C,YAMe,MAAA,aAAA,EAAA;;IALb,OAAM;IACL,QAAA,MAAA,OAAM;IACP,SAAQ;IACP,SAAO;;2BAEV,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAFiC,qBAEjC,GAAA,CAAA,EAAA,CAAA;;uBAEF,YAE2B,kCAAA,EAFD,OAAM,SAAO,EAAA;2BAEvC,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAFwC,+DAExC,GAAA,CAAA,EAAA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiReferenceToolbarTitle.vue.js","names":[],"sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarTitle.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarIconButton } from '@scalar/components'\nimport { ScalarIconCopy, ScalarIconInfo } from '@scalar/icons'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\n\nimport ApiReferenceToolbarPopover from './ApiReferenceToolbarPopover.vue'\n\nconst CONFIG_SETTING = 'showDeveloperTools: \"never\"'\n\nconst { copyToClipboard } = useClipboard()\n</script>\n<template>\n <ApiReferenceToolbarPopover\n class=\"w-120\"\n placement=\"bottom-start\">\n <template #button>\n <button\n class=\"text-c-2 hover:text-c-1 hover:bg-b-2 ml-auto flex items-center gap-1 rounded px-2 py-2.25 text-base leading-none\"\n type=\"button\">\n <ScalarIconInfo />\n Developer Tools\n </button>\n </template>\n <div class=\"-m-2 flex flex-col gap-2 leading-relaxed\">\n <div>\n The developer tools allow you to customize the appearance and behavior\n of your documentation. You can also share your documentation using the\n Scalar Registry.\n </div>\n <div>\n To disable the toolbar, set\n <div\n class=\"bg-b-2 inline-flex items-center gap-0.5 rounded border px-1 py-0.5 text-sm\">\n <code class=\"font-code\">{{ CONFIG_SETTING }}</code>\n <ScalarIconButton\n class=\"-m-1 p-1.25\"\n :icon=\"ScalarIconCopy\"\n label=\"Copy link to clipboard\"\n size=\"sm\"\n @click=\"copyToClipboard(CONFIG_SETTING)\" />\n </div>\n in your configuration.\n </div>\n </div>\n <template #info>\n The developer tools will only appear when running on localhost.\n </template>\n </ApiReferenceToolbarPopover>\n</template>\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"ApiReferenceToolbarTitle.vue.js","names":[],"sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarTitle.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarIconButton } from '@scalar/components/icon-button'\nimport { ScalarIconCopy, ScalarIconInfo } from '@scalar/icons'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\n\nimport ApiReferenceToolbarPopover from './ApiReferenceToolbarPopover.vue'\n\nconst CONFIG_SETTING = 'showDeveloperTools: \"never\"'\n\nconst { copyToClipboard } = useClipboard()\n</script>\n<template>\n <ApiReferenceToolbarPopover\n class=\"w-120\"\n placement=\"bottom-start\">\n <template #button>\n <button\n class=\"text-c-2 hover:text-c-1 hover:bg-b-2 ml-auto flex items-center gap-1 rounded px-2 py-2.25 text-base leading-none\"\n type=\"button\">\n <ScalarIconInfo />\n Developer Tools\n </button>\n </template>\n <div class=\"-m-2 flex flex-col gap-2 leading-relaxed\">\n <div>\n The developer tools allow you to customize the appearance and behavior\n of your documentation. You can also share your documentation using the\n Scalar Registry.\n </div>\n <div>\n To disable the toolbar, set\n <div\n class=\"bg-b-2 inline-flex items-center gap-0.5 rounded border px-1 py-0.5 text-sm\">\n <code class=\"font-code\">{{ CONFIG_SETTING }}</code>\n <ScalarIconButton\n class=\"-m-1 p-1.25\"\n :icon=\"ScalarIconCopy\"\n label=\"Copy link to clipboard\"\n size=\"sm\"\n @click=\"copyToClipboard(CONFIG_SETTING)\" />\n </div>\n in your configuration.\n </div>\n </div>\n <template #info>\n The developer tools will only appear when running on localhost.\n </template>\n </ApiReferenceToolbarPopover>\n</template>\n"],"mappings":""}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import ApiReferenceToolbarPopover_default from "./ApiReferenceToolbarPopover.vue.js";
|
|
2
2
|
import { createBlock, createElementVNode, createTextVNode, createVNode, defineComponent, openBlock, toDisplayString, unref, withCtx } from "vue";
|
|
3
|
-
import { ScalarIconButton } from "@scalar/components";
|
|
4
3
|
import { useClipboard } from "@scalar/use-hooks/useClipboard";
|
|
5
4
|
import { ScalarIconCopy, ScalarIconInfo } from "@scalar/icons";
|
|
5
|
+
import { ScalarIconButton } from "@scalar/components/icon-button";
|
|
6
6
|
//#region src/features/developer-tools/components/ApiReferenceToolbarTitle.vue?vue&type=script&setup=true&lang.ts
|
|
7
7
|
var _hoisted_1 = {
|
|
8
8
|
class: "text-c-2 hover:text-c-1 hover:bg-b-2 ml-auto flex items-center gap-1 rounded px-2 py-2.25 text-base leading-none",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiReferenceToolbarTitle.vue.script.js","names":[],"sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarTitle.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarIconButton } from '@scalar/components'\nimport { ScalarIconCopy, ScalarIconInfo } from '@scalar/icons'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\n\nimport ApiReferenceToolbarPopover from './ApiReferenceToolbarPopover.vue'\n\nconst CONFIG_SETTING = 'showDeveloperTools: \"never\"'\n\nconst { copyToClipboard } = useClipboard()\n</script>\n<template>\n <ApiReferenceToolbarPopover\n class=\"w-120\"\n placement=\"bottom-start\">\n <template #button>\n <button\n class=\"text-c-2 hover:text-c-1 hover:bg-b-2 ml-auto flex items-center gap-1 rounded px-2 py-2.25 text-base leading-none\"\n type=\"button\">\n <ScalarIconInfo />\n Developer Tools\n </button>\n </template>\n <div class=\"-m-2 flex flex-col gap-2 leading-relaxed\">\n <div>\n The developer tools allow you to customize the appearance and behavior\n of your documentation. You can also share your documentation using the\n Scalar Registry.\n </div>\n <div>\n To disable the toolbar, set\n <div\n class=\"bg-b-2 inline-flex items-center gap-0.5 rounded border px-1 py-0.5 text-sm\">\n <code class=\"font-code\">{{ CONFIG_SETTING }}</code>\n <ScalarIconButton\n class=\"-m-1 p-1.25\"\n :icon=\"ScalarIconCopy\"\n label=\"Copy link to clipboard\"\n size=\"sm\"\n @click=\"copyToClipboard(CONFIG_SETTING)\" />\n </div>\n in your configuration.\n </div>\n </div>\n <template #info>\n The developer tools will only appear when running on localhost.\n </template>\n </ApiReferenceToolbarPopover>\n</template>\n"],"mappings":";;;;;;;;;;;;AAOA,IAAM,iBAAiB;;;;EAEvB,MAAM,EAAE,oBAAoB,cAAa;;uBAGvC,YAmC6B,oCAAA;IAlC3B,OAAM;IACN,WAAU;;IACC,QAAM,cAMN,CALT,mBAKS,UALT,YAKS,CAFP,YAAkB,MAAA,eAAA,CAAA,EAAA,OAAA,OAAA,OAAA,KAAA,gBAAA,qBAEpB,GAAA,EAAA,CAAA,CAAA,CAAA;IAuBS,MAAI,cAEf,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAFgB,qEAEhB,GAAA,CAAA,EAAA,CAAA;2BAHM,CApBN,mBAoBM,OApBN,YAoBM,CAAA,OAAA,OAAA,OAAA,KAnBJ,mBAIM,OAAA,MAJD,oKAIL,GAAA,GACA,mBAaM,OAAA,MAAA;+CAbD,iCAEH,GAAA;KAAA,mBASM,OATN,YASM,CAPJ,mBAAmD,QAAA,EAA7C,OAAM,aAAW,EAAA,gBAAI,eAAc,CAAA,EACzC,YAK6C,MAAA,iBAAA,EAAA;MAJ3C,OAAM;MACL,MAAM,MAAA,eAAc;MACrB,OAAM;MACN,MAAK;MACJ,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,MAAA,gBAAe,CAAC,eAAc;;+CACpC,4BAER,GAAA"}
|
|
1
|
+
{"version":3,"file":"ApiReferenceToolbarTitle.vue.script.js","names":[],"sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarTitle.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarIconButton } from '@scalar/components/icon-button'\nimport { ScalarIconCopy, ScalarIconInfo } from '@scalar/icons'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\n\nimport ApiReferenceToolbarPopover from './ApiReferenceToolbarPopover.vue'\n\nconst CONFIG_SETTING = 'showDeveloperTools: \"never\"'\n\nconst { copyToClipboard } = useClipboard()\n</script>\n<template>\n <ApiReferenceToolbarPopover\n class=\"w-120\"\n placement=\"bottom-start\">\n <template #button>\n <button\n class=\"text-c-2 hover:text-c-1 hover:bg-b-2 ml-auto flex items-center gap-1 rounded px-2 py-2.25 text-base leading-none\"\n type=\"button\">\n <ScalarIconInfo />\n Developer Tools\n </button>\n </template>\n <div class=\"-m-2 flex flex-col gap-2 leading-relaxed\">\n <div>\n The developer tools allow you to customize the appearance and behavior\n of your documentation. You can also share your documentation using the\n Scalar Registry.\n </div>\n <div>\n To disable the toolbar, set\n <div\n class=\"bg-b-2 inline-flex items-center gap-0.5 rounded border px-1 py-0.5 text-sm\">\n <code class=\"font-code\">{{ CONFIG_SETTING }}</code>\n <ScalarIconButton\n class=\"-m-1 p-1.25\"\n :icon=\"ScalarIconCopy\"\n label=\"Copy link to clipboard\"\n size=\"sm\"\n @click=\"copyToClipboard(CONFIG_SETTING)\" />\n </div>\n in your configuration.\n </div>\n </div>\n <template #info>\n The developer tools will only appear when running on localhost.\n </template>\n </ApiReferenceToolbarPopover>\n</template>\n"],"mappings":";;;;;;;;;;;;AAOA,IAAM,iBAAiB;;;;EAEvB,MAAM,EAAE,oBAAoB,cAAa;;uBAGvC,YAmC6B,oCAAA;IAlC3B,OAAM;IACN,WAAU;;IACC,QAAM,cAMN,CALT,mBAKS,UALT,YAKS,CAFP,YAAkB,MAAA,eAAA,CAAA,EAAA,OAAA,OAAA,OAAA,KAAA,gBAAA,qBAEpB,GAAA,EAAA,CAAA,CAAA,CAAA;IAuBS,MAAI,cAEf,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAFgB,qEAEhB,GAAA,CAAA,EAAA,CAAA;2BAHM,CApBN,mBAoBM,OApBN,YAoBM,CAAA,OAAA,OAAA,OAAA,KAnBJ,mBAIM,OAAA,MAJD,oKAIL,GAAA,GACA,mBAaM,OAAA,MAAA;+CAbD,iCAEH,GAAA;KAAA,mBASM,OATN,YASM,CAPJ,mBAAmD,QAAA,EAA7C,OAAM,aAAW,EAAA,gBAAI,eAAc,CAAA,EACzC,YAK6C,MAAA,iBAAA,EAAA;MAJ3C,OAAM;MACL,MAAM,MAAA,eAAc;MACrB,OAAM;MACN,MAAK;MACJ,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,MAAA,gBAAe,CAAC,eAAc;;+CACpC,4BAER,GAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeployApiReference.vue.js","names":[],"sources":["../../../../src/features/developer-tools/components/DeployApiReference.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarFormSection } from '@scalar/components'\nimport type { ExternalUrls } from '@scalar/types/api-reference'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\n\nimport ApiReferenceToolbarPopover from './ApiReferenceToolbarPopover.vue'\nimport ApiReferenceToolbarShareRegister from './ApiReferenceToolbarShareRegister.vue'\n\nconst { workspace, externalUrls } = defineProps<{\n workspace: WorkspaceStore\n externalUrls: ExternalUrls\n}>()\n</script>\n\n<template>\n <ApiReferenceToolbarPopover class=\"w-120\">\n <template #label>Deploy</template>\n <ScalarFormSection>\n <template #label>Scalar Docs</template>\n <p class=\"text-c-2 mb-2 leading-normal\">\n Deploy your documentation on Scalar, the modern documentation platform\n for your API and everything else.\n </p>\n <ApiReferenceToolbarShareRegister\n :externalUrls\n :workspace />\n </ScalarFormSection>\n </ApiReferenceToolbarPopover>\n</template>\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"DeployApiReference.vue.js","names":[],"sources":["../../../../src/features/developer-tools/components/DeployApiReference.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarFormSection } from '@scalar/components/form'\nimport type { ExternalUrls } from '@scalar/types/api-reference'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\n\nimport ApiReferenceToolbarPopover from './ApiReferenceToolbarPopover.vue'\nimport ApiReferenceToolbarShareRegister from './ApiReferenceToolbarShareRegister.vue'\n\nconst { workspace, externalUrls } = defineProps<{\n workspace: WorkspaceStore\n externalUrls: ExternalUrls\n}>()\n</script>\n\n<template>\n <ApiReferenceToolbarPopover class=\"w-120\">\n <template #label>Deploy</template>\n <ScalarFormSection>\n <template #label>Scalar Docs</template>\n <p class=\"text-c-2 mb-2 leading-normal\">\n Deploy your documentation on Scalar, the modern documentation platform\n for your API and everything else.\n </p>\n <ApiReferenceToolbarShareRegister\n :externalUrls\n :workspace />\n </ScalarFormSection>\n </ApiReferenceToolbarPopover>\n</template>\n"],"mappings":""}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import ApiReferenceToolbarPopover_default from "./ApiReferenceToolbarPopover.vue.js";
|
|
2
2
|
import ApiReferenceToolbarShareRegister_default from "./ApiReferenceToolbarShareRegister.vue.js";
|
|
3
3
|
import { createBlock, createElementVNode, createTextVNode, createVNode, defineComponent, openBlock, unref, withCtx } from "vue";
|
|
4
|
-
import { ScalarFormSection } from "@scalar/components";
|
|
4
|
+
import { ScalarFormSection } from "@scalar/components/form";
|
|
5
5
|
//#region src/features/developer-tools/components/DeployApiReference.vue?vue&type=script&setup=true&lang.ts
|
|
6
6
|
var DeployApiReference_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
7
7
|
__name: "DeployApiReference",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeployApiReference.vue.script.js","names":[],"sources":["../../../../src/features/developer-tools/components/DeployApiReference.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarFormSection } from '@scalar/components'\nimport type { ExternalUrls } from '@scalar/types/api-reference'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\n\nimport ApiReferenceToolbarPopover from './ApiReferenceToolbarPopover.vue'\nimport ApiReferenceToolbarShareRegister from './ApiReferenceToolbarShareRegister.vue'\n\nconst { workspace, externalUrls } = defineProps<{\n workspace: WorkspaceStore\n externalUrls: ExternalUrls\n}>()\n</script>\n\n<template>\n <ApiReferenceToolbarPopover class=\"w-120\">\n <template #label>Deploy</template>\n <ScalarFormSection>\n <template #label>Scalar Docs</template>\n <p class=\"text-c-2 mb-2 leading-normal\">\n Deploy your documentation on Scalar, the modern documentation platform\n for your API and everything else.\n </p>\n <ApiReferenceToolbarShareRegister\n :externalUrls\n :workspace />\n </ScalarFormSection>\n </ApiReferenceToolbarPopover>\n</template>\n"],"mappings":";;;;;;;;;;;;;uBAeE,YAY6B,oCAAA,EAZD,OAAM,SAAO,EAAA;IAC5B,OAAK,cAAO,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAAN,UAAM,GAAA,CAAA,EAAA,CAAA;2BAUH,CATpB,YASoB,MAAA,kBAAA,EAAA,MAAA;KARP,OAAK,cAAY,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAAX,eAAW,GAAA,CAAA,EAAA,CAAA;4BAIxB,CAAA,OAAA,OAAA,OAAA,KAHJ,mBAGI,KAAA,EAHD,OAAM,gCAA8B,EAAC,8GAGxC,GAAA,GACA,YAEe,0CAAA;MADZ,cAAA,QAAA;MACA,WAAA,QAAA"}
|
|
1
|
+
{"version":3,"file":"DeployApiReference.vue.script.js","names":[],"sources":["../../../../src/features/developer-tools/components/DeployApiReference.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarFormSection } from '@scalar/components/form'\nimport type { ExternalUrls } from '@scalar/types/api-reference'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\n\nimport ApiReferenceToolbarPopover from './ApiReferenceToolbarPopover.vue'\nimport ApiReferenceToolbarShareRegister from './ApiReferenceToolbarShareRegister.vue'\n\nconst { workspace, externalUrls } = defineProps<{\n workspace: WorkspaceStore\n externalUrls: ExternalUrls\n}>()\n</script>\n\n<template>\n <ApiReferenceToolbarPopover class=\"w-120\">\n <template #label>Deploy</template>\n <ScalarFormSection>\n <template #label>Scalar Docs</template>\n <p class=\"text-c-2 mb-2 leading-normal\">\n Deploy your documentation on Scalar, the modern documentation platform\n for your API and everything else.\n </p>\n <ApiReferenceToolbarShareRegister\n :externalUrls\n :workspace />\n </ScalarFormSection>\n </ApiReferenceToolbarPopover>\n</template>\n"],"mappings":";;;;;;;;;;;;;uBAeE,YAY6B,oCAAA,EAZD,OAAM,SAAO,EAAA;IAC5B,OAAK,cAAO,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAAN,UAAM,GAAA,CAAA,EAAA,CAAA;2BAUH,CATpB,YASoB,MAAA,kBAAA,EAAA,MAAA;KARP,OAAK,cAAY,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAAX,eAAW,GAAA,CAAA,EAAA,CAAA;4BAIxB,CAAA,OAAA,OAAA,OAAA,KAHJ,mBAGI,KAAA,EAHD,OAAM,gCAA8B,EAAC,8GAGxC,GAAA,GACA,YAEe,0CAAA;MADZ,cAAA,QAAA;MACA,WAAA,QAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModifyConfiguration.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/developer-tools/components/ModifyConfiguration.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ModifyConfiguration.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/developer-tools/components/ModifyConfiguration.vue"],"names":[],"mappings":"AAwEA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAQ5E,KAAK,WAAW,GAAG;IACjB,aAAa,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC,CAAA;CACnD,CAAC;AAyBF,KAAK,gBAAgB,GAAG;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC,CAAC;CAChD,CAAC;AAKF,KAAK,iBAAiB,GAAG,WAAW,GAAG,gBAAgB,CAAC;AAsKxD,QAAA,MAAM,YAAY;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModifyConfiguration.vue.js","names":[],"sources":["../../../../src/features/developer-tools/components/ModifyConfiguration.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport {\
|
|
1
|
+
{"version":3,"file":"ModifyConfiguration.vue.js","names":[],"sources":["../../../../src/features/developer-tools/components/ModifyConfiguration.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarCodeBlock } from '@scalar/components/code-block'\nimport { ScalarFormField, ScalarFormSection } from '@scalar/components/form'\nimport { prettyPrintJson } from '@scalar/helpers/json/pretty-print-json'\nimport { type ThemeId } from '@scalar/themes'\nimport type { ApiReferenceConfiguration } from '@scalar/types/api-reference'\nimport { computed } from 'vue'\n\nimport ApiReferenceToolbarConfigLayout from './ApiReferenceToolbarConfigLayout.vue'\nimport ApiReferenceToolbarConfigLayoutOptions from './ApiReferenceToolbarConfigLayoutOptions.vue'\nimport ApiReferenceToolbarConfigTheme from './ApiReferenceToolbarConfigTheme.vue'\nimport ApiReferenceToolbarPopover from './ApiReferenceToolbarPopover.vue'\n\nconst { configuration } = defineProps<{\n configuration?: Partial<ApiReferenceConfiguration>\n}>()\n\nconst overrides = defineModel<Partial<ApiReferenceConfiguration>>('overrides')\n\nconst snippet = computed<string>(() => {\n return prettyPrintJson({\n ...overrides.value, // Make sure the overrides are first\n ...configuration,\n ...overrides.value, // But also that they override the configuration\n })\n})\n\nconst theme = computed<ThemeId>({\n get: () => overrides.value?.theme ?? configuration?.theme ?? 'default',\n set: (t) => (overrides.value = { ...overrides.value, theme: t }),\n})\n\nconst layout = computed<'modern' | 'classic'>({\n get: () => overrides.value?.layout ?? configuration?.layout ?? 'modern',\n set: (l) => (overrides.value = { ...overrides.value, layout: l }),\n})\n</script>\n<template>\n <ApiReferenceToolbarPopover class=\"w-120\">\n <template #label>Configure</template>\n <ScalarFormSection>\n <template #label>Scalar Configuration</template>\n <ScalarCodeBlock\n class=\"bg-b-1.5 flex max-h-40 flex-col rounded border text-sm\"\n :content=\"snippet\"\n lang=\"json\" />\n </ScalarFormSection>\n <div class=\"flex flex-col gap-4\">\n <ScalarFormField>\n <template #label>Theme</template>\n <ApiReferenceToolbarConfigTheme v-model=\"theme\" />\n </ScalarFormField>\n <ScalarFormField>\n <template #label>Layout</template>\n <ApiReferenceToolbarConfigLayout v-model=\"layout\" />\n </ScalarFormField>\n <ScalarFormField is=\"div\">\n <template #label>Layout Options</template>\n <ApiReferenceToolbarConfigLayoutOptions\n v-model=\"overrides\"\n :configuration />\n </ScalarFormField>\n </div>\n </ApiReferenceToolbarPopover>\n</template>\n"],"mappings":""}
|
|
@@ -3,8 +3,9 @@ import ApiReferenceToolbarConfigLayout_default from "./ApiReferenceToolbarConfig
|
|
|
3
3
|
import ApiReferenceToolbarConfigLayoutOptions_default from "./ApiReferenceToolbarConfigLayoutOptions.vue.js";
|
|
4
4
|
import ApiReferenceToolbarConfigTheme_default from "./ApiReferenceToolbarConfigTheme.vue.js";
|
|
5
5
|
import { computed, createBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeModels, openBlock, unref, useModel, withCtx } from "vue";
|
|
6
|
-
import { ScalarCodeBlock
|
|
6
|
+
import { ScalarCodeBlock } from "@scalar/components/code-block";
|
|
7
7
|
import { prettyPrintJson } from "@scalar/helpers/json/pretty-print-json";
|
|
8
|
+
import { ScalarFormField, ScalarFormSection } from "@scalar/components/form";
|
|
8
9
|
//#region src/features/developer-tools/components/ModifyConfiguration.vue?vue&type=script&setup=true&lang.ts
|
|
9
10
|
var _hoisted_1 = { class: "flex flex-col gap-4" };
|
|
10
11
|
var ModifyConfiguration_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModifyConfiguration.vue.script.js","names":[],"sources":["../../../../src/features/developer-tools/components/ModifyConfiguration.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport {\
|
|
1
|
+
{"version":3,"file":"ModifyConfiguration.vue.script.js","names":[],"sources":["../../../../src/features/developer-tools/components/ModifyConfiguration.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarCodeBlock } from '@scalar/components/code-block'\nimport { ScalarFormField, ScalarFormSection } from '@scalar/components/form'\nimport { prettyPrintJson } from '@scalar/helpers/json/pretty-print-json'\nimport { type ThemeId } from '@scalar/themes'\nimport type { ApiReferenceConfiguration } from '@scalar/types/api-reference'\nimport { computed } from 'vue'\n\nimport ApiReferenceToolbarConfigLayout from './ApiReferenceToolbarConfigLayout.vue'\nimport ApiReferenceToolbarConfigLayoutOptions from './ApiReferenceToolbarConfigLayoutOptions.vue'\nimport ApiReferenceToolbarConfigTheme from './ApiReferenceToolbarConfigTheme.vue'\nimport ApiReferenceToolbarPopover from './ApiReferenceToolbarPopover.vue'\n\nconst { configuration } = defineProps<{\n configuration?: Partial<ApiReferenceConfiguration>\n}>()\n\nconst overrides = defineModel<Partial<ApiReferenceConfiguration>>('overrides')\n\nconst snippet = computed<string>(() => {\n return prettyPrintJson({\n ...overrides.value, // Make sure the overrides are first\n ...configuration,\n ...overrides.value, // But also that they override the configuration\n })\n})\n\nconst theme = computed<ThemeId>({\n get: () => overrides.value?.theme ?? configuration?.theme ?? 'default',\n set: (t) => (overrides.value = { ...overrides.value, theme: t }),\n})\n\nconst layout = computed<'modern' | 'classic'>({\n get: () => overrides.value?.layout ?? configuration?.layout ?? 'modern',\n set: (l) => (overrides.value = { ...overrides.value, layout: l }),\n})\n</script>\n<template>\n <ApiReferenceToolbarPopover class=\"w-120\">\n <template #label>Configure</template>\n <ScalarFormSection>\n <template #label>Scalar Configuration</template>\n <ScalarCodeBlock\n class=\"bg-b-1.5 flex max-h-40 flex-col rounded border text-sm\"\n :content=\"snippet\"\n lang=\"json\" />\n </ScalarFormSection>\n <div class=\"flex flex-col gap-4\">\n <ScalarFormField>\n <template #label>Theme</template>\n <ApiReferenceToolbarConfigTheme v-model=\"theme\" />\n </ScalarFormField>\n <ScalarFormField>\n <template #label>Layout</template>\n <ApiReferenceToolbarConfigLayout v-model=\"layout\" />\n </ScalarFormField>\n <ScalarFormField is=\"div\">\n <template #label>Layout Options</template>\n <ApiReferenceToolbarConfigLayoutOptions\n v-model=\"overrides\"\n :configuration />\n </ScalarFormField>\n </div>\n </ApiReferenceToolbarPopover>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;EAiBA,MAAM,YAAY,SAA+C,SAAC,YAAW;EAE7E,MAAM,UAAU,eAAuB;AACrC,UAAO,gBAAgB;IACrB,GAAG,UAAU;IACb,GAAG,QAAA;IACH,GAAG,UAAU;IACd,CAAA;IACF;EAED,MAAM,QAAQ,SAAkB;GAC9B,WAAW,UAAU,OAAO,SAAS,QAAA,eAAe,SAAS;GAC7D,MAAM,MAAO,UAAU,QAAQ;IAAE,GAAG,UAAU;IAAO,OAAO;IAAG;GAChE,CAAA;EAED,MAAM,SAAS,SAA+B;GAC5C,WAAW,UAAU,OAAO,UAAU,QAAA,eAAe,UAAU;GAC/D,MAAM,MAAO,UAAU,QAAQ;IAAE,GAAG,UAAU;IAAO,QAAQ;IAAG;GACjE,CAAA;;uBAGC,YAyB6B,oCAAA,EAzBD,OAAM,SAAO,EAAA;IAC5B,OAAK,cAAU,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAAT,aAAS,GAAA,CAAA,EAAA,CAAA;2BAON,CANpB,YAMoB,MAAA,kBAAA,EAAA,MAAA;KALP,OAAK,cAAqB,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAApB,wBAAoB,GAAA,CAAA,EAAA,CAAA;4BAIrB,CAHhB,YAGgB,MAAA,gBAAA,EAAA;MAFd,OAAM;MACL,SAAS,QAAA;MACV,MAAK;;;QAET,mBAeM,OAfN,YAeM;KAdJ,YAGkB,MAAA,gBAAA,EAAA,MAAA;MAFL,OAAK,cAAM,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAAL,SAAK,GAAA,CAAA,EAAA,CAAA;6BAC4B,CAAlD,YAAkD,wCAAA;mBAAT,MAAA;0EAAK,QAAA;;;;KAEhD,YAGkB,MAAA,gBAAA,EAAA,MAAA;MAFL,OAAK,cAAO,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAAN,UAAM,GAAA,CAAA,EAAA,CAAA;6BAC6B,CAApD,YAAoD,yCAAA;mBAAV,OAAA;2EAAM,QAAA;;;;KAElD,YAKkB,MAAA,gBAAA,EAAA,EALD,IAAG,OAAK,EAAA;MACZ,OAAK,cAAe,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAAd,kBAAc,GAAA,CAAA,EAAA,CAAA;6BAGZ,CAFnB,YAEmB,gDAAA;mBADR,UAAA;8EAAS,QAAA;OACjB,eAAA,QAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShareApiReference.vue.js","names":[],"sources":["../../../../src/features/developer-tools/components/ShareApiReference.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarFormSection } from '@scalar/components'\nimport type { ExternalUrls } from '@scalar/types/api-reference'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\n\nimport ApiReferenceToolbarPopover from './ApiReferenceToolbarPopover.vue'\nimport ApiReferenceToolbarShareTemporary from './ApiReferenceToolbarShareTemporary.vue'\n\nconst { workspace, externalUrls } = defineProps<{\n workspace: WorkspaceStore\n externalUrls: ExternalUrls\n}>()\n</script>\n<template>\n <ApiReferenceToolbarPopover class=\"w-120\">\n <template #label>Share</template>\n <ScalarFormSection>\n <template #label>Share your API Reference</template>\n <p class=\"text-c-2 mb-2 leading-normal\">\n Upload your OpenAPI document to share your API Reference with others. As\n easy as pressing a button.\n </p>\n <ApiReferenceToolbarShareTemporary\n :externalUrls\n :workspace />\n </ScalarFormSection>\n </ApiReferenceToolbarPopover>\n</template>\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"ShareApiReference.vue.js","names":[],"sources":["../../../../src/features/developer-tools/components/ShareApiReference.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarFormSection } from '@scalar/components/form'\nimport type { ExternalUrls } from '@scalar/types/api-reference'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\n\nimport ApiReferenceToolbarPopover from './ApiReferenceToolbarPopover.vue'\nimport ApiReferenceToolbarShareTemporary from './ApiReferenceToolbarShareTemporary.vue'\n\nconst { workspace, externalUrls } = defineProps<{\n workspace: WorkspaceStore\n externalUrls: ExternalUrls\n}>()\n</script>\n<template>\n <ApiReferenceToolbarPopover class=\"w-120\">\n <template #label>Share</template>\n <ScalarFormSection>\n <template #label>Share your API Reference</template>\n <p class=\"text-c-2 mb-2 leading-normal\">\n Upload your OpenAPI document to share your API Reference with others. As\n easy as pressing a button.\n </p>\n <ApiReferenceToolbarShareTemporary\n :externalUrls\n :workspace />\n </ScalarFormSection>\n </ApiReferenceToolbarPopover>\n</template>\n"],"mappings":""}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import ApiReferenceToolbarPopover_default from "./ApiReferenceToolbarPopover.vue.js";
|
|
2
2
|
import ApiReferenceToolbarShareTemporary_default from "./ApiReferenceToolbarShareTemporary.vue.js";
|
|
3
3
|
import { createBlock, createElementVNode, createTextVNode, createVNode, defineComponent, openBlock, unref, withCtx } from "vue";
|
|
4
|
-
import { ScalarFormSection } from "@scalar/components";
|
|
4
|
+
import { ScalarFormSection } from "@scalar/components/form";
|
|
5
5
|
//#region src/features/developer-tools/components/ShareApiReference.vue?vue&type=script&setup=true&lang.ts
|
|
6
6
|
var ShareApiReference_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
7
7
|
__name: "ShareApiReference",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShareApiReference.vue.script.js","names":[],"sources":["../../../../src/features/developer-tools/components/ShareApiReference.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarFormSection } from '@scalar/components'\nimport type { ExternalUrls } from '@scalar/types/api-reference'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\n\nimport ApiReferenceToolbarPopover from './ApiReferenceToolbarPopover.vue'\nimport ApiReferenceToolbarShareTemporary from './ApiReferenceToolbarShareTemporary.vue'\n\nconst { workspace, externalUrls } = defineProps<{\n workspace: WorkspaceStore\n externalUrls: ExternalUrls\n}>()\n</script>\n<template>\n <ApiReferenceToolbarPopover class=\"w-120\">\n <template #label>Share</template>\n <ScalarFormSection>\n <template #label>Share your API Reference</template>\n <p class=\"text-c-2 mb-2 leading-normal\">\n Upload your OpenAPI document to share your API Reference with others. As\n easy as pressing a button.\n </p>\n <ApiReferenceToolbarShareTemporary\n :externalUrls\n :workspace />\n </ScalarFormSection>\n </ApiReferenceToolbarPopover>\n</template>\n"],"mappings":";;;;;;;;;;;;;uBAcE,YAY6B,oCAAA,EAZD,OAAM,SAAO,EAAA;IAC5B,OAAK,cAAM,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAAL,SAAK,GAAA,CAAA,EAAA,CAAA;2BAUF,CATpB,YASoB,MAAA,kBAAA,EAAA,MAAA;KARP,OAAK,cAAyB,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAAxB,4BAAwB,GAAA,CAAA,EAAA,CAAA;4BAIrC,CAAA,OAAA,OAAA,OAAA,KAHJ,mBAGI,KAAA,EAHD,OAAM,gCAA8B,EAAC,yGAGxC,GAAA,GACA,YAEe,2CAAA;MADZ,cAAA,QAAA;MACA,WAAA,QAAA"}
|
|
1
|
+
{"version":3,"file":"ShareApiReference.vue.script.js","names":[],"sources":["../../../../src/features/developer-tools/components/ShareApiReference.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarFormSection } from '@scalar/components/form'\nimport type { ExternalUrls } from '@scalar/types/api-reference'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\n\nimport ApiReferenceToolbarPopover from './ApiReferenceToolbarPopover.vue'\nimport ApiReferenceToolbarShareTemporary from './ApiReferenceToolbarShareTemporary.vue'\n\nconst { workspace, externalUrls } = defineProps<{\n workspace: WorkspaceStore\n externalUrls: ExternalUrls\n}>()\n</script>\n<template>\n <ApiReferenceToolbarPopover class=\"w-120\">\n <template #label>Share</template>\n <ScalarFormSection>\n <template #label>Share your API Reference</template>\n <p class=\"text-c-2 mb-2 leading-normal\">\n Upload your OpenAPI document to share your API Reference with others. As\n easy as pressing a button.\n </p>\n <ApiReferenceToolbarShareTemporary\n :externalUrls\n :workspace />\n </ScalarFormSection>\n </ApiReferenceToolbarPopover>\n</template>\n"],"mappings":";;;;;;;;;;;;;uBAcE,YAY6B,oCAAA,EAZD,OAAM,SAAO,EAAA;IAC5B,OAAK,cAAM,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAAL,SAAK,GAAA,CAAA,EAAA,CAAA;2BAUF,CATpB,YASoB,MAAA,kBAAA,EAAA,MAAA;KARP,OAAK,cAAyB,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAAxB,4BAAwB,GAAA,CAAA,EAAA,CAAA;4BAIrC,CAAA,OAAA,OAAA,OAAA,KAHJ,mBAGI,KAAA,EAHD,OAAM,gCAA8B,EAAC,yGAGxC,GAAA,GACA,YAEe,2CAAA;MADZ,cAAA,QAAA;MACA,WAAA,QAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExampleResponse.vue.d.ts","sourceRoot":"","sources":["../../../src/features/example-responses/ExampleResponse.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExampleResponse.vue.d.ts","sourceRoot":"","sources":["../../../src/features/example-responses/ExampleResponse.vue"],"names":[],"mappings":"AAiJA,OAAO,KAAK,EACV,aAAa,EACb,eAAe,EAEhB,MAAM,8DAA8D,CAAA;AAGrE,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,eAAe,GAAG,SAAS,CAAA;IACrC,OAAO,EAAE,aAAa,GAAG,SAAS,CAAA;CACnC,CAAC;AAyHF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -2,7 +2,7 @@ import _plugin_vue_export_helper_default from "../../_virtual/_plugin-vue_export
|
|
|
2
2
|
import ExampleResponse_vue_vue_type_script_setup_true_lang_default from "./ExampleResponse.vue.script.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
//#region src/features/example-responses/ExampleResponse.vue
|
|
5
|
-
var ExampleResponse_default = /* @__PURE__ */ _plugin_vue_export_helper_default(ExampleResponse_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
5
|
+
var ExampleResponse_default = /* @__PURE__ */ _plugin_vue_export_helper_default(ExampleResponse_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-bf7e18d2"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { ExampleResponse_default as default };
|
|
8
8
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExampleResponse.vue.js","names":[],"sources":["../../../src/features/example-responses/ExampleResponse.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { getResolvedRefDeep } from '@scalar/api-client/blocks/operation-code-sample'\nimport { ScalarCodeBlock
|
|
1
|
+
{"version":3,"file":"ExampleResponse.vue.js","names":[],"sources":["../../../src/features/example-responses/ExampleResponse.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { getResolvedRefDeep } from '@scalar/api-client/blocks/operation-code-sample'\nimport { ScalarCodeBlock } from '@scalar/components/code-block'\nimport { ScalarVirtualText } from '@scalar/components/virtual-text'\nimport { prettyPrintJson } from '@scalar/helpers/json/pretty-print-json'\nimport { getExampleFromSchema } from '@scalar/workspace-store/request-example'\nimport type {\n ExampleObject,\n MediaTypeObject,\n SchemaObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nconst { example, response } = defineProps<{\n response: MediaTypeObject | undefined\n example: ExampleObject | undefined\n}>()\n\n/** Get content from the appropriate source */\nconst getContent = () => {\n if (example !== undefined) {\n return getResolvedRefDeep(example)?.value ?? ''\n }\n\n if (response?.schema) {\n return getExampleFromSchema(\n // Should be safe to deep resolve the schema here because we don't have to do any sibling resolution for example generation\n getResolvedRefDeep(response.schema) as SchemaObject,\n {\n emptyString: 'string',\n mode: 'read',\n },\n )\n }\n\n return undefined\n}\n\n/** Pre-pretty printed content string, avoids multiple pretty prints*/\nconst prettyPrintedContent = computed(() => {\n const content = getContent()\n if (content === undefined) {\n return undefined\n }\n return prettyPrintJson(content)\n})\n\nconst VIRTUALIZATION_THRESHOLD = 20_000\n\n// Virtualize the code block if it's too large\nconst shouldVirtualize = computed(() => {\n if (prettyPrintedContent.value === undefined) {\n return false\n }\n return prettyPrintedContent.value.length > VIRTUALIZATION_THRESHOLD\n})\n</script>\n<template>\n <!-- Example -->\n <ScalarCodeBlock\n v-if=\"prettyPrintedContent !== undefined && !shouldVirtualize\"\n class=\"bg-b-2\"\n lang=\"json\"\n :prettyPrintedContent=\"prettyPrintedContent\" />\n\n <ScalarVirtualText\n v-else-if=\"prettyPrintedContent !== undefined && shouldVirtualize\"\n containerClass=\"custom-scroll scalar-code-block border rounded-b flex flex-1 max-h-screen\"\n contentClass=\"language-plaintext whitespace-pre font-code text-base p-2\"\n :lineHeight=\"20\"\n :text=\"prettyPrintedContent\" />\n\n <div\n v-else\n class=\"empty-state\">\n No Body\n </div>\n</template>\n\n<style scoped>\n.empty-state {\n margin: 10px 0 10px 12px;\n text-align: center;\n font-size: var(--scalar-mini);\n min-height: 56px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: var(--scalar-radius-lg);\n color: var(--scalar-color-2);\n}\n\n.rule-title {\n font-family: var(--scalar-font-code);\n color: var(--scalar-color-1);\n display: inline-block;\n margin: 12px 0 6px;\n border-radius: var(--scalar-radius);\n}\n\n.rule {\n margin: 0 12px 0;\n border-radius: var(--scalar-radius-lg);\n}\n\n.rule-items {\n counter-reset: list-number;\n display: flex;\n flex-direction: column;\n gap: 12px;\n border-left: 1px solid var(--scalar-border-color);\n padding: 12px 0 12px;\n}\n.rule-item {\n counter-increment: list-number;\n border: 1px solid var(--scalar-border-color);\n border-radius: var(--scalar-radius-lg);\n overflow: hidden;\n margin-left: 24px;\n}\n.rule-item:before {\n /* content: counter(list-number); */\n border: 1px solid var(--scalar-border-color);\n border-top: 0;\n border-right: 0;\n content: ' ';\n display: block;\n width: 24px;\n height: 6px;\n border-radius: 0 0 0 var(--scalar-radius-lg);\n margin-top: 6px;\n color: var(--scalar-color-2);\n transform: translateX(-25px);\n color: var(--scalar-color-1);\n position: absolute;\n}\n</style>\n"],"mappings":""}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { computed, createBlock, createElementBlock, defineComponent, openBlock, unref } from "vue";
|
|
2
|
-
import { ScalarCodeBlock, ScalarVirtualText } from "@scalar/components";
|
|
3
2
|
import { getExampleFromSchema } from "@scalar/workspace-store/request-example";
|
|
4
3
|
import { getResolvedRefDeep } from "@scalar/api-client/blocks/operation-code-sample";
|
|
4
|
+
import { ScalarCodeBlock } from "@scalar/components/code-block";
|
|
5
|
+
import { ScalarVirtualText } from "@scalar/components/virtual-text";
|
|
5
6
|
import { prettyPrintJson } from "@scalar/helpers/json/pretty-print-json";
|
|
6
7
|
//#region src/features/example-responses/ExampleResponse.vue?vue&type=script&setup=true&lang.ts
|
|
7
8
|
var _hoisted_1 = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExampleResponse.vue.script.js","names":[],"sources":["../../../src/features/example-responses/ExampleResponse.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { getResolvedRefDeep } from '@scalar/api-client/blocks/operation-code-sample'\nimport { ScalarCodeBlock
|
|
1
|
+
{"version":3,"file":"ExampleResponse.vue.script.js","names":[],"sources":["../../../src/features/example-responses/ExampleResponse.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { getResolvedRefDeep } from '@scalar/api-client/blocks/operation-code-sample'\nimport { ScalarCodeBlock } from '@scalar/components/code-block'\nimport { ScalarVirtualText } from '@scalar/components/virtual-text'\nimport { prettyPrintJson } from '@scalar/helpers/json/pretty-print-json'\nimport { getExampleFromSchema } from '@scalar/workspace-store/request-example'\nimport type {\n ExampleObject,\n MediaTypeObject,\n SchemaObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nconst { example, response } = defineProps<{\n response: MediaTypeObject | undefined\n example: ExampleObject | undefined\n}>()\n\n/** Get content from the appropriate source */\nconst getContent = () => {\n if (example !== undefined) {\n return getResolvedRefDeep(example)?.value ?? ''\n }\n\n if (response?.schema) {\n return getExampleFromSchema(\n // Should be safe to deep resolve the schema here because we don't have to do any sibling resolution for example generation\n getResolvedRefDeep(response.schema) as SchemaObject,\n {\n emptyString: 'string',\n mode: 'read',\n },\n )\n }\n\n return undefined\n}\n\n/** Pre-pretty printed content string, avoids multiple pretty prints*/\nconst prettyPrintedContent = computed(() => {\n const content = getContent()\n if (content === undefined) {\n return undefined\n }\n return prettyPrintJson(content)\n})\n\nconst VIRTUALIZATION_THRESHOLD = 20_000\n\n// Virtualize the code block if it's too large\nconst shouldVirtualize = computed(() => {\n if (prettyPrintedContent.value === undefined) {\n return false\n }\n return prettyPrintedContent.value.length > VIRTUALIZATION_THRESHOLD\n})\n</script>\n<template>\n <!-- Example -->\n <ScalarCodeBlock\n v-if=\"prettyPrintedContent !== undefined && !shouldVirtualize\"\n class=\"bg-b-2\"\n lang=\"json\"\n :prettyPrintedContent=\"prettyPrintedContent\" />\n\n <ScalarVirtualText\n v-else-if=\"prettyPrintedContent !== undefined && shouldVirtualize\"\n containerClass=\"custom-scroll scalar-code-block border rounded-b flex flex-1 max-h-screen\"\n contentClass=\"language-plaintext whitespace-pre font-code text-base p-2\"\n :lineHeight=\"20\"\n :text=\"prettyPrintedContent\" />\n\n <div\n v-else\n class=\"empty-state\">\n No Body\n </div>\n</template>\n\n<style scoped>\n.empty-state {\n margin: 10px 0 10px 12px;\n text-align: center;\n font-size: var(--scalar-mini);\n min-height: 56px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: var(--scalar-radius-lg);\n color: var(--scalar-color-2);\n}\n\n.rule-title {\n font-family: var(--scalar-font-code);\n color: var(--scalar-color-1);\n display: inline-block;\n margin: 12px 0 6px;\n border-radius: var(--scalar-radius);\n}\n\n.rule {\n margin: 0 12px 0;\n border-radius: var(--scalar-radius-lg);\n}\n\n.rule-items {\n counter-reset: list-number;\n display: flex;\n flex-direction: column;\n gap: 12px;\n border-left: 1px solid var(--scalar-border-color);\n padding: 12px 0 12px;\n}\n.rule-item {\n counter-increment: list-number;\n border: 1px solid var(--scalar-border-color);\n border-radius: var(--scalar-radius-lg);\n overflow: hidden;\n margin-left: 24px;\n}\n.rule-item:before {\n /* content: counter(list-number); */\n border: 1px solid var(--scalar-border-color);\n border-top: 0;\n border-right: 0;\n content: ' ';\n display: block;\n width: 24px;\n height: 6px;\n border-radius: 0 0 0 var(--scalar-radius-lg);\n margin-top: 6px;\n color: var(--scalar-color-2);\n transform: translateX(-25px);\n color: var(--scalar-color-1);\n position: absolute;\n}\n</style>\n"],"mappings":";;;;;;;;;;;AA+CA,IAAM,2BAA2B;;;;;;;;;EA5BjC,MAAM,mBAAmB;AACvB,OAAI,QAAA,YAAY,KAAA,EACd,QAAO,mBAAmB,QAAA,QAAQ,EAAE,SAAS;AAG/C,OAAI,QAAA,UAAU,OACZ,QAAO,qBAEL,mBAAmB,QAAA,SAAS,OAAO,EACnC;IACE,aAAa;IACb,MAAM;IACP,CACH;;;EAOJ,MAAM,uBAAuB,eAAe;GAC1C,MAAM,UAAU,YAAW;AAC3B,OAAI,YAAY,KAAA,EACd;AAEF,UAAO,gBAAgB,QAAO;IAC/B;EAKD,MAAM,mBAAmB,eAAe;AACtC,OAAI,qBAAqB,UAAU,KAAA,EACjC,QAAO;AAET,UAAO,qBAAqB,MAAM,SAAS;IAC5C;;UAKS,qBAAA,UAAyB,KAAA,KAAS,CAAK,iBAAA,SAAA,WAAA,EAD/C,YAIiD,MAAA,gBAAA,EAAA;;IAF/C,OAAM;IACN,MAAK;IACJ,sBAAsB,qBAAA;4CAGZ,qBAAA,UAAyB,KAAA,KAAa,iBAAA,SAAA,WAAA,EADnD,YAKiC,MAAA,kBAAA,EAAA;;IAH/B,gBAAe;IACf,cAAa;IACZ,YAAY;IACZ,MAAM,qBAAA;0CAET,mBAIM,OAJN,YAEsB,YAEtB"}
|
|
@@ -2,7 +2,7 @@ import _plugin_vue_export_helper_default from "../../_virtual/_plugin-vue_export
|
|
|
2
2
|
import ExampleResponseTabList_vue_vue_type_script_setup_true_lang_default from "./ExampleResponseTabList.vue.script.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
//#region src/features/example-responses/ExampleResponseTabList.vue
|
|
5
|
-
var ExampleResponseTabList_default = /* @__PURE__ */ _plugin_vue_export_helper_default(ExampleResponseTabList_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
5
|
+
var ExampleResponseTabList_default = /* @__PURE__ */ _plugin_vue_export_helper_default(ExampleResponseTabList_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-49a8c0af"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { ExampleResponseTabList_default as default };
|
|
8
8
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExampleResponseTabList.vue.js","names":[],"sources":["../../../src/features/example-responses/ExampleResponseTabList.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { TabGroup, TabList } from '@headlessui/vue'\nimport { ScalarCardHeader } from '@scalar/components'\n\nconst emit = defineEmits<{\n (e: 'change', index: number): void\n}>()\n\nconst changeTab = (index: number) => {\n emit('change', index)\n}\n</script>\n<template>\n <ScalarCardHeader class=\"scalar-card-header scalar-card-header-tabs\">\n <TabGroup @change=\"changeTab\">\n <TabList class=\"tab-list custom-scroll\">\n <slot />\n </TabList>\n </TabGroup>\n <template #actions>\n <slot name=\"actions\" />\n </template>\n </ScalarCardHeader>\n</template>\n<style scoped>\n.tab-list {\n display: flex;\n gap: 6px;\n position: relative;\n flex: 1;\n --tab-list-padding-y: 7px;\n --tab-list-padding-x: 12px;\n padding: var(--tab-list-padding-y) var(--tab-list-padding-x);\n overflow: auto;\n}\n.scalar-card-header.scalar-card-header-tabs {\n padding: 0;\n}\n</style>\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"ExampleResponseTabList.vue.js","names":[],"sources":["../../../src/features/example-responses/ExampleResponseTabList.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { TabGroup, TabList } from '@headlessui/vue'\nimport { ScalarCardHeader } from '@scalar/components/card'\n\nconst emit = defineEmits<{\n (e: 'change', index: number): void\n}>()\n\nconst changeTab = (index: number) => {\n emit('change', index)\n}\n</script>\n<template>\n <ScalarCardHeader class=\"scalar-card-header scalar-card-header-tabs\">\n <TabGroup @change=\"changeTab\">\n <TabList class=\"tab-list custom-scroll\">\n <slot />\n </TabList>\n </TabGroup>\n <template #actions>\n <slot name=\"actions\" />\n </template>\n </ScalarCardHeader>\n</template>\n<style scoped>\n.tab-list {\n display: flex;\n gap: 6px;\n position: relative;\n flex: 1;\n --tab-list-padding-y: 7px;\n --tab-list-padding-x: 12px;\n padding: var(--tab-list-padding-y) var(--tab-list-padding-x);\n overflow: auto;\n}\n.scalar-card-header.scalar-card-header-tabs {\n padding: 0;\n}\n</style>\n"],"mappings":""}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createBlock, createVNode, defineComponent, openBlock, renderSlot, unref, withCtx } from "vue";
|
|
2
2
|
import { TabGroup, TabList } from "@headlessui/vue";
|
|
3
|
-
import { ScalarCardHeader } from "@scalar/components";
|
|
3
|
+
import { ScalarCardHeader } from "@scalar/components/card";
|
|
4
4
|
//#region src/features/example-responses/ExampleResponseTabList.vue?vue&type=script&setup=true&lang.ts
|
|
5
5
|
var ExampleResponseTabList_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
6
6
|
__name: "ExampleResponseTabList",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExampleResponseTabList.vue.script.js","names":[],"sources":["../../../src/features/example-responses/ExampleResponseTabList.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { TabGroup, TabList } from '@headlessui/vue'\nimport { ScalarCardHeader } from '@scalar/components'\n\nconst emit = defineEmits<{\n (e: 'change', index: number): void\n}>()\n\nconst changeTab = (index: number) => {\n emit('change', index)\n}\n</script>\n<template>\n <ScalarCardHeader class=\"scalar-card-header scalar-card-header-tabs\">\n <TabGroup @change=\"changeTab\">\n <TabList class=\"tab-list custom-scroll\">\n <slot />\n </TabList>\n </TabGroup>\n <template #actions>\n <slot name=\"actions\" />\n </template>\n </ScalarCardHeader>\n</template>\n<style scoped>\n.tab-list {\n display: flex;\n gap: 6px;\n position: relative;\n flex: 1;\n --tab-list-padding-y: 7px;\n --tab-list-padding-x: 12px;\n padding: var(--tab-list-padding-y) var(--tab-list-padding-x);\n overflow: auto;\n}\n.scalar-card-header.scalar-card-header-tabs {\n padding: 0;\n}\n</style>\n"],"mappings":";;;;;;;;EAIA,MAAM,OAAO;EAIb,MAAM,aAAa,UAAkB;AACnC,QAAK,UAAU,MAAK;;;uBAIpB,YASmB,MAAA,iBAAA,EAAA,EATD,OAAM,8CAA4C,EAAA;IAMvD,SAAO,cACO,CAAvB,WAAuB,KAAA,QAAA,WAAA,EAAA,EAAA,KAAA,GAAA,KAAA,CAAA,CAAA;2BAFd,CAJX,YAIW,MAAA,SAAA,EAAA,EAJA,UAAQ,WAAS,EAAA;4BAGhB,CAFV,YAEU,MAAA,QAAA,EAAA,EAFD,OAAM,0BAAwB,EAAA;6BAC7B,CAAR,WAAQ,KAAA,QAAA,WAAA,EAAA,EAAA,KAAA,GAAA,KAAA,CAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"ExampleResponseTabList.vue.script.js","names":[],"sources":["../../../src/features/example-responses/ExampleResponseTabList.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { TabGroup, TabList } from '@headlessui/vue'\nimport { ScalarCardHeader } from '@scalar/components/card'\n\nconst emit = defineEmits<{\n (e: 'change', index: number): void\n}>()\n\nconst changeTab = (index: number) => {\n emit('change', index)\n}\n</script>\n<template>\n <ScalarCardHeader class=\"scalar-card-header scalar-card-header-tabs\">\n <TabGroup @change=\"changeTab\">\n <TabList class=\"tab-list custom-scroll\">\n <slot />\n </TabList>\n </TabGroup>\n <template #actions>\n <slot name=\"actions\" />\n </template>\n </ScalarCardHeader>\n</template>\n<style scoped>\n.tab-list {\n display: flex;\n gap: 6px;\n position: relative;\n flex: 1;\n --tab-list-padding-y: 7px;\n --tab-list-padding-x: 12px;\n padding: var(--tab-list-padding-y) var(--tab-list-padding-x);\n overflow: auto;\n}\n.scalar-card-header.scalar-card-header-tabs {\n padding: 0;\n}\n</style>\n"],"mappings":";;;;;;;;EAIA,MAAM,OAAO;EAIb,MAAM,aAAa,UAAkB;AACnC,QAAK,UAAU,MAAK;;;uBAIpB,YASmB,MAAA,iBAAA,EAAA,EATD,OAAM,8CAA4C,EAAA;IAMvD,SAAO,cACO,CAAvB,WAAuB,KAAA,QAAA,WAAA,EAAA,EAAA,KAAA,GAAA,KAAA,CAAA,CAAA;2BAFd,CAJX,YAIW,MAAA,SAAA,EAAA,EAJA,UAAQ,WAAS,EAAA;4BAGhB,CAFV,YAEU,MAAA,QAAA,EAAA,EAFD,OAAM,0BAAwB,EAAA;6BAC7B,CAAR,WAAQ,KAAA,QAAA,WAAA,EAAA,EAAA,KAAA,GAAA,KAAA,CAAA,CAAA"}
|
|
@@ -2,7 +2,7 @@ import _plugin_vue_export_helper_default from "../../_virtual/_plugin-vue_export
|
|
|
2
2
|
import ExampleResponses_vue_vue_type_script_setup_true_lang_default from "./ExampleResponses.vue.script.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
//#region src/features/example-responses/ExampleResponses.vue
|
|
5
|
-
var ExampleResponses_default = /* @__PURE__ */ _plugin_vue_export_helper_default(ExampleResponses_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
5
|
+
var ExampleResponses_default = /* @__PURE__ */ _plugin_vue_export_helper_default(ExampleResponses_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-b3a2a96e"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { ExampleResponses_default as default };
|
|
8
8
|
|