@scalar/api-reference 1.35.7 → 1.36.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 (194) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/dist/browser/standalone.js +14984 -15007
  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 +148 -150
  7. package/dist/components/Content/Content.vue.d.ts.map +1 -1
  8. package/dist/components/Content/Content.vue.js +44 -51
  9. package/dist/components/Content/Models/ClassicLayout.vue.d.ts +4 -1
  10. package/dist/components/Content/Models/ClassicLayout.vue.d.ts.map +1 -1
  11. package/dist/components/Content/Models/ClassicLayout.vue.js +1 -1
  12. package/dist/components/Content/Models/ClassicLayout.vue2.js +49 -40
  13. package/dist/components/Content/Models/Models.vue.d.ts +2 -2
  14. package/dist/components/Content/Models/Models.vue.d.ts.map +1 -1
  15. package/dist/components/Content/Models/Models.vue.js +25 -23
  16. package/dist/components/Content/Models/ModernLayout.vue.d.ts +1 -0
  17. package/dist/components/Content/Models/ModernLayout.vue.d.ts.map +1 -1
  18. package/dist/components/Content/Models/ModernLayout.vue.js +2 -2
  19. package/dist/components/Content/Models/ModernLayout.vue2.js +54 -51
  20. package/dist/components/Content/Operations/TraversedEntry.vue.d.ts +1 -2
  21. package/dist/components/Content/Operations/TraversedEntry.vue.d.ts.map +1 -1
  22. package/dist/components/Content/Operations/TraversedEntry.vue.js +24 -24
  23. package/dist/components/Content/Operations/TraversedEntryContainer.vue.d.ts.map +1 -1
  24. package/dist/components/Content/Operations/TraversedEntryContainer.vue.js +1 -1
  25. package/dist/components/Content/Operations/get-current-index.d.ts +1 -1
  26. package/dist/components/Content/Operations/get-current-index.d.ts.map +1 -1
  27. package/dist/components/Content/Operations/get-current-index.js +1 -1
  28. package/dist/components/Content/Schema/Schema.vue.d.ts +3 -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 +72 -75
  32. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts +4 -5
  33. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
  34. package/dist/components/Content/Schema/SchemaComposition.vue.js +46 -49
  35. package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts +2 -7
  36. package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts.map +1 -1
  37. package/dist/components/Content/Schema/SchemaObjectProperties.vue.js +33 -54
  38. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +4 -6
  39. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  40. package/dist/components/Content/Schema/SchemaProperty.vue.js +2 -2
  41. package/dist/components/Content/Schema/SchemaProperty.vue2.js +72 -76
  42. package/dist/components/Content/Schema/helpers/sort-property-names.d.ts +16 -0
  43. package/dist/components/Content/Schema/helpers/sort-property-names.d.ts.map +1 -0
  44. package/dist/components/Content/Schema/helpers/sort-property-names.js +36 -0
  45. package/dist/components/Content/Schema/types.d.ts +17 -0
  46. package/dist/components/Content/Schema/types.d.ts.map +1 -0
  47. package/dist/components/Content/Tags/ClassicLayout.vue.d.ts +1 -1
  48. package/dist/components/Content/Tags/ClassicLayout.vue.d.ts.map +1 -1
  49. package/dist/components/Content/Tags/ClassicLayout.vue.js +2 -2
  50. package/dist/components/Content/Tags/ClassicLayout.vue2.js +1 -1
  51. package/dist/components/Content/Tags/ModernLayout.vue.d.ts +1 -1
  52. package/dist/components/Content/Tags/ModernLayout.vue.d.ts.map +1 -1
  53. package/dist/components/Content/Tags/ModernLayout.vue.js +2 -2
  54. package/dist/components/Content/Tags/ModernLayout.vue2.js +2 -2
  55. package/dist/components/Content/Tags/Tag.vue.d.ts +1 -1
  56. package/dist/components/Content/Tags/Tag.vue.d.ts.map +1 -1
  57. package/dist/components/Content/Tags/TagSection.vue.d.ts +1 -1
  58. package/dist/components/Content/Tags/TagSection.vue.d.ts.map +1 -1
  59. package/dist/components/Content/Tags/TagSection.vue.js +4 -4
  60. package/dist/components/MobileHeader.vue.js +2 -2
  61. package/dist/components/MobileHeader.vue2.js +1 -1
  62. package/dist/components/OperationsList/OperationsList.vue.d.ts +1 -1
  63. package/dist/components/OperationsList/OperationsList.vue.d.ts.map +1 -1
  64. package/dist/components/OperationsList/OperationsList.vue.js +1 -1
  65. package/dist/components/OperationsList/OperationsList.vue2.js +9 -11
  66. package/dist/components/OperationsList/OperationsListItem.vue.d.ts +1 -1
  67. package/dist/components/OperationsList/OperationsListItem.vue.d.ts.map +1 -1
  68. package/dist/components/OperationsList/OperationsListItem.vue.js +2 -2
  69. package/dist/components/OperationsList/OperationsListItem.vue2.js +24 -27
  70. package/dist/components/Section/Section.vue.d.ts.map +1 -1
  71. package/dist/components/Section/Section.vue.js +2 -2
  72. package/dist/components/Section/Section.vue2.js +12 -13
  73. package/dist/components/Section/SectionAccordion.vue.d.ts.map +1 -1
  74. package/dist/components/Section/SectionAccordion.vue.js +1 -1
  75. package/dist/components/Section/SectionAccordion.vue2.js +36 -37
  76. package/dist/components/ShowMoreButton.vue.js +2 -2
  77. package/dist/components/ShowMoreButton.vue2.js +3 -3
  78. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  79. package/dist/features/Operation/Operation.vue.js +32 -22
  80. package/dist/features/Operation/components/Header.vue.d.ts +2 -0
  81. package/dist/features/Operation/components/Header.vue.d.ts.map +1 -1
  82. package/dist/features/Operation/components/Header.vue.js +15 -10
  83. package/dist/features/Operation/components/Headers.vue.d.ts +2 -0
  84. package/dist/features/Operation/components/Headers.vue.d.ts.map +1 -1
  85. package/dist/features/Operation/components/Headers.vue.js +1 -1
  86. package/dist/features/Operation/components/Headers.vue2.js +23 -21
  87. package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
  88. package/dist/features/Operation/components/ParameterListItem.vue.js +2 -2
  89. package/dist/features/Operation/components/ParameterListItem.vue2.js +55 -48
  90. package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
  91. package/dist/features/Operation/components/RequestBody.vue.js +1 -1
  92. package/dist/features/Operation/components/RequestBody.vue2.js +74 -49
  93. package/dist/features/Operation/helpers/get-first-server.d.ts +9 -0
  94. package/dist/features/Operation/helpers/get-first-server.d.ts.map +1 -0
  95. package/dist/features/Operation/helpers/get-first-server.js +20 -0
  96. package/dist/features/Search/components/SearchButton.vue.d.ts +2 -0
  97. package/dist/features/Search/components/SearchButton.vue.d.ts.map +1 -1
  98. package/dist/features/Search/components/SearchButton.vue.js +19 -17
  99. package/dist/features/Search/components/SearchModal.vue.d.ts +2 -1
  100. package/dist/features/Search/components/SearchModal.vue.d.ts.map +1 -1
  101. package/dist/features/Search/components/SearchModal.vue.js +2 -2
  102. package/dist/features/Search/components/SearchModal.vue2.js +74 -75
  103. package/dist/features/Search/helpers/create-search-index.d.ts +2 -2
  104. package/dist/features/Search/helpers/create-search-index.d.ts.map +1 -1
  105. package/dist/features/Search/helpers/create-search-index.js +68 -66
  106. package/dist/features/Search/hooks/useSearchIndex.d.ts +3 -2
  107. package/dist/features/Search/hooks/useSearchIndex.d.ts.map +1 -1
  108. package/dist/features/Search/hooks/useSearchIndex.js +13 -13
  109. package/dist/features/Search/types.d.ts +1 -1
  110. package/dist/features/Search/types.d.ts.map +1 -1
  111. package/dist/features/api-client-modal/useApiClient.d.ts +40 -40
  112. package/dist/features/api-client-modal/useApiClient.d.ts.map +1 -1
  113. package/dist/helpers/convert-security-scheme.d.ts +1 -1
  114. package/dist/helpers/test-utils.d.ts +367 -5
  115. package/dist/helpers/test-utils.d.ts.map +1 -1
  116. package/dist/hooks/useNavState.d.ts +1 -15
  117. package/dist/hooks/useNavState.d.ts.map +1 -1
  118. package/dist/hooks/useNavState.js +29 -53
  119. package/dist/index.d.ts +5 -6
  120. package/dist/index.d.ts.map +1 -1
  121. package/dist/index.js +16 -20
  122. package/dist/style.css +1 -1
  123. package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.d.ts.map +1 -1
  124. package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.js +5 -6
  125. package/dist/{features/sidebar/components/Sidebar.vue.d.ts → v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue.d.ts} +1 -1
  126. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue.d.ts.map +1 -0
  127. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue.js +7 -0
  128. package/dist/{features/sidebar/components/Sidebar.vue2.js → v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue2.js} +15 -15
  129. package/dist/{features/sidebar → v2/blocks/scalar-sidebar-block}/components/SidebarElement.vue.d.ts +1 -1
  130. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarElement.vue.d.ts.map +1 -0
  131. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarElement.vue.js +7 -0
  132. package/dist/{features/sidebar → v2/blocks/scalar-sidebar-block}/components/SidebarElement.vue2.js +41 -43
  133. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarGroup.vue.d.ts.map +1 -0
  134. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarGroup.vue.js +7 -0
  135. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarHttpBadge.vue.d.ts.map +1 -0
  136. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarHttpBadge.vue.js +7 -0
  137. package/dist/{features/sidebar → v2/blocks/scalar-sidebar-block}/components/SidebarHttpBadge.vue2.js +1 -1
  138. package/dist/v2/blocks/scalar-sidebar-block/helpers/create-sidebar.d.ts +385 -0
  139. package/dist/v2/blocks/scalar-sidebar-block/helpers/create-sidebar.d.ts.map +1 -0
  140. package/dist/v2/blocks/scalar-sidebar-block/helpers/create-sidebar.js +35 -0
  141. package/dist/v2/blocks/scalar-sidebar-block/helpers/generate-reverse-index.d.ts +189 -0
  142. package/dist/v2/blocks/scalar-sidebar-block/helpers/generate-reverse-index.d.ts.map +1 -0
  143. package/dist/v2/blocks/scalar-sidebar-block/helpers/generate-reverse-index.js +9 -0
  144. package/dist/{features/sidebar → v2/blocks/scalar-sidebar-block}/hooks/useSidebar.d.ts +4 -8
  145. package/dist/v2/blocks/scalar-sidebar-block/hooks/useSidebar.d.ts.map +1 -0
  146. package/dist/v2/blocks/scalar-sidebar-block/hooks/useSidebar.js +18 -0
  147. package/dist/v2/blocks/scalar-sidebar-block/index.d.ts +4 -0
  148. package/dist/v2/blocks/scalar-sidebar-block/index.d.ts.map +1 -0
  149. package/dist/v2/helpers/map-configuration.d.ts.map +1 -1
  150. package/package.json +11 -11
  151. package/dist/features/sidebar/components/Sidebar.vue.d.ts.map +0 -1
  152. package/dist/features/sidebar/components/Sidebar.vue.js +0 -7
  153. package/dist/features/sidebar/components/SidebarElement.vue.d.ts.map +0 -1
  154. package/dist/features/sidebar/components/SidebarElement.vue.js +0 -7
  155. package/dist/features/sidebar/components/SidebarGroup.vue.d.ts.map +0 -1
  156. package/dist/features/sidebar/components/SidebarGroup.vue.js +0 -7
  157. package/dist/features/sidebar/components/SidebarHttpBadge.vue.d.ts.map +0 -1
  158. package/dist/features/sidebar/components/SidebarHttpBadge.vue.js +0 -7
  159. package/dist/features/sidebar/helpers/create-sidebar.d.ts +0 -28
  160. package/dist/features/sidebar/helpers/create-sidebar.d.ts.map +0 -1
  161. package/dist/features/sidebar/helpers/create-sidebar.js +0 -32
  162. package/dist/features/sidebar/hooks/useSidebar.d.ts.map +0 -1
  163. package/dist/features/sidebar/hooks/useSidebar.js +0 -18
  164. package/dist/features/sidebar/index.d.ts +0 -4
  165. package/dist/features/sidebar/index.d.ts.map +0 -1
  166. package/dist/features/traverse-schema/helpers/get-tag.d.ts +0 -6
  167. package/dist/features/traverse-schema/helpers/get-tag.d.ts.map +0 -1
  168. package/dist/features/traverse-schema/helpers/get-tag.js +0 -7
  169. package/dist/features/traverse-schema/helpers/traverse-description.d.ts +0 -11
  170. package/dist/features/traverse-schema/helpers/traverse-description.d.ts.map +0 -1
  171. package/dist/features/traverse-schema/helpers/traverse-description.js +0 -32
  172. package/dist/features/traverse-schema/helpers/traverse-document.d.ts +0 -16
  173. package/dist/features/traverse-schema/helpers/traverse-document.d.ts.map +0 -1
  174. package/dist/features/traverse-schema/helpers/traverse-document.js +0 -33
  175. package/dist/features/traverse-schema/helpers/traverse-paths.d.ts +0 -18
  176. package/dist/features/traverse-schema/helpers/traverse-paths.d.ts.map +0 -1
  177. package/dist/features/traverse-schema/helpers/traverse-paths.js +0 -30
  178. package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts +0 -8
  179. package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts.map +0 -1
  180. package/dist/features/traverse-schema/helpers/traverse-schemas.js +0 -21
  181. package/dist/features/traverse-schema/helpers/traverse-tags.d.ts +0 -11
  182. package/dist/features/traverse-schema/helpers/traverse-tags.d.ts.map +0 -1
  183. package/dist/features/traverse-schema/helpers/traverse-tags.js +0 -43
  184. package/dist/features/traverse-schema/helpers/traverse-webhooks.d.ts +0 -10
  185. package/dist/features/traverse-schema/helpers/traverse-webhooks.d.ts.map +0 -1
  186. package/dist/features/traverse-schema/helpers/traverse-webhooks.js +0 -24
  187. package/dist/features/traverse-schema/index.d.ts +0 -5
  188. package/dist/features/traverse-schema/index.d.ts.map +0 -1
  189. package/dist/features/traverse-schema/types.d.ts +0 -55
  190. package/dist/features/traverse-schema/types.d.ts.map +0 -1
  191. package/dist/libs/markdown.js +0 -18
  192. /package/dist/{features/sidebar → v2/blocks/scalar-sidebar-block}/components/SidebarGroup.vue.d.ts +0 -0
  193. /package/dist/{features/sidebar → v2/blocks/scalar-sidebar-block}/components/SidebarGroup.vue2.js +0 -0
  194. /package/dist/{features/sidebar → v2/blocks/scalar-sidebar-block}/components/SidebarHttpBadge.vue.d.ts +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"get-secrets.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-request-example-block/helpers/get-secrets.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8DAA8D,CAAA;AAGxG,4CAA4C;AAC5C,eAAO,MAAM,UAAU,GAAI,iBAAiB,oBAAoB,EAAE,KAAG,MAAM,EAqBrD,CAAA"}
