@scalar/api-reference 1.35.6 → 1.36.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 (181) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/dist/blocks/helpers/getPointer.d.ts.map +1 -1
  3. package/dist/browser/standalone.js +14463 -14322
  4. package/dist/browser/webpack-stats.json +1 -1
  5. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  6. package/dist/components/ApiReferenceLayout.vue.js +1 -1
  7. package/dist/components/ApiReferenceLayout.vue2.js +148 -150
  8. package/dist/components/Content/Content.vue.d.ts.map +1 -1
  9. package/dist/components/Content/Content.vue.js +44 -51
  10. package/dist/components/Content/Models/ClassicLayout.vue.d.ts +2 -1
  11. package/dist/components/Content/Models/ClassicLayout.vue.d.ts.map +1 -1
  12. package/dist/components/Content/Models/ClassicLayout.vue.js +2 -2
  13. package/dist/components/Content/Models/ClassicLayout.vue2.js +31 -33
  14. package/dist/components/Content/Models/Models.vue.d.ts +2 -2
  15. package/dist/components/Content/Models/Models.vue.d.ts.map +1 -1
  16. package/dist/components/Content/Models/Models.vue.js +24 -23
  17. package/dist/components/Content/Models/ModernLayout.vue.d.ts +1 -0
  18. package/dist/components/Content/Models/ModernLayout.vue.d.ts.map +1 -1
  19. package/dist/components/Content/Models/ModernLayout.vue.js +2 -2
  20. package/dist/components/Content/Models/ModernLayout.vue2.js +40 -41
  21. package/dist/components/Content/Operations/TraversedEntry.vue.d.ts +1 -2
  22. package/dist/components/Content/Operations/TraversedEntry.vue.d.ts.map +1 -1
  23. package/dist/components/Content/Operations/TraversedEntry.vue.js +24 -24
  24. package/dist/components/Content/Operations/TraversedEntryContainer.vue.d.ts.map +1 -1
  25. package/dist/components/Content/Operations/TraversedEntryContainer.vue.js +1 -1
  26. package/dist/components/Content/Operations/get-current-index.d.ts +1 -1
  27. package/dist/components/Content/Operations/get-current-index.d.ts.map +1 -1
  28. package/dist/components/Content/Operations/get-current-index.js +1 -1
  29. package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts.map +1 -1
  30. package/dist/components/Content/Schema/SchemaObjectProperties.vue.js +35 -45
  31. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +1 -1
  32. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  33. package/dist/components/Content/Schema/helpers/sort-property-names.d.ts +16 -0
  34. package/dist/components/Content/Schema/helpers/sort-property-names.d.ts.map +1 -0
  35. package/dist/components/Content/Schema/helpers/sort-property-names.js +36 -0
  36. package/dist/components/Content/Tags/ClassicLayout.vue.d.ts +1 -1
  37. package/dist/components/Content/Tags/ClassicLayout.vue.d.ts.map +1 -1
  38. package/dist/components/Content/Tags/ClassicLayout.vue.js +2 -2
  39. package/dist/components/Content/Tags/ClassicLayout.vue2.js +1 -1
  40. package/dist/components/Content/Tags/ModernLayout.vue.d.ts +1 -1
  41. package/dist/components/Content/Tags/ModernLayout.vue.d.ts.map +1 -1
  42. package/dist/components/Content/Tags/ModernLayout.vue.js +2 -2
  43. package/dist/components/Content/Tags/ModernLayout.vue2.js +2 -2
  44. package/dist/components/Content/Tags/Tag.vue.d.ts +1 -1
  45. package/dist/components/Content/Tags/Tag.vue.d.ts.map +1 -1
  46. package/dist/components/Content/Tags/TagSection.vue.d.ts +1 -1
  47. package/dist/components/Content/Tags/TagSection.vue.d.ts.map +1 -1
  48. package/dist/components/Content/Tags/TagSection.vue.js +4 -4
  49. package/dist/components/Lazy/Lazy.vue.d.ts.map +1 -1
  50. package/dist/components/Lazy/Lazy.vue2.js +2 -2
  51. package/dist/components/MobileHeader.vue.js +2 -2
  52. package/dist/components/MobileHeader.vue2.js +1 -1
  53. package/dist/components/OperationsList/OperationsList.vue.d.ts +1 -1
  54. package/dist/components/OperationsList/OperationsList.vue.d.ts.map +1 -1
  55. package/dist/components/OperationsList/OperationsList.vue.js +1 -1
  56. package/dist/components/OperationsList/OperationsList.vue2.js +9 -11
  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/OperationsList/OperationsListItem.vue2.js +24 -27
  61. package/dist/components/Section/Section.vue.d.ts.map +1 -1
  62. package/dist/components/Section/Section.vue.js +2 -2
  63. package/dist/components/Section/Section.vue2.js +12 -13
  64. package/dist/components/Section/SectionAccordion.vue.d.ts.map +1 -1
  65. package/dist/components/Section/SectionAccordion.vue.js +1 -1
  66. package/dist/components/Section/SectionAccordion.vue2.js +36 -37
  67. package/dist/components/ShowMoreButton.vue.js +2 -2
  68. package/dist/components/ShowMoreButton.vue2.js +3 -3
  69. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  70. package/dist/features/Operation/Operation.vue.js +32 -22
  71. package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
  72. package/dist/features/Operation/components/RequestBody.vue.js +1 -1
  73. package/dist/features/Operation/components/RequestBody.vue2.js +59 -47
  74. package/dist/features/Operation/helpers/get-first-server.d.ts +9 -0
  75. package/dist/features/Operation/helpers/get-first-server.d.ts.map +1 -0
  76. package/dist/features/Operation/helpers/get-first-server.js +20 -0
  77. package/dist/features/Search/components/SearchButton.vue.d.ts +2 -0
  78. package/dist/features/Search/components/SearchButton.vue.d.ts.map +1 -1
  79. package/dist/features/Search/components/SearchButton.vue.js +19 -17
  80. package/dist/features/Search/components/SearchModal.vue.d.ts +2 -1
  81. package/dist/features/Search/components/SearchModal.vue.d.ts.map +1 -1
  82. package/dist/features/Search/components/SearchModal.vue.js +2 -2
  83. package/dist/features/Search/components/SearchModal.vue2.js +74 -75
  84. package/dist/features/Search/helpers/create-search-index.d.ts +2 -2
  85. package/dist/features/Search/helpers/create-search-index.d.ts.map +1 -1
  86. package/dist/features/Search/helpers/create-search-index.js +68 -66
  87. package/dist/features/Search/hooks/useSearchIndex.d.ts +3 -2
  88. package/dist/features/Search/hooks/useSearchIndex.d.ts.map +1 -1
  89. package/dist/features/Search/hooks/useSearchIndex.js +13 -13
  90. package/dist/features/Search/types.d.ts +1 -1
  91. package/dist/features/Search/types.d.ts.map +1 -1
  92. package/dist/features/api-client-modal/useApiClient.d.ts +20 -20
  93. package/dist/features/document-source/hooks/useDocumentSource.d.ts.map +1 -1
  94. package/dist/features/document-source/hooks/useDocumentSource.js +6 -5
  95. package/dist/helpers/test-utils.d.ts +367 -5
  96. package/dist/helpers/test-utils.d.ts.map +1 -1
  97. package/dist/hooks/useNavState.d.ts +1 -15
  98. package/dist/hooks/useNavState.d.ts.map +1 -1
  99. package/dist/hooks/useNavState.js +29 -53
  100. package/dist/index.d.ts +5 -6
  101. package/dist/index.d.ts.map +1 -1
  102. package/dist/index.js +16 -20
  103. package/dist/style.css +1 -1
  104. package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
  105. package/dist/v2/ApiReferenceWorkspace.vue.js +59 -53
  106. package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue.d.ts.map +1 -1
  107. package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue.js +1 -1
  108. package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue2.js +39 -30
  109. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts.map +1 -1
  110. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.js +1 -1
  111. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue2.js +77 -71
  112. package/dist/{features/sidebar/components/Sidebar.vue.d.ts → v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue.d.ts} +1 -1
  113. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue.d.ts.map +1 -0
  114. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue.js +7 -0
  115. package/dist/{features/sidebar/components/Sidebar.vue2.js → v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue2.js} +15 -15
  116. package/dist/{features/sidebar → v2/blocks/scalar-sidebar-block}/components/SidebarElement.vue.d.ts +1 -1
  117. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarElement.vue.d.ts.map +1 -0
  118. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarElement.vue.js +7 -0
  119. package/dist/{features/sidebar → v2/blocks/scalar-sidebar-block}/components/SidebarElement.vue2.js +41 -43
  120. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarGroup.vue.d.ts.map +1 -0
  121. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarGroup.vue.js +7 -0
  122. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarHttpBadge.vue.d.ts.map +1 -0
  123. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarHttpBadge.vue.js +7 -0
  124. package/dist/{features/sidebar → v2/blocks/scalar-sidebar-block}/components/SidebarHttpBadge.vue2.js +1 -1
  125. package/dist/v2/blocks/scalar-sidebar-block/helpers/create-sidebar.d.ts +385 -0
  126. package/dist/v2/blocks/scalar-sidebar-block/helpers/create-sidebar.d.ts.map +1 -0
  127. package/dist/v2/blocks/scalar-sidebar-block/helpers/create-sidebar.js +35 -0
  128. package/dist/v2/blocks/scalar-sidebar-block/helpers/generate-reverse-index.d.ts +189 -0
  129. package/dist/v2/blocks/scalar-sidebar-block/helpers/generate-reverse-index.d.ts.map +1 -0
  130. package/dist/v2/blocks/scalar-sidebar-block/helpers/generate-reverse-index.js +9 -0
  131. package/dist/{features/sidebar → v2/blocks/scalar-sidebar-block}/hooks/useSidebar.d.ts +4 -8
  132. package/dist/v2/blocks/scalar-sidebar-block/hooks/useSidebar.d.ts.map +1 -0
  133. package/dist/v2/blocks/scalar-sidebar-block/hooks/useSidebar.js +18 -0
  134. package/dist/v2/blocks/scalar-sidebar-block/index.d.ts +4 -0
  135. package/dist/v2/blocks/scalar-sidebar-block/index.d.ts.map +1 -0
  136. package/dist/v2/helpers/map-configuration.d.ts.map +1 -1
  137. package/package.json +16 -15
  138. package/dist/features/sidebar/components/Sidebar.vue.d.ts.map +0 -1
  139. package/dist/features/sidebar/components/Sidebar.vue.js +0 -7
  140. package/dist/features/sidebar/components/SidebarElement.vue.d.ts.map +0 -1
  141. package/dist/features/sidebar/components/SidebarElement.vue.js +0 -7
  142. package/dist/features/sidebar/components/SidebarGroup.vue.d.ts.map +0 -1
  143. package/dist/features/sidebar/components/SidebarGroup.vue.js +0 -7
  144. package/dist/features/sidebar/components/SidebarHttpBadge.vue.d.ts.map +0 -1
  145. package/dist/features/sidebar/components/SidebarHttpBadge.vue.js +0 -7
  146. package/dist/features/sidebar/helpers/create-sidebar.d.ts +0 -28
  147. package/dist/features/sidebar/helpers/create-sidebar.d.ts.map +0 -1
  148. package/dist/features/sidebar/helpers/create-sidebar.js +0 -32
  149. package/dist/features/sidebar/hooks/useSidebar.d.ts.map +0 -1
  150. package/dist/features/sidebar/hooks/useSidebar.js +0 -18
  151. package/dist/features/sidebar/index.d.ts +0 -4
  152. package/dist/features/sidebar/index.d.ts.map +0 -1
  153. package/dist/features/traverse-schema/helpers/get-tag.d.ts +0 -6
  154. package/dist/features/traverse-schema/helpers/get-tag.d.ts.map +0 -1
  155. package/dist/features/traverse-schema/helpers/get-tag.js +0 -7
  156. package/dist/features/traverse-schema/helpers/traverse-description.d.ts +0 -11
  157. package/dist/features/traverse-schema/helpers/traverse-description.d.ts.map +0 -1
  158. package/dist/features/traverse-schema/helpers/traverse-description.js +0 -32
  159. package/dist/features/traverse-schema/helpers/traverse-document.d.ts +0 -16
  160. package/dist/features/traverse-schema/helpers/traverse-document.d.ts.map +0 -1
  161. package/dist/features/traverse-schema/helpers/traverse-document.js +0 -33
  162. package/dist/features/traverse-schema/helpers/traverse-paths.d.ts +0 -18
  163. package/dist/features/traverse-schema/helpers/traverse-paths.d.ts.map +0 -1
  164. package/dist/features/traverse-schema/helpers/traverse-paths.js +0 -30
  165. package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts +0 -8
  166. package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts.map +0 -1
  167. package/dist/features/traverse-schema/helpers/traverse-schemas.js +0 -21
  168. package/dist/features/traverse-schema/helpers/traverse-tags.d.ts +0 -11
  169. package/dist/features/traverse-schema/helpers/traverse-tags.d.ts.map +0 -1
  170. package/dist/features/traverse-schema/helpers/traverse-tags.js +0 -43
  171. package/dist/features/traverse-schema/helpers/traverse-webhooks.d.ts +0 -10
  172. package/dist/features/traverse-schema/helpers/traverse-webhooks.d.ts.map +0 -1
  173. package/dist/features/traverse-schema/helpers/traverse-webhooks.js +0 -24
  174. package/dist/features/traverse-schema/index.d.ts +0 -5
  175. package/dist/features/traverse-schema/index.d.ts.map +0 -1
  176. package/dist/features/traverse-schema/types.d.ts +0 -55
  177. package/dist/features/traverse-schema/types.d.ts.map +0 -1
  178. package/dist/libs/markdown.js +0 -18
  179. /package/dist/{features/sidebar → v2/blocks/scalar-sidebar-block}/components/SidebarGroup.vue.d.ts +0 -0
  180. /package/dist/{features/sidebar → v2/blocks/scalar-sidebar-block}/components/SidebarGroup.vue2.js +0 -0
  181. /package/dist/{features/sidebar → v2/blocks/scalar-sidebar-block}/components/SidebarHttpBadge.vue.d.ts +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"ApiReferenceLayout.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiReferenceLayout.vue"],"names":[],"mappings":"AA+qBA,OAAO,EAGL,KAAK,OAAO,EACb,MAAM,gBAAgB,CAAA;AA4BvB,OAAO,KAAK,EACV,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,SAAS,CAAA;AA0ChB,KAAK,WAAW,GAAG;KACd,CAAC,IAAI,mBAAmB,GAAG,CAAC,KAAK,EAAE,kBAAkB,KAAK,GAAG;CAC/D,GAAG;IAAE,mBAAmB,EAAE,GAAG,CAAA;CAAE,CAAC;AA8oBnC,QAAA,MAAM,eAAe;;YA9qBqB,OAAO;eAAS,MAAM;;;;;;;;YAAtB,OAAO;eAAS,MAAM;;;;;;kFAqrB9D,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":"AA0qBA,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;AA0oBnC,QAAA,MAAM,eAAe;;YA1qBqB,OAAO;eAAS,MAAM;;;;;;;;YAAtB,OAAO;eAAS,MAAM;;;;;;kFAirB9D,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 c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-3cb06588"]]);
