@scalar/api-reference 1.31.18 → 1.32.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 (215) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/dist/blocks/helpers/getPointer.d.ts +1 -1
  3. package/dist/blocks/helpers/getPointer.d.ts.map +1 -1
  4. package/dist/blocks/hooks/useBlockProps.js +10 -10
  5. package/dist/browser/standalone.js +14230 -14155
  6. package/dist/browser/webpack-stats.json +1 -1
  7. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  8. package/dist/components/ApiReferenceLayout.vue.js +2 -2
  9. package/dist/components/ApiReferenceLayout.vue2.js +122 -124
  10. package/dist/components/Content/Content.vue.d.ts.map +1 -1
  11. package/dist/components/Content/Content.vue.js +2 -2
  12. package/dist/components/Content/Content.vue2.js +93 -92
  13. package/dist/components/Content/Introduction/Introduction.vue.js +1 -1
  14. package/dist/components/Content/Introduction/Introduction.vue2.js +3 -3
  15. package/dist/components/Content/Lazy/Loading.vue.d.ts +3 -0
  16. package/dist/components/Content/Lazy/Loading.vue.d.ts.map +1 -1
  17. package/dist/components/Content/Lazy/Loading.vue.js +93 -93
  18. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  19. package/dist/components/Content/Schema/SchemaProperty.vue.js +2 -2
  20. package/dist/components/Content/Schema/SchemaProperty.vue2.js +1 -1
  21. package/dist/components/Content/Tag/Tag.vue.js +1 -1
  22. package/dist/components/Content/Tag/TagList.vue.d.ts +7 -1
  23. package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
  24. package/dist/components/Content/Tag/TagList.vue.js +41 -38
  25. package/dist/features/Operation/Operation.vue.d.ts +8 -3
  26. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  27. package/dist/features/Operation/Operation.vue.js +67 -51
  28. package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
  29. package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
  30. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
  31. package/dist/features/Operation/components/callbacks/Callback.vue.js +2 -2
  32. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +9 -2
  33. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  34. package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
  35. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +92 -84
  36. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +10 -3
  37. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  38. package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
  39. package/dist/features/Operation/layouts/ModernLayout.vue2.js +132 -117
  40. package/dist/features/Search/SearchButton.vue.d.ts +1 -3
  41. package/dist/features/Search/SearchButton.vue.d.ts.map +1 -1
  42. package/dist/features/Search/SearchButton.vue.js +19 -19
  43. package/dist/features/Search/SearchModal.vue.js +2 -2
  44. package/dist/features/Search/SearchModal.vue2.js +4 -4
  45. package/dist/features/Search/useSearchIndex.d.ts.map +1 -1
  46. package/dist/features/Search/useSearchIndex.js +15 -15
  47. package/dist/features/api-client-modal/ApiClientModal.vue.d.ts.map +1 -0
  48. package/dist/features/api-client-modal/index.d.ts.map +1 -0
  49. package/dist/features/{ApiClientModal → api-client-modal}/useApiClient.d.ts +118 -118
  50. package/dist/features/api-client-modal/useApiClient.d.ts.map +1 -0
  51. package/dist/features/base-url/BaseUrl.vue.d.ts.map +1 -0
  52. package/dist/features/base-url/index.d.ts.map +1 -0
  53. package/dist/features/document-source/hooks/useDocumentFetcher.d.ts.map +1 -0
  54. package/dist/features/document-source/hooks/useDocumentSource.d.ts.map +1 -0
  55. package/dist/features/document-source/index.d.ts.map +1 -0
  56. package/dist/features/download-link/DownloadLink.vue.d.ts.map +1 -0
  57. package/dist/features/download-link/DownloadLink.vue.js +7 -0
  58. package/dist/features/download-link/index.d.ts.map +1 -0
  59. package/dist/features/download-link/openapi-version-symbol.d.ts.map +1 -0
  60. package/dist/features/example-request/ExamplePicker.vue.d.ts +13 -0
  61. package/dist/features/example-request/ExamplePicker.vue.d.ts.map +1 -0
  62. package/dist/features/example-request/ExamplePicker.vue.js +7 -0
  63. package/dist/features/example-request/ExamplePicker.vue2.js +56 -0
  64. package/dist/features/example-request/ExampleRequest.vue.d.ts.map +1 -0
  65. package/dist/features/{ExampleRequest → example-request}/ExampleRequest.vue.js +2 -2
  66. package/dist/features/{ExampleRequest → example-request}/ExampleRequest.vue2.js +93 -93
  67. package/dist/features/example-request/TextSelect.vue.d.ts.map +1 -0
  68. package/dist/features/example-request/index.d.ts.map +1 -0
  69. package/dist/features/example-responses/ExampleResponse.vue.d.ts.map +1 -0
  70. package/dist/features/example-responses/ExampleResponse.vue.js +7 -0
  71. package/dist/features/example-responses/ExampleResponses.vue.d.ts.map +1 -0
  72. package/dist/features/example-responses/ExampleResponses.vue.js +7 -0
  73. package/dist/features/{ExampleResponses → example-responses}/ExampleResponses.vue2.js +1 -1
  74. package/dist/features/example-responses/index.d.ts.map +1 -0
  75. package/dist/{components/DocumentSelector → features/multiple-documents}/DocumentSelector.vue.d.ts.map +1 -1
  76. package/dist/features/multiple-documents/index.d.ts +3 -0
  77. package/dist/features/multiple-documents/index.d.ts.map +1 -0
  78. package/dist/{hooks → features/multiple-documents}/useMultipleDocuments.d.ts +1 -1
  79. package/dist/features/multiple-documents/useMultipleDocuments.d.ts.map +1 -0
  80. package/dist/features/sidebar/components/Sidebar.vue.d.ts.map +1 -0
  81. package/dist/features/sidebar/components/Sidebar.vue.js +7 -0
  82. package/dist/{components/Sidebar → features/sidebar/components}/Sidebar.vue2.js +2 -2
  83. package/dist/{components/Sidebar → features/sidebar/components}/SidebarElement.vue.d.ts +1 -1
  84. package/dist/features/sidebar/components/SidebarElement.vue.d.ts.map +1 -0
  85. package/dist/features/sidebar/components/SidebarElement.vue.js +7 -0
  86. package/dist/{components/Sidebar → features/sidebar/components}/SidebarElement.vue2.js +2 -2
  87. package/dist/features/sidebar/components/SidebarGroup.vue.d.ts.map +1 -0
  88. package/dist/features/sidebar/components/SidebarGroup.vue.js +7 -0
  89. package/dist/features/sidebar/components/SidebarHttpBadge.vue.d.ts.map +1 -0
  90. package/dist/features/sidebar/components/SidebarHttpBadge.vue.js +7 -0
  91. package/dist/{components/Sidebar → features/sidebar/components}/SidebarHttpBadge.vue2.js +1 -1
  92. package/dist/features/sidebar/helpers/create-sidebar.d.ts.map +1 -1
  93. package/dist/features/sidebar/helpers/create-sidebar.js +8 -8
  94. package/dist/features/sidebar/index.d.ts +1 -0
  95. package/dist/features/sidebar/index.d.ts.map +1 -1
  96. package/dist/features/specification-extension/SpecificationExtension.vue.d.ts.map +1 -0
  97. package/dist/features/specification-extension/index.d.ts.map +1 -0
  98. package/dist/features/test-request-button/TestRequestButton.vue.d.ts.map +1 -0
  99. package/dist/features/{TestRequestButton → test-request-button}/TestRequestButton.vue.js +2 -2
  100. package/dist/features/{TestRequestButton → test-request-button}/TestRequestButton.vue2.js +1 -1
  101. package/dist/features/test-request-button/index.d.ts.map +1 -0
  102. package/dist/features/traverse-schema/helpers/traverse-paths.d.ts.map +1 -1
  103. package/dist/features/traverse-schema/helpers/traverse-paths.js +21 -20
  104. package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts.map +1 -1
  105. package/dist/features/traverse-schema/helpers/traverse-schemas.js +14 -14
  106. package/dist/hooks/useOperationDiscriminator.d.ts +2 -2
  107. package/dist/hooks/useOperationDiscriminator.d.ts.map +1 -1
  108. package/dist/hooks/useOperationDiscriminator.js +28 -28
  109. package/dist/index.d.ts +1 -2
  110. package/dist/index.d.ts.map +1 -1
  111. package/dist/index.js +5 -5
  112. package/dist/libs/openapi.d.ts +5 -6
  113. package/dist/libs/openapi.d.ts.map +1 -1
  114. package/dist/libs/openapi.js +41 -43
  115. package/dist/style.css +1 -1
  116. package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
  117. package/dist/v2/ApiReferenceWorkspace.vue.js +110 -65
  118. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts +141 -0
  119. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts.map +1 -0
  120. package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.d.ts +38 -0
  121. package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.d.ts.map +1 -0
  122. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-client-options.d.ts +21 -0
  123. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-client-options.d.ts.map +1 -0
  124. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.d.ts +20 -0
  125. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.d.ts.map +1 -0
  126. package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.d.ts +4 -0
  127. package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.d.ts.map +1 -0
  128. package/dist/v2/blocks/scalar-request-example-block/index.d.ts +2 -0
  129. package/dist/v2/blocks/scalar-request-example-block/index.d.ts.map +1 -0
  130. package/dist/v2/blocks/scalar-request-example-block/types.d.ts +21 -0
  131. package/dist/v2/blocks/scalar-request-example-block/types.d.ts.map +1 -0
  132. package/package.json +12 -12
  133. package/dist/components/DocumentSelector/index.d.ts +0 -2
  134. package/dist/components/DocumentSelector/index.d.ts.map +0 -1
  135. package/dist/components/Sidebar/Sidebar.vue.d.ts.map +0 -1
  136. package/dist/components/Sidebar/Sidebar.vue.js +0 -7
  137. package/dist/components/Sidebar/SidebarElement.vue.d.ts.map +0 -1
  138. package/dist/components/Sidebar/SidebarElement.vue.js +0 -7
  139. package/dist/components/Sidebar/SidebarGroup.vue.d.ts.map +0 -1
  140. package/dist/components/Sidebar/SidebarGroup.vue.js +0 -7
  141. package/dist/components/Sidebar/SidebarHttpBadge.vue.d.ts.map +0 -1
  142. package/dist/components/Sidebar/SidebarHttpBadge.vue.js +0 -7
  143. package/dist/components/Sidebar/index.d.ts +0 -2
  144. package/dist/components/Sidebar/index.d.ts.map +0 -1
  145. package/dist/components/SpecificationExtension/SpecificationExtension.vue.d.ts.map +0 -1
  146. package/dist/components/SpecificationExtension/index.d.ts.map +0 -1
  147. package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts.map +0 -1
  148. package/dist/features/ApiClientModal/index.d.ts.map +0 -1
  149. package/dist/features/ApiClientModal/useApiClient.d.ts.map +0 -1
  150. package/dist/features/BaseUrl/BaseUrl.vue.d.ts.map +0 -1
  151. package/dist/features/BaseUrl/index.d.ts.map +0 -1
  152. package/dist/features/DocumentSource/hooks/useDocumentFetcher.d.ts.map +0 -1
  153. package/dist/features/DocumentSource/hooks/useDocumentSource.d.ts.map +0 -1
  154. package/dist/features/DocumentSource/index.d.ts.map +0 -1
  155. package/dist/features/DownloadLink/DownloadLink.vue.d.ts.map +0 -1
  156. package/dist/features/DownloadLink/DownloadLink.vue.js +0 -7
  157. package/dist/features/DownloadLink/index.d.ts.map +0 -1
  158. package/dist/features/DownloadLink/openapi-version-symbol.d.ts.map +0 -1
  159. package/dist/features/ExampleRequest/ExamplePicker.vue.d.ts +0 -10
  160. package/dist/features/ExampleRequest/ExamplePicker.vue.d.ts.map +0 -1
  161. package/dist/features/ExampleRequest/ExamplePicker.vue.js +0 -7
  162. package/dist/features/ExampleRequest/ExamplePicker.vue2.js +0 -59
  163. package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +0 -1
  164. package/dist/features/ExampleRequest/TextSelect.vue.d.ts.map +0 -1
  165. package/dist/features/ExampleRequest/index.d.ts.map +0 -1
  166. package/dist/features/ExampleResponses/ExampleResponse.vue.d.ts.map +0 -1
  167. package/dist/features/ExampleResponses/ExampleResponse.vue.js +0 -7
  168. package/dist/features/ExampleResponses/ExampleResponses.vue.d.ts.map +0 -1
  169. package/dist/features/ExampleResponses/ExampleResponses.vue.js +0 -7
  170. package/dist/features/ExampleResponses/index.d.ts.map +0 -1
  171. package/dist/features/TestRequestButton/TestRequestButton.vue.d.ts.map +0 -1
  172. package/dist/features/TestRequestButton/index.d.ts.map +0 -1
  173. package/dist/hooks/useMultipleDocuments.d.ts.map +0 -1
  174. /package/dist/features/{ApiClientModal → api-client-modal}/ApiClientModal.vue.d.ts +0 -0
  175. /package/dist/features/{ApiClientModal → api-client-modal}/ApiClientModal.vue.js +0 -0
  176. /package/dist/features/{ApiClientModal → api-client-modal}/ApiClientModal.vue2.js +0 -0
  177. /package/dist/features/{ApiClientModal → api-client-modal}/index.d.ts +0 -0
  178. /package/dist/features/{ApiClientModal → api-client-modal}/useApiClient.js +0 -0
  179. /package/dist/features/{BaseUrl → base-url}/BaseUrl.vue.d.ts +0 -0
  180. /package/dist/features/{BaseUrl → base-url}/BaseUrl.vue.js +0 -0
  181. /package/dist/features/{BaseUrl → base-url}/BaseUrl.vue2.js +0 -0
  182. /package/dist/features/{BaseUrl → base-url}/index.d.ts +0 -0
  183. /package/dist/features/{DocumentSource → document-source}/hooks/useDocumentFetcher.d.ts +0 -0
  184. /package/dist/features/{DocumentSource → document-source}/hooks/useDocumentFetcher.js +0 -0
  185. /package/dist/features/{DocumentSource → document-source}/hooks/useDocumentSource.d.ts +0 -0
  186. /package/dist/features/{DocumentSource → document-source}/hooks/useDocumentSource.js +0 -0
  187. /package/dist/features/{DocumentSource → document-source}/index.d.ts +0 -0
  188. /package/dist/features/{DownloadLink → download-link}/DownloadLink.vue.d.ts +0 -0
  189. /package/dist/features/{DownloadLink → download-link}/DownloadLink.vue2.js +0 -0
  190. /package/dist/features/{DownloadLink → download-link}/index.d.ts +0 -0
  191. /package/dist/features/{DownloadLink → download-link}/openapi-version-symbol.d.ts +0 -0
  192. /package/dist/features/{DownloadLink → download-link}/openapi-version-symbol.js +0 -0
  193. /package/dist/features/{ExampleRequest → example-request}/ExampleRequest.vue.d.ts +0 -0
  194. /package/dist/features/{ExampleRequest → example-request}/TextSelect.vue.d.ts +0 -0
  195. /package/dist/features/{ExampleRequest → example-request}/TextSelect.vue.js +0 -0
  196. /package/dist/features/{ExampleRequest → example-request}/TextSelect.vue3.js +0 -0
  197. /package/dist/features/{ExampleRequest → example-request}/index.d.ts +0 -0
  198. /package/dist/features/{ExampleResponses → example-responses}/ExampleResponse.vue.d.ts +0 -0
  199. /package/dist/features/{ExampleResponses → example-responses}/ExampleResponse.vue2.js +0 -0
  200. /package/dist/features/{ExampleResponses → example-responses}/ExampleResponses.vue.d.ts +0 -0
  201. /package/dist/features/{ExampleResponses → example-responses}/index.d.ts +0 -0
  202. /package/dist/{components/DocumentSelector → features/multiple-documents}/DocumentSelector.vue.d.ts +0 -0
  203. /package/dist/{components/DocumentSelector → features/multiple-documents}/DocumentSelector.vue.js +0 -0
  204. /package/dist/{components/DocumentSelector → features/multiple-documents}/DocumentSelector.vue2.js +0 -0
  205. /package/dist/{hooks → features/multiple-documents}/useMultipleDocuments.js +0 -0
  206. /package/dist/{components/Sidebar → features/sidebar/components}/Sidebar.vue.d.ts +0 -0
  207. /package/dist/{components/Sidebar → features/sidebar/components}/SidebarGroup.vue.d.ts +0 -0
  208. /package/dist/{components/Sidebar → features/sidebar/components}/SidebarGroup.vue2.js +0 -0
  209. /package/dist/{components/Sidebar → features/sidebar/components}/SidebarHttpBadge.vue.d.ts +0 -0
  210. /package/dist/{components/SpecificationExtension → features/specification-extension}/SpecificationExtension.vue.d.ts +0 -0
  211. /package/dist/{components/SpecificationExtension → features/specification-extension}/SpecificationExtension.vue.js +0 -0
  212. /package/dist/{components/SpecificationExtension → features/specification-extension}/SpecificationExtension.vue2.js +0 -0
  213. /package/dist/{components/SpecificationExtension → features/specification-extension}/index.d.ts +0 -0
  214. /package/dist/features/{TestRequestButton → test-request-button}/TestRequestButton.vue.d.ts +0 -0
  215. /package/dist/features/{TestRequestButton → test-request-button}/index.d.ts +0 -0
