@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.
Files changed (226) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/dist/browser/standalone.js +26143 -25935
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/ApiReferenceContent.vue.d.ts +34 -0
  5. package/dist/components/ApiReferenceContent.vue.d.ts.map +1 -0
  6. package/dist/components/ApiReferenceContent.vue.js +8 -0
  7. package/dist/components/ApiReferenceContent.vue2.js +148 -0
  8. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  9. package/dist/components/ApiReferenceLayout.vue.js +2 -2
  10. package/dist/components/ApiReferenceLayout.vue2.js +239 -219
  11. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts +2 -2
  12. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts.map +1 -1
  13. package/dist/components/Content/ClientLibraries/ClientSelector.vue.d.ts +1 -1
  14. package/dist/components/Content/ClientLibraries/ClientSelector.vue.d.ts.map +1 -1
  15. package/dist/components/Content/ClientLibraries/featured-clients.d.ts +1 -1
  16. package/dist/components/Content/ClientLibraries/featured-clients.d.ts.map +1 -1
  17. package/dist/components/Content/Content.vue.d.ts +21 -3
  18. package/dist/components/Content/Content.vue.d.ts.map +1 -1
  19. package/dist/components/Content/Content.vue.js +132 -95
  20. package/dist/components/Content/Models/ClassicLayout.vue.d.ts +4 -2
  21. package/dist/components/Content/Models/ClassicLayout.vue.d.ts.map +1 -1
  22. package/dist/components/Content/Models/ClassicLayout.vue.js +2 -2
  23. package/dist/components/Content/Models/ClassicLayout.vue2.js +28 -28
  24. package/dist/components/Content/Models/Models.vue.d.ts +10 -2
  25. package/dist/components/Content/Models/Models.vue.d.ts.map +1 -1
  26. package/dist/components/Content/Models/Models.vue.js +25 -27
  27. package/dist/components/Content/Models/ModernLayout.vue.d.ts +6 -2
  28. package/dist/components/Content/Models/ModernLayout.vue.d.ts.map +1 -1
  29. package/dist/components/Content/Models/ModernLayout.vue.js +1 -1
  30. package/dist/components/Content/Models/ModernLayout.vue2.js +30 -29
  31. package/dist/components/Content/Operations/TraversedEntry.vue.d.ts +20 -6
  32. package/dist/components/Content/Operations/TraversedEntry.vue.d.ts.map +1 -1
  33. package/dist/components/Content/Operations/TraversedEntry.vue.js +58 -46
  34. package/dist/components/Content/Operations/get-current-index.d.ts +1 -1
  35. package/dist/components/Content/Operations/get-current-index.d.ts.map +1 -1
  36. package/dist/components/Content/Schema/helpers/get-ref-name.d.ts.map +1 -1
  37. package/dist/components/Content/Schema/helpers/get-ref-name.js +9 -7
  38. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +1 -1
  39. package/dist/components/Content/Schema/helpers/schema-name.d.ts.map +1 -1
  40. package/dist/components/Content/Schema/helpers/schema-name.js +15 -14
  41. package/dist/components/Content/Tags/ClassicLayout.vue.d.ts +1 -1
  42. package/dist/components/Content/Tags/ClassicLayout.vue.d.ts.map +1 -1
  43. package/dist/components/Content/Tags/ClassicLayout.vue.js +2 -2
  44. package/dist/components/Content/Tags/ModernLayout.vue.d.ts +3 -1
  45. package/dist/components/Content/Tags/ModernLayout.vue.d.ts.map +1 -1
  46. package/dist/components/Content/Tags/ModernLayout.vue.js +1 -1
  47. package/dist/components/Content/Tags/ModernLayout.vue2.js +34 -30
  48. package/dist/components/Content/Tags/Tag.vue.d.ts +3 -1
  49. package/dist/components/Content/Tags/Tag.vue.d.ts.map +1 -1
  50. package/dist/components/Content/Tags/Tag.vue.js +14 -12
  51. package/dist/components/Content/Tags/TagSection.vue.d.ts +2 -1
  52. package/dist/components/Content/Tags/TagSection.vue.d.ts.map +1 -1
  53. package/dist/components/Content/Tags/TagSection.vue.js +49 -52
  54. package/dist/components/OperationsList/OperationsList.vue.d.ts +1 -1
  55. package/dist/components/OperationsList/OperationsList.vue.d.ts.map +1 -1
  56. package/dist/components/OperationsList/OperationsList.vue.js +2 -2
  57. package/dist/components/OperationsList/OperationsListItem.vue.d.ts +1 -1
  58. package/dist/components/OperationsList/OperationsListItem.vue.d.ts.map +1 -1
  59. package/dist/components/OperationsList/OperationsListItem.vue.js +2 -2
  60. package/dist/components/ShowMoreButton.vue.d.ts +1 -0
  61. package/dist/components/ShowMoreButton.vue.d.ts.map +1 -1
  62. package/dist/components/ShowMoreButton.vue.js +2 -2
  63. package/dist/components/ShowMoreButton.vue2.js +12 -12
  64. package/dist/features/Operation/Operation.vue.d.ts +21 -9
  65. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  66. package/dist/features/Operation/Operation.vue.js +42 -53
  67. package/dist/features/Operation/components/Header.vue.d.ts +2 -2
  68. package/dist/features/Operation/components/Header.vue.d.ts.map +1 -1
  69. package/dist/features/Operation/components/Header.vue.js +9 -8
  70. package/dist/features/Operation/components/Headers.vue.d.ts +2 -2
  71. package/dist/features/Operation/components/Headers.vue.d.ts.map +1 -1
  72. package/dist/features/Operation/components/Headers.vue.js +2 -2
  73. package/dist/features/Operation/components/Headers.vue2.js +31 -29
  74. package/dist/features/Operation/components/OperationParameters.vue.d.ts +4 -0
  75. package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
  76. package/dist/features/Operation/components/OperationParameters.vue.js +37 -31
  77. package/dist/features/Operation/components/OperationResponses.vue.d.ts +5 -1
  78. package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
  79. package/dist/features/Operation/components/OperationResponses.vue.js +16 -17
  80. package/dist/features/Operation/components/ParameterList.vue.d.ts +6 -2
  81. package/dist/features/Operation/components/ParameterList.vue.d.ts.map +1 -1
  82. package/dist/features/Operation/components/ParameterList.vue.js +17 -19
  83. package/dist/features/Operation/components/ParameterListItem.vue.d.ts +6 -2
  84. package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
  85. package/dist/features/Operation/components/ParameterListItem.vue.js +3 -3
  86. package/dist/features/Operation/components/ParameterListItem.vue2.js +64 -65
  87. package/dist/features/Operation/components/RequestBody.vue.d.ts +4 -0
  88. package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
  89. package/dist/features/Operation/components/RequestBody.vue.js +2 -2
  90. package/dist/features/Operation/components/RequestBody.vue2.js +65 -65
  91. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +4 -0
  92. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
  93. package/dist/features/Operation/components/callbacks/Callback.vue.js +3 -3
  94. package/dist/features/Operation/components/callbacks/Callback.vue2.js +29 -22
  95. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts +6 -0
  96. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -1
  97. package/dist/features/Operation/components/callbacks/Callbacks.vue.js +18 -16
  98. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +11 -5
  99. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  100. package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
  101. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +99 -90
  102. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +12 -5
  103. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  104. package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
  105. package/dist/features/Operation/layouts/ModernLayout.vue2.js +99 -87
  106. package/dist/features/Search/helpers/create-search-index.d.ts +2 -1
  107. package/dist/features/Search/helpers/create-search-index.d.ts.map +1 -1
  108. package/dist/features/Search/types.d.ts +1 -1
  109. package/dist/features/Search/types.d.ts.map +1 -1
  110. package/dist/features/api-client-modal/ApiClientModal.vue.d.ts.map +1 -1
  111. package/dist/features/api-client-modal/ApiClientModal.vue.js +23 -26
  112. package/dist/features/api-client-modal/useApiClient.d.ts +3032 -2888
  113. package/dist/features/api-client-modal/useApiClient.d.ts.map +1 -1
  114. package/dist/features/document-source/hooks/useDocumentFetcher.d.ts.map +1 -1
  115. package/dist/features/document-source/hooks/useDocumentFetcher.js +13 -11
  116. package/dist/features/document-source/hooks/useDocumentSource.d.ts +1 -1
  117. package/dist/features/document-source/hooks/useDocumentSource.d.ts.map +1 -1
  118. package/dist/features/example-responses/ExampleResponse.vue.d.ts.map +1 -1
  119. package/dist/features/example-responses/ExampleResponse.vue.js +3 -3
  120. package/dist/features/example-responses/ExampleResponse.vue2.js +26 -18
  121. package/dist/features/example-responses/ExampleResponses.vue.d.ts.map +1 -1
  122. package/dist/features/example-responses/ExampleResponses.vue.js +2 -2
  123. package/dist/features/example-responses/ExampleResponses.vue2.js +53 -53
  124. package/dist/features/multiple-documents/useMultipleDocuments.d.ts +8 -5
  125. package/dist/features/multiple-documents/useMultipleDocuments.d.ts.map +1 -1
  126. package/dist/features/multiple-documents/useMultipleDocuments.js +46 -43
  127. package/dist/features/test-request-button/TestRequestButton.vue.d.ts.map +1 -1
  128. package/dist/features/test-request-button/TestRequestButton.vue.js +2 -2
  129. package/dist/features/test-request-button/TestRequestButton.vue2.js +15 -21
  130. package/dist/features/toolbar/ApiReferenceToolbar.vue.js +18 -18
  131. package/dist/features/toolbar/ApiReferenceToolbarConfig.vue.js +1 -1
  132. package/dist/features/toolbar/ApiReferenceToolbarConfigTheme.vue.d.ts +2 -2
  133. package/dist/features/toolbar/ApiReferenceToolbarPopover.vue.js +1 -1
  134. package/dist/features/toolbar/ApiReferenceToolbarSdks.vue.js +1 -1
  135. package/dist/features/toolbar/ApiReferenceToolbarShare.vue.js +8 -8
  136. package/dist/features/toolbar/ApiReferenceToolbarShareRegister.vue.d.ts.map +1 -1
  137. package/dist/features/toolbar/ApiReferenceToolbarShareRegister.vue.js +34 -28
  138. package/dist/features/toolbar/ApiReferenceToolbarTitle.vue.js +27 -27
  139. package/dist/helpers/test-utils.d.ts +3 -365
  140. package/dist/helpers/test-utils.d.ts.map +1 -1
  141. package/dist/hooks/useNavState.d.ts +4 -2
  142. package/dist/hooks/useNavState.d.ts.map +1 -1
  143. package/dist/hooks/useNavState.js +31 -27
  144. package/dist/index.d.ts +1 -0
  145. package/dist/index.d.ts.map +1 -1
  146. package/dist/index.js +21 -19
  147. package/dist/style.css +1 -1
  148. package/dist/types.d.ts.map +1 -1
  149. package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
  150. package/dist/v2/ApiReferenceWorkspace.vue.js +46 -40
  151. package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts +1 -1
  152. package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts.map +1 -1
  153. package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js +2 -2
  154. package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue2.js +11 -11
  155. package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue.d.ts +2 -2
  156. package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue.d.ts.map +1 -1
  157. package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue.js +2 -2
  158. package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue2.js +10 -10
  159. package/dist/v2/blocks/scalar-client-selector-block/helpers/featured-clients.d.ts +1 -1
  160. package/dist/v2/blocks/scalar-client-selector-block/helpers/featured-clients.d.ts.map +1 -1
  161. package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue.d.ts +3 -0
  162. package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue.d.ts.map +1 -1
  163. package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue.js +2 -2
  164. package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue2.js +32 -31
  165. package/dist/v2/blocks/scalar-info-block/components/InfoBlock.vue.d.ts +15 -8
  166. package/dist/v2/blocks/scalar-info-block/components/InfoBlock.vue.d.ts.map +1 -1
  167. package/dist/v2/blocks/scalar-info-block/components/InfoBlock.vue.js +25 -20
  168. package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue.d.ts +8 -7
  169. package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue.d.ts.map +1 -1
  170. package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue.js +2 -2
  171. package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue2.js +27 -32
  172. package/dist/v2/blocks/scalar-server-selector-block/components/Selector.vue.d.ts +2 -22
  173. package/dist/v2/blocks/scalar-server-selector-block/components/Selector.vue.d.ts.map +1 -1
  174. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue.d.ts +8 -0
  175. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue.d.ts.map +1 -1
  176. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue.js +2 -2
  177. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue2.js +70 -65
  178. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarElement.vue.d.ts +9 -1
  179. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarElement.vue.d.ts.map +1 -1
  180. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarElement.vue.js +2 -2
  181. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarElement.vue2.js +60 -57
  182. package/dist/v2/blocks/scalar-sidebar-block/helpers/create-sidebar.d.ts +3 -365
  183. package/dist/v2/blocks/scalar-sidebar-block/helpers/create-sidebar.d.ts.map +1 -1
  184. package/dist/v2/blocks/scalar-sidebar-block/helpers/generate-reverse-index.d.ts +3 -183
  185. package/dist/v2/blocks/scalar-sidebar-block/helpers/generate-reverse-index.d.ts.map +1 -1
  186. package/dist/v2/helpers/map-configuration.d.ts +22 -22
  187. package/dist/v2/helpers/map-configuration.d.ts.map +1 -1
  188. package/package.json +19 -16
  189. package/dist/components/Content/Operations/TraversedEntryContainer.vue.d.ts +0 -13
  190. package/dist/components/Content/Operations/TraversedEntryContainer.vue.d.ts.map +0 -1
  191. package/dist/components/Content/Operations/TraversedEntryContainer.vue.js +0 -52
  192. package/dist/components/Content/Operations/TraversedEntryContainer.vue2.js +0 -4
  193. package/dist/components/Content/Operations/index.d.ts +0 -2
  194. package/dist/components/Content/Operations/index.d.ts.map +0 -1
  195. package/dist/hooks/useConfig.d.ts +0 -9
  196. package/dist/hooks/useConfig.d.ts.map +0 -1
  197. package/dist/hooks/useConfig.js +0 -10
  198. package/dist/legacy/stores/index.d.ts +0 -2
  199. package/dist/legacy/stores/index.d.ts.map +0 -1
  200. package/dist/legacy/stores/useExampleStore.d.ts +0 -5
  201. package/dist/legacy/stores/useExampleStore.d.ts.map +0 -1
  202. package/dist/legacy/stores/useExampleStore.js +0 -8
  203. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.d.ts +0 -14
  204. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.d.ts.map +0 -1
  205. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.js +0 -4
  206. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue2.js +0 -55
  207. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts +0 -79
  208. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts.map +0 -1
  209. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.js +0 -7
  210. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue2.js +0 -236
  211. package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.d.ts +0 -41
  212. package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.d.ts.map +0 -1
  213. package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.js +0 -22
  214. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-client-options.d.ts +0 -20
  215. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-client-options.d.ts.map +0 -1
  216. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-client-options.js +0 -33
  217. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.d.ts +0 -17
  218. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.d.ts.map +0 -1
  219. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.js +0 -26
  220. package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.d.ts +0 -4
  221. package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.d.ts.map +0 -1
  222. package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.js +0 -10
  223. package/dist/v2/blocks/scalar-request-example-block/index.d.ts +0 -3
  224. package/dist/v2/blocks/scalar-request-example-block/index.d.ts.map +0 -1
  225. package/dist/v2/blocks/scalar-request-example-block/types.d.ts +0 -29
  226. 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,8 @@
1
+ import o from "./ApiReferenceContent.vue2.js";
2
+ /* empty css */
3
+ /* empty css */
4
+ import t from "../_virtual/_plugin-vue_export-helper.js";
5
+ const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-ba6e6d18"]]);
6
+ export {
7
+ a as default
8
+ };
@@ -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":"AAwrBA,OAAO,EAGL,KAAK,OAAO,EACb,MAAM,gBAAgB,CAAA;AA2BvB,OAAO,KAAK,EACV,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,SAAS,CAAA;AA2ChB,KAAK,WAAW,GAAG;KACd,CAAC,IAAI,mBAAmB,GAAG,CAAC,KAAK,EAAE,kBAAkB,KAAK,GAAG;CAC/D,GAAG;IAAE,mBAAmB,EAAE,GAAG,CAAA;CAAE,CAAC;AA4oBnC,QAAA,MAAM,eAAe;;YA5qBqB,OAAO;eAAS,MAAM;;;;;;;;YAAtB,OAAO;eAAS,MAAM;;;;;;kFAmrB9D,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"}
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 f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-a548dd3a"]]);
7
+ const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-49e17c1f"]]);
8
8
  export {
9
- f as default
9
+ a as default
10
10
  };