7
+ const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-27c7b7dd"]]);
8
8
  export {
9
9
  c as default
10
10
  };
@@ -1,41 +1,41 @@
1
- import { defineComponent as x, computed as S, provide as b, ref as k, onBeforeMount as ee, onMounted as te, watch as M, onUnmounted as oe, useId as re, createElementBlock as u, openBlock as a, Fragment as H, createElementVNode as m, createVNode as c, normalizeStyle as ae, normalizeClass as se, unref as r, createCommentVNode as i, withDirectives as ie, createBlock as h, renderSlot as n, normalizeProps as f, guardReactiveProps as v, withCtx as l, vShow as le, createSlots as ne } from "vue";
2
- import { provideUseId as de } from "@headlessui/vue";
3
- import { OpenApiClientButton as ue } from "@scalar/api-client/components";
4
- import { LAYOUT_SYMBOL as ce } from "@scalar/api-client/hooks";
5
- import { WORKSPACE_SYMBOL as me, ACTIVE_ENTITIES_SYMBOL as fe } from "@scalar/api-client/store";
6
- import { addScalarClassesToHeadless as ve, ScalarErrorBoundary as ge, ScalarSidebarFooter as pe, ScalarColorModeToggleButton as he, ScalarColorModeToggleIcon as Se } from "@scalar/components";
7
- import { sleep as be } from "@scalar/helpers/testing/sleep";
8
- import { hasObtrusiveScrollbars as ye, getThemeStyles as we } from "@scalar/themes";
9
- import { apiReferenceConfigurationSchema as ke } from "@scalar/types/api-reference";
10
- import { useBreakpoints as $e } from "@scalar/use-hooks/useBreakpoints";
11
- import { useToasts as Te, ScalarToasts as Me } from "@scalar/use-toasts";
12
- import { useMediaQuery as Ce, useResizeObserver as De, useDebounceFn as Ee } from "@vueuse/core";
13
- import Ie from "./ClassicHeader.vue.js";
14
- import Le from "./GettingStarted.vue.js";
15
- import { hasLazyLoaded as Be } from "./Lazy/lazyBus.js";
1
+ import { defineComponent as Z, computed as g, provide as b, ref as k, onBeforeMount as x, onMounted as ee, watch as D, onUnmounted as te, useId as oe, createElementBlock as u, openBlock as a, Fragment as H, createElementVNode as m, createVNode as c, normalizeStyle as re, normalizeClass as ae, unref as r, createCommentVNode as s, withDirectives as se, createBlock as S, renderSlot as l, normalizeProps as v, guardReactiveProps as f, withCtx as i, vShow as ne, createSlots as ie } from "vue";
2
+ import { provideUseId as le } from "@headlessui/vue";
3
+ import { OpenApiClientButton as de } from "@scalar/api-client/components";
4
+ import { LAYOUT_SYMBOL as ue } from "@scalar/api-client/hooks";
5
+ import { WORKSPACE_SYMBOL as ce, ACTIVE_ENTITIES_SYMBOL as me } from "@scalar/api-client/store";
6
+ import { addScalarClassesToHeadless as ve, ScalarErrorBoundary as fe, ScalarSidebarFooter as pe, ScalarColorModeToggleButton as he, ScalarColorModeToggleIcon as ge } from "@scalar/components";
7
+ import { sleep as Se } from "@scalar/helpers/testing/sleep";
8
+ import { hasObtrusiveScrollbars as be, getThemeStyles as ye } from "@scalar/themes";
9
+ import { apiReferenceConfigurationSchema as we } from "@scalar/types/api-reference";
10
+ import { useBreakpoints as ke } from "@scalar/use-hooks/useBreakpoints";
11
+ import { useToasts as $e, ScalarToasts as Me } from "@scalar/use-toasts";
12
+ import { useMediaQuery as De, useResizeObserver as Te, useDebounceFn as Ce } from "@vueuse/core";
13
+ import Ee from "./ClassicHeader.vue.js";
14
+ import Be from "./GettingStarted.vue.js";
15
+ import { hasLazyLoaded as Le } from "./Lazy/lazyBus.js";
16
16
  import Oe from "./MobileHeader.vue.js";
