@scalar/api-reference 1.36.2 → 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 +49 -0
- package/dist/browser/standalone.js +26143 -25935
- 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/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/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 +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 +8 -5
- package/dist/features/multiple-documents/useMultipleDocuments.d.ts.map +1 -1
- package/dist/features/multiple-documents/useMultipleDocuments.js +46 -43
- 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/style.css +1 -1
- 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-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 +22 -22
- package/dist/v2/helpers/map-configuration.d.ts.map +1 -1
- package/package.json +19 -16
- 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
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type ThemeId } from '@scalar/themes';
|
|
2
|
+
import type { ReferenceLayoutProps, ReferenceLayoutSlot, ReferenceSlotProps } from '../types';
|
|
3
|
+
type __VLS_Slots = {
|
|
4
|
+
[x in ReferenceLayoutSlot]: (props: ReferenceSlotProps) => any;
|
|
5
|
+
} & {
|
|
6
|
+
'document-selector': any;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_component: import("vue").DefineComponent<ReferenceLayoutProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
9
|
+
changeTheme: (args_0: {
|
|
10
|
+
id: ThemeId;
|
|
11
|
+
label: string;
|
|
12
|
+
}) => any;
|
|
13
|
+
loadSwaggerFile: () => any;
|
|
14
|
+
linkSwaggerFile: () => any;
|
|
15
|
+
updateContent: (value: string) => any;
|
|
16
|
+
toggleDarkMode: () => any;
|
|
17
|
+
}, string, import("vue").PublicProps, Readonly<ReferenceLayoutProps> & Readonly<{
|
|
18
|
+
onChangeTheme?: ((args_0: {
|
|
19
|
+
id: ThemeId;
|
|
20
|
+
label: string;
|
|
21
|
+
}) => any) | undefined;
|
|
22
|
+
onLoadSwaggerFile?: (() => any) | undefined;
|
|
23
|
+
onLinkSwaggerFile?: (() => any) | undefined;
|
|
24
|
+
onUpdateContent?: ((value: string) => any) | undefined;
|
|
25
|
+
onToggleDarkMode?: (() => any) | undefined;
|
|
26
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
28
|
+
export default _default;
|
|
29
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
30
|
+
new (): {
|
|
31
|
+
$slots: S;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=ApiReferenceContent.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApiReferenceContent.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiReferenceContent.vue"],"names":[],"mappings":"AAsgBA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAqB7C,OAAO,KAAK,EACV,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,SAAS,CAAA;AA4BhB,KAAK,WAAW,GAAG;KACd,CAAC,IAAI,mBAAmB,GAAG,CAAC,KAAK,EAAE,kBAAkB,KAAK,GAAG;CAC/D,GAAG;IAAE,mBAAmB,EAAE,GAAG,CAAA;CAAE,CAAC;AAuVnC,QAAA,MAAM,eAAe;;YArWqB,OAAO;eAAS,MAAM;;;;;;;;YAAtB,OAAO;eAAS,MAAM;;;;;;kFA4W9D,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { defineComponent as C, computed as B, provide as a, useId as O, ref as u, onBeforeMount as P, onMounted as k, onUnmounted as q, watch as c, createElementBlock as x, openBlock as F, Fragment as N, createElementVNode as Y, createVNode as d, unref as r } from "vue";
|
|
2
|
+
import { provideUseId as U } from "@headlessui/vue";
|
|
3
|
+
import { LAYOUT_SYMBOL as V } from "@scalar/api-client/hooks";
|
|
4
|
+
import { WORKSPACE_SYMBOL as $, ACTIVE_ENTITIES_SYMBOL as z } from "@scalar/api-client/store";
|
|
5
|
+
import { addScalarClassesToHeadless as G } from "@scalar/components";
|
|
6
|
+
import { sleep as H } from "@scalar/helpers/testing/sleep";
|
|
7
|
+
import { useBreakpoints as K } from "@scalar/use-hooks/useBreakpoints";
|
|
8
|
+
import { ScalarToasts as Q } from "@scalar/use-toasts";
|
|
9
|
+
import { useDebounceFn as W, useResizeObserver as j } from "@vueuse/core";
|
|
10
|
+
import { hasLazyLoaded as J } from "./Lazy/lazyBus.js";
|
|
11
|
+
import { useNavState as X } from "../hooks/useNavState.js";
|
|
12
|
+
import { useLegacyStoreEvents as Z } from "../v2/hooks/use-legacy-store-events.js";
|
|
13
|
+
import { useDocumentSource as _ } from "../features/document-source/hooks/useDocumentSource.js";
|
|
14
|
+
import { PLUGIN_MANAGER_SYMBOL as ee } from "../plugins/hooks/usePluginManager.js";
|
|
15
|
+
import { createPluginManager as oe } from "../plugins/plugin-manager.js";
|
|
16
|
+
import { useSidebar as te } from "../v2/blocks/scalar-sidebar-block/hooks/useSidebar.js";
|
|
17
|
+
import ne from "./Content/Content.vue.js";
|
|
18
|
+
/* empty css */
|
|
19
|
+
import ie from "../features/api-client-modal/ApiClientModal.vue.js";
|
|
20
|
+
const re = ["aria-label"], Te = /* @__PURE__ */ C({
|
|
21
|
+
inheritAttrs: !1,
|
|
22
|
+
__name: "ApiReferenceContent",
|
|
23
|
+
props: {
|
|
24
|
+
configuration: {},
|
|
25
|
+
dereferencedDocument: {},
|
|
26
|
+
originalDocument: {},
|
|
27
|
+
isDark: { type: Boolean },
|
|
28
|
+
rawSpec: {},
|
|
29
|
+
store: {}
|
|
30
|
+
},
|
|
31
|
+
emits: ["changeTheme", "updateContent", "loadSwaggerFile", "linkSwaggerFile", "toggleDarkMode"],
|
|
32
|
+
setup(t) {
|
|
33
|
+
const o = B(() => ({
|
|
34
|
+
...t.configuration,
|
|
35
|
+
hideClientButton: t.configuration.hideClientButton ?? !1,
|
|
36
|
+
showSidebar: t.configuration.showSidebar ?? !0,
|
|
37
|
+
theme: t.configuration.theme ?? "none",
|
|
38
|
+
layout: t.configuration.layout ?? "modern",
|
|
39
|
+
persistAuth: t.configuration.persistAuth ?? !1,
|
|
40
|
+
documentDownloadType: t.configuration.documentDownloadType ?? "both",
|
|
41
|
+
onBeforeRequest: t.configuration.onBeforeRequest
|
|
42
|
+
})), { dereferencedDocument: m, workspaceStore: f, activeEntitiesStore: p } = _({
|
|
43
|
+
configuration: o,
|
|
44
|
+
dereferencedDocument: t.dereferencedDocument,
|
|
45
|
+
originalDocument: t.originalDocument
|
|
46
|
+
});
|
|
47
|
+
a($, f), a(z, p), U(() => O()), a(V, "modal"), a(
|
|
48
|
+
ee,
|
|
49
|
+
oe({
|
|
50
|
+
plugins: o.value.plugins
|
|
51
|
+
})
|
|
52
|
+
);
|
|
53
|
+
const { isSidebarOpen: h, setCollapsedSidebarItem: v, scrollToOperation: D, items: l } = te(t.store), I = B(() => l.value.entries[0]?.id ?? ""), {
|
|
54
|
+
getReferenceId: T,
|
|
55
|
+
getPathRoutingId: A,
|
|
56
|
+
hash: s,
|
|
57
|
+
isIntersectionEnabled: g,
|
|
58
|
+
updateHash: w,
|
|
59
|
+
replaceUrlState: L
|
|
60
|
+
} = X(), M = u(0);
|
|
61
|
+
if (o.value.redirect && typeof window < "u") {
|
|
62
|
+
const e = o.value.redirect(
|
|
63
|
+
(o.value.pathRouting ? window.location.pathname : "") + window.location.hash
|
|
64
|
+
);
|
|
65
|
+
e && history.replaceState({}, "", e);
|
|
66
|
+
}
|
|
67
|
+
P(() => {
|
|
68
|
+
w(), G();
|
|
69
|
+
});
|
|
70
|
+
const S = async (e) => {
|
|
71
|
+
g.value = !1, w(), e ? D(e) : i.value?.scrollTo(0, 0), await H(100), g.value = !0;
|
|
72
|
+
};
|
|
73
|
+
k(() => {
|
|
74
|
+
history.scrollRestoration = "manual";
|
|
75
|
+
const e = i.value?.parentElement?.getBoundingClientRect(), n = i.value?.getBoundingClientRect();
|
|
76
|
+
if (e && n) {
|
|
77
|
+
const R = n.top - e.top;
|
|
78
|
+
M.value = R < 2 ? 0 : R;
|
|
79
|
+
}
|
|
80
|
+
window.onhashchange = () => {
|
|
81
|
+
S(T());
|
|
82
|
+
}, window.onpopstate = () => o.value.pathRouting && S(A(window.location.pathname)), window.addEventListener("scroll", y, { passive: !0 });
|
|
83
|
+
});
|
|
84
|
+
const y = W(() => {
|
|
85
|
+
window.scrollY < 50 && J.value && L("");
|
|
86
|
+
});
|
|
87
|
+
q(() => {
|
|
88
|
+
window.removeEventListener("scroll", y);
|
|
89
|
+
}), c(
|
|
90
|
+
() => t.store.workspace.activeDocument,
|
|
91
|
+
() => {
|
|
92
|
+
if (s.value) {
|
|
93
|
+
const e = l.value.entities.get(s.value), n = e?.parent?.id ?? e?.id;
|
|
94
|
+
n && v(n, !0);
|
|
95
|
+
} else {
|
|
96
|
+
const e = l.value.entries.find((n) => n.type === "tag");
|
|
97
|
+
e && v(e.id, !0);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
);
|
|
101
|
+
const b = u("100dvh"), i = u(null);
|
|
102
|
+
j(i, (e) => {
|
|
103
|
+
b.value = e[0] ? e[0].contentRect.height + "px" : "100dvh";
|
|
104
|
+
});
|
|
105
|
+
const { mediaQueries: E } = K();
|
|
106
|
+
return c(E.lg, (e, n) => {
|
|
107
|
+
n && !e && (h.value = !1);
|
|
108
|
+
}), c(s, (e, n) => {
|
|
109
|
+
e && e !== n && (h.value = !1);
|
|
110
|
+
}), Z(t.store, f, p, i), (e, n) => (F(), x(N, null, [
|
|
111
|
+
Y("main", {
|
|
112
|
+
"aria-label": `Open API Documentation for ${r(m)?.info?.title}`,
|
|
113
|
+
class: "references-rendered"
|
|
114
|
+
}, [
|
|
115
|
+
d(r(ne), {
|
|
116
|
+
contentId: I.value,
|
|
117
|
+
options: {
|
|
118
|
+
isLoading: o.value.isLoading,
|
|
119
|
+
slug: o.value.slug,
|
|
120
|
+
hiddenClients: o.value.hiddenClients,
|
|
121
|
+
layout: o.value.layout,
|
|
122
|
+
onLoaded: o.value.onLoaded,
|
|
123
|
+
persistAuth: o.value.persistAuth,
|
|
124
|
+
showOperationId: o.value.showOperationId,
|
|
125
|
+
hideTestRequestButton: o.value.hideTestRequestButton,
|
|
126
|
+
expandAllResponses: o.value.expandAllResponses,
|
|
127
|
+
hideModels: o.value.hideModels,
|
|
128
|
+
expandAllModelSections: o.value.expandAllModelSections,
|
|
129
|
+
orderRequiredPropertiesFirst: o.value.orderRequiredPropertiesFirst,
|
|
130
|
+
orderSchemaPropertiesBy: o.value.orderSchemaPropertiesBy,
|
|
131
|
+
documentDownloadType: o.value.documentDownloadType,
|
|
132
|
+
url: o.value.url,
|
|
133
|
+
onShowMore: o.value.onShowMore
|
|
134
|
+
},
|
|
135
|
+
store: e.store
|
|
136
|
+
}, null, 8, ["contentId", "options", "store"])
|
|
137
|
+
], 8, re),
|
|
138
|
+
d(r(ie), {
|
|
139
|
+
configuration: o.value,
|
|
140
|
+
dereferencedDocument: r(m)
|
|
141
|
+
}, null, 8, ["configuration", "dereferencedDocument"]),
|
|
142
|
+
d(r(Q))
|
|
143
|
+
], 64));
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
export {
|
|
147
|
+
Te as default
|
|
148
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiReferenceLayout.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiReferenceLayout.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ApiReferenceLayout.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiReferenceLayout.vue"],"names":[],"mappings":"AA6tBA,OAAO,EAGL,KAAK,OAAO,EACb,MAAM,gBAAgB,CAAA;AAyBvB,OAAO,KAAK,EACV,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,SAAS,CAAA;AA4BhB,KAAK,WAAW,GAAG;KACd,CAAC,IAAI,mBAAmB,GAAG,CAAC,KAAK,EAAE,kBAAkB,KAAK,GAAG;CAC/D,GAAG;IAAE,mBAAmB,EAAE,GAAG,CAAA;CAAE,CAAC;AAotBnC,QAAA,MAAM,eAAe;;YAluBqB,OAAO;eAAS,MAAM;;;;;;;;YAAtB,OAAO;eAAS,MAAM;;;;;;kFAyuB9D,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -4,7 +4,7 @@ import o from "./ApiReferenceLayout.vue2.js";
|
|
|
4
4
|
/* empty css */
|
|
5
5
|
/* empty css */
|
|
6
6
|
import t from "../_virtual/_plugin-vue_export-helper.js";
|
|
7
|
-
const
|
|
7
|
+
const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-49e17c1f"]]);
|
|
8
8
|
export {
|
|
9
|
-
|
|
9
|
+
a as default
|
|
10
10
|
};
|