@scalar/api-reference 1.25.115 → 1.25.118

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 (67) hide show
  1. package/CHANGELOG.md +76 -0
  2. package/dist/browser/standalone.js +15973 -15829
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/ApiReferenceLayout.vue.js +2 -2
  5. package/dist/components/ApiReferenceLayout.vue2.js +1 -1
  6. package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
  7. package/dist/components/Content/Introduction/Introduction.vue.js +1 -1
  8. package/dist/components/Content/Introduction/Introduction.vue2.js +39 -38
  9. package/dist/components/Content/Lazy/Loading.vue.d.ts.map +1 -1
  10. package/dist/components/Content/Lazy/Loading.vue.js +58 -60
  11. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +6 -0
  12. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  13. package/dist/components/Content/Schema/SchemaProperty.vue.js +2 -2
  14. package/dist/components/Content/Schema/SchemaProperty.vue2.js +124 -120
  15. package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.d.ts +1 -3
  16. package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.d.ts.map +1 -1
  17. package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
  18. package/dist/components/Content/Tag/TagList.vue.js +36 -38
  19. package/dist/components/Sidebar/SidebarElement.vue.d.ts.map +1 -1
  20. package/dist/components/Sidebar/SidebarElement.vue.js +1 -1
  21. package/dist/components/Sidebar/SidebarElement.vue2.js +59 -55
  22. package/dist/features/ApiClientModal/useApiClient.d.ts +208 -128
  23. package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
  24. package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts +6 -4
  25. package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
  26. package/dist/features/ExampleRequest/ExampleRequest.vue.js +1 -1
  27. package/dist/features/ExampleRequest/ExampleRequest.vue2.js +130 -119
  28. package/dist/features/ExampleResponses/ExampleResponses.vue.d.ts +2 -2
  29. package/dist/features/ExampleResponses/ExampleResponses.vue.d.ts.map +1 -1
  30. package/dist/features/ExampleResponses/ExampleResponses.vue.js +3 -3
  31. package/dist/features/ExampleResponses/ExampleResponses.vue2.js +86 -91
  32. package/dist/features/Operation/Operation.vue.d.ts +4 -5
  33. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  34. package/dist/features/Operation/Operation.vue.js +34 -41
  35. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +6 -6
  36. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  37. package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
  38. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +54 -51
  39. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +6 -6
  40. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  41. package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
  42. package/dist/features/Operation/layouts/ModernLayout.vue2.js +71 -71
  43. package/dist/helpers/get-request.d.ts.map +1 -1
  44. package/dist/helpers/index.d.ts +0 -3
  45. package/dist/helpers/index.d.ts.map +1 -1
  46. package/dist/hooks/useConfig.d.ts +1 -1
  47. package/dist/hooks/useConfig.d.ts.map +1 -1
  48. package/dist/hooks/useConfig.js +1 -1
  49. package/dist/hooks/useNavState.d.ts.map +1 -1
  50. package/dist/hooks/useNavState.js +26 -24
  51. package/dist/hooks/useReactiveSpec.d.ts +1 -1
  52. package/dist/index.js +66 -72
  53. package/dist/style.css +1 -1
  54. package/package.json +12 -12
  55. package/dist/features/Operation/hooks/useRequestExample.d.ts +0 -17
  56. package/dist/features/Operation/hooks/useRequestExample.d.ts.map +0 -1
  57. package/dist/features/Operation/hooks/useRequestExample.js +0 -68
  58. package/dist/helpers/convertRequestToHarRequest.d.ts +0 -7
  59. package/dist/helpers/convertRequestToHarRequest.d.ts.map +0 -1
  60. package/dist/helpers/convertRequestToHarRequest.js +0 -64
  61. package/dist/helpers/get-request.js +0 -6
  62. package/dist/helpers/getExampleCode.d.ts +0 -8
  63. package/dist/helpers/getExampleCode.d.ts.map +0 -1
  64. package/dist/helpers/getExampleCode.js +0 -16
  65. package/dist/helpers/joinWithSlash.d.ts +0 -5
  66. package/dist/helpers/joinWithSlash.d.ts.map +0 -1
  67. package/dist/helpers/joinWithSlash.js +0 -4
@@ -1,7 +1,7 @@
1
1
  import o from "./ExampleResponses.vue2.js";
2
2
  /* empty css */
