@scalar/api-reference 1.30.0 → 1.31.1

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 (167) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/dist/browser/standalone.js +6690 -6569
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  5. package/dist/components/ApiReferenceLayout.vue.js +1 -1
  6. package/dist/components/ApiReferenceLayout.vue2.js +164 -181
  7. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts.map +1 -1
  8. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.js +2 -2
  9. package/dist/components/Content/ClientLibraries/ClientLibraries.vue2.js +56 -51
  10. package/dist/components/Content/Content.vue.d.ts.map +1 -1
  11. package/dist/components/Content/Content.vue.js +1 -1
  12. package/dist/components/Content/Content.vue2.js +5 -5
  13. package/dist/components/Content/Introduction/Introduction.vue.d.ts +2 -2
  14. package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
  15. package/dist/components/Content/Introduction/Introduction.vue.js +2 -2
  16. package/dist/components/Content/Introduction/Introduction.vue2.js +57 -63
  17. package/dist/components/Content/Lazy/Loading.vue.d.ts.map +1 -1
  18. package/dist/components/Content/Lazy/Loading.vue.js +46 -46
  19. package/dist/components/Content/Models/Models.vue.d.ts +2 -2
  20. package/dist/components/Content/Models/Models.vue.d.ts.map +1 -1
  21. package/dist/components/Content/Models/Models.vue.js +2 -2
  22. package/dist/components/Content/Models/Models.vue2.js +9 -7
  23. package/dist/components/Content/Models/ModelsAccordion.vue.d.ts +2 -2
  24. package/dist/components/Content/Models/ModelsAccordion.vue.d.ts.map +1 -1
  25. package/dist/components/Content/Models/ModelsAccordion.vue.js +2 -2
  26. package/dist/components/Content/Schema/Schema.preview.d.ts +294 -84
  27. package/dist/components/Content/Schema/Schema.preview.d.ts.map +1 -1
  28. package/dist/components/Content/Schema/Schema.vue.d.ts +21 -4
  29. package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
  30. package/dist/components/Content/Schema/Schema.vue.js +2 -2
  31. package/dist/components/Content/Schema/Schema.vue2.js +158 -131
  32. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts +2 -2
  33. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
  34. package/dist/components/Content/Schema/SchemaComposition.vue.js +57 -53
  35. package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts +2 -3
  36. package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts.map +1 -1
  37. package/dist/components/Content/Schema/SchemaDiscriminator.vue.js +29 -29
  38. package/dist/components/Content/Schema/SchemaHeading.vue.d.ts +2 -2
  39. package/dist/components/Content/Schema/SchemaHeading.vue.d.ts.map +1 -1
  40. package/dist/components/Content/Schema/SchemaHeading.vue.js +1 -1
  41. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +12 -3
  42. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  43. package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
  44. package/dist/components/Content/Schema/SchemaProperty.vue2.js +133 -103
  45. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts +3 -2
  46. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
  47. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +2 -2
  48. package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +133 -126
  49. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts +2 -2
  50. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts.map +1 -1
  51. package/dist/components/Content/Tag/TagList.vue.d.ts +2 -2
  52. package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
  53. package/dist/components/DocumentSelector/DocumentSelector.vue.js +3 -3
  54. package/dist/components/Layouts/ClassicLayout.vue.d.ts.map +1 -1
  55. package/dist/components/Layouts/ClassicLayout.vue.js +19 -17
  56. package/dist/components/Layouts/Layouts.vue.js +11 -9
  57. package/dist/components/Layouts/ModernLayout.vue2.js +22 -20
  58. package/dist/components/Section/SectionAccordion.vue.d.ts.map +1 -1
  59. package/dist/components/Section/SectionAccordion.vue.js +2 -2
  60. package/dist/components/Section/SectionAccordion.vue2.js +1 -1
  61. package/dist/components/Section/SectionContainerAccordion.vue.d.ts.map +1 -1
  62. package/dist/components/Section/SectionContainerAccordion.vue.js +2 -2
  63. package/dist/components/Section/SectionContainerAccordion.vue2.js +4 -4
  64. package/dist/components/Section/SectionHeader.vue.d.ts.map +1 -1
  65. package/dist/components/Section/SectionHeader.vue.js +2 -2
  66. package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
  67. package/dist/components/Sidebar/Sidebar.vue.js +2 -2
  68. package/dist/components/Sidebar/Sidebar.vue2.js +56 -56
  69. package/dist/components/SingleApiReference.vue.d.ts.map +1 -1
  70. package/dist/components/SingleApiReference.vue.js +27 -33
  71. package/dist/esm.d.ts.map +1 -1
  72. package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts +2 -2
  73. package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts.map +1 -1
  74. package/dist/features/ApiClientModal/ApiClientModal.vue.js +49 -50
  75. package/dist/features/ApiClientModal/useApiClient.d.ts +196 -196
  76. package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
  77. package/dist/features/DocumentSource/hooks/useDocumentFetcher.d.ts +11 -0
  78. package/dist/features/DocumentSource/hooks/useDocumentFetcher.d.ts.map +1 -0
  79. package/dist/features/DocumentSource/hooks/useDocumentFetcher.js +38 -0
  80. package/dist/features/DocumentSource/hooks/useDocumentSource.d.ts +21 -0
  81. package/dist/features/DocumentSource/hooks/useDocumentSource.d.ts.map +1 -0
  82. package/dist/features/DocumentSource/hooks/useDocumentSource.js +94 -0
  83. package/dist/features/DocumentSource/index.d.ts +2 -0
  84. package/dist/features/DocumentSource/index.d.ts.map +1 -0
  85. package/dist/features/DownloadLink/DownloadLink.vue.d.ts +1 -1
  86. package/dist/features/DownloadLink/DownloadLink.vue.d.ts.map +1 -1
  87. package/dist/features/DownloadLink/DownloadLink.vue.js +1 -1
  88. package/dist/features/DownloadLink/DownloadLink.vue2.js +18 -17
  89. package/dist/features/DownloadLink/index.d.ts +1 -0
  90. package/dist/features/DownloadLink/index.d.ts.map +1 -1
  91. package/dist/features/DownloadLink/openapi-version-symbol.d.ts +2 -0
  92. package/dist/features/DownloadLink/openapi-version-symbol.d.ts.map +1 -0
  93. package/dist/features/DownloadLink/openapi-version-symbol.js +4 -0
  94. package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts +2 -0
  95. package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
  96. package/dist/features/ExampleRequest/ExampleRequest.vue.js +2 -2
  97. package/dist/features/ExampleRequest/ExampleRequest.vue2.js +178 -127
  98. package/dist/features/Operation/Operation.vue.d.ts +2 -2
  99. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  100. package/dist/features/Operation/Operation.vue.js +29 -23
  101. package/dist/features/Operation/components/OperationParameters.vue.d.ts +7 -3
  102. package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
  103. package/dist/features/Operation/components/OperationParameters.vue.js +28 -24
  104. package/dist/features/Operation/components/OperationResponses.vue.d.ts +2 -2
  105. package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
  106. package/dist/features/Operation/components/ParameterHeaders.vue.d.ts +2 -2
  107. package/dist/features/Operation/components/ParameterHeaders.vue.d.ts.map +1 -1
  108. package/dist/features/Operation/components/ParameterHeaders.vue.js +2 -2
  109. package/dist/features/Operation/components/ParameterList.vue.d.ts +2 -2
  110. package/dist/features/Operation/components/ParameterList.vue.d.ts.map +1 -1
  111. package/dist/features/Operation/components/ParameterList.vue.js +2 -2
  112. package/dist/features/Operation/components/ParameterListItem.vue.d.ts +2 -2
  113. package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
  114. package/dist/features/Operation/components/ParameterListItem.vue.js +3 -3
  115. package/dist/features/Operation/components/ParameterListItem.vue2.js +6 -6
  116. package/dist/features/Operation/components/RequestBody.vue.d.ts +7 -3
  117. package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
  118. package/dist/features/Operation/components/RequestBody.vue.js +2 -2
  119. package/dist/features/Operation/components/RequestBody.vue2.js +41 -36
  120. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +7 -3
  121. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  122. package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
  123. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +84 -79
  124. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +5 -1
  125. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  126. package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
  127. package/dist/features/Operation/layouts/ModernLayout.vue2.js +66 -57
  128. package/dist/features/Operation/types/schemas.d.ts +2 -2
  129. package/dist/features/Operation/types/schemas.d.ts.map +1 -1
  130. package/dist/features/Search/SearchButton.vue.js +2 -2
  131. package/dist/helpers/local-storage.d.ts +8 -0
  132. package/dist/helpers/local-storage.d.ts.map +1 -0
  133. package/dist/helpers/local-storage.js +6 -0
  134. package/dist/helpers/measure.d.ts +21 -0
  135. package/dist/helpers/measure.d.ts.map +1 -0
  136. package/dist/helpers/measure.js +7 -0
  137. package/dist/helpers/parse.d.ts +3 -5
  138. package/dist/helpers/parse.d.ts.map +1 -1
  139. package/dist/helpers/parse.js +64 -86
  140. package/dist/helpers/scroll-to-id.d.ts.map +1 -1
  141. package/dist/helpers/scroll-to-id.js +18 -4
  142. package/dist/hooks/useDiscriminator.d.ts +53 -0
  143. package/dist/hooks/useDiscriminator.d.ts.map +1 -0
  144. package/dist/hooks/useDiscriminator.js +149 -0
  145. package/dist/hooks/useOperationDiscriminator.d.ts +8 -0
  146. package/dist/hooks/useOperationDiscriminator.d.ts.map +1 -0
  147. package/dist/hooks/useOperationDiscriminator.js +57 -0
  148. package/dist/index.d.ts +0 -1
  149. package/dist/index.d.ts.map +1 -1
  150. package/dist/index.js +33 -35
  151. package/dist/libs/openapi.d.ts +3 -3
  152. package/dist/libs/openapi.d.ts.map +1 -1
  153. package/dist/libs/openapi.js +35 -42
  154. package/dist/standalone/lib/html-api.d.ts.map +1 -1
  155. package/dist/standalone/lib/html-api.js +15 -15
  156. package/dist/stores/useHttpClientStore.d.ts.map +1 -1
  157. package/dist/stores/useHttpClientStore.js +19 -18
  158. package/dist/style.css +1 -1
  159. package/dist/types.d.ts +27 -3
  160. package/dist/types.d.ts.map +1 -1
  161. package/package.json +15 -16
  162. package/dist/components/Content/Schema/helpers/schema-discriminator.d.ts +0 -12
  163. package/dist/components/Content/Schema/helpers/schema-discriminator.d.ts.map +0 -1
  164. package/dist/components/Content/Schema/helpers/schema-discriminator.js +0 -45
  165. package/dist/hooks/useReactiveSpec.d.ts +0 -448
  166. package/dist/hooks/useReactiveSpec.d.ts.map +0 -1
  167. package/dist/hooks/useReactiveSpec.js +0 -59
