@scalar/api-reference 1.31.8 → 1.31.9

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 (183) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/dist/browser/standalone.js +18613 -18470
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/ApiReference.vue.d.ts.map +1 -1
  5. package/dist/components/ApiReference.vue.js +10 -30
  6. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  7. package/dist/components/ApiReferenceLayout.vue.js +2 -2
  8. package/dist/components/ApiReferenceLayout.vue2.js +240 -222
  9. package/dist/components/Content/Content.vue.d.ts +2 -0
  10. package/dist/components/Content/Content.vue.d.ts.map +1 -1
  11. package/dist/components/Content/Content.vue.js +2 -2
  12. package/dist/components/Content/Content.vue2.js +84 -74
  13. package/dist/components/Content/Introduction/Introduction.vue.d.ts +1 -3
  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 +93 -83
  17. package/dist/components/Content/Lazy/Loading.vue.d.ts.map +1 -1
  18. package/dist/components/Content/Lazy/Loading.vue.js +84 -86
  19. package/dist/components/Content/Models/Models.vue.js +1 -1
  20. package/dist/components/Content/Models/Models.vue2.js +4 -4
  21. package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
  22. package/dist/components/Content/Schema/Schema.vue.js +2 -2
  23. package/dist/components/Content/Schema/Schema.vue2.js +53 -53
  24. package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts.map +1 -1
  25. package/dist/components/Content/Schema/SchemaDiscriminator.vue.js +1 -1
  26. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  27. package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
  28. package/dist/components/Content/Schema/SchemaProperty.vue2.js +117 -112
  29. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
  30. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +2 -2
  31. package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +161 -191
  32. package/dist/components/Content/Schema/helpers/schema-name.d.ts +13 -0
  33. package/dist/components/Content/Schema/helpers/schema-name.d.ts.map +1 -1
  34. package/dist/components/Content/Schema/helpers/schema-name.js +59 -13
  35. package/dist/components/Content/Tag/OperationsList.vue.d.ts.map +1 -1
  36. package/dist/components/Content/Tag/OperationsList.vue.js +1 -1
  37. package/dist/components/Content/Tag/OperationsList.vue2.js +22 -25
  38. package/dist/components/Content/Tag/OperationsListItem.vue.d.ts +2 -3
  39. package/dist/components/Content/Tag/OperationsListItem.vue.d.ts.map +1 -1
  40. package/dist/components/Content/Tag/OperationsListItem.vue.js +2 -2
  41. package/dist/components/Content/Tag/OperationsListItem.vue2.js +46 -47
  42. package/dist/components/Content/Tag/Tag.vue.d.ts.map +1 -1
  43. package/dist/components/Content/Tag/Tag.vue.js +45 -47
  44. package/dist/components/Content/Tag/TagList.vue.d.ts +2 -0
  45. package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
  46. package/dist/components/Content/Tag/TagList.vue.js +40 -41
  47. package/dist/components/Content/Tag/TagSection.vue.d.ts.map +1 -1
  48. package/dist/components/Content/Tag/TagSection.vue.js +2 -2
  49. package/dist/components/Content/Tag/TagSection.vue2.js +21 -21
  50. package/dist/components/HttpMethod/HttpMethod.vue.d.ts +16 -1
  51. package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
  52. package/dist/components/HttpMethod/HttpMethod.vue.js +12 -11
  53. package/dist/components/MobileHeader.vue.d.ts +1 -8
  54. package/dist/components/MobileHeader.vue.d.ts.map +1 -1
  55. package/dist/components/MobileHeader.vue.js +1 -1
  56. package/dist/components/MobileHeader.vue2.js +19 -19
  57. package/dist/components/Section/Section.vue.js +2 -2
  58. package/dist/components/Section/Section.vue2.js +1 -1
  59. package/dist/components/ShowMoreButton.vue.js +2 -2
  60. package/dist/components/ShowMoreButton.vue2.js +1 -1
  61. package/dist/components/Sidebar/Sidebar.vue.d.ts +2 -4
  62. package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
  63. package/dist/components/Sidebar/Sidebar.vue.js +1 -1
  64. package/dist/components/Sidebar/Sidebar.vue2.js +113 -159
  65. package/dist/components/Sidebar/SidebarElement.vue.d.ts +2 -11
  66. package/dist/components/Sidebar/SidebarElement.vue.d.ts.map +1 -1
  67. package/dist/components/Sidebar/SidebarElement.vue.js +2 -2
  68. package/dist/components/Sidebar/SidebarElement.vue2.js +85 -81
  69. package/dist/components/Sidebar/SidebarHttpBadge.vue.d.ts +16 -1
  70. package/dist/components/Sidebar/SidebarHttpBadge.vue.d.ts.map +1 -1
  71. package/dist/components/Sidebar/SidebarHttpBadge.vue.js +2 -2
  72. package/dist/components/Sidebar/SidebarHttpBadge.vue2.js +11 -5
  73. package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts.map +1 -1
  74. package/dist/features/ApiClientModal/ApiClientModal.vue.js +54 -42
  75. package/dist/features/ApiClientModal/useApiClient.d.ts +74 -72
  76. package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
  77. package/dist/features/DocumentSource/hooks/useDocumentSource.d.ts +0 -2
  78. package/dist/features/DocumentSource/hooks/useDocumentSource.d.ts.map +1 -1
  79. package/dist/features/DocumentSource/hooks/useDocumentSource.js +40 -67
  80. package/dist/features/DownloadLink/DownloadLink.vue.js +1 -1
  81. package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts +5 -5
  82. package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
  83. package/dist/features/ExampleRequest/ExampleRequest.vue.js +1 -1
  84. package/dist/features/ExampleRequest/ExampleRequest.vue2.js +200 -179
  85. package/dist/features/Operation/Operation.vue.d.ts +0 -1
  86. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  87. package/dist/features/Operation/Operation.vue.js +31 -34
  88. package/dist/features/Operation/components/OperationParameters.vue.d.ts +3 -2
  89. package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
  90. package/dist/features/Operation/components/OperationParameters.vue.js +62 -64
  91. package/dist/features/Operation/components/OperationResponses.vue.d.ts +1 -2
  92. package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
  93. package/dist/features/Operation/components/OperationResponses.vue.js +2 -2
  94. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
  95. package/dist/features/Operation/components/callbacks/Callback.vue.js +3 -3
  96. package/dist/features/Operation/components/callbacks/Callback.vue2.js +31 -38
  97. package/dist/features/Operation/hooks/useResponses.d.ts +3 -3
  98. package/dist/features/Operation/hooks/useResponses.d.ts.map +1 -1
  99. package/dist/features/Operation/hooks/useResponses.js +12 -13
  100. package/dist/features/Operation/index.d.ts +0 -1
  101. package/dist/features/Operation/index.d.ts.map +1 -1
  102. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +4 -6
  103. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  104. package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
  105. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +85 -72
  106. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +2 -4
  107. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  108. package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
  109. package/dist/features/Operation/layouts/ModernLayout.vue2.js +114 -98
  110. package/dist/features/Search/SearchModal.vue.js +2 -2
  111. package/dist/features/Search/SearchModal.vue2.js +1 -1
  112. package/dist/features/Search/useSearchIndex.d.ts.map +1 -1
  113. package/dist/features/Search/useSearchIndex.js +61 -64
  114. package/dist/features/sidebar/helpers/create-sidebar.d.ts +4 -2
  115. package/dist/features/sidebar/helpers/create-sidebar.d.ts.map +1 -1
  116. package/dist/features/sidebar/helpers/create-sidebar.js +33 -0
  117. package/dist/features/sidebar/hooks/useSidebar.d.ts +2 -3
  118. package/dist/features/sidebar/hooks/useSidebar.d.ts.map +1 -1
  119. package/dist/features/sidebar/hooks/useSidebar.js +18 -0
  120. package/dist/features/sidebar/index.d.ts +2 -1
  121. package/dist/features/sidebar/index.d.ts.map +1 -1
  122. package/dist/features/traverse-schema/helpers/get-tag.d.ts +4 -2
  123. package/dist/features/traverse-schema/helpers/get-tag.d.ts.map +1 -1
  124. package/dist/features/traverse-schema/helpers/get-tag.js +7 -0
  125. package/dist/features/traverse-schema/helpers/traverse-description.js +33 -0
  126. package/dist/features/traverse-schema/helpers/traverse-document.d.ts.map +1 -1
  127. package/dist/features/traverse-schema/helpers/traverse-document.js +34 -0
  128. package/dist/features/traverse-schema/helpers/traverse-paths.d.ts +5 -3
  129. package/dist/features/traverse-schema/helpers/traverse-paths.d.ts.map +1 -1
  130. package/dist/features/traverse-schema/helpers/traverse-paths.js +32 -0
  131. package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts +2 -2
  132. package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts.map +1 -1
  133. package/dist/features/traverse-schema/helpers/traverse-schemas.js +23 -0
  134. package/dist/features/traverse-schema/helpers/traverse-tags.d.ts +2 -2
  135. package/dist/features/traverse-schema/helpers/traverse-tags.d.ts.map +1 -1
  136. package/dist/features/traverse-schema/helpers/traverse-tags.js +43 -0
  137. package/dist/features/traverse-schema/helpers/traverse-webhooks.d.ts +2 -2
  138. package/dist/features/traverse-schema/helpers/traverse-webhooks.d.ts.map +1 -1
  139. package/dist/features/traverse-schema/helpers/traverse-webhooks.js +26 -0
  140. package/dist/features/traverse-schema/index.d.ts +3 -3
  141. package/dist/features/traverse-schema/index.d.ts.map +1 -1
  142. package/dist/features/traverse-schema/types.d.ts +8 -5
  143. package/dist/features/traverse-schema/types.d.ts.map +1 -1
  144. package/dist/helpers/parse.d.ts +2 -1
  145. package/dist/helpers/parse.d.ts.map +1 -1
  146. package/dist/helpers/parse.js +72 -88
  147. package/dist/hooks/useMultipleDocuments.d.ts +6 -6
  148. package/dist/hooks/useMultipleDocuments.d.ts.map +1 -1
  149. package/dist/hooks/useNavState.d.ts +1 -1
  150. package/dist/hooks/useNavState.d.ts.map +1 -1
  151. package/dist/hooks/useNavState.js +14 -9
  152. package/dist/hooks/useOperation.d.ts +7 -7
  153. package/dist/hooks/useOperation.d.ts.map +1 -1
  154. package/dist/hooks/useOperation.js +13 -12
  155. package/dist/index.d.ts +0 -1
  156. package/dist/index.d.ts.map +1 -1
  157. package/dist/index.js +23 -25
  158. package/dist/legacy/fixtures/index.d.ts +1 -1
  159. package/dist/libs/openapi.d.ts +3 -4
  160. package/dist/libs/openapi.d.ts.map +1 -1
  161. package/dist/libs/openapi.js +8 -9
  162. package/dist/style.css +1 -1
  163. package/dist/v2/ApiReferenceWorkspace.vue.d.ts +4 -18
  164. package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
  165. package/dist/v2/ApiReferenceWorkspace.vue.js +68 -45
  166. package/package.json +16 -16
  167. package/dist/components/Content/Webhooks/index.d.ts +0 -2
  168. package/dist/components/Content/Webhooks/index.d.ts.map +0 -1
  169. package/dist/features/Operation/Webhooks.vue.d.ts +0 -7
  170. package/dist/features/Operation/Webhooks.vue.d.ts.map +0 -1
  171. package/dist/features/Operation/Webhooks.vue.js +0 -7
  172. package/dist/features/Operation/Webhooks.vue2.js +0 -121
  173. package/dist/features/Operation/components/Webhook.vue.d.ts +0 -7
  174. package/dist/features/Operation/components/Webhook.vue.d.ts.map +0 -1
  175. package/dist/features/Operation/components/Webhook.vue.js +0 -7
  176. package/dist/features/Operation/components/Webhook.vue2.js +0 -29
  177. package/dist/features/traverse-schema/helpers/operation-id-params.d.ts +0 -8
  178. package/dist/features/traverse-schema/helpers/operation-id-params.d.ts.map +0 -1
  179. package/dist/features/traverse-schema/helpers/operation-id-params.js +0 -8
  180. package/dist/hooks/useSidebar.d.ts +0 -53
  181. package/dist/hooks/useSidebar.d.ts.map +0 -1
  182. package/dist/hooks/useSidebar.js +0 -248
  183. package/dist/legacy/fixtures/httpRequestMethods.js +0 -14
