@scalar/api-reference 1.35.5 → 1.35.7

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 (225) hide show
  1. package/CHANGELOG.md +53 -0
  2. package/dist/blocks/helpers/getPointer.d.ts.map +1 -1
  3. package/dist/browser/standalone.js +19316 -19449
  4. package/dist/browser/webpack-stats.json +1 -1
  5. package/dist/components/Anchor/WithBreadcrumb.vue2.js +8 -11
  6. package/dist/components/ApiReference.vue.js +1 -1
  7. package/dist/components/ApiReferenceLayout.vue.js +4 -4
  8. package/dist/components/ApiReferenceLayout.vue2.js +247 -268
  9. package/dist/components/Badge/Badge.vue.js +1 -1
  10. package/dist/components/ClassicHeader.vue.js +1 -1
  11. package/dist/components/Content/Content.vue.js +145 -169
  12. package/dist/components/Content/Content.vue3.js +1 -1
  13. package/dist/components/Content/Models/ClassicLayout.vue.js +1 -1
  14. package/dist/components/Content/Models/ClassicLayout.vue2.js +32 -35
  15. package/dist/components/Content/Models/Models.vue.js +27 -31
  16. package/dist/components/Content/Models/ModernLayout.vue.js +1 -1
  17. package/dist/components/Content/Operations/TraversedEntry.vue.js +32 -35
  18. package/dist/components/Content/Operations/TraversedEntryContainer.vue.js +26 -27
  19. package/dist/components/Content/Operations/get-current-index.js +1 -1
  20. package/dist/components/Content/Schema/Schema.vue.js +1 -1
  21. package/dist/components/Content/Schema/Schema.vue2.js +68 -74
  22. package/dist/components/Content/Schema/SchemaComposition.vue.js +42 -45
  23. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.js +1 -1
  24. package/dist/components/Content/Schema/SchemaEnumValues.vue.js +1 -1
  25. package/dist/components/Content/Schema/SchemaEnumValues.vue2.js +45 -50
  26. package/dist/components/Content/Schema/SchemaHeading.vue.js +1 -1
  27. package/dist/components/Content/Schema/SchemaObjectProperties.vue.js +41 -48
  28. package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
  29. package/dist/components/Content/Schema/SchemaProperty.vue2.js +142 -157
  30. package/dist/components/Content/Schema/SchemaPropertyDetail.vue.js +1 -1
  31. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js +1 -1
  32. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +1 -1
  33. package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +160 -164
  34. package/dist/components/Content/Schema/helpers/get-schema-type.js +15 -17
  35. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +74 -77
  36. package/dist/components/Content/Schema/helpers/optimize-value-for-display.js +10 -11
  37. package/dist/components/Content/Tags/ClassicLayout.vue.js +1 -1
  38. package/dist/components/Content/Tags/ClassicLayout.vue2.js +36 -39
  39. package/dist/components/Content/Tags/ModernLayout.vue.js +1 -1
  40. package/dist/components/Content/Tags/ModernLayout.vue2.js +31 -35
  41. package/dist/components/Content/Tags/TagSection.vue.js +86 -92
  42. package/dist/components/GettingStarted.vue.js +1 -1
  43. package/dist/components/Lazy/Lazy.vue.d.ts.map +1 -1
  44. package/dist/components/Lazy/Lazy.vue2.js +2 -2
  45. package/dist/components/LinkList/LinkList.vue.js +1 -1
  46. package/dist/components/LoadingSkeleton.vue.js +1 -1
  47. package/dist/components/MobileHeader.vue.d.ts.map +1 -1
  48. package/dist/components/MobileHeader.vue.js +3 -3
  49. package/dist/components/MobileHeader.vue2.js +13 -12
  50. package/dist/components/OperationPath.vue.js +1 -1
  51. package/dist/components/OperationsList/OperationsList.vue.js +1 -1
  52. package/dist/components/OperationsList/OperationsList.vue2.js +45 -51
  53. package/dist/components/OperationsList/OperationsListItem.vue.js +1 -1
  54. package/dist/components/ScreenReader.vue.js +1 -1
  55. package/dist/components/Section/CompactSection.vue.js +1 -1
  56. package/dist/components/Section/Section.vue.js +1 -1
  57. package/dist/components/Section/Section.vue2.js +13 -14
  58. package/dist/components/Section/SectionAccordion.vue.js +1 -1
  59. package/dist/components/Section/SectionAccordion.vue2.js +29 -30
  60. package/dist/components/Section/SectionColumn.vue.js +1 -1
  61. package/dist/components/Section/SectionColumns.vue.js +1 -1
  62. package/dist/components/Section/SectionContainer.vue.js +1 -1
  63. package/dist/components/Section/SectionContainerAccordion.vue.js +1 -1
  64. package/dist/components/Section/SectionContent.vue.js +1 -1
  65. package/dist/components/Section/SectionHeader.vue.js +1 -1
  66. package/dist/components/Section/SectionHeaderTag.vue.js +1 -1
  67. package/dist/components/SectionFlare/SectionFlare.vue.js +1 -1
  68. package/dist/components/ShowMoreButton.vue.js +1 -1
  69. package/dist/components/ShowMoreButton.vue2.js +12 -13
  70. package/dist/features/Operation/Operation.vue.js +31 -36
  71. package/dist/features/Operation/components/Headers.vue.js +1 -1
  72. package/dist/features/Operation/components/OperationParameters.vue.js +8 -11
  73. package/dist/features/Operation/components/ParameterList.vue.js +21 -24
  74. package/dist/features/Operation/components/ParameterListItem.vue.js +1 -1
  75. package/dist/features/Operation/components/ParameterListItem.vue2.js +36 -37
  76. package/dist/features/Operation/components/RequestBody.vue.js +1 -1
  77. package/dist/features/Operation/components/RequestBody.vue2.js +45 -52
  78. package/dist/features/Operation/components/callbacks/Callback.vue.js +1 -1
  79. package/dist/features/Operation/components/callbacks/Callback.vue2.js +32 -35
  80. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  81. package/dist/features/Operation/layouts/ClassicLayout.vue.js +4 -4
  82. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +114 -119
  83. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  84. package/dist/features/Operation/layouts/ModernLayout.vue.js +3 -3
  85. package/dist/features/Operation/layouts/ModernLayout.vue2.js +87 -89
  86. package/dist/features/Search/components/SearchButton.vue.js +23 -25
  87. package/dist/features/Search/components/SearchModal.vue.js +1 -1
  88. package/dist/features/Search/components/SearchModal.vue2.js +53 -54
  89. package/dist/features/api-client-modal/ApiClientModal.vue.js +31 -38
  90. package/dist/features/document-source/hooks/useDocumentFetcher.js +17 -18
  91. package/dist/features/document-source/hooks/useDocumentSource.d.ts.map +1 -1
  92. package/dist/features/document-source/hooks/useDocumentSource.js +21 -20
  93. package/dist/features/example-responses/ExampleResponse.vue.js +1 -1
  94. package/dist/features/example-responses/ExampleResponse.vue2.js +23 -26
  95. package/dist/features/example-responses/ExampleResponseTab.vue.js +1 -1
  96. package/dist/features/example-responses/ExampleResponseTabList.vue.js +1 -1
  97. package/dist/features/example-responses/ExampleResponses.vue.js +1 -1
  98. package/dist/features/example-responses/ExampleResponses.vue2.js +128 -153
  99. package/dist/features/info-object/Contact.vue.js +24 -27
  100. package/dist/features/info-object/License.vue.js +26 -29
  101. package/dist/features/multiple-documents/DocumentSelector.vue.js +22 -31
  102. package/dist/features/multiple-documents/useMultipleDocuments.js +52 -56
  103. package/dist/features/sidebar/components/Sidebar.vue.d.ts.map +1 -1
  104. package/dist/features/sidebar/components/Sidebar.vue.js +3 -3
  105. package/dist/features/sidebar/components/Sidebar.vue2.js +74 -79
  106. package/dist/features/sidebar/components/SidebarElement.vue.js +3 -3
  107. package/dist/features/sidebar/components/SidebarElement.vue2.js +52 -53
  108. package/dist/features/sidebar/components/SidebarGroup.vue.js +1 -1
  109. package/dist/features/sidebar/components/SidebarHttpBadge.vue.js +1 -1
  110. package/dist/features/specification-extension/SpecificationExtension.vue2.js +28 -31
  111. package/dist/features/test-request-button/TestRequestButton.vue.js +1 -1
  112. package/dist/features/test-request-button/TestRequestButton.vue2.js +1 -2
  113. package/dist/features/traverse-schema/helpers/traverse-description.js +13 -14
  114. package/dist/features/traverse-schema/helpers/traverse-document.js +14 -15
  115. package/dist/features/traverse-schema/helpers/traverse-paths.js +20 -23
  116. package/dist/features/traverse-schema/helpers/traverse-schemas.js +13 -15
  117. package/dist/features/traverse-schema/helpers/traverse-webhooks.js +8 -10
  118. package/dist/hooks/useFreezing.js +14 -14
  119. package/dist/hooks/useNavState.js +37 -39
  120. package/dist/index.js +2 -2
  121. package/dist/libs/openapi.js +28 -31
  122. package/dist/style.css +1 -1
  123. package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
  124. package/dist/v2/ApiReferenceWorkspace.vue.js +102 -103
  125. package/dist/v2/ApiReferenceWorkspace.vue3.js +1 -1
  126. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +1 -1
  127. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue2.js +116 -135
  128. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.js +40 -47
  129. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +45 -46
  130. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js +109 -125
  131. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +1 -1
  132. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +84 -84
  133. package/dist/v2/blocks/scalar-auth-selector-block/helpers/update-scheme.js +12 -13
  134. package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js +1 -1
  135. package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue2.js +1 -4
  136. package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue.js +1 -1
  137. package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue2.js +77 -82
  138. package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue.d.ts.map +1 -1
  139. package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue.js +2 -2
  140. package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue2.js +56 -50
  141. package/dist/v2/blocks/scalar-info-block/components/InfoDescription.vue.js +1 -1
  142. package/dist/v2/blocks/scalar-info-block/components/IntroductionCard.vue.js +1 -1
  143. package/dist/v2/blocks/scalar-info-block/components/IntroductionCardItem.vue.js +1 -1
  144. package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue.js +1 -1
  145. package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue2.js +74 -89
  146. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue2.js +24 -27
  147. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts.map +1 -1
  148. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.js +2 -2
  149. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue2.js +111 -118
  150. package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.js +11 -12
  151. package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.js +3 -3
  152. package/dist/v2/blocks/scalar-server-selector-block/components/Selector.vue.js +11 -14
  153. package/dist/v2/blocks/scalar-server-selector-block/components/ServerSelector.vue.js +45 -48
  154. package/dist/v2/helpers/get-document-name.js +10 -10
  155. package/dist/v2/helpers/map-configuration.d.ts.map +1 -1
  156. package/dist/v2/helpers/map-configuration.js +48 -51
  157. package/dist/v2/hooks/use-legacy-store-events.js +44 -48
  158. package/dist/v2/hooks/use-workspace-store-events.js +23 -26
  159. package/package.json +24 -23
  160. package/dist/components/ApiReferenceLayout.vue3.js +0 -4
  161. package/dist/components/ApiReferenceLayout.vue4.js +0 -4
  162. package/dist/components/ApiReferenceLayout.vue5.js +0 -4
  163. package/dist/components/ApiReferenceLayout.vue6.js +0 -4
  164. package/dist/components/Badge/Badge.vue3.js +0 -4
  165. package/dist/components/ClassicHeader.vue2.js +0 -4
  166. package/dist/components/Content/Content.vue2.js +0 -4
  167. package/dist/components/Content/Models/ClassicLayout.vue3.js +0 -4
  168. package/dist/components/Content/Models/ModernLayout.vue3.js +0 -4
  169. package/dist/components/Content/Schema/Schema.vue3.js +0 -4
  170. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue3.js +0 -4
  171. package/dist/components/Content/Schema/SchemaEnumValues.vue3.js +0 -4
  172. package/dist/components/Content/Schema/SchemaHeading.vue3.js +0 -4
  173. package/dist/components/Content/Schema/SchemaProperty.vue3.js +0 -4
  174. package/dist/components/Content/Schema/SchemaPropertyDetail.vue3.js +0 -4
  175. package/dist/components/Content/Schema/SchemaPropertyExamples.vue3.js +0 -4
  176. package/dist/components/Content/Schema/SchemaPropertyHeading.vue3.js +0 -4
  177. package/dist/components/Content/Tags/ClassicLayout.vue3.js +0 -4
  178. package/dist/components/Content/Tags/ModernLayout.vue3.js +0 -4
  179. package/dist/components/GettingStarted.vue3.js +0 -4
  180. package/dist/components/LinkList/LinkList.vue3.js +0 -4
  181. package/dist/components/LoadingSkeleton.vue3.js +0 -4
  182. package/dist/components/MobileHeader.vue3.js +0 -4
  183. package/dist/components/OperationPath.vue3.js +0 -4
  184. package/dist/components/OperationsList/OperationsList.vue3.js +0 -4
  185. package/dist/components/OperationsList/OperationsListItem.vue3.js +0 -4
  186. package/dist/components/ScreenReader.vue3.js +0 -4
  187. package/dist/components/Section/CompactSection.vue3.js +0 -4
  188. package/dist/components/Section/Section.vue3.js +0 -4
  189. package/dist/components/Section/SectionAccordion.vue3.js +0 -4
  190. package/dist/components/Section/SectionColumn.vue2.js +0 -4
  191. package/dist/components/Section/SectionColumns.vue2.js +0 -4
  192. package/dist/components/Section/SectionContainer.vue3.js +0 -4
  193. package/dist/components/Section/SectionContainerAccordion.vue3.js +0 -4
  194. package/dist/components/Section/SectionContent.vue3.js +0 -4
  195. package/dist/components/Section/SectionHeader.vue3.js +0 -4
  196. package/dist/components/Section/SectionHeaderTag.vue3.js +0 -4
  197. package/dist/components/SectionFlare/SectionFlare.vue2.js +0 -4
  198. package/dist/components/ShowMoreButton.vue3.js +0 -4
  199. package/dist/features/Operation/components/Headers.vue3.js +0 -4
  200. package/dist/features/Operation/components/ParameterListItem.vue3.js +0 -4
  201. package/dist/features/Operation/components/RequestBody.vue3.js +0 -4
  202. package/dist/features/Operation/components/callbacks/Callback.vue3.js +0 -4
  203. package/dist/features/Operation/layouts/ClassicLayout.vue3.js +0 -4
  204. package/dist/features/Operation/layouts/ModernLayout.vue3.js +0 -4
  205. package/dist/features/Search/components/SearchModal.vue3.js +0 -4
  206. package/dist/features/example-responses/ExampleResponse.vue3.js +0 -4
  207. package/dist/features/example-responses/ExampleResponseTab.vue3.js +0 -4
  208. package/dist/features/example-responses/ExampleResponseTabList.vue3.js +0 -4
  209. package/dist/features/example-responses/ExampleResponses.vue3.js +0 -4
  210. package/dist/features/sidebar/components/Sidebar.vue3.js +0 -4
  211. package/dist/features/sidebar/components/SidebarElement.vue3.js +0 -4
  212. package/dist/features/sidebar/components/SidebarGroup.vue3.js +0 -4
  213. package/dist/features/sidebar/components/SidebarHttpBadge.vue3.js +0 -4
  214. package/dist/features/test-request-button/TestRequestButton.vue3.js +0 -4
  215. package/dist/v2/ApiReferenceWorkspace.vue2.js +0 -4
  216. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue3.js +0 -4
  217. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue3.js +0 -4
  218. package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue3.js +0 -4
  219. package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue3.js +0 -4
  220. package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue3.js +0 -4
  221. package/dist/v2/blocks/scalar-info-block/components/InfoDescription.vue3.js +0 -4
  222. package/dist/v2/blocks/scalar-info-block/components/IntroductionCard.vue3.js +0 -4
  223. package/dist/v2/blocks/scalar-info-block/components/IntroductionCardItem.vue2.js +0 -4
  224. package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue3.js +0 -4
  225. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue3.js +0 -4