@@ -1 +1 @@
1
- {"version":3,"file":"ApiReferenceLayout.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiReferenceLayout.vue"],"names":[],"mappings":"AAkoBA,OAAO,EAGL,KAAK,OAAO,EACb,MAAM,gBAAgB,CAAA;AAgCvB,OAAO,KAAK,EACV,oBAAoB,EAEpB,kBAAkB,EACnB,MAAM,SAAS,CAAA;AAIhB,KAAK,WAAW,GAAG,IAAI,CAAC,oBAAoB,EAAE,QAAQ,CAAC,CAAC;AAuRxD,iBAAS,cAAc;WAoPT,OAAO,IAA6B;;wBAlfZ,kBAAkB,KAAK,GAAG;wBAA1B,kBAAkB,KAAK,GAAG;wBAA1B,kBAAkB,KAAK,GAAG;iCAA1B,kBAAkB,KAAK,GAAG;+BAA1B,kBAAkB,KAAK,GAAG;iCAA1B,kBAAkB,KAAK,GAAG;+BAA1B,kBAAkB,KAAK,GAAG;;wBAA1B,kBAAkB,KAAK,GAAG;wBAA1B,kBAAkB,KAAK,GAAG;wBAA1B,kBAAkB,KAAK,GAAG;iCAA1B,kBAAkB,KAAK,GAAG;+BAA1B,kBAAkB,KAAK,GAAG;iCAA1B,kBAAkB,KAAK,GAAG;+BAA1B,kBAAkB,KAAK,GAAG;;;;;;EAuf/D;AAwBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;YAriBqB,OAAO;eAAS,MAAM;;;;;;;;YAAtB,OAAO;eAAS,MAAM;;;;;;kFA4iB9D,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,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":"AA4kBA,OAAO,EAGL,KAAK,OAAO,EACb,MAAM,gBAAgB,CAAA;AAgCvB,OAAO,KAAK,EACV,oBAAoB,EAEpB,kBAAkB,EACnB,MAAM,SAAS,CAAA;AAIhB,KAAK,WAAW,GAAG,IAAI,CAAC,oBAAoB,EAAE,QAAQ,CAAC,CAAC;AA2OxD,iBAAS,cAAc;WAoPT,OAAO,IAA6B;;wBA/aZ,kBAAkB,KAAK,GAAG;wBAA1B,kBAAkB,KAAK,GAAG;wBAA1B,kBAAkB,KAAK,GAAG;iCAA1B,kBAAkB,KAAK,GAAG;+BAA1B,kBAAkB,KAAK,GAAG;iCAA1B,kBAAkB,KAAK,GAAG;+BAA1B,kBAAkB,KAAK,GAAG;;wBAA1B,kBAAkB,KAAK,GAAG;wBAA1B,kBAAkB,KAAK,GAAG;wBAA1B,kBAAkB,KAAK,GAAG;iCAA1B,kBAAkB,KAAK,GAAG;+BAA1B,kBAAkB,KAAK,GAAG;iCAA1B,kBAAkB,KAAK,GAAG;+BAA1B,kBAAkB,KAAK,GAAG;;;;;;EAob/D;AA0BD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;YArfqB,OAAO;eAAS,MAAM;;;;;;;;YAAtB,OAAO;eAAS,MAAM;;;;;;kFA4f9D,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -2,7 +2,7 @@ import o from "./ApiReferenceLayout.vue2.js";
2
2
  /* empty css */
