@scalar/api-reference 1.31.8 → 1.31.9

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 (183) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/dist/browser/standalone.js +18613 -18470
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/ApiReference.vue.d.ts.map +1 -1
  5. package/dist/components/ApiReference.vue.js +10 -30
  6. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  7. package/dist/components/ApiReferenceLayout.vue.js +2 -2
  8. package/dist/components/ApiReferenceLayout.vue2.js +240 -222
  9. package/dist/components/Content/Content.vue.d.ts +2 -0
  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 +84 -74
  13. package/dist/components/Content/Introduction/Introduction.vue.d.ts +1 -3
  14. package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
  15. package/dist/components/Content/Introduction/Introduction.vue.js +2 -2
  16. package/dist/components/Content/Introduction/Introduction.vue2.js +93 -83
  17. package/dist/components/Content/Lazy/Loading.vue.d.ts.map +1 -1
  18. package/dist/components/Content/Lazy/Loading.vue.js +84 -86
  19. package/dist/components/Content/Models/Models.vue.js +1 -1
  20. package/dist/components/Content/Models/Models.vue2.js +4 -4
  21. package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
  22. package/dist/components/Content/Schema/Schema.vue.js +2 -2
  23. package/dist/components/Content/Schema/Schema.vue2.js +53 -53
  24. package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts.map +1 -1
  25. package/dist/components/Content/Schema/SchemaDiscriminator.vue.js +1 -1
  26. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  27. package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
  28. package/dist/components/Content/Schema/SchemaProperty.vue2.js +117 -112
  29. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
  30. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +2 -2
  31. package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +161 -191
  32. package/dist/components/Content/Schema/helpers/schema-name.d.ts +13 -0
  33. package/dist/components/Content/Schema/helpers/schema-name.d.ts.map +1 -1
  34. package/dist/components/Content/Schema/helpers/schema-name.js +59 -13
  35. package/dist/components/Content/Tag/OperationsList.vue.d.ts.map +1 -1
  36. package/dist/components/Content/Tag/OperationsList.vue.js +1 -1
  37. package/dist/components/Content/Tag/OperationsList.vue2.js +22 -25
  38. package/dist/components/Content/Tag/OperationsListItem.vue.d.ts +2 -3
  39. package/dist/components/Content/Tag/OperationsListItem.vue.d.ts.map +1 -1
  40. package/dist/components/Content/Tag/OperationsListItem.vue.js +2 -2
  41. package/dist/components/Content/Tag/OperationsListItem.vue2.js +46 -47
  42. package/dist/components/Content/Tag/Tag.vue.d.ts.map +1 -1
  43. package/dist/components/Content/Tag/Tag.vue.js +45 -47
  44. package/dist/components/Content/Tag/TagList.vue.d.ts +2 -0
  45. package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
  46. package/dist/components/Content/Tag/TagList.vue.js +40 -41
  47. package/dist/components/Content/Tag/TagSection.vue.d.ts.map +1 -1
  48. package/dist/components/Content/Tag/TagSection.vue.js +2 -2
  49. package/dist/components/Content/Tag/TagSection.vue2.js +21 -21
  50. package/dist/components/HttpMethod/HttpMethod.vue.d.ts +16 -1
  51. package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
  52. package/dist/components/HttpMethod/HttpMethod.vue.js +12 -11
  53. package/dist/components/MobileHeader.vue.d.ts +1 -8
  54. package/dist/components/MobileHeader.vue.d.ts.map +1 -1
  55. package/dist/components/MobileHeader.vue.js +1 -1
  56. package/dist/components/MobileHeader.vue2.js +19 -19
  57. package/dist/components/Section/Section.vue.js +2 -2
  58. package/dist/components/Section/Section.vue2.js +1 -1
  59. package/dist/components/ShowMoreButton.vue.js +2 -2
  60. package/dist/components/ShowMoreButton.vue2.js +1 -1
  61. package/dist/components/Sidebar/Sidebar.vue.d.ts +2 -4
  62. package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
  63. package/dist/components/Sidebar/Sidebar.vue.js +1 -1
  64. package/dist/components/Sidebar/Sidebar.vue2.js +113 -159
  65. package/dist/components/Sidebar/SidebarElement.vue.d.ts +2 -11
  66. package/dist/components/Sidebar/SidebarElement.vue.d.ts.map +1 -1
  67. package/dist/components/Sidebar/SidebarElement.vue.js +2 -2
  68. package/dist/components/Sidebar/SidebarElement.vue2.js +85 -81
  69. package/dist/components/Sidebar/SidebarHttpBadge.vue.d.ts +16 -1
  70. package/dist/components/Sidebar/SidebarHttpBadge.vue.d.ts.map +1 -1
  71. package/dist/components/Sidebar/SidebarHttpBadge.vue.js +2 -2
  72. package/dist/components/Sidebar/SidebarHttpBadge.vue2.js +11 -5
  73. package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts.map +1 -1
  74. package/dist/features/ApiClientModal/ApiClientModal.vue.js +54 -42
  75. package/dist/features/ApiClientModal/useApiClient.d.ts +74 -72
  76. package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
  77. package/dist/features/DocumentSource/hooks/useDocumentSource.d.ts +0 -2
  78. package/dist/features/DocumentSource/hooks/useDocumentSource.d.ts.map +1 -1
  79. package/dist/features/DocumentSource/hooks/useDocumentSource.js +40 -67
  80. package/dist/features/DownloadLink/DownloadLink.vue.js +1 -1
  81. package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts +5 -5
  82. package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
  83. package/dist/features/ExampleRequest/ExampleRequest.vue.js +1 -1
  84. package/dist/features/ExampleRequest/ExampleRequest.vue2.js +200 -179
  85. package/dist/features/Operation/Operation.vue.d.ts +0 -1
  86. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  87. package/dist/features/Operation/Operation.vue.js +31 -34
  88. package/dist/features/Operation/components/OperationParameters.vue.d.ts +3 -2
  89. package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
  90. package/dist/features/Operation/components/OperationParameters.vue.js +62 -64
  91. package/dist/features/Operation/components/OperationResponses.vue.d.ts +1 -2
  92. package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
  93. package/dist/features/Operation/components/OperationResponses.vue.js +2 -2
  94. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
  95. package/dist/features/Operation/components/callbacks/Callback.vue.js +3 -3
  96. package/dist/features/Operation/components/callbacks/Callback.vue2.js +31 -38
  97. package/dist/features/Operation/hooks/useResponses.d.ts +3 -3
  98. package/dist/features/Operation/hooks/useResponses.d.ts.map +1 -1
  99. package/dist/features/Operation/hooks/useResponses.js +12 -13
  100. package/dist/features/Operation/index.d.ts +0 -1
  101. package/dist/features/Operation/index.d.ts.map +1 -1
  102. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +4 -6
  103. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  104. package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
  105. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +85 -72
  106. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +2 -4
  107. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  108. package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
  109. package/dist/features/Operation/layouts/ModernLayout.vue2.js +114 -98
  110. package/dist/features/Search/SearchModal.vue.js +2 -2
  111. package/dist/features/Search/SearchModal.vue2.js +1 -1
  112. package/dist/features/Search/useSearchIndex.d.ts.map +1 -1
  113. package/dist/features/Search/useSearchIndex.js +61 -64
  114. package/dist/features/sidebar/helpers/create-sidebar.d.ts +4 -2
  115. package/dist/features/sidebar/helpers/create-sidebar.d.ts.map +1 -1
  116. package/dist/features/sidebar/helpers/create-sidebar.js +33 -0
  117. package/dist/features/sidebar/hooks/useSidebar.d.ts +2 -3
  118. package/dist/features/sidebar/hooks/useSidebar.d.ts.map +1 -1
  119. package/dist/features/sidebar/hooks/useSidebar.js +18 -0
  120. package/dist/features/sidebar/index.d.ts +2 -1
  121. package/dist/features/sidebar/index.d.ts.map +1 -1
  122. package/dist/features/traverse-schema/helpers/get-tag.d.ts +4 -2
  123. package/dist/features/traverse-schema/helpers/get-tag.d.ts.map +1 -1
  124. package/dist/features/traverse-schema/helpers/get-tag.js +7 -0
  125. package/dist/features/traverse-schema/helpers/traverse-description.js +33 -0
  126. package/dist/features/traverse-schema/helpers/traverse-document.d.ts.map +1 -1
  127. package/dist/features/traverse-schema/helpers/traverse-document.js +34 -0
  128. package/dist/features/traverse-schema/helpers/traverse-paths.d.ts +5 -3
  129. package/dist/features/traverse-schema/helpers/traverse-paths.d.ts.map +1 -1
  130. package/dist/features/traverse-schema/helpers/traverse-paths.js +32 -0
  131. package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts +2 -2
  132. package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts.map +1 -1
  133. package/dist/features/traverse-schema/helpers/traverse-schemas.js +23 -0
  134. package/dist/features/traverse-schema/helpers/traverse-tags.d.ts +2 -2
  135. package/dist/features/traverse-schema/helpers/traverse-tags.d.ts.map +1 -1
  136. package/dist/features/traverse-schema/helpers/traverse-tags.js +43 -0
  137. package/dist/features/traverse-schema/helpers/traverse-webhooks.d.ts +2 -2
  138. package/dist/features/traverse-schema/helpers/traverse-webhooks.d.ts.map +1 -1
  139. package/dist/features/traverse-schema/helpers/traverse-webhooks.js +26 -0
  140. package/dist/features/traverse-schema/index.d.ts +3 -3
  141. package/dist/features/traverse-schema/index.d.ts.map +1 -1
  142. package/dist/features/traverse-schema/types.d.ts +8 -5
  143. package/dist/features/traverse-schema/types.d.ts.map +1 -1
  144. package/dist/helpers/parse.d.ts +2 -1
  145. package/dist/helpers/parse.d.ts.map +1 -1
  146. package/dist/helpers/parse.js +72 -88
  147. package/dist/hooks/useMultipleDocuments.d.ts +6 -6
  148. package/dist/hooks/useMultipleDocuments.d.ts.map +1 -1
  149. package/dist/hooks/useNavState.d.ts +1 -1
  150. package/dist/hooks/useNavState.d.ts.map +1 -1
  151. package/dist/hooks/useNavState.js +14 -9
  152. package/dist/hooks/useOperation.d.ts +7 -7
  153. package/dist/hooks/useOperation.d.ts.map +1 -1
  154. package/dist/hooks/useOperation.js +13 -12
  155. package/dist/index.d.ts +0 -1
  156. package/dist/index.d.ts.map +1 -1
  157. package/dist/index.js +23 -25
  158. package/dist/legacy/fixtures/index.d.ts +1 -1
  159. package/dist/libs/openapi.d.ts +3 -4
  160. package/dist/libs/openapi.d.ts.map +1 -1
  161. package/dist/libs/openapi.js +8 -9
  162. package/dist/style.css +1 -1
  163. package/dist/v2/ApiReferenceWorkspace.vue.d.ts +4 -18
  164. package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
  165. package/dist/v2/ApiReferenceWorkspace.vue.js +68 -45
  166. package/package.json +16 -16
  167. package/dist/components/Content/Webhooks/index.d.ts +0 -2
  168. package/dist/components/Content/Webhooks/index.d.ts.map +0 -1
  169. package/dist/features/Operation/Webhooks.vue.d.ts +0 -7
  170. package/dist/features/Operation/Webhooks.vue.d.ts.map +0 -1
  171. package/dist/features/Operation/Webhooks.vue.js +0 -7
  172. package/dist/features/Operation/Webhooks.vue2.js +0 -121
  173. package/dist/features/Operation/components/Webhook.vue.d.ts +0 -7
  174. package/dist/features/Operation/components/Webhook.vue.d.ts.map +0 -1
  175. package/dist/features/Operation/components/Webhook.vue.js +0 -7
  176. package/dist/features/Operation/components/Webhook.vue2.js +0 -29
  177. package/dist/features/traverse-schema/helpers/operation-id-params.d.ts +0 -8
  178. package/dist/features/traverse-schema/helpers/operation-id-params.d.ts.map +0 -1
  179. package/dist/features/traverse-schema/helpers/operation-id-params.js +0 -8
  180. package/dist/hooks/useSidebar.d.ts +0 -53
  181. package/dist/hooks/useSidebar.d.ts.map +0 -1
  182. package/dist/hooks/useSidebar.js +0 -248
  183. package/dist/legacy/fixtures/httpRequestMethods.js +0 -14
