@scalar/api-reference 1.36.2 → 1.38.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 +83 -0
- package/dist/browser/standalone.js +28796 -26431
- 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/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/GettingStarted.vue.d.ts.map +1 -1
- package/dist/components/GettingStarted.vue.js +2 -2
- package/dist/components/GettingStarted.vue2.js +22 -22
- 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 +2 -2
- 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/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/esm.d.ts +2 -2
- package/dist/esm.d.ts.map +1 -1
- 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 +2 -2
- package/dist/features/Operation/components/Headers.vue2.js +31 -29
- 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 +3 -3
- 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 +2 -2
- 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 +3039 -2895
- package/dist/features/api-client-modal/useApiClient.d.ts.map +1 -1
- package/dist/features/document-source/hooks/useDocumentFetcher.d.ts +2 -2
- 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 +2 -2
- package/dist/features/document-source/hooks/useDocumentSource.d.ts.map +1 -1
- package/dist/features/document-source/hooks/useDocumentSource.js +38 -34
- 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/DocumentSelector.vue.d.ts +2 -2
- package/dist/features/multiple-documents/DocumentSelector.vue.d.ts.map +1 -1
- package/dist/features/multiple-documents/useMultipleDocuments.d.ts +10 -7
- package/dist/features/multiple-documents/useMultipleDocuments.d.ts.map +1 -1
- package/dist/features/multiple-documents/useMultipleDocuments.js +47 -44
- 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.js +18 -18
- package/dist/features/toolbar/ApiReferenceToolbarConfig.vue.js +1 -1
- package/dist/features/toolbar/ApiReferenceToolbarConfigTheme.vue.d.ts +2 -2
- package/dist/features/toolbar/ApiReferenceToolbarPopover.vue.js +1 -1
- package/dist/features/toolbar/ApiReferenceToolbarSdks.vue.js +1 -1
- package/dist/features/toolbar/ApiReferenceToolbarShare.vue.js +8 -8
- package/dist/features/toolbar/ApiReferenceToolbarShareRegister.vue.d.ts.map +1 -1
- package/dist/features/toolbar/ApiReferenceToolbarShareRegister.vue.js +34 -28
- package/dist/features/toolbar/ApiReferenceToolbarTitle.vue.js +27 -27
- 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/standalone/lib/html-api.d.ts +3 -3
- package/dist/standalone/lib/html-api.d.ts.map +1 -1
- package/dist/standalone/lib/register-globals.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types.d.ts +2 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.js +46 -40
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue2.js +18 -19
- 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 +2 -2
- 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 +24 -24
- package/dist/v2/helpers/map-configuration.d.ts.map +1 -1
- package/package.json +20 -17
- 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 +0 -14
- 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
|
@@ -1,50 +1,56 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as m, createElementBlock as t, openBlock as l, Fragment as n, createElementVNode as r, createVNode as c, renderList as d, createBlock as u, createTextVNode as o, resolveDynamicComponent as S, toDisplayString as g, withCtx as i } from "vue";
|
|
2
|
+
import { ScalarIconGlobeSimple as b, ScalarIconGitBranch as f, ScalarIconFileMd as _, ScalarIconLockSimple as k, ScalarIconWarningOctagon as w, ScalarIconBracketsCurly as h } from "@scalar/icons";
|
|
3
|
+
import y from "./ApiReferenceToolbarBlurb.vue.js";
|
|
4
|
+
import x from "./ApiReferenceToolbarRegisterButton.vue.js";
|
|
5
|
+
const B = { class: "text-c-2 grid grid-cols-2 gap-2.5 font-medium" }, N = /* @__PURE__ */ m({
|
|
6
6
|
__name: "ApiReferenceToolbarShareRegister",
|
|
7
7
|
props: {
|
|
8
8
|
workspace: {}
|
|
9
9
|
},
|
|
10
|
-
setup(
|
|
11
|
-
const
|
|
12
|
-
{ icon: g, label: "Password Protected" },
|
|
10
|
+
setup(I) {
|
|
11
|
+
const s = [
|
|
13
12
|
{ icon: b, label: "Custom Domains" },
|
|
14
|
-
{ icon:
|
|
15
|
-
{ icon: _, label: "
|
|
16
|
-
{ icon:
|
|
17
|
-
{ icon:
|
|
13
|
+
{ icon: f, label: "GitHub Sync" },
|
|
14
|
+
{ icon: _, label: "Markdown/MDX" },
|
|
15
|
+
{ icon: k, label: "Password Protection" },
|
|
16
|
+
{ icon: w, label: "Spectral Linting" },
|
|
17
|
+
{ icon: h, label: "JSON Schema Support" }
|
|
18
18
|
];
|
|
19
|
-
return (
|
|
20
|
-
|
|
21
|
-
(
|
|
22
|
-
key:
|
|
19
|
+
return (p, e) => (l(), t(n, null, [
|
|
20
|
+
r("ul", B, [
|
|
21
|
+
(l(), t(n, null, d(s, (a) => r("li", {
|
|
22
|
+
key: a.label,
|
|
23
23
|
class: "flex items-center gap-2"
|
|
24
24
|
}, [
|
|
25
|
-
(
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
(l(), u(S(a.icon), {
|
|
26
|
+
class: "text-c-3 size-3.5",
|
|
27
|
+
weight: "bold"
|
|
28
28
|
})),
|
|
29
|
-
|
|
29
|
+
o(" " + g(a.label), 1)
|
|
30
30
|
])), 64))
|
|
31
31
|
]),
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
c(x, { workspace: p.workspace }, {
|
|
33
|
+
default: i(() => e[0] || (e[0] = [
|
|
34
|
+
o(" Deploy on Scalar ")
|
|
35
|
+
])),
|
|
36
|
+
_: 1,
|
|
37
|
+
__: [0]
|
|
38
|
+
}, 8, ["workspace"]),
|
|
39
|
+
c(y, null, {
|
|
40
|
+
default: i(() => e[1] || (e[1] = [
|
|
41
|
+
o(" Uploading documents to the Scalar Registry is a Premium feature. See what else is included in our "),
|
|
42
|
+
r("a", {
|
|
37
43
|
href: "https://guides.scalar.com/",
|
|
38
44
|
target: "_blank"
|
|
39
45
|
}, " guides", -1),
|
|
40
|
-
|
|
46
|
+
o(". ")
|
|
41
47
|
])),
|
|
42
48
|
_: 1,
|
|
43
|
-
__: [
|
|
49
|
+
__: [1]
|
|
44
50
|
})
|
|
45
51
|
], 64));
|
|
46
52
|
}
|
|
47
53
|
});
|
|
48
54
|
export {
|
|
49
|
-
|
|
55
|
+
N as default
|
|
50
56
|
};
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarIconButton as
|
|
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
3
|
import { ScalarIconCopy as m, ScalarIconInfo as f } from "@scalar/icons";
|
|
4
4
|
import { useClipboard as b } from "@scalar/use-hooks/useClipboard";
|
|
5
|
-
import
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
},
|
|
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
10
|
__name: "ApiReferenceToolbarTitle",
|
|
11
|
-
setup(
|
|
12
|
-
const { copyToClipboard:
|
|
13
|
-
return (C, o) => (d(), p(
|
|
11
|
+
setup(T) {
|
|
12
|
+
const { copyToClipboard: s } = b();
|
|
13
|
+
return (C, o) => (d(), p(x, {
|
|
14
14
|
class: "w-120",
|
|
15
15
|
placement: "bottom-start"
|
|
16
16
|
}, {
|
|
17
|
-
button:
|
|
18
|
-
|
|
19
|
-
o[1] || (o[1] =
|
|
20
|
-
|
|
17
|
+
button: l(() => [
|
|
18
|
+
e("button", y, [
|
|
19
|
+
o[1] || (o[1] = t(" Developer Tools ")),
|
|
20
|
+
r(n(f))
|
|
21
21
|
])
|
|
22
22
|
]),
|
|
23
|
-
info:
|
|
24
|
-
|
|
23
|
+
info: l(() => o[5] || (o[5] = [
|
|
24
|
+
t(" The developer tools will only appear when running on localhost. ")
|
|
25
25
|
])),
|
|
26
|
-
default:
|
|
27
|
-
|
|
28
|
-
o[4] || (o[4] =
|
|
29
|
-
|
|
30
|
-
o[2] || (o[2] =
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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",
|
|
34
35
|
icon: n(m),
|
|
35
36
|
label: "Copy link to clipboard",
|
|
36
|
-
class: "-m-1 p-1.25",
|
|
37
37
|
size: "sm",
|
|
38
|
-
onClick: o[0] || (o[0] = (w) => n(
|
|
38
|
+
onClick: o[0] || (o[0] = (w) => n(s)(i))
|
|
39
39
|
}, null, 8, ["icon"])
|
|
40
40
|
]),
|
|
41
|
-
o[3] || (o[3] =
|
|
41
|
+
o[3] || (o[3] = t(" in your configuration. "))
|
|
42
42
|
])
|
|
43
43
|
])
|
|
44
44
|
]),
|
|
@@ -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"}
|