@@ -4,12 +4,18 @@ import type { Spec, Tag as TagType } from '@scalar/types/legacy';
4
4
  type __VLS_Props = {
5
5
  /** Just to set the id for webhooks, for now */
6
6
  id?: string;
7
+ document: OpenAPIV3_1.Document;
8
+ /**
9
+ * @deprecated Use `document` instead
10
+ */
7
11
  collection: Collection;
8
12
  tags: TagType[];
13
+ /**
14
+ * @deprecated Use `document` instead
15
+ */
9
16
  spec: Spec;
10
17
  layout?: 'modern' | 'classic';
11
18
  server?: Server;
12
- schemas?: Record<string, OpenAPIV3_1.SchemaObject> | unknown;
13
19
  };
14
20
  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>;
15
21
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"TagList.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Tag/TagList.vue"],"names":[],"mappings":"AAkFA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AACzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAahE,KAAK,WAAW,GAAG;IACjB,+CAA+C;IAC/C,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,UAAU,EAAE,UAAU,CAAA;IACtB,IAAI,EAAE,OAAO,EAAE,CAAA;IACf,IAAI,EAAE,IAAI,CAAA;IACV,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,GAAG,OAAO,CAAA;CAC7D,CAAC;;AA8HF,wBAMG"}
1
+ {"version":3,"file":"TagList.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Tag/TagList.vue"],"names":[],"mappings":"AA2FA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AACzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAahE,KAAK,WAAW,GAAG;IACjB,+CAA+C;IAC/C,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,QAAQ,EAAE,WAAW,CAAC,QAAQ,CAAA;IAC9B;;OAEG;IACH,UAAU,EAAE,UAAU,CAAA;IACtB,IAAI,EAAE,OAAO,EAAE,CAAA;IACf;;OAEG;IACH,IAAI,EAAE,IAAI,CAAA;IACV,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAC;;AA8HF,wBAMG"}
@@ -1,56 +1,59 @@
1
- import { defineComponent as S, computed as u, createElementBlock as f, openBlock as t, Fragment as p, renderList as y, createBlock as n, unref as o, withCtx as s, resolveDynamicComponent as B, createVNode as h } from "vue";
2
- import { ScalarErrorBoundary as I } from "@scalar/components";
3
- import { useNavState as T } from "../../../hooks/useNavState.js";
4
- import C from "./TagAccordion.vue.js";
5
- import b from "./TagSection.vue.js";
6
- import { useSidebar as E } from "../../../features/sidebar/hooks/useSidebar.js";
1
+ import { defineComponent as z, computed as m, createElementBlock as p, openBlock as a, Fragment as y, renderList as f, createBlock as r, unref as o, withCtx as c, resolveDynamicComponent as S, createVNode as h } from "vue";
2
+ import { ScalarErrorBoundary as B } from "@scalar/components";
3
+ import { useNavState as I } from "../../../hooks/useNavState.js";
4
+ import T from "./TagAccordion.vue.js";
5
+ import W from "./TagSection.vue.js";
6
+ import { useSidebar as C } from "../../../features/sidebar/hooks/useSidebar.js";
7
7
  import v from "../Lazy/Lazy.vue2.js";
