@scalar/api-reference 1.35.1 → 1.35.3

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 (165) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/browser/standalone.js +13534 -13691
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/ApiReference.vue.d.ts +2 -1
  5. package/dist/components/ApiReference.vue.d.ts.map +1 -1
  6. package/dist/components/ApiReference.vue.js +14 -11
  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 +70 -72
  10. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts +3 -1
  11. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts.map +1 -1
  12. package/dist/components/Content/Content.vue.d.ts +0 -2
  13. package/dist/components/Content/Content.vue.d.ts.map +1 -1
  14. package/dist/components/Content/Content.vue.js +80 -80
  15. package/dist/components/Content/Models/ClassicLayout.vue.d.ts +5 -2
  16. package/dist/components/Content/Models/ClassicLayout.vue.d.ts.map +1 -1
  17. package/dist/components/Content/Models/ClassicLayout.vue.js +2 -2
  18. package/dist/components/Content/Models/ClassicLayout.vue2.js +43 -45
  19. package/dist/components/Content/Models/ClassicLayout.vue3.js +2 -2
  20. package/dist/components/Content/Models/Models.vue.d.ts +2 -2
  21. package/dist/components/Content/Models/Models.vue.d.ts.map +1 -1
  22. package/dist/components/Content/Models/Models.vue.js +27 -20
  23. package/dist/components/Content/Models/ModernLayout.vue.d.ts +5 -2
  24. package/dist/components/Content/Models/ModernLayout.vue.d.ts.map +1 -1
  25. package/dist/components/Content/Models/ModernLayout.vue.js +2 -2
  26. package/dist/components/Content/Models/ModernLayout.vue2.js +48 -52
  27. package/dist/components/Content/Operations/TraversedEntry.vue.d.ts +3 -2
  28. package/dist/components/Content/Operations/TraversedEntry.vue.d.ts.map +1 -1
  29. package/dist/components/Content/Operations/TraversedEntry.vue.js +33 -32
  30. package/dist/components/Content/Operations/TraversedEntryContainer.vue.d.ts +2 -2
  31. package/dist/components/Content/Operations/TraversedEntryContainer.vue.d.ts.map +1 -1
  32. package/dist/components/Content/Operations/TraversedEntryContainer.vue.js +1 -1
  33. package/dist/components/Content/Schema/Schema.vue.d.ts +6 -22
  34. package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
  35. package/dist/components/Content/Schema/Schema.vue.js +2 -2
  36. package/dist/components/Content/Schema/Schema.vue2.js +86 -140
  37. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts +15 -4
  38. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
  39. package/dist/components/Content/Schema/SchemaComposition.vue.js +77 -138
  40. package/dist/components/Content/Schema/SchemaEnumValues.vue.d.ts +2 -13
  41. package/dist/components/Content/Schema/SchemaEnumValues.vue.d.ts.map +1 -1
  42. package/dist/components/Content/Schema/SchemaEnumValues.vue.js +2 -2
  43. package/dist/components/Content/Schema/SchemaEnumValues.vue2.js +66 -92
  44. package/dist/components/Content/Schema/SchemaHeading.vue.d.ts +2 -2
  45. package/dist/components/Content/Schema/SchemaHeading.vue.d.ts.map +1 -1
  46. package/dist/components/Content/Schema/SchemaHeading.vue.js +2 -2
  47. package/dist/components/Content/Schema/SchemaHeading.vue2.js +19 -17
  48. package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts +5 -14
  49. package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts.map +1 -1
  50. package/dist/components/Content/Schema/SchemaObjectProperties.vue.js +47 -68
  51. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +4 -13
  52. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  53. package/dist/components/Content/Schema/SchemaProperty.vue.js +2 -2
  54. package/dist/components/Content/Schema/SchemaProperty.vue2.js +116 -144
  55. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.d.ts +1 -1
  56. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.d.ts.map +1 -1
  57. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js +2 -2
  58. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts +9 -4
  59. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
  60. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +2 -2
  61. package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +173 -204
  62. package/dist/components/Content/Schema/helpers/get-ref-name.d.ts +11 -0
  63. package/dist/components/Content/Schema/helpers/get-ref-name.d.ts.map +1 -0
  64. package/dist/components/Content/Schema/helpers/get-ref-name.js +11 -0
  65. package/dist/components/Content/Schema/helpers/get-schema-type.d.ts +13 -3
  66. package/dist/components/Content/Schema/helpers/get-schema-type.d.ts.map +1 -1
  67. package/dist/components/Content/Schema/helpers/get-schema-type.js +34 -13
  68. package/dist/components/Content/Schema/helpers/is-type-object.d.ts +4 -2
  69. package/dist/components/Content/Schema/helpers/is-type-object.d.ts.map +1 -1
  70. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts +2 -4
  71. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts.map +1 -1
  72. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +130 -84
  73. package/dist/components/Content/Schema/helpers/optimize-value-for-display.d.ts +5 -5
  74. package/dist/components/Content/Schema/helpers/optimize-value-for-display.d.ts.map +1 -1
  75. package/dist/components/Content/Schema/helpers/optimize-value-for-display.js +40 -31
  76. package/dist/components/Content/Schema/helpers/schema-composition.d.ts +0 -8
  77. package/dist/components/Content/Schema/helpers/schema-composition.d.ts.map +1 -1
  78. package/dist/components/Content/Schema/helpers/schema-composition.js +2 -6
  79. package/dist/components/Content/Schema/helpers/schema-name.d.ts +8 -17
  80. package/dist/components/Content/Schema/helpers/schema-name.d.ts.map +1 -1
  81. package/dist/components/Content/Schema/helpers/schema-name.js +24 -33
  82. package/dist/features/Operation/Operation.vue.d.ts +3 -4
  83. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  84. package/dist/features/Operation/Operation.vue.js +54 -73
  85. package/dist/features/Operation/components/ContentTypeSelect.vue.d.ts +10 -11
  86. package/dist/features/Operation/components/ContentTypeSelect.vue.d.ts.map +1 -1
  87. package/dist/features/Operation/components/ContentTypeSelect.vue.js +35 -43
  88. package/dist/features/Operation/components/{ParameterHeaders.vue.d.ts → Header.vue.d.ts} +4 -5
  89. package/dist/features/Operation/components/Header.vue.d.ts.map +1 -0
  90. package/dist/features/Operation/components/Header.vue.js +23 -0
  91. package/dist/features/Operation/components/Header.vue2.js +4 -0
  92. package/dist/features/Operation/components/Headers.vue.d.ts +8 -0
  93. package/dist/features/Operation/components/Headers.vue.d.ts.map +1 -0
  94. package/dist/features/Operation/components/Headers.vue.js +7 -0
  95. package/dist/features/Operation/components/Headers.vue2.js +61 -0
  96. package/dist/features/Operation/components/OperationParameters.vue.d.ts +4 -10
  97. package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
  98. package/dist/features/Operation/components/OperationParameters.vue.js +23 -33
  99. package/dist/features/Operation/components/OperationResponses.vue.d.ts +3 -6
  100. package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
  101. package/dist/features/Operation/components/OperationResponses.vue.js +22 -19
  102. package/dist/features/Operation/components/ParameterList.vue.d.ts +3 -10
  103. package/dist/features/Operation/components/ParameterList.vue.d.ts.map +1 -1
  104. package/dist/features/Operation/components/ParameterList.vue.js +35 -5
  105. package/dist/features/Operation/components/ParameterList.vue2.js +2 -38
  106. package/dist/features/Operation/components/ParameterListItem.vue.d.ts +4 -10
  107. package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
  108. package/dist/features/Operation/components/ParameterListItem.vue.js +2 -2
  109. package/dist/features/Operation/components/ParameterListItem.vue2.js +77 -74
  110. package/dist/features/Operation/components/RequestBody.vue.d.ts +3 -8
  111. package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
  112. package/dist/features/Operation/components/RequestBody.vue.js +1 -1
  113. package/dist/features/Operation/components/RequestBody.vue2.js +75 -82
  114. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +0 -4
  115. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
  116. package/dist/features/Operation/components/callbacks/Callback.vue.js +3 -3
  117. package/dist/features/Operation/components/callbacks/Callback.vue2.js +35 -36
  118. package/dist/features/Operation/components/callbacks/Callback.vue3.js +2 -2
  119. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts +0 -2
  120. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -1
  121. package/dist/features/Operation/components/callbacks/Callbacks.vue.js +13 -15
  122. package/dist/features/Operation/helpers/combine-params.d.ts +1 -1
  123. package/dist/features/Operation/helpers/combine-params.d.ts.map +1 -1
  124. package/dist/features/Operation/helpers/combine-params.js +2 -2
  125. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +1 -9
  126. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  127. package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
  128. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +75 -82
  129. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +2 -10
  130. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  131. package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
  132. package/dist/features/Operation/layouts/ModernLayout.vue2.js +96 -103
  133. package/dist/index.js +1 -1
  134. package/dist/libs/openapi.d.ts +1 -13
  135. package/dist/libs/openapi.d.ts.map +1 -1
  136. package/dist/libs/openapi.js +39 -56
  137. package/dist/style.css +1 -1
  138. package/dist/v2/ApiReferenceWorkspace.vue.d.ts +10 -4
  139. package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
  140. package/dist/v2/ApiReferenceWorkspace.vue.js +22 -18
  141. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts +1 -1
  142. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts.map +1 -1
  143. package/package.json +14 -14
  144. package/dist/components/Content/Schema/Schema.preview.d.ts +0 -1078
  145. package/dist/components/Content/Schema/Schema.preview.d.ts.map +0 -1
  146. package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts +0 -12
  147. package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts.map +0 -1
  148. package/dist/components/Content/Schema/SchemaDiscriminator.vue.js +0 -49
  149. package/dist/components/Content/Schema/SchemaDiscriminator.vue2.js +0 -4
  150. package/dist/components/Content/Schema/SchemaPropertyDescription.vue.d.ts +0 -13
  151. package/dist/components/Content/Schema/SchemaPropertyDescription.vue.d.ts.map +0 -1
  152. package/dist/features/Operation/components/ParameterHeaders.vue.d.ts.map +0 -1
  153. package/dist/features/Operation/components/ParameterHeaders.vue.js +0 -7
  154. package/dist/features/Operation/components/ParameterHeaders.vue2.js +0 -64
  155. package/dist/features/Operation/components/ParameterList.vue3.js +0 -4
  156. package/dist/features/Operation/hooks/useResponses.d.ts +0 -17
  157. package/dist/features/Operation/hooks/useResponses.d.ts.map +0 -1
  158. package/dist/features/Operation/hooks/useResponses.js +0 -19
  159. package/dist/hooks/useDiscriminator.d.ts +0 -53
  160. package/dist/hooks/useDiscriminator.d.ts.map +0 -1
  161. package/dist/hooks/useDiscriminator.js +0 -149
  162. package/dist/hooks/useOperationDiscriminator.d.ts +0 -8
  163. package/dist/hooks/useOperationDiscriminator.d.ts.map +0 -1
  164. package/dist/hooks/useOperationDiscriminator.js +0 -57
  165. /package/dist/features/Operation/components/{ParameterHeaders.vue3.js → Headers.vue3.js} +0 -0