3
3
  /* empty css */
4
4
  import t from "../_virtual/_plugin-vue_export-helper.js";
5
- const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-20e6362d"]]);
5
+ const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-8d5d2de3"]]);
6
6
  export {
7
7
  a as default
8
8
  };
@@ -1,206 +1,189 @@
1
- import { defineComponent as ie, computed as h, ref as E, onBeforeMount as F, onMounted as le, onUnmounted as de, watch as R, onServerPrefetch as ue, useSSRContext as ce, useId as pe, provide as b, createElementBlock as y, openBlock as C, Fragment as D, createElementVNode as d, createVNode as m, unref as i, normalizeStyle as fe, normalizeClass as me, createCommentVNode as $, withDirectives as ve, renderSlot as u, normalizeProps as c, guardReactiveProps as p, withCtx as v, vShow as Se, createSlots as ge } from "vue";
2
- import { provideUseId as he } from "@headlessui/vue";
3
- import { LAYOUT_SYMBOL as be } from "@scalar/api-client/hooks";
4
- import { createWorkspaceStore as we, WORKSPACE_SYMBOL as ye, createActiveEntitiesStore as Ce, ACTIVE_ENTITIES_SYMBOL as Te } from "@scalar/api-client/store";
5
- import { addScalarClassesToHeadless as Ee, ScalarErrorBoundary as Re } from "@scalar/components";
6
- import { defaultStateFactory as N } from "@scalar/oas-utils/helpers";
7
- import { hasObtrusiveScrollbars as $e, getThemeStyles as Oe } from "@scalar/themes";
8
- import { apiReferenceConfigurationSchema as Ie } from "@scalar/types/api-reference";
9
- import { useToasts as Le, ScalarToasts as Me } from "@scalar/use-toasts";
10
- import { useMediaQuery as Pe, useResizeObserver as ke, useDebounceFn as Ae } from "@vueuse/core";
11
- import Be from "./GettingStarted.vue.js";
12
- import { sleep as Fe } from "../helpers/sleep.js";
13
- import { CONFIGURATION_SYMBOL as De } from "../hooks/useConfig.js";
14
- import { useNavState as Ne } from "../hooks/useNavState.js";
15
- import { useSidebar as _e } from "../hooks/useSidebar.js";
16
- import { downloadEventBus as _, downloadDocument as He } from "../libs/download.js";
17
- import { useHttpClientStore as Ue } from "../stores/useHttpClientStore.js";
18
- import { PLUGIN_MANAGER_SYMBOL as Ye } from "../plugins/hooks/usePluginManager.js";
19
- import { createPluginManager as ze } from "../plugins/plugin-manager.js";
20
- import Ge from "./Sidebar/Sidebar.vue.js";
21
- import Ve from "./Content/Content.vue.js";
22
- import We from "../features/ApiClientModal/ApiClientModal.vue.js";
23
- const je = ["innerHTML"], Ke = { class: "references-header" }, Qe = ["aria-label"], qe = { class: "references-navigation-list" }, Je = { class: "references-editor" }, Xe = { class: "references-editor-textarea" }, Ze = ["aria-label"], xe = {
1
+ import { defineComponent as ie, computed as h, provide as u, ref as E, onBeforeMount as B, onMounted as k, toValue as N, onUnmounted as se, useId as le, createElementBlock as y, openBlock as C, Fragment as F, createElementVNode as i, createVNode as c, unref as a, normalizeStyle as de, normalizeClass as ue, createCommentVNode as O, withDirectives as ce, renderSlot as s, normalizeProps as l, guardReactiveProps as d, withCtx as m, vShow as me, createSlots as fe, watch as pe } from "vue";
2
+ import { provideUseId as ve } from "@headlessui/vue";
3
+ import { LAYOUT_SYMBOL as ge } from "@scalar/api-client/hooks";
4
+ import { WORKSPACE_SYMBOL as Se, ACTIVE_ENTITIES_SYMBOL as he } from "@scalar/api-client/store";
5
+ import { addScalarClassesToHeadless as be, ScalarErrorBoundary as we } from "@scalar/components";
6
+ import { hasObtrusiveScrollbars as ye, getThemeStyles as Ce } from "@scalar/themes";
7
+ import { apiReferenceConfigurationSchema as Te } from "@scalar/types/api-reference";
8
+ import { useToasts as De, ScalarToasts as Ee } from "@scalar/use-toasts";
9
+ import { useMediaQuery as Oe, useResizeObserver as $e, useDebounceFn as Re } from "@vueuse/core";
10
+ import Ie from "./GettingStarted.vue.js";
11
+ import { sleep as Me } from "../helpers/sleep.js";
12
+ import { CONFIGURATION_SYMBOL as Pe } from "../hooks/useConfig.js";
13
+ import { useNavState as Le } from "../hooks/useNavState.js";
14
+ import { useSidebar as Ae } from "../hooks/useSidebar.js";
15
+ import { downloadEventBus as _, downloadDocument as Be } from "../libs/download.js";
16
+ import { useHttpClientStore as ke } from "../stores/useHttpClientStore.js";
17
+ import { useDocumentSource as Ne } from "../features/DocumentSource/hooks/useDocumentSource.js";
18
+ import { OPENAPI_VERSION_SYMBOL as Fe } from "../features/DownloadLink/openapi-version-symbol.js";
19
+ import { PLUGIN_MANAGER_SYMBOL as _e } from "../plugins/hooks/usePluginManager.js";
20
+ import { createPluginManager as He } from "../plugins/plugin-manager.js";
21
+ import Ue from "./Sidebar/Sidebar.vue.js";
22
+ import Ye from "./Content/Content.vue.js";
23
+ import Ve from "../features/ApiClientModal/ApiClientModal.vue.js";
24
+ const ze = ["innerHTML"], Ge = { class: "references-header" }, Ke = ["aria-label"], Qe = { class: "references-navigation-list" }, We = { class: "references-editor" }, je = { class: "references-editor-textarea" }, qe = ["aria-label"], Je = {
24
25
  key: 0,
25
26
  class: "references-footer"
26
- }, Ct = /* @__PURE__ */ ie({
27
+ }, Et = /* @__PURE__ */ ie({
27
28
  inheritAttrs: !1,
28
29
  __name: "ApiReferenceLayout",
29
30
  props: {
30
31
  configuration: {},
32
+ dereferencedDocument: {},
33
+ originalDocument: {},
31
34
  parsedSpec: {},
32
35
  rawSpec: {}
33
36
  },
34
37
  emits: ["changeTheme", "updateContent", "loadSwaggerFile", "linkSwaggerFile", "toggleDarkMode"],
35
- setup(H) {
36
- const f = H, t = h(
37
- () => Ie.parse(f.configuration)
38
- ), { initializeToasts: U, toast: Y } = Le();
39
- U((e) => Y(e));
40
- const z = Pe("(min-width: 1150px)"), G = E("100dvh"), S = E(null);
41
- ke(S, (e) => {
42
- G.value = e[0].contentRect.height + "px";
38
+ setup(b) {
39
+ const t = h(
40
+ () => Te.parse(b.configuration)
41
+ ), { initializeToasts: H, toast: U } = De();
42
+ H((e) => U(e));
43
+ const {
44
+ originalDocument: Y,
45
+ originalOpenApiVersion: V,
46
+ dereferencedDocument: T,
47
+ parsedDocument: D,
48
+ workspaceStore: z,
49
+ activeEntitiesStore: G
50
+ } = Ne({
51
+ configuration: t,
52
+ dereferencedDocument: b.dereferencedDocument,
53
+ originalDocument: b.originalDocument
43
54
  });
44
- const V = h($e), {
45
- breadcrumb: W,
46
- collapsedSidebarItems: w,
47
- isSidebarOpen: j,
48
- setCollapsedSidebarItem: O,
49
- hideModels: K,
50
- defaultOpenAllTags: Q,
51
- setParsedSpec: q,
52
- scrollToOperation: J
53
- } = _e(), {
54
- getReferenceId: X,
55
- getPathRoutingId: I,
56
- getSectionId: Z,
57
- getTagId: x,
58
- hash: ee,
59
- isIntersectionEnabled: L,
60
- updateHash: M,
55
+ u(Fe, V), u(Se, z), u(he, G);
56
+ const K = Oe("(min-width: 1150px)"), Q = E("100dvh"), f = E(null);
57
+ $e(f, (e) => {
58
+ Q.value = e[0].contentRect.height + "px";
59
+ });
60
+ const W = h(ye), {
61
+ breadcrumb: j,
62
+ collapsedSidebarItems: Xe,
63
+ isSidebarOpen: q,
64
+ setCollapsedSidebarItem: Ze,
65
+ hideModels: J,
66
+ defaultOpenAllTags: X,
67
+ // setParsedSpec,
68
+ scrollToOperation: Z
69
+ } = Ae(), {
70
+ getReferenceId: x,
71
+ getPathRoutingId: ee,
72
+ getSectionId: xe,
73
+ getTagId: et,
74
+ hash: tt,
75
+ isIntersectionEnabled: $,
76
+ updateHash: R,
61
77
  replaceUrlState: te
62
- } = Ne(t);
78
+ } = Le(t);
63
79
  if (t.value.redirect && typeof window < "u") {
64
80
  const e = t.value.redirect(
65
81
  (t.value.pathRouting ? window.location.pathname : "") + window.location.hash
66
82
  );
67
83
  e && history.replaceState({}, "", e);
68
84
  }
69
- F(() => M());
70
- const P = async (e) => {
71
- var a;
72
- L.value = !1, M(), e ? J(e) : (a = S.value) == null || a.scrollTo(0, 0), await Fe(100), L.value = !0;
73
- }, k = E(0);
74
- F(() => Ee()), le(() => {
75
- var o, s, r;
76
- history.scrollRestoration = "manual", _.on(({ filename: n }) => {
77
- He(f.rawSpec, n);
78
- });
79
- const e = (s = (o = S.value) == null ? void 0 : o.parentElement) == null ? void 0 : s.getBoundingClientRect(), a = (r = S.value) == null ? void 0 : r.getBoundingClientRect();
80
- if (e && a) {
81
- const n = a.top - e.top;
82
- k.value = n < 2 ? 0 : n;
85
+ B(() => R());
86
+ const I = async (e) => {
87
+ var o;
88
+ $.value = !1, R(), e ? Z(e) : (o = f.value) == null || o.scrollTo(0, 0), await Me(100), $.value = !0;
89
+ }, M = E(0);
90
+ B(() => be()), k(() => {
91
+ var r, p, v;
92
+ history.scrollRestoration = "manual";
93
+ const e = (p = (r = f.value) == null ? void 0 : r.parentElement) == null ? void 0 : p.getBoundingClientRect(), o = (v = f.value) == null ? void 0 : v.getBoundingClientRect();
94
+ if (e && o) {
95
+ const g = o.top - e.top;
96
+ M.value = g < 2 ? 0 : g;
83
97
  }
84
98
  window.onhashchange = () => {
85
- P(X());
86
- }, window.onpopstate = () => t.value.pathRouting && P(I(window.location.pathname));
99
+ I(x());
100
+ }, window.onpopstate = () => t.value.pathRouting && I(ee(window.location.pathname));
87
101
  });
88
- const ae = h(
89
- () => z.value || !t.value.isEditable
90
- ), A = Ae((e) => {
102
+ const oe = h(
103
+ () => K.value || !t.value.isEditable
104
+ ), P = Re((e) => {
91
105
  if ((e.target.scrollTop ?? 0) < 50) {
92
- const o = t.value.pathRouting ? t.value.pathRouting.basePath : window.location.pathname;
93
- te("", o + window.location.search);
106
+ const r = t.value.pathRouting ? t.value.pathRouting.basePath : window.location.pathname;
107
+ te("", r + window.location.search);
94
108
  }
95
- }), l = h(() => ({
96
- breadcrumb: W.value,
97
- spec: f.parsedSpec
109
+ }), n = h(() => ({
110
+ breadcrumb: j.value,
111
+ spec: D.value
98
112
  }));
99
- de(() => {
100
- _.reset();
101
- }), R(() => f.parsedSpec, q, { deep: !0 }), ue(() => {
102
- var a, o;
103
- const e = ce();
104
- if (e && (e.payload || (e.payload = { data: N() }), (a = e.payload).data || (a.data = N()), t.value.pathRouting)) {
105
- const s = I(e.url);
106
- ee.value = s, e.payload.data.hash = s;
107
- for (const r in w)
108
- Object.hasOwn(w, r) && delete w[r];
109
- if (s)
110
- O(Z(s), !0);
111
- else {
112
- const r = (o = f.parsedSpec.tags) == null ? void 0 : o[0];
113
- r && O(x(r), !0);
114
- }
115
- e.payload.data["useSidebarContent-collapsedSidebarItems"] = w;
116
- }
117
- }), he(() => pe());
118
- const T = we({
119
- useLocalStorage: !1,
120
- ...t.value
121
- });
122
- R(
123
- () => f.rawSpec,
124
- (e) => {
125
- var a;
126
- return e && T.importSpecFile(e, "default", {
127
- shouldLoad: !1,
128
- documentUrl: ((a = t.value.spec) == null ? void 0 : a.url) ?? t.value.url,
129
- useCollectionSecurity: !0,
130
- ...t.value
131
- });
132
- },
133
- { immediate: !0 }
134
- ), b(ye, T);
135
- const oe = Ce(T);
136
- b(Te, oe), b(be, "modal"), b(De, t), b(
137
- Ye,
138
- ze({
139
- // TODO: Get plugins from the configuration
113
+ k(
114
+ () => _.on(({ filename: e }) => {
115
+ Be(
116
+ N(Y) || N(b.rawSpec) || "",
117
+ e
118
+ );
119
+ })
120
+ ), se(() => _.reset()), ve(() => le()), u(ge, "modal"), u(Pe, t), u(
121
+ _e,
122
+ He({
140
123
  plugins: t.value.plugins
141
124
  })
142
125
  );
143
- function B(e, a) {
144
- R(
126
+ function L(e, o) {
127
+ pe(
145
128
  () => t.value[e],
146
- (o) => {
147
- typeof o < "u" && a(o);
129
+ (r) => {
130
+ typeof r < "u" && o(r);
148
131
  },
149
132
  { immediate: !0 }
150
133
  );
151
134
  }
152
- const { setExcludedClients: re, setDefaultHttpClient: se } = Ue();
153
- B("defaultHttpClient", se), B("hiddenClients", re), K.value = t.value.hideModels ?? !1, Q.value = t.value.defaultOpenAllTags ?? !1;
135
+ const { setExcludedClients: ae, setDefaultHttpClient: re } = ke();
136
+ L("defaultHttpClient", re), L("hiddenClients", ae), J.value = t.value.hideModels ?? !1, X.value = t.value.defaultOpenAllTags ?? !1;
154
137
  const ne = h(
155
138
  () => `<style>
156
- ${Oe(t.value.theme, {
139
+ ${Ce(t.value.theme, {
157
140
  fonts: t.value.withDefaultFonts
158
141
  })}</style>`
159
142
  );
160
- return (e, a) => {
161
- var o, s, r;
162
- return C(), y(D, null, [
163
- d("div", { innerHTML: ne.value }, null, 8, je),
164
- d("div", {
143
+ return (e, o) => {
144
+ var r, p, v, g, A;
145
+ return C(), y(F, null, [
146
+ i("div", { innerHTML: ne.value }, null, 8, ze),
147
+ i("div", {
165
148
  ref_key: "documentEl",
166
- ref: S,
167
- class: me(["scalar-app scalar-api-reference references-layout", [
149
+ ref: f,
150
+ class: ue(["scalar-app scalar-api-reference references-layout", [
168
151
  {
169
- "scalar-scrollbars-obtrusive": V.value,
152
+ "scalar-scrollbars-obtrusive": W.value,
170
153
  "references-editable": t.value.isEditable,
171
154
  "references-sidebar": t.value.showSidebar,
172
- "references-sidebar-mobile-open": i(j),
155
+ "references-sidebar-mobile-open": a(q),
173
156
  "references-classic": t.value.layout === "classic"
174
157
  },
175
158
  e.$attrs.class
176
159
  ]]),
177
- style: fe({
178
- "--scalar-y-offset": `var(--scalar-custom-header-height, ${k.value}px)`
160
+ style: de({
161
+ "--scalar-y-offset": `var(--scalar-custom-header-height, ${M.value}px)`
179
162
  }),
180
- onScrollPassive: a[4] || (a[4] = //@ts-ignore
181
- (...n) => i(A) && i(A)(...n))
163
+ onScrollPassive: o[4] || (o[4] = //@ts-ignore
164
+ (...w) => a(P) && a(P)(...w))
182
165
  }, [
183
- d("div", Ke, [
184
- u(e.$slots, "header", c(p(l.value)), void 0, !0)
166
+ i("div", Ge, [
167
+ s(e.$slots, "header", l(d(n.value)), void 0, !0)
185
168
  ]),
186
169
  t.value.showSidebar ? (C(), y("aside", {
187
170
  key: 0,
188
- "aria-label": `Sidebar for ${(o = e.parsedSpec.info) == null ? void 0 : o.title}`,
171
+ "aria-label": `Sidebar for ${(p = (r = a(T)) == null ? void 0 : r.info) == null ? void 0 : p.title}`,
189
172
  class: "references-navigation t-doc__sidebar"
190
173
  }, [
191
- d("div", qe, [
192
- m(i(Re), null, {
193
- default: v(() => [
194
- m(i(Ge), {
174
+ i("div", Qe, [
175
+ c(a(we), null, {
176
+ default: m(() => [
177
+ c(a(Ue), {
195
178
  operationsSorter: t.value.operationsSorter,
196
- parsedSpec: e.parsedSpec,
179
+ parsedSpec: a(D),
197
180
  tagsSorter: t.value.tagsSorter
198
181
  }, {
199
- "sidebar-start": v(() => [
200
- u(e.$slots, "sidebar-start", c(p(l.value)), void 0, !0)
182
+ "sidebar-start": m(() => [
183
+ s(e.$slots, "sidebar-start", l(d(n.value)), void 0, !0)
201
184
  ]),
202
- "sidebar-end": v(() => [
203
- u(e.$slots, "sidebar-end", c(p(l.value)), void 0, !0)
185
+ "sidebar-end": m(() => [
186
+ s(e.$slots, "sidebar-end", l(d(n.value)), void 0, !0)
204
187
  ]),
205
188
  _: 3
206
189
  }, 8, ["operationsSorter", "parsedSpec", "tagsSorter"])
@@ -208,63 +191,63 @@ const je = ["innerHTML"], Ke = { class: "references-header" }, Qe = ["aria-label
208
191
  _: 3
209
192
  })
210
193
  ])
211
- ], 8, Qe)) : $("", !0),
212
- ve(d("div", Je, [
213
- d("div", Xe, [
214
- u(e.$slots, "editor", c(p(l.value)), void 0, !0)
194
+ ], 8, Ke)) : O("", !0),
195
+ ce(i("div", We, [
196
+ i("div", je, [
197
+ s(e.$slots, "editor", l(d(n.value)), void 0, !0)
215
198
  ])
216
199
  ], 512), [
217
- [Se, t.value.isEditable]
200
+ [me, t.value.isEditable]
218
201
  ]),
219
- ae.value ? (C(), y(D, { key: 1 }, [
220
- d("main", {
221
- "aria-label": `Open API Documentation for ${(s = e.parsedSpec.info) == null ? void 0 : s.title}`,
202
+ oe.value ? (C(), y(F, { key: 1 }, [
203
+ i("main", {
204
+ "aria-label": `Open API Documentation for ${(g = (v = a(T)) == null ? void 0 : v.info) == null ? void 0 : g.title}`,
222
205
  class: "references-rendered"
223
206
  }, [
224
- m(i(Ve), {
207
+ c(a(Ye), {
225
208
  layout: t.value.layout,
226
- parsedSpec: e.parsedSpec
227
- }, ge({
228
- start: v(() => [
229
- u(e.$slots, "content-start", c(p(l.value)), void 0, !0)
209
+ parsedSpec: a(D)
210
+ }, fe({
211
+ start: m(() => [
212
+ s(e.$slots, "content-start", l(d(n.value)), void 0, !0)
230
213
  ]),
231
- end: v(() => [
232
- u(e.$slots, "content-end", c(p(l.value)), void 0, !0)
214
+ end: m(() => [
215
+ s(e.$slots, "content-end", l(d(n.value)), void 0, !0)
233
216
  ]),
234
217
  _: 2
235
218
  }, [
236
- (r = t.value) != null && r.isEditable ? {
219
+ (A = t.value) != null && A.isEditable ? {
237
220
  name: "empty-state",
238
- fn: v(() => {
239
- var n;
221
+ fn: m(() => {
222
+ var w;
240
223
  return [
241
- m(Be, {
242
- theme: ((n = t.value) == null ? void 0 : n.theme) || "default",
243
- onChangeTheme: a[0] || (a[0] = (g) => e.$emit("changeTheme", g)),
244
- onLinkSwaggerFile: a[1] || (a[1] = (g) => e.$emit("linkSwaggerFile")),
245
- onLoadSwaggerFile: a[2] || (a[2] = (g) => e.$emit("loadSwaggerFile")),
246
- onUpdateContent: a[3] || (a[3] = (g) => e.$emit("updateContent", g))
224
+ c(Ie, {
225
+ theme: ((w = t.value) == null ? void 0 : w.theme) || "default",
226
+ onChangeTheme: o[0] || (o[0] = (S) => e.$emit("changeTheme", S)),
227
+ onLinkSwaggerFile: o[1] || (o[1] = (S) => e.$emit("linkSwaggerFile")),
228
+ onLoadSwaggerFile: o[2] || (o[2] = (S) => e.$emit("loadSwaggerFile")),
229
+ onUpdateContent: o[3] || (o[3] = (S) => e.$emit("updateContent", S))
247
230
  }, null, 8, ["theme"])
248
231
  ];
249
232
  }),
250
233
  key: "0"
251
234
  } : void 0
252
235
  ]), 1032, ["layout", "parsedSpec"])
253
- ], 8, Ze),
254
- e.$slots.footer ? (C(), y("div", xe, [
255
- u(e.$slots, "footer", c(p(l.value)), void 0, !0)
256
- ])) : $("", !0)
257
- ], 64)) : $("", !0),
258
- m(i(We), {
236
+ ], 8, qe),
237
+ e.$slots.footer ? (C(), y("div", Je, [
238
+ s(e.$slots, "footer", l(d(n.value)), void 0, !0)
239
+ ])) : O("", !0)
240
+ ], 64)) : O("", !0),
241
+ c(a(Ve), {
259
242
  configuration: t.value,
260
- parsedSpec: e.parsedSpec
261
- }, null, 8, ["configuration", "parsedSpec"])
243
+ dereferencedDocument: a(T)
244
+ }, null, 8, ["configuration", "dereferencedDocument"])
262
245
  ], 38),
263
- m(i(Me))
246
+ c(a(Ee))
264
247
  ], 64);
265
248
  };
266
249
  }
267
250
  });
268
251
  export {
269
- Ct as default
252
+ Et as default
270
253
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ClientLibraries.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/ClientLibraries/ClientLibraries.vue"],"names":[],"mappings":";AA0bA,wBAKG"}
1
+ {"version":3,"file":"ClientLibraries.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/ClientLibraries/ClientLibraries.vue"],"names":[],"mappings":";AA4cA,wBAKG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./ClientLibraries.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-02957b63"]]);
4
+ const a = /* @__PURE__ */ r(o, [["__scopeId", "data-v-076e8959"]]);
5
5
  export {
6
- e as default
6
+ a as default
7
7
  };