@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,46 +1,46 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import G from "
|
|
7
|
-
import H from "
|
|
8
|
-
import J from "./
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
const
|
|
1
|
+
import { defineComponent as w, useId as O, computed as u, ref as y, toValue as b, createBlock as n, createCommentVNode as c, openBlock as o, unref as l, withCtx as r, createVNode as m, createElementBlock as x, Fragment as T, renderList as _, createTextVNode as C, toDisplayString as B, withDirectives as M, createElementVNode as h, vModelCheckbox as N } from "vue";
|
|
2
|
+
import { ExamplePicker as D } from "@scalar/api-client/v2/blocks/operation-code-sample";
|
|
3
|
+
import { ScalarCard as F, ScalarIcon as I, ScalarCardSection as K, ScalarCodeBlock as z, ScalarCardFooter as A, ScalarMarkdown as L } from "@scalar/components";
|
|
4
|
+
import { normalizeMimeTypeObject as U, getObjectKeys as P } from "@scalar/oas-utils/helpers";
|
|
5
|
+
import { useClipboard as q } from "@scalar/use-hooks/useClipboard";
|
|
6
|
+
import { getResolvedRef as G } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
7
|
+
import H from "../../components/ScreenReader.vue.js";
|
|
8
|
+
import J from "./ExampleResponse.vue.js";
|
|
9
|
+
import Q from "./ExampleResponseTab.vue.js";
|
|
10
|
+
import W from "./ExampleResponseTabList.vue.js";
|
|
11
|
+
import { getResolvedRefDeep as X } from "./helpers/get-resolved-ref-deep.js";
|
|
12
|
+
const Y = {
|
|
13
13
|
key: 1,
|
|
14
14
|
class: "scalar-card-checkbox"
|
|
15
|
-
},
|
|
15
|
+
}, Z = ["aria-controls"], $ = {
|
|
16
16
|
key: 0,
|
|
17
17
|
class: "response-description"
|
|
18
|
-
}, me = /* @__PURE__ */
|
|
18
|
+
}, me = /* @__PURE__ */ w({
|
|
19
19
|
__name: "ExampleResponses",
|
|
20
20
|
props: {
|
|
21
21
|
responses: {}
|
|
22
22
|
},
|
|
23
|
-
setup(
|
|
24
|
-
const i =
|
|
25
|
-
() => Object.keys(
|
|
26
|
-
),
|
|
27
|
-
const e = b(v)[b(
|
|
28
|
-
return
|
|
29
|
-
}),
|
|
30
|
-
const e =
|
|
23
|
+
setup(E) {
|
|
24
|
+
const i = O(), { copyToClipboard: R } = q(), v = u(
|
|
25
|
+
() => Object.keys(E.responses ?? {}).sort()
|
|
26
|
+
), S = y(0), d = u(() => {
|
|
27
|
+
const e = b(v)[b(S)];
|
|
28
|
+
return G(E.responses?.[e]);
|
|
29
|
+
}), t = u(() => {
|
|
30
|
+
const e = U(
|
|
31
31
|
d.value?.content
|
|
32
|
-
), a =
|
|
32
|
+
), a = P(e ?? {});
|
|
33
33
|
return (
|
|
34
34
|
// OpenAPI 3.x
|
|
35
35
|
e?.["application/json"] ?? e?.["application/xml"] ?? e?.["text/plain"] ?? e?.["text/html"] ?? e?.["*/*"] ?? // Take the first key - in the future we may want to use the selected content type
|
|
36
36
|
e?.[a[0]] ?? void 0
|
|
37
37
|
);
|
|
38
38
|
}), f = u(
|
|
39
|
-
() => !!
|
|
39
|
+
() => !!t.value?.examples && Object.keys(t.value?.examples ?? {}).length > 1
|
|
40
40
|
), p = y(
|
|
41
|
-
Object.keys(
|
|
41
|
+
Object.keys(t.value?.examples ?? {})[0] ?? ""
|
|
42
42
|
), g = () => {
|
|
43
|
-
const e = b(
|
|
43
|
+
const e = b(t);
|
|
44
44
|
if (!e)
|
|
45
45
|
return;
|
|
46
46
|
if (Array.isArray(e.examples))
|
|
@@ -48,50 +48,50 @@ const X = {
|
|
|
48
48
|
const a = Object.keys(e.examples ?? {})[0];
|
|
49
49
|
return e.examples?.[a];
|
|
50
50
|
}, V = u(
|
|
51
|
-
() => f.value && p.value ?
|
|
51
|
+
() => f.value && p.value ? t.value?.examples?.[p.value] : g()
|
|
52
52
|
), j = (e) => {
|
|
53
|
-
|
|
53
|
+
S.value = e, p.value = "";
|
|
54
54
|
}, k = y(!1);
|
|
55
|
-
return (e, a) => v.value.length ? (o(), n(
|
|
55
|
+
return (e, a) => v.value.length ? (o(), n(l(F), {
|
|
56
56
|
key: 0,
|
|
57
57
|
"aria-label": "Example Responses",
|
|
58
58
|
class: "response-card",
|
|
59
59
|
role: "region"
|
|
60
60
|
}, {
|
|
61
61
|
default: r(() => [
|
|
62
|
-
m(
|
|
62
|
+
m(W, { onChange: j }, {
|
|
63
63
|
actions: r(() => [
|
|
64
|
-
|
|
64
|
+
t.value?.example ? (o(), x("button", {
|
|
65
65
|
key: 0,
|
|
66
66
|
class: "code-copy",
|
|
67
67
|
type: "button",
|
|
68
|
-
onClick: a[0] || (a[0] = () =>
|
|
68
|
+
onClick: a[0] || (a[0] = () => l(R)(t.value?.example))
|
|
69
69
|
}, [
|
|
70
|
-
m(
|
|
70
|
+
m(l(I), {
|
|
71
71
|
icon: "Clipboard",
|
|
72
72
|
width: "12px"
|
|
73
73
|
})
|
|
74
74
|
])) : c("", !0),
|
|
75
|
-
|
|
75
|
+
t.value?.schema ? (o(), x("label", Y, [
|
|
76
76
|
a[4] || (a[4] = C(" Show Schema ")),
|
|
77
|
-
M(
|
|
77
|
+
M(h("input", {
|
|
78
78
|
"onUpdate:modelValue": a[1] || (a[1] = (s) => k.value = s),
|
|
79
|
-
"aria-controls":
|
|
79
|
+
"aria-controls": l(i),
|
|
80
80
|
class: "scalar-card-checkbox-input",
|
|
81
81
|
type: "checkbox"
|
|
82
|
-
}, null, 8,
|
|
82
|
+
}, null, 8, Z), [
|
|
83
83
|
[N, k.value]
|
|
84
84
|
]),
|
|
85
|
-
a[5] || (a[5] =
|
|
85
|
+
a[5] || (a[5] = h("span", { class: "scalar-card-checkbox-checkmark" }, null, -1))
|
|
86
86
|
])) : c("", !0)
|
|
87
87
|
]),
|
|
88
88
|
default: r(() => [
|
|
89
|
-
(o(!0), x(
|
|
89
|
+
(o(!0), x(T, null, _(v.value, (s) => (o(), n(Q, {
|
|
90
90
|
key: s,
|
|
91
|
-
"aria-controls":
|
|
91
|
+
"aria-controls": l(i)
|
|
92
92
|
}, {
|
|
93
93
|
default: r(() => [
|
|
94
|
-
m(
|
|
94
|
+
m(H, null, {
|
|
95
95
|
default: r(() => a[3] || (a[3] = [
|
|
96
96
|
C("Status:")
|
|
97
97
|
])),
|
|
@@ -105,40 +105,40 @@ const X = {
|
|
|
105
105
|
]),
|
|
106
106
|
_: 1
|
|
107
107
|
}),
|
|
108
|
-
m(
|
|
108
|
+
m(l(K), { class: "grid flex-1" }, {
|
|
109
109
|
default: r(() => [
|
|
110
|
-
k.value &&
|
|
110
|
+
k.value && t.value?.schema ? (o(), n(l(z), {
|
|
111
111
|
key: 0,
|
|
112
|
-
id:
|
|
112
|
+
id: l(i),
|
|
113
113
|
class: "-outline-offset-2",
|
|
114
|
-
content:
|
|
114
|
+
content: l(X)(t.value?.schema),
|
|
115
115
|
lang: "json"
|
|
116
|
-
}, null, 8, ["id", "content"])) : (o(), n(
|
|
116
|
+
}, null, 8, ["id", "content"])) : (o(), n(J, {
|
|
117
117
|
key: 1,
|
|
118
|
-
id:
|
|
118
|
+
id: l(i),
|
|
119
119
|
example: V.value,
|
|
120
|
-
response:
|
|
120
|
+
response: t.value
|
|
121
121
|
}, null, 8, ["id", "example", "response"]))
|
|
122
122
|
]),
|
|
123
123
|
_: 1
|
|
124
124
|
}),
|
|
125
|
-
d.value?.description || f.value ? (o(), n(
|
|
125
|
+
d.value?.description || f.value ? (o(), n(l(A), {
|
|
126
126
|
key: 0,
|
|
127
127
|
class: "response-card-footer"
|
|
128
128
|
}, {
|
|
129
129
|
default: r(() => [
|
|
130
|
-
d.value?.description ? (o(), x("div",
|
|
131
|
-
m(
|
|
130
|
+
d.value?.description ? (o(), x("div", $, [
|
|
131
|
+
m(l(L), {
|
|
132
132
|
class: "markdown",
|
|
133
133
|
value: d.value.description
|
|
134
134
|
}, null, 8, ["value"])
|
|
135
135
|
])) : c("", !0),
|
|
136
|
-
f.value ? (o(), n(
|
|
136
|
+
f.value ? (o(), n(l(D), {
|
|
137
137
|
key: 1,
|
|
138
138
|
modelValue: p.value,
|
|
139
139
|
"onUpdate:modelValue": a[2] || (a[2] = (s) => p.value = s),
|
|
140
140
|
class: "response-example-selector",
|
|
141
|
-
examples:
|
|
141
|
+
examples: t.value?.examples
|
|
142
142
|
}, null, 8, ["modelValue", "examples"])) : c("", !0)
|
|
143
143
|
]),
|
|
144
144
|
_: 1
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { SourceConfiguration } from '@scalar/types/api-reference';
|
|
2
2
|
type __VLS_Props = {
|
|
3
|
-
options?:
|
|
3
|
+
options?: SourceConfiguration[];
|
|
4
4
|
modelValue?: number;
|
|
5
5
|
};
|
|
6
6
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocumentSelector.vue.d.ts","sourceRoot":"","sources":["../../../src/features/multiple-documents/DocumentSelector.vue"],"names":[],"mappings":"AAwDA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"DocumentSelector.vue.d.ts","sourceRoot":"","sources":["../../../src/features/multiple-documents/DocumentSelector.vue"],"names":[],"mappings":"AAwDA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AAGtE,KAAK,WAAW,GAAG;IACjB,OAAO,CAAC,EAAE,mBAAmB,EAAE,CAAA;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,CAAC;;;;;;AAsHF,wBAOG"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type AnyApiReferenceConfiguration, type ApiReferenceConfiguration, type
|
|
2
|
-
import { type Ref } from 'vue';
|
|
3
|
-
import type {
|
|
1
|
+
import { type AnyApiReferenceConfiguration, type ApiReferenceConfiguration, type SourceConfiguration, apiReferenceConfigurationWithSourceSchema } from '@scalar/types/api-reference';
|
|
2
|
+
import { type ComputedRef, type Ref } from 'vue';
|
|
3
|
+
import type { z } from 'zod';
|
|
4
4
|
type UseMultipleDocumentsProps = {
|
|
5
5
|
/**
|
|
6
6
|
* Configuration for the API reference.
|
|
@@ -11,19 +11,22 @@ type UseMultipleDocumentsProps = {
|
|
|
11
11
|
configurationOverrides?: Ref<Partial<ApiReferenceConfiguration> | undefined>;
|
|
12
12
|
/** The initial index to pre-select a document, if there is no query parameter available */
|
|
13
13
|
initialIndex?: number;
|
|
14
|
-
|
|
14
|
+
isIntersectionEnabled: Ref<boolean>;
|
|
15
|
+
hash: Ref<string>;
|
|
16
|
+
hashPrefix: Ref<string>;
|
|
17
|
+
};
|
|
15
18
|
/**
|
|
16
19
|
* Take any configuration and return a flat array of configurations.
|
|
17
20
|
*/
|
|
18
|
-
export declare const normalizeConfigurations: (configuration: AnyApiReferenceConfiguration | undefined) =>
|
|
21
|
+
export declare const normalizeConfigurations: (configuration: AnyApiReferenceConfiguration | undefined) => SourceConfiguration[];
|
|
19
22
|
/**
|
|
20
23
|
* DEPRECATED: This is a temporary state solution while we migrate to the new workspace store
|
|
21
24
|
*
|
|
22
25
|
* @deprecated
|
|
23
26
|
*/
|
|
24
27
|
export declare const useMultipleDocuments: ({ configuration, configurationOverrides, initialIndex, isIntersectionEnabled, hash, hashPrefix, }: UseMultipleDocumentsProps) => {
|
|
25
|
-
selectedConfiguration:
|
|
26
|
-
availableDocuments: Ref<
|
|
28
|
+
selectedConfiguration: ComputedRef<z.infer<typeof apiReferenceConfigurationWithSourceSchema>>;
|
|
29
|
+
availableDocuments: Ref<SourceConfiguration[]>;
|
|
27
30
|
selectedDocumentIndex: Ref<number>;
|
|
28
31
|
isIntersectionEnabled: Ref<boolean>;
|
|
29
32
|
hash: Ref<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMultipleDocuments.d.ts","sourceRoot":"","sources":["../../../src/features/multiple-documents/useMultipleDocuments.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,4BAA4B,EACjC,KAAK,yBAAyB,EAC9B,KAAK,
|
|
1
|
+
{"version":3,"file":"useMultipleDocuments.d.ts","sourceRoot":"","sources":["../../../src/features/multiple-documents/useMultipleDocuments.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,4BAA4B,EACjC,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACxB,yCAAyC,EAE1C,MAAM,6BAA6B,CAAA;AAEpC,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,GAAG,EAAwB,MAAM,KAAK,CAAA;AACtE,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAK5B,KAAK,yBAAyB,GAAG;IAC/B;;;OAGG;IACH,aAAa,EAAE,GAAG,CAAC,4BAA4B,GAAG,SAAS,CAAC,CAAA;IAC5D,+EAA+E;IAC/E,sBAAsB,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC,yBAAyB,CAAC,GAAG,SAAS,CAAC,CAAA;IAC5E,2FAA2F;IAC3F,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,qBAAqB,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IACnC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACjB,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CACxB,CAAA;AAID;;GAEG;AACH,eAAO,MAAM,uBAAuB,GAClC,eAAe,4BAA4B,GAAG,SAAS,KACtD,mBAAmB,EA6BrB,CAAA;AA0CD;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,GAAI,mGAOlC,yBAAyB,KAAG;IAC7B,qBAAqB,EAAE,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,yCAAyC,CAAC,CAAC,CAAA;IAC7F,kBAAkB,EAAE,GAAG,CAAC,mBAAmB,EAAE,CAAC,CAAA;IAC9C,qBAAqB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAClC,qBAAqB,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IACnC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACjB,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAwIxB,CAAA"}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { isDefined as
|
|
2
|
-
import { isConfigurationWithSources as
|
|
3
|
-
import
|
|
4
|
-
import { computed as
|
|
5
|
-
const
|
|
6
|
-
if (
|
|
7
|
-
const { sources:
|
|
8
|
-
return
|
|
1
|
+
import { isDefined as y } from "@scalar/oas-utils/helpers";
|
|
2
|
+
import { isConfigurationWithSources as h, apiReferenceConfigurationWithSourceSchema as v } from "@scalar/types/api-reference";
|
|
3
|
+
import R from "github-slugger";
|
|
4
|
+
import { computed as m, ref as D, watch as b } from "vue";
|
|
5
|
+
const g = "api", w = new R(), A = (t) => t ? (Array.isArray(t) ? t : [t]).flatMap((u) => {
|
|
6
|
+
if (h(u)) {
|
|
7
|
+
const { sources: o, ...f } = u;
|
|
8
|
+
return o?.map((n) => ({ ...f, ...n })) ?? [];
|
|
9
9
|
}
|
|
10
|
-
return [
|
|
11
|
-
}).map((
|
|
10
|
+
return [u];
|
|
11
|
+
}).map((u, o) => u && C(u, o)).filter(y) : [], C = (t, i = 0) => {
|
|
12
12
|
const e = {
|
|
13
13
|
...t,
|
|
14
|
-
//
|
|
14
|
+
// this is before parsing so we transform the old style
|
|
15
15
|
...t.spec ?? {}
|
|
16
16
|
};
|
|
17
17
|
if (!(!e?.url && !e?.content))
|
|
18
|
-
return
|
|
18
|
+
return w.reset(), e.title ? {
|
|
19
19
|
...e,
|
|
20
|
-
slug: e.slug ||
|
|
20
|
+
slug: e.slug || w.slug(e.title),
|
|
21
21
|
title: e.title
|
|
22
22
|
} : e.slug ? {
|
|
23
23
|
...e,
|
|
@@ -27,62 +27,65 @@ const m = "api", g = new y(), A = (t) => t ? (Array.isArray(t) ? t : [t]).flatMa
|
|
|
27
27
|
slug: `api-${i + 1}`,
|
|
28
28
|
title: `API #${i + 1}`
|
|
29
29
|
};
|
|
30
|
-
},
|
|
30
|
+
}, U = ({
|
|
31
31
|
configuration: t,
|
|
32
32
|
configurationOverrides: i,
|
|
33
33
|
initialIndex: e,
|
|
34
|
-
isIntersectionEnabled:
|
|
35
|
-
hash:
|
|
34
|
+
isIntersectionEnabled: u,
|
|
35
|
+
hash: o,
|
|
36
36
|
hashPrefix: f
|
|
37
37
|
}) => {
|
|
38
|
-
const n =
|
|
38
|
+
const n = m(() => A(t.value)), s = D((() => {
|
|
39
39
|
if (typeof window > "u")
|
|
40
40
|
return typeof e == "number" ? e : 0;
|
|
41
|
-
const
|
|
42
|
-
if (
|
|
43
|
-
const l = n.value.findIndex((
|
|
41
|
+
const r = new URL(window.location.href).searchParams.get(g);
|
|
42
|
+
if (r) {
|
|
43
|
+
const l = n.value.findIndex((S) => S.slug === r);
|
|
44
44
|
if (l !== -1)
|
|
45
45
|
return l;
|
|
46
|
-
const
|
|
47
|
-
if (!isNaN(
|
|
48
|
-
return
|
|
46
|
+
const d = Number.parseInt(r, 10);
|
|
47
|
+
if (!isNaN(d) && d >= 0 && d < n.value.length)
|
|
48
|
+
return d;
|
|
49
49
|
}
|
|
50
|
-
const
|
|
51
|
-
return
|
|
52
|
-
})()), c =
|
|
50
|
+
const p = n.value.findIndex((l) => "default" in l && l.default === !0);
|
|
51
|
+
return p !== -1 ? p : typeof e == "number" ? e : 0;
|
|
52
|
+
})()), c = m(() => {
|
|
53
53
|
const a = i?.value ?? {};
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
if (t.value && h(t.value))
|
|
55
|
+
return v.parse({
|
|
56
|
+
...t.value,
|
|
57
|
+
...t.value?.sources?.[s.value],
|
|
58
|
+
...n.value[s.value],
|
|
59
|
+
...a
|
|
60
|
+
});
|
|
61
|
+
const r = [t.value].flat()[s.value] ?? {};
|
|
62
|
+
return v.parse({
|
|
63
|
+
...r,
|
|
64
|
+
...n.value[s.value],
|
|
58
65
|
...a
|
|
59
|
-
}
|
|
60
|
-
...[t.value].flat()[o.value] ?? {},
|
|
61
|
-
...n.value[o.value],
|
|
62
|
-
...a
|
|
63
|
-
};
|
|
66
|
+
});
|
|
64
67
|
});
|
|
65
68
|
return b(
|
|
66
|
-
|
|
69
|
+
s,
|
|
67
70
|
(a) => {
|
|
68
71
|
if (typeof window > "u" || n.value.length === 1)
|
|
69
72
|
return;
|
|
70
|
-
const
|
|
71
|
-
c.value.pathRouting && (
|
|
72
|
-
const l =
|
|
73
|
-
|
|
73
|
+
const r = new URL(window.location.href), p = n.value[a];
|
|
74
|
+
c.value.pathRouting && (r.pathname = c.value.pathRouting?.basePath ?? "");
|
|
75
|
+
const l = p?.slug ?? a.toString();
|
|
76
|
+
r.searchParams.set(g, l), r.hash = "", window.history.replaceState({}, "", r.toString()), o.value = "", f.value = "", u.value = !1, typeof window < "u" && window.scrollTo({ top: 0, behavior: "instant" }), typeof c.value.onDocumentSelect == "function" && c.value.onDocumentSelect?.();
|
|
74
77
|
},
|
|
75
78
|
{ flush: "sync" }
|
|
76
79
|
), {
|
|
77
80
|
selectedConfiguration: c,
|
|
78
81
|
availableDocuments: n,
|
|
79
|
-
selectedDocumentIndex:
|
|
80
|
-
isIntersectionEnabled:
|
|
81
|
-
hash:
|
|
82
|
+
selectedDocumentIndex: s,
|
|
83
|
+
isIntersectionEnabled: u,
|
|
84
|
+
hash: o,
|
|
82
85
|
hashPrefix: f
|
|
83
86
|
};
|
|
84
87
|
};
|
|
85
88
|
export {
|
|
86
89
|
A as normalizeConfigurations,
|
|
87
|
-
|
|
90
|
+
U as useMultipleDocuments
|
|
88
91
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TestRequestButton.vue.d.ts","sourceRoot":"","sources":["../../../src/features/test-request-button/TestRequestButton.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TestRequestButton.vue.d.ts","sourceRoot":"","sources":["../../../src/features/test-request-button/TestRequestButton.vue"],"names":[],"mappings":"AAyEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAMnE,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,UAAU,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;CACb,CAAC;;AAgFF,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./TestRequestButton.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-53a06e4f"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default
|
|
7
7
|
};
|
|
@@ -1,46 +1,40 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarIconPlay as
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
const R = ["method"], S = /* @__PURE__ */ c({
|
|
1
|
+
import { defineComponent as r, createElementBlock as s, openBlock as m, withModifiers as p, createVNode as n, createElementVNode as d, unref as c, withCtx as h, createTextVNode as u, toDisplayString as l } from "vue";
|
|
2
|
+
import { ScalarIconPlay as f } from "@scalar/icons";
|
|
3
|
+
import C from "../../components/ScreenReader.vue.js";
|
|
4
|
+
import { useApiClient as k } from "../api-client-modal/useApiClient.js";
|
|
5
|
+
const w = ["method"], R = /* @__PURE__ */ r({
|
|
7
6
|
__name: "TestRequestButton",
|
|
8
7
|
props: {
|
|
9
8
|
method: {},
|
|
10
9
|
path: {}
|
|
11
10
|
},
|
|
12
11
|
setup(t) {
|
|
13
|
-
const { client: a } =
|
|
14
|
-
() => m.value.hideTestRequestButton !== !0
|
|
15
|
-
), p = () => {
|
|
12
|
+
const { client: a } = k(), i = () => {
|
|
16
13
|
a.value?.open({
|
|
17
14
|
method: t.method,
|
|
18
15
|
path: t.path
|
|
19
16
|
});
|
|
20
17
|
};
|
|
21
|
-
return (e, o) =>
|
|
22
|
-
key: 0,
|
|
18
|
+
return (e, o) => (m(), s("button", {
|
|
23
19
|
class: "show-api-client-button",
|
|
24
20
|
method: e.method,
|
|
25
21
|
type: "button",
|
|
26
|
-
onClick:
|
|
22
|
+
onClick: p(i, ["stop"])
|
|
27
23
|
}, [
|
|
28
|
-
|
|
24
|
+
n(c(f), {
|
|
29
25
|
class: "size-3",
|
|
30
26
|
weight: "fill"
|
|
31
27
|
}),
|
|
32
|
-
o[0] || (o[0] =
|
|
33
|
-
|
|
34
|
-
default:
|
|
35
|
-
|
|
28
|
+
o[0] || (o[0] = d("span", null, "Test Request", -1)),
|
|
29
|
+
n(C, null, {
|
|
30
|
+
default: h(() => [
|
|
31
|
+
u("(" + l(e.method) + " " + l(e.path) + ")", 1)
|
|
36
32
|
]),
|
|
37
33
|
_: 1
|
|
38
34
|
})
|
|
39
|
-
], 8,
|
|
40
|
-
l(" ")
|
|
41
|
-
], 64));
|
|
35
|
+
], 8, w));
|
|
42
36
|
}
|
|
43
37
|
});
|
|
44
38
|
export {
|
|
45
|
-
|
|
39
|
+
R as default
|
|
46
40
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as d, mergeModels as m, useModel as u, computed as p, createElementBlock as n, createCommentVNode as
|
|
1
|
+
import { defineComponent as d, mergeModels as m, useModel as u, computed as p, createElementBlock as n, createCommentVNode as s, openBlock as a, createElementVNode as c, createVNode as o, Fragment as w } from "vue";
|
|
2
2
|
import { isLocalUrl as v } from "@scalar/helpers/url/is-local-url";
|
|
3
3
|
import k from "./ApiReferenceToolbarConfig.vue.js";
|
|
4
4
|
import b from "./ApiReferenceToolbarSdks.vue.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
const
|
|
5
|
+
import h from "./ApiReferenceToolbarShare.vue.js";
|
|
6
|
+
import _ from "./ApiReferenceToolbarTitle.vue.js";
|
|
7
|
+
const g = {
|
|
8
8
|
key: 0,
|
|
9
|
-
"aria-label": "
|
|
9
|
+
"aria-label": "Developer Tools",
|
|
10
10
|
class: "api-reference-toolbar h-header bg-b-1 sticky top-0 z-10 flex justify-center border-b px-15"
|
|
11
|
-
}, x = { class: "-mx-2 flex max-w-(--refs-content-max-width) flex-1 items-center" }, y = { class: "flex flex-1 items-center" },
|
|
11
|
+
}, x = { class: "-mx-2 flex max-w-(--refs-content-max-width) flex-1 items-center" }, y = { class: "flex flex-1 items-center" }, C = /* @__PURE__ */ d({
|
|
12
12
|
__name: "ApiReferenceToolbar",
|
|
13
13
|
props: /* @__PURE__ */ m({
|
|
14
14
|
workspace: {},
|
|
@@ -19,25 +19,25 @@ const _ = {
|
|
|
19
19
|
}),
|
|
20
20
|
emits: ["update:overrides"],
|
|
21
21
|
setup(r) {
|
|
22
|
-
const
|
|
23
|
-
return (e,
|
|
22
|
+
const t = u(r, "overrides"), l = p(() => r.configuration?.showToolbar === "always" ? !0 : r.configuration?.showToolbar === "never" || typeof window > "u" ? !1 : v(window.location.href));
|
|
23
|
+
return (e, i) => l.value ? (a(), n("header", g, [
|
|
24
24
|
c("div", x, [
|
|
25
25
|
c("div", y, [
|
|
26
|
-
o(
|
|
26
|
+
o(_)
|
|
27
27
|
]),
|
|
28
|
-
e.workspace ? (
|
|
29
|
-
o(
|
|
28
|
+
e.workspace ? (a(), n(w, { key: 0 }, [
|
|
29
|
+
o(h, { workspace: e.workspace }, null, 8, ["workspace"]),
|
|
30
30
|
o(b, { workspace: e.workspace }, null, 8, ["workspace"])
|
|
31
|
-
], 64)) :
|
|
31
|
+
], 64)) : s("", !0),
|
|
32
32
|
o(k, {
|
|
33
|
-
|
|
34
|
-
overrides: i.value,
|
|
35
|
-
|
|
36
|
-
}, null, 8, ["
|
|
33
|
+
overrides: t.value,
|
|
34
|
+
"onUpdate:overrides": i[0] || (i[0] = (f) => t.value = f),
|
|
35
|
+
configuration: e.configuration
|
|
36
|
+
}, null, 8, ["overrides", "configuration"])
|
|
37
37
|
])
|
|
38
|
-
])) :
|
|
38
|
+
])) : s("", !0);
|
|
39
39
|
}
|
|
40
40
|
});
|
|
41
41
|
export {
|
|
42
|
-
|
|
42
|
+
C as default
|
|
43
43
|
};
|
|
@@ -3,9 +3,9 @@ type __VLS_PublicProps = {
|
|
|
3
3
|
modelValue?: ThemeId;
|
|
4
4
|
};
|
|
5
5
|
declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
-
"update:modelValue": (value: "
|
|
6
|
+
"update:modelValue": (value: "default" | "alternate" | "moon" | "purple" | "solarized" | "bluePlanet" | "deepSpace" | "saturn" | "kepler" | "elysiajs" | "fastify" | "mars" | "laserwave" | "none" | undefined) => any;
|
|
7
7
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
8
|
-
"onUpdate:modelValue"?: ((value: "
|
|
8
|
+
"onUpdate:modelValue"?: ((value: "default" | "alternate" | "moon" | "purple" | "solarized" | "bluePlanet" | "deepSpace" | "saturn" | "kepler" | "elysiajs" | "fastify" | "mars" | "laserwave" | "none" | undefined) => any) | undefined;
|
|
9
9
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
10
|
export default _default;
|
|
11
11
|
//# sourceMappingURL=ApiReferenceToolbarConfigTheme.vue.d.ts.map
|
|
@@ -29,7 +29,7 @@ const v = { class: "text-c-2 hover:text-c-1 hover:bg-b-2 flex items-center gap-1
|
|
|
29
29
|
o(e.$slots, "info", {}, () => [
|
|
30
30
|
t[0] || (t[0] = i(' "')),
|
|
31
31
|
o(e.$slots, "label"),
|
|
32
|
-
t[1] || (t[1] = i('" will only appear when running on localhost '))
|
|
32
|
+
t[1] || (t[1] = i('" will only appear when running on localhost. '))
|
|
33
33
|
])
|
|
34
34
|
])
|
|
35
35
|
])
|
|
@@ -16,7 +16,7 @@ const B = { class: "inline-flex items-center gap-2" }, I = /* @__PURE__ */ f({
|
|
|
16
16
|
icon: "programming-language-typescript"
|
|
17
17
|
},
|
|
18
18
|
{ key: "python", label: "Python", icon: "programming-language-python" },
|
|
19
|
-
{ key: "csharp", label: "C", icon: "programming-language-csharp" },
|
|
19
|
+
{ key: "csharp", label: "C#", icon: "programming-language-csharp" },
|
|
20
20
|
{ key: "java", label: "Java", icon: "programming-language-java" },
|
|
21
21
|
{ key: "ruby", label: "Ruby", icon: "programming-language-ruby" },
|
|
22
22
|
{ key: "php", label: "PHP", icon: "programming-language-php" },
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarFormSection as
|
|
1
|
+
import { defineComponent as n, createBlock as s, openBlock as m, withCtx as r, createVNode as o, unref as p, createTextVNode as a } from "vue";
|
|
2
|
+
import { ScalarFormSection as t } from "@scalar/components";
|
|
3
3
|
import f from "./ApiReferenceToolbarPopover.vue.js";
|
|
4
4
|
import i from "./ApiReferenceToolbarShareRegister.vue.js";
|
|
5
5
|
import u from "./ApiReferenceToolbarShareTemporary.vue.js";
|
|
6
|
-
const S = /* @__PURE__ */
|
|
6
|
+
const S = /* @__PURE__ */ n({
|
|
7
7
|
__name: "ApiReferenceToolbarShare",
|
|
8
8
|
props: {
|
|
9
9
|
workspace: {}
|
|
10
10
|
},
|
|
11
|
-
setup(
|
|
12
|
-
return (l, e) => (
|
|
11
|
+
setup(c) {
|
|
12
|
+
return (l, e) => (m(), s(f, { class: "w-120" }, {
|
|
13
13
|
label: r(() => e[0] || (e[0] = [
|
|
14
14
|
a("Share")
|
|
15
15
|
])),
|
|
16
16
|
default: r(() => [
|
|
17
|
-
o(
|
|
17
|
+
o(p(t), null, {
|
|
18
18
|
label: r(() => e[1] || (e[1] = [
|
|
19
19
|
a("Temporary Link")
|
|
20
20
|
])),
|
|
@@ -23,9 +23,9 @@ const S = /* @__PURE__ */ t({
|
|
|
23
23
|
]),
|
|
24
24
|
_: 1
|
|
25
25
|
}),
|
|
26
|
-
o(
|
|
26
|
+
o(p(t), null, {
|
|
27
27
|
label: r(() => e[2] || (e[2] = [
|
|
28
|
-
a("
|
|
28
|
+
a("Cloud Hosting")
|
|
29
29
|
])),
|
|
30
30
|
default: r(() => [
|
|
31
31
|
o(i, { workspace: l.workspace }, null, 8, ["workspace"])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiReferenceToolbarShareRegister.vue.d.ts","sourceRoot":"","sources":["../../../src/features/toolbar/ApiReferenceToolbarShareRegister.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ApiReferenceToolbarShareRegister.vue.d.ts","sourceRoot":"","sources":["../../../src/features/toolbar/ApiReferenceToolbarShareRegister.vue"],"names":[],"mappings":"AAoEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAKpE,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,cAAc,CAAA;CAC1B,CAAC;;AAgGF,wBAMG"}
|