@@ -1,70 +1,82 @@
1
- import { defineComponent as k, computed as O, createBlock as n, openBlock as r, unref as o, createSlots as S, withCtx as i, createElementVNode as t, createVNode as a, createCommentVNode as c, withModifiers as V, toDisplayString as h, normalizeClass as _, createTextVNode as B } from "vue";
2
- import { ScalarIcon as w, ScalarIconButton as R, ScalarMarkdown as T } from "@scalar/components";
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";
3
4
  import { useClipboard as I } from "@scalar/use-hooks/useClipboard";
4
- import N from "../../../components/OperationPath.vue.js";
5
- import { useConfig as P } from "../../../hooks/useConfig.js";
6
- import { isOperationDeprecated as $, getOperationStability as f, getOperationStabilityColor as q } from "../../../libs/openapi.js";
7
- import z from "../components/OperationParameters.vue.js";
8
- import A from "../components/OperationResponses.vue.js";
9
- import D from "../../../components/Section/SectionAccordion.vue.js";
10
- import E from "../../ExampleResponses/ExampleResponses.vue.js";
11
- import U from "../../ExampleRequest/ExampleRequest.vue.js";
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";
12
13
  import L from "../../TestRequestButton/TestRequestButton.vue.js";
13
- import M from "../../../components/HttpMethod/HttpMethod.vue.js";
14
- import j from "../../../components/Anchor/Anchor.vue.js";
15
- import F from "../../../components/Badge/Badge.vue.js";
16
- const G = { class: "operation-title" }, H = { class: "operation-details" }, J = { class: "endpoint-label" }, K = { class: "endpoint-label-path" }, Q = { class: "endpoint-label-name" }, W = { class: "endpoint-content" }, X = { class: "operation-details-card" }, Y = { class: "operation-details-card-item" }, Z = { class: "operation-details-card-item" }, ue = /* @__PURE__ */ k({
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({
17
18
  __name: "ClassicLayout",
18
19
  props: {
19
- id: {},
20
20
  collection: {},
21
21
  server: {},
22
- operation: {},
22
+ request: {},
23
23
  transformedOperation: {},
24
24
  schemas: {}
25
25
  },
26
26
  emits: ["update:modelValue"],
27
- setup(s, { emit: u }) {
28
- const { copyToClipboard: v } = I(), y = P(), C = O(() => s.operation.summary || s.operation.path), b = u, p = (e) => {
27
+ setup(Y, { emit: O }) {
28
+ const { copyToClipboard: v } = I(), y = T(), b = O, d = (e) => {
29
29
  b("update:modelValue", e);
30
30
  };
31
- return (e, l) => {
32
- var d;
33
- return r(), n(o(D), {
34
- id: e.id,
31
+ return (e, s) => {
32
+ var m;
33
+ return i(), a(o(A), {
34
+ id: e.transformedOperation.id,
35
35
  class: "reference-endpoint",
36
36
  transparent: ""
37
- }, S({
38
- title: i(() => [
39
- t("div", G, [
40
- t("div", H, [
41
- a(o(M), {
37
+ }, C({
38
+ title: n(() => [
39
+ r("div", M, [
40
+ r("div", j, [
41
+ t(o(U), {
42
42
  class: "endpoint-type",
43
- method: e.operation.method,
43
+ method: e.transformedOperation.httpVerb,
44
44
  short: ""
45
45
  }, null, 8, ["method"]),
46
- a(o(j), {
47
- id: e.id ?? "",
46
+ t(o(W), {
47
+ id: e.transformedOperation.id,
48
48
  class: "endpoint-anchor"
49
49
  }, {
50
- default: i(() => [
51
- t("h3", J, [
52
- t("div", K, [
53
- a(N, {
54
- deprecated: o($)(e.operation),
55
- path: e.operation.path
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
56
56
  }, null, 8, ["deprecated", "path"])
57
57
  ]),
58
- t("div", Q, h(C.value), 1),
59
- o(f)(e.operation) ? (r(), n(o(F), {
58
+ r("div", H, f(e.transformedOperation.name), 1),
59
+ o(h)(e.transformedOperation.information) ? (i(), a(o(u), {
60
60
  key: 0,
61
- class: _(o(q)(e.operation))
61
+ class: q(
62
+ o(P)(e.transformedOperation.information)
63
+ )
62
64
  }, {
63
- default: i(() => [
64
- B(h(o(f)(e.operation)), 1)
65
+ default: n(() => [
66
+ c(f(o(h)(e.transformedOperation.information)), 1)
65
67
  ]),
66
68
  _: 1
67
- }, 8, ["class"])) : c("", !0)
69
+ }, 8, ["class"])) : p("", !0),
70
+ e.transformedOperation.isWebhook ? (i(), a(o(u), {
71
+ key: 1,
72
+ class: "font-code text-green flex w-fit items-center justify-center gap-1"
73
+ }, {
74
+ default: n(() => [
75
+ t(o(_), { weight: "bold" }),
76
+ s[1] || (s[1] = c("Webhook "))
77
+ ]),
78
+ _: 1
79
+ })) : p("", !0)
68
80
  ])
69
81
  ]),
70
82
  _: 1
@@ -72,69 +84,70 @@ const G = { class: "operation-title" }, H = { class: "operation-details" }, J =
72
84
  ])
73
85
  ])
74
86
  ]),
75
- actions: i(({ active: g }) => {
76
- var m;
87
+ actions: n(({ active: g }) => {
88
+ var l;
77
89
  return [
78
- g ? (r(), n(o(L), {
90
+ g && e.request ? (i(), a(o(L), {
79
91
  key: 0,
80
- operation: e.operation
81
- }, null, 8, ["operation"])) : (m = o(y)) != null && m.hideTestRequestButton ? c("", !0) : (r(), n(o(w), {
92
+ operation: e.request
93
+ }, null, 8, ["operation"])) : (l = o(y)) != null && l.hideTestRequestButton ? p("", !0) : (i(), a(o(S), {
82
94
  key: 1,
83
95
  class: "endpoint-try-hint size-6",
84
96
  icon: "Play",
85
97
  thickness: "1.75px"
86
98
  })),
87
- a(o(R), {
99
+ t(o(w), {
88
100
  class: "endpoint-copy p-0.5",
89
101
  icon: "Clipboard",
90
102
  label: "Copy endpoint URL",
91
103
  size: "xs",
92
104
  variant: "ghost",
93
- onClick: l[0] || (l[0] = V((x) => o(v)(e.operation.path), ["stop"]))
105
+ onClick: s[0] || (s[0] = V((Z) => o(v)(e.transformedOperation.path), ["stop"]))
94
106
  })
95
107
  ];
96
108
  }),
97
- default: i(() => [
98
- t("div", W, [
99
- t("div", X, [
100
- t("div", Y, [
101
- a(z, {
102
- operation: e.operation,
109
+ default: n(() => [
110
+ r("div", J, [
111
+ r("div", K, [
112
+ r("div", Q, [
113
+ t($, {
114
+ operation: e.transformedOperation.information,
103
115
  schemas: e.schemas,
104
- "onUpdate:modelValue": p
116
+ "onUpdate:modelValue": d
105
117
  }, null, 8, ["operation", "schemas"])
106
118
  ]),
107
- t("div", Z, [
108
- a(A, {
119
+ r("div", X, [
120
+ t(z, {
109
121
  collapsableItems: !1,
110
- operation: e.transformedOperation,
122
+ responses: e.transformedOperation.information.responses,
111
123
  schemas: e.schemas
112
- }, null, 8, ["operation", "schemas"])
124
+ }, null, 8, ["responses", "schemas"])
113
125
  ])
114
126
  ]),
115
- a(o(E), {
116
- responses: e.operation.responses
127
+ t(o(D), {
128
+ responses: e.transformedOperation.information.responses
117
129
  }, null, 8, ["responses"]),
118
- a(o(U), {
130
+ t(o(E), {
131
+ request: e.request,
132
+ method: e.transformedOperation.httpVerb,
119
133
  collection: e.collection,
120
- operation: e.operation,
134
+ operation: e.transformedOperation.information,
121
135
  server: e.server,
122
- transformedOperation: e.transformedOperation,
123
- "onUpdate:modelValue": p
124
- }, null, 8, ["collection", "operation", "server", "transformedOperation"])
136
+ "onUpdate:modelValue": d
137
+ }, null, 8, ["request", "method", "collection", "operation", "server"])
125
138
  ])
126
139
  ]),
127
140
  _: 2
128
141
  }, [
129
- (d = e.operation) != null && d.description ? {
142
+ (m = e.transformedOperation.information) != null && m.description ? {
130
143
  name: "description",
131
- fn: i(() => [
132
- a(o(T), {
133
- value: e.operation.description,
144
+ fn: n(() => [
145
+ t(o(B), {
146
+ value: e.transformedOperation.information.description,
134
147
  withImages: "",
135
148
  withAnchors: "",
136
149
  transformType: "heading",
137
- anchorPrefix: e.id
150
+ anchorPrefix: e.transformedOperation.id
138
151
  }, null, 8, ["value", "anchorPrefix"])
139
152
  ]),
140
153
  key: "0"
@@ -1,12 +1,10 @@
1
- import type { Collection, Operation, Server } from '@scalar/oas-utils/entities/spec';
1
+ import type { Collection, Request, Server } from '@scalar/oas-utils/entities/spec';
2
2
  import type { TransformedOperation } from '@scalar/types/legacy';
3
3
  import type { Schemas } from '../../../features/Operation/types/schemas';
4
4
  type __VLS_Props = {
5
- id?: string;
6
5
  collection: Collection;
7
6
  server: Server | undefined;
8
- operation: Operation;
9
- /** @deprecated Use `operation` instead */
7
+ request: Request | undefined;
10
8
  transformedOperation: TransformedOperation;
11
9
  schemas?: Schemas;
12
10
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ModernLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/layouts/ModernLayout.vue"],"names":[],"mappings":"AAuKA,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EACT,MAAM,EACP,MAAM,iCAAiC,CAAA;AAExC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAgBhE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAA;AAejE,KAAK,WAAW,GAAG;IACjB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,UAAU,EAAE,UAAU,CAAA;IACtB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,SAAS,EAAE,SAAS,CAAA;IACpB,0CAA0C;IAC1C,oBAAoB,EAAE,oBAAoB,CAAA;IAC1C,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAC;;;;;;AAoSF,wBAQG"}
1
+ {"version":3,"file":"ModernLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/layouts/ModernLayout.vue"],"names":[],"mappings":"AAkLA,OAAO,KAAK,EACV,UAAU,EACV,OAAO,EACP,MAAM,EACP,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAgBhE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAA;AAejE,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;;;;;;AA6TF,wBAQG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./ModernLayout.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-8ef8ef87"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-ae05c30d"]]);
5
5
  export {
6
- a as default
6
+ m as default
7
7
  };
@@ -1,72 +1,84 @@
1
- import { defineComponent as k, useId as C, computed as V, createBlock as t, openBlock as n, unref as o, withCtx as r, createVNode as a, createCommentVNode as u, createElementVNode as i, normalizeClass as f, createTextVNode as h, toDisplayString as b } from "vue";
2
- import { ScalarMarkdown as B, ScalarErrorBoundary as l } from "@scalar/components";
3
- import w from "../../../components/OperationPath.vue.js";
4
- import { useConfig as E } from "../../../hooks/useConfig.js";
5
- import { getOperationStability as g, getOperationStabilityColor as N, isOperationDeprecated as T } from "../../../libs/openapi.js";
6
- import D from "../components/callbacks/Callbacks.vue.js";
7
- import I from "../components/OperationParameters.vue.js";
8
- import P from "../components/OperationResponses.vue.js";
9
- import R from "../../../components/Section/Section.vue.js";
10
- import $ from "../../../components/Section/SectionContent.vue.js";
11
- import q from "../../../components/Badge/Badge.vue.js";
12
- import A from "../../../components/Section/SectionHeader.vue.js";
13
- import H from "../../../components/Anchor/Anchor.vue.js";
14
- import L from "../../../components/Section/SectionHeaderTag.vue.js";
15
- import M from "../../../components/Section/SectionColumns.vue.js";
16
- import v from "../../../components/Section/SectionColumn.vue.js";
17
- import U from "../../ExampleRequest/ExampleRequest.vue.js";
18
- import _ from "../../TestRequestButton/TestRequestButton.vue.js";
19
- import z from "../../ExampleResponses/ExampleResponses.vue.js";
20
- const j = { class: "operation-details" }, F = { class: "examples" }, de = /* @__PURE__ */ k({
1
+ import { defineComponent as S, useId as q, createBlock as t, openBlock as n, unref as o, withCtx as a, createVNode as r, createCommentVNode as i, createElementVNode as s, normalizeClass as u, createTextVNode as m, toDisplayString as c, createSlots as v } from "vue";
2
+ import { ScalarMarkdown as C, ScalarErrorBoundary as l } from "@scalar/components";
3
+ import { ScalarIconWebhooksLogo as V } from "@scalar/icons";
4
+ import B from "../../../components/OperationPath.vue.js";
5
+ import { useConfig as w } from "../../../hooks/useConfig.js";
6
+ import { getOperationStability as h, getOperationStabilityColor as E, isOperationDeprecated as I } from "../../../libs/openapi.js";
7
+ import N from "../components/callbacks/Callbacks.vue.js";
8
+ import T from "../components/OperationParameters.vue.js";
9
+ import D from "../components/OperationResponses.vue.js";
10
+ import L from "../../../components/Section/Section.vue.js";
11
+ import P from "../../../components/Section/SectionContent.vue.js";
12
+ import O from "../../../components/Badge/Badge.vue.js";
13
+ import R from "../../../components/Section/SectionHeader.vue.js";
14
+ import W from "../../../components/Anchor/Anchor.vue.js";
15
+ import $ from "../../../components/Section/SectionHeaderTag.vue.js";
16
+ import A from "../../../components/Section/SectionColumns.vue.js";
17
+ import b from "../../../components/Section/SectionColumn.vue.js";
18
+ import H from "../../ExampleRequest/ExampleRequest.vue.js";
19
+ import M from "../../TestRequestButton/TestRequestButton.vue.js";
20
+ import U from "../../ExampleResponses/ExampleResponses.vue.js";
21
+ const j = { class: "operation-details" }, z = { class: "examples" }, pe = /* @__PURE__ */ S({
21
22
  __name: "ModernLayout",
22
23
  props: {
23
- id: {},
24
24
  collection: {},
25
25
  server: {},
26
- operation: {},
26
+ request: {},
27
27
  transformedOperation: {},
28
28
  schemas: {}
29
29
  },
30
30
  emits: ["update:modelValue"],
31
- setup(s, { emit: y }) {
32
- const O = y, m = C(), S = E(), p = V(() => s.operation.summary || s.operation.path), d = (e) => {
33
- O("update:modelValue", e);
31
+ setup(F, { emit: g }) {
32
+ const y = g, d = q(), k = w(), p = (e) => {
33
+ y("update:modelValue", e);
34
34
  };
35
- return (e, G) => (n(), t(o(R), {
36
- id: e.id,
37
- "aria-labelledby": o(m),
38
- label: p.value,
35
+ return (e, f) => (n(), t(o(L), {
36
+ id: e.transformedOperation.id,
37
+ "aria-labelledby": o(d),
38
+ label: e.transformedOperation.name,
39
39
  tabindex: "-1"
40
40
  }, {
41
- default: r(() => [
42
- a(o($), {
43
- loading: o(S).isLoading
41
+ default: a(() => [
42
+ r(o(P), {
43
+ loading: o(k).isLoading
44
44
  }, {
45
- default: r(() => [
46
- o(g)(e.operation) ? (n(), t(o(q), {
45
+ default: a(() => [
46
+ o(h)(e.transformedOperation.information) ? (n(), t(o(O), {
47
47
  key: 0,
48
- class: f(o(N)(e.operation))
48
+ class: u(o(E)(e.transformedOperation.information))
49
49
  }, {
50
- default: r(() => [
51
- h(b(o(g)(e.operation)), 1)
50
+ default: a(() => [
51
+ m(c(o(h)(e.transformedOperation.information)), 1)
52
52
  ]),
53
53
  _: 1
54
- }, 8, ["class"])) : u("", !0),
55
- i("div", {
56
- class: f(o(T)(e.operation) ? "deprecated" : "")
54
+ }, 8, ["class"])) : i("", !0),
55
+ e.transformedOperation.isWebhook ? (n(), t(o(O), {
56
+ key: 1,
57
+ class: "font-code text-green flex w-fit items-center justify-center gap-1"
58
+ }, {
59
+ default: a(() => [
60
+ r(o(V), { weight: "bold" }),
61
+ f[0] || (f[0] = m("Webhook "))
62
+ ]),
63
+ _: 1
64
+ })) : i("", !0),
65
+ s("div", {
66
+ class: u(
67
+ o(I)(e.transformedOperation.information) ? "deprecated" : ""
68
+ )
57
69
  }, [
58
- a(o(A), null, {
59
- default: r(() => [
60
- a(o(H), {
61
- id: e.id ?? ""
70
+ r(o(R), null, {
71
+ default: a(() => [
72
+ r(o(W), {
73
+ id: e.transformedOperation.id
62
74
  }, {
63
- default: r(() => [
64
- a(o(L), {
65
- id: o(m),
75
+ default: a(() => [
76
+ r(o($), {
77
+ id: o(d),
66
78
  level: 3
67
79
  }, {
68
- default: r(() => [
69
- h(b(p.value), 1)
80
+ default: a(() => [
81
+ m(c(e.transformedOperation.name), 1)
70
82
  ]),
71
83
  _: 1
72
84
  }, 8, ["id"])
@@ -77,35 +89,36 @@ const j = { class: "operation-details" }, F = { class: "examples" }, de = /* @__
77
89
  _: 1
78
90
  })
79
91
  ], 2),
80
- a(o(M), null, {
81
- default: r(() => [
82
- a(o(v), null, {
83
- default: r(() => [
84
- i("div", j, [
85
- a(o(B), {
86
- value: e.operation.description,
92
+ r(o(A), null, {
93
+ default: a(() => [
94
+ r(o(b), null, {
95
+ default: a(() => [
96
+ s("div", j, [
97
+ r(o(C), {
98
+ value: e.transformedOperation.information.description,
87
99
  withImages: "",
88
100
  withAnchors: "",
89
101
  transformType: "heading",
90
- anchorPrefix: e.id
102
+ anchorPrefix: e.transformedOperation.id
91
103
  }, null, 8, ["value", "anchorPrefix"]),
92
- a(I, {
93
- operation: e.operation,
104
+ r(T, {
105
+ parameters: e.transformedOperation.information.parameters,
106
+ requestBody: e.transformedOperation.information.requestBody,
94
107
  schemas: e.schemas,
95
- "onUpdate:modelValue": d
96
- }, null, 8, ["operation", "schemas"]),
97
- a(P, {
98
- operation: e.transformedOperation,
108
+ "onUpdate:modelValue": p
109
+ }, null, 8, ["parameters", "requestBody", "schemas"]),
110
+ r(D, {
111
+ responses: e.transformedOperation.information.responses,
99
112
  schemas: e.schemas
100
- }, null, 8, ["operation", "schemas"]),
101
- a(o(l), null, {
102
- default: r(() => [
103
- e.operation.callbacks ? (n(), t(D, {
113
+ }, null, 8, ["responses", "schemas"]),
114
+ r(o(l), null, {
115
+ default: a(() => [
116
+ e.transformedOperation.information.callbacks ? (n(), t(N, {
104
117
  key: 0,
105
- callbacks: e.operation.callbacks,
118
+ callbacks: e.transformedOperation.information.callbacks,
106
119
  collection: e.collection,
107
120
  schemas: e.schemas
108
- }, null, 8, ["callbacks", "collection", "schemas"])) : u("", !0)
121
+ }, null, 8, ["callbacks", "collection", "schemas"])) : i("", !0)
109
122
  ]),
110
123
  _: 1
111
124
  })
@@ -113,42 +126,45 @@ const j = { class: "operation-details" }, F = { class: "examples" }, de = /* @__
113
126
  ]),
114
127
  _: 1
115
128
  }),
116
- a(o(v), null, {
117
- default: r(() => [
118
- i("div", F, [
119
- a(o(l), null, {
120
- default: r(() => [
121
- a(o(U), {
129
+ r(o(b), null, {
130
+ default: a(() => [
131
+ s("div", z, [
132
+ r(o(l), null, {
133
+ default: a(() => [
134
+ r(o(H), {
135
+ request: e.request,
136
+ method: e.transformedOperation.httpVerb,
122
137
  collection: e.collection,
123
138
  fallback: "",
124
- operation: e.operation,
139
+ operation: e.transformedOperation.information,
125
140
  server: e.server,
126
- transformedOperation: e.transformedOperation,
127
141
  schemas: e.schemas,
128
- "onUpdate:modelValue": d
129
- }, {
130
- header: r(() => {
131
- var c;
132
- return [
133
- a(w, {
134
- class: "example-path",
135
- deprecated: (c = e.transformedOperation.information) == null ? void 0 : c.deprecated,
136
- path: e.transformedOperation.path
137
- }, null, 8, ["deprecated", "path"])
138
- ];
139
- }),
140
- footer: r(() => [
141
- a(o(_), { operation: e.operation }, null, 8, ["operation"])
142
+ "onUpdate:modelValue": p
143
+ }, v({
144
+ header: a(() => [
145
+ r(B, {
146
+ class: "example-path",
147
+ deprecated: e.transformedOperation.information.deprecated,
148
+ path: e.transformedOperation.path
149
+ }, null, 8, ["deprecated", "path"])
142
150
  ]),
143
- _: 1
144
- }, 8, ["collection", "operation", "server", "transformedOperation", "schemas"])
151
+ _: 2
152
+ }, [
153
+ e.request ? {
154
+ name: "footer",
155
+ fn: a(() => [
156
+ r(o(M), { operation: e.request }, null, 8, ["operation"])
157
+ ]),
158
+ key: "0"
159
+ } : void 0
160
+ ]), 1032, ["request", "method", "collection", "operation", "server", "schemas"])
145
161
  ]),
146
162
  _: 1
147
163
  }),
148
- a(o(l), null, {
149
- default: r(() => [
150
- a(o(z), {
151
- responses: e.operation.responses,
164
+ r(o(l), null, {
165
+ default: a(() => [
166
+ r(o(U), {
167
+ responses: e.transformedOperation.information.responses,
152
168
  style: { "margin-top": "12px" }
153
169
  }, null, 8, ["responses"])
154
170
  ]),
@@ -170,5 +186,5 @@ const j = { class: "operation-details" }, F = { class: "examples" }, de = /* @__
170
186
  }
171
187
  });
172
188
  export {
173
- de as default
189
+ pe as default
174
190
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./SearchModal.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-b601e986"]]);
4
+ const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-1d306466"]]);
5
5
  export {
6
- m as default
6
+ p as default
7
7
  };
@@ -5,7 +5,7 @@ import { nanoid as oe } from "nanoid";
5
5
  import { lazyBus as ae } from "../../components/Content/Lazy/lazyBus.js";
6
6
  import se from "../../components/Sidebar/SidebarHttpBadge.vue.js";
7
7
  import { useSearchIndex as ne } from "./useSearchIndex.js";
8
- import { useSidebar as re } from "../../hooks/useSidebar.js";
8
+ import { useSidebar as re } from "../sidebar/hooks/useSidebar.js";
9
9
  const le = { class: "sr-only" }, ie = { class: "sr-only" }, ve = /* @__PURE__ */ Y({
10
10
  __name: "SearchModal",
11
11
  props: {
@@ -1 +1 @@
1
- {"version":3,"file":"useSearchIndex.d.ts","sourceRoot":"","sources":["../../../src/features/Search/useSearchIndex.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AACtE,OAAa,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAA;AAC/C,OAAO,EAAE,KAAK,GAAG,EAAwB,MAAM,KAAK,CAAA;AAGpD,OAAO,EAAE,KAAK,QAAQ,EAAgB,MAAM,sBAAsB,CAAA;AAMlE,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,KAAK,CAAA;AAEvE,MAAM,MAAM,QAAQ,GAAG;IACrB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,SAAS,CAAA;IACf,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,QAAQ,CAAA;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,SAAS,CAAC,EAAE,oBAAoB,CAAA;CACjC,CAAA;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAC7B,aAAa,GACd,EAAE;IACD,aAAa,EAAE,GAAG,CAAC,IAAI,CAAC,CAAA;CACzB;uBA0ByB,IAAI;sBAbL,IAAI;;;;;EA0K5B"}
1
+ {"version":3,"file":"useSearchIndex.d.ts","sourceRoot":"","sources":["../../../src/features/Search/useSearchIndex.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AACtE,OAAa,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAA;AAC/C,OAAO,EAAE,KAAK,GAAG,EAAwB,MAAM,KAAK,CAAA;AAGpD,OAAO,EAAE,KAAK,QAAQ,EAAgB,MAAM,sBAAsB,CAAA;AAKlE,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,KAAK,CAAA;AAEvE,MAAM,MAAM,QAAQ,GAAG;IACrB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,SAAS,CAAA;IACf,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,QAAQ,CAAA;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,SAAS,CAAC,EAAE,oBAAoB,CAAA;CACjC,CAAA;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAC7B,aAAa,GACd,EAAE;IACD,aAAa,EAAE,GAAG,CAAC,IAAI,CAAC,CAAA;CACzB;uBA0ByB,IAAI;sBAbL,IAAI;;;;;EAsK5B"}