@scalar/api-reference 1.36.2 → 1.38.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 (242) hide show
  1. package/CHANGELOG.md +83 -0
  2. package/dist/browser/standalone.js +28796 -26431
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/ApiReferenceContent.vue.d.ts +34 -0
  5. package/dist/components/ApiReferenceContent.vue.d.ts.map +1 -0
  6. package/dist/components/ApiReferenceContent.vue.js +8 -0
  7. package/dist/components/ApiReferenceContent.vue2.js +148 -0
  8. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  9. package/dist/components/ApiReferenceLayout.vue.js +2 -2
  10. package/dist/components/ApiReferenceLayout.vue2.js +239 -219
  11. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts +2 -2
  12. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts.map +1 -1
  13. package/dist/components/Content/ClientLibraries/ClientSelector.vue.d.ts +1 -1
  14. package/dist/components/Content/ClientLibraries/ClientSelector.vue.d.ts.map +1 -1
  15. package/dist/components/Content/ClientLibraries/featured-clients.d.ts +1 -1
  16. package/dist/components/Content/ClientLibraries/featured-clients.d.ts.map +1 -1
  17. package/dist/components/Content/Content.vue.d.ts +21 -3
  18. package/dist/components/Content/Content.vue.d.ts.map +1 -1
  19. package/dist/components/Content/Content.vue.js +132 -95
  20. package/dist/components/Content/Models/ClassicLayout.vue.d.ts +4 -2
  21. package/dist/components/Content/Models/ClassicLayout.vue.d.ts.map +1 -1
  22. package/dist/components/Content/Models/ClassicLayout.vue.js +2 -2
  23. package/dist/components/Content/Models/ClassicLayout.vue2.js +28 -28
  24. package/dist/components/Content/Models/Models.vue.d.ts +10 -2
  25. package/dist/components/Content/Models/Models.vue.d.ts.map +1 -1
  26. package/dist/components/Content/Models/Models.vue.js +25 -27
  27. package/dist/components/Content/Models/ModernLayout.vue.d.ts +6 -2
  28. package/dist/components/Content/Models/ModernLayout.vue.d.ts.map +1 -1
  29. package/dist/components/Content/Models/ModernLayout.vue.js +1 -1
  30. package/dist/components/Content/Models/ModernLayout.vue2.js +30 -29
  31. package/dist/components/Content/Operations/TraversedEntry.vue.d.ts +20 -6
  32. package/dist/components/Content/Operations/TraversedEntry.vue.d.ts.map +1 -1
  33. package/dist/components/Content/Operations/TraversedEntry.vue.js +58 -46
  34. package/dist/components/Content/Operations/get-current-index.d.ts +1 -1
  35. package/dist/components/Content/Operations/get-current-index.d.ts.map +1 -1
  36. package/dist/components/Content/Schema/helpers/get-ref-name.d.ts.map +1 -1
  37. package/dist/components/Content/Schema/helpers/get-ref-name.js +9 -7
  38. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +1 -1
  39. package/dist/components/Content/Schema/helpers/schema-name.d.ts.map +1 -1
  40. package/dist/components/Content/Schema/helpers/schema-name.js +15 -14
  41. package/dist/components/Content/Tags/ClassicLayout.vue.d.ts +1 -1
  42. package/dist/components/Content/Tags/ClassicLayout.vue.d.ts.map +1 -1
  43. package/dist/components/Content/Tags/ClassicLayout.vue.js +2 -2
  44. package/dist/components/Content/Tags/ModernLayout.vue.d.ts +3 -1
  45. package/dist/components/Content/Tags/ModernLayout.vue.d.ts.map +1 -1
  46. package/dist/components/Content/Tags/ModernLayout.vue.js +1 -1
  47. package/dist/components/Content/Tags/ModernLayout.vue2.js +34 -30
  48. package/dist/components/Content/Tags/Tag.vue.d.ts +3 -1
  49. package/dist/components/Content/Tags/Tag.vue.d.ts.map +1 -1
  50. package/dist/components/Content/Tags/Tag.vue.js +14 -12
  51. package/dist/components/Content/Tags/TagSection.vue.d.ts +2 -1
  52. package/dist/components/Content/Tags/TagSection.vue.d.ts.map +1 -1
  53. package/dist/components/Content/Tags/TagSection.vue.js +49 -52
  54. package/dist/components/GettingStarted.vue.d.ts.map +1 -1
  55. package/dist/components/GettingStarted.vue.js +2 -2
  56. package/dist/components/GettingStarted.vue2.js +22 -22
  57. package/dist/components/OperationsList/OperationsList.vue.d.ts +1 -1
  58. package/dist/components/OperationsList/OperationsList.vue.d.ts.map +1 -1
  59. package/dist/components/OperationsList/OperationsList.vue.js +2 -2
  60. package/dist/components/OperationsList/OperationsListItem.vue.d.ts +1 -1
  61. package/dist/components/OperationsList/OperationsListItem.vue.d.ts.map +1 -1
  62. package/dist/components/OperationsList/OperationsListItem.vue.js +2 -2
  63. package/dist/components/ShowMoreButton.vue.d.ts +1 -0
  64. package/dist/components/ShowMoreButton.vue.d.ts.map +1 -1
  65. package/dist/components/ShowMoreButton.vue.js +2 -2
  66. package/dist/components/ShowMoreButton.vue2.js +12 -12
  67. package/dist/esm.d.ts +2 -2
  68. package/dist/esm.d.ts.map +1 -1
  69. package/dist/features/Operation/Operation.vue.d.ts +21 -9
  70. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  71. package/dist/features/Operation/Operation.vue.js +42 -53
  72. package/dist/features/Operation/components/Header.vue.d.ts +2 -2
  73. package/dist/features/Operation/components/Header.vue.d.ts.map +1 -1
  74. package/dist/features/Operation/components/Header.vue.js +9 -8
  75. package/dist/features/Operation/components/Headers.vue.d.ts +2 -2
  76. package/dist/features/Operation/components/Headers.vue.d.ts.map +1 -1
  77. package/dist/features/Operation/components/Headers.vue.js +2 -2
  78. package/dist/features/Operation/components/Headers.vue2.js +31 -29
  79. package/dist/features/Operation/components/OperationParameters.vue.d.ts +4 -0
  80. package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
  81. package/dist/features/Operation/components/OperationParameters.vue.js +37 -31
  82. package/dist/features/Operation/components/OperationResponses.vue.d.ts +5 -1
  83. package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
  84. package/dist/features/Operation/components/OperationResponses.vue.js +16 -17
  85. package/dist/features/Operation/components/ParameterList.vue.d.ts +6 -2
  86. package/dist/features/Operation/components/ParameterList.vue.d.ts.map +1 -1
  87. package/dist/features/Operation/components/ParameterList.vue.js +17 -19
  88. package/dist/features/Operation/components/ParameterListItem.vue.d.ts +6 -2
  89. package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
  90. package/dist/features/Operation/components/ParameterListItem.vue.js +3 -3
  91. package/dist/features/Operation/components/ParameterListItem.vue2.js +64 -65
  92. package/dist/features/Operation/components/RequestBody.vue.d.ts +4 -0
  93. package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
  94. package/dist/features/Operation/components/RequestBody.vue.js +2 -2
  95. package/dist/features/Operation/components/RequestBody.vue2.js +65 -65
  96. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +4 -0
  97. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
  98. package/dist/features/Operation/components/callbacks/Callback.vue.js +3 -3
  99. package/dist/features/Operation/components/callbacks/Callback.vue2.js +29 -22
  100. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts +6 -0
  101. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -1
  102. package/dist/features/Operation/components/callbacks/Callbacks.vue.js +18 -16
  103. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +11 -5
  104. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  105. package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
  106. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +99 -90
  107. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +12 -5
  108. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  109. package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
  110. package/dist/features/Operation/layouts/ModernLayout.vue2.js +99 -87
  111. package/dist/features/Search/helpers/create-search-index.d.ts +2 -1
  112. package/dist/features/Search/helpers/create-search-index.d.ts.map +1 -1
  113. package/dist/features/Search/types.d.ts +1 -1
  114. package/dist/features/Search/types.d.ts.map +1 -1
  115. package/dist/features/api-client-modal/ApiClientModal.vue.d.ts.map +1 -1
  116. package/dist/features/api-client-modal/ApiClientModal.vue.js +23 -26
  117. package/dist/features/api-client-modal/useApiClient.d.ts +3039 -2895
  118. package/dist/features/api-client-modal/useApiClient.d.ts.map +1 -1
  119. package/dist/features/document-source/hooks/useDocumentFetcher.d.ts +2 -2
  120. package/dist/features/document-source/hooks/useDocumentFetcher.d.ts.map +1 -1
  121. package/dist/features/document-source/hooks/useDocumentFetcher.js +13 -11
  122. package/dist/features/document-source/hooks/useDocumentSource.d.ts +2 -2
  123. package/dist/features/document-source/hooks/useDocumentSource.d.ts.map +1 -1
  124. package/dist/features/document-source/hooks/useDocumentSource.js +38 -34
  125. package/dist/features/example-responses/ExampleResponse.vue.d.ts.map +1 -1
  126. package/dist/features/example-responses/ExampleResponse.vue.js +3 -3
  127. package/dist/features/example-responses/ExampleResponse.vue2.js +26 -18
  128. package/dist/features/example-responses/ExampleResponses.vue.d.ts.map +1 -1
  129. package/dist/features/example-responses/ExampleResponses.vue.js +2 -2
  130. package/dist/features/example-responses/ExampleResponses.vue2.js +53 -53
  131. package/dist/features/multiple-documents/DocumentSelector.vue.d.ts +2 -2
  132. package/dist/features/multiple-documents/DocumentSelector.vue.d.ts.map +1 -1
  133. package/dist/features/multiple-documents/useMultipleDocuments.d.ts +10 -7
  134. package/dist/features/multiple-documents/useMultipleDocuments.d.ts.map +1 -1
  135. package/dist/features/multiple-documents/useMultipleDocuments.js +47 -44
  136. package/dist/features/test-request-button/TestRequestButton.vue.d.ts.map +1 -1
  137. package/dist/features/test-request-button/TestRequestButton.vue.js +2 -2
  138. package/dist/features/test-request-button/TestRequestButton.vue2.js +15 -21
  139. package/dist/features/toolbar/ApiReferenceToolbar.vue.js +18 -18
  140. package/dist/features/toolbar/ApiReferenceToolbarConfig.vue.js +1 -1
  141. package/dist/features/toolbar/ApiReferenceToolbarConfigTheme.vue.d.ts +2 -2
  142. package/dist/features/toolbar/ApiReferenceToolbarPopover.vue.js +1 -1
  143. package/dist/features/toolbar/ApiReferenceToolbarSdks.vue.js +1 -1
  144. package/dist/features/toolbar/ApiReferenceToolbarShare.vue.js +8 -8
  145. package/dist/features/toolbar/ApiReferenceToolbarShareRegister.vue.d.ts.map +1 -1
  146. package/dist/features/toolbar/ApiReferenceToolbarShareRegister.vue.js +34 -28
  147. package/dist/features/toolbar/ApiReferenceToolbarTitle.vue.js +27 -27
  148. package/dist/helpers/test-utils.d.ts +3 -365
  149. package/dist/helpers/test-utils.d.ts.map +1 -1
  150. package/dist/hooks/useNavState.d.ts +4 -2
  151. package/dist/hooks/useNavState.d.ts.map +1 -1
  152. package/dist/hooks/useNavState.js +31 -27
  153. package/dist/index.d.ts +1 -0
  154. package/dist/index.d.ts.map +1 -1
  155. package/dist/index.js +21 -19
  156. package/dist/standalone/lib/html-api.d.ts +3 -3
  157. package/dist/standalone/lib/html-api.d.ts.map +1 -1
  158. package/dist/standalone/lib/register-globals.d.ts.map +1 -1
  159. package/dist/style.css +1 -1
  160. package/dist/types.d.ts +2 -2
  161. package/dist/types.d.ts.map +1 -1
  162. package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
  163. package/dist/v2/ApiReferenceWorkspace.vue.js +46 -40
  164. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
  165. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +1 -1
  166. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue2.js +18 -19
  167. package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts +1 -1
  168. package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts.map +1 -1
  169. package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js +2 -2
  170. package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue2.js +11 -11
  171. package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue.d.ts +2 -2
  172. package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue.d.ts.map +1 -1
  173. package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue.js +2 -2
  174. package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue2.js +10 -10
  175. package/dist/v2/blocks/scalar-client-selector-block/helpers/featured-clients.d.ts +1 -1
  176. package/dist/v2/blocks/scalar-client-selector-block/helpers/featured-clients.d.ts.map +1 -1
  177. package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue.d.ts +3 -0
  178. package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue.d.ts.map +1 -1
  179. package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue.js +2 -2
  180. package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue2.js +32 -31
  181. package/dist/v2/blocks/scalar-info-block/components/InfoBlock.vue.d.ts +15 -8
  182. package/dist/v2/blocks/scalar-info-block/components/InfoBlock.vue.d.ts.map +1 -1
  183. package/dist/v2/blocks/scalar-info-block/components/InfoBlock.vue.js +25 -20
  184. package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue.d.ts +8 -7
  185. package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue.d.ts.map +1 -1
  186. package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue.js +2 -2
  187. package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue2.js +27 -32
  188. package/dist/v2/blocks/scalar-server-selector-block/components/Selector.vue.d.ts +2 -22
  189. package/dist/v2/blocks/scalar-server-selector-block/components/Selector.vue.d.ts.map +1 -1
  190. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue.d.ts +8 -0
  191. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue.d.ts.map +1 -1
  192. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue.js +2 -2
  193. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue2.js +70 -65
  194. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarElement.vue.d.ts +9 -1
  195. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarElement.vue.d.ts.map +1 -1
  196. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarElement.vue.js +2 -2
  197. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarElement.vue2.js +60 -57
  198. package/dist/v2/blocks/scalar-sidebar-block/helpers/create-sidebar.d.ts +3 -365
  199. package/dist/v2/blocks/scalar-sidebar-block/helpers/create-sidebar.d.ts.map +1 -1
  200. package/dist/v2/blocks/scalar-sidebar-block/helpers/generate-reverse-index.d.ts +3 -183
  201. package/dist/v2/blocks/scalar-sidebar-block/helpers/generate-reverse-index.d.ts.map +1 -1
  202. package/dist/v2/helpers/map-configuration.d.ts +24 -24
  203. package/dist/v2/helpers/map-configuration.d.ts.map +1 -1
  204. package/package.json +20 -17
  205. package/dist/components/Content/Operations/TraversedEntryContainer.vue.d.ts +0 -13
  206. package/dist/components/Content/Operations/TraversedEntryContainer.vue.d.ts.map +0 -1
  207. package/dist/components/Content/Operations/TraversedEntryContainer.vue.js +0 -52
  208. package/dist/components/Content/Operations/TraversedEntryContainer.vue2.js +0 -4
  209. package/dist/components/Content/Operations/index.d.ts +0 -2
  210. package/dist/components/Content/Operations/index.d.ts.map +0 -1
  211. package/dist/hooks/useConfig.d.ts +0 -9
  212. package/dist/hooks/useConfig.d.ts.map +0 -1
  213. package/dist/hooks/useConfig.js +0 -10
  214. package/dist/legacy/stores/index.d.ts +0 -2
  215. package/dist/legacy/stores/index.d.ts.map +0 -1
  216. package/dist/legacy/stores/useExampleStore.d.ts +0 -5
  217. package/dist/legacy/stores/useExampleStore.d.ts.map +0 -1
  218. package/dist/legacy/stores/useExampleStore.js +0 -8
  219. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.d.ts +0 -14
  220. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.d.ts.map +0 -1
  221. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.js +0 -4
  222. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue2.js +0 -55
  223. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts +0 -79
  224. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts.map +0 -1
  225. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.js +0 -7
  226. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue2.js +0 -236
  227. package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.d.ts +0 -41
  228. package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.d.ts.map +0 -1
  229. package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.js +0 -22
  230. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-client-options.d.ts +0 -20
  231. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-client-options.d.ts.map +0 -1
  232. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-client-options.js +0 -33
  233. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.d.ts +0 -17
  234. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.d.ts.map +0 -1
  235. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.js +0 -26
  236. package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.d.ts +0 -4
  237. package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.d.ts.map +0 -1
  238. package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.js +0 -10
  239. package/dist/v2/blocks/scalar-request-example-block/index.d.ts +0 -3
  240. package/dist/v2/blocks/scalar-request-example-block/index.d.ts.map +0 -1
  241. package/dist/v2/blocks/scalar-request-example-block/types.d.ts +0 -29
  242. package/dist/v2/blocks/scalar-request-example-block/types.d.ts.map +0 -1
