@scalar/api-reference 1.36.2 → 1.37.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 (226) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/dist/browser/standalone.js +26143 -25935
  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/OperationsList/OperationsList.vue.d.ts +1 -1
  55. package/dist/components/OperationsList/OperationsList.vue.d.ts.map +1 -1
  56. package/dist/components/OperationsList/OperationsList.vue.js +2 -2
  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/ShowMoreButton.vue.d.ts +1 -0
  61. package/dist/components/ShowMoreButton.vue.d.ts.map +1 -1
  62. package/dist/components/ShowMoreButton.vue.js +2 -2
  63. package/dist/components/ShowMoreButton.vue2.js +12 -12
  64. package/dist/features/Operation/Operation.vue.d.ts +21 -9
  65. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  66. package/dist/features/Operation/Operation.vue.js +42 -53
  67. package/dist/features/Operation/components/Header.vue.d.ts +2 -2
  68. package/dist/features/Operation/components/Header.vue.d.ts.map +1 -1
  69. package/dist/features/Operation/components/Header.vue.js +9 -8
  70. package/dist/features/Operation/components/Headers.vue.d.ts +2 -2
  71. package/dist/features/Operation/components/Headers.vue.d.ts.map +1 -1
  72. package/dist/features/Operation/components/Headers.vue.js +2 -2
  73. package/dist/features/Operation/components/Headers.vue2.js +31 -29
  74. package/dist/features/Operation/components/OperationParameters.vue.d.ts +4 -0
  75. package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
  76. package/dist/features/Operation/components/OperationParameters.vue.js +37 -31
  77. package/dist/features/Operation/components/OperationResponses.vue.d.ts +5 -1
  78. package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
  79. package/dist/features/Operation/components/OperationResponses.vue.js +16 -17
  80. package/dist/features/Operation/components/ParameterList.vue.d.ts +6 -2
  81. package/dist/features/Operation/components/ParameterList.vue.d.ts.map +1 -1
  82. package/dist/features/Operation/components/ParameterList.vue.js +17 -19
  83. package/dist/features/Operation/components/ParameterListItem.vue.d.ts +6 -2
  84. package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
  85. package/dist/features/Operation/components/ParameterListItem.vue.js +3 -3
  86. package/dist/features/Operation/components/ParameterListItem.vue2.js +64 -65
  87. package/dist/features/Operation/components/RequestBody.vue.d.ts +4 -0
  88. package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
  89. package/dist/features/Operation/components/RequestBody.vue.js +2 -2
  90. package/dist/features/Operation/components/RequestBody.vue2.js +65 -65
  91. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +4 -0
  92. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
  93. package/dist/features/Operation/components/callbacks/Callback.vue.js +3 -3
  94. package/dist/features/Operation/components/callbacks/Callback.vue2.js +29 -22
  95. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts +6 -0
  96. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -1
  97. package/dist/features/Operation/components/callbacks/Callbacks.vue.js +18 -16
  98. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +11 -5
  99. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  100. package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
  101. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +99 -90
  102. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +12 -5
  103. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  104. package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
  105. package/dist/features/Operation/layouts/ModernLayout.vue2.js +99 -87
  106. package/dist/features/Search/helpers/create-search-index.d.ts +2 -1
  107. package/dist/features/Search/helpers/create-search-index.d.ts.map +1 -1
  108. package/dist/features/Search/types.d.ts +1 -1
  109. package/dist/features/Search/types.d.ts.map +1 -1
  110. package/dist/features/api-client-modal/ApiClientModal.vue.d.ts.map +1 -1
  111. package/dist/features/api-client-modal/ApiClientModal.vue.js +23 -26
  112. package/dist/features/api-client-modal/useApiClient.d.ts +3032 -2888
  113. package/dist/features/api-client-modal/useApiClient.d.ts.map +1 -1
  114. package/dist/features/document-source/hooks/useDocumentFetcher.d.ts.map +1 -1
  115. package/dist/features/document-source/hooks/useDocumentFetcher.js +13 -11
  116. package/dist/features/document-source/hooks/useDocumentSource.d.ts +1 -1
  117. package/dist/features/document-source/hooks/useDocumentSource.d.ts.map +1 -1
  118. package/dist/features/example-responses/ExampleResponse.vue.d.ts.map +1 -1
  119. package/dist/features/example-responses/ExampleResponse.vue.js +3 -3
  120. package/dist/features/example-responses/ExampleResponse.vue2.js +26 -18
  121. package/dist/features/example-responses/ExampleResponses.vue.d.ts.map +1 -1
  122. package/dist/features/example-responses/ExampleResponses.vue.js +2 -2
  123. package/dist/features/example-responses/ExampleResponses.vue2.js +53 -53
  124. package/dist/features/multiple-documents/useMultipleDocuments.d.ts +8 -5
  125. package/dist/features/multiple-documents/useMultipleDocuments.d.ts.map +1 -1
  126. package/dist/features/multiple-documents/useMultipleDocuments.js +46 -43
  127. package/dist/features/test-request-button/TestRequestButton.vue.d.ts.map +1 -1
  128. package/dist/features/test-request-button/TestRequestButton.vue.js +2 -2
  129. package/dist/features/test-request-button/TestRequestButton.vue2.js +15 -21
  130. package/dist/features/toolbar/ApiReferenceToolbar.vue.js +18 -18
  131. package/dist/features/toolbar/ApiReferenceToolbarConfig.vue.js +1 -1
  132. package/dist/features/toolbar/ApiReferenceToolbarConfigTheme.vue.d.ts +2 -2
  133. package/dist/features/toolbar/ApiReferenceToolbarPopover.vue.js +1 -1
  134. package/dist/features/toolbar/ApiReferenceToolbarSdks.vue.js +1 -1
  135. package/dist/features/toolbar/ApiReferenceToolbarShare.vue.js +8 -8
  136. package/dist/features/toolbar/ApiReferenceToolbarShareRegister.vue.d.ts.map +1 -1
  137. package/dist/features/toolbar/ApiReferenceToolbarShareRegister.vue.js +34 -28
  138. package/dist/features/toolbar/ApiReferenceToolbarTitle.vue.js +27 -27
  139. package/dist/helpers/test-utils.d.ts +3 -365
  140. package/dist/helpers/test-utils.d.ts.map +1 -1
  141. package/dist/hooks/useNavState.d.ts +4 -2
  142. package/dist/hooks/useNavState.d.ts.map +1 -1
  143. package/dist/hooks/useNavState.js +31 -27
  144. package/dist/index.d.ts +1 -0
  145. package/dist/index.d.ts.map +1 -1
  146. package/dist/index.js +21 -19
  147. package/dist/style.css +1 -1
  148. package/dist/types.d.ts.map +1 -1
  149. package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
  150. package/dist/v2/ApiReferenceWorkspace.vue.js +46 -40
  151. package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts +1 -1
  152. package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts.map +1 -1
  153. package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js +2 -2
  154. package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue2.js +11 -11
  155. package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue.d.ts +2 -2
  156. package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue.d.ts.map +1 -1
  157. package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue.js +2 -2
  158. package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue2.js +10 -10
  159. package/dist/v2/blocks/scalar-client-selector-block/helpers/featured-clients.d.ts +1 -1
  160. package/dist/v2/blocks/scalar-client-selector-block/helpers/featured-clients.d.ts.map +1 -1
  161. package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue.d.ts +3 -0
  162. package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue.d.ts.map +1 -1
  163. package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue.js +2 -2
  164. package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue2.js +32 -31
  165. package/dist/v2/blocks/scalar-info-block/components/InfoBlock.vue.d.ts +15 -8
  166. package/dist/v2/blocks/scalar-info-block/components/InfoBlock.vue.d.ts.map +1 -1
  167. package/dist/v2/blocks/scalar-info-block/components/InfoBlock.vue.js +25 -20
  168. package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue.d.ts +8 -7
  169. package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue.d.ts.map +1 -1
  170. package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue.js +2 -2
  171. package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue2.js +27 -32
  172. package/dist/v2/blocks/scalar-server-selector-block/components/Selector.vue.d.ts +2 -22
  173. package/dist/v2/blocks/scalar-server-selector-block/components/Selector.vue.d.ts.map +1 -1
  174. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue.d.ts +8 -0
  175. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue.d.ts.map +1 -1
  176. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue.js +2 -2
  177. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue2.js +70 -65
  178. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarElement.vue.d.ts +9 -1
  179. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarElement.vue.d.ts.map +1 -1
  180. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarElement.vue.js +2 -2
  181. package/dist/v2/blocks/scalar-sidebar-block/components/SidebarElement.vue2.js +60 -57
  182. package/dist/v2/blocks/scalar-sidebar-block/helpers/create-sidebar.d.ts +3 -365
  183. package/dist/v2/blocks/scalar-sidebar-block/helpers/create-sidebar.d.ts.map +1 -1
  184. package/dist/v2/blocks/scalar-sidebar-block/helpers/generate-reverse-index.d.ts +3 -183
  185. package/dist/v2/blocks/scalar-sidebar-block/helpers/generate-reverse-index.d.ts.map +1 -1
  186. package/dist/v2/helpers/map-configuration.d.ts +22 -22
  187. package/dist/v2/helpers/map-configuration.d.ts.map +1 -1
  188. package/package.json +19 -16
  189. package/dist/components/Content/Operations/TraversedEntryContainer.vue.d.ts +0 -13
  190. package/dist/components/Content/Operations/TraversedEntryContainer.vue.d.ts.map +0 -1
  191. package/dist/components/Content/Operations/TraversedEntryContainer.vue.js +0 -52
  192. package/dist/components/Content/Operations/TraversedEntryContainer.vue2.js +0 -4
  193. package/dist/components/Content/Operations/index.d.ts +0 -2
  194. package/dist/components/Content/Operations/index.d.ts.map +0 -1
  195. package/dist/hooks/useConfig.d.ts +0 -9
  196. package/dist/hooks/useConfig.d.ts.map +0 -1
  197. package/dist/hooks/useConfig.js +0 -10
  198. package/dist/legacy/stores/index.d.ts +0 -2
  199. package/dist/legacy/stores/index.d.ts.map +0 -1
  200. package/dist/legacy/stores/useExampleStore.d.ts +0 -5
  201. package/dist/legacy/stores/useExampleStore.d.ts.map +0 -1
  202. package/dist/legacy/stores/useExampleStore.js +0 -8
  203. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.d.ts +0 -14
  204. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.d.ts.map +0 -1
  205. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.js +0 -4
  206. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue2.js +0 -55
  207. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts +0 -79
  208. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts.map +0 -1
  209. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.js +0 -7
  210. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue2.js +0 -236
  211. package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.d.ts +0 -41
  212. package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.d.ts.map +0 -1
  213. package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.js +0 -22
  214. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-client-options.d.ts +0 -20
  215. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-client-options.d.ts.map +0 -1
  216. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-client-options.js +0 -33
  217. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.d.ts +0 -17
  218. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.d.ts.map +0 -1
  219. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.js +0 -26
  220. package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.d.ts +0 -4
  221. package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.d.ts.map +0 -1
  222. package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.js +0 -10
  223. package/dist/v2/blocks/scalar-request-example-block/index.d.ts +0 -3
  224. package/dist/v2/blocks/scalar-request-example-block/index.d.ts.map +0 -1
  225. package/dist/v2/blocks/scalar-request-example-block/types.d.ts +0 -29
  226. package/dist/v2/blocks/scalar-request-example-block/types.d.ts.map +0 -1