8
- import N from "../../../features/Operation/Operation.vue.js";
9
- const q = /* @__PURE__ */ S({
8
+ import E from "../../../features/Operation/Operation.vue.js";
9
+ const G = /* @__PURE__ */ z({
10
10
  __name: "TagList",
11
11
  props: {
12
12
  id: {},
13
+ document: {},
13
14
  collection: {},
14
15
  tags: {},
15
16
  spec: {},
16
17
  layout: {},
17
- server: {},
18
- schemas: {}
18
+ server: {}
19
19
  },
20
- setup(i) {
21
- const { getTagId: a, hash: L } = T(), { collapsedSidebarItems: c } = E(), g = u(
22
- () => i.layout === "classic" ? C : b
23
- ), z = u(
24
- () => i.tags.findIndex((e) => !c[a(e)]) + 1
25
- ), m = (e) => i.layout !== "classic" && !L.value.startsWith("model") && e > z.value;
26
- return (e, O) => (t(!0), f(p, null, y(e.tags, (r, d) => (t(), n(o(v), {
27
- id: e.id || o(a)(r),
28
- key: e.id || o(a)(r),
29
- isLazy: m(d)
20
+ setup(s) {
21
+ const { getTagId: l, hash: k } = I(), { collapsedSidebarItems: n } = C(), L = m(
22
+ () => s.layout === "classic" ? T : W
23
+ ), b = m(
24
+ () => s.tags.findIndex((e) => !n[l(e)]) + 1
25
+ ), u = (e) => s.layout !== "classic" && !k.value.startsWith("model") && e > b.value;
26
+ return (e, N) => (a(!0), p(y, null, f(e.tags, (t, d) => (a(), r(o(v), {
27
+ id: e.id || o(l)(t),
28
+ key: e.id || o(l)(t),
29
+ isLazy: u(d)
30
30
  }, {
31
- default: s(() => [
32
- (t(), n(B(g.value), {
33
- id: e.id || o(a)(r),
31
+ default: c(() => [
32
+ (a(), r(S(L.value), {
33
+ id: e.id || o(l)(t),
34
34
  collection: e.collection,
35
35
  spec: e.spec,
36
- tag: r
36
+ tag: t
37
37
  }, {
38
- default: s(() => [
39
- (t(!0), f(p, null, y(r.operations, (l, k) => (t(), n(o(v), {
40
- id: l.id,
41
- key: l.id,
42
- isLazy: m(d) || o(c)[o(a)(r)] && k > 0
38
+ default: c(() => [
39
+ (a(!0), p(y, null, f(t.operations, (i, g) => (a(), r(o(v), {
40
+ id: i.id,
41
+ key: i.id,
42
+ isLazy: u(d) || o(n)[o(l)(t)] && g > 0
43
43
  }, {
44
- default: s(() => [
45
- h(o(I), null, {
46
- default: s(() => [
47
- h(o(N), {
44
+ default: c(() => [
45
+ h(o(B), null, {
46
+ default: c(() => [
47
+ h(o(E), {
48
+ path: i.path,
49
+ method: i.httpVerb,
50
+ isWebhook: i.isWebhook,
51
+ id: i.id,
52
+ document: e.document,
48
53
  collection: e.collection,
49
54
  layout: e.layout,
50
- schemas: e.schemas,
51
- server: e.server,
52
- transformedOperation: l
53
- }, null, 8, ["collection", "layout", "schemas", "server", "transformedOperation"])
55
+ server: e.server
56
+ }, null, 8, ["path", "method", "isWebhook", "id", "document", "collection", "layout", "server"])
54
57
  ]),
55
58
  _: 2
56
59
  }, 1024)
@@ -66,5 +69,5 @@ const q = /* @__PURE__ */ S({
66
69
  }
67
70
  });
68
71
  export {
69
- q as default
72
+ G as default
70
73
  };
@@ -1,12 +1,17 @@
1
1
  import type { Collection, Server } from '@scalar/oas-utils/entities/spec';
2
2
  import type { OpenAPIV3_1 } from '@scalar/openapi-types';
3
- import type { TransformedOperation } from '@scalar/types/legacy';
4
3
  type __VLS_Props = {
4
+ document?: OpenAPIV3_1.Document;
5
+ path: string;
6
+ method: OpenAPIV3_1.HttpMethods;
7
+ isWebhook?: boolean;
5
8
  layout?: 'modern' | 'classic';
6
- transformedOperation: TransformedOperation;
9
+ id: string;
10
+ /**
11
+ * @deprecated Use `document` instead
12
+ */
7
13
  collection: Collection;
8
14
  server: Server | undefined;
9
- schemas?: Record<string, OpenAPIV3_1.SchemaObject> | unknown;
10
15
  };
11
16
  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>;
12
17
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"Operation.vue.d.ts","sourceRoot":"","sources":["../../../src/features/Operation/Operation.vue"],"names":[],"mappings":"AAiGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AACzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAYhE,KAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;IAC7B,oBAAoB,EAAE,oBAAoB,CAAA;IAC1C,UAAU,EAAE,UAAU,CAAA;IACtB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,GAAG,OAAO,CAAA;CAC7D,CAAC;;AA2JF,wBAMG"}
1
+ {"version":3,"file":"Operation.vue.d.ts","sourceRoot":"","sources":["../../../src/features/Operation/Operation.vue"],"names":[],"mappings":"AAyHA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AACzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAYxD,KAAK,WAAW,GAAG;IACjB,QAAQ,CAAC,EAAE,WAAW,CAAC,QAAQ,CAAA;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,WAAW,CAAC,WAAW,CAAA;IAC/B,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;IAC7B,EAAE,EAAE,MAAM,CAAA;IACV;;OAEG;IACH,UAAU,EAAE,UAAU,CAAA;IACtB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;CAC3B,CAAC;;AAuKF,wBAMG"}
@@ -1,63 +1,79 @@
1
- import { defineComponent as m, computed as u, createElementBlock as d, createCommentVNode as p, openBlock as n, Fragment as f, createBlock as c, unref as t } from "vue";
2
- import { useWorkspace as v } from "@scalar/api-client/store";
3
- import { getPointer as h } from "../../blocks/helpers/getPointer.js";
4
- import { useBlockProps as O } from "../../blocks/hooks/useBlockProps.js";
5
- import { useOperationDiscriminator as k } from "../../hooks/useOperationDiscriminator.js";
6
- import y from "./layouts/ClassicLayout.vue.js";
7
- import U from "./layouts/ModernLayout.vue.js";
8
- const D = /* @__PURE__ */ m({
1
+ import { defineComponent as b, computed as k, createElementBlock as W, createCommentVNode as y, openBlock as c, Fragment as U, createBlock as f, unref as m } from "vue";
2
+ import { useWorkspace as q } from "@scalar/api-client/store";
3
+ import { getPointer as B } from "../../blocks/helpers/getPointer.js";
4
+ import { useBlockProps as V } from "../../blocks/hooks/useBlockProps.js";
5
+ import { useOperationDiscriminator as C } from "../../hooks/useOperationDiscriminator.js";
6
+ import S from "./layouts/ClassicLayout.vue.js";
7
+ import g from "./layouts/ModernLayout.vue.js";
8
+ const M = /* @__PURE__ */ b({
9
9
  __name: "Operation",
10
10
  props: {
11
+ document: {},
12
+ path: {},
13
+ method: {},
14
+ isWebhook: { type: Boolean },
11
15
  layout: { default: "modern" },
12
- transformedOperation: {},
16
+ id: {},
13
17
  collection: {},
14
- server: {},
15
- schemas: {}
18
+ server: {}
16
19
  },
17
- setup(r) {
18
- const s = v(), { handleDiscriminatorChange: l } = k(
19
- r.transformedOperation,
20
- r.schemas
21
- ), { operation: o } = O({
22
- store: s,
23
- collection: r.collection,
24
- location: h([
25
- "paths",
26
- r.transformedOperation.path,
27
- r.transformedOperation.httpVerb.toLowerCase()
28
- ])
29
- }), i = u(() => {
20
+ setup(o) {
21
+ var v, p;
22
+ const u = q(), s = k(
23
+ () => {
24
+ var e, t, n, r, i, l;
25
+ return o.isWebhook ? (n = (t = (e = o.document) == null ? void 0 : e.webhooks) == null ? void 0 : t[o.path]) == null ? void 0 : n[o.method] : (l = (i = (r = o.document) == null ? void 0 : r.paths) == null ? void 0 : i[o.path]) == null ? void 0 : l[o.method];
26
+ }
27
+ ), { handleDiscriminatorChange: d } = C(
28
+ s.value,
29
+ (p = (v = o.document) == null ? void 0 : v.components) == null ? void 0 : p.schemas
30
+ ), { operation: a } = V({
31
+ store: u,
32
+ collection: o.collection,
33
+ location: B([o.isWebhook ? "webhooks" : "paths", o.path, o.method])
34
+ }), h = k(() => {
30
35
  var e;
31
- if (!o.value)
32
- return r.server;
33
- if ((e = o.value) != null && e.selectedServerUid) {
34
- const a = s.servers[o.value.selectedServerUid];
35
- if (a)
36
- return a;
36
+ if (!a.value)
37
+ return o.server;
38
+ if ((e = a.value) != null && e.selectedServerUid) {
39
+ const t = u.servers[a.value.selectedServerUid];
40
+ if (t)
41
+ return t;
37
42
  }
38
- return r.server;
43
+ return o.server;
39
44
  });
40
- return (e, a) => e.collection ? (n(), d(f, { key: 0 }, [
41
- e.layout === "classic" ? (n(), c(y, {
42
- key: 0,
43
- collection: e.collection,
44
- request: t(o),
45
- transformedOperation: e.transformedOperation,
46
- schemas: e.schemas,
47
- server: i.value,
48
- "onUpdate:modelValue": t(l)
49
- }, null, 8, ["collection", "request", "transformedOperation", "schemas", "server", "onUpdate:modelValue"])) : (n(), c(U, {
50
- key: 1,
51
- collection: e.collection,
52
- request: t(o),
53
- transformedOperation: e.transformedOperation,
54
- schemas: e.schemas,
55
- server: i.value,
56
- "onUpdate:modelValue": t(l)
57
- }, null, 8, ["collection", "request", "transformedOperation", "schemas", "server", "onUpdate:modelValue"]))
58
- ], 64)) : p("", !0);
45
+ return (e, t) => {
46
+ var n, r, i, l;
47
+ return e.collection && s.value ? (c(), W(U, { key: 0 }, [
48
+ e.layout === "classic" ? (c(), f(S, {
49
+ key: 0,
50
+ id: e.id,
51
+ operation: s.value,
52
+ collection: e.collection,
53
+ isWebhook: e.isWebhook,
54
+ method: e.method,
55
+ path: e.path,
56
+ request: m(a),
57
+ schemas: (r = (n = e.document) == null ? void 0 : n.components) == null ? void 0 : r.schemas,
58
+ server: h.value,
59
+ "onUpdate:modelValue": m(d)
60
+ }, null, 8, ["id", "operation", "collection", "isWebhook", "method", "path", "request", "schemas", "server", "onUpdate:modelValue"])) : (c(), f(g, {
61
+ key: 1,
62
+ id: e.id,
63
+ collection: e.collection,
64
+ isWebhook: e.isWebhook,
65
+ method: e.method,
66
+ path: e.path,
67
+ request: m(a),
68
+ operation: s.value,
69
+ schemas: (l = (i = e.document) == null ? void 0 : i.components) == null ? void 0 : l.schemas,
70
+ server: h.value,
71
+ "onUpdate:modelValue": m(d)
72
+ }, null, 8, ["id", "collection", "isWebhook", "method", "path", "request", "operation", "schemas", "server", "onUpdate:modelValue"]))
73
+ ], 64)) : y("", !0);
74
+ };
59
75
  }
60
76
  });
61
77
  export {
62
- D as default
78
+ M as default
63
79
  };
@@ -1 +1 @@
1
- {"version":3,"file":"OperationParameters.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/OperationParameters.vue"],"names":[],"mappings":"AAuEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAA;AAOjE,KAAK,WAAW,GAAG;IACjB,UAAU,CAAC,EAAE,WAAW,CAAC,eAAe,EAAE,CAAA;IAC1C,WAAW,CAAC,EAAE,WAAW,CAAC,iBAAiB,GAAG,SAAS,CAAA;IACvD,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAC;;;;;;AA+IF,wBAOG"}
1
+ {"version":3,"file":"OperationParameters.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/OperationParameters.vue"],"names":[],"mappings":"AAqEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAA;AAOjE,KAAK,WAAW,GAAG;IACjB,UAAU,CAAC,EAAE,WAAW,CAAC,eAAe,EAAE,CAAA;IAC1C,WAAW,CAAC,EAAE,WAAW,CAAC,iBAAiB,GAAG,SAAS,CAAA;IACvD,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAC;;;;;;AA+IF,wBAOG"}
@@ -1 +1 @@
1
- {"version":3,"file":"OperationResponses.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/OperationResponses.vue"],"names":[],"mappings":"AA+BA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAQxD,KAAK,WAAW,GAAG;IACf,SAAS,EAAE,WAAW,CAAC,cAAc,GAAG,SAAS,CAAA;IACjD,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,GAAG,OAAO,CAAA;CAC7D,CAAC;;sBAFmB,OAAO;;AA+E9B,wBAQG"}
1
+ {"version":3,"file":"OperationResponses.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/OperationResponses.vue"],"names":[],"mappings":"AA8BA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAOxD,KAAK,WAAW,GAAG;IACf,SAAS,EAAE,WAAW,CAAC,cAAc,GAAG,SAAS,CAAA;IACjD,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,GAAG,OAAO,CAAA;CAC7D,CAAC;;sBAFmB,OAAO;;AA+E9B,wBAQG"}
@@ -1 +1 @@
1
- {"version":3,"file":"Callback.vue.d.ts","sourceRoot":"","sources":["../../../../../src/features/Operation/components/callbacks/Callback.vue"],"names":[],"mappings":"AAqHA,OAAO,EAAiB,KAAK,UAAU,EAAE,MAAM,iCAAiC,CAAA;AAEhF,OAAO,KAAK,EAAE,WAAW,EAAwB,MAAM,sBAAsB,CAAA;AAM7E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAA;AAIjE,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,WAAW,CAAC,eAAe,CAAA;IACrC,UAAU,EAAE,UAAU,CAAA;IACtB,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,GAAG,EAAE,MAAM,CAAA;CACZ,CAAC;;AAqJF,wBAMG"}
1
+ {"version":3,"file":"Callback.vue.d.ts","sourceRoot":"","sources":["../../../../../src/features/Operation/components/callbacks/Callback.vue"],"names":[],"mappings":"AAqHA,OAAO,EAAiB,KAAK,UAAU,EAAE,MAAM,iCAAiC,CAAA;AAEhF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAMvD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAA;AAIjE,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,WAAW,CAAC,eAAe,CAAA;IACrC,UAAU,EAAE,UAAU,CAAA;IACtB,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,GAAG,EAAE,MAAM,CAAA;CACZ,CAAC;;AAqJF,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-f1d7309a"]]);
3
+ import t from "../../../../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-744e489e"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1,11 +1,18 @@
1
1
  import type { Collection, Request, Server } from '@scalar/oas-utils/entities/spec';
2
- import type { TransformedOperation } from '@scalar/types/legacy';
2
+ import type { OpenAPIV3_1 } from '@scalar/types/legacy';
3
3
  import type { Schemas } from '../../../features/Operation/types/schemas';
4
4
  type __VLS_Props = {
5
+ id: string;
6
+ path: string;
7
+ method: OpenAPIV3_1.HttpMethods;
8
+ operation: OpenAPIV3_1.OperationObject;
9
+ isWebhook: boolean;
10
+ /**
11
+ * @deprecated Use `document` instead
12
+ */
5
13
  collection: Collection;
6
14
  server: Server | undefined;
7
15
  request: Request | undefined;
8
- transformedOperation: TransformedOperation;
9
16
  schemas?: Schemas;
10
17
  };
11
18
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
@@ -1 +1 @@
1
- {"version":3,"file":"ClassicLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/layouts/ClassicLayout.vue"],"names":[],"mappings":"AA2UA,OAAO,KAAK,EACV,UAAU,EACV,OAAO,EACP,MAAM,EACP,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAUhE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAA;AAcjE,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,OAAO,EAAE,OAAO,GAAG,SAAS,CAAA;IAC5B,oBAAoB,EAAE,oBAAoB,CAAA;IAC1C,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAC;;;;;;AA+UF,wBAQG"}
1
+ {"version":3,"file":"ClassicLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/layouts/ClassicLayout.vue"],"names":[],"mappings":"AAiVA,OAAO,KAAK,EACV,UAAU,EACV,OAAO,EACP,MAAM,EACP,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAWvD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAA;AAcjE,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,WAAW,CAAC,WAAW,CAAA;IAC/B,SAAS,EAAE,WAAW,CAAC,eAAe,CAAA;IACtC,SAAS,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,UAAU,EAAE,UAAU,CAAA;IACtB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,OAAO,EAAE,OAAO,GAAG,SAAS,CAAA;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAC;;;;;;AA2UF,wBAQG"}
@@ -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 s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-bbf0f07b"]]);
4
+ const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-f1a2267c"]]);
5
5
  export {
6
- s as default
6
+ c as default
7
7
  };
@@ -1,79 +1,84 @@
1
- import { defineComponent as k, createBlock as a, openBlock as i, unref as o, createSlots as C, withCtx as n, createElementVNode as r, createVNode as t, createCommentVNode as p, withModifiers as V, toDisplayString as f, normalizeClass as q, createTextVNode as c } from "vue";
2
- import { ScalarIcon as S, ScalarIconButton as w, ScalarMarkdown as B } from "@scalar/components";
3
- import { ScalarIconWebhooksLogo as _ } from "@scalar/icons";
4
- import { useClipboard as I } from "@scalar/use-hooks/useClipboard";
5
- import R from "../../../components/OperationPath.vue.js";
6
- import { useConfig as T } from "../../../hooks/useConfig.js";
7
- import { isOperationDeprecated as N, getOperationStability as h, getOperationStabilityColor as P } from "../../../libs/openapi.js";
8
- import $ from "../components/OperationParameters.vue.js";
9
- import z from "../components/OperationResponses.vue.js";
10
- import A from "../../../components/Section/SectionAccordion.vue.js";
11
- import D from "../../ExampleResponses/ExampleResponses.vue.js";
12
- import E from "../../ExampleRequest/ExampleRequest.vue.js";
13
- import L from "../../TestRequestButton/TestRequestButton.vue.js";
14
- import U from "../../../components/HttpMethod/HttpMethod.vue.js";
15
- import W from "../../../components/Anchor/Anchor.vue.js";
16
- import u from "../../../components/Badge/Badge.vue.js";
17
- const M = { class: "operation-title" }, j = { class: "operation-details" }, F = { class: "endpoint-label" }, G = { class: "endpoint-label-path" }, H = { class: "endpoint-label-name" }, J = { class: "endpoint-content" }, K = { class: "operation-details-card" }, Q = { class: "operation-details-card-item" }, X = { class: "operation-details-card-item" }, ue = /* @__PURE__ */ k({
1
+ import { defineComponent as S, computed as V, createBlock as a, openBlock as n, unref as o, createSlots as w, withCtx as i, createElementVNode as s, createVNode as t, createCommentVNode as p, withModifiers as B, toDisplayString as u, normalizeClass as T, createTextVNode as f } from "vue";
2
+ import { ScalarIcon as I, ScalarIconButton as R, ScalarMarkdown as N } from "@scalar/components";
3
+ import { ScalarIconWebhooksLogo as O } from "@scalar/icons";
4
+ import { useClipboard as P } from "@scalar/use-hooks/useClipboard";
5
+ import W from "../../../components/OperationPath.vue.js";
6
+ import { useConfig as $ } from "../../../hooks/useConfig.js";
7
+ import { isOperationDeprecated as z, getOperationStability as y, getOperationStabilityColor as A } from "../../../libs/openapi.js";
8
+ import D from "../components/OperationParameters.vue.js";
9
+ import E from "../components/OperationResponses.vue.js";
10
+ import L from "../../../components/Section/SectionAccordion.vue.js";
11
+ import U from "../../example-responses/ExampleResponses.vue.js";
12
+ import _ from "../../example-request/ExampleRequest.vue.js";
13
+ import M from "../../test-request-button/TestRequestButton.vue.js";
14
+ import j from "../../../components/HttpMethod/HttpMethod.vue.js";
15
+ import F from "../../../components/Anchor/Anchor.vue.js";
16
+ import v from "../../../components/Badge/Badge.vue.js";
17
+ const G = { class: "operation-title" }, H = { class: "operation-details" }, J = { class: "endpoint-label" }, K = { class: "endpoint-label-path" }, Q = { class: "endpoint-label-name" }, X = { class: "endpoint-content" }, Y = { class: "operation-details-card" }, Z = { class: "operation-details-card-item" }, x = { class: "operation-details-card-item" }, ve = /* @__PURE__ */ S({
18
18
  __name: "ClassicLayout",
19
19
  props: {
20
+ id: {},
21
+ path: {},
22
+ method: {},
23
+ operation: {},
24
+ isWebhook: { type: Boolean },
20
25
  collection: {},
21
26
  server: {},
22
27
  request: {},
23
- transformedOperation: {},
24
28
  schemas: {}
25
29
  },
26
30
  emits: ["update:modelValue"],
27
- setup(Y, { emit: O }) {
28
- const { copyToClipboard: v } = I(), y = T(), b = O, d = (e) => {
29
- b("update:modelValue", e);
31
+ setup(d, { emit: b }) {
32
+ const g = V(() => {
33
+ var e;
34
+ return ((e = d.operation) == null ? void 0 : e.summary) || d.path || "";
35
+ }), { copyToClipboard: k } = P(), C = $(), q = b, m = (e) => {
36
+ q("update:modelValue", e);
30
37
  };
31
- return (e, s) => {
32
- var m;
33
- return i(), a(o(A), {
34
- id: e.transformedOperation.id,
38
+ return (e, r) => {
39
+ var c;
40
+ return n(), a(o(L), {
41
+ id: e.id,
35
42
  class: "reference-endpoint",
36
43
  transparent: ""
37
- }, C({
38
- title: n(() => [
39
- r("div", M, [
40
- r("div", j, [
41
- t(o(U), {
44
+ }, w({
45
+ title: i(() => [
46
+ s("div", G, [
47
+ s("div", H, [
48
+ t(o(j), {
42
49
  class: "endpoint-type",
43
- method: e.transformedOperation.httpVerb,
50
+ method: e.method,
44
51
  short: ""
45
52
  }, null, 8, ["method"]),
46
- t(o(W), {
47
- id: e.transformedOperation.id,
53
+ t(o(F), {
54
+ id: e.id,
48
55
  class: "endpoint-anchor"
49
56
  }, {
50
- default: n(() => [
51
- r("h3", F, [
52
- r("div", G, [
53
- t(R, {
54
- deprecated: o(N)(e.transformedOperation.information),
55
- path: e.transformedOperation.path
57
+ default: i(() => [
58
+ s("h3", J, [
59
+ s("div", K, [
60
+ t(W, {
61
+ deprecated: o(z)(e.operation),
62
+ path: e.path
56
63
  }, null, 8, ["deprecated", "path"])
57
64
  ]),
58
- r("div", H, f(e.transformedOperation.name), 1),
59
- o(h)(e.transformedOperation.information) ? (i(), a(o(u), {
65
+ s("div", Q, u(g.value), 1),
66
+ o(y)(e.operation) ? (n(), a(o(v), {
60
67
  key: 0,
61
- class: q(
62
- o(P)(e.transformedOperation.information)
63
- )
68
+ class: T(o(A)(e.operation))
64
69
  }, {
65
- default: n(() => [
66
- c(f(o(h)(e.transformedOperation.information)), 1)
70
+ default: i(() => [
71
+ f(u(o(y)(e.operation)), 1)
67
72
  ]),
68
73
  _: 1
69
74
  }, 8, ["class"])) : p("", !0),
70
- e.transformedOperation.isWebhook ? (i(), a(o(u), {
75
+ e.isWebhook ? (n(), a(o(v), {
71
76
  key: 1,
72
77
  class: "font-code text-green flex w-fit items-center justify-center gap-1"
73
78
  }, {
74
- default: n(() => [
75
- t(o(_), { weight: "bold" }),
76
- s[1] || (s[1] = c("Webhook "))
79
+ default: i(() => [
80
+ t(o(O), { weight: "bold" }),
81
+ r[1] || (r[1] = f("Webhook "))
77
82
  ]),
78
83
  _: 1
79
84
  })) : p("", !0)
@@ -84,72 +89,75 @@ const M = { class: "operation-title" }, j = { class: "operation-details" }, F =
84
89
  ])
85
90
  ])
86
91
  ]),
87
- actions: n(({ active: g }) => {
88
- var l;
92
+ actions: i(({ active: l }) => {
93
+ var h;
89
94
  return [
90
- g && e.request ? (i(), a(o(L), {
95
+ l && e.request ? (n(), a(o(M), {
91
96
  key: 0,
92
97
  operation: e.request
93
- }, null, 8, ["operation"])) : (l = o(y)) != null && l.hideTestRequestButton ? p("", !0) : (i(), a(o(S), {
98
+ }, null, 8, ["operation"])) : (h = o(C)) != null && h.hideTestRequestButton ? p("", !0) : (n(), a(o(I), {
94
99
  key: 1,
95
100
  class: "endpoint-try-hint size-6",
96
101
  icon: "Play",
97
102
  thickness: "1.75px"
98
103
  })),
99
- t(o(w), {
104
+ t(o(R), {
100
105
  class: "endpoint-copy p-0.5",
101
106
  icon: "Clipboard",
102
107
  label: "Copy endpoint URL",
103
108
  size: "xs",
104
109
  variant: "ghost",
105
- onClick: s[0] || (s[0] = V((Z) => o(v)(e.transformedOperation.path), ["stop"]))
110
+ onClick: r[0] || (r[0] = B((ee) => o(k)(e.path), ["stop"]))
106
111
  })
107
112
  ];
108
113
  }),
109
- default: n(() => [
110
- r("div", J, [
111
- r("div", K, [
112
- r("div", Q, [
113
- t($, {
114
- operation: e.transformedOperation.information,
114
+ default: i(() => [
115
+ s("div", X, [
116
+ s("div", Y, [
117
+ s("div", Z, [
118
+ t(D, {
119
+ parameters: e.operation.parameters,
115
120
  schemas: e.schemas,
116
- "onUpdate:modelValue": d
117
- }, null, 8, ["operation", "schemas"])
121
+ "onUpdate:modelValue": m
122
+ }, null, 8, ["parameters", "schemas"])
118
123
  ]),
119
- r("div", X, [
120
- t(z, {
124
+ s("div", x, [
125
+ t(E, {
121
126
  collapsableItems: !1,
122
- responses: e.transformedOperation.information.responses,
127
+ responses: e.operation.responses,
123
128
  schemas: e.schemas
124
129
  }, null, 8, ["responses", "schemas"])
125
130
  ])
126
131
  ]),
127
- t(o(D), {
128
- responses: e.transformedOperation.information.responses
132
+ t(o(U), {
133
+ responses: e.operation.responses
129
134
  }, null, 8, ["responses"]),
130
- t(o(E), {
135
+ t(o(_), {
131
136
  request: e.request,
132
- method: e.transformedOperation.httpVerb,
137
+ method: e.method,
133
138
  collection: e.collection,
134
- operation: e.transformedOperation.information,
139
+ operation: e.operation,
135
140
  server: e.server,
136
- "onUpdate:modelValue": d
141
+ "onUpdate:modelValue": m
137
142
  }, null, 8, ["request", "method", "collection", "operation", "server"])
138
143
  ])
139
144
  ]),
140
145
  _: 2
141
146
  }, [
142
- (m = e.transformedOperation.information) != null && m.description ? {
147
+ (c = e.operation) != null && c.description ? {
143
148
  name: "description",
144
- fn: n(() => [
145
- t(o(B), {
146
- value: e.transformedOperation.information.description,
147
- withImages: "",
148
- withAnchors: "",
149
- transformType: "heading",
150
- anchorPrefix: e.transformedOperation.id
151
- }, null, 8, ["value", "anchorPrefix"])
152
- ]),
149
+ fn: i(() => {
150
+ var l;
151
+ return [
152
+ t(o(N), {
153
+ value: (l = e.operation) == null ? void 0 : l.description,
154
+ withImages: "",
155
+ withAnchors: "",
156
+ transformType: "heading",
157
+ anchorPrefix: e.id
158
+ }, null, 8, ["value", "anchorPrefix"])
159
+ ];
160
+ }),
153
161
  key: "0"
154
162
  } : void 0
155
163
  ]), 1032, ["id"]);
@@ -157,5 +165,5 @@ const M = { class: "operation-title" }, j = { class: "operation-details" }, F =
157
165
  }
158
166
  });
159
167
  export {
160
- ue as default
168
+ ve as default
161
169
  };