@@ -1,26 +1,27 @@
1
- import { defineComponent as C, computed as B, createBlock as r, openBlock as i, unref as o, createSlots as O, withCtx as s, createElementVNode as a, createCommentVNode as n, createElementBlock as w, createVNode as t, withModifiers as V, toDisplayString as h, normalizeClass as W, createTextVNode as u } from "vue";
2
- import { ScalarErrorBoundary as $, ScalarIconButton as q, ScalarMarkdown as I } from "@scalar/components";
3
- import { ScalarIconPlay as T, ScalarIconCopy as D, ScalarIconWebhooksLogo as E } from "@scalar/icons";
4
- import { isOperationDeprecated as L, getOperationStability as f, getOperationStabilityColor as R } from "@scalar/oas-utils/helpers";
5
- import { useClipboard as z } from "@scalar/use-hooks/useClipboard";
6
- import N from "../../../components/OperationPath.vue.js";
7
- import P from "../components/callbacks/Callbacks.vue.js";
8
- import U from "../components/OperationParameters.vue.js";
9
- import A from "../components/OperationResponses.vue.js";
10
- import M from "../../../components/Section/SectionAccordion.vue.js";
11
- import j from "../../example-responses/ExampleResponses.vue.js";
12
- import _ from "../../../components/LinkList/LinkList.vue.js";
13
- import F from "../../external-docs/ExternalDocs.vue.js";
14
- import G from "../../../v2/blocks/scalar-request-example-block/components/RequestExample.vue.js";
15
- import y from "../../x-badges/XBadges.vue.js";
16
- import H from "../../test-request-button/TestRequestButton.vue.js";
17
- import J from "../../../components/HttpMethod/HttpMethod.vue.js";
18
- import K from "../../../components/Anchor/Anchor.vue.js";
19
- import b from "../../../components/Badge/Badge.vue.js";
20
- const Q = { class: "operation-title" }, X = { class: "operation-details" }, Y = { class: "endpoint-label" }, Z = { class: "endpoint-label-path" }, x = { class: "endpoint-label-name" }, ee = { class: "endpoint-content" }, oe = { class: "operation-details-card" }, te = { class: "operation-details-card-item" }, ae = { class: "operation-details-card-item" }, se = {
1
+ import { defineComponent as v, computed as g, createBlock as r, openBlock as i, unref as o, createSlots as S, withCtx as s, createElementVNode as a, createCommentVNode as n, createElementBlock as C, createVNode as t, withModifiers as B, toDisplayString as c, normalizeClass as w, createTextVNode as h } from "vue";
2
+ import { ScalarErrorBoundary as O, ScalarIconButton as $, ScalarMarkdown as R } from "@scalar/components";
3
+ import { ScalarIconPlay as q, ScalarIconCopy as I, ScalarIconWebhooksLogo as T } from "@scalar/icons";
4
+ import { isOperationDeprecated as E, getOperationStability as u, getOperationStabilityColor as L } from "@scalar/oas-utils/helpers";
5
+ import { useClipboard as W } from "@scalar/use-hooks/useClipboard";
6
+ import { getResolvedRef as _ } from "@scalar/workspace-store/helpers/get-resolved-ref";
7
+ import z from "../../../components/OperationPath.vue.js";
8
+ import D from "../components/callbacks/Callbacks.vue.js";
9
+ import N from "../components/OperationParameters.vue.js";
10
+ import P from "../components/OperationResponses.vue.js";
11
+ import V from "../../../components/Section/SectionAccordion.vue.js";
12
+ import A from "../../example-responses/ExampleResponses.vue.js";
13
+ import M from "../../../components/LinkList/LinkList.vue.js";
14
+ import j from "../../external-docs/ExternalDocs.vue.js";
15
+ import U from "../../../v2/blocks/scalar-request-example-block/components/RequestExample.vue.js";
16
+ import f from "../../x-badges/XBadges.vue.js";
17
+ import F from "../../test-request-button/TestRequestButton.vue.js";
18
+ import G from "../../../components/HttpMethod/HttpMethod.vue.js";
19
+ import H from "../../../components/Anchor/Anchor.vue.js";
20
+ import y from "../../../components/Badge/Badge.vue.js";
21
+ const J = { class: "operation-title" }, K = { class: "operation-details" }, Q = { class: "endpoint-label" }, X = { class: "endpoint-label-path" }, Y = { class: "endpoint-label-name" }, Z = { class: "endpoint-content" }, x = { class: "operation-details-card" }, ee = { class: "operation-details-card-item" }, oe = { class: "operation-details-card-item" }, te = {
21
22
  key: 0,
22
23
  class: "operation-details-card-item"
23
- }, we = /* @__PURE__ */ C({
24
+ }, we = /* @__PURE__ */ v({
24
25
  __name: "ClassicLayout",
25
26
  props: {
26
27
  id: {},
@@ -29,65 +30,60 @@ const Q = { class: "operation-title" }, X = { class: "operation-details" }, Y =
29
30
  method: {},
30
31
  config: {},
31
32
  operation: {},
32
- oldOperation: {},
33
33
  isWebhook: { type: Boolean },
34
34
  server: {},
35
35
  securitySchemes: {},
36
- schemas: {},
37
36
  store: {}
38
37
  },
39
- emits: ["update:modelValue"],
40
- setup(d, { emit: k }) {
41
- const v = k, g = B(() => d.operation.summary || d.path || ""), { copyToClipboard: S } = z(), m = (e) => {
42
- v("update:modelValue", e);
43
- };
44
- return (e, l) => (i(), r(o(M), {
38
+ setup(d) {
39
+ const b = g(() => d.operation.summary || d.path || ""), { copyToClipboard: k } = W();
40
+ return (e, l) => (i(), r(o(V), {
45
41
  id: e.id,
46
42
  class: "reference-endpoint",
47
43
  transparent: ""
48
- }, O({
44
+ }, S({
49
45
  title: s(() => [
50
- a("div", Q, [
51
- a("div", X, [
52
- t(o(J), {
46
+ a("div", J, [
47
+ a("div", K, [
48
+ t(o(G), {
53
49
  class: "endpoint-type",
54
50
  method: e.method,
55
51
  short: ""
56
52
  }, null, 8, ["method"]),
57
- t(o(K), {
53
+ t(o(H), {
58
54
  id: e.id,
59
55
  class: "endpoint-anchor"
60
56
  }, {
61
57
  default: s(() => [
62
- a("h3", Y, [
63
- a("div", Z, [
64
- t(N, {
65
- deprecated: o(L)(e.operation),
58
+ a("h3", Q, [
59
+ a("div", X, [
60
+ t(z, {
61
+ deprecated: o(E)(e.operation),
66
62
  path: e.path
67
63
  }, null, 8, ["deprecated", "path"])
68
64
  ]),
69
- a("div", x, h(g.value), 1),
70
- o(f)(e.operation) ? (i(), r(o(b), {
65
+ a("div", Y, c(b.value), 1),
66
+ o(u)(e.operation) ? (i(), r(o(y), {
71
67
  key: 0,
72
- class: W(["capitalize", o(R)(e.operation)])
68
+ class: w(["capitalize", o(L)(e.operation)])
73
69
  }, {
74
70
  default: s(() => [
75
- u(h(o(f)(e.operation)), 1)
71
+ h(c(o(u)(e.operation)), 1)
76
72
  ]),
77
73
  _: 1
78
74
  }, 8, ["class"])) : n("", !0),
79
- e.isWebhook ? (i(), r(o(b), {
75
+ e.isWebhook ? (i(), r(o(y), {
80
76
  key: 1,
81
77
  class: "font-code text-green flex w-fit items-center justify-center gap-1"
82
78
  }, {
83
79
  default: s(() => [
84
- t(o(E), { weight: "bold" }),
85
- l[1] || (l[1] = u("Webhook "))
80
+ t(o(T), { weight: "bold" }),
81
+ l[1] || (l[1] = h("Webhook "))
86
82
  ]),
87
83
  _: 1,
88
84
  __: [1]
89
85
  })) : n("", !0),
90
- t(o(y), {
86
+ t(o(f), {
91
87
  badges: e.operation["x-badges"],
92
88
  position: "before"
93
89
  }, null, 8, ["badges"])
@@ -99,88 +95,85 @@ const Q = { class: "operation-title" }, X = { class: "operation-details" }, Y =
99
95
  ])
100
96
  ]),
101
97
  actions: s(({ active: p }) => {
102
- var c;
98
+ var m;
103
99
  return [
104
- t(o(y), {
100
+ t(o(f), {
105
101
  badges: e.operation["x-badges"],
106
102
  position: "after"
107
103
  }, null, 8, ["badges"]),
108
- p && !e.isWebhook ? (i(), r(o(H), {
104
+ p && !e.isWebhook ? (i(), r(o(F), {
109
105
  key: 0,
110
106
  method: e.method,
111
107
  path: e.path
112
- }, null, 8, ["method", "path"])) : (c = e.config) != null && c.hideTestRequestButton ? n("", !0) : (i(), r(o(T), {
108
+ }, null, 8, ["method", "path"])) : (m = e.config) != null && m.hideTestRequestButton ? n("", !0) : (i(), r(o(q), {
113
109
  key: 1,
114
110
  class: "endpoint-try-hint size-4.5"
115
111
  })),
116
- t(o(q), {
112
+ t(o($), {
117
113
  class: "endpoint-copy p-0.5",
118
- icon: o(D),
114
+ icon: o(I),
119
115
  label: "Copy endpoint URL",
120
116
  size: "xs",
121
117
  variant: "ghost",
122
- onClick: l[0] || (l[0] = V((ie) => o(S)(e.path), ["stop"]))
118
+ onClick: l[0] || (l[0] = B((ae) => o(k)(e.path), ["stop"]))
123
119
  }, null, 8, ["icon"])
124
120
  ];
125
121
  }),
126
122
  default: s(() => {
127
123
  var p;
128
124
  return [
129
- a("div", ee, [
130
- a("div", oe, [
131
- a("div", te, [
132
- t(U, {
133
- parameters: e.operation.parameters,
134
- requestBody: e.oldOperation.requestBody,
135
- schemas: e.schemas,
136
- "onUpdate:modelValue": m
137
- }, null, 8, ["parameters", "requestBody", "schemas"])
125
+ a("div", Z, [
126
+ a("div", x, [
127
+ a("div", ee, [
128
+ t(N, {
129
+ parameters: (
130
+ // These have been resolved in the Operation.vue component
131
+ e.operation.parameters
132
+ ),
133
+ requestBody: o(_)(e.operation.requestBody)
134
+ }, null, 8, ["parameters", "requestBody"])
138
135
  ]),
139
- a("div", ae, [
140
- t(A, {
136
+ a("div", oe, [
137
+ t(P, {
141
138
  collapsableItems: !1,
142
- responses: e.oldOperation.responses,
143
- schemas: e.schemas
144
- }, null, 8, ["responses", "schemas"])
139
+ responses: e.operation.responses
140
+ }, null, 8, ["responses"])
145
141
  ]),
146
- (p = e.operation) != null && p.callbacks ? (i(), w("div", se, [
147
- t(P, {
142
+ (p = e.operation) != null && p.callbacks ? (i(), C("div", te, [
143
+ t(D, {
148
144
  callbacks: e.operation.callbacks,
149
145
  method: e.method,
150
- path: e.path,
151
- schemas: e.schemas
152
- }, null, 8, ["callbacks", "method", "path", "schemas"])
146
+ path: e.path
147
+ }, null, 8, ["callbacks", "method", "path"])
153
148
  ])) : n("", !0)
154
149
  ]),
155
- e.operation.responses ? (i(), r(o(j), {
150
+ e.operation.responses ? (i(), r(o(A), {
156
151
  key: 0,
157
152
  class: "operation-example-card",
158
153
  responses: e.operation.responses
159
154
  }, null, 8, ["responses"])) : n("", !0),
160
155
  a("div", null, [
161
- e.operation.externalDocs ? (i(), r(o(_), { key: 0 }, {
156
+ e.operation.externalDocs ? (i(), r(o(M), { key: 0 }, {
162
157
  default: s(() => [
163
- t(o(F), {
158
+ t(o(j), {
164
159
  value: e.operation.externalDocs
165
160
  }, null, 8, ["value"])
166
161
  ]),
167
162
  _: 1
168
163
  })) : n("", !0),
169
- t(o($), null, {
164
+ t(o(O), null, {
170
165
  default: s(() => [
171
- t(o(G), {
166
+ t(o(U), {
172
167
  class: "operation-example-card",
173
168
  clientOptions: e.clientOptions,
174
169
  fallback: "",
175
- isWebhook: e.isWebhook,
176
170
  method: e.method,
177
171
  operation: e.operation,
178
172
  path: e.path,
179
173
  securitySchemes: e.securitySchemes,
180
174
  selectedClient: e.store.workspace["x-scalar-default-client"],
181
- selectedServer: e.server,
182
- "onUpdate:modelValue": m
183
- }, null, 8, ["clientOptions", "isWebhook", "method", "operation", "path", "securitySchemes", "selectedClient", "selectedServer"])
175
+ selectedServer: e.server
176
+ }, null, 8, ["clientOptions", "method", "operation", "path", "securitySchemes", "selectedClient", "selectedServer"])
184
177
  ]),
185
178
  _: 1
186
179
  })
@@ -193,7 +186,7 @@ const Q = { class: "operation-title" }, X = { class: "operation-details" }, Y =
193
186
  e.operation.description ? {
194
187
  name: "description",
195
188
  fn: s(() => [
196
- t(o(I), {
189
+ t(o(R), {
197
190
  anchorPrefix: e.id,
198
191
  transformType: "heading",
199
192
  value: e.operation.description,
@@ -1,28 +1,20 @@
1
1
  import type { HttpMethod as HttpMethodType } from '@scalar/helpers/http/http-methods';
2
- import type { OpenAPIV3_1 } from '@scalar/openapi-types';
3
2
  import type { ApiReferenceConfiguration } from '@scalar/types';
4
3
  import type { WorkspaceStore } from '@scalar/workspace-store/client';
5
4
  import type { OperationObject, SecuritySchemeObject, ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
6
- import type { Schemas } from '../../../features/Operation/types/schemas';
7
5
  import type { ClientOptionGroup } from '../../../v2/blocks/scalar-request-example-block/types';
8
6
  type __VLS_Props = {
9
7
  id: string;
10
8
  path: string;
11
9
  clientOptions: ClientOptionGroup[];
12
- method: HttpMethodType;
13
10
  config: ApiReferenceConfiguration;
11
+ method: HttpMethodType;
14
12
  operation: OperationObject;
15
- oldOperation: OpenAPIV3_1.OperationObject;
16
13
  isWebhook: boolean;
17
14
  securitySchemes: SecuritySchemeObject[];
18
15
  server: ServerObject | undefined;
19
- schemas?: Schemas;
20
16
  store: WorkspaceStore;
21
17
  };
22
- declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
23
- "update:modelValue": (value: string) => any;
24
- }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
25
- "onUpdate:modelValue"?: ((value: string) => any) | undefined;
26
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
+ 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>;
27
19
  export default _default;
28
20
  //# sourceMappingURL=ModernLayout.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ModernLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/layouts/ModernLayout.vue"],"names":[],"mappings":"AAuOA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAOrF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EACV,eAAe,EACf,oBAAoB,EACpB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAoBrE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAA;AAIjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAA;AAEvF,KAAK,WAAW,GAAG;IACf,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;IAC1B,YAAY,EAAE,WAAW,CAAC,eAAe,CAAA;IAEzC,SAAS,EAAE,OAAO,CAAA;IAClB,eAAe,EAAE,oBAAoB,EAAE,CAAA;IACvC,MAAM,EAAE,YAAY,GAAG,SAAS,CAAA;IAChC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,KAAK,EAAE,cAAc,CAAA;CACtB,CAAC;;;;;;AAkdJ,wBAOG"}
1
+ {"version":3,"file":"ModernLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/layouts/ModernLayout.vue"],"names":[],"mappings":"AAwNA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAOrF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAEpE,OAAO,KAAK,EACV,eAAe,EAEf,oBAAoB,EACpB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAuBrE,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,yBAAyB,CAAA;IACjC,MAAM,EAAE,cAAc,CAAA;IACtB,SAAS,EAAE,eAAe,CAAA;IAE1B,SAAS,EAAE,OAAO,CAAA;IAClB,eAAe,EAAE,oBAAoB,EAAE,CAAA;IACvC,MAAM,EAAE,YAAY,GAAG,SAAS,CAAA;IAChC,KAAK,EAAE,cAAc,CAAA;CACtB,CAAC;;AAsbF,wBAMG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./ModernLayout.vue2.js";
2
2
  import "./ModernLayout.vue3.js";
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-15bb33a7"]]);
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-4e34f7b6"]]);
5
5
  export {
6
- p as default
6
+ f as default
7
7
  };
@@ -1,104 +1,100 @@
1
- import { defineComponent as w, computed as B, useId as V, createBlock as r, openBlock as s, unref as o, withCtx as t, createVNode as a, createElementVNode as i, createCommentVNode as l, normalizeClass as b, createTextVNode as n, toDisplayString as g, createSlots as W } from "vue";
2
- import { ScalarMarkdown as I, ScalarErrorBoundary as d } from "@scalar/components";
3
- import { ScalarIconWebhooksLogo as $ } from "@scalar/icons";
4
- import { getOperationStability as y, getOperationStabilityColor as q, isOperationDeprecated as D } from "@scalar/oas-utils/helpers";
1
+ import { defineComponent as S, computed as C, useId as w, createBlock as r, openBlock as i, unref as o, withCtx as a, createVNode as t, createElementVNode as l, createCommentVNode as s, normalizeClass as h, createTextVNode as n, toDisplayString as b, createSlots as B } from "vue";
2
+ import { ScalarMarkdown as O, ScalarErrorBoundary as p } from "@scalar/components";
3
+ import { ScalarIconWebhooksLogo as I } from "@scalar/icons";
4
+ import { getOperationStability as g, getOperationStabilityColor as R, isOperationDeprecated as $ } from "@scalar/oas-utils/helpers";
5
+ import { getResolvedRef as q } from "@scalar/workspace-store/helpers/get-resolved-ref";
5
6
  import L from "../../../components/OperationPath.vue.js";
6
7
  import T from "../components/callbacks/Callbacks.vue.js";
7
- import E from "../components/OperationParameters.vue.js";
8
- import N from "../components/OperationResponses.vue.js";
9
- import R from "../../../components/Section/Section.vue.js";
10
- import P from "../../../components/Section/SectionContent.vue.js";
11
- import k from "../../../components/Badge/Badge.vue.js";
12
- import S from "../../x-badges/XBadges.vue.js";
13
- import j from "../../../components/Section/SectionHeader.vue.js";
14
- import z from "../../../components/Anchor/Anchor.vue.js";
15
- import A from "../../../components/Section/SectionHeaderTag.vue.js";
16
- import H from "../../../components/Section/SectionColumns.vue.js";
8
+ import W from "../components/OperationParameters.vue.js";
9
+ import _ from "../components/OperationResponses.vue.js";
10
+ import D from "../../../components/Section/Section.vue.js";
11
+ import E from "../../../components/Section/SectionContent.vue.js";
12
+ import y from "../../../components/Badge/Badge.vue.js";
13
+ import k from "../../x-badges/XBadges.vue.js";
14
+ import N from "../../../components/Section/SectionHeader.vue.js";
15
+ import V from "../../../components/Anchor/Anchor.vue.js";
16
+ import P from "../../../components/Section/SectionHeaderTag.vue.js";
17
+ import j from "../../../components/Section/SectionColumns.vue.js";
17
18
  import v from "../../../components/Section/SectionColumn.vue.js";
18
- import M from "../../../components/LinkList/LinkList.vue.js";
19
- import U from "../../external-docs/ExternalDocs.vue.js";
20
- import _ from "../../../v2/blocks/scalar-request-example-block/components/RequestExample.vue.js";
21
- import F from "../../test-request-button/TestRequestButton.vue.js";
22
- import G from "../../example-responses/ExampleResponses.vue.js";
23
- const J = { class: "flex flex-row justify-between gap-1" }, K = { class: "flex gap-1" }, Q = { class: "flex gap-1" }, X = { class: "operation-details" }, Y = { class: "examples" }, Se = /* @__PURE__ */ w({
19
+ import z from "../../../components/LinkList/LinkList.vue.js";
20
+ import A from "../../external-docs/ExternalDocs.vue.js";
21
+ import H from "../../../v2/blocks/scalar-request-example-block/components/RequestExample.vue.js";
22
+ import M from "../../test-request-button/TestRequestButton.vue.js";
23
+ import F from "../../example-responses/ExampleResponses.vue.js";
24
+ const G = { class: "flex flex-row justify-between gap-1" }, J = { class: "flex gap-1" }, K = { class: "flex gap-1" }, Q = { class: "operation-details" }, U = { class: "examples" }, ke = /* @__PURE__ */ S({
24
25
  __name: "ModernLayout",
25
26
  props: {
26
27
  id: {},
27
28
  path: {},
28
29
  clientOptions: {},
29
- method: {},
30
30
  config: {},
31
+ method: {},
31
32
  operation: {},
32
- oldOperation: {},
33
33
  isWebhook: { type: Boolean },
34
34
  securitySchemes: {},
35
35
  server: {},
36
- schemas: {},
37
36
  store: {}
38
37
  },
39
- emits: ["update:modelValue"],
40
- setup(p, { emit: C }) {
41
- const O = C, m = B(() => p.operation.summary || p.path || ""), u = V(), c = (e) => {
42
- O("update:modelValue", e);
43
- };
44
- return (e, f) => (s(), r(o(R), {
38
+ setup(d) {
39
+ const m = C(() => d.operation.summary || d.path || ""), u = w();
40
+ return (e, f) => (i(), r(o(D), {
45
41
  id: e.id,
46
42
  "aria-labelledby": o(u),
47
43
  label: m.value,
48
44
  tabindex: "-1"
49
45
  }, {
50
- default: t(() => [
51
- a(o(P), {
46
+ default: a(() => [
47
+ t(o(E), {
52
48
  loading: e.config.isLoading
53
49
  }, {
54
- default: t(() => [
55
- i("div", J, [
56
- i("div", K, [
57
- o(y)(e.operation) ? (s(), r(o(k), {
50
+ default: a(() => [
51
+ l("div", G, [
52
+ l("div", J, [
53
+ o(g)(e.operation) ? (i(), r(o(y), {
58
54
  key: 0,
59
- class: b(["capitalize", o(q)(e.operation)])
55
+ class: h(["capitalize", o(R)(e.operation)])
60
56
  }, {
61
- default: t(() => [
62
- n(g(o(y)(e.operation)), 1)
57
+ default: a(() => [
58
+ n(b(o(g)(e.operation)), 1)
63
59
  ]),
64
60
  _: 1
65
- }, 8, ["class"])) : l("", !0),
66
- e.isWebhook ? (s(), r(o(k), {
61
+ }, 8, ["class"])) : s("", !0),
62
+ e.isWebhook ? (i(), r(o(y), {
67
63
  key: 1,
68
64
  class: "font-code text-green flex w-fit items-center justify-center gap-1"
69
65
  }, {
70
- default: t(() => [
71
- a(o($), { weight: "bold" }),
66
+ default: a(() => [
67
+ t(o(I), { weight: "bold" }),
72
68
  f[0] || (f[0] = n("Webhook "))
73
69
  ]),
74
70
  _: 1,
75
71
  __: [0]
76
- })) : l("", !0),
77
- a(o(S), {
72
+ })) : s("", !0),
73
+ t(o(k), {
78
74
  badges: e.operation["x-badges"],
79
75
  position: "before"
80
76
  }, null, 8, ["badges"])
81
77
  ]),
82
- i("div", Q, [
83
- a(o(S), {
78
+ l("div", K, [
79
+ t(o(k), {
84
80
  badges: e.operation["x-badges"],
85
81
  position: "after"
86
82
  }, null, 8, ["badges"])
87
83
  ])
88
84
  ]),
89
- i("div", {
90
- class: b(o(D)(e.operation) ? "deprecated" : "")
85
+ l("div", {
86
+ class: h(o($)(e.operation) ? "deprecated" : "")
91
87
  }, [
92
- a(o(j), null, {
93
- default: t(() => [
94
- a(o(z), { id: e.id }, {
95
- default: t(() => [
96
- a(o(A), {
88
+ t(o(N), null, {
89
+ default: a(() => [
90
+ t(o(V), { id: e.id }, {
91
+ default: a(() => [
92
+ t(o(P), {
97
93
  id: o(u),
98
94
  level: 3
99
95
  }, {
100
- default: t(() => [
101
- n(g(m.value), 1)
96
+ default: a(() => [
97
+ n(b(m.value), 1)
102
98
  ]),
103
99
  _: 1
104
100
  }, 8, ["id"])
@@ -109,41 +105,40 @@ const J = { class: "flex flex-row justify-between gap-1" }, K = { class: "flex g
109
105
  _: 1
110
106
  })
111
107
  ], 2),
112
- a(o(H), null, {
113
- default: t(() => [
114
- a(o(v), null, {
115
- default: t(() => [
116
- i("div", X, [
117
- a(o(I), {
108
+ t(o(j), null, {
109
+ default: a(() => [
110
+ t(o(v), null, {
111
+ default: a(() => [
112
+ l("div", Q, [
113
+ t(o(O), {
118
114
  anchorPrefix: e.id,
119
115
  transformType: "heading",
120
116
  value: e.operation.description,
121
117
  withAnchors: "",
122
118
  withImages: ""
123
119
  }, null, 8, ["anchorPrefix", "value"]),
124
- a(E, {
120
+ t(W, {
125
121
  breadcrumb: [e.id],
126
- parameters: e.operation.parameters,
127
- requestBody: e.oldOperation.requestBody,
128
- schemas: e.schemas,
129
- "onUpdate:modelValue": c
130
- }, null, 8, ["breadcrumb", "parameters", "requestBody", "schemas"]),
131
- a(N, {
122
+ parameters: (
123
+ // These have been resolved in the Operation.vue component
124
+ e.operation.parameters
125
+ ),
126
+ requestBody: o(q)(e.operation.requestBody)
127
+ }, null, 8, ["breadcrumb", "parameters", "requestBody"]),
128
+ t(_, {
132
129
  breadcrumb: [e.id],
133
130
  collapsableItems: !e.config.expandAllResponses,
134
- responses: e.oldOperation.responses,
135
- schemas: e.schemas
136
- }, null, 8, ["breadcrumb", "collapsableItems", "responses", "schemas"]),
137
- a(o(d), null, {
138
- default: t(() => [
139
- e.operation.callbacks ? (s(), r(T, {
131
+ responses: e.operation.responses
132
+ }, null, 8, ["breadcrumb", "collapsableItems", "responses"]),
133
+ t(o(p), null, {
134
+ default: a(() => [
135
+ e.operation.callbacks ? (i(), r(T, {
140
136
  key: 0,
141
137
  callbacks: e.operation.callbacks,
142
138
  class: "mt-6",
143
139
  method: e.method,
144
- path: e.path,
145
- schemas: e.schemas
146
- }, null, 8, ["callbacks", "method", "path", "schemas"])) : l("", !0)
140
+ path: e.path
141
+ }, null, 8, ["callbacks", "method", "path"])) : s("", !0)
147
142
  ]),
148
143
  _: 1
149
144
  })
@@ -151,37 +146,35 @@ const J = { class: "flex flex-row justify-between gap-1" }, K = { class: "flex g
151
146
  ]),
152
147
  _: 1
153
148
  }),
154
- a(o(v), null, {
155
- default: t(() => [
156
- i("div", Y, [
157
- e.operation.externalDocs ? (s(), r(o(M), { key: 0 }, {
158
- default: t(() => [
159
- a(o(U), {
149
+ t(o(v), null, {
150
+ default: a(() => [
151
+ l("div", U, [
152
+ e.operation.externalDocs ? (i(), r(o(z), { key: 0 }, {
153
+ default: a(() => [
154
+ t(o(A), {
160
155
  value: e.operation.externalDocs
161
156
  }, null, 8, ["value"])
162
157
  ]),
163
158
  _: 1
164
- })) : l("", !0),
165
- a(o(d), null, {
166
- default: t(() => [
167
- a(o(_), {
159
+ })) : s("", !0),
160
+ t(o(p), null, {
161
+ default: a(() => [
162
+ t(o(H), {
168
163
  clientOptions: e.clientOptions,
169
164
  fallback: "",
170
- isWebhook: e.isWebhook,
171
165
  method: e.method,
172
166
  operation: e.operation,
173
167
  path: e.path,
174
168
  securitySchemes: e.securitySchemes,
175
169
  selectedClient: e.store.workspace["x-scalar-default-client"],
176
- selectedServer: e.server,
177
- "onUpdate:modelValue": c
178
- }, W({
179
- header: t(() => {
180
- var h;
170
+ selectedServer: e.server
171
+ }, B({
172
+ header: a(() => {
173
+ var c;
181
174
  return [
182
- a(L, {
175
+ t(L, {
183
176
  class: "font-code text-c-2 [&_em]:text-c-1 [&_em]:not-italic",
184
- deprecated: (h = e.operation) == null ? void 0 : h.deprecated,
177
+ deprecated: (c = e.operation) == null ? void 0 : c.deprecated,
185
178
  path: e.path
186
179
  }, null, 8, ["deprecated", "path"])
187
180
  ];
@@ -190,25 +183,25 @@ const J = { class: "flex flex-row justify-between gap-1" }, K = { class: "flex g
190
183
  }, [
191
184
  e.isWebhook ? void 0 : {
192
185
  name: "footer",
193
- fn: t(() => [
194
- a(o(F), {
186
+ fn: a(() => [
187
+ t(o(M), {
195
188
  method: e.method,
196
189
  path: e.path
197
190
  }, null, 8, ["method", "path"])
198
191
  ]),
199
192
  key: "0"
200
193
  }
201
- ]), 1032, ["clientOptions", "isWebhook", "method", "operation", "path", "securitySchemes", "selectedClient", "selectedServer"])
194
+ ]), 1032, ["clientOptions", "method", "operation", "path", "securitySchemes", "selectedClient", "selectedServer"])
202
195
  ]),
203
196
  _: 1
204
197
  }),
205
- a(o(d), null, {
206
- default: t(() => [
207
- e.operation.responses ? (s(), r(o(G), {
198
+ t(o(p), null, {
199
+ default: a(() => [
200
+ e.operation.responses ? (i(), r(o(F), {
208
201
  key: 0,
209
202
  responses: e.operation.responses,
210
203
  style: { "margin-top": "12px" }
211
- }, null, 8, ["responses"])) : l("", !0)
204
+ }, null, 8, ["responses"])) : s("", !0)
212
205
  ]),
213
206
  _: 1
214
207
  })
@@ -228,5 +221,5 @@ const J = { class: "flex flex-row justify-between gap-1" }, K = { class: "flex g
228
221
  }
229
222
  });
230
223
  export {
231
- Se as default
224
+ ke as default
232
225
  };