3
- import e from "../../_virtual/_plugin-vue_export-helper.js";
4
- const a = /* @__PURE__ */ e(o, [["__scopeId", "data-v-77e1a07c"]]);
3
+ import p from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ p(o, [["__scopeId", "data-v-d84b9039"]]);
5
5
  export {
6
- a as default
6
+ m as default
7
7
  };
@@ -1,170 +1,165 @@
1
- import { defineComponent as N, useId as F, ref as S, computed as v, openBlock as t, createBlock as r, unref as o, withCtx as u, createVNode as h, createElementBlock as x, createCommentVNode as f, createTextVNode as w, withDirectives as I, createElementVNode as _, vModelCheckbox as O, Fragment as R, renderList as A, toDisplayString as D } from "vue";
2
- import { ScalarIcon as P, ScalarCodeBlock as U, ScalarMarkdown as H } from "@scalar/components";
3
- import { normalizeMimeTypeObject as J } from "@scalar/oas-utils/helpers";
4
- import { useClipboard as K } from "@scalar/use-hooks/useClipboard";
1
+ import { defineComponent as M, useId as N, ref as C, computed as d, openBlock as o, createBlock as r, unref as l, withCtx as u, createVNode as y, createElementBlock as v, createCommentVNode as x, createTextVNode as R, withDirectives as F, createElementVNode as E, vModelCheckbox as I, Fragment as _, renderList as O, toDisplayString as A } from "vue";
2
+ import { ScalarIcon as D, ScalarCodeBlock as P, ScalarMarkdown as U } from "@scalar/components";
3
+ import { normalizeMimeTypeObject as H } from "@scalar/oas-utils/helpers";
4
+ import { useClipboard as J } from "@scalar/use-hooks/useClipboard";
5
5
  import T from "./ExampleResponse.vue.js";
