@scalar/api-reference 1.36.1 → 1.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +63 -0
- package/dist/browser/standalone.js +26246 -25660
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReferenceContent.vue.d.ts +34 -0
- package/dist/components/ApiReferenceContent.vue.d.ts.map +1 -0
- package/dist/components/ApiReferenceContent.vue.js +8 -0
- package/dist/components/ApiReferenceContent.vue2.js +148 -0
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +2 -2
- package/dist/components/ApiReferenceLayout.vue2.js +239 -219
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts +2 -2
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts.map +1 -1
- package/dist/components/Content/ClientLibraries/ClientSelector.vue.d.ts +1 -1
- package/dist/components/Content/ClientLibraries/ClientSelector.vue.d.ts.map +1 -1
- package/dist/components/Content/ClientLibraries/featured-clients.d.ts +1 -1
- package/dist/components/Content/ClientLibraries/featured-clients.d.ts.map +1 -1
- package/dist/components/Content/Content.vue.d.ts +21 -3
- package/dist/components/Content/Content.vue.d.ts.map +1 -1
- package/dist/components/Content/Content.vue.js +132 -95
- package/dist/components/Content/Models/ClassicLayout.vue.d.ts +4 -2
- package/dist/components/Content/Models/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/ClassicLayout.vue.js +2 -2
- package/dist/components/Content/Models/ClassicLayout.vue2.js +28 -28
- package/dist/components/Content/Models/Models.vue.d.ts +10 -2
- package/dist/components/Content/Models/Models.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/Models.vue.js +25 -27
- package/dist/components/Content/Models/ModernLayout.vue.d.ts +6 -2
- package/dist/components/Content/Models/ModernLayout.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/ModernLayout.vue.js +1 -1
- package/dist/components/Content/Models/ModernLayout.vue2.js +30 -29
- package/dist/components/Content/Operations/TraversedEntry.vue.d.ts +20 -6
- package/dist/components/Content/Operations/TraversedEntry.vue.d.ts.map +1 -1
- package/dist/components/Content/Operations/TraversedEntry.vue.js +58 -46
- package/dist/components/Content/Operations/get-current-index.d.ts +1 -1
- package/dist/components/Content/Operations/get-current-index.d.ts.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.js +2 -2
- package/dist/components/Content/Schema/Schema.vue2.js +24 -24
- package/dist/components/Content/Schema/helpers/get-ref-name.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/get-ref-name.js +9 -7
- package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +1 -1
- package/dist/components/Content/Schema/helpers/schema-name.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/schema-name.js +15 -14
- package/dist/components/Content/Tags/ClassicLayout.vue.d.ts +1 -1
- package/dist/components/Content/Tags/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/components/Content/Tags/ClassicLayout.vue.js +2 -2
- package/dist/components/Content/Tags/ModernLayout.vue.d.ts +3 -1
- package/dist/components/Content/Tags/ModernLayout.vue.d.ts.map +1 -1
- package/dist/components/Content/Tags/ModernLayout.vue.js +1 -1
- package/dist/components/Content/Tags/ModernLayout.vue2.js +34 -30
- package/dist/components/Content/Tags/Tag.vue.d.ts +3 -1
- package/dist/components/Content/Tags/Tag.vue.d.ts.map +1 -1
- package/dist/components/Content/Tags/Tag.vue.js +14 -12
- package/dist/components/Content/Tags/TagSection.vue.d.ts +2 -1
- package/dist/components/Content/Tags/TagSection.vue.d.ts.map +1 -1
- package/dist/components/Content/Tags/TagSection.vue.js +49 -52
- package/dist/components/OperationsList/OperationsList.vue.d.ts +1 -1
- package/dist/components/OperationsList/OperationsList.vue.d.ts.map +1 -1
- package/dist/components/OperationsList/OperationsList.vue.js +1 -1
- package/dist/components/OperationsList/OperationsListItem.vue.d.ts +1 -1
- package/dist/components/OperationsList/OperationsListItem.vue.d.ts.map +1 -1
- package/dist/components/OperationsList/OperationsListItem.vue.js +2 -2
- package/dist/components/Section/Section.vue.js +1 -1
- package/dist/components/Section/SectionContainerAccordion.vue.js +2 -2
- package/dist/components/ShowMoreButton.vue.d.ts +1 -0
- package/dist/components/ShowMoreButton.vue.d.ts.map +1 -1
- package/dist/components/ShowMoreButton.vue.js +2 -2
- package/dist/components/ShowMoreButton.vue2.js +12 -12
- package/dist/consts/urls.d.ts +17 -0
- package/dist/consts/urls.d.ts.map +1 -0
- package/dist/consts/urls.js +7 -0
- package/dist/features/Operation/Operation.vue.d.ts +21 -9
- package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
- package/dist/features/Operation/Operation.vue.js +42 -53
- package/dist/features/Operation/components/Header.vue.d.ts +2 -2
- package/dist/features/Operation/components/Header.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/Header.vue.js +9 -8
- package/dist/features/Operation/components/Headers.vue.d.ts +2 -2
- package/dist/features/Operation/components/Headers.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/Headers.vue.js +1 -1
- package/dist/features/Operation/components/Headers.vue2.js +35 -33
- package/dist/features/Operation/components/OperationParameters.vue.d.ts +4 -0
- package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationParameters.vue.js +37 -31
- package/dist/features/Operation/components/OperationResponses.vue.d.ts +5 -1
- package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationResponses.vue.js +16 -17
- package/dist/features/Operation/components/ParameterList.vue.d.ts +6 -2
- package/dist/features/Operation/components/ParameterList.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterList.vue.js +17 -19
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts +6 -2
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.js +3 -3
- package/dist/features/Operation/components/ParameterListItem.vue2.js +64 -65
- package/dist/features/Operation/components/RequestBody.vue.d.ts +4 -0
- package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/RequestBody.vue.js +2 -2
- package/dist/features/Operation/components/RequestBody.vue2.js +65 -65
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +4 -0
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/callbacks/Callback.vue.js +2 -2
- package/dist/features/Operation/components/callbacks/Callback.vue2.js +29 -22
- package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts +6 -0
- package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/callbacks/Callbacks.vue.js +18 -16
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +11 -5
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.js +3 -3
- package/dist/features/Operation/layouts/ClassicLayout.vue2.js +99 -90
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +12 -5
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
- package/dist/features/Operation/layouts/ModernLayout.vue2.js +99 -87
- package/dist/features/Search/helpers/create-search-index.d.ts +2 -1
- package/dist/features/Search/helpers/create-search-index.d.ts.map +1 -1
- package/dist/features/Search/types.d.ts +1 -1
- package/dist/features/Search/types.d.ts.map +1 -1
- package/dist/features/api-client-modal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/features/api-client-modal/ApiClientModal.vue.js +23 -26
- package/dist/features/api-client-modal/useApiClient.d.ts +3032 -2888
- package/dist/features/api-client-modal/useApiClient.d.ts.map +1 -1
- package/dist/features/document-source/hooks/useDocumentFetcher.d.ts.map +1 -1
- package/dist/features/document-source/hooks/useDocumentFetcher.js +13 -11
- package/dist/features/document-source/hooks/useDocumentSource.d.ts +1 -1
- package/dist/features/document-source/hooks/useDocumentSource.d.ts.map +1 -1
- package/dist/features/example-responses/ExampleResponse.vue.d.ts.map +1 -1
- package/dist/features/example-responses/ExampleResponse.vue.js +3 -3
- package/dist/features/example-responses/ExampleResponse.vue2.js +26 -18
- package/dist/features/example-responses/ExampleResponses.vue.d.ts.map +1 -1
- package/dist/features/example-responses/ExampleResponses.vue.js +2 -2
- package/dist/features/example-responses/ExampleResponses.vue2.js +53 -53
- package/dist/features/multiple-documents/useMultipleDocuments.d.ts +11 -6
- package/dist/features/multiple-documents/useMultipleDocuments.d.ts.map +1 -1
- package/dist/features/multiple-documents/useMultipleDocuments.js +57 -48
- package/dist/features/test-request-button/TestRequestButton.vue.d.ts.map +1 -1
- package/dist/features/test-request-button/TestRequestButton.vue.js +2 -2
- package/dist/features/test-request-button/TestRequestButton.vue2.js +15 -21
- package/dist/features/toolbar/ApiReferenceToolbar.vue.d.ts +16 -0
- package/dist/features/toolbar/ApiReferenceToolbar.vue.d.ts.map +1 -0
- package/dist/features/toolbar/ApiReferenceToolbar.vue.js +43 -0
- package/dist/features/toolbar/ApiReferenceToolbar.vue2.js +4 -0
- package/dist/features/toolbar/ApiReferenceToolbarBlurb.vue.d.ts +13 -0
- package/dist/features/toolbar/ApiReferenceToolbarBlurb.vue.d.ts.map +1 -0
- package/dist/features/toolbar/ApiReferenceToolbarBlurb.vue.js +12 -0
- package/dist/features/toolbar/ApiReferenceToolbarConfig.vue.d.ts +14 -0
- package/dist/features/toolbar/ApiReferenceToolbarConfig.vue.d.ts.map +1 -0
- package/dist/features/toolbar/ApiReferenceToolbarConfig.vue.js +95 -0
- package/dist/features/toolbar/ApiReferenceToolbarConfig.vue2.js +4 -0
- package/dist/features/toolbar/ApiReferenceToolbarConfigLayout.vue.d.ts +10 -0
- package/dist/features/toolbar/ApiReferenceToolbarConfigLayout.vue.d.ts.map +1 -0
- package/dist/features/toolbar/ApiReferenceToolbarConfigLayout.vue.js +27 -0
- package/dist/features/toolbar/ApiReferenceToolbarConfigLayout.vue2.js +4 -0
- package/dist/features/toolbar/ApiReferenceToolbarConfigLayoutOptions.vue.d.ts +25 -0
- package/dist/features/toolbar/ApiReferenceToolbarConfigLayoutOptions.vue.d.ts.map +1 -0
- package/dist/features/toolbar/ApiReferenceToolbarConfigLayoutOptions.vue.js +123 -0
- package/dist/features/toolbar/ApiReferenceToolbarConfigLayoutOptions.vue2.js +4 -0
- package/dist/features/toolbar/ApiReferenceToolbarConfigTheme.vue.d.ts +11 -0
- package/dist/features/toolbar/ApiReferenceToolbarConfigTheme.vue.d.ts.map +1 -0
- package/dist/features/toolbar/ApiReferenceToolbarConfigTheme.vue.js +41 -0
- package/dist/features/toolbar/ApiReferenceToolbarConfigTheme.vue2.js +4 -0
- package/dist/features/toolbar/ApiReferenceToolbarPopover.vue.d.ts +26 -0
- package/dist/features/toolbar/ApiReferenceToolbarPopover.vue.d.ts.map +1 -0
- package/dist/features/toolbar/ApiReferenceToolbarPopover.vue.js +46 -0
- package/dist/features/toolbar/ApiReferenceToolbarPopover.vue2.js +4 -0
- package/dist/features/toolbar/ApiReferenceToolbarRegisterButton.vue.d.ts +25 -0
- package/dist/features/toolbar/ApiReferenceToolbarRegisterButton.vue.d.ts.map +1 -0
- package/dist/features/toolbar/ApiReferenceToolbarRegisterButton.vue.js +58 -0
- package/dist/features/toolbar/ApiReferenceToolbarRegisterButton.vue2.js +4 -0
- package/dist/features/toolbar/ApiReferenceToolbarSdks.vue.d.ts +7 -0
- package/dist/features/toolbar/ApiReferenceToolbarSdks.vue.d.ts.map +1 -0
- package/dist/features/toolbar/ApiReferenceToolbarSdks.vue.js +84 -0
- package/dist/features/toolbar/ApiReferenceToolbarSdks.vue2.js +4 -0
- package/dist/features/toolbar/ApiReferenceToolbarShare.vue.d.ts +7 -0
- package/dist/features/toolbar/ApiReferenceToolbarShare.vue.d.ts.map +1 -0
- package/dist/features/toolbar/ApiReferenceToolbarShare.vue.js +42 -0
- package/dist/features/toolbar/ApiReferenceToolbarShare.vue2.js +4 -0
- package/dist/features/toolbar/ApiReferenceToolbarShareRegister.vue.d.ts +7 -0
- package/dist/features/toolbar/ApiReferenceToolbarShareRegister.vue.d.ts.map +1 -0
- package/dist/features/toolbar/ApiReferenceToolbarShareRegister.vue.js +56 -0
- package/dist/features/toolbar/ApiReferenceToolbarShareRegister.vue2.js +4 -0
- package/dist/{v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.d.ts → features/toolbar/ApiReferenceToolbarShareTemporary.vue.d.ts} +6 -6
- package/dist/features/toolbar/ApiReferenceToolbarShareTemporary.vue.d.ts.map +1 -0
- package/dist/features/toolbar/ApiReferenceToolbarShareTemporary.vue.js +83 -0
- package/dist/features/toolbar/ApiReferenceToolbarShareTemporary.vue2.js +4 -0
- package/dist/features/toolbar/ApiReferenceToolbarTitle.vue.d.ts +3 -0
- package/dist/features/toolbar/ApiReferenceToolbarTitle.vue.d.ts.map +1 -0
- package/dist/features/toolbar/ApiReferenceToolbarTitle.vue.js +51 -0
- package/dist/features/toolbar/ApiReferenceToolbarTitle.vue2.js +4 -0
- package/dist/features/toolbar/uploadTempDocument.d.ts +3 -0
- package/dist/features/toolbar/uploadTempDocument.d.ts.map +1 -0
- package/dist/features/toolbar/uploadTempDocument.js +21 -0
- package/dist/helpers/test-utils.d.ts +3 -365
- package/dist/helpers/test-utils.d.ts.map +1 -1
- package/dist/hooks/useNavState.d.ts +4 -2
- package/dist/hooks/useNavState.d.ts.map +1 -1
- package/dist/hooks/useNavState.js +31 -27
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +21 -19
- package/dist/style.css +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.d.ts +6 -6
- package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.js +93 -79
- package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts +1 -1
- package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js +2 -2
- package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue2.js +11 -11
- package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue.d.ts +2 -2
- package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue.js +2 -2
- package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue2.js +10 -10
- package/dist/v2/blocks/scalar-client-selector-block/helpers/featured-clients.d.ts +1 -1
- package/dist/v2/blocks/scalar-client-selector-block/helpers/featured-clients.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue.d.ts +3 -0
- package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue.js +2 -2
- package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue2.js +32 -31
- package/dist/v2/blocks/scalar-info-block/components/InfoBlock.vue.d.ts +15 -8
- package/dist/v2/blocks/scalar-info-block/components/InfoBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-info-block/components/InfoBlock.vue.js +25 -20
- package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue.d.ts +8 -7
- package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue.js +1 -1
- package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue2.js +27 -32
- package/dist/v2/blocks/scalar-server-selector-block/components/Selector.vue.d.ts +2 -22
- package/dist/v2/blocks/scalar-server-selector-block/components/Selector.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue.d.ts +8 -0
- package/dist/v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue.js +2 -2
- package/dist/v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue2.js +70 -65
- package/dist/v2/blocks/scalar-sidebar-block/components/SidebarElement.vue.d.ts +9 -1
- package/dist/v2/blocks/scalar-sidebar-block/components/SidebarElement.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-sidebar-block/components/SidebarElement.vue.js +2 -2
- package/dist/v2/blocks/scalar-sidebar-block/components/SidebarElement.vue2.js +60 -57
- package/dist/v2/blocks/scalar-sidebar-block/helpers/create-sidebar.d.ts +3 -365
- package/dist/v2/blocks/scalar-sidebar-block/helpers/create-sidebar.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-sidebar-block/helpers/generate-reverse-index.d.ts +3 -183
- package/dist/v2/blocks/scalar-sidebar-block/helpers/generate-reverse-index.d.ts.map +1 -1
- package/dist/v2/helpers/map-configuration.d.ts +22 -22
- package/dist/v2/helpers/map-configuration.d.ts.map +1 -1
- package/package.json +21 -18
- package/dist/components/Content/Operations/TraversedEntryContainer.vue.d.ts +0 -13
- package/dist/components/Content/Operations/TraversedEntryContainer.vue.d.ts.map +0 -1
- package/dist/components/Content/Operations/TraversedEntryContainer.vue.js +0 -52
- package/dist/components/Content/Operations/TraversedEntryContainer.vue2.js +0 -4
- package/dist/components/Content/Operations/index.d.ts +0 -2
- package/dist/components/Content/Operations/index.d.ts.map +0 -1
- package/dist/hooks/useConfig.d.ts +0 -9
- package/dist/hooks/useConfig.d.ts.map +0 -1
- package/dist/hooks/useConfig.js +0 -10
- package/dist/legacy/stores/index.d.ts +0 -2
- package/dist/legacy/stores/index.d.ts.map +0 -1
- package/dist/legacy/stores/useExampleStore.d.ts +0 -5
- package/dist/legacy/stores/useExampleStore.d.ts.map +0 -1
- package/dist/legacy/stores/useExampleStore.js +0 -8
- package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.js +0 -4
- package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue2.js +0 -55
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts +0 -79
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.js +0 -7
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue2.js +0 -236
- package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.d.ts +0 -41
- package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.js +0 -22
- package/dist/v2/blocks/scalar-request-example-block/helpers/generate-client-options.d.ts +0 -20
- package/dist/v2/blocks/scalar-request-example-block/helpers/generate-client-options.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-request-example-block/helpers/generate-client-options.js +0 -33
- package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.d.ts +0 -17
- package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.js +0 -26
- package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.d.ts +0 -4
- package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.js +0 -10
- package/dist/v2/blocks/scalar-request-example-block/index.d.ts +0 -3
- package/dist/v2/blocks/scalar-request-example-block/index.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-request-example-block/types.d.ts +0 -29
- package/dist/v2/blocks/scalar-request-example-block/types.d.ts.map +0 -1
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { defineComponent as p, mergeModels as f, useModel as v, createElementBlock as k, openBlock as b, Fragment as g, createVNode as t, unref as r, createSlots as y, withCtx as s, createTextVNode as m } from "vue";
|
|
2
|
+
import { useLoadingState as S, ScalarTextInput as T, ScalarIconButton as C, ScalarButton as w } from "@scalar/components";
|
|
3
|
+
import { ScalarIconCopy as x } from "@scalar/icons";
|
|
4
|
+
import { useClipboard as R } from "@scalar/use-hooks/useClipboard";
|
|
5
|
+
import { useToasts as A } from "@scalar/use-toasts";
|
|
6
|
+
import { REGISTRY_SHARE_URL as B } from "../../consts/urls.js";
|
|
7
|
+
import L from "./ApiReferenceToolbarBlurb.vue.js";
|
|
8
|
+
import { uploadTempDocument as E } from "./uploadTempDocument.js";
|
|
9
|
+
const N = /* @__PURE__ */ p({
|
|
10
|
+
__name: "ApiReferenceToolbarShareTemporary",
|
|
11
|
+
props: /* @__PURE__ */ f({
|
|
12
|
+
workspace: {}
|
|
13
|
+
}, {
|
|
14
|
+
url: {},
|
|
15
|
+
urlModifiers: {}
|
|
16
|
+
}),
|
|
17
|
+
emits: ["update:url"],
|
|
18
|
+
setup(l) {
|
|
19
|
+
const { toast: d } = A(), a = S(), o = v(l, "url");
|
|
20
|
+
async function c() {
|
|
21
|
+
if (a.isLoading || !l.workspace || o.value)
|
|
22
|
+
return;
|
|
23
|
+
a.startLoading();
|
|
24
|
+
const i = l.workspace.exportActiveDocument("json");
|
|
25
|
+
if (!i) {
|
|
26
|
+
d("Unable to export active document", "error"), a.invalidate();
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
try {
|
|
30
|
+
o.value = await E(i), n(o.value), a.validate();
|
|
31
|
+
} catch (e) {
|
|
32
|
+
const u = e instanceof Error ? e.message : "An unknown error occurred";
|
|
33
|
+
d(u, "error"), a.invalidate();
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
const { copyToClipboard: n } = R();
|
|
37
|
+
return (i, e) => (b(), k(g, null, [
|
|
38
|
+
t(r(T), {
|
|
39
|
+
readonly: "",
|
|
40
|
+
placeholder: `${r(B)}/apis/...`,
|
|
41
|
+
modelValue: o.value,
|
|
42
|
+
onClick: e[1] || (e[1] = (u) => o.value && r(n)(o.value))
|
|
43
|
+
}, y({ _: 2 }, [
|
|
44
|
+
o.value ? {
|
|
45
|
+
name: "aside",
|
|
46
|
+
fn: s(() => [
|
|
47
|
+
t(r(C), {
|
|
48
|
+
icon: r(x),
|
|
49
|
+
label: "Copy link to clipboard",
|
|
50
|
+
class: "-m-1.5 -ml-1",
|
|
51
|
+
size: "sm",
|
|
52
|
+
onClick: e[0] || (e[0] = (u) => r(n)(o.value))
|
|
53
|
+
}, null, 8, ["icon"])
|
|
54
|
+
]),
|
|
55
|
+
key: "0"
|
|
56
|
+
} : void 0
|
|
57
|
+
]), 1032, ["placeholder", "modelValue"]),
|
|
58
|
+
t(r(w), {
|
|
59
|
+
class: "h-auto p-2.5",
|
|
60
|
+
loading: r(a),
|
|
61
|
+
variant: "outlined",
|
|
62
|
+
disabled: !!o.value,
|
|
63
|
+
onClick: c
|
|
64
|
+
}, {
|
|
65
|
+
default: s(() => e[2] || (e[2] = [
|
|
66
|
+
m(" Generate ")
|
|
67
|
+
])),
|
|
68
|
+
_: 1,
|
|
69
|
+
__: [2]
|
|
70
|
+
}, 8, ["loading", "disabled"]),
|
|
71
|
+
t(L, { class: "-mt-1" }, {
|
|
72
|
+
default: s(() => e[3] || (e[3] = [
|
|
73
|
+
m(" Shared documents will automatically be deleted after 7 days. ")
|
|
74
|
+
])),
|
|
75
|
+
_: 1,
|
|
76
|
+
__: [3]
|
|
77
|
+
})
|
|
78
|
+
], 64));
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
export {
|
|
82
|
+
N as default
|
|
83
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
3
|
+
//# sourceMappingURL=ApiReferenceToolbarTitle.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApiReferenceToolbarTitle.vue.d.ts","sourceRoot":"","sources":["../../../src/features/toolbar/ApiReferenceToolbarTitle.vue"],"names":[],"mappings":";AA+LA,wBAKG"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { defineComponent as a, createBlock as p, openBlock as d, withCtx as l, createElementVNode as e, createTextVNode as t, createVNode as r, toDisplayString as c, unref as n } from "vue";
|
|
2
|
+
import { ScalarIconButton as u } from "@scalar/components";
|
|
3
|
+
import { ScalarIconCopy as m, ScalarIconInfo as f } from "@scalar/icons";
|
|
4
|
+
import { useClipboard as b } from "@scalar/use-hooks/useClipboard";
|
|
5
|
+
import x from "./ApiReferenceToolbarPopover.vue.js";
|
|
6
|
+
const y = {
|
|
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",
|
|
8
|
+
type: "button"
|
|
9
|
+
}, g = { class: "-m-2 flex flex-col gap-2 leading-relaxed" }, v = { class: "bg-b-2 inline-flex items-center gap-0.5 rounded border px-1 py-0.5 text-sm" }, i = 'showToolbar: "never"', k = /* @__PURE__ */ a({
|
|
10
|
+
__name: "ApiReferenceToolbarTitle",
|
|
11
|
+
setup(T) {
|
|
12
|
+
const { copyToClipboard: s } = b();
|
|
13
|
+
return (C, o) => (d(), p(x, {
|
|
14
|
+
class: "w-120",
|
|
15
|
+
placement: "bottom-start"
|
|
16
|
+
}, {
|
|
17
|
+
button: l(() => [
|
|
18
|
+
e("button", y, [
|
|
19
|
+
o[1] || (o[1] = t(" Developer Tools ")),
|
|
20
|
+
r(n(f))
|
|
21
|
+
])
|
|
22
|
+
]),
|
|
23
|
+
info: l(() => o[5] || (o[5] = [
|
|
24
|
+
t(" The developer tools will only appear when running on localhost. ")
|
|
25
|
+
])),
|
|
26
|
+
default: l(() => [
|
|
27
|
+
e("div", g, [
|
|
28
|
+
o[4] || (o[4] = e("div", null, " The developer tools allow you to customize the appearance and behavior of your documentation. You can also share your documentation using the Scalar Registry. ", -1)),
|
|
29
|
+
e("div", null, [
|
|
30
|
+
o[2] || (o[2] = t(" To disable the toolbar, set ")),
|
|
31
|
+
e("div", v, [
|
|
32
|
+
e("code", { class: "font-code" }, c(i)),
|
|
33
|
+
r(n(u), {
|
|
34
|
+
class: "-m-1 p-1.25",
|
|
35
|
+
icon: n(m),
|
|
36
|
+
label: "Copy link to clipboard",
|
|
37
|
+
size: "sm",
|
|
38
|
+
onClick: o[0] || (o[0] = (w) => n(s)(i))
|
|
39
|
+
}, null, 8, ["icon"])
|
|
40
|
+
]),
|
|
41
|
+
o[3] || (o[3] = t(" in your configuration. "))
|
|
42
|
+
])
|
|
43
|
+
])
|
|
44
|
+
]),
|
|
45
|
+
_: 1
|
|
46
|
+
}));
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
export {
|
|
50
|
+
k as default
|
|
51
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uploadTempDocument.d.ts","sourceRoot":"","sources":["../../../src/features/toolbar/uploadTempDocument.ts"],"names":[],"mappings":"AASA,mDAAmD;AACnD,wBAAsB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAoB1E"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { redirectToProxy as n } from "@scalar/oas-utils/helpers";
|
|
2
|
+
import { PROXY_URL as i, UPLOAD_TEMP_API_URL as s } from "../../consts/urls.js";
|
|
3
|
+
function p(e) {
|
|
4
|
+
return !!e && typeof e == "object" && "url" in e && typeof e.url == "string";
|
|
5
|
+
}
|
|
6
|
+
async function f(e) {
|
|
7
|
+
const t = JSON.stringify({ document: e }), r = await fetch(n(i, s), {
|
|
8
|
+
method: "POST",
|
|
9
|
+
headers: { "Content-Type": "application/json" },
|
|
10
|
+
body: t
|
|
11
|
+
});
|
|
12
|
+
if (!r.ok)
|
|
13
|
+
throw new Error(` Failed to generate temporary link, server responded with ${r.status}`);
|
|
14
|
+
const o = await r.json();
|
|
15
|
+
if (!p(o))
|
|
16
|
+
throw new Error("Failed to generate temporary link, invalid response from server");
|
|
17
|
+
return o.url;
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
f as uploadTempDocument
|
|
21
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { OpenAPIV3_1 } from '@scalar/openapi-types';
|
|
2
2
|
import type { WorkspaceStore } from '@scalar/workspace-store/client';
|
|
3
|
-
import type { TraversedEntry } from '@scalar/workspace-store/schemas/
|
|
3
|
+
import type { TraversedEntry } from '@scalar/workspace-store/schemas/navigation';
|
|
4
4
|
import type { WorkspaceDocument } from '@scalar/workspace-store/schemas/workspace';
|
|
5
5
|
/**
|
|
6
6
|
* A collection of tools which are used strictly for testing
|
|
@@ -9,188 +9,7 @@ export declare const createMockSidebar: (collapsedItems?: Record<string, boolean
|
|
|
9
9
|
collapsedSidebarItems: Record<string, boolean>;
|
|
10
10
|
isSidebarOpen: import("vue").Ref<boolean, boolean>;
|
|
11
11
|
items: import("vue").ComputedRef<{
|
|
12
|
-
entries:
|
|
13
|
-
title: string;
|
|
14
|
-
id: string;
|
|
15
|
-
} & {
|
|
16
|
-
description?: string | undefined;
|
|
17
|
-
children?: (({
|
|
18
|
-
title: string;
|
|
19
|
-
id: string;
|
|
20
|
-
} & /*elided*/ any) | ({
|
|
21
|
-
title: string;
|
|
22
|
-
id: string;
|
|
23
|
-
} & {
|
|
24
|
-
children?: (({
|
|
25
|
-
title: string;
|
|
26
|
-
id: string;
|
|
27
|
-
} & /*elided*/ any) | ({
|
|
28
|
-
title: string;
|
|
29
|
-
id: string;
|
|
30
|
-
} & /*elided*/ any) | ({
|
|
31
|
-
title: string;
|
|
32
|
-
id: string;
|
|
33
|
-
} & {
|
|
34
|
-
isDeprecated?: boolean | undefined;
|
|
35
|
-
path: string;
|
|
36
|
-
method: "head" | "connect" | "delete" | "get" | "options" | "patch" | "post" | "put" | "trace";
|
|
37
|
-
type: "operation";
|
|
38
|
-
ref: string;
|
|
39
|
-
}) | ({
|
|
40
|
-
title: string;
|
|
41
|
-
id: string;
|
|
42
|
-
} & {
|
|
43
|
-
type: "model";
|
|
44
|
-
ref: string;
|
|
45
|
-
name: string;
|
|
46
|
-
}) | ({
|
|
47
|
-
title: string;
|
|
48
|
-
id: string;
|
|
49
|
-
} & {
|
|
50
|
-
isDeprecated?: boolean | undefined;
|
|
51
|
-
method: "head" | "connect" | "delete" | "get" | "options" | "patch" | "post" | "put" | "trace";
|
|
52
|
-
type: "webhook";
|
|
53
|
-
ref: string;
|
|
54
|
-
name: string;
|
|
55
|
-
}))[] | undefined;
|
|
56
|
-
type: "text";
|
|
57
|
-
}) | ({
|
|
58
|
-
title: string;
|
|
59
|
-
id: string;
|
|
60
|
-
} & {
|
|
61
|
-
isDeprecated?: boolean | undefined;
|
|
62
|
-
path: string;
|
|
63
|
-
method: "head" | "connect" | "delete" | "get" | "options" | "patch" | "post" | "put" | "trace";
|
|
64
|
-
type: "operation";
|
|
65
|
-
ref: string;
|
|
66
|
-
}) | ({
|
|
67
|
-
title: string;
|
|
68
|
-
id: string;
|
|
69
|
-
} & {
|
|
70
|
-
type: "model";
|
|
71
|
-
ref: string;
|
|
72
|
-
name: string;
|
|
73
|
-
}) | ({
|
|
74
|
-
title: string;
|
|
75
|
-
id: string;
|
|
76
|
-
} & {
|
|
77
|
-
isDeprecated?: boolean | undefined;
|
|
78
|
-
method: "head" | "connect" | "delete" | "get" | "options" | "patch" | "post" | "put" | "trace";
|
|
79
|
-
type: "webhook";
|
|
80
|
-
ref: string;
|
|
81
|
-
name: string;
|
|
82
|
-
}))[] | undefined;
|
|
83
|
-
isWebhooks?: boolean | undefined;
|
|
84
|
-
xKeys?: {
|
|
85
|
-
[x: string]: unknown;
|
|
86
|
-
} | undefined;
|
|
87
|
-
type: "tag";
|
|
88
|
-
name: string;
|
|
89
|
-
isGroup: boolean;
|
|
90
|
-
}) | ({
|
|
91
|
-
title: string;
|
|
92
|
-
id: string;
|
|
93
|
-
} & {
|
|
94
|
-
children?: (({
|
|
95
|
-
title: string;
|
|
96
|
-
id: string;
|
|
97
|
-
} & {
|
|
98
|
-
description?: string | undefined;
|
|
99
|
-
children?: (({
|
|
100
|
-
title: string;
|
|
101
|
-
id: string;
|
|
102
|
-
} & /*elided*/ any) | ({
|
|
103
|
-
title: string;
|
|
104
|
-
id: string;
|
|
105
|
-
} & /*elided*/ any) | ({
|
|
106
|
-
title: string;
|
|
107
|
-
id: string;
|
|
108
|
-
} & {
|
|
109
|
-
isDeprecated?: boolean | undefined;
|
|
110
|
-
path: string;
|
|
111
|
-
method: "head" | "connect" | "delete" | "get" | "options" | "patch" | "post" | "put" | "trace";
|
|
112
|
-
type: "operation";
|
|
113
|
-
ref: string;
|
|
114
|
-
}) | ({
|
|
115
|
-
title: string;
|
|
116
|
-
id: string;
|
|
117
|
-
} & {
|
|
118
|
-
type: "model";
|
|
119
|
-
ref: string;
|
|
120
|
-
name: string;
|
|
121
|
-
}) | ({
|
|
122
|
-
title: string;
|
|
123
|
-
id: string;
|
|
124
|
-
} & {
|
|
125
|
-
isDeprecated?: boolean | undefined;
|
|
126
|
-
method: "head" | "connect" | "delete" | "get" | "options" | "patch" | "post" | "put" | "trace";
|
|
127
|
-
type: "webhook";
|
|
128
|
-
ref: string;
|
|
129
|
-
name: string;
|
|
130
|
-
}))[] | undefined;
|
|
131
|
-
isWebhooks?: boolean | undefined;
|
|
132
|
-
xKeys?: {
|
|
133
|
-
[x: string]: unknown;
|
|
134
|
-
} | undefined;
|
|
135
|
-
type: "tag";
|
|
136
|
-
name: string;
|
|
137
|
-
isGroup: boolean;
|
|
138
|
-
}) | ({
|
|
139
|
-
title: string;
|
|
140
|
-
id: string;
|
|
141
|
-
} & /*elided*/ any) | ({
|
|
142
|
-
title: string;
|
|
143
|
-
id: string;
|
|
144
|
-
} & {
|
|
145
|
-
isDeprecated?: boolean | undefined;
|
|
146
|
-
path: string;
|
|
147
|
-
method: "head" | "connect" | "delete" | "get" | "options" | "patch" | "post" | "put" | "trace";
|
|
148
|
-
type: "operation";
|
|
149
|
-
ref: string;
|
|
150
|
-
}) | ({
|
|
151
|
-
title: string;
|
|
152
|
-
id: string;
|
|
153
|
-
} & {
|
|
154
|
-
type: "model";
|
|
155
|
-
ref: string;
|
|
156
|
-
name: string;
|
|
157
|
-
}) | ({
|
|
158
|
-
title: string;
|
|
159
|
-
id: string;
|
|
160
|
-
} & {
|
|
161
|
-
isDeprecated?: boolean | undefined;
|
|
162
|
-
method: "head" | "connect" | "delete" | "get" | "options" | "patch" | "post" | "put" | "trace";
|
|
163
|
-
type: "webhook";
|
|
164
|
-
ref: string;
|
|
165
|
-
name: string;
|
|
166
|
-
}))[] | undefined;
|
|
167
|
-
type: "text";
|
|
168
|
-
}) | ({
|
|
169
|
-
title: string;
|
|
170
|
-
id: string;
|
|
171
|
-
} & {
|
|
172
|
-
isDeprecated?: boolean | undefined;
|
|
173
|
-
path: string;
|
|
174
|
-
method: "head" | "connect" | "delete" | "get" | "options" | "patch" | "post" | "put" | "trace";
|
|
175
|
-
type: "operation";
|
|
176
|
-
ref: string;
|
|
177
|
-
}) | ({
|
|
178
|
-
title: string;
|
|
179
|
-
id: string;
|
|
180
|
-
} & {
|
|
181
|
-
type: "model";
|
|
182
|
-
ref: string;
|
|
183
|
-
name: string;
|
|
184
|
-
}) | ({
|
|
185
|
-
title: string;
|
|
186
|
-
id: string;
|
|
187
|
-
} & {
|
|
188
|
-
isDeprecated?: boolean | undefined;
|
|
189
|
-
method: "head" | "connect" | "delete" | "get" | "options" | "patch" | "post" | "put" | "trace";
|
|
190
|
-
type: "webhook";
|
|
191
|
-
ref: string;
|
|
192
|
-
name: string;
|
|
193
|
-
}))[];
|
|
12
|
+
entries: TraversedEntry[];
|
|
194
13
|
entities: Map<any, any>;
|
|
195
14
|
}>;
|
|
196
15
|
scrollToOperation: import("vitest").Mock<(...args: any[]) => any>;
|
|
@@ -201,188 +20,7 @@ export declare const createMockSidebarFromDocument: (document: OpenAPIV3_1.Docum
|
|
|
201
20
|
collapsedSidebarItems: Record<string, boolean>;
|
|
202
21
|
isSidebarOpen: import("vue").Ref<boolean, boolean>;
|
|
203
22
|
items: import("vue").ComputedRef<{
|
|
204
|
-
entries:
|
|
205
|
-
title: string;
|
|
206
|
-
id: string;
|
|
207
|
-
} & {
|
|
208
|
-
description?: string | undefined;
|
|
209
|
-
children?: (({
|
|
210
|
-
title: string;
|
|
211
|
-
id: string;
|
|
212
|
-
} & /*elided*/ any) | ({
|
|
213
|
-
title: string;
|
|
214
|
-
id: string;
|
|
215
|
-
} & {
|
|
216
|
-
children?: (({
|
|
217
|
-
title: string;
|
|
218
|
-
id: string;
|
|
219
|
-
} & /*elided*/ any) | ({
|
|
220
|
-
title: string;
|
|
221
|
-
id: string;
|
|
222
|
-
} & /*elided*/ any) | ({
|
|
223
|
-
title: string;
|
|
224
|
-
id: string;
|
|
225
|
-
} & {
|
|
226
|
-
isDeprecated?: boolean | undefined;
|
|
227
|
-
path: string;
|
|
228
|
-
method: "head" | "connect" | "delete" | "get" | "options" | "patch" | "post" | "put" | "trace";
|
|
229
|
-
type: "operation";
|
|
230
|
-
ref: string;
|
|
231
|
-
}) | ({
|
|
232
|
-
title: string;
|
|
233
|
-
id: string;
|
|
234
|
-
} & {
|
|
235
|
-
type: "model";
|
|
236
|
-
ref: string;
|
|
237
|
-
name: string;
|
|
238
|
-
}) | ({
|
|
239
|
-
title: string;
|
|
240
|
-
id: string;
|
|
241
|
-
} & {
|
|
242
|
-
isDeprecated?: boolean | undefined;
|
|
243
|
-
method: "head" | "connect" | "delete" | "get" | "options" | "patch" | "post" | "put" | "trace";
|
|
244
|
-
type: "webhook";
|
|
245
|
-
ref: string;
|
|
246
|
-
name: string;
|
|
247
|
-
}))[] | undefined;
|
|
248
|
-
type: "text";
|
|
249
|
-
}) | ({
|
|
250
|
-
title: string;
|
|
251
|
-
id: string;
|
|
252
|
-
} & {
|
|
253
|
-
isDeprecated?: boolean | undefined;
|
|
254
|
-
path: string;
|
|
255
|
-
method: "head" | "connect" | "delete" | "get" | "options" | "patch" | "post" | "put" | "trace";
|
|
256
|
-
type: "operation";
|
|
257
|
-
ref: string;
|
|
258
|
-
}) | ({
|
|
259
|
-
title: string;
|
|
260
|
-
id: string;
|
|
261
|
-
} & {
|
|
262
|
-
type: "model";
|
|
263
|
-
ref: string;
|
|
264
|
-
name: string;
|
|
265
|
-
}) | ({
|
|
266
|
-
title: string;
|
|
267
|
-
id: string;
|
|
268
|
-
} & {
|
|
269
|
-
isDeprecated?: boolean | undefined;
|
|
270
|
-
method: "head" | "connect" | "delete" | "get" | "options" | "patch" | "post" | "put" | "trace";
|
|
271
|
-
type: "webhook";
|
|
272
|
-
ref: string;
|
|
273
|
-
name: string;
|
|
274
|
-
}))[] | undefined;
|
|
275
|
-
isWebhooks?: boolean | undefined;
|
|
276
|
-
xKeys?: {
|
|
277
|
-
[x: string]: unknown;
|
|
278
|
-
} | undefined;
|
|
279
|
-
type: "tag";
|
|
280
|
-
name: string;
|
|
281
|
-
isGroup: boolean;
|
|
282
|
-
}) | ({
|
|
283
|
-
title: string;
|
|
284
|
-
id: string;
|
|
285
|
-
} & {
|
|
286
|
-
children?: (({
|
|
287
|
-
title: string;
|
|
288
|
-
id: string;
|
|
289
|
-
} & {
|
|
290
|
-
description?: string | undefined;
|
|
291
|
-
children?: (({
|
|
292
|
-
title: string;
|
|
293
|
-
id: string;
|
|
294
|
-
} & /*elided*/ any) | ({
|
|
295
|
-
title: string;
|
|
296
|
-
id: string;
|
|
297
|
-
} & /*elided*/ any) | ({
|
|
298
|
-
title: string;
|
|
299
|
-
id: string;
|
|
300
|
-
} & {
|
|
301
|
-
isDeprecated?: boolean | undefined;
|
|
302
|
-
path: string;
|
|
303
|
-
method: "head" | "connect" | "delete" | "get" | "options" | "patch" | "post" | "put" | "trace";
|
|
304
|
-
type: "operation";
|
|
305
|
-
ref: string;
|
|
306
|
-
}) | ({
|
|
307
|
-
title: string;
|
|
308
|
-
id: string;
|
|
309
|
-
} & {
|
|
310
|
-
type: "model";
|
|
311
|
-
ref: string;
|
|
312
|
-
name: string;
|
|
313
|
-
}) | ({
|
|
314
|
-
title: string;
|
|
315
|
-
id: string;
|
|
316
|
-
} & {
|
|
317
|
-
isDeprecated?: boolean | undefined;
|
|
318
|
-
method: "head" | "connect" | "delete" | "get" | "options" | "patch" | "post" | "put" | "trace";
|
|
319
|
-
type: "webhook";
|
|
320
|
-
ref: string;
|
|
321
|
-
name: string;
|
|
322
|
-
}))[] | undefined;
|
|
323
|
-
isWebhooks?: boolean | undefined;
|
|
324
|
-
xKeys?: {
|
|
325
|
-
[x: string]: unknown;
|
|
326
|
-
} | undefined;
|
|
327
|
-
type: "tag";
|
|
328
|
-
name: string;
|
|
329
|
-
isGroup: boolean;
|
|
330
|
-
}) | ({
|
|
331
|
-
title: string;
|
|
332
|
-
id: string;
|
|
333
|
-
} & /*elided*/ any) | ({
|
|
334
|
-
title: string;
|
|
335
|
-
id: string;
|
|
336
|
-
} & {
|
|
337
|
-
isDeprecated?: boolean | undefined;
|
|
338
|
-
path: string;
|
|
339
|
-
method: "head" | "connect" | "delete" | "get" | "options" | "patch" | "post" | "put" | "trace";
|
|
340
|
-
type: "operation";
|
|
341
|
-
ref: string;
|
|
342
|
-
}) | ({
|
|
343
|
-
title: string;
|
|
344
|
-
id: string;
|
|
345
|
-
} & {
|
|
346
|
-
type: "model";
|
|
347
|
-
ref: string;
|
|
348
|
-
name: string;
|
|
349
|
-
}) | ({
|
|
350
|
-
title: string;
|
|
351
|
-
id: string;
|
|
352
|
-
} & {
|
|
353
|
-
isDeprecated?: boolean | undefined;
|
|
354
|
-
method: "head" | "connect" | "delete" | "get" | "options" | "patch" | "post" | "put" | "trace";
|
|
355
|
-
type: "webhook";
|
|
356
|
-
ref: string;
|
|
357
|
-
name: string;
|
|
358
|
-
}))[] | undefined;
|
|
359
|
-
type: "text";
|
|
360
|
-
}) | ({
|
|
361
|
-
title: string;
|
|
362
|
-
id: string;
|
|
363
|
-
} & {
|
|
364
|
-
isDeprecated?: boolean | undefined;
|
|
365
|
-
path: string;
|
|
366
|
-
method: "head" | "connect" | "delete" | "get" | "options" | "patch" | "post" | "put" | "trace";
|
|
367
|
-
type: "operation";
|
|
368
|
-
ref: string;
|
|
369
|
-
}) | ({
|
|
370
|
-
title: string;
|
|
371
|
-
id: string;
|
|
372
|
-
} & {
|
|
373
|
-
type: "model";
|
|
374
|
-
ref: string;
|
|
375
|
-
name: string;
|
|
376
|
-
}) | ({
|
|
377
|
-
title: string;
|
|
378
|
-
id: string;
|
|
379
|
-
} & {
|
|
380
|
-
isDeprecated?: boolean | undefined;
|
|
381
|
-
method: "head" | "connect" | "delete" | "get" | "options" | "patch" | "post" | "put" | "trace";
|
|
382
|
-
type: "webhook";
|
|
383
|
-
ref: string;
|
|
384
|
-
name: string;
|
|
385
|
-
}))[];
|
|
23
|
+
entries: TraversedEntry[];
|
|
386
24
|
entities: Map<any, any>;
|
|
387
25
|
}>;
|
|
388
26
|
scrollToOperation: import("vitest").Mock<(...args: any[]) => any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-utils.d.ts","sourceRoot":"","sources":["../../src/helpers/test-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"test-utils.d.ts","sourceRoot":"","sources":["../../src/helpers/test-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAEpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAA;AAEhF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAA;AAIlF;;GAEG;AAEH,eAAO,MAAM,iBAAiB,GAAI,iBAAgB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,EAAE,UAAS,cAAc,EAAO;;;;;;;;;;CAO5G,CAAA;AAEF,eAAO,MAAM,6BAA6B,GAAI,UAAU,WAAW,CAAC,QAAQ;;;;;;;;;;CAG3E,CAAA;AAED,eAAO,MAAM,uBAAuB;;CAElC,CAAA;AAEF,eAAO,MAAM,kBAAkB,GAAI,aAAS;;;;;;;;;;;;;;;;;CAiB1C,CAAA;AAEF,eAAO,MAAM,eAAe,GAAI,gBAAgB,iBAAiB,KAAG,cAgElE,CAAA;AAEF,eAAO,MAAM,sBAAsB;;;;;;;CAOjC,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ApiReferenceConfiguration } from '@scalar/types/api-reference';
|
|
2
2
|
import type { Heading } from '@scalar/types/legacy';
|
|
3
|
-
import { type InjectionKey, type Ref } from 'vue';
|
|
3
|
+
import { type InjectionKey, type MaybeRefOrGetter, type Ref } from 'vue';
|
|
4
4
|
export type NavState = {
|
|
5
5
|
/** The URL hash without the #, also the "hash" pulled from pathRouting */
|
|
6
6
|
hash: Ref<string>;
|
|
@@ -8,6 +8,8 @@ export type NavState = {
|
|
|
8
8
|
hashPrefix: Ref<string>;
|
|
9
9
|
/** Whether the intersection observer is enabled and updating the hash as we scroll */
|
|
10
10
|
isIntersectionEnabled: Ref<boolean>;
|
|
11
|
+
basePath: MaybeRefOrGetter<string | undefined>;
|
|
12
|
+
generateHeadingSlug: MaybeRefOrGetter<ApiReferenceConfiguration['generateHeadingSlug']>;
|
|
11
13
|
};
|
|
12
14
|
export declare const NAV_STATE_SYMBOL: InjectionKey<NavState>;
|
|
13
15
|
/**
|
|
@@ -19,7 +21,7 @@ export declare const NAV_STATE_SYMBOL: InjectionKey<NavState>;
|
|
|
19
21
|
*
|
|
20
22
|
* @param _config this is used to pass in the config if we have not provided it yet to the useConfig hook such as in ApiReferenceLayout
|
|
21
23
|
*/
|
|
22
|
-
export declare const useNavState: (
|
|
24
|
+
export declare const useNavState: () => {
|
|
23
25
|
hash: Ref<string, string>;
|
|
24
26
|
/** Sets the prefix for the hash */
|
|
25
27
|
setHashPrefix: (prefix: string) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useNavState.d.ts","sourceRoot":"","sources":["../../src/hooks/useNavState.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAC5E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,GAAG,
|
|
1
|
+
{"version":3,"file":"useNavState.d.ts","sourceRoot":"","sources":["../../src/hooks/useNavState.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAC5E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,gBAAgB,EAAE,KAAK,GAAG,EAAwB,MAAM,KAAK,CAAA;AAE9F,MAAM,MAAM,QAAQ,GAAG;IACrB,0EAA0E;IAC1E,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACjB,2CAA2C;IAC3C,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACvB,sFAAsF;IACtF,qBAAqB,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IACnC,QAAQ,EAAE,gBAAgB,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IAC9C,mBAAmB,EAAE,gBAAgB,CAAC,yBAAyB,CAAC,qBAAqB,CAAC,CAAC,CAAA;CACxF,CAAA;AACD,eAAO,MAAM,gBAAgB,EAAe,YAAY,CAAC,QAAQ,CAAC,CAAA;AAOlE;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW;;IAyFpB,mCAAmC;4BACX,MAAM;IAG9B;;;;OAIG;+BA9B4B,MAAM;IAgCrC;;;;;OAKG;oCArDkC,MAAM;IAuD3C;;;OAGG;uCA7EqC,MAAM;;4BA0CjB,OAAO;iCAjEF,MAAM;;;CA4G3C,CAAA;AAED,mCAAmC;AACnC,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAA"}
|