@@ -1,95 +1,94 @@
1
- import { defineComponent as E, computed as o, ref as B, createElementBlock as C, openBlock as n, createVNode as u, createElementVNode as p, unref as r, withCtx as b, createBlock as d, createCommentVNode as h, normalizeClass as y, toDisplayString as P } from "vue";
2
- import { Disclosure as S, DisclosureButton as q, DisclosurePanel as V } from "@headlessui/vue";
3
- import { ScalarMarkdown as D } from "@scalar/components";
4
- import { isDefined as R } from "@scalar/helpers/array/is-defined";
5
- import { ScalarIconCaretRight as I } from "@scalar/icons";
6
- import { getResolvedRef as g } from "@scalar/workspace-store/helpers/get-resolved-ref";
7
- import O from "../../../components/Content/Schema/SchemaProperty.vue.js";
8
- import { useConfig as N } from "../../../hooks/useConfig.js";
9
- import j from "./ContentTypeSelect.vue.js";
10
- import z from "./Headers.vue.js";
11
- const F = { class: "parameter-item group/parameter-item relative" }, W = { class: "parameter-item-name" }, H = { class: "parameter-item-type" }, L = { class: "absolute top-3 right-0 opacity-0 group-focus-within/parameter-item:opacity-100 group-hover/parameter-item:opacity-100" }, Z = /* @__PURE__ */ E({
1
+ import { defineComponent as w, computed as m, ref as B, createElementBlock as E, openBlock as i, createVNode as u, createElementVNode as c, unref as s, withCtx as f, createBlock as d, createCommentVNode as h, normalizeClass as b, toDisplayString as S } from "vue";
2
+ import { Disclosure as q, DisclosureButton as R, DisclosurePanel as C } from "@headlessui/vue";
3
+ import { ScalarMarkdown as V } from "@scalar/components";
4
+ import { isDefined as x } from "@scalar/helpers/array/is-defined";
5
+ import { ScalarIconCaretRight as D } from "@scalar/icons";
6
+ import { getResolvedRef as y } from "@scalar/workspace-store/helpers/get-resolved-ref";
7
+ import F from "../../../components/Content/Schema/SchemaProperty.vue.js";
8
+ import O from "./ContentTypeSelect.vue.js";
9
+ import I from "./Headers.vue.js";
10
+ const N = { class: "parameter-item group/parameter-item relative" }, j = { class: "parameter-item-name" }, z = { class: "parameter-item-type" }, W = { class: "absolute top-3 right-0 opacity-0 group-focus-within/parameter-item:opacity-100 group-hover/parameter-item:opacity-100" }, Q = /* @__PURE__ */ w({
12
11
  __name: "ParameterListItem",
13
12
  props: {
14
13
  parameter: {},
15
14
  name: {},
16
- collapsableItems: { type: Boolean, default: !1 },
17
- withExamples: { type: Boolean, default: !0 },
18
- breadcrumb: {}
15
+ breadcrumb: {},
16
+ options: {}
19
17
  },
20
18
  setup(e) {
21
- const v = N(), s = o(
22
- () => "schema" in e.parameter && e.parameter.schema ? g(e.parameter.schema) : null
23
- ), t = o(
19
+ const l = m(
20
+ () => "schema" in e.parameter && e.parameter.schema ? y(e.parameter.schema) : null
21
+ ), a = m(
24
22
  () => "content" in e.parameter && e.parameter.content ? e.parameter.content : null
25
- ), i = B(Object.keys(t.value || {})[0]), f = o(
23
+ ), n = B(Object.keys(a.value || {})[0]), v = m(
26
24
  () => "headers" in e.parameter && e.parameter.headers ? e.parameter.headers : null
27
- ), k = o(() => {
28
- const a = t.value ? t.value?.[i.value]?.schema : s.value, c = "deprecated" in e.parameter ? e.parameter.deprecated : s.value?.deprecated, m = "examples" in e.parameter ? e.parameter.examples : {}, w = s.value?.examples ?? [], x = [...Object.values({
29
- ...m,
30
- ...t.value?.[i.value]?.examples
31
- }), ...w];
25
+ ), P = m(() => {
26
+ const r = a.value ? a.value?.[n.value]?.schema : l.value, p = "deprecated" in e.parameter ? e.parameter.deprecated : l.value?.deprecated, t = "examples" in e.parameter ? e.parameter.examples : {}, g = l.value?.examples ?? [], k = [...Object.values({
27
+ ...t,
28
+ ...a.value?.[n.value]?.examples
29
+ }), ...g];
32
30
  return {
33
- ...g(a),
34
- deprecated: c,
35
- ..."example" in e.parameter && R(e.parameter.example) && { example: e.parameter.example },
36
- examples: x
31
+ ...y(r),
32
+ deprecated: p,
33
+ ..."example" in e.parameter && x(e.parameter.example) && { example: e.parameter.example },
34
+ examples: k
37
35
  };
38
- }), l = o(
39
- () => !!(e.collapsableItems && (t.value || f.value || s.value))
36
+ }), o = m(
37
+ () => !!(e.options.collapsableItems && (a.value || v.value || l.value))
40
38
  );
41
- return (a, c) => (n(), C("li", F, [
42
- u(r(S), null, {
43
- default: b(({ open: m }) => [
44
- l.value ? (n(), d(r(q), {
39
+ return (r, p) => (i(), E("li", N, [
40
+ u(s(q), null, {
41
+ default: f(({ open: t }) => [
42
+ o.value ? (i(), d(s(R), {
45
43
  key: 0,
46
- class: y(["parameter-item-trigger", { "parameter-item-trigger-open": m }])
44
+ class: b(["parameter-item-trigger", { "parameter-item-trigger-open": t }])
47
45
  }, {
48
- default: b(() => [
49
- p("span", W, [
50
- u(r(I), {
51
- class: y(["parameter-item-icon size-3 transition-transform duration-100", { "rotate-90": m }]),
46
+ default: f(() => [
47
+ c("span", j, [
48
+ u(s(D), {
49
+ class: b(["parameter-item-icon size-3 transition-transform duration-100", { "rotate-90": t }]),
52
50
  weight: "bold"
53
51
  }, null, 8, ["class"]),
54
- p("span", null, P(a.name), 1)
52
+ c("span", null, S(r.name), 1)
55
53
  ]),
56
- p("span", H, [
57
- a.parameter.description ? (n(), d(r(D), {
54
+ c("span", z, [
55
+ r.parameter.description ? (i(), d(s(V), {
58
56
  key: 0,
59
57
  class: "markdown",
60
- value: a.parameter.description
58
+ value: r.parameter.description
61
59
  }, null, 8, ["value"])) : h("", !0)
62
60
  ])
63
61
  ]),
64
62
  _: 2
65
63
  }, 1032, ["class"])) : h("", !0),
66
- u(r(V), {
64
+ u(s(C), {
67
65
  class: "parameter-item-container parameter-item-container-markdown",
68
- static: !l.value
66
+ static: !o.value
69
67
  }, {
70
- default: b(() => [
71
- f.value ? (n(), d(z, {
68
+ default: f(() => [
69
+ v.value ? (i(), d(I, {
72
70
  key: 0,
73
- breadcrumb: a.breadcrumb,
74
- config: r(v),
75
- headers: f.value
76
- }, null, 8, ["breadcrumb", "config", "headers"])) : h("", !0),
77
- u(O, {
71
+ breadcrumb: r.breadcrumb,
72
+ headers: v.value,
73
+ orderRequiredPropertiesFirst: r.options.orderRequiredPropertiesFirst,
74
+ orderSchemaPropertiesBy: r.options.orderSchemaPropertiesBy
75
+ }, null, 8, ["breadcrumb", "headers", "orderRequiredPropertiesFirst", "orderSchemaPropertiesBy"])) : h("", !0),
76
+ u(F, {
78
77
  is: "div",
79
- breadcrumb: a.breadcrumb,
78
+ breadcrumb: r.breadcrumb,
80
79
  compact: "",
81
- description: l.value ? "" : a.parameter.description,
80
+ description: o.value ? "" : r.parameter.description,
82
81
  hideWriteOnly: !0,
83
- name: l.value ? "" : a.name,
82
+ name: o.value ? "" : r.name,
84
83
  noncollapsible: !0,
85
84
  options: {
86
85
  hideWriteOnly: !0,
87
- orderRequiredPropertiesFirst: r(v).orderRequiredPropertiesFirst,
88
- orderSchemaPropertiesBy: r(v).orderSchemaPropertiesBy
86
+ orderRequiredPropertiesFirst: r.options.orderRequiredPropertiesFirst,
87
+ orderSchemaPropertiesBy: r.options.orderSchemaPropertiesBy
89
88
  },
90
- required: "required" in a.parameter && a.parameter.required,
91
- schema: k.value,
92
- withExamples: a.withExamples
89
+ required: "required" in r.parameter && r.parameter.required,
90
+ schema: P.value,
91
+ withExamples: typeof r.options.withExamples == "boolean" ? r.options.withExamples : !0
93
92
  }, null, 8, ["breadcrumb", "description", "name", "options", "required", "schema", "withExamples"])
94
93
  ]),
95
94
  _: 1
@@ -97,18 +96,18 @@ const F = { class: "parameter-item group/parameter-item relative" }, W = { class
97
96
  ]),
98
97
  _: 1
99
98
  }),
100
- p("div", L, [
101
- l.value && t.value ? (n(), d(j, {
99
+ c("div", W, [
100
+ o.value && a.value ? (i(), d(O, {
102
101
  key: 0,
103
- modelValue: i.value,
104
- "onUpdate:modelValue": c[0] || (c[0] = (m) => i.value = m),
102
+ modelValue: n.value,
103
+ "onUpdate:modelValue": p[0] || (p[0] = (t) => n.value = t),
105
104
  class: "parameter-item-content-type",
106
- content: t.value
105
+ content: a.value
107
106
  }, null, 8, ["modelValue", "content"])) : h("", !0)
108
107
  ])
109
108
  ]));
110
109
  }
111
110
  });
112
111
  export {
113
- Z as default
112
+ Q as default
114
113
  };
@@ -2,6 +2,10 @@ import type { RequestBodyObject } from '@scalar/workspace-store/schemas/v3.1/str
2
2
  type __VLS_Props = {
3
3
  breadcrumb?: string[];
4
4
  requestBody?: RequestBodyObject;
5
+ options: {
6
+ orderRequiredPropertiesFirst: boolean | undefined;
7
+ orderSchemaPropertiesBy: 'alpha' | 'preserve' | undefined;
8
+ };
5
9
  };
6
10
  declare var __VLS_1: {};
7
11
  type __VLS_Slots = {} & {
@@ -1 +1 @@
1
- {"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/RequestBody.vue"],"names":[],"mappings":"AAqNA,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;AAqPF,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;AA0B7C,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":"AAsNA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8DAA8D,CAAA;AAYrG,KAAK,WAAW,GAAG;IACjB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,WAAW,CAAC,EAAE,iBAAiB,CAAA;IAC/B,OAAO,EAAE;QACP,4BAA4B,EAAE,OAAO,GAAG,SAAS,CAAA;QACjD,uBAAuB,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,CAAA;KAC1D,CAAA;CACF,CAAC;AAmPF,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-fa09c486"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-04c3170c"]]);
5
5
  export {
6
- f as default
6
+ m as default
7
7
  };
@@ -1,115 +1,115 @@
1
- import { defineComponent as B, computed as p, ref as P, createElementBlock as i, createCommentVNode as l, openBlock as d, createElementVNode as q, createVNode as a, renderSlot as f, unref as r } from "vue";
1
+ import { defineComponent as v, computed as m, ref as B, createElementBlock as s, createCommentVNode as u, openBlock as i, createElementVNode as h, createVNode as d, renderSlot as P, unref as l } from "vue";
2
2
  import { ScalarMarkdown as R } from "@scalar/components";
3
- import { getResolvedRef as S } from "@scalar/workspace-store/helpers/get-resolved-ref";
4
- import { isTypeObject as k } from "../../../components/Content/Schema/helpers/is-type-object.js";
5
- import { sortPropertyNames as O, reduceNamesToObject as v } from "../../../components/Content/Schema/helpers/sort-property-names.js";
6
- import { useConfig as _ } from "../../../hooks/useConfig.js";
7
- import F from "./ContentTypeSelect.vue.js";
8
- import y from "../../../components/Content/Schema/Schema.vue.js";
9
- const V = {
3
+ import { getResolvedRef as f } from "@scalar/workspace-store/helpers/get-resolved-ref";
4
+ import { isTypeObject as S } from "../../../components/Content/Schema/helpers/is-type-object.js";
5
+ import { sortPropertyNames as k, reduceNamesToObject as q } from "../../../components/Content/Schema/helpers/sort-property-names.js";
6
+ import O from "./ContentTypeSelect.vue.js";
7
+ import p from "../../../components/Content/Schema/Schema.vue.js";
8
+ const F = {
10
9
  key: 0,
11
10
  class: "request-body"
12
- }, N = { class: "request-body-header" }, g = { class: "request-body-title" }, C = {
11
+ }, V = { class: "request-body-header" }, N = { class: "request-body-title" }, E = {
13
12
  key: 0,
14
13
  class: "request-body-required"
15
- }, E = {
14
+ }, T = {
16
15
  key: 0,
17
16
  class: "request-body-description"
18
- }, T = {
17
+ }, j = {
19
18
  key: 0,
20
19
  class: "request-body-schema"
21
- }, j = {
20
+ }, C = {
22
21
  key: 1,
23
22
  class: "request-body-schema"
24
- }, b = 12, z = /* @__PURE__ */ B({
23
+ }, y = 12, U = /* @__PURE__ */ v({
25
24
  __name: "RequestBody",
26
25
  props: {
27
26
  breadcrumb: {},
28
- requestBody: {}
27
+ requestBody: {},
28
+ options: {}
29
29
  },
30
- setup(c) {
31
- const o = _(), h = p(
32
- () => Object.keys(c.requestBody?.content ?? {})
33
- ), u = P("application/json");
34
- c.requestBody?.content && h.value.length > 0 && (u.value = h.value[0]);
35
- const t = p(
36
- () => S(c.requestBody?.content?.[u.value]?.schema)
37
- ), m = p(() => {
38
- if (!t.value || !k(t.value))
30
+ setup(t) {
31
+ const b = m(
32
+ () => Object.keys(t.requestBody?.content ?? {})
33
+ ), a = B("application/json");
34
+ t.requestBody?.content && b.value.length > 0 && (a.value = b.value[0]);
35
+ const r = m(
36
+ () => f(t.requestBody?.content?.[a.value]?.schema)
37
+ ), c = m(() => {
38
+ if (!r.value || !S(r.value))
39
39
  return null;
40
- const e = O(
41
- t.value,
42
- t.value.discriminator,
40
+ const e = k(
41
+ r.value,
42
+ r.value.discriminator,
43
43
  {
44
44
  hideReadOnly: !0,
45
- orderSchemaPropertiesBy: o.value.orderSchemaPropertiesBy,
46
- orderRequiredPropertiesFirst: o.value.orderRequiredPropertiesFirst
45
+ orderSchemaPropertiesBy: t.options.orderSchemaPropertiesBy,
46
+ orderRequiredPropertiesFirst: t.options.orderRequiredPropertiesFirst
47
47
  }
48
48
  );
49
- if (e.length <= b)
49
+ if (e.length <= y)
50
50
  return null;
51
- const { properties: s, ...n } = t.value;
52
- return s ? {
51
+ const { properties: o, ...n } = r.value;
52
+ return o ? {
53
53
  visibleProperties: {
54
54
  ...n,
55
- properties: v(
56
- e.slice(0, b),
57
- s
55
+ properties: q(
56
+ e.slice(0, y),
57
+ o
58
58
  )
59
59
  },
60
60
  collapsedProperties: {
61
61
  ...n,
62
- properties: v(
63
- e.slice(b),
64
- s
62
+ properties: q(
63
+ e.slice(y),
64
+ o
65
65
  )
66
66
  }
67
67
  } : null;
68
68
  });
69
- return (e, s) => e.requestBody ? (d(), i("div", V, [
70
- q("div", N, [
71
- q("span", g, [
72
- f(e.$slots, "title", {}, void 0, !0),
73
- e.requestBody.required ? (d(), i("div", C, " required ")) : l("", !0)
69
+ return (e, o) => e.requestBody ? (i(), s("div", F, [
70
+ h("div", V, [
71
+ h("span", N, [
72
+ P(e.$slots, "title", {}, void 0, !0),
73
+ e.requestBody.required ? (i(), s("div", E, " required ")) : u("", !0)
74
74
  ]),
75
- a(F, {
76
- modelValue: u.value,
77
- "onUpdate:modelValue": s[0] || (s[0] = (n) => u.value = n),
75
+ d(O, {
76
+ modelValue: a.value,
77
+ "onUpdate:modelValue": o[0] || (o[0] = (n) => a.value = n),
78
78
  content: e.requestBody.content
79
79
  }, null, 8, ["modelValue", "content"]),
80
- e.requestBody.description ? (d(), i("div", E, [
81
- a(r(R), {
80
+ e.requestBody.description ? (i(), s("div", T, [
81
+ d(l(R), {
82
82
  value: e.requestBody.description
83
83
  }, null, 8, ["value"])
84
- ])) : l("", !0)
84
+ ])) : u("", !0)
85
85
  ]),
86
- m.value ? (d(), i("div", T, [
87
- a(r(y), {
86
+ c.value ? (i(), s("div", j, [
87
+ d(l(p), {
88
88
  breadcrumb: e.breadcrumb,
89
89
  compact: "",
90
90
  name: "Request Body",
91
91
  noncollapsible: "",
92
92
  options: {
93
93
  hideReadOnly: !0,
94
- orderRequiredPropertiesFirst: r(o).orderRequiredPropertiesFirst,
95
- orderSchemaPropertiesBy: r(o).orderSchemaPropertiesBy
94
+ orderRequiredPropertiesFirst: e.options.orderRequiredPropertiesFirst,
95
+ orderSchemaPropertiesBy: e.options.orderSchemaPropertiesBy
96
96
  },
97
- schema: m.value.visibleProperties
97
+ schema: c.value.visibleProperties
98
98
  }, null, 8, ["breadcrumb", "options", "schema"]),
99
- a(r(y), {
99
+ d(l(p), {
100
100
  additionalProperties: "",
101
101
  breadcrumb: e.breadcrumb,
102
102
  compact: "",
103
103
  name: "Request Body",
104
104
  options: {
105
105
  hideReadOnly: !0,
106
- orderRequiredPropertiesFirst: r(o).orderRequiredPropertiesFirst,
107
- orderSchemaPropertiesBy: r(o).orderSchemaPropertiesBy
106
+ orderRequiredPropertiesFirst: e.options.orderRequiredPropertiesFirst,
107
+ orderSchemaPropertiesBy: e.options.orderSchemaPropertiesBy
108
108
  },
109
- schema: m.value.collapsedProperties
109
+ schema: c.value.collapsedProperties
110
110
  }, null, 8, ["breadcrumb", "options", "schema"])
111
- ])) : t.value ? (d(), i("div", j, [
112
- a(r(y), {
111
+ ])) : r.value ? (i(), s("div", C, [
112
+ d(l(p), {
113
113
  breadcrumb: e.breadcrumb,
114
114
  compact: "",
115
115
  hideReadOnly: !0,
@@ -117,15 +117,15 @@ const V = {
117
117
  noncollapsible: "",
118
118
  options: {
119
119
  hideReadOnly: !0,
120
- orderRequiredPropertiesFirst: r(o).orderRequiredPropertiesFirst,
121
- orderSchemaPropertiesBy: r(o).orderSchemaPropertiesBy
120
+ orderRequiredPropertiesFirst: e.options.orderRequiredPropertiesFirst,
121
+ orderSchemaPropertiesBy: e.options.orderSchemaPropertiesBy
122
122
  },
123
- schema: t.value
123
+ schema: r.value
124
124
  }, null, 8, ["breadcrumb", "options", "schema"])
125
- ])) : l("", !0)
126
- ])) : l("", !0);
125
+ ])) : u("", !0)
126
+ ])) : u("", !0);
127
127
  }
128
128
  });
129
129
  export {
130
- z as default
130
+ U as default
131
131
  };
@@ -6,6 +6,10 @@ type __VLS_Props = {
6
6
  name: string;
7
7
  url: string;
8
8
  breadcrumb?: string[];
9
+ options: {
10
+ orderRequiredPropertiesFirst: boolean | undefined;
11
+ orderSchemaPropertiesBy: 'alpha' | 'preserve' | undefined;
12
+ };
9
13
  };
10
14
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
15
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"Callback.vue.d.ts","sourceRoot":"","sources":["../../../../../src/features/Operation/components/callbacks/Callback.vue"],"names":[],"mappings":"AA4GA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAGrF,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAMnG,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,eAAe,CAAA;IACzB,MAAM,EAAE,cAAc,CAAA;IACtB,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CACtB,CAAC;;AAoKF,wBAMG"}
1
+ {"version":3,"file":"Callback.vue.d.ts","sourceRoot":"","sources":["../../../../../src/features/Operation/components/callbacks/Callback.vue"],"names":[],"mappings":"AAsHA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAGrF,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAMnG,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,eAAe,CAAA;IACzB,MAAM,EAAE,cAAc,CAAA;IACtB,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,OAAO,EAAE;QACP,4BAA4B,EAAE,OAAO,GAAG,SAAS,CAAA;QACjD,uBAAuB,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,CAAA;KAC1D,CAAA;CACF,CAAC;;AAgLF,wBAMG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./Callback.vue2.js";
2
2
  /* empty css */
3
- import a from "../../../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ a(o, [["__scopeId", "data-v-d57c6ac8"]]);
3
+ import t from "../../../../_virtual/_plugin-vue_export-helper.js";
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-91cdfb30"]]);
5
5
  export {
6
- m as default
6
+ f as default
7
7
  };
@@ -1,45 +1,52 @@
1
- import { defineComponent as c, createElementBlock as n, openBlock as i, createElementVNode as t, createVNode as o, unref as a, createTextVNode as m, toDisplayString as s } from "vue";
2
- import { ScalarIconCaretRight as p } from "@scalar/icons";
3
- import { getResolvedRef as r } from "@scalar/workspace-store/helpers/get-resolved-ref";
1
+ import { defineComponent as i, createElementBlock as n, openBlock as c, createElementVNode as o, createVNode as t, unref as s, createTextVNode as p, toDisplayString as r } from "vue";
2
+ import { ScalarIconCaretRight as m } from "@scalar/icons";
3
+ import { getResolvedRef as a } from "@scalar/workspace-store/helpers/get-resolved-ref";
4
4
  import d from "../OperationParameters.vue.js";
5
- import f from "../OperationResponses.vue.js";
6
- import u from "../../../../components/HttpMethod/HttpMethod.vue.js";
7
- const _ = { class: "group callback-list-item" }, b = { class: "font-code bg-b-1 callback-sticky-offset callback-list-item-title sticky flex cursor-pointer flex-row items-start gap-2 border-t py-3 text-sm group-open:flex-wrap" }, h = { class: "text-c-1 min-w-0 flex-1 truncate leading-3 group-open:whitespace-normal" }, k = { class: "text-c-2" }, g = { class: "callback-operation-container flex flex-col gap-2" }, R = /* @__PURE__ */ c({
5
+ import u from "../OperationResponses.vue.js";
6
+ import f from "../../../../components/HttpMethod/HttpMethod.vue.js";
7
+ const b = { class: "group callback-list-item" }, h = { class: "font-code bg-b-1 callback-sticky-offset callback-list-item-title sticky flex cursor-pointer flex-row items-start gap-2 border-t py-3 text-sm group-open:flex-wrap" }, _ = { class: "text-c-1 min-w-0 flex-1 truncate leading-3 group-open:whitespace-normal" }, k = { class: "text-c-2" }, g = { class: "callback-operation-container flex flex-col gap-2" }, S = /* @__PURE__ */ i({
8
8
  __name: "Callback",
9
9
  props: {
10
10
  callback: {},
11
11
  method: {},
12
12
  name: {},
13
13
  url: {},
14
- breadcrumb: {}
14
+ breadcrumb: {},
15
+ options: {}
15
16
  },
16
17
  setup(y) {
17
- return (e, x) => (i(), n("details", _, [
18
- t("summary", b, [
19
- o(a(p), { class: "callback-list-item-icon text-c-3 group-hover:text-c-1 absolute top-3.5 -left-5 size-4 transition-transform duration-100 group-open:rotate-90" }),
20
- o(a(u), {
18
+ return (e, B) => (c(), n("details", b, [
19
+ o("summary", h, [
20
+ t(s(m), { class: "callback-list-item-icon text-c-3 group-hover:text-c-1 absolute top-3.5 -left-5 size-4 transition-transform duration-100 group-open:rotate-90" }),
21
+ t(s(f), {
21
22
  as: "span",
22
23
  class: "request-method py-0.75",
23
24
  method: e.method
24
25
  }, null, 8, ["method"]),
25
- t("div", h, [
26
- m(s(e.name) + " ", 1),
27
- t("span", k, s(e.url), 1)
26
+ o("div", _, [
27
+ p(r(e.name) + " ", 1),
28
+ o("span", k, r(e.url), 1)
28
29
  ])
29
30
  ]),
30
- t("div", g, [
31
- o(d, {
32
- parameters: e.callback.parameters?.map((l) => a(r)(l)) ?? [],
33
- requestBody: a(r)(e.callback.requestBody)
34
- }, null, 8, ["parameters", "requestBody"]),
35
- o(f, {
31
+ o("div", g, [
32
+ t(d, {
33
+ options: e.options,
34
+ parameters: e.callback.parameters?.map((l) => s(a)(l)) ?? [],
35
+ requestBody: s(a)(e.callback.requestBody)
36
+ }, null, 8, ["options", "parameters", "requestBody"]),
37
+ t(u, {
36
38
  collapsableItems: !1,
39
+ options: {
40
+ collapsableItems: !0,
41
+ orderRequiredPropertiesFirst: e.options.orderRequiredPropertiesFirst,
42
+ orderSchemaPropertiesBy: e.options.orderSchemaPropertiesBy
43
+ },
37
44
  responses: e.callback.responses
38
- }, null, 8, ["responses"])
45
+ }, null, 8, ["options", "responses"])
39
46
  ])
40
47
  ]));
41
48
  }
42
49
  });
43
50
  export {
44
- R as default
51
+ S as default
45
52
  };
@@ -4,6 +4,12 @@ type __VLS_Props = {
4
4
  path: string;
5
5
  method: HttpMethod;
6
6
  callbacks: CallbackObject;
7
+ options: {
8
+ collapsableItems?: boolean;
9
+ withExamples?: boolean;
10
+ orderRequiredPropertiesFirst: boolean | undefined;
11
+ orderSchemaPropertiesBy: 'alpha' | 'preserve' | undefined;
12
+ };
7
13
  };
8
14
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
15
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"Callbacks.vue.d.ts","sourceRoot":"","sources":["../../../../../src/features/Operation/components/callbacks/Callbacks.vue"],"names":[],"mappings":"AAkDA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAGnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8DAA8D,CAAA;AAIlG,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,UAAU,CAAA;IAClB,SAAS,EAAE,cAAc,CAAA;CAC1B,CAAC;;AA8EF,wBAMG"}
1
+ {"version":3,"file":"Callbacks.vue.d.ts","sourceRoot":"","sources":["../../../../../src/features/Operation/components/callbacks/Callbacks.vue"],"names":[],"mappings":"AAyDA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAGnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8DAA8D,CAAA;AAIlG,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,UAAU,CAAA;IAClB,SAAS,EAAE,cAAc,CAAA;IACzB,OAAO,EAAE;QACP,gBAAgB,CAAC,EAAE,OAAO,CAAA;QAC1B,YAAY,CAAC,EAAE,OAAO,CAAA;QACtB,4BAA4B,EAAE,OAAO,GAAG,SAAS,CAAA;QACjD,uBAAuB,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,CAAA;KAC1D,CAAA;CACF,CAAC;;AAgFF,wBAMG"}
@@ -1,29 +1,31 @@
1
- import { defineComponent as k, createElementBlock as t, openBlock as e, createElementVNode as f, Fragment as l, renderList as a, unref as s, createBlock as b, createCommentVNode as h } from "vue";
1
+ import { defineComponent as k, createElementBlock as t, openBlock as e, createElementVNode as f, Fragment as o, renderList as n, unref as m, createBlock as h, createCommentVNode as b } from "vue";
2
2
  import { isHttpMethod as C } from "@scalar/helpers/http/is-http-method";
3
3
  import { getResolvedRef as g } from "@scalar/workspace-store/helpers/get-resolved-ref";
4
4
  import y from "./Callback.vue.js";
5
- const _ = { class: "callbacks-list gap-3" }, E = /* @__PURE__ */ k({
5
+ const v = { class: "callbacks-list gap-3" }, R = /* @__PURE__ */ k({
6
6
  __name: "Callbacks",
7
7
  props: {
8
8
  path: {},
9
9
  method: {},
10
- callbacks: {}
10
+ callbacks: {},
11
+ options: {}
11
12
  },
12
- setup(m) {
13
- return (o, n) => (e(), t("div", _, [
14
- n[0] || (n[0] = f("div", { class: "callbacks-title text-c-1 my-3 text-lg font-medium" }, " Callbacks ", -1)),
15
- (e(!0), t(l, null, a(o.callbacks, (u, c) => (e(), t(l, { key: c }, [
16
- (e(!0), t(l, null, a(s(g)(u), (p, i) => (e(), t(l, null, [
17
- (e(!0), t(l, null, a(p, (d, r) => (e(), t(l, { key: r }, [
18
- s(C)(r) ? (e(), b(y, {
13
+ setup(p) {
14
+ return (l, a) => (e(), t("div", v, [
15
+ a[0] || (a[0] = f("div", { class: "callbacks-title text-c-1 my-3 text-lg font-medium" }, " Callbacks ", -1)),
16
+ (e(!0), t(o, null, n(l.callbacks, (i, s) => (e(), t(o, { key: s }, [
17
+ (e(!0), t(o, null, n(m(g)(i), (u, c) => (e(), t(o, null, [
18
+ (e(!0), t(o, null, n(u, (d, r) => (e(), t(o, { key: r }, [
19
+ m(C)(r) ? (e(), h(y, {
19
20
  key: 0,
20
21
  callback: d,
21
22
  method: r,
22
- name: c,
23
- operationMethod: m.method,
24
- path: o.path,
25
- url: i
26
- }, null, 8, ["callback", "method", "name", "operationMethod", "path", "url"])) : h("", !0)
23
+ name: s,
24
+ operationMethod: p.method,
25
+ options: l.options,
26
+ path: l.path,
27
+ url: c
28
+ }, null, 8, ["callback", "method", "name", "operationMethod", "options", "path", "url"])) : b("", !0)
27
29
  ], 64))), 128))
28
30
  ], 64))), 256))
29
31
  ], 64))), 128))
@@ -31,5 +33,5 @@ const _ = { class: "callbacks-list gap-3" }, E = /* @__PURE__ */ k({
31
33
  }
32
34
  });
33
35
  export {
34
- E as default
36
+ R as default
35
37
  };
@@ -1,19 +1,25 @@
1
+ import { type ClientOptionGroup } from '@scalar/api-client/v2/blocks/operation-code-sample';
1
2
  import type { HttpMethod as HttpMethodType } from '@scalar/helpers/http/http-methods';
2
- import type { ApiReferenceConfiguration } from '@scalar/types';
3
3
  import type { WorkspaceStore } from '@scalar/workspace-store/client';
4
4
  import type { OperationObject, SecuritySchemeObject, ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
5
- import type { ClientOptionGroup } from '../../../v2/blocks/scalar-request-example-block/types';
6
5
  type __VLS_Props = {
7
6
  id: string;
8
7
  path: string;
9
- clientOptions: ClientOptionGroup[];
10
8
  method: HttpMethodType;
11
- config: ApiReferenceConfiguration;
12
9
  operation: OperationObject;
13
- isWebhook: boolean;
14
10
  server: ServerObject | undefined;
15
11
  securitySchemes: SecuritySchemeObject[];
16
12
  store: WorkspaceStore;
13
+ /** Global options that can be derived from the top level config or assigned at a block level */
14
+ options: {
15
+ /** Sets some additional display properties when an operation is a webhook */
16
+ isWebhook: boolean;
17
+ clientOptions: ClientOptionGroup[];
18
+ showOperationId: boolean | undefined;
19
+ hideTestRequestButton: boolean | undefined;
20
+ orderRequiredPropertiesFirst: boolean | undefined;
21
+ orderSchemaPropertiesBy: 'alpha' | 'preserve' | undefined;
22
+ };
17
23
  };
18
24
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
25
  export default _default;