6
- import L from "../../components/Card/Card.vue.js";
7
- import W from "../../components/Card/CardTabHeader.vue.js";
8
- import q from "../../components/Card/CardTab.vue.js";
9
- import G from "../../components/Card/CardContent.vue.js";
10
- import Q from "../../components/Card/CardFooter.vue.js";
11
- import X from "../ExampleRequest/ExamplePicker.vue.js";
12
- const Y = {
6
+ import K from "../../components/Card/Card.vue.js";
7
+ import L from "../../components/Card/CardTabHeader.vue.js";
8
+ import W from "../../components/Card/CardTab.vue.js";
9
+ import q from "../../components/Card/CardContent.vue.js";
10
+ import G from "../../components/Card/CardFooter.vue.js";
11
+ import Q from "../ExampleRequest/ExamplePicker.vue.js";
12
+ const X = {
13
13
  key: 1,
14
14
  class: "scalar-card-checkbox"
15
- }, Z = ["aria-controls"], $ = { class: "scalar-card-container custom-scroll" }, z = {
15
+ }, Y = ["aria-controls"], Z = { class: "scalar-card-container custom-scroll" }, $ = {
16
16
  key: 1,
17
17
  class: "response-description"
18
- }, ie = /* @__PURE__ */ N({
18
+ }, pe = /* @__PURE__ */ M({
19
19
  __name: "ExampleResponses",
20
20
  props: {
21
- operation: {}
21
+ responses: {}
22
22
  },
23
- setup(V) {
24
- const k = V, c = F(), { copyToClipboard: j } = K(), p = S(), C = v(
25
- () => {
26
- var a, e;
27
- return Object.keys(((e = (a = k == null ? void 0 : k.operation) == null ? void 0 : a.information) == null ? void 0 : e.responses) ?? {}).sort();
28
- }
29
- ), y = v(
30
- () => !!l.value.examples
31
- ), g = S(0), i = v(() => {
32
- var e, m;
33
- const a = C.value[g.value];
34
- return (m = (e = k.operation.information) == null ? void 0 : e.responses) == null ? void 0 : m[a];
35
- }), l = v(() => {
36
- var e;
37
- const a = J(
38
- (e = i.value) == null ? void 0 : e.content
23
+ setup(S) {
24
+ const c = N(), { copyToClipboard: V } = J(), p = C(), b = d(() => Object.keys(S.responses ?? {}).sort()), k = d(
25
+ () => !!s.value.examples
26
+ ), g = C(0), i = d(() => {
27
+ var a;
28
+ const e = b.value[g.value];
29
+ return (a = S.responses) == null ? void 0 : a[e];
30
+ }), s = d(() => {
31
+ var a;
32
+ const e = H(
33
+ (a = i.value) == null ? void 0 : a.content
39
34
  );
40
35
  return (
41
36
  // OpenAPI 3.x
42
- (a == null ? void 0 : a["application/json"]) ?? (a == null ? void 0 : a["text/plain"]) ?? // Swagger 2.0
37
+ (e == null ? void 0 : e["application/json"]) ?? (e == null ? void 0 : e["application/xml"]) ?? (e == null ? void 0 : e["text/plain"]) ?? (e == null ? void 0 : e["text/html"]) ?? // Swagger 2.0
43
38
  i.value
44
39
  );
45
- }), B = () => {
46
- if (y.value) {
47
- if (Array.isArray(l.value.examples))
48
- return l.value.examples[0];
40
+ }), j = () => {
41
+ if (k.value) {
42
+ if (Array.isArray(s.value.examples))
43
+ return s.value.examples[0];
49
44
  {
50
- const a = Object.keys(l.value.examples)[0];
51
- return l.value.examples[a];
45
+ const e = Object.keys(s.value.examples)[0];
46
+ return s.value.examples[e];
52
47
  }
53
- } else return l.value.example;
54
- }, b = v(() => ({
55
- ...l.value,
56
- example: y.value && p.value ? l.value.examples[p.value].value ?? l.value.examples[p.value] : B()
57
- })), M = (a) => {
58
- g.value = a, p.value = void 0;
59
- }, E = S(!1);
60
- return (a, e) => C.value.length ? (t(), r(o(L), { key: 0 }, {
48
+ } else return s.value.example;
49
+ }, f = d(() => ({
50
+ ...s.value,
51
+ example: k.value && p.value ? s.value.examples[p.value].value ?? s.value.examples[p.value] : j()
52
+ })), B = (e) => {
53
+ g.value = e, p.value = void 0;
54
+ }, h = C(!1);
55
+ return (e, a) => b.value.length ? (o(), r(l(K), { key: 0 }, {
61
56
  default: u(() => {
62
- var m;
57
+ var w;
63
58
  return [
64
- h(o(W), {
59
+ y(l(L), {
65
60
  muted: "",
66
61
  x: "as",
67
- onChange: M
62
+ onChange: B
68
63
  }, {
69
64
  actions: u(() => {
70
- var s, d;
65
+ var t, m;
71
66
  return [
72
- (s = l.value) != null && s.example ? (t(), x("button", {
67
+ (t = s.value) != null && t.example ? (o(), v("button", {
73
68
  key: 0,
74
69
  class: "code-copy",
75
70
  type: "button",
76
- onClick: e[0] || (e[0] = () => {
71
+ onClick: a[0] || (a[0] = () => {
77
72
  var n;
78
- return o(j)((n = l.value) == null ? void 0 : n.example);
73
+ return l(V)((n = s.value) == null ? void 0 : n.example);
79
74
  })
80
75
  }, [
81
- h(o(P), {
76
+ y(l(D), {
82
77
  icon: "Clipboard",
83
78
  width: "12px"
84
79
  })
85
- ])) : f("", !0),
86
- (d = l.value) != null && d.schema ? (t(), x("label", Y, [
87
- e[3] || (e[3] = w(" Show Schema ")),
88
- I(_("input", {
89
- "onUpdate:modelValue": e[1] || (e[1] = (n) => E.value = n),
90
- "aria-controls": o(c),
80
+ ])) : x("", !0),
81
+ (m = s.value) != null && m.schema ? (o(), v("label", X, [
82
+ a[3] || (a[3] = R(" Show Schema ")),
83
+ F(E("input", {
84
+ "onUpdate:modelValue": a[1] || (a[1] = (n) => h.value = n),
85
+ "aria-controls": l(c),
91
86
  class: "scalar-card-checkbox-input",
92
87
  type: "checkbox"
93
- }, null, 8, Z), [
94
- [O, E.value]
88
+ }, null, 8, Y), [
89
+ [I, h.value]
95
90
  ]),
96
- e[4] || (e[4] = _("span", { class: "scalar-card-checkbox-checkmark" }, null, -1))
97
- ])) : f("", !0)
91
+ a[4] || (a[4] = E("span", { class: "scalar-card-checkbox-checkmark" }, null, -1))
92
+ ])) : x("", !0)
98
93
  ];
99
94
  }),
100
95
  default: u(() => [
101
- (t(!0), x(R, null, A(C.value, (s) => (t(), r(o(q), {
102
- key: s,
103
- "aria-controls": o(c)
96
+ (o(!0), v(_, null, O(b.value, (t) => (o(), r(l(W), {
97
+ key: t,
98
+ "aria-controls": l(c)
104
99
  }, {
105
100
  default: u(() => [
106
- w(D(s), 1)
101
+ R(A(t), 1)
107
102
  ]),
108
103
  _: 2
109
104
  }, 1032, ["aria-controls"]))), 128))
110
105
  ]),
111
106
  _: 1
112
107
  }),
113
- _("div", $, [
114
- h(o(G), { muted: "" }, {
108
+ E("div", Z, [
109
+ y(l(q), { muted: "" }, {
115
110
  default: u(() => {
116
- var s;
111
+ var t;
117
112
  return [
118
- (s = l.value) != null && s.schema ? (t(), x(R, { key: 0 }, [
119
- E.value && b.value ? (t(), r(o(U), {
113
+ (t = s.value) != null && t.schema ? (o(), v(_, { key: 0 }, [
114
+ h.value && f.value ? (o(), r(l(P), {
120
115
  key: 0,
121
- id: o(c),
122
- content: b.value,
116
+ id: l(c),
117
+ content: f.value,
123
118
  lang: "json"
124
- }, null, 8, ["id", "content"])) : (t(), r(T, {
119
+ }, null, 8, ["id", "content"])) : (o(), r(T, {
125
120
  key: 1,
126
- id: o(c),
127
- response: b.value
121
+ id: l(c),
122
+ response: f.value
128
123
  }, null, 8, ["id", "response"]))
129
- ], 64)) : (t(), r(T, {
124
+ ], 64)) : (o(), r(T, {
130
125
  key: 1,
131
- id: o(c),
132
- response: b.value
126
+ id: l(c),
127
+ response: f.value
133
128
  }, null, 8, ["id", "response"]))
134
129
  ];
135
130
  }),
136
131
  _: 1
137
132
  })
138
133
  ]),
139
- (m = i.value) != null && m.description || y.value ? (t(), r(o(Q), {
134
+ (w = i.value) != null && w.description || k.value ? (o(), r(l(G), {
140
135
  key: 0,
141
136
  class: "response-card-footer",
142
137
  muted: ""
143
138
  }, {
144
139
  default: u(() => {
145
- var s, d;
140
+ var t, m;
146
141
  return [
147
- y.value ? (t(), r(o(X), {
142
+ k.value ? (o(), r(l(Q), {
148
143
  key: 0,
149
144
  class: "response-example-selector",
150
- examples: (s = l.value) == null ? void 0 : s.examples,
151
- "onUpdate:modelValue": e[2] || (e[2] = (n) => p.value = n)
152
- }, null, 8, ["examples"])) : (d = i.value) != null && d.description ? (t(), x("div", z, [
153
- h(o(H), {
145
+ examples: (t = s.value) == null ? void 0 : t.examples,
146
+ "onUpdate:modelValue": a[2] || (a[2] = (n) => p.value = n)
147
+ }, null, 8, ["examples"])) : (m = i.value) != null && m.description ? (o(), v("div", $, [
148
+ y(l(U), {
154
149
  class: "markdown",
155
150
  value: i.value.description
156
151
  }, null, 8, ["value"])
157
- ])) : f("", !0)
152
+ ])) : x("", !0)
158
153
  ];
159
154
  }),
160
155
  _: 1
161
- })) : f("", !0)
156
+ })) : x("", !0)
162
157
  ];
163
158
  }),
164
159
  _: 1
165
- })) : f("", !0);
160
+ })) : x("", !0);
166
161
  }
167
162
  });
168
163
  export {
169
- ie as default
164
+ pe as default
170
165
  };
@@ -1,12 +1,11 @@
1
- import { type WorkspaceStore } from '@scalar/api-client/store';
1
+ import type { Collection, Server } from '@scalar/oas-utils/entities/spec';
2
2
  import type { TransformedOperation } from '@scalar/types/legacy';
3
3
  type __VLS_Props = {
4
4
  id?: string;
5
5
  layout?: 'modern' | 'classic';
6
- operation: TransformedOperation;
7
- requests: WorkspaceStore['requests'];
8
- requestExamples: WorkspaceStore['requestExamples'];
9
- securitySchemes: WorkspaceStore['securitySchemes'];
6
+ transformedOperation: TransformedOperation;
7
+ collection: Collection | undefined;
8
+ server: Server | undefined;
10
9
  };
11
10
  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
11
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"Operation.vue.d.ts","sourceRoot":"","sources":["../../../src/features/Operation/Operation.vue"],"names":[],"mappings":"AAmFA,OAAO,EAEL,KAAK,cAAc,EAEpB,MAAM,0BAA0B,CAAA;AACjC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAShE,KAAK,WAAW,GAAG;IACjB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;IAC7B,SAAS,EAAE,oBAAoB,CAAA;IAC/B,QAAQ,EAAE,cAAc,CAAC,UAAU,CAAC,CAAA;IACpC,eAAe,EAAE,cAAc,CAAC,iBAAiB,CAAC,CAAA;IAClD,eAAe,EAAE,cAAc,CAAC,iBAAiB,CAAC,CAAA;CACnD,CAAC;;AA8GF,wBAMG"}
1
+ {"version":3,"file":"Operation.vue.d.ts","sourceRoot":"","sources":["../../../src/features/Operation/Operation.vue"],"names":[],"mappings":"AAqEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AACzE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAOhE,KAAK,WAAW,GAAG;IACjB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;IAC7B,oBAAoB,EAAE,oBAAoB,CAAA;IAC1C,UAAU,EAAE,UAAU,GAAG,SAAS,CAAA;IAClC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;CAC3B,CAAC;;AAmGF,wBAMG"}
@@ -1,53 +1,46 @@
1
- import { defineComponent as m, inject as p, openBlock as n, createBlock as a, unref as t } from "vue";
2
- import { getPointer as d } from "../../blocks/helpers/getPointer.js";
3
- import { useBlockProps as q } from "../../blocks/hooks/useBlockProps.js";
4
- import { useActiveEntities as y, WORKSPACE_SYMBOL as f } from "@scalar/api-client/store";
5
- import { useRequestExample as E } from "./hooks/useRequestExample.js";
6
- import C from "./layouts/ClassicLayout.vue.js";
7
- import h from "./layouts/ModernLayout.vue.js";
8
- const M = /* @__PURE__ */ m({
1
+ import { defineComponent as s, unref as r, openBlock as t, createElementBlock as l, Fragment as p, createBlock as a, createCommentVNode as m } from "vue";
2
+ import { getPointer as c } from "../../blocks/helpers/getPointer.js";
3
+ import { useBlockProps as d } from "../../blocks/hooks/useBlockProps.js";
4
+ import { useWorkspace as f } from "@scalar/api-client/store";
5
+ import u from "./layouts/ClassicLayout.vue.js";
6
+ import O from "./layouts/ModernLayout.vue.js";
7
+ const g = /* @__PURE__ */ s({
9
8
  __name: "Operation",
10
9
  props: {
11
10
  id: {},
12
11
  layout: { default: "modern" },
13
- operation: {},
14
- requests: {},
15
- requestExamples: {},
16
- securitySchemes: {}
12
+ transformedOperation: {},
13
+ collection: {},
14
+ server: {}
17
15
  },
18
- setup(e) {
19
- const { activeCollection: u, activeServer: c } = y(), { request: o, secretCredentials: s } = E({
20
- operation: e.operation,
21
- collection: u,
22
- requests: e.requests,
23
- requestExamples: e.requestExamples,
24
- securitySchemes: e.securitySchemes,
25
- server: c
26
- }), l = p(f), { operation: i } = q({
27
- store: l,
28
- location: d([
16
+ setup(n) {
17
+ const i = f(), { operation: o } = d({
18
+ store: i,
19
+ location: c([
29
20
  "paths",
30
- e.operation.path,
31
- e.operation.httpVerb.toLowerCase()
21
+ n.transformedOperation.path,
22
+ n.transformedOperation.httpVerb.toLowerCase()
32
23
  ])
33
24
  });
34
- return (r, S) => r.layout === "classic" ? (n(), a(C, {
35
- key: 0,
36
- id: r.id,
37
- operation: r.operation,
38
- request: t(o),
39
- requestEntity: t(i),
40
- secretCredentials: t(s)
41
- }, null, 8, ["id", "operation", "request", "requestEntity", "secretCredentials"])) : (n(), a(h, {
42
- key: 1,
43
- id: r.id,
44
- operation: r.operation,
45
- request: t(o),
46
- requestEntity: t(i),
47
- secretCredentials: t(s)
48
- }, null, 8, ["id", "operation", "request", "requestEntity", "secretCredentials"]));
25
+ return (e, k) => e.collection && r(o) ? (t(), l(p, { key: 0 }, [
26
+ e.layout === "classic" ? (t(), a(u, {
27
+ key: 0,
28
+ id: e.id,
29
+ collection: e.collection,
30
+ operation: r(o),
31
+ server: e.server,
32
+ transformedOperation: e.transformedOperation
33
+ }, null, 8, ["id", "collection", "operation", "server", "transformedOperation"])) : (t(), a(O, {
34
+ key: 1,
35
+ id: e.id,
36
+ collection: e.collection,
37
+ operation: r(o),
38
+ server: e.server,
39
+ transformedOperation: e.transformedOperation
40
+ }, null, 8, ["id", "collection", "operation", "server", "transformedOperation"]))
41
+ ], 64)) : m("", !0);
49
42
  }
50
43
  });
51
44
  export {
52
- M as default
45
+ g as default
53
46
  };
@@ -1,12 +1,12 @@
1
- import type { Request as RequestEntity } from '@scalar/oas-utils/entities/spec';
1
+ import type { Collection, Operation, Server } from '@scalar/oas-utils/entities/spec';
2
2
  import type { TransformedOperation } from '@scalar/types/legacy';
3
3
  type __VLS_Props = {
4
4
  id?: string;
5
- requestEntity?: RequestEntity;
6
- /** @deprecated Use `requestEntity` instead */
7
- operation: TransformedOperation;
8
- request: Request | null;
9
- secretCredentials: string[];
5
+ collection: Collection;
6
+ server: Server | undefined;
7
+ operation: Operation;
8
+ /** @deprecated Use `operation` instead */
9
+ transformedOperation: TransformedOperation;
10
10
  };
11
11
  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
12
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"ClassicLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/layouts/ClassicLayout.vue"],"names":[],"mappings":"AA0TA,OAAO,KAAK,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAC/E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAQhE,KAAK,WAAW,GAAG;IACjB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,aAAa,CAAC,EAAE,aAAa,CAAA;IAC7B,8CAA8C;IAC9C,SAAS,EAAE,oBAAoB,CAAA;IAC/B,OAAO,EAAE,OAAO,GAAG,IAAI,CAAA;IACvB,iBAAiB,EAAE,MAAM,EAAE,CAAA;CAC5B,CAAC;;AAsQF,wBAOG"}
1
+ {"version":3,"file":"ClassicLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/layouts/ClassicLayout.vue"],"names":[],"mappings":"AAiUA,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EACT,MAAM,EACP,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAQhE,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;CAC3C,CAAC;;AAsQF,wBAOG"}
@@ -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 m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-d26002b4"]]);
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-e104650f"]]);
5
5
  export {
6
- m as default
6
+ f as default
7
7
  };
@@ -1,66 +1,66 @@
1
- import { defineComponent as y, openBlock as a, createBlock as s, unref as o, createSlots as C, withCtx as n, createElementVNode as t, createVNode as i, toDisplayString as c, normalizeClass as _, createTextVNode as v, createCommentVNode as m, withModifiers as q } from "vue";
1
+ import { defineComponent as v, openBlock as a, createBlock as s, unref as e, createSlots as y, withCtx as n, createElementVNode as t, createVNode as r, toDisplayString as m, normalizeClass as O, createTextVNode as _, createCommentVNode as c, withModifiers as C } from "vue";
2
2
  import b from "../../../components/OperationPath.vue.js";
3
3
  import { useConfig as k } from "../../../hooks/useConfig.js";
4
- import { ScalarIcon as g, ScalarIconButton as E, ScalarMarkdown as S } from "@scalar/components";
5
- import { useClipboard as B } from "@scalar/use-hooks/useClipboard";
6
- import R from "../components/OperationParameters.vue.js";
7
- import V from "../components/OperationResponses.vue.js";
8
- import w from "../../../components/Section/SectionAccordion.vue.js";
9
- import I from "../../../components/HttpMethod/HttpMethod.vue.js";
10
- import N from "../../../components/Anchor/Anchor.vue.js";
11
- import { isOperationDeprecated as O, getOperationStability as u, getOperationStabilityColor as T } from "../../../helpers/operation.js";
12
- import $ from "../../../components/Badge/Badge.vue.js";
4
+ import { ScalarIcon as g, ScalarIconButton as S, ScalarMarkdown as B } from "@scalar/components";
5
+ import { useClipboard as R } from "@scalar/use-hooks/useClipboard";
6
+ import w from "../components/OperationParameters.vue.js";
7
+ import I from "../components/OperationResponses.vue.js";
8
+ import N from "../../../components/Section/SectionAccordion.vue.js";
9
+ import T from "../../../components/HttpMethod/HttpMethod.vue.js";
10
+ import V from "../../../components/Anchor/Anchor.vue.js";
11
+ import { isOperationDeprecated as $, getOperationStability as f, getOperationStabilityColor as q } from "../../../helpers/operation.js";
12
+ import E from "../../../components/Badge/Badge.vue.js";
13
13
  import z from "../../TestRequestButton/TestRequestButton.vue.js";
14
14
  import A from "../../ExampleResponses/ExampleResponses.vue.js";
15
15
  import D from "../../ExampleRequest/ExampleRequest.vue.js";
16
- const L = { class: "operation-title" }, M = { class: "operation-details" }, P = { class: "endpoint-label" }, U = { class: "endpoint-label-path" }, j = { class: "endpoint-label-name" }, F = { class: "endpoint-content" }, G = { class: "operation-details-card" }, H = { class: "operation-details-card-item" }, J = { class: "operation-details-card-item" }, de = /* @__PURE__ */ y({
16
+ const L = { class: "operation-title" }, M = { class: "operation-details" }, P = { class: "endpoint-label" }, U = { class: "endpoint-label-path" }, j = { class: "endpoint-label-name" }, F = { class: "endpoint-content" }, G = { class: "operation-details-card" }, H = { class: "operation-details-card-item" }, J = { class: "operation-details-card-item" }, mo = /* @__PURE__ */ v({
17
17
  __name: "ClassicLayout",
18
18
  props: {
19
19
  id: {},
20
- requestEntity: {},
20
+ collection: {},
21
+ server: {},
21
22
  operation: {},
22
- request: {},
23
- secretCredentials: {}
23
+ transformedOperation: {}
24
24
  },
25
25
  setup(K) {
26
- const { copyToClipboard: f } = B(), h = k();
27
- return (e, p) => {
26
+ const { copyToClipboard: u } = R(), h = k();
27
+ return (o, p) => {
28
28
  var l;
29
- return a(), s(o(w), {
30
- id: e.id,
29
+ return a(), s(e(N), {
30
+ id: o.id,
31
31
  class: "reference-endpoint",
32
32
  transparent: ""
33
- }, C({
33
+ }, y({
34
34
  title: n(() => [
35
35
  t("h3", L, [
36
36
  t("div", M, [
37
- i(o(I), {
37
+ r(e(T), {
38
38
  class: "endpoint-type",
39
- method: e.operation.httpVerb,
39
+ method: o.operation.method,
40
40
  short: ""
41
41
  }, null, 8, ["method"]),
42
- i(o(N), {
43
- id: e.id ?? "",
42
+ r(e(V), {
43
+ id: o.id ?? "",
44
44
  class: "endpoint-anchor"
45
45
  }, {
46
46
  default: n(() => [
47
47
  t("div", P, [
48
48
  t("div", U, [
49
- i(b, {
50
- deprecated: o(O)(e.operation),
51
- path: e.operation.path
49
+ r(b, {
50
+ deprecated: e($)(o.transformedOperation),
51
+ path: o.operation.path
52
52
  }, null, 8, ["deprecated", "path"])
53
53
  ]),
54
- t("div", j, c(e.operation.name), 1),
55
- o(u)(e.operation) ? (a(), s(o($), {
54
+ t("div", j, m(o.transformedOperation.name), 1),
55
+ e(f)(o.transformedOperation) ? (a(), s(e(E), {
56
56
  key: 0,
57
- class: _(o(T)(e.operation))
57
+ class: O(e(q)(o.transformedOperation))
58
58
  }, {
59
59
  default: n(() => [
60
- v(c(o(u)(e.operation)), 1)
60
+ _(m(e(f)(o.transformedOperation)), 1)
61
61
  ]),
62
62
  _: 1
63
- }, 8, ["class"])) : m("", !0)
63
+ }, 8, ["class"])) : c("", !0)
64
64
  ])
65
65
  ]),
66
66
  _: 1
@@ -68,25 +68,25 @@ const L = { class: "operation-title" }, M = { class: "operation-details" }, P =
68
68
  ])
69
69
  ])
70
70
  ]),
71
- actions: n(({ active: r }) => {
71
+ actions: n(({ active: i }) => {
72
72
  var d;
73
73
  return [
74
- r ? (a(), s(o(z), {
74
+ i ? (a(), s(e(z), {
75
75
  key: 0,
76
- operation: e.requestEntity
77
- }, null, 8, ["operation"])) : (d = o(h)) != null && d.hideTestRequestButton ? m("", !0) : (a(), s(o(g), {
76
+ operation: o.operation
77
+ }, null, 8, ["operation"])) : (d = e(h)) != null && d.hideTestRequestButton ? c("", !0) : (a(), s(e(g), {
78
78
  key: 1,
79
79
  class: "endpoint-try-hint",
80
80
  icon: "Play",
81
81
  thickness: "1.75px"
82
82
  })),
83
- i(o(E), {
83
+ r(e(S), {
84
84
  class: "endpoint-copy",
85
85
  icon: "Clipboard",
86
86
  label: "Copy endpoint URL",
87
87
  size: "xs",
88
88
  variant: "ghost",
89
- onClick: p[0] || (p[0] = q((Q) => o(f)(e.operation.path), ["stop"]))
89
+ onClick: p[0] || (p[0] = C((Q) => e(u)(o.operation.path), ["stop"]))
90
90
  })
91
91
  ];
92
92
  }),
@@ -94,32 +94,35 @@ const L = { class: "operation-title" }, M = { class: "operation-details" }, P =
94
94
  t("div", F, [
95
95
  t("div", G, [
96
96
  t("div", H, [
97
- i(R, { operation: e.requestEntity }, null, 8, ["operation"])
97
+ r(w, { operation: o.operation }, null, 8, ["operation"])
98
98
  ]),
99
99
  t("div", J, [
100
- i(V, {
100
+ r(I, {
101
101
  collapsableItems: !1,
102
- operation: e.operation
102
+ operation: o.transformedOperation
103
103
  }, null, 8, ["operation"])
104
104
  ])
105
105
  ]),
106
- i(o(A), { operation: e.operation }, null, 8, ["operation"]),
107
- i(o(D), {
108
- operation: e.operation,
109
- request: e.request,
110
- secretCredentials: e.secretCredentials
111
- }, null, 8, ["operation", "request", "secretCredentials"])
106
+ r(e(A), {
107
+ responses: o.operation.responses
108
+ }, null, 8, ["responses"]),
109
+ r(e(D), {
110
+ collection: o.collection,
111
+ operation: o.operation,
112
+ server: o.server,
113
+ transformedOperation: o.transformedOperation
114
+ }, null, 8, ["collection", "operation", "server", "transformedOperation"])
112
115
  ])
113
116
  ]),
114
117
  _: 2
115
118
  }, [
116
- (l = e.requestEntity) != null && l.description ? {
119
+ (l = o.operation) != null && l.description ? {
117
120
  name: "description",
118
121
  fn: n(() => {
119
- var r;
122
+ var i;
120
123
  return [
121
- i(o(S), {
122
- value: (r = e.requestEntity) == null ? void 0 : r.description,
124
+ r(e(B), {
125
+ value: (i = o.operation) == null ? void 0 : i.description,
123
126
  withImages: ""
124
127
  }, null, 8, ["value"])
125
128
  ];
@@ -131,5 +134,5 @@ const L = { class: "operation-title" }, M = { class: "operation-details" }, P =
131
134
  }
132
135
  });
133
136
  export {
134
- de as default
137
+ mo as default
135
138
  };
@@ -1,12 +1,12 @@
1
- import type { Request as RequestEntity } from '@scalar/oas-utils/entities/spec';
1
+ import type { Collection, Operation, Server } from '@scalar/oas-utils/entities/spec';
2
2
  import type { TransformedOperation } from '@scalar/types/legacy';
3
3
  type __VLS_Props = {
4
4
  id?: string;
5
- /** @deprecated Use `requestEntity` instead */
6
- operation: TransformedOperation;
7
- requestEntity?: RequestEntity;
8
- request: Request | null;
9
- secretCredentials: string[];
5
+ collection: Collection;
6
+ server: Server | undefined;
7
+ operation: Operation;
8
+ /** @deprecated Use `operation` instead */
9
+ transformedOperation: TransformedOperation;
10
10
  };
11
11
  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
12
  export default _default;