@@ -1,41 +1,43 @@
1
- import { defineComponent as ce, computed as T, provide as h, ref as E, onBeforeMount as F, onMounted as N, toValue as U, onUnmounted as me, useId as pe, watch as O, createElementBlock as d, openBlock as r, Fragment as V, createElementVNode as p, createVNode as c, unref as a, normalizeStyle as fe, normalizeClass as ve, createCommentVNode as l, withDirectives as ge, createBlock as S, renderSlot as u, isRef as he, normalizeProps as f, guardReactiveProps as v, withCtx as i, vShow as Se, createSlots as ye } from "vue";
2
- import { provideUseId as be } from "@headlessui/vue";
3
- import { OpenApiClientButton as we } from "@scalar/api-client/components";
4
- import { LAYOUT_SYMBOL as ke } from "@scalar/api-client/hooks";
5
- import { WORKSPACE_SYMBOL as Ce, ACTIVE_ENTITIES_SYMBOL as De } from "@scalar/api-client/store";
6
- import { addScalarClassesToHeadless as Te, ScalarErrorBoundary as $e, ScalarSidebarFooter as Me, ScalarColorModeToggleButton as Ee, ScalarColorModeToggleIcon as Oe } from "@scalar/components";
7
- import { sleep as Be } from "@scalar/helpers/testing/sleep";
8
- import { hasObtrusiveScrollbars as Re, getThemeStyles as Ie } from "@scalar/themes";
9
- import { apiReferenceConfigurationSchema as He } from "@scalar/types/api-reference";
10
- import { useBreakpoints as Pe } from "@scalar/use-hooks/useBreakpoints";
11
- import { useToasts as Ae, ScalarToasts as Le } from "@scalar/use-toasts";
12
- import { useMediaQuery as Fe, useResizeObserver as Ne, useDebounceFn as Ue } from "@vueuse/core";
13
- import Ve from "./ClassicHeader.vue.js";
14
- import _e from "./GettingStarted.vue.js";
15
- import Ke from "./MobileHeader.vue.js";
16
- import { CONFIGURATION_SYMBOL as Ye } from "../hooks/useConfig.js";
17
- import { useNavState as ze } from "../hooks/useNavState.js";
18
- import { useSidebar as Ge } from "../hooks/useSidebar.js";
19
- import { downloadEventBus as _, downloadDocument as Qe } from "../libs/download.js";
20
- import { useHttpClientStore as We } from "../stores/useHttpClientStore.js";
21
- import { useDocumentSource as je } from "../features/DocumentSource/hooks/useDocumentSource.js";
22
- import { OPENAPI_VERSION_SYMBOL as qe } from "../features/DownloadLink/openapi-version-symbol.js";
23
- import { PLUGIN_MANAGER_SYMBOL as Je } from "../plugins/hooks/usePluginManager.js";
24
- import { createPluginManager as Xe } from "../plugins/plugin-manager.js";
25
- import Ze from "./Sidebar/Sidebar.vue.js";
26
- import K from "../features/Search/SearchButton.vue.js";
27
- import xe from "./Content/Content.vue.js";
28
- import et from "../features/ApiClientModal/ApiClientModal.vue.js";
29
- const tt = ["innerHTML"], ot = { class: "references-header" }, at = ["aria-label"], rt = { class: "references-navigation-list" }, nt = { key: 0 }, lt = {
1
+ import { defineComponent as ve, computed as T, provide as y, ref as D, onBeforeMount as ge, onMounted as Y, watch as E, toValue as K, onUnmounted as he, useId as Se, createElementBlock as m, openBlock as a, Fragment as z, createElementVNode as v, createVNode as f, normalizeStyle as ye, normalizeClass as be, unref as r, createCommentVNode as s, withDirectives as we, createBlock as b, renderSlot as u, normalizeProps as g, guardReactiveProps as h, withCtx as l, vShow as ke, createSlots as Ce } from "vue";
2
+ import { provideUseId as $e } from "@headlessui/vue";
3
+ import { OpenApiClientButton as Te } from "@scalar/api-client/components";
4
+ import { LAYOUT_SYMBOL as De } from "@scalar/api-client/hooks";
5
+ import { WORKSPACE_SYMBOL as Ee, ACTIVE_ENTITIES_SYMBOL as Me } from "@scalar/api-client/store";
6
+ import { addScalarClassesToHeadless as Oe, ScalarErrorBoundary as Be, ScalarSidebarFooter as Ie, ScalarColorModeToggleButton as Re, ScalarColorModeToggleIcon as Le } from "@scalar/components";
7
+ import { sleep as He } from "@scalar/helpers/testing/sleep";
8
+ import { hasObtrusiveScrollbars as Ae, getThemeStyles as Pe } from "@scalar/themes";
9
+ import { apiReferenceConfigurationSchema as _e } from "@scalar/types/api-reference";
10
+ import { useBreakpoints as Fe } from "@scalar/use-hooks/useBreakpoints";
11
+ import { useToasts as Ne, ScalarToasts as Ve } from "@scalar/use-toasts";
12
+ import { useMediaQuery as Ue, useResizeObserver as Ye, useDebounceFn as Ke } from "@vueuse/core";
13
+ import ze from "./ClassicHeader.vue.js";
14
+ import Ge from "./GettingStarted.vue.js";
15
+ import Qe from "./MobileHeader.vue.js";
16
+ import { parse as We } from "../helpers/parse.js";
17
+ import { CONFIGURATION_SYMBOL as je } from "../hooks/useConfig.js";
18
+ import { useNavState as qe } from "../hooks/useNavState.js";
19
+ import { downloadEventBus as G, downloadDocument as Je } from "../libs/download.js";
20
+ import { createEmptySpecification as Xe } from "../libs/openapi.js";
21
+ import { useHttpClientStore as Ze } from "../stores/useHttpClientStore.js";
22
+ import { useDocumentSource as xe } from "../features/DocumentSource/hooks/useDocumentSource.js";
23
+ import { OPENAPI_VERSION_SYMBOL as et } from "../features/DownloadLink/openapi-version-symbol.js";
24
+ import { useSidebar as tt } from "../features/sidebar/hooks/useSidebar.js";
25
+ import { PLUGIN_MANAGER_SYMBOL as ot } from "../plugins/hooks/usePluginManager.js";
26
+ import { createPluginManager as rt } from "../plugins/plugin-manager.js";
27
+ import at from "./Sidebar/Sidebar.vue.js";
28
+ import Q from "../features/Search/SearchButton.vue.js";
29
+ import nt from "./Content/Content.vue.js";
30
+ import it from "../features/ApiClientModal/ApiClientModal.vue.js";
31
+ const st = ["innerHTML"], lt = { class: "references-header" }, ut = ["aria-label"], dt = { class: "references-navigation-list" }, ct = { key: 0 }, mt = {
30
32
  key: 1,
31
33
  class: "scalar-api-references-standalone-search"
32
- }, st = { key: 1 }, it = { class: "references-editor" }, ut = { class: "references-editor-textarea" }, dt = ["aria-label"], ct = {
34
+ }, ft = { key: 1 }, pt = { class: "references-editor" }, vt = { class: "references-editor-textarea" }, gt = ["aria-label"], ht = {
33
35
  key: 0,
34
36
  class: "w-64 empty:hidden"
35
- }, mt = {
37
+ }, St = {
36
38
  key: 0,
37
39
  class: "references-footer"
38
- }, Gt = /* @__PURE__ */ ce({
40
+ }, qt = /* @__PURE__ */ ve({
39
41
  inheritAttrs: !1,
40
42
  __name: "ApiReferenceLayout",
41
43
  props: {
@@ -47,285 +49,301 @@ const tt = ["innerHTML"], ot = { class: "references-header" }, at = ["aria-label
47
49
  rawSpec: {}
48
50
  },
49
51
  emits: ["changeTheme", "updateContent", "loadSwaggerFile", "linkSwaggerFile", "toggleDarkMode"],
50
- setup($) {
52
+ setup(M) {
51
53
  const t = T(
52
- () => He.parse($.configuration)
53
- ), { initializeToasts: Y, toast: z } = Ae();
54
- Y((e) => z(e));
54
+ () => _e.parse(M.configuration)
55
+ ), { initializeToasts: W, toast: j } = Ne();
56
+ W((e) => j(e));
55
57
  const {
56
- originalDocument: G,
57
- originalOpenApiVersion: Q,
58
- dereferencedDocument: M,
59
- parsedDocument: y,
60
- workspaceStore: W,
61
- activeEntitiesStore: j
62
- } = je({
58
+ originalDocument: q,
59
+ originalOpenApiVersion: J,
60
+ dereferencedDocument: d,
61
+ workspaceStore: X,
62
+ activeEntitiesStore: Z
63
+ } = xe({
63
64
  configuration: t,
64
- dereferencedDocument: $.dereferencedDocument,
65
- originalDocument: $.originalDocument
65
+ dereferencedDocument: M.dereferencedDocument,
66
+ originalDocument: M.originalDocument
66
67
  });
67
- h(qe, Q), h(Ce, W), h(De, j);
68
- const q = Fe("(min-width: 1150px)"), J = E("100dvh"), b = E(null);
69
- Ne(b, (e) => {
70
- J.value = e[0].contentRect.height + "px";
68
+ y(et, J), y(Ee, X), y(Me, Z);
69
+ const x = Ue("(min-width: 1150px)"), ee = D("100dvh"), w = D(null);
70
+ Ye(w, (e) => {
71
+ ee.value = e[0].contentRect.height + "px";
71
72
  });
72
- const X = T(Re), {
73
- collapsedSidebarItems: pt,
74
- isSidebarOpen: g,
75
- setCollapsedSidebarItem: ft,
76
- hideModels: Z,
77
- defaultOpenAllTags: x,
78
- // setParsedSpec,
79
- scrollToOperation: ee
80
- } = Ge(), {
81
- getReferenceId: te,
82
- getPathRoutingId: oe,
83
- getSectionId: vt,
84
- getTagId: gt,
85
- hash: ae,
86
- isIntersectionEnabled: B,
87
- updateHash: R,
88
- replaceUrlState: re
89
- } = ze(t);
73
+ const te = T(Ae), R = qe(t), { isSidebarOpen: O, setCollapsedSidebarItem: L, scrollToOperation: oe, items: re } = tt(d, {
74
+ ...R,
75
+ config: t
76
+ }), {
77
+ getReferenceId: ae,
78
+ getPathRoutingId: ne,
79
+ getSectionId: ie,
80
+ getTagId: se,
81
+ hash: B,
82
+ isIntersectionEnabled: H,
83
+ updateHash: A,
84
+ replaceUrlState: le
85
+ } = R;
90
86
  if (t.value.redirect && typeof window < "u") {
91
87
  const e = t.value.redirect(
92
88
  (t.value.pathRouting ? window.location.pathname : "") + window.location.hash
93
89
  );
94
90
  e && history.replaceState({}, "", e);
95
91
  }
96
- F(() => R());
97
- const I = async (e) => {
92
+ ge(() => {
93
+ A(), Oe();
94
+ });
95
+ const P = async (e) => {
98
96
  var o;
99
- B.value = !1, R(), e ? ee(e) : (o = b.value) == null || o.scrollTo(0, 0), await Be(100), B.value = !0;
100
- }, H = E(0);
101
- F(() => Te()), N(() => {
102
- var s, w, k;
97
+ H.value = !1, A(), e ? oe(e) : (o = w.value) == null || o.scrollTo(0, 0), await He(100), H.value = !0;
98
+ }, _ = D(0);
99
+ Y(() => {
100
+ var n, i, C;
103
101
  history.scrollRestoration = "manual";
104
- const e = (w = (s = b.value) == null ? void 0 : s.parentElement) == null ? void 0 : w.getBoundingClientRect(), o = (k = b.value) == null ? void 0 : k.getBoundingClientRect();
102
+ const e = (i = (n = w.value) == null ? void 0 : n.parentElement) == null ? void 0 : i.getBoundingClientRect(), o = (C = w.value) == null ? void 0 : C.getBoundingClientRect();
105
103
  if (e && o) {
106
- const C = o.top - e.top;
107
- H.value = C < 2 ? 0 : C;
104
+ const $ = o.top - e.top;
105
+ _.value = $ < 2 ? 0 : $;
108
106
  }
109
107
  window.onhashchange = () => {
110
- I(te());
111
- }, window.onpopstate = () => t.value.pathRouting && I(oe(window.location.pathname));
108
+ P(ae());
109
+ }, window.onpopstate = () => t.value.pathRouting && P(ne(window.location.pathname)), window.addEventListener("scroll", F, { passive: !0 });
112
110
  });
113
- const ne = T(
114
- () => q.value || !t.value.isEditable
115
- ), P = Ue((e) => {
116
- if ((e.target.scrollTop ?? 0) < 50) {
117
- const s = t.value.pathRouting ? t.value.pathRouting.basePath : window.location.pathname;
118
- re("", s + window.location.search);
111
+ const ue = T(
112
+ () => x.value || !t.value.isEditable
113
+ ), F = Ke(() => {
114
+ window.scrollY < 50 && le("");
115
+ }), N = D(!1);
116
+ E(d, (e) => {
117
+ var o, n;
118
+ if (!(N.value || !((o = e.tags) != null && o.length))) {
119
+ if (B.value) {
120
+ const i = ie(B.value);
121
+ i && L(i, !0);
122
+ } else {
123
+ const i = (n = e.tags) == null ? void 0 : n[0];
124
+ i && L(se(i), !0);
125
+ }
126
+ N.value = !0;
119
127
  }
120
- }), m = T(() => ({
121
- spec: y.value
128
+ });
129
+ const k = D(Xe());
130
+ E(
131
+ d,
132
+ async (e) => {
133
+ if (!e)
134
+ return;
135
+ const o = await We(e, re.value.entries);
136
+ k.value = o;
137
+ },
138
+ { immediate: !0 }
139
+ );
140
+ const p = T(() => ({
141
+ spec: k.value
122
142
  }));
123
- N(
124
- () => _.on(({ filename: e, format: o }) => {
125
- Qe(
126
- U(G) || U($.rawSpec) || "",
143
+ Y(
144
+ () => G.on(({ filename: e, format: o }) => {
145
+ Je(
146
+ K(q) || K(M.rawSpec) || "",
127
147
  e,
128
148
  o
129
149
  );
130
150
  })
131
- ), me(() => _.reset()), be(() => pe()), h(ke, "modal"), h(Ye, t), h(
132
- Je,
133
- Xe({
151
+ ), he(() => {
152
+ window.removeEventListener("scroll", F), G.reset();
153
+ }), $e(() => Se()), y(De, "modal"), y(je, t), y(
154
+ ot,
155
+ rt({
134
156
  plugins: t.value.plugins
135
157
  })
136
158
  );
137
- function A(e, o) {
138
- O(
159
+ function V(e, o) {
160
+ E(
139
161
  () => t.value[e],
140
- (s) => {
141
- typeof s < "u" && o(s);
162
+ (n) => {
163
+ typeof n < "u" && o(n);
142
164
  },
143
165
  { immediate: !0 }
144
166
  );
145
167
  }
146
- const { setExcludedClients: le, setDefaultHttpClient: se } = We();
147
- A("defaultHttpClient", se), A("hiddenClients", le), Z.value = t.value.hideModels ?? !1, x.value = t.value.defaultOpenAllTags ?? !1;
148
- const ie = T(
168
+ const { setExcludedClients: de, setDefaultHttpClient: ce } = Ze();
169
+ V("defaultHttpClient", ce), V("hiddenClients", de);
170
+ const me = T(
149
171
  () => `<style>
150
- ${Ie(t.value.theme, {
172
+ ${Pe(t.value.theme, {
151
173
  fonts: t.value.withDefaultFonts
152
174
  })}</style>`
153
- ), { mediaQueries: ue } = Pe(), de = !1;
154
- return O(ue.lg, (e, o) => {
155
- o && !e && (g.value = !1);
156
- }), O(ae, (e, o) => {
157
- e && e !== o && (g.value = !1);
175
+ ), { mediaQueries: fe } = Fe(), pe = !1;
176
+ return E(fe.lg, (e, o) => {
177
+ o && !e && (O.value = !1);
178
+ }), E(B, (e, o) => {
179
+ e && e !== o && (O.value = !1);
158
180
  }), (e, o) => {
159
- var s, w, k, C, L;
160
- return r(), d(V, null, [
161
- p("div", { innerHTML: ie.value }, null, 8, tt),
162
- p("div", {
181
+ var n, i, C, $, U;
182
+ return a(), m(z, null, [
183
+ v("div", { innerHTML: me.value }, null, 8, st),
184
+ v("div", {
163
185
  ref_key: "documentEl",
164
- ref: b,
165
- class: ve(["scalar-app scalar-api-reference references-layout", [
186
+ ref: w,
187
+ class: be(["scalar-app scalar-api-reference references-layout", [
166
188
  {
167
189
  "scalar-api-references-standalone-mobile": t.value.showSidebar ?? !0,
168
- "scalar-scrollbars-obtrusive": X.value,
190
+ "scalar-scrollbars-obtrusive": te.value,
169
191
  "references-editable": t.value.isEditable,
170
192
  "references-sidebar": t.value.showSidebar,
171
- "references-sidebar-mobile-open": a(g),
193
+ "references-sidebar-mobile-open": r(O),
172
194
  "references-classic": t.value.layout === "classic"
173
195
  },
174
196
  e.$attrs.class
175
197
  ]]),
176
- style: fe({
177
- "--scalar-y-offset": `var(--scalar-custom-header-height, ${H.value}px)`
178
- }),
179
- onScrollPassive: o[7] || (o[7] = //@ts-ignore
180
- (...n) => a(P) && a(P)(...n))
198
+ style: ye({
199
+ "--scalar-y-offset": `var(--scalar-custom-header-height, ${_.value}px)`
200
+ })
181
201
  }, [
182
- p("div", ot, [
183
- t.value.layout === "modern" && (t.value.showSidebar ?? !0) ? (r(), S(Ke, {
184
- key: 0,
185
- open: a(g),
186
- "onUpdate:open": o[0] || (o[0] = (n) => he(g) ? g.value = n : null)
187
- }, null, 8, ["open"])) : l("", !0),
188
- u(e.$slots, "header", f(v(m.value)), void 0, !0)
202
+ v("div", lt, [
203
+ t.value.layout === "modern" && (t.value.showSidebar ?? !0) ? (a(), b(Qe, { key: 0 })) : s("", !0),
204
+ u(e.$slots, "header", g(h(p.value)), void 0, !0)
189
205
  ]),
190
- t.value.showSidebar ? (r(), d("aside", {
206
+ t.value.showSidebar ? (a(), m("aside", {
191
207
  key: 0,
192
- "aria-label": `Sidebar for ${(w = (s = a(M)) == null ? void 0 : s.info) == null ? void 0 : w.title}`,
208
+ "aria-label": `Sidebar for ${(i = (n = r(d)) == null ? void 0 : n.info) == null ? void 0 : i.title}`,
193
209
  class: "references-navigation t-doc__sidebar"
194
210
  }, [
195
- p("div", rt, [
196
- c(a($e), null, {
197
- default: i(() => [
198
- c(a(Ze), {
199
- operationsSorter: t.value.operationsSorter,
200
- parsedSpec: a(y),
201
- tagsSorter: t.value.tagsSorter
202
- }, {
203
- "sidebar-start": i(() => {
204
- var n;
205
- return [
206
- e.$slots["document-selector"] ? (r(), d("div", nt, [
207
- u(e.$slots, "document-selector", {}, void 0, !0)
208
- ])) : l("", !0),
209
- t.value.hideSearch ? l("", !0) : (r(), d("div", lt, [
210
- c(a(K), {
211
- searchHotKey: (n = t.value) == null ? void 0 : n.searchHotKey,
212
- spec: a(y)
213
- }, null, 8, ["searchHotKey", "spec"])
214
- ])),
215
- u(e.$slots, "sidebar-start", f(v(m.value)), void 0, !0)
216
- ];
217
- }),
218
- "sidebar-end": i(() => [
219
- u(e.$slots, "sidebar-end", f(v(m.value)), () => [
220
- c(a(Me), { class: "darklight-reference" }, {
221
- toggle: i(() => [
222
- t.value.hideDarkModeToggle ? (r(), d("span", st)) : (r(), S(a(Ee), {
223
- key: 0,
224
- modelValue: e.isDark,
225
- "onUpdate:modelValue": o[1] || (o[1] = (n) => e.$emit("toggleDarkMode"))
226
- }, null, 8, ["modelValue"]))
227
- ]),
228
- default: i(() => [
229
- t.value.hideClientButton ? l("", !0) : (r(), S(a(we), {
230
- key: 0,
231
- buttonSource: "sidebar",
232
- integration: t.value._integration,
233
- isDevelopment: de,
234
- url: t.value.url
235
- }, null, 8, ["integration", "url"]))
236
- ]),
237
- _: 1
238
- })
239
- ], !0)
240
- ]),
241
- _: 3
242
- }, 8, ["operationsSorter", "parsedSpec", "tagsSorter"])
243
- ]),
211
+ v("div", dt, [
212
+ f(r(Be), null, {
213
+ default: l(() => {
214
+ var S, c;
215
+ return [
216
+ f(r(at), {
217
+ title: ((c = (S = r(d)) == null ? void 0 : S.info) == null ? void 0 : c.title) ?? "The OpenAPI Schema"
218
+ }, {
219
+ "sidebar-start": l(() => {
220
+ var I;
221
+ return [
222
+ e.$slots["document-selector"] ? (a(), m("div", ct, [
223
+ u(e.$slots, "document-selector", {}, void 0, !0)
224
+ ])) : s("", !0),
225
+ t.value.hideSearch ? s("", !0) : (a(), m("div", mt, [
226
+ f(r(Q), {
227
+ searchHotKey: (I = t.value) == null ? void 0 : I.searchHotKey,
228
+ spec: k.value
229
+ }, null, 8, ["searchHotKey", "spec"])
230
+ ])),
231
+ u(e.$slots, "sidebar-start", g(h(p.value)), void 0, !0)
232
+ ];
233
+ }),
234
+ "sidebar-end": l(() => [
235
+ u(e.$slots, "sidebar-end", g(h(p.value)), () => [
236
+ f(r(Ie), { class: "darklight-reference" }, {
237
+ toggle: l(() => [
238
+ t.value.hideDarkModeToggle ? (a(), m("span", ft)) : (a(), b(r(Re), {
239
+ key: 0,
240
+ modelValue: e.isDark,
241
+ "onUpdate:modelValue": o[0] || (o[0] = (I) => e.$emit("toggleDarkMode"))
242
+ }, null, 8, ["modelValue"]))
243
+ ]),
244
+ default: l(() => [
245
+ t.value.hideClientButton ? s("", !0) : (a(), b(r(Te), {
246
+ key: 0,
247
+ buttonSource: "sidebar",
248
+ integration: t.value._integration,
249
+ isDevelopment: pe,
250
+ url: t.value.url
251
+ }, null, 8, ["integration", "url"]))
252
+ ]),
253
+ _: 1
254
+ })
255
+ ], !0)
256
+ ]),
257
+ _: 3
258
+ }, 8, ["title"])
259
+ ];
260
+ }),
244
261
  _: 3
245
262
  })
246
263
  ])
247
- ], 8, at)) : l("", !0),
248
- ge(p("div", it, [
249
- p("div", ut, [
250
- u(e.$slots, "editor", f(v(m.value)), void 0, !0)
264
+ ], 8, ut)) : s("", !0),
265
+ we(v("div", pt, [
266
+ v("div", vt, [
267
+ u(e.$slots, "editor", g(h(p.value)), void 0, !0)
251
268
  ])
252
269
  ], 512), [
253
- [Se, t.value.isEditable]
270
+ [ke, t.value.isEditable]
254
271
  ]),
255
- ne.value ? (r(), d(V, { key: 1 }, [
256
- p("main", {
257
- "aria-label": `Open API Documentation for ${(C = (k = a(M)) == null ? void 0 : k.info) == null ? void 0 : C.title}`,
272
+ ue.value ? (a(), m(z, { key: 1 }, [
273
+ v("main", {
274
+ "aria-label": `Open API Documentation for ${($ = (C = r(d)) == null ? void 0 : C.info) == null ? void 0 : $.title}`,
258
275
  class: "references-rendered"
259
276
  }, [
260
- c(a(xe), {
277
+ f(r(nt), {
261
278
  layout: t.value.layout,
262
- parsedSpec: a(y)
263
- }, ye({
264
- start: i(() => [
265
- u(e.$slots, "content-start", f(v(m.value)), () => [
266
- t.value.layout === "classic" ? (r(), S(Ve, { key: 0 }, {
267
- "dark-mode-toggle": i(() => [
268
- t.value.hideDarkModeToggle ? l("", !0) : (r(), S(a(Oe), {
279
+ document: r(d),
280
+ parsedSpec: k.value
281
+ }, Ce({
282
+ start: l(() => [
283
+ u(e.$slots, "content-start", g(h(p.value)), () => [
284
+ t.value.layout === "classic" ? (a(), b(ze, { key: 0 }, {
285
+ "dark-mode-toggle": l(() => [
286
+ t.value.hideDarkModeToggle ? s("", !0) : (a(), b(r(Le), {
269
287
  key: 0,
270
288
  class: "text-c-2 hover:text-c-1",
271
289
  mode: e.isDark ? "dark" : "light",
272
290
  style: { transform: "scale(1.4)" },
273
291
  variant: "icon",
274
- onClick: o[2] || (o[2] = (n) => e.$emit("toggleDarkMode"))
292
+ onClick: o[1] || (o[1] = (S) => e.$emit("toggleDarkMode"))
275
293
  }, null, 8, ["mode"]))
276
294
  ]),
277
- default: i(() => [
278
- e.$slots["document-selector"] ? (r(), d("div", ct, [
295
+ default: l(() => [
296
+ e.$slots["document-selector"] ? (a(), m("div", ht, [
279
297
  u(e.$slots, "document-selector", {}, void 0, !0)
280
- ])) : l("", !0),
281
- t.value.hideSearch ? l("", !0) : (r(), S(a(K), {
298
+ ])) : s("", !0),
299
+ t.value.hideSearch ? s("", !0) : (a(), b(r(Q), {
282
300
  key: 1,
283
301
  class: "t-doc__sidebar",
284
302
  searchHotKey: t.value.searchHotKey,
285
- spec: a(y)
303
+ spec: k.value
286
304
  }, null, 8, ["searchHotKey", "spec"]))
287
305
  ]),
288
306
  _: 3
289
- })) : l("", !0)
307
+ })) : s("", !0)
290
308
  ], !0)
291
309
  ]),
292
- end: i(() => [
293
- u(e.$slots, "content-end", f(v(m.value)), void 0, !0)
310
+ end: l(() => [
311
+ u(e.$slots, "content-end", g(h(p.value)), void 0, !0)
294
312
  ]),
295
313
  _: 2
296
314
  }, [
297
- (L = t.value) != null && L.isEditable ? {
315
+ (U = t.value) != null && U.isEditable ? {
298
316
  name: "empty-state",
299
- fn: i(() => {
300
- var n;
317
+ fn: l(() => {
318
+ var S;
301
319
  return [
302
- c(_e, {
303
- theme: ((n = t.value) == null ? void 0 : n.theme) || "default",
304
- onChangeTheme: o[3] || (o[3] = (D) => e.$emit("changeTheme", D)),
305
- onLinkSwaggerFile: o[4] || (o[4] = (D) => e.$emit("linkSwaggerFile")),
306
- onLoadSwaggerFile: o[5] || (o[5] = (D) => e.$emit("loadSwaggerFile")),
307
- onUpdateContent: o[6] || (o[6] = (D) => e.$emit("updateContent", D))
320
+ f(Ge, {
321
+ theme: ((S = t.value) == null ? void 0 : S.theme) || "default",
322
+ onChangeTheme: o[2] || (o[2] = (c) => e.$emit("changeTheme", c)),
323
+ onLinkSwaggerFile: o[3] || (o[3] = (c) => e.$emit("linkSwaggerFile")),
324
+ onLoadSwaggerFile: o[4] || (o[4] = (c) => e.$emit("loadSwaggerFile")),
325
+ onUpdateContent: o[5] || (o[5] = (c) => e.$emit("updateContent", c))
308
326
  }, null, 8, ["theme"])
309
327
  ];
310
328
  }),
311
329
  key: "0"
312
330
  } : void 0
313
- ]), 1032, ["layout", "parsedSpec"])
314
- ], 8, dt),
315
- e.$slots.footer ? (r(), d("div", mt, [
316
- u(e.$slots, "footer", f(v(m.value)), void 0, !0)
317
- ])) : l("", !0)
318
- ], 64)) : l("", !0),
319
- c(a(et), {
331
+ ]), 1032, ["layout", "document", "parsedSpec"])
332
+ ], 8, gt),
333
+ e.$slots.footer ? (a(), m("div", St, [
334
+ u(e.$slots, "footer", g(h(p.value)), void 0, !0)
335
+ ])) : s("", !0)
336
+ ], 64)) : s("", !0),
337
+ f(r(it), {
320
338
  configuration: t.value,
321
- dereferencedDocument: a(M)
339
+ dereferencedDocument: r(d)
322
340
  }, null, 8, ["configuration", "dereferencedDocument"])
323
- ], 38),
324
- c(a(Le))
341
+ ], 6),
342
+ f(r(Ve))
325
343
  ], 64);
326
344
  };
327
345
  }
328
346
  });
329
347
  export {
330
- Gt as default
348
+ qt as default
331
349
  };
@@ -1,5 +1,7 @@
1
+ import type { OpenAPIV3_1 } from '@scalar/openapi-types';
1
2
  import type { Spec } from '@scalar/types/legacy';
2
3
  type __VLS_Props = {
4
+ document: OpenAPIV3_1.Document;
3
5
  parsedSpec: Spec;
4
6
  layout?: 'modern' | 'classic';
5
7
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Content.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Content/Content.vue"],"names":[],"mappings":"AAoRA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAiBhD,KAAK,WAAW,GAAG;IACf,UAAU,EAAE,IAAI,CAAA;IAChB,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;CAC9B,CAAC;AAyDJ,iBAAS,cAAc;WAgOT,OAAO,IAA6B;;uBAVvB,GAAG;+BACM,GAAG;qBACb,GAAG;;;;EAa5B;AA8BD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;YA9TR,QAAQ,GAAG,SAAS;6EAqU/B,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAgBpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"Content.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Content/Content.vue"],"names":[],"mappings":"AAiSA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAehD,KAAK,WAAW,GAAG;IACf,QAAQ,EAAE,WAAW,CAAC,QAAQ,CAAA;IAC9B,UAAU,EAAE,IAAI,CAAA;IAChB,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;CAC9B,CAAC;AAwDJ,iBAAS,cAAc;WA2OT,OAAO,IAA6B;;uBAVvB,GAAG;+BACM,GAAG;qBACb,GAAG;;;;EAa5B;AA4BD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;YAtUR,QAAQ,GAAG,SAAS;6EA6U/B,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAgBpG,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 "./Content.vue2.js";
2
2
  /* empty css */
3
3
  /* empty css */
4
4
  import t from "../../_virtual/_plugin-vue_export-helper.js";
5
- const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-42df8515"]]);
5
+ const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-54b62036"]]);
6
6
  export {
7
- _ as default
7
+ a as default
8
8
  };