1
+ {"version":3,"file":"get-secrets.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-request-example-block/helpers/get-secrets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8DAA8D,CAAA;AAGxG,4CAA4C;AAC5C,eAAO,MAAM,UAAU,GAAI,iBAAiB,oBAAoB,EAAE,KAAG,MAAM,EAqBvD,CAAA"}
@@ -1,11 +1,10 @@
1
- import { isDefined as e } from "@scalar/helpers/array/is-defined";
2
- import { encode as s } from "js-base64";
3
- const p = (t) => t.flatMap((r) => r.type === "apiKey" ? r["x-scalar-secret-token"] : r?.type === "http" ? [
1
+ import { encode as e } from "js-base64";
2
+ const l = (t) => t.flatMap((r) => r.type === "apiKey" ? r["x-scalar-secret-token"] : r?.type === "http" ? [
4
3
  r["x-scalar-secret-token"],
5
4
  r["x-scalar-secret-username"],
6
5
  r["x-scalar-secret-password"],
7
- s(`${r["x-scalar-secret-username"]}:${r["x-scalar-secret-password"]}`)
8
- ] : r.type === "oauth2" ? Object.values(r.flows).map((a) => a["x-scalar-secret-token"]) : []).filter(e);
6
+ e(`${r["x-scalar-secret-username"]}:${r["x-scalar-secret-password"]}`)
7
+ ] : r.type === "oauth2" ? Object.values(r.flows).map((a) => a["x-scalar-secret-token"]) : []).filter(Boolean);
9
8
  export {
10
- p as getSecrets
9
+ l as getSecrets
11
10
  };