17
- import { CONFIGURATION_SYMBOL as Re } from "../hooks/useConfig.js";
18
- import { useNavState as _e } from "../hooks/useNavState.js";
17
+ import { CONFIGURATION_SYMBOL as Ie } from "../hooks/useConfig.js";
18
+ import { useNavState as Re } from "../hooks/useNavState.js";
19
19
  import { useLegacyStoreEvents as He } from "../v2/hooks/use-legacy-store-events.js";
20
20
  import { useDocumentSource as Ae } from "../features/document-source/hooks/useDocumentSource.js";
21
- import { useSidebar as Fe } from "../features/sidebar/hooks/useSidebar.js";
21
+ import { useSidebar as Fe } from "../v2/blocks/scalar-sidebar-block/hooks/useSidebar.js";
22
22
  import { PLUGIN_MANAGER_SYMBOL as Pe } from "../plugins/hooks/usePluginManager.js";
23
23
  import { createPluginManager as Ne } from "../plugins/plugin-manager.js";
24
- import Ue from "../features/sidebar/components/Sidebar.vue.js";
24
+ import _e from "../v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue.js";
25
25
  import A from "../features/Search/components/SearchButton.vue.js";
26
- import Ke from "./Content/Content.vue.js";
26
+ import Ue from "./Content/Content.vue.js";
27
27
  /* empty css */