@@ -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;
@@ -1 +1 @@
1
- {"version":3,"file":"ClassicLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/layouts/ClassicLayout.vue"],"names":[],"mappings":"AAucA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAWrF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAE9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAEpE,OAAO,KAAK,EACV,eAAe,EAEf,oBAAoB,EACpB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAiBrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAA;AAEvF,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,aAAa,EAAE,iBAAiB,EAAE,CAAA;IAClC,MAAM,EAAE,cAAc,CAAA;IACtB,MAAM,EAAE,yBAAyB,CAAA;IACjC,SAAS,EAAE,eAAe,CAAA;IAE1B,SAAS,EAAE,OAAO,CAAA;IAClB,MAAM,EAAE,YAAY,GAAG,SAAS,CAAA;IAChC,eAAe,EAAE,oBAAoB,EAAE,CAAA;IACvC,KAAK,EAAE,cAAc,CAAA;CACtB,CAAC;;AAwfF,wBAMG"}
1
+ {"version":3,"file":"ClassicLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/layouts/ClassicLayout.vue"],"names":[],"mappings":"AAudA,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,oDAAoD,CAAA;AAM3D,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAYrF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAEpE,OAAO,KAAK,EACV,eAAe,EAEf,oBAAoB,EACpB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAiBrE,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,cAAc,CAAA;IACtB,SAAS,EAAE,eAAe,CAAA;IAE1B,MAAM,EAAE,YAAY,GAAG,SAAS,CAAA;IAChC,eAAe,EAAE,oBAAoB,EAAE,CAAA;IACvC,KAAK,EAAE,cAAc,CAAA;IACrB,gGAAgG;IAChG,OAAO,EAAE;QACP,6EAA6E;QAC7E,SAAS,EAAE,OAAO,CAAA;QAClB,aAAa,EAAE,iBAAiB,EAAE,CAAA;QAClC,eAAe,EAAE,OAAO,GAAG,SAAS,CAAA;QACpC,qBAAqB,EAAE,OAAO,GAAG,SAAS,CAAA;QAC1C,4BAA4B,EAAE,OAAO,GAAG,SAAS,CAAA;QACjD,uBAAuB,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,CAAA;KAC1D,CAAA;CACF,CAAC;;AA8gBF,wBAMG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./ClassicLayout.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-fd385796"]]);
4
+ const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-4fb6913c"]]);
5
5
  export {
6
- f as default
6
+ c as default
7
7
  };