@@ -15,4 +15,4 @@ type __VLS_WithSlots<T, S> = T & {
15
15
  $slots: S;
16
16
  };
17
17
  };
18
- //# sourceMappingURL=Sidebar.vue.d.ts.map
18
+ //# sourceMappingURL=SidebarBlock.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SidebarBlock.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue"],"names":[],"mappings":"AAiRA,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;CACd,CAAC;AAoSF,QAAA,IAAI,OAAO,IAAU,EAAE,QAAQ,IAAY,CAAE;AAC7C,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GACpD;IAAE,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AA8BtD,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"}
@@ -0,0 +1,7 @@
1
+ import o from "./SidebarBlock.vue2.js";
2
+ /* empty css */
3
+ import a from "../../../../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ a(o, [["__scopeId", "data-v-75a8a2ea"]]);
5
+ export {
6
+ m as default
7
+ };
@@ -1,16 +1,16 @@
1
- import { defineComponent as B, ref as y, watch as N, onMounted as L, onUnmounted as F, createElementBlock as n, openBlock as i, renderSlot as T, createElementVNode as C, createVNode as G, withCtx as v, Fragment as d, renderList as m, unref as a, createBlock as u, toDisplayString as V, createCommentVNode as A } from "vue";
1
+ import { defineComponent as O, ref as y, watch as N, onMounted as L, onUnmounted as F, createElementBlock as n, openBlock as i, renderSlot as T, createElementVNode as C, createVNode as G, withCtx as v, Fragment as d, renderList as m, unref as a, createBlock as u, toDisplayString as V, createCommentVNode as A } from "vue";
2
2
  import { sleep as $ } from "@scalar/helpers/testing/sleep";