28
- import Ve from "../features/api-client-modal/ApiClientModal.vue.js";
29
- const Ye = ["innerHTML"], ze = { class: "references-header" }, Ge = ["aria-label"], Qe = { class: "references-navigation-list" }, We = { key: 0 }, je = {
28
+ import Ke from "../features/api-client-modal/ApiClientModal.vue.js";
29
+ const Ve = ["innerHTML"], Ye = { class: "references-header" }, ze = ["aria-label"], Ge = { class: "references-navigation-list" }, Qe = { key: 0 }, We = {
30
30
  key: 1,
31
31
  class: "scalar-api-references-standalone-search"
32
- }, qe = { key: 1 }, Je = { class: "references-editor" }, Xe = { class: "references-editor-textarea" }, Ze = ["aria-label"], xe = {
32
+ }, je = { key: 1 }, qe = { class: "references-editor" }, Je = { class: "references-editor-textarea" }, Xe = ["aria-label"], Ze = {
33
33
  key: 0,
34
34
  class: "w-64 *:!p-0 empty:hidden"
35
- }, et = {
35
+ }, xe = {
36
36
  key: 0,
37
37
  class: "references-footer"
38
- }, It = /* @__PURE__ */ x({
38
+ }, Et = /* @__PURE__ */ Z({
39
39
  inheritAttrs: !1,
40
40
  __name: "ApiReferenceLayout",
41
41
  props: {
@@ -47,105 +47,102 @@ const Ye = ["innerHTML"], ze = { class: "references-header" }, Ge = ["aria-label
47
47
  store: {}
48
48
  },
49
49
  emits: ["changeTheme", "updateContent", "loadSwaggerFile", "linkSwaggerFile", "toggleDarkMode"],
50
- setup(y) {
51
- const t = S(
52
- () => ke.parse(y.configuration)
53
- ), { initializeToasts: F, toast: P } = Te();
50
+ setup(p) {
51
+ const t = g(
52
+ () => we.parse(p.configuration)
53
+ ), { initializeToasts: F, toast: P } = $e();
54
54
  F((e) => P(e));
55
- const { dereferencedDocument: g, workspaceStore: C, activeEntitiesStore: D } = Ae({
55
+ const { dereferencedDocument: y, workspaceStore: T, activeEntitiesStore: C } = Ae({
56
56
  configuration: t,
57
- dereferencedDocument: y.dereferencedDocument,
58
- originalDocument: y.originalDocument
57
+ dereferencedDocument: p.dereferencedDocument,
58
+ originalDocument: p.originalDocument
59
59
  });
60
- b(me, C), b(fe, D);
61
- const N = Ce("(min-width: 1150px)"), U = k("100dvh"), p = k(null);
62
- De(p, (e) => {
63
- U.value = e[0] ? e[0].contentRect.height + "px" : "100dvh";
60
+ b(ce, T), b(me, C);
61
+ const N = De("(min-width: 1150px)"), _ = k("100dvh"), h = k(null);
62
+ Te(h, (e) => {
63
+ _.value = e[0] ? e[0].contentRect.height + "px" : "100dvh";
64
64
  });
65
- const K = S(ye), E = _e(t), { isSidebarOpen: $, setCollapsedSidebarItem: T, scrollToOperation: V, items: I } = Fe(g, {
66
- ...E,
67
- config: t
68
- }), {
65
+ const U = g(be), K = Re(t), { isSidebarOpen: $, setCollapsedSidebarItem: E, scrollToOperation: V, items: M } = Fe(p.store), {
69
66
  getReferenceId: Y,
70
67
  getPathRoutingId: z,
71
- getSectionId: G,
72
- getTagId: Q,
73
68
  hash: w,
74
- isIntersectionEnabled: L,
75
- updateHash: B,
76
- replaceUrlState: W
77
- } = E;
69
+ isIntersectionEnabled: B,
70
+ updateHash: L,
71
+ replaceUrlState: G
72
+ } = K;
78
73
  if (t.value.redirect && typeof window < "u") {
79
74
  const e = t.value.redirect(
80
75
  (t.value.pathRouting ? window.location.pathname : "") + window.location.hash
81
76
  );
82
77
  e && history.replaceState({}, "", e);
83
78
  }
84
- ee(() => {
85
- B(), ve();
79
+ x(() => {
80
+ L(), ve();
86
81
  });
87
82
  const O = async (e) => {
88
- L.value = !1, B(), e ? V(e) : p.value?.scrollTo(0, 0), await be(100), L.value = !0;
89
- }, R = k(0);
90
- te(() => {
83
+ B.value = !1, L(), e ? V(e) : h.value?.scrollTo(0, 0), await Se(100), B.value = !0;
84
+ }, I = k(0);
85
+ ee(() => {
91
86
  history.scrollRestoration = "manual";
92
- const e = p.value?.parentElement?.getBoundingClientRect(), o = p.value?.getBoundingClientRect();
87
+ const e = h.value?.parentElement?.getBoundingClientRect(), o = h.value?.getBoundingClientRect();
93
88
  if (e && o) {
94
- const s = o.top - e.top;
95
- R.value = s < 2 ? 0 : s;
89
+ const n = o.top - e.top;
90
+ I.value = n < 2 ? 0 : n;
96
91
  }
97
92
  window.onhashchange = () => {
98
93
  O(Y());
99
- }, window.onpopstate = () => t.value.pathRouting && O(z(window.location.pathname)), window.addEventListener("scroll", _, { passive: !0 });
94
+ }, window.onpopstate = () => t.value.pathRouting && O(z(window.location.pathname)), window.addEventListener("scroll", R, { passive: !0 });
100
95
  });
101
- const j = S(
96
+ const Q = g(
102
97
  () => N.value || !t.value.isEditable
103
- ), _ = Ee(() => {
104
- window.scrollY < 50 && Be.value && W("");
105
- }), q = k(!1);
106
- M(g, (e) => {
107
- if (w.value) {
108
- const o = G(w.value);
109
- o && T(o, !0);
110
- } else if (e.tags?.length) {
111
- const o = e.tags?.[0];
112
- o && T(Q(o), !0);
113
- } else {
114
- const o = I.value.entries.find((s) => "tag" in s);
115
- o && T(o.id, !0);
98
+ ), R = Ce(() => {
99
+ window.scrollY < 50 && Le.value && G("");
100
+ }), W = k(!1);
101
+ D(
102
+ () => p.store.workspace.activeDocument,
103
+ () => {
104
+ if (w.value) {
105
+ const e = M.value.entities.get(w.value), o = e?.parent?.id ?? e?.id;
106
+ o && E(o, !0);
107
+ } else {
108
+ const e = M.value.entries.find((o) => o.type === "tag");
109
+ e && E(e.id, !0);
110
+ }
111
+ W.value = !0;
116
112
  }
117
- q.value = !0;
118
- });
119
- const d = S(() => ({
120
- breadcrumb: I.value?.titles.get(w.value) ?? ""
113
+ );
114
+ const j = g(
115
+ () => M.value.entities?.get(w.value)?.title ?? ""
116
+ ), d = g(() => ({
117
+ breadcrumb: j.value
121
118
  }));
122
- oe(() => {
123
- window.removeEventListener("scroll", _);
124
- }), de(() => re()), b(ce, "modal"), b(Re, t), b(
119
+ te(() => {
120
+ window.removeEventListener("scroll", R);
121
+ }), le(() => oe()), b(ue, "modal"), b(Ie, t), b(
125
122
  Pe,
126
123
  Ne({
127
124
  plugins: t.value.plugins
128
125
  })
129
126
  );
130
- const J = S(
127
+ const q = g(
131
128
  () => `<style>
132
- ${we(t.value.theme, {
129
+ ${ye(t.value.theme, {
133
130
  fonts: t.value.withDefaultFonts
134
131
  })}</style>`
135
- ), { mediaQueries: X } = $e(), Z = !1;
136
- return M(X.lg, (e, o) => {
132
+ ), { mediaQueries: J } = ke(), X = !1;
133
+ return D(J.lg, (e, o) => {
137
134
  o && !e && ($.value = !1);
138
- }), M(w, (e, o) => {
135
+ }), D(w, (e, o) => {
139
136
  e && e !== o && ($.value = !1);
140
- }), He(y.store, C, D, p), (e, o) => (a(), u(H, null, [
141
- m("div", { innerHTML: J.value }, null, 8, Ye),
137
+ }), He(p.store, T, C, h), (e, o) => (a(), u(H, null, [
138
+ m("div", { innerHTML: q.value }, null, 8, Ve),
142
139
  m("div", {
143
140
  ref_key: "documentEl",
144
- ref: p,
145
- class: se(["scalar-app scalar-api-reference references-layout", [
141
+ ref: h,
142
+ class: ae(["scalar-app scalar-api-reference references-layout", [
146
143
  {
147
144
  "scalar-api-references-standalone-mobile": t.value.showSidebar ?? !0,
148
- "scalar-scrollbars-obtrusive": K.value,
145
+ "scalar-scrollbars-obtrusive": U.value,
149
146
  "references-editable": t.value.isEditable,
150
147
  "references-sidebar": t.value.showSidebar,
151
148
  "references-sidebar-mobile-open": r($),
@@ -153,56 +150,57 @@ const Ye = ["innerHTML"], ze = { class: "references-header" }, Ge = ["aria-label
153
150
  },
154
151
  e.$attrs.class
155
152
  ]]),
156
- style: ae({
157
- "--scalar-y-offset": `var(--scalar-custom-header-height, ${R.value}px)`
153
+ style: re({
154
+ "--scalar-y-offset": `var(--scalar-custom-header-height, ${I.value}px)`
158
155
  })
159
156
  }, [
160
- m("div", ze, [
161
- t.value.layout === "modern" && (t.value.showSidebar ?? !0) ? (a(), h(Oe, {
157
+ m("div", Ye, [
158
+ t.value.layout === "modern" && (t.value.showSidebar ?? !0) ? (a(), S(Oe, {
162
159
  key: 0,
163
160
  breadcrumb: d.value.breadcrumb
164
- }, null, 8, ["breadcrumb"])) : i("", !0),
165
- n(e.$slots, "header", f(v(d.value)), void 0, !0)
161
+ }, null, 8, ["breadcrumb"])) : s("", !0),
162
+ l(e.$slots, "header", v(f(d.value)), void 0, !0)
166
163
  ]),
167
164
  t.value.showSidebar ? (a(), u("aside", {
168
165
  key: 0,
169
- "aria-label": `Sidebar for ${r(g)?.info?.title}`,
166
+ "aria-label": `Sidebar for ${r(y)?.info?.title}`,
170
167
  class: "references-navigation t-doc__sidebar"
171
168
  }, [
172
- m("div", Qe, [
173
- c(r(ge), null, {
174
- default: l(() => [
175
- c(r(Ue), {
176
- title: r(g)?.info?.title ?? "The OpenAPI Schema"
169
+ m("div", Ge, [
170
+ c(r(fe), null, {
171
+ default: i(() => [
172
+ c(r(_e), {
173
+ title: r(y)?.info?.title ?? "The OpenAPI Schema"
177
174
  }, {
178
- "sidebar-start": l(() => [
179
- e.$slots["document-selector"] ? (a(), u("div", We, [
180
- n(e.$slots, "document-selector", {}, void 0, !0)
181
- ])) : i("", !0),
182
- t.value.hideSearch ? i("", !0) : (a(), u("div", je, [
175
+ "sidebar-start": i(() => [
176
+ e.$slots["document-selector"] ? (a(), u("div", Qe, [
177
+ l(e.$slots, "document-selector", {}, void 0, !0)
178
+ ])) : s("", !0),
179
+ t.value.hideSearch ? s("", !0) : (a(), u("div", We, [
183
180
  c(r(A), {
181
+ document: e.store.workspace.activeDocument,
184
182
  hideModels: t.value?.hideModels,
185
183
  searchHotKey: t.value?.searchHotKey
186
- }, null, 8, ["hideModels", "searchHotKey"])
184
+ }, null, 8, ["document", "hideModels", "searchHotKey"])
187
185
  ])),
188
- n(e.$slots, "sidebar-start", f(v(d.value)), void 0, !0)
186
+ l(e.$slots, "sidebar-start", v(f(d.value)), void 0, !0)
189
187
  ]),
190
- "sidebar-end": l(() => [
191
- n(e.$slots, "sidebar-end", f(v(d.value)), () => [
188
+ "sidebar-end": i(() => [
189
+ l(e.$slots, "sidebar-end", v(f(d.value)), () => [
192
190
  c(r(pe), { class: "darklight-reference" }, {
193
- toggle: l(() => [
194
- t.value.hideDarkModeToggle ? (a(), u("span", qe)) : (a(), h(r(he), {
191
+ toggle: i(() => [
192
+ t.value.hideDarkModeToggle ? (a(), u("span", je)) : (a(), S(r(he), {
195
193
  key: 0,
196
194
  modelValue: e.isDark,
197
- "onUpdate:modelValue": o[0] || (o[0] = (s) => e.$emit("toggleDarkMode"))
195
+ "onUpdate:modelValue": o[0] || (o[0] = (n) => e.$emit("toggleDarkMode"))
198
196
  }, null, 8, ["modelValue"]))
199
197
  ]),
200
- default: l(() => [
201
- t.value.hideClientButton ? i("", !0) : (a(), h(r(ue), {
198
+ default: i(() => [
199
+ t.value.hideClientButton ? s("", !0) : (a(), S(r(de), {
202
200
  key: 0,
203
201
  buttonSource: "sidebar",
204
202
  integration: t.value._integration,
205
- isDevelopment: Z,
203
+ isDevelopment: X,
206
204
  url: t.value.url
207
205
  }, null, 8, ["integration", "url"]))
208
206
  ]),
@@ -216,41 +214,41 @@ const Ye = ["innerHTML"], ze = { class: "references-header" }, Ge = ["aria-label
216
214
  _: 3
217
215
  })
218
216
  ])
219
- ], 8, Ge)) : i("", !0),
220
- ie(m("div", Je, [
221
- m("div", Xe, [
222
- n(e.$slots, "editor", f(v(d.value)), void 0, !0)
217
+ ], 8, ze)) : s("", !0),
218
+ se(m("div", qe, [
219
+ m("div", Je, [
220
+ l(e.$slots, "editor", v(f(d.value)), void 0, !0)
223
221
  ])
224
222
  ], 512), [
225
- [le, t.value.isEditable]
223
+ [ne, t.value.isEditable]
226
224
  ]),
227
- j.value ? (a(), u(H, { key: 1 }, [
225
+ Q.value ? (a(), u(H, { key: 1 }, [
228
226
  m("main", {
229
- "aria-label": `Open API Documentation for ${r(g)?.info?.title}`,
227
+ "aria-label": `Open API Documentation for ${r(y)?.info?.title}`,
230
228
  class: "references-rendered"
231
229
  }, [
232
- c(r(Ke), {
230
+ c(r(Ue), {
233
231
  config: t.value,
234
232
  store: e.store
235
- }, ne({
236
- start: l(() => [
237
- n(e.$slots, "content-start", f(v(d.value)), void 0, !0),
238
- t.value.layout === "classic" ? (a(), h(Ie, { key: 0 }, {
239
- "dark-mode-toggle": l(() => [
240
- t.value.hideDarkModeToggle ? i("", !0) : (a(), h(r(Se), {
233
+ }, ie({
234
+ start: i(() => [
235
+ l(e.$slots, "content-start", v(f(d.value)), void 0, !0),
236
+ t.value.layout === "classic" ? (a(), S(Ee, { key: 0 }, {
237
+ "dark-mode-toggle": i(() => [
238
+ t.value.hideDarkModeToggle ? s("", !0) : (a(), S(r(ge), {
241
239
  key: 0,
242
240
  class: "text-c-2 hover:text-c-1",
243
241
  mode: e.isDark ? "dark" : "light",
244
242
  style: { transform: "scale(1.4)" },
245
243
  variant: "icon",
246
- onClick: o[1] || (o[1] = (s) => e.$emit("toggleDarkMode"))
244
+ onClick: o[1] || (o[1] = (n) => e.$emit("toggleDarkMode"))
247
245
  }, null, 8, ["mode"]))
248
246
  ]),
249
- default: l(() => [
250
- e.$slots["document-selector"] ? (a(), u("div", xe, [
251
- n(e.$slots, "document-selector", {}, void 0, !0)
252
- ])) : i("", !0),
253
- t.value.hideSearch ? i("", !0) : (a(), h(r(A), {
247
+ default: i(() => [
248
+ e.$slots["document-selector"] ? (a(), u("div", Ze, [
249
+ l(e.$slots, "document-selector", {}, void 0, !0)
250
+ ])) : s("", !0),
251
+ t.value.hideSearch ? s("", !0) : (a(), S(r(A), {
254
252
  key: 1,
255
253
  class: "t-doc__sidebar max-w-64",
256
254
  hideModels: t.value?.hideModels,
@@ -258,35 +256,35 @@ const Ye = ["innerHTML"], ze = { class: "references-header" }, Ge = ["aria-label
258
256
  }, null, 8, ["hideModels", "searchHotKey"]))
259
257
  ]),
260
258
  _: 3
261
- })) : i("", !0)
259
+ })) : s("", !0)
262
260
  ]),
263
- end: l(() => [
264
- n(e.$slots, "content-end", f(v(d.value)), void 0, !0)
261
+ end: i(() => [
262
+ l(e.$slots, "content-end", v(f(d.value)), void 0, !0)
265
263
  ]),
266
264
  _: 2
267
265
  }, [
268
266
  t.value?.isEditable ? {
269
267
  name: "empty-state",
270
- fn: l(() => [
271
- c(Le, {
268
+ fn: i(() => [
269
+ c(Be, {
272
270
  theme: t.value?.theme || "default",
273
- onChangeTheme: o[2] || (o[2] = (s) => e.$emit("changeTheme", s)),
274
- onLinkSwaggerFile: o[3] || (o[3] = (s) => e.$emit("linkSwaggerFile")),
275
- onLoadSwaggerFile: o[4] || (o[4] = (s) => e.$emit("loadSwaggerFile")),
276
- onUpdateContent: o[5] || (o[5] = (s) => e.$emit("updateContent", s))
271
+ onChangeTheme: o[2] || (o[2] = (n) => e.$emit("changeTheme", n)),
272
+ onLinkSwaggerFile: o[3] || (o[3] = (n) => e.$emit("linkSwaggerFile")),
273
+ onLoadSwaggerFile: o[4] || (o[4] = (n) => e.$emit("loadSwaggerFile")),
274
+ onUpdateContent: o[5] || (o[5] = (n) => e.$emit("updateContent", n))
277
275
  }, null, 8, ["theme"])
278
276
  ]),
279
277
  key: "0"
280
278
  } : void 0
281
279
  ]), 1032, ["config", "store"])
282
- ], 8, Ze),
283
- e.$slots.footer ? (a(), u("div", et, [
284
- n(e.$slots, "footer", f(v(d.value)), void 0, !0)
285
- ])) : i("", !0)
286
- ], 64)) : i("", !0),
287
- c(r(Ve), {
280
+ ], 8, Xe),
281
+ e.$slots.footer ? (a(), u("div", xe, [
282
+ l(e.$slots, "footer", v(f(d.value)), void 0, !0)
283
+ ])) : s("", !0)
284
+ ], 64)) : s("", !0),
285
+ c(r(Ke), {
288
286
  configuration: t.value,
289
- dereferencedDocument: r(g)
287
+ dereferencedDocument: r(y)
290
288
  }, null, 8, ["configuration", "dereferencedDocument"])
291
289
  ], 6),
292
290
  c(r(Me))
@@ -294,5 +292,5 @@ const Ye = ["innerHTML"], ze = { class: "references-header" }, Ge = ["aria-label
294
292
  }
295
293
  });
296
294
  export {
297
- It as default
295
+ Et as default
298
296
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Content.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Content/Content.vue"],"names":[],"mappings":"AA4MA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAmBpE,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,yBAAyB,CAAA;IACjC,KAAK,EAAE,cAAc,CAAA;CACtB,CAAC;AAwUF,QAAA,IAAI,OAAO,IAAU,EAAE,QAAQ,IAAW,EAAE,QAAQ,IAAY,CAAE;AAClE,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAC1C;IAAE,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GACnD;IAAE,GAAG,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAuC5C,QAAA,MAAM,eAAe,kSAMnB,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":"Content.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Content/Content.vue"],"names":[],"mappings":"AAoMA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAkBpE,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,yBAAyB,CAAA;IACjC,KAAK,EAAE,cAAc,CAAA;CACtB,CAAC;AAiUF,QAAA,IAAI,OAAO,IAAU,EAAE,QAAQ,IAAW,EAAE,QAAQ,IAAY,CAAE;AAClE,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAC1C;IAAE,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GACnD;IAAE,GAAG,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAuC5C,QAAA,MAAM,eAAe,kSAMnB,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"}