@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":"OperationsListItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/OperationsList/OperationsListItem.vue"],"names":[],"mappings":"AA0IA,OAAO,KAAK,EAEV,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,4BAA4B,CAAA;AAEnC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,kBAAkB,GAAG,gBAAgB,CAAA;IAChD,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAC;;AAgKF,wBAMG"}
1
+ {"version":3,"file":"OperationsListItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/OperationsList/OperationsListItem.vue"],"names":[],"mappings":"AAwHA,OAAO,KAAK,EAEV,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,8DAA8D,CAAA;AAOrE,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,kBAAkB,GAAG,gBAAgB,CAAA;IAChD,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAC;;AAsJF,wBAMG"}
@@ -1,7 +1,7 @@
1
1
  import t from "./OperationsListItem.vue2.js";
2
2
  /* empty css */
3
3
  import o from "../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ o(t, [["__scopeId", "data-v-e2dcc62f"]]);
4
+ const s = /* @__PURE__ */ o(t, [["__scopeId", "data-v-836b3c7f"]]);
5
5
  export {
6
- p as default
6
+ s as default
7
7
  };
@@ -1,63 +1,60 @@
1
- import { defineComponent as u, computed as y, createElementBlock as k, openBlock as r, createBlock as i, createCommentVNode as a, createElementVNode as s, unref as o, withCtx as l, createTextVNode as C, toDisplayString as p, withModifiers as g, createVNode as S, normalizeStyle as V, normalizeClass as b } from "vue";
2
- import { getHttpMethodInfo as v } from "@scalar/helpers/http/http-info";
3
- import { ScalarIconWebhooksLogo as B } from "@scalar/icons";
4
- import { isOperationDeprecated as H } from "@scalar/oas-utils/helpers";
5
- import { useSidebar as N } from "../../features/sidebar/hooks/useSidebar.js";
6
- import O from "../Section/SectionHeaderTag.vue.js";
7
- import T from "../HttpMethod/HttpMethod.vue.js";
8
- const w = ["href"], j = /* @__PURE__ */ u({
1
+ import { defineComponent as h, computed as u, createElementBlock as y, openBlock as r, createBlock as a, createCommentVNode as i, createElementVNode as s, unref as o, withCtx as l, createTextVNode as k, toDisplayString as p, withModifiers as C, createVNode as g, normalizeStyle as S, normalizeClass as V } from "vue";
2
+ import { getHttpMethodInfo as b } from "@scalar/helpers/http/http-info";
3
+ import { ScalarIconWebhooksLogo as v } from "@scalar/icons";
4
+ import { useSidebar as B } from "../../v2/blocks/scalar-sidebar-block/hooks/useSidebar.js";
5
+ import H from "../Section/SectionHeaderTag.vue.js";
6
+ import N from "../HttpMethod/HttpMethod.vue.js";
7
+ const T = ["href"], L = /* @__PURE__ */ h({
9
8
  __name: "OperationsListItem",
10
9
  props: {
11
10
  operation: {},
12
11
  isCollapsed: { type: Boolean }
13
12
  },
14
13
  setup(t) {
15
- const { scrollToOperation: d } = N(), m = async (e) => {
14
+ const { scrollToOperation: d } = B(), m = async (e) => {
16
15
  d(e.id, !0);
17
- }, c = y(() => "path" in t.operation ? t.operation.path : t.operation.title), f = (e) => "operation" in e && H(
18
- e.operation
19
- ), h = (e) => "webhook" in e;
20
- return (e, n) => (r(), k("li", {
16
+ }, c = u(() => "path" in t.operation ? t.operation.path : t.operation.title), f = (e) => e.type === "webhook";
17
+ return (e, n) => (r(), y("li", {
21
18
  key: e.operation.id,
22
19
  class: "contents"
23
20
  }, [
24
- e.isCollapsed ? (r(), i(o(O), {
21
+ e.isCollapsed ? (r(), a(o(H), {
25
22
  key: 0,
26
23
  class: "sr-only",
27
24
  level: 3
28
25
  }, {
29
26
  default: l(() => [
30
- C(p(e.operation.title) + " (Hidden) ", 1)
27
+ k(p(e.operation.title) + " (Hidden) ", 1)
31
28
  ]),
32
29
  _: 1
33
- })) : a("", !0),
30
+ })) : i("", !0),
34
31
  s("a", {
35
32
  class: "endpoint",
36
33
  href: `#${e.operation.id}`,
37
- onClick: n[0] || (n[0] = g((z) => m(e.operation), ["prevent"]))
34
+ onClick: n[0] || (n[0] = C((w) => m(e.operation), ["prevent"]))
38
35
  }, [
39
- S(o(T), {
36
+ g(o(N), {
40
37
  class: "endpoint-method items-center justify-end gap-2",
41
38
  method: e.operation.method
42
39
  }, {
43
40
  default: l(() => [
44
- h(e.operation) ? (r(), i(o(B), {
41
+ f(e.operation) ? (r(), a(o(v), {
45
42
  key: 0,
46
- style: V({
47
- color: o(v)(e.operation.method).colorVar
48
- }),
49
- class: "size-3.5"
50
- }, null, 8, ["style"])) : a("", !0)
43
+ class: "size-3.5",
44
+ style: S({
45
+ color: o(b)(e.operation.method).colorVar
46
+ })
47
+ }, null, 8, ["style"])) : i("", !0)
51
48
  ]),
52
49
  _: 1
53
50
  }, 8, ["method"]),
54
51
  s("span", {
55
- class: b(["endpoint-path", { deprecated: f(e.operation) }])
52
+ class: V(["endpoint-path", { deprecated: e.operation.isDeprecated }])
56
53
  }, p(c.value), 3)
57
- ], 8, w)
54
+ ], 8, T)
58
55
  ]));
59
56
  }
60
57
  });
61
58
  export {
62
- j as default
59
+ L as default
63
60
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Section.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Section/Section.vue"],"names":[],"mappings":"AAyEA,KAAK,WAAW,GAAG;IACjB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAC;AAiEF,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;AAqB/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"}
1
+ {"version":3,"file":"Section.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Section/Section.vue"],"names":[],"mappings":"AAiEA,KAAK,WAAW,GAAG;IACjB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAC;AA2DF,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;AAqB/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"}
@@ -1,7 +1,7 @@
1
1
  import o from "./Section.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-393971a5"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-dbc12a67"]]);
5
5
  export {
6
- p as default
6
+ m as default
7
7
  };
@@ -1,31 +1,30 @@
1
- import { defineComponent as l, createBlock as d, openBlock as c, withCtx as m, renderSlot as p } from "vue";
2
- import f from "../IntersectionObserver.vue.js";
3
- import { useNavState as u } from "../../hooks/useNavState.js";
4
- import { useSidebar as S } from "../../features/sidebar/hooks/useSidebar.js";
5
- const v = /* @__PURE__ */ l({
1
+ import { defineComponent as s, createBlock as a, openBlock as l, withCtx as c, renderSlot as d } from "vue";
2
+ import p from "../IntersectionObserver.vue.js";
3
+ import { useNavState as f } from "../../hooks/useNavState.js";
4
+ const b = /* @__PURE__ */ s({
6
5
  __name: "Section",
7
6
  props: {
8
7
  id: {},
9
8
  label: {}
10
9
  },
11
10
  setup(o) {
12
- const e = o, { getSectionId: i, isIntersectionEnabled: r, replaceUrlState: n } = u(), { setCollapsedSidebarItem: s } = S();
13
- function a() {
14
- !e.label || !r.value || (n(e.id ?? ""), (e.id?.startsWith("model") || e.id?.startsWith("webhook")) && s(i(e.id), !0));
11
+ const e = o, { isIntersectionEnabled: n, replaceUrlState: r } = f();
12
+ function i() {
13
+ !e.label || !n.value || r(e.id ?? "");
15
14
  }
16
- return (t, _) => (c(), d(f, {
15
+ return (t, u) => (l(), a(p, {
17
16
  is: "section",
18
17
  id: t.id,
19
18
  class: "section",
20
- onIntersecting: a
19
+ onIntersecting: i
21
20
  }, {
22
- default: m(() => [
23
- p(t.$slots, "default", {}, void 0, !0)
21
+ default: c(() => [
22
+ d(t.$slots, "default", {}, void 0, !0)
24
23
  ]),
25
24
  _: 3
26
25
  }, 8, ["id"]));
27
26
  }
28
27
  });
29
28
  export {
30
- v as default
29
+ b as default
31
30
  };
@@ -1 +1 @@
1
- {"version":3,"file":"SectionAccordion.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Section/SectionAccordion.vue"],"names":[],"mappings":"AA0JA,KAAK,WAAW,GAAG;IACjB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAC;AAmKF,QAAA,IAAyB,QAAQ,IAAW,EAAE,QAAQ;;CAAW,EAAE,QAAQ,IAAW,EAAE,QAAQ,IAAY,CAAE;AAC9G,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC3C;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC7C;IAAE,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GACjD;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AA4BhD,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":"SectionAccordion.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Section/SectionAccordion.vue"],"names":[],"mappings":"AAkJA,KAAK,WAAW,GAAG;IACjB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAC;AA6JF,QAAA,IAAyB,QAAQ,IAAW,EAAE,QAAQ;;CAAW,EAAE,QAAQ,IAAW,EAAE,QAAQ,IAAY,CAAE;AAC9G,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC3C;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC7C;IAAE,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GACjD;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AA4BhD,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,7 +1,7 @@
1
1
  import o from "./SectionAccordion.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-d3d6e381"]]);
4
+ const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-224efaa7"]]);
5
5
  export {
6
6
  e as default
7
7
  };
@@ -1,64 +1,63 @@
1
- import { defineComponent as k, ref as $, createBlock as C, openBlock as c, withCtx as s, createVNode as n, unref as o, normalizeClass as d, createElementVNode as l, createElementBlock as u, createCommentVNode as m, renderSlot as i } from "vue";
2
- import { Disclosure as B, DisclosureButton as I, DisclosurePanel as _ } from "@headlessui/vue";
3
- import { ScalarIconCaretRight as y } from "@scalar/icons";
4
- import { useElementHover as E } from "@vueuse/core";
5
- import { useNavState as N } from "../../hooks/useNavState.js";
6
- import g from "../IntersectionObserver.vue.js";
7
- import { useSidebar as w } from "../../features/sidebar/hooks/useSidebar.js";
8
- const D = { class: "section-accordion-button-content" }, V = {
1
+ import { defineComponent as h, ref as $, createBlock as b, openBlock as c, withCtx as e, createVNode as s, unref as t, normalizeClass as l, createElementVNode as d, createElementBlock as u, createCommentVNode as m, renderSlot as n } from "vue";
2
+ import { Disclosure as k, DisclosureButton as S, DisclosurePanel as B } from "@headlessui/vue";
3
+ import { ScalarIconCaretRight as C } from "@scalar/icons";
4
+ import { useElementHover as y } from "@vueuse/core";
5
+ import { useNavState as E } from "../../hooks/useNavState.js";
6
+ import N from "../IntersectionObserver.vue.js";
7
+ const D = { class: "section-accordion-button-content" }, I = {
9
8
  key: 0,
10
9
  class: "section-accordion-button-actions"
11
- }, z = {
10
+ }, V = {
12
11
  key: 0,
13
12
  class: "section-accordion-description"
14
- }, H = { class: "section-accordion-content-card" }, G = /* @__PURE__ */ k({
13
+ }, g = { class: "section-accordion-content-card" }, j = /* @__PURE__ */ h({
15
14
  __name: "SectionAccordion",
16
15
  props: {
17
16
  id: {},
18
17
  transparent: { type: Boolean }
19
18
  },
20
- setup(e) {
21
- const r = $(), f = E(r), { getSectionId: p, isIntersectionEnabled: v, replaceUrlState: h } = N(), { setCollapsedSidebarItem: b } = w(), S = () => {
22
- !e.id || !v.value || (h(e.id), (e.id?.startsWith("model") || e.id?.startsWith("webhook")) && b(p(e.id), !0));
19
+ setup(r) {
20
+ const i = $(), f = y(i), { isIntersectionEnabled: p, replaceUrlState: v } = E(), _ = () => {
21
+ !r.id || !p.value || v(r.id);
23
22
  };
24
- return (t, W) => (c(), C(g, {
25
- id: t.id,
23
+ return (o, w) => (c(), b(N, {
24
+ id: o.id,
26
25
  class: "section-wrapper",
27
- onIntersecting: S
26
+ onIntersecting: _
28
27
  }, {
29
- default: s(() => [
30
- n(o(B), {
28
+ default: e(() => [
29
+ s(t(k), {
31
30
  as: "section",
32
- class: d(["section-accordion", { "section-accordion-transparent": t.transparent }])
31
+ class: l(["section-accordion", { "section-accordion-transparent": o.transparent }])
33
32
  }, {
34
- default: s(({ open: a }) => [
35
- n(o(I), {
33
+ default: e(({ open: a }) => [
34
+ s(t(S), {
36
35
  ref_key: "button",
37
- ref: r,
36
+ ref: i,
38
37
  class: "section-accordion-button"
39
38
  }, {
40
- default: s(() => [
41
- l("div", D, [
42
- i(t.$slots, "title", {}, void 0, !0)
39
+ default: e(() => [
40
+ d("div", D, [
41
+ n(o.$slots, "title", {}, void 0, !0)
43
42
  ]),
44
- t.$slots.actions ? (c(), u("div", V, [
45
- i(t.$slots, "actions", {
46
- active: o(f) || a
43
+ o.$slots.actions ? (c(), u("div", I, [
44
+ n(o.$slots, "actions", {
45
+ active: t(f) || a
47
46
  }, void 0, !0)
48
47
  ])) : m("", !0),
49
- n(o(y), {
50
- class: d(["section-accordion-chevron size-4.5 transition-transform", { "rotate-90": a }])
48
+ s(t(C), {
49
+ class: l(["section-accordion-chevron size-4.5 transition-transform", { "rotate-90": a }])
51
50
  }, null, 8, ["class"])
52
51
  ]),
53
52
  _: 2
54
53
  }, 1536),
55
- n(o(_), { class: "section-accordion-content" }, {
56
- default: s(() => [
57
- t.$slots.description ? (c(), u("div", z, [
58
- i(t.$slots, "description", {}, void 0, !0)
54
+ s(t(B), { class: "section-accordion-content" }, {
55
+ default: e(() => [
56
+ o.$slots.description ? (c(), u("div", V, [
57
+ n(o.$slots, "description", {}, void 0, !0)
59
58
  ])) : m("", !0),
60
- l("div", H, [
61
- i(t.$slots, "default", {}, void 0, !0)
59
+ d("div", g, [
60
+ n(o.$slots, "default", {}, void 0, !0)
62
61
  ])
63
62
  ]),
64
63
  _: 3
@@ -72,5 +71,5 @@ const D = { class: "section-accordion-button-content" }, V = {
72
71
  }
73
72
  });
74
73
  export {
75
- G as default
74
+ j as default
76
75
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./ShowMoreButton.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-b2ca4789"]]);
4
+ const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-46471107"]]);
5
5
  export {
6
- p as default
6
+ _ as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as c, createElementBlock as i, openBlock as s, createTextVNode as a, createVNode as m, unref as l } from "vue";
2
2
  import { ScalarIconCaretDown as d } from "@scalar/icons";
3
3
  import { useConfig as u } from "../hooks/useConfig.js";
4
- import { useSidebar as f } from "../features/sidebar/hooks/useSidebar.js";
4
+ import { useSidebar as f } from "../v2/blocks/scalar-sidebar-block/hooks/useSidebar.js";
5
5
  const h = /* @__PURE__ */ c({
6
6
  __name: "ShowMoreButton",
7
7
  props: {
@@ -18,8 +18,8 @@ const h = /* @__PURE__ */ c({
18
18
  }, [
19
19
  o[0] || (o[0] = a(" Show More ")),
20
20
  m(l(d), {
21
- weight: "bold",
22
- class: "text-c-2 mt-0.25 size-3"
21
+ class: "text-c-2 mt-0.25 size-3",
22
+ weight: "bold"
23
23
  })
24
24
  ]));
25
25
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Operation.vue.d.ts","sourceRoot":"","sources":["../../../src/features/Operation/Operation.vue"],"names":[],"mappings":"AA4GA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AACzE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAEpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAKnG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAA;AAKvF,KAAK,WAAW,GAAG;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,UAAU,CAAA;IAClB,aAAa,EAAE,iBAAiB,EAAE,CAAA;IAClC,MAAM,EAAE,yBAAyB,CAAA;IACjC,QAAQ,EAAE,eAAe,CAAA;IACzB,SAAS,EAAE,OAAO,CAAA;IAClB,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,KAAK,EAAE,cAAc,CAAA;IACrB,iGAAiG;IACjG,UAAU,EAAE,UAAU,CAAA;CACvB,CAAC;;AA0IJ,wBAMG"}
1
+ {"version":3,"file":"Operation.vue.d.ts","sourceRoot":"","sources":["../../../src/features/Operation/Operation.vue"],"names":[],"mappings":"AA8HA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AACzE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAEpE,OAAO,KAAK,EACV,eAAe,EAEhB,MAAM,8DAA8D,CAAA;AAKrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAA;AAMvF,KAAK,WAAW,GAAG;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,UAAU,CAAA;IAClB,aAAa,EAAE,iBAAiB,EAAE,CAAA;IAClC,MAAM,EAAE,yBAAyB,CAAA;IACjC,QAAQ,EAAE,eAAe,CAAA;IACzB,SAAS,EAAE,OAAO,CAAA;IAClB,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,KAAK,EAAE,cAAc,CAAA;IACrB,iGAAiG;IACjG,UAAU,EAAE,UAAU,CAAA;CACvB,CAAC;;AAyJJ,wBAMG"}
@@ -1,12 +1,13 @@
1
- import { defineComponent as l, computed as r, createElementBlock as u, createCommentVNode as h, openBlock as i, Fragment as p, createBlock as m } from "vue";
2
- import { useWorkspace as d } from "@scalar/api-client/store";
1
+ import { defineComponent as u, computed as r, createElementBlock as h, createCommentVNode as p, openBlock as s, Fragment as d, createBlock as m } from "vue";
2
+ import { useWorkspace as v } from "@scalar/api-client/store";
3
3
  import { filterSecurityRequirements as f } from "@scalar/api-client/views/Request/RequestSection";
4
4
  import { getResolvedRef as y } from "@scalar/workspace-store/helpers/get-resolved-ref";
5
- import { combineParams as v } from "./helpers/combine-params.js";
6
- import { convertSecurityScheme as k } from "../../helpers/convert-security-scheme.js";
7
- import S from "./layouts/ClassicLayout.vue.js";
8
- import b from "./layouts/ModernLayout.vue.js";
9
- const w = /* @__PURE__ */ l({
5
+ import { combineParams as k } from "./helpers/combine-params.js";
6
+ import { convertSecurityScheme as S } from "../../helpers/convert-security-scheme.js";
7
+ import { getFirstServer as g } from "./helpers/get-first-server.js";
8
+ import b from "./layouts/ClassicLayout.vue.js";
9
+ import W from "./layouts/ModernLayout.vue.js";
10
+ const I = /* @__PURE__ */ u({
10
11
  __name: "Operation",
11
12
  props: {
12
13
  path: {},
@@ -21,27 +22,36 @@ const w = /* @__PURE__ */ l({
21
22
  collection: {}
22
23
  },
23
24
  setup(o) {
24
- const s = r(() => {
25
+ const i = r(() => {
25
26
  const e = o.isWebhook ? "webhooks" : "paths";
26
27
  return o.document[e]?.[o.path];
27
28
  }), t = r(() => {
28
- const e = y(s.value?.[o.method]);
29
+ const e = y(i.value?.[o.method]);
29
30
  if (!e)
30
31
  return null;
31
- const c = v(
32
- s.value?.parameters,
32
+ const a = k(
33
+ i.value?.parameters,
33
34
  e.parameters
34
35
  );
35
- return { ...e, parameters: c };
36
- }), { securitySchemes: a } = d(), n = r(
36
+ return { ...e, parameters: a };
37
+ }), { securitySchemes: l } = v(), n = r(
37
38
  () => f(
38
39
  t.value?.security || o.document.security || [],
39
40
  o.collection.selectedSecuritySchemeUids,
40
- a
41
- ).map(k)
41
+ l
42
+ ).map(S)
43
+ ), c = r(
44
+ () => g(
45
+ // 1) Operation
46
+ t.value?.servers,
47
+ // 2) Path Item
48
+ i.value?.servers,
49
+ // 3) Document
50
+ o.server
51
+ )
42
52
  );
43
- return (e, c) => t.value ? (i(), u(p, { key: 0 }, [
44
- e.config.layout === "classic" ? (i(), m(S, {
53
+ return (e, a) => t.value ? (s(), h(d, { key: 0 }, [
54
+ e.config.layout === "classic" ? (s(), m(b, {
45
55
  key: 0,
46
56
  id: e.id,
47
57
  clientOptions: e.clientOptions,
@@ -51,9 +61,9 @@ const w = /* @__PURE__ */ l({
51
61
  operation: t.value,
52
62
  path: e.path,
53
63
  securitySchemes: n.value,
54
- server: e.server,
64
+ server: c.value,
55
65
  store: e.store
56
- }, null, 8, ["id", "clientOptions", "config", "isWebhook", "method", "operation", "path", "securitySchemes", "server", "store"])) : (i(), m(b, {
66
+ }, null, 8, ["id", "clientOptions", "config", "isWebhook", "method", "operation", "path", "securitySchemes", "server", "store"])) : (s(), m(W, {
57
67
  key: 1,
58
68
  id: e.id,
59
69
  clientOptions: e.clientOptions,
@@ -63,12 +73,12 @@ const w = /* @__PURE__ */ l({
63
73
  operation: t.value,
64
74
  path: e.path,
65
75
  securitySchemes: n.value,
66
- server: e.server,
76
+ server: c.value,
67
77
  store: e.store
68
78
  }, null, 8, ["id", "clientOptions", "config", "isWebhook", "method", "operation", "path", "securitySchemes", "server", "store"]))
69
- ], 64)) : h("", !0);
79
+ ], 64)) : p("", !0);
70
80
  }
71
81
  });
72
82
  export {
73
- w as default
83
+ I as default
74
84
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/RequestBody.vue"],"names":[],"mappings":"AAkLA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8DAA8D,CAAA;AAQrG,KAAK,WAAW,GAAG;IACjB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,WAAW,CAAC,EAAE,iBAAiB,CAAA;CAChC,CAAC;AA0MF,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAyB7C,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":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/RequestBody.vue"],"names":[],"mappings":"AAwMA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8DAA8D,CAAA;AAarG,KAAK,WAAW,GAAG;IACjB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,WAAW,CAAC,EAAE,iBAAiB,CAAA;CAChC,CAAC;AA2NF,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAyB7C,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,7 +1,7 @@
1
1
  import o from "./RequestBody.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-74a1b5fb"]]);
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-7fa165b9"]]);
5
5
  export {
6
6
  f as default
7
7
  };
@@ -1,78 +1,90 @@
1
- import { defineComponent as h, computed as m, ref as q, createElementBlock as r, createCommentVNode as l, openBlock as o, createElementVNode as v, createVNode as s, renderSlot as f, unref as d } from "vue";
2
- import { ScalarMarkdown as B } from "@scalar/components";
3
- import { getResolvedRef as R } from "@scalar/workspace-store/helpers/get-resolved-ref";
4
- import { isTypeObject as k } from "../../../components/Content/Schema/helpers/is-type-object.js";
5
- import O from "./ContentTypeSelect.vue.js";
1
+ import { defineComponent as f, computed as m, ref as B, createElementBlock as o, createCommentVNode as l, openBlock as s, createElementVNode as h, createVNode as a, renderSlot as R, unref as n } from "vue";
2
+ import { ScalarMarkdown as P } from "@scalar/components";
3
+ import { getResolvedRef as k } from "@scalar/workspace-store/helpers/get-resolved-ref";
4
+ import { isTypeObject as _ } from "../../../components/Content/Schema/helpers/is-type-object.js";
5
+ import { sortPropertyNames as O, reduceNamesToObject as q } from "../../../components/Content/Schema/helpers/sort-property-names.js";
6
+ import { useConfig as S } from "../../../hooks/useConfig.js";
7
+ import V from "./ContentTypeSelect.vue.js";
6
8
  import p from "../../../components/Content/Schema/Schema.vue.js";
7
- const _ = {
9
+ const N = {
8
10
  key: 0,
9
11
  class: "request-body"
10
- }, E = { class: "request-body-header" }, P = { class: "request-body-title" }, V = {
12
+ }, g = { class: "request-body-header" }, C = { class: "request-body-title" }, E = {
11
13
  key: 0,
12
14
  class: "request-body-required"
13
- }, j = {
15
+ }, T = {
14
16
  key: 0,
15
17
  class: "request-body-description"
16
- }, S = {
18
+ }, j = {
17
19
  key: 0,
18
20
  class: "request-body-schema"
19
- }, C = {
21
+ }, I = {
20
22
  key: 1,
21
23
  class: "request-body-schema"
22
- }, b = 12, w = /* @__PURE__ */ h({
24
+ }, y = 12, z = /* @__PURE__ */ f({
23
25
  __name: "RequestBody",
24
26
  props: {
25
27
  breadcrumb: {},
26
28
  requestBody: {}
27
29
  },
28
- setup(u) {
29
- const y = m(
30
- () => Object.keys(u.requestBody?.content ?? {})
31
- ), a = q("application/json");
32
- u.requestBody?.content && y.value.length > 0 && (a.value = y.value[0]);
33
- const t = m(
34
- () => R(u.requestBody?.content?.[a.value]?.schema)
30
+ setup(i) {
31
+ const b = S(), v = m(
32
+ () => Object.keys(i.requestBody?.content ?? {})
33
+ ), d = B("application/json");
34
+ i.requestBody?.content && v.value.length > 0 && (d.value = v.value[0]);
35
+ const r = m(
36
+ () => k(i.requestBody?.content?.[d.value]?.schema)
35
37
  ), c = m(() => {
36
- if (!t.value || !k(t.value))
38
+ if (!r.value || !_(r.value))
37
39
  return null;
38
- const e = Object.entries(t.value.properties ?? {});
39
- if (e.length <= b)
40
+ const e = O(
41
+ r.value,
42
+ r.value.discriminator,
43
+ {
44
+ hideReadOnly: !0,
45
+ orderSchemaPropertiesBy: b.value.orderSchemaPropertiesBy,
46
+ orderRequiredPropertiesFirst: b.value.orderRequiredPropertiesFirst
47
+ }
48
+ );
49
+ if (e.length <= y)
40
50
  return null;
41
- const { properties: i, ...n } = t.value;
42
- return {
51
+ const { properties: t, ...u } = r.value;
52
+ return t ? {
43
53
  visibleProperties: {
44
- ...n,
45
- properties: Object.fromEntries(
46
- e.slice(0, b)
54
+ ...u,
55
+ properties: q(
56
+ e.slice(0, y),
57
+ t
47
58
  )
48
59
  },
49
60
  collapsedProperties: {
50
- ...n,
51
- properties: Object.fromEntries(
52
- e.slice(b)
61
+ ...u,
62
+ properties: q(
63
+ e.slice(y),
64
+ t
53
65
  )
54
66
  }
55
- };
67
+ } : null;
56
68
  });
57
- return (e, i) => e.requestBody ? (o(), r("div", _, [
58
- v("div", E, [
59
- v("span", P, [
60
- f(e.$slots, "title", {}, void 0, !0),
61
- e.requestBody.required ? (o(), r("div", V, " required ")) : l("", !0)
69
+ return (e, t) => e.requestBody ? (s(), o("div", N, [
70
+ h("div", g, [
71
+ h("span", C, [
72
+ R(e.$slots, "title", {}, void 0, !0),
73
+ e.requestBody.required ? (s(), o("div", E, " required ")) : l("", !0)
62
74
  ]),
63
- s(O, {
64
- modelValue: a.value,
65
- "onUpdate:modelValue": i[0] || (i[0] = (n) => a.value = n),
75
+ a(V, {
76
+ modelValue: d.value,
77
+ "onUpdate:modelValue": t[0] || (t[0] = (u) => d.value = u),
66
78
  content: e.requestBody.content
67
79
  }, null, 8, ["modelValue", "content"]),
68
- e.requestBody.description ? (o(), r("div", j, [
69
- s(d(B), {
80
+ e.requestBody.description ? (s(), o("div", T, [
81
+ a(n(P), {
70
82
  value: e.requestBody.description
71
83
  }, null, 8, ["value"])
72
84
  ])) : l("", !0)
73
85
  ]),
74
- c.value ? (o(), r("div", S, [
75
- s(d(p), {
86
+ c.value ? (s(), o("div", j, [
87
+ a(n(p), {
76
88
  breadcrumb: e.breadcrumb,
77
89
  compact: "",
78
90
  hideReadOnly: !0,
@@ -80,7 +92,7 @@ const _ = {
80
92
  noncollapsible: "",
81
93
  schema: c.value.visibleProperties
82
94
  }, null, 8, ["breadcrumb", "schema"]),
83
- s(d(p), {
95
+ a(n(p), {
84
96
  additionalProperties: "",
85
97
  breadcrumb: e.breadcrumb,
86
98
  compact: "",
@@ -88,19 +100,19 @@ const _ = {
88
100
  name: "Request Body",
89
101
  schema: c.value.collapsedProperties
90
102
  }, null, 8, ["breadcrumb", "schema"])
91
- ])) : t.value ? (o(), r("div", C, [
92
- s(d(p), {
103
+ ])) : r.value ? (s(), o("div", I, [
104
+ a(n(p), {
93
105
  breadcrumb: e.breadcrumb,
94
106
  compact: "",
95
107
  hideReadOnly: !0,
96
108
  name: "Request Body",
97
109
  noncollapsible: "",
98
- schema: t.value
110
+ schema: r.value
99
111
  }, null, 8, ["breadcrumb", "schema"])
100
112
  ])) : l("", !0)
101
113
  ])) : l("", !0);
102
114
  }
103
115
  });
104
116
  export {
105
- w as default
117
+ z as default
106
118
  };
@@ -0,0 +1,9 @@
1
+ import type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
2
+ /**
3
+ * Iterate through all available servers and pick the first one
4
+ *
5
+ * @example
6
+ * getFirstServer([operation.servers, pathItem.servers, server])
7
+ */
8
+ export declare function getFirstServer(...availableServers: (ServerObject[] | ServerObject | undefined)[]): ServerObject | undefined;
9
+ //# sourceMappingURL=get-first-server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-first-server.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/helpers/get-first-server.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAEhG;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,GAAG,gBAAgB,EAAE,CAAC,YAAY,EAAE,GAAG,YAAY,GAAG,SAAS,CAAC,EAAE,GACjE,YAAY,GAAG,SAAS,CAyB1B"}