@@ -1,49 +1,46 @@
1
- import { defineComponent as E, computed as c, createElementBlock as l, createCommentVNode as _, openBlock as r, Fragment as k, renderList as y, createBlock as o, unref as C, withCtx as h, resolveDynamicComponent as s, mergeProps as p } from "vue";
2
- import { ScalarErrorBoundary as B } from "@scalar/components";
3
- import { usePluginManager as b } from "../../plugins/hooks/usePluginManager.js";
4
- const N = {
1
+ import { defineComponent as v, computed as u, createElementBlock as m, createCommentVNode as g, openBlock as r, Fragment as E, renderList as _, createBlock as o, unref as k, withCtx as y, resolveDynamicComponent as c, mergeProps as l } from "vue";
2
+ import { ScalarErrorBoundary as C } from "@scalar/components";
3
+ import { usePluginManager as h } from "../../plugins/hooks/usePluginManager.js";
4
+ const B = {
5
5
  key: 0,
6
6
  class: "text-base"
7
- }, O = /* @__PURE__ */ E({
7
+ }, j = /* @__PURE__ */ v({
8
8
  __name: "SpecificationExtension",
9
9
  props: {
10
10
  value: {}
11
11
  },
12
- setup(i) {
13
- const { getSpecificationExtensions: f } = b();
14
- function d(t) {
12
+ setup(s) {
13
+ const { getSpecificationExtensions: p } = h();
14
+ function i(t) {
15
15
  return Object.keys(t ?? {}).filter(
16
16
  (n) => n.startsWith("x-")
17
17
  );
18
18
  }
19
- function v(t) {
20
- return t.flatMap((n) => f(n)).filter((n) => n.component);
19
+ function f(t) {
20
+ return t.flatMap((n) => p(n)).filter((n) => n.component);
21
21
  }
22
- const g = c(() => d(i.value)), a = c(
23
- () => v(g.value)
22
+ const d = u(() => i(s.value)), a = u(
23
+ () => f(d.value)
24
24
  );
25
- return (t, n) => typeof t.value == "object" && a.value.length ? (r(), l("div", N, [
26
- (r(!0), l(k, null, y(a.value, (e) => (r(), o(C(B), null, {
27
- default: h(() => {
28
- var u, m;
29
- return [
30
- e.renderer ? (r(), o(s(e.renderer), p({
31
- key: 0,
32
- ref_for: !0
33
- }, {
34
- [e.name]: (u = t.value) == null ? void 0 : u[e.name],
35
- component: e.component
36
- }), null, 16)) : (r(), o(s(e.component), p({
37
- key: 1,
38
- ref_for: !0
39
- }, { [e.name]: (m = t.value) == null ? void 0 : m[e.name] }), null, 16))
40
- ];
41
- }),
25
+ return (t, n) => typeof t.value == "object" && a.value.length ? (r(), m("div", B, [
26
+ (r(!0), m(E, null, _(a.value, (e) => (r(), o(k(C), null, {
27
+ default: y(() => [
28
+ e.renderer ? (r(), o(c(e.renderer), l({
29
+ key: 0,
30
+ ref_for: !0
31
+ }, {
32
+ [e.name]: t.value?.[e.name],
33
+ component: e.component
34
+ }), null, 16)) : (r(), o(c(e.component), l({
35
+ key: 1,
36
+ ref_for: !0
37
+ }, { [e.name]: t.value?.[e.name] }), null, 16))
38
+ ]),
42
39
  _: 2
43
40
  }, 1024))), 256))
44
- ])) : _("", !0);
41
+ ])) : g("", !0);
45
42
  }
46
43
  });
47
44
  export {
48
- O as default
45
+ j as default
49
46
  };
@@ -1,5 +1,5 @@
1
1
  import t from "./TestRequestButton.vue2.js";
2
- import "./TestRequestButton.vue3.js";
2
+ /* empty css */
3
3
  import o from "../../_virtual/_plugin-vue_export-helper.js";
4
4
  const c = /* @__PURE__ */ o(t, [["__scopeId", "data-v-976c9c1f"]]);
5
5
  export {
@@ -13,8 +13,7 @@ const R = ["method"], S = /* @__PURE__ */ c({
13
13
  const { client: a } = w(), m = b(), u = d(
14
14
  () => m.value.hideTestRequestButton !== !0
15
15
  ), p = () => {
16
- var e;
17
- (e = a.value) == null || e.open({
16
+ a.value?.open({
18
17
  method: t.method,
19
18
  path: t.path
20
19
  });
@@ -1,33 +1,32 @@
1
- import { getHeadingsFromMarkdown as c, getLowestHeadingLevel as d } from "../../../libs/markdown.js";
2
- const f = "introduction", v = (n, l, u) => {
3
- var i;
4
- if (!(n != null && n.trim()))
1
+ import { getHeadingsFromMarkdown as h, getLowestHeadingLevel as d } from "../../../libs/markdown.js";
2
+ const a = "introduction", g = (n, i, l) => {
3
+ if (!n?.trim())
5
4
  return [];
6
- const h = c(n), o = d(h), r = [];
5
+ const c = h(n), o = d(c), r = [];
7
6
  let s = null;
8
7
  if (n && !n.trim().startsWith("#")) {
9
8
  const e = {
10
9
  depth: 1,
11
10
  value: "Introduction",
12
- slug: f
13
- }, t = u(e), a = e.value;
11
+ slug: a
12
+ }, t = l(e), u = e.value;
14
13
  r.push({
15
14
  id: t,
16
- title: a
17
- }), l.set(t, a);
15
+ title: u
16
+ }), i.set(t, u);
18
17
  }
19
- for (const e of h) {
18
+ for (const e of c) {
20
19
  if (e.depth !== o && e.depth !== o + 1)
21
20
  continue;
22
21
  const t = {
23
- id: u(e),
22
+ id: l(e),
24
23
  title: e.value
25
24
  };
26
- l.set(t.id, t.title), e.depth === o ? (t.children = [], r.push(t), s = t) : s && ((i = s.children) == null || i.push(t));
25
+ i.set(t.id, t.title), e.depth === o ? (t.children = [], r.push(t), s = t) : s && s.children?.push(t);
27
26
  }
28
27
  return r;
29
28
  };
30
29
  export {
31
- f as DEFAULT_INTRODUCTION_SLUG,
32
- v as traverseDescription
30
+ a as DEFAULT_INTRODUCTION_SLUG,
31
+ g as traverseDescription
33
32
  };
@@ -1,26 +1,25 @@
1
- import { traverseDescription as S } from "./traverse-description.js";
2
- import { traversePaths as u } from "./traverse-paths.js";
3
- import { traverseSchemas as M } from "./traverse-schemas.js";
4
- import { traverseTags as b } from "./traverse-tags.js";
5
- import { traverseWebhooks as k } from "./traverse-webhooks.js";
6
- const x = (e, { config: a, getHeadingId: v, getOperationId: c, getWebhookId: i, getModelId: n, getTagId: f }) => {
7
- var h, l, m;
1
+ import { traverseDescription as c } from "./traverse-description.js";
2
+ import { traversePaths as f } from "./traverse-paths.js";
3
+ import { traverseSchemas as g } from "./traverse-schemas.js";
4
+ import { traverseTags as S } from "./traverse-tags.js";
5
+ import { traverseWebhooks as u } from "./traverse-webhooks.js";
6
+ const w = (e, { config: a, getHeadingId: h, getOperationId: l, getWebhookId: i, getModelId: n, getTagId: m }) => {
8
7
  const r = /* @__PURE__ */ new Map(), t = new Map(
9
- ((h = e.tags) == null ? void 0 : h.map((s) => [s.name ?? "Untitled Tag", { tag: s, entries: [] }])) ?? []
8
+ e.tags?.map((s) => [s.name ?? "Untitled Tag", { tag: s, entries: [] }]) ?? []
10
9
  );
11
- u(e, t, r, c);
12
- const o = S((l = e.info) == null ? void 0 : l.description, r, v), p = k(e, t, r, i), g = b(e, t, r, {
13
- getTagId: f,
10
+ f(e, t, r, l);
11
+ const o = c(e.info?.description, r, h), p = u(e, t, r, i), v = S(e, t, r, {
12
+ getTagId: m,
14
13
  tagsSorter: a.value.tagsSorter,
15
14
  operationsSorter: a.value.operationsSorter
16
15
  });
17
- if (o.push(...g), p.length && o.push({
16
+ if (o.push(...v), p.length && o.push({
18
17
  id: i(),
19
18
  isWebhooks: !0,
20
19
  title: "Webhooks",
21
20
  children: p
22
- }), !a.value.hideModels && ((m = e.components) != null && m.schemas)) {
23
- const s = M(e, t, r, n);
21
+ }), !a.value.hideModels && e.components?.schemas) {
22
+ const s = g(e, t, r, n);
24
23
  s.length && o.push({
25
24
  id: n(),
26
25
  title: "Models",
@@ -30,5 +29,5 @@ const x = (e, { config: a, getHeadingId: v, getOperationId: c, getWebhookId: i,
30
29
  return { entries: o, titles: r };
31
30
  };
32
31
  export {
33
- x as traverseDocument
32
+ w as traverseDocument
34
33
  };
@@ -1,33 +1,30 @@
1
- import { httpMethods as a } from "@scalar/helpers/http/http-methods";
2
- import { getTag as m } from "./get-tag.js";
3
- const x = (r, s, e = "Unknown", c, f, h) => {
4
- var t;
5
- const i = h({ ...r, method: s, path: e }, c), n = (t = r.summary) != null && t.trim() ? r.summary : e;
6
- return f.set(i, n), {
1
+ import { httpMethods as m } from "@scalar/helpers/http/http-methods";
2
+ import { getTag as l } from "./get-tag.js";
3
+ const E = (s, t, r = "Unknown", c, f, h) => {
4
+ const i = h({ ...s, method: t, path: r }, c), e = s.summary?.trim() ? s.summary : r;
5
+ return f.set(i, e), {
7
6
  id: i,
8
- title: n,
9
- path: e,
10
- method: s,
11
- operation: r
7
+ title: e,
8
+ path: r,
9
+ method: t,
10
+ operation: s
12
11
  };
13
- }, O = (r, s, e, c) => {
14
- Object.entries(r.paths ?? {}).forEach(([f, h]) => {
15
- Object.entries(h ?? {}).forEach(([n, t]) => {
16
- var l, E;
17
- if (!(t["x-internal"] || t["x-scalar-ignore"] || !a.has(n)))
18
- if ((l = t.tags) != null && l.length)
19
- t.tags.forEach((u) => {
20
- var g;
21
- const { tag: y } = m(s, u);
22
- (g = s.get(u)) == null || g.entries.push(x(t, n, f, y, e, c));
12
+ }, a = (s, t, r, c) => {
13
+ Object.entries(s.paths ?? {}).forEach(([f, h]) => {
14
+ Object.entries(h ?? {}).forEach(([e, n]) => {
15
+ if (!(n["x-internal"] || n["x-scalar-ignore"] || !m.has(e)))
16
+ if (n.tags?.length)
17
+ n.tags.forEach((u) => {
18
+ const { tag: g } = l(t, u);
19
+ t.get(u)?.entries.push(E(n, e, f, g, r, c));
23
20
  });
24
21
  else {
25
- const { tag: u } = m(s, "default");
26
- (E = s.get("default")) == null || E.entries.push(x(t, n, f, u, e, c));
22
+ const { tag: u } = l(t, "default");
23
+ t.get("default")?.entries.push(E(n, e, f, u, r, c));
27
24
  }
28
25
  });
29
26
  });
30
27
  };
31
28
  export {
32
- O as traversePaths
29
+ a as traversePaths
33
30
  };
@@ -1,23 +1,21 @@
1
- import { getTag as u } from "./get-tag.js";
2
- const h = (e, s = "Unkown", c, i, t) => {
3
- const o = i({ name: s }, t), r = "title" in e && typeof e.title == "string" ? e.title : s;
4
- return c.set(o, r), {
1
+ import { getTag as f } from "./get-tag.js";
2
+ const g = (e, s = "Unkown", r, c, n) => {
3
+ const o = c({ name: s }, n), t = "title" in e && typeof e.title == "string" ? e.title : s;
4
+ return r.set(o, t), {
5
5
  id: o,
6
- title: r,
6
+ title: t,
7
7
  name: s,
8
8
  schema: e
9
9
  };
10
- }, p = (e, s, c, i) => {
11
- var r, g;
12
- const t = ((r = e.components) == null ? void 0 : r.schemas) ?? {}, o = [];
13
- for (const n in t)
14
- t[n]["x-internal"] || t[n]["x-scalar-ignore"] || !Object.hasOwn(t, n) || ((g = t[n]["x-tags"]) != null && g.length ? t[n]["x-tags"].forEach((a) => {
15
- var f;
16
- const { tag: l } = u(s, a);
17
- (f = s.get(a)) == null || f.entries.push(h(t[n], n, c, i, l));
18
- }) : o.push(h(t[n], n, c, i)));
10
+ }, l = (e, s, r, c) => {
11
+ const n = e.components?.schemas ?? {}, o = [];
12
+ for (const t in n)
13
+ n[t]["x-internal"] || n[t]["x-scalar-ignore"] || !Object.hasOwn(n, t) || (n[t]["x-tags"]?.length ? n[t]["x-tags"].forEach((i) => {
14
+ const { tag: a } = f(s, i);
15
+ s.get(i)?.entries.push(g(n[t], t, r, c, a));
16
+ }) : o.push(g(n[t], t, r, c)));
19
17
  return o;
20
18
  };
21
19
  export {
22
- p as traverseSchemas
20
+ l as traverseSchemas
23
21
  };
@@ -1,5 +1,5 @@
1
- import { getTag as l } from "./get-tag.js";
2
- const i = (e, r, t = "Unknown", n, c, h) => {
1
+ import { getTag as i } from "./get-tag.js";
2
+ const E = (e, r, t = "Unknown", n, c, h) => {
3
3
  const g = e.summary || t, o = c({ name: t, method: r }, h);
4
4
  return n.set(o, g), {
5
5
  id: o,
@@ -8,19 +8,17 @@ const i = (e, r, t = "Unknown", n, c, h) => {
8
8
  webhook: e,
9
9
  method: r
10
10
  };
11
- }, x = (e, r, t, n) => {
11
+ }, l = (e, r, t, n) => {
12
12
  const c = [];
13
13
  return Object.entries(e.webhooks ?? {}).forEach(([h, g]) => {
14
14
  Object.entries(g ?? {}).forEach(([u, s]) => {
15
- var f;
16
- s["x-internal"] || s["x-scalar-ignore"] || ((f = s.tags) != null && f.length ? s.tags.forEach((E) => {
17
- var b;
18
- const { tag: k } = l(r, E);
19
- (b = r.get(E)) == null || b.entries.push(i(s, u, h, t, n, k));
20
- }) : c.push(i(s, u, h, t, n)));
15
+ s["x-internal"] || s["x-scalar-ignore"] || (s.tags?.length ? s.tags.forEach((f) => {
16
+ const { tag: b } = i(r, f);
17
+ r.get(f)?.entries.push(E(s, u, h, t, n, b));
18
+ }) : c.push(E(s, u, h, t, n)));
21
19
  });
22
20
  }), c;
23
21
  };
24
22
  export {
25
- x as traverseWebhooks
23
+ l as traverseWebhooks
26
24
  };
@@ -1,26 +1,26 @@
1
- import { lazyBus as f, hasLazyLoaded as i } from "../components/Lazy/lazyBus.js";
1
+ import { lazyBus as m, hasLazyLoaded as a } from "../components/Lazy/lazyBus.js";
2
2
  import { useNavState as v } from "./useNavState.js";
3
- import { freezeAtTop as p } from "@scalar/helpers/dom/freeze-at-top";
4
- import { ref as z } from "vue";
3
+ import { freezeAtTop as z } from "@scalar/helpers/dom/freeze-at-top";
4
+ import { ref as p } from "vue";
5
5
  const T = 25, d = 500, I = () => {
6
- const { hash: c, isIntersectionEnabled: l } = v(), e = z(/* @__PURE__ */ new Set()), t = p(c.value), m = () => {
7
- t == null || t(), i.value = !0, l.value = !0;
6
+ const { hash: i, isIntersectionEnabled: c } = v(), e = p(/* @__PURE__ */ new Set()), f = z(i.value), l = () => {
7
+ f?.(), a.value = !0, c.value = !0;
8
8
  };
9
- f.on(({ loading: o, loaded: s, save: n }) => {
10
- if (!i.value && (o && n && e.value.add(o), s && n && e.value.delete(s), e.value.size === 0)) {
11
- let r = Date.now();
12
- const a = () => {
9
+ m.on(({ loading: t, loaded: o, save: s }) => {
10
+ if (!a.value && (t && s && e.value.add(t), o && s && e.value.delete(o), e.value.size === 0)) {
11
+ let n = Date.now();
12
+ const r = () => {
13
13
  const u = Date.now();
14
14
  if (e.value.size === 0) {
15
- if (u - r >= d) {
16
- m();
15
+ if (u - n >= d) {
16
+ l();
17
17
  return;
18
18
  }
19
19
  } else
20
- r = u;
21
- setTimeout(a, T);
20
+ n = u;
21
+ setTimeout(r, T);
22
22
  };
23
- a();
23
+ r();
24
24
  }
25
25
  });
26
26
  };
@@ -1,37 +1,35 @@
1
1
  import { useConfig as b } from "./useConfig.js";
2
- import { combineUrlAndPath as d } from "@scalar/helpers/url/merge-urls";
3
- import { slug as i } from "github-slugger";
4
- import { inject as y, ref as l } from "vue";
5
- const P = Symbol(), U = l(!1), x = l(""), k = l(""), T = (f) => {
6
- const { isIntersectionEnabled: p, hash: r, hashPrefix: u } = y(P, {
7
- isIntersectionEnabled: U,
8
- hash: x,
9
- hashPrefix: k
10
- }), t = f ?? b(), c = (e) => {
11
- var a;
2
+ import { combineUrlAndPath as h } from "@scalar/helpers/url/merge-urls";
3
+ import { slug as s } from "github-slugger";
4
+ import { inject as R, ref as i } from "vue";
5
+ const k = Symbol(), y = i(!1), P = i(""), U = i(""), M = (d) => {
6
+ const { isIntersectionEnabled: f, hash: r, hashPrefix: u } = R(k, {
7
+ isIntersectionEnabled: y,
8
+ hash: P,
9
+ hashPrefix: U
10
+ }), t = d ?? b(), c = (e) => {
12
11
  if (!t.value.pathRouting)
13
12
  return "";
14
- const n = new RegExp("^" + ((a = t.value.pathRouting) == null ? void 0 : a.basePath) + "/?");
13
+ const n = new RegExp("^" + t.value.pathRouting?.basePath + "/?");
15
14
  return decodeURIComponent(e.replace(n, ""));
16
- }, v = (e = r.value) => {
17
- var h;
18
- const n = (h = e.match(/(tag\/[^/]+)/)) == null ? void 0 : h[0], a = e.startsWith("model") ? "models" : "", o = e.startsWith("webhook") ? "webhooks" : "";
19
- return n || a || o;
15
+ }, p = (e = r.value) => {
16
+ const n = e.match(/(tag\/[^/]+)/)?.[0], o = e.startsWith("model") ? "models" : "", a = e.startsWith("webhook") ? "webhooks" : "";
17
+ return n || o || a;
20
18
  }, g = () => t.value.pathRouting ? c(window.location.pathname) : (
21
19
  // Must remove the prefix from the hash as the internal hash value should be pure
22
20
  decodeURIComponent(window.location.hash.replace(/^#/, "")).slice(u.value.length)
23
- ), m = () => r.value = g(), $ = (e, n = window.location.href) => {
24
- const a = new URL(n);
25
- t.value.pathRouting ? a.pathname = d(t.value.pathRouting.basePath, e) : a.hash = u.value + e, r.value = e, window.history.replaceState({}, "", a);
26
- }, I = (e, n = window.location.href, a = window.location.search) => {
21
+ ), m = () => r.value = g(), v = (e, n = window.location.href) => {
27
22
  const o = new URL(n);
28
- return t.value.pathRouting ? o.pathname = d(t.value.pathRouting.basePath, e) : o.hash = u.value + e, o.search = a, o.toString();
29
- }, w = (e = r.value) => `${u.value}${e}`, S = (e) => typeof t.value.generateHeadingSlug == "function" ? `${t.value.generateHeadingSlug(e)}` : e.slug ? `description/${e.slug}` : "", R = (e, n) => {
30
- if (!(e != null && e.name))
23
+ t.value.pathRouting ? o.pathname = h(t.value.pathRouting.basePath, e) : o.hash = u.value + e, r.value = e, window.history.replaceState({}, "", o);
24
+ }, $ = (e, n = window.location.href, o = window.location.search) => {
25
+ const a = new URL(n);
26
+ return t.value.pathRouting ? a.pathname = h(t.value.pathRouting.basePath, e) : a.hash = u.value + e, a.search = o, a.toString();
27
+ }, w = (e = r.value) => `${u.value}${e}`, I = (e) => typeof t.value.generateHeadingSlug == "function" ? `${t.value.generateHeadingSlug(e)}` : e.slug ? `description/${e.slug}` : "", S = (e, n) => {
28
+ if (!e?.name)
31
29
  return "models";
32
- const a = n ? `${s(n)}/` : "";
33
- return typeof t.value.generateModelSlug == "function" ? `${a}model/${t.value.generateModelSlug(e)}` : `${a}model/${i(e.name)}`;
34
- }, s = (e) => typeof t.value.generateTagSlug == "function" ? `tag/${t.value.generateTagSlug(e)}` : `tag/${i(e.name ?? "")}`;
30
+ const o = n ? `${l(n)}/` : "";
31
+ return typeof t.value.generateModelSlug == "function" ? `${o}model/${t.value.generateModelSlug(e)}` : `${o}model/${s(e.name)}`;
32
+ }, l = (e) => typeof t.value.generateTagSlug == "function" ? `tag/${t.value.generateTagSlug(e)}` : `tag/${s(e.name ?? "")}`;
35
33
  return {
36
34
  hash: r,
37
35
  /** Sets the prefix for the hash */
@@ -50,35 +48,35 @@ const P = Symbol(), U = l(!1), x = l(""), k = l(""), T = (f) => {
50
48
  * @param url The url to get the hashed url from
51
49
  * @returns The hashed url
52
50
  */
53
- getHashedUrl: I,
51
+ getHashedUrl: $,
54
52
  /**
55
53
  * Replaces the URL state with the new url and hash
56
54
  * Replacement is used so that hash changes don't trigger the url hash watcher and cause a scroll
57
55
  */
58
- replaceUrlState: $,
56
+ replaceUrlState: v,
59
57
  getReferenceId: g,
60
58
  getWebhookId: (e, n) => {
61
- if (!(e != null && e.name))
59
+ if (!e?.name)
62
60
  return "webhooks";
63
- const a = n ? `${s(n)}/` : "";
64
- return typeof t.value.generateWebhookSlug == "function" ? `${a}webhook/${t.value.generateWebhookSlug(e)}` : `${a}webhook/${e.method}/${i(e.name)}`;
61
+ const o = n ? `${l(n)}/` : "";
62
+ return typeof t.value.generateWebhookSlug == "function" ? `${o}webhook/${t.value.generateWebhookSlug(e)}` : `${o}webhook/${e.method}/${s(e.name)}`;
65
63
  },
66
- getModelId: R,
67
- getHeadingId: S,
68
- getOperationId: (e, n) => typeof t.value.generateOperationSlug == "function" ? `${s(n)}/${t.value.generateOperationSlug({
64
+ getModelId: S,
65
+ getHeadingId: I,
66
+ getOperationId: (e, n) => typeof t.value.generateOperationSlug == "function" ? `${l(n)}/${t.value.generateOperationSlug({
69
67
  path: e.path,
70
68
  operationId: e.operationId,
71
69
  method: e.method,
72
70
  summary: e.summary
73
- })}` : `${s(n)}/${e.method}${e.path}`,
71
+ })}` : `${l(n)}/${e.method}${e.path}`,
74
72
  getPathRoutingId: c,
75
- getSectionId: v,
76
- getTagId: s,
77
- isIntersectionEnabled: p,
73
+ getSectionId: p,
74
+ getTagId: l,
75
+ isIntersectionEnabled: f,
78
76
  updateHash: m
79
77
  };
80
78
  };
81
79
  export {
82
- P as NAV_STATE_SYMBOL,
83
- T as useNavState
80
+ k as NAV_STATE_SYMBOL,
81
+ M as useNavState
84
82
  };