3
- import { useNavState as M } from "../../../hooks/useNavState.js";
4
- import { useSidebar as D } from "../hooks/useSidebar.js";
3
+ import { useNavState as M } from "../../../../hooks/useNavState.js";
4
+ import { useSidebar as x } from "../hooks/useSidebar.js";
5
5
  import h from "./SidebarElement.vue.js";
6
6
  import _ from "./SidebarGroup.vue.js";
7
- const H = { class: "sidebar" }, R = ["aria-label"], U = { class: "sidebar-group-title" }, j = -160, W = /* @__PURE__ */ B({
8
- __name: "Sidebar",
7
+ const D = { class: "sidebar" }, H = ["aria-label"], R = { class: "sidebar-group-title" }, U = -160, W = /* @__PURE__ */ O({
8
+ __name: "SidebarBlock",
9
9
  props: {
10
10
  title: {}
11
11
  },
12
- setup(q) {
13
- const { hash: o, isIntersectionEnabled: w } = M(), { items: I, toggleCollapsedSidebarItem: g, collapsedSidebarItems: E } = D(), c = y(null), l = y(!0);
12
+ setup(j) {
13
+ const { hash: o, isIntersectionEnabled: w } = M(), { items: B, toggleCollapsedSidebarItem: g, collapsedSidebarItems: E } = x(), c = y(null), l = y(!0);
14
14
  N(o, (t) => {
15
15
  !w.value || l.value || typeof window > "u" || S(t);
16
16
  });
@@ -18,9 +18,9 @@ const H = { class: "sidebar" }, R = ["aria-label"], U = { class: "sidebar-group-
18
18
  const s = document.getElementById(`sidebar-${t}`);
19
19
  if (!s || !c.value)
20
20
  return;
21
- let e = j;
21
+ let e = U;
22
22
  s.getAttribute("data-sidebar-type") === "heading" ? e += s.offsetTop + (s.getElementsByClassName("sidebar-heading")?.[0]).offsetHeight : e += s.offsetTop + (s.parentElement?.offsetTop ?? 0) + (s.parentElement?.parentElement?.offsetTop ?? 0), c.value.scrollTo({ top: e, behavior: "smooth" });
23
- }, O = (t) => {
23
+ }, I = (t) => {
24
24
  if (!c.value)
25
25
  return;
26
26
  const s = new MutationObserver((e, r) => {
@@ -32,12 +32,12 @@ const H = { class: "sidebar" }, R = ["aria-label"], U = { class: "sidebar-group-
32
32
  }), s;
33
33
  }, p = (t) => o.value === t ? !0 : o.value.includes("/description/") ? o.value.split("/description/")[0] === t : !1, k = y(void 0);
34
34
  L(() => {
35
- k.value = O(o.value), o.value || setTimeout(() => l.value = !1, 300);
35
+ k.value = I(o.value), o.value || setTimeout(() => l.value = !1, 300);
36
36
  }), F(() => {
37
37
  k.value?.disconnect();
38
38
  });
39
- const b = (t) => "children" in t && (t.children?.length ?? 0) > 0;
40
- return (t, s) => (i(), n("div", H, [
39
+ const b = (t) => (t.type === "tag" || t.type === "text") && (t.children?.length ?? 0) > 0;
40
+ return (t, s) => (i(), n("div", D, [
41
41
  T(t.$slots, "sidebar-start", {}, void 0, !0),
42
42
  C("nav", {
43
43
  ref_key: "scrollerEl",
@@ -47,11 +47,11 @@ const H = { class: "sidebar" }, R = ["aria-label"], U = { class: "sidebar-group-
47
47
  }, [
48
48
  G(_, { level: 0 }, {
49
49
  default: v(() => [
50
- (i(!0), n(d, null, m(a(I).entries, (e) => (i(), n(d, {
50
+ (i(!0), n(d, null, m(a(B).entries, (e) => (i(), n(d, {
51
51
  key: e.id
52
52
  }, [
53
53
  "isGroup" in e && e.isGroup ? (i(), n(d, { key: 0 }, [
54
- C("li", U, V(e.title), 1),
54
+ C("li", R, V(e.title), 1),
55
55
  (i(!0), n(d, null, m(e.children, (r) => (i(), u(h, {
56
56
  key: r.id,
57
57
  id: `sidebar-${r.id}`,
@@ -116,7 +116,7 @@ const H = { class: "sidebar" }, R = ["aria-label"], U = { class: "sidebar-group-
116
116
  ]),
117
117
  _: 1
118
118
  })
119
- ], 8, R),
119
+ ], 8, H),
120
120
  T(t.$slots, "sidebar-end", {}, void 0, !0)
121
121
  ]));
122
122
  }
@@ -1,4 +1,4 @@
1
- import type { TraversedEntry } from '../../../features/traverse-schema';
1
+ import type { TraversedEntry } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
2
2
  type __VLS_Props = {
3
3
  id: string;
4
4
  item: TraversedEntry;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SidebarElement.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-sidebar-block/components/SidebarElement.vue"],"names":[],"mappings":"AAyXA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8DAA8D,CAAA;AAOlG,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,cAAc,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,IAAI,CAAC,EAAE,OAAO,CAAA;CACf,CAAC;AA4RF,QAAA,IAAI,QAAQ,IAAW,EAAE,QAAQ,IAAY,CAAE;AAC/C,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC7C;IAAE,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AA6BtD,QAAA,MAAM,eAAe;;;;kFAOnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -0,0 +1,7 @@
1
+ import o from "./SidebarElement.vue2.js";
2
+ /* empty css */
3
+ import t from "../../../../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-b9da5e03"]]);
5
+ export {
6
+ m as default
7
+ };
@@ -1,26 +1,26 @@
1
- import { defineComponent as B, createElementBlock as a, openBlock as i, createElementVNode as s, renderSlot as g, createCommentVNode as l, normalizeClass as O, unref as r, createTextVNode as h, withModifiers as A, createVNode as f, withCtx as b, toDisplayString as p, createBlock as $, normalizeStyle as E } from "vue";
1
+ import { defineComponent as B, createElementBlock as a, openBlock as o, createElementVNode as r, renderSlot as g, createCommentVNode as s, normalizeClass as A, unref as l, createTextVNode as h, withModifiers as O, createVNode as f, withCtx as b, toDisplayString as p, createBlock as $, normalizeStyle as E } from "vue";
2
2
  import { ScalarSidebarGroupToggle as N } from "@scalar/components";
3
3
  import { scrollToId as V } from "@scalar/helpers/dom/scroll-to-id";
4
4
  import { getHttpMethodInfo as H } from "@scalar/helpers/http/http-info";
5
5
  import { sleep as k } from "@scalar/helpers/testing/sleep";
6
6
  import { ScalarIconWebhooksLogo as I } from "@scalar/icons";
7
- import { isOperationDeprecated as P, combineUrlAndPath as R } from "@scalar/oas-utils/helpers";
8
- import { useConfig as U } from "../../../hooks/useConfig.js";
9
- import { useNavState as D } from "../../../hooks/useNavState.js";
10
- import L from "./SidebarHttpBadge.vue.js";
11
- const M = ["id"], z = {
7
+ import { combineUrlAndPath as P } from "@scalar/oas-utils/helpers";
8
+ import { useConfig as R } from "../../../../hooks/useConfig.js";
9
+ import { useNavState as U } from "../../../../hooks/useNavState.js";
10
+ import D from "./SidebarHttpBadge.vue.js";
11
+ const L = ["id"], M = {
12
12
  key: 0,
13
13
  class: "sidebar-heading-chevron"
14
- }, j = ["aria-expanded"], F = ["href", "tabindex"], G = { class: "sidebar-heading-link-title" }, W = {
14
+ }, z = ["aria-expanded"], j = ["href", "tabindex"], F = { class: "sidebar-heading-link-title" }, G = {
15
15
  key: 0,
16
16
  class: "hanging-indent"
17
- }, q = { key: 1 }, J = {
17
+ }, W = { key: 1 }, q = {
18
18
  key: 0,
19
19
  class: "sidebar-heading-link-method"
20
- }, K = {
20
+ }, J = {
21
21
  key: 1,
22
22
  class: "action-menu"
23
- }, ne = /* @__PURE__ */ B({
23
+ }, ie = /* @__PURE__ */ B({
24
24
  __name: "SidebarElement",
25
25
  props: {
26
26
  id: {},
@@ -30,88 +30,86 @@ const M = ["id"], z = {
30
30
  open: { type: Boolean }
31
31
  },
32
32
  emits: ["toggleOpen"],
33
- setup(v, { emit: y }) {
34
- const t = v, m = y, { getFullHash: u, isIntersectionEnabled: d, replaceUrlState: C } = D(), o = U(), w = (e) => "path" in e ? e.path.replace(/\//g, "/​") : e.title, c = async () => {
33
+ setup(y, { emit: v }) {
34
+ const t = y, m = v, { getFullHash: u, isIntersectionEnabled: d, replaceUrlState: C } = U(), i = R(), w = (e) => "path" in e ? e.path.replace(/\//g, "/​") : e.title, c = async () => {
35
35
  d.value = !1, t.hasChildren && m("toggleOpen"), await k(100), d.value = !0;
36
36
  }, S = () => {
37
- if (o.value.pathRouting)
38
- return R(o.value.pathRouting.basePath, t.item.id);
37
+ if (i.value.pathRouting)
38
+ return P(i.value.pathRouting.basePath, t.item.id);
39
39
  if (typeof window < "u") {
40
40
  const e = new URL(window.location.href);
41
41
  return e.hash = u(t.item.id), `${e.search}${e.hash}`;
42
42
  }
43
43
  return `#${u(t.item.id)}`;
44
44
  }, T = async (e) => {
45
- o.value.onSidebarClick?.(t.item.id), o.value.pathRouting && (e.preventDefault(), t.hasChildren && m("toggleOpen"), m("toggleOpen"), d.value = !1, C(t.item.id), V(t.item.id), await k(100), d.value = !0);
45
+ i.value.onSidebarClick?.(t.item.id), i.value.pathRouting && (e.preventDefault(), t.hasChildren && m("toggleOpen"), m("toggleOpen"), d.value = !1, C(t.item.id), V(t.item.id), await k(100), d.value = !0);
46
46
  };
47
- return (e, n) => (i(), a("li", {
47
+ return (e, n) => (o(), a("li", {
48
48
  id: e.id,
49
49
  class: "sidebar-group-item"
50
50
  }, [
51
- s("div", {
52
- class: O(["sidebar-heading", {
51
+ r("div", {
52
+ class: A(["sidebar-heading", {
53
53
  "sidebar-group-item__folder": e.hasChildren,
54
54
  active_page: e.isActive,
55
- deprecated: "operation" in e.item && r(P)(
56
- e.item.operation
57
- )
55
+ deprecated: e.item.type === "operation" && e.item.isDeprecated
58
56
  }]),
59
57
  onClick: c
60
58
  }, [
61
- e.hasChildren && !r(o).defaultOpenAllTags ? (i(), a("p", z, [
62
- s("button", {
59
+ e.hasChildren && !l(i).defaultOpenAllTags ? (o(), a("p", M, [
60
+ r("button", {
63
61
  "aria-expanded": e.open,
64
62
  class: "toggle-nested-icon",
65
63
  type: "button",
66
- onClick: A(c, ["stop"])
64
+ onClick: O(c, ["stop"])
67
65
  }, [
68
- f(r(N), { open: e.open }, {
66
+ f(l(N), { open: e.open }, {
69
67
  label: b(() => [
70
68
  h(p(e.open ? "Collapse" : "Expand") + " " + p(e.item.title), 1)
71
69
  ]),
72
70
  _: 1
73
71
  }, 8, ["open"])
74
- ], 8, j),
72
+ ], 8, z),
75
73
  n[0] || (n[0] = h("   "))
76
- ])) : l("", !0),
77
- s("a", {
74
+ ])) : s("", !0),
75
+ r("a", {
78
76
  class: "sidebar-heading-link",
79
77
  href: S(),
80
78
  tabindex: e.hasChildren ? -1 : 0,
81
79
  onClick: T
82
80
  }, [
83
- s("p", G, [
84
- r(o).operationTitleSource === "path" ? (i(), a("span", W, p(w(e.item)), 1)) : (i(), a("span", q, p(e.item.title), 1))
81
+ r("p", F, [
82
+ l(i).operationTitleSource === "path" ? (o(), a("span", G, p(w(e.item)), 1)) : (o(), a("span", W, p(e.item.title), 1))
85
83
  ]),
86
- "method" in e.item && !e.hasChildren ? (i(), a("p", J, [
84
+ "method" in e.item && !e.hasChildren ? (o(), a("p", q, [
87
85
  n[1] || (n[1] = h("   ")),
88
- n[2] || (n[2] = s("span", { class: "sr-only" }, "HTTP Method: ", -1)),
89
- f(L, {
86
+ n[2] || (n[2] = r("span", { class: "sr-only" }, "HTTP Method: ", -1)),
87
+ f(D, {
90
88
  active: e.isActive,
91
89
  class: "min-w-9.75 justify-end text-right",
92
90
  method: e.item.method
93
91
  }, {
94
92
  default: b(() => [
95
- "webhook" in e.item ? (i(), $(r(I), {
93
+ e.item.type === "webhook" ? (o(), $(l(I), {
96
94
  key: 0,
97
95
  style: E({
98
- color: r(H)(e.item.method).colorVar
96
+ color: l(H)(e.item.method).colorVar
99
97
  }),
100
98
  weight: "bold"
101
- }, null, 8, ["style"])) : l("", !0)
99
+ }, null, 8, ["style"])) : s("", !0)
102
100
  ]),
103
101
  _: 1
104
102
  }, 8, ["active", "method"])
105
- ])) : l("", !0)
106
- ], 8, F)
103
+ ])) : s("", !0)
104
+ ], 8, j)
107
105
  ], 2),
108
- e.open ? g(e.$slots, "default", { key: 0 }, void 0, !0) : l("", !0),
109
- e.$slots["action-menu"] ? (i(), a("div", K, [
106
+ e.open ? g(e.$slots, "default", { key: 0 }, void 0, !0) : s("", !0),
107
+ e.$slots["action-menu"] ? (o(), a("div", J, [
110
108
  g(e.$slots, "action-menu", {}, void 0, !0)
111
- ])) : l("", !0)
112
- ], 8, M));
109
+ ])) : s("", !0)
110
+ ], 8, L));
113
111
  }
114
112
  });
115
113
  export {
116
- ne as default
114
+ ie as default
117
115
  };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SidebarGroup.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-sidebar-block/components/SidebarGroup.vue"],"names":[],"mappings":"AA8CA,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;CACd,CAAC;AAkCF,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAmB/C,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"}
@@ -0,0 +1,7 @@
1
+ import o from "./SidebarGroup.vue2.js";
2
+ /* empty css */
3
+ import r from "../../../../_virtual/_plugin-vue_export-helper.js";
4
+ const d = /* @__PURE__ */ r(o, [["__scopeId", "data-v-ad688dbb"]]);
5
+ export {
6
+ d as default
7
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SidebarHttpBadge.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-sidebar-block/components/SidebarHttpBadge.vue"],"names":[],"mappings":"AA2CA,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAC;AA8CF,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAoB/C,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"}
@@ -0,0 +1,7 @@
1
+ import t from "./SidebarHttpBadge.vue2.js";
2
+ /* empty css */
3
+ import o from "../../../../_virtual/_plugin-vue_export-helper.js";
4
+ const p = /* @__PURE__ */ o(t, [["__scopeId", "data-v-1ee77540"]]);
5
+ export {
6
+ p as default
7
+ };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as t, createBlock as o, openBlock as a, unref as r, normalizeClass as d, withCtx as s, renderSlot as i } from "vue";
2
- import n from "../../../components/HttpMethod/HttpMethod.vue.js";
2
+ import n from "../../../../components/HttpMethod/HttpMethod.vue.js";
3
3
  const c = /* @__PURE__ */ t({
4
4
  __name: "SidebarHttpBadge",
5
5
  props: {