@scalar/api-reference 1.32.9 → 1.32.10

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 (122) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/browser/standalone.js +15115 -14878
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  5. package/dist/components/ApiReferenceLayout.vue.js +2 -2
  6. package/dist/components/ApiReferenceLayout.vue2.js +164 -176
  7. package/dist/components/Badge/Badge.vue.d.ts.map +1 -1
  8. package/dist/components/Badge/Badge.vue.js +3 -3
  9. package/dist/components/Content/Content.vue.js +2 -2
  10. package/dist/components/Content/Content.vue2.js +21 -21
  11. package/dist/components/Content/Introduction/Description.vue.d.ts.map +1 -1
  12. package/dist/components/Content/Introduction/Description.vue.js +2 -2
  13. package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
  14. package/dist/components/Content/Introduction/Introduction.vue.js +2 -2
  15. package/dist/components/Content/Introduction/Introduction.vue2.js +104 -72
  16. package/dist/components/Content/Tag/Tag.vue.d.ts.map +1 -1
  17. package/dist/components/LinkList/LinkList.vue.d.ts +18 -0
  18. package/dist/components/LinkList/LinkList.vue.d.ts.map +1 -0
  19. package/dist/components/LinkList/LinkList.vue.js +12 -0
  20. package/dist/components/LinkList/index.d.ts +2 -0
  21. package/dist/components/LinkList/index.d.ts.map +1 -0
  22. package/dist/components/Section/SectionHeader.vue.d.ts +1 -0
  23. package/dist/components/Section/SectionHeader.vue.d.ts.map +1 -1
  24. package/dist/components/Section/SectionHeader.vue.js +2 -2
  25. package/dist/components/Section/SectionHeader.vue2.js +11 -10
  26. package/dist/features/Operation/Operation.vue.d.ts +6 -6
  27. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  28. package/dist/features/Operation/Operation.vue.js +50 -49
  29. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +8 -6
  30. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
  31. package/dist/features/Operation/components/callbacks/Callback.vue.js +3 -3
  32. package/dist/features/Operation/components/callbacks/Callback.vue2.js +21 -28
  33. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts +5 -3
  34. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -1
  35. package/dist/features/Operation/components/callbacks/Callbacks.vue.js +33 -18
  36. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +11 -12
  37. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  38. package/dist/features/Operation/layouts/ClassicLayout.vue.js +1 -1
  39. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +164 -163
  40. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +12 -13
  41. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  42. package/dist/features/Operation/layouts/ModernLayout.vue.js +1 -1
  43. package/dist/features/Operation/layouts/ModernLayout.vue2.js +111 -118
  44. package/dist/features/api-client-modal/useApiClient.d.ts +5299 -5299
  45. package/dist/features/api-client-modal/useApiClient.d.ts.map +1 -1
  46. package/dist/features/base-url/BaseUrl.vue.d.ts.map +1 -1
  47. package/dist/features/base-url/BaseUrl.vue.js +26 -26
  48. package/dist/features/download-link/DownloadLink.vue.js +1 -1
  49. package/dist/features/example-responses/ExampleResponseTab.vue.js +2 -2
  50. package/dist/features/example-responses/ExampleResponseTabList.vue.js +1 -1
  51. package/dist/features/example-responses/ExampleResponses.vue.d.ts.map +1 -1
  52. package/dist/features/example-responses/ExampleResponses.vue.js +2 -2
  53. package/dist/features/example-responses/ExampleResponses.vue2.js +60 -57
  54. package/dist/features/external-docs/ExternalDocs.vue.d.ts +7 -0
  55. package/dist/features/external-docs/ExternalDocs.vue.d.ts.map +1 -0
  56. package/dist/features/external-docs/ExternalDocs.vue.js +36 -0
  57. package/dist/features/external-docs/ExternalDocs.vue2.js +4 -0
  58. package/dist/features/external-docs/index.d.ts +2 -0
  59. package/dist/features/external-docs/index.d.ts.map +1 -0
  60. package/dist/features/info-object/Contact.vue.d.ts +7 -0
  61. package/dist/features/info-object/Contact.vue.d.ts.map +1 -0
  62. package/dist/features/info-object/Contact.vue.js +44 -0
  63. package/dist/features/info-object/Contact.vue2.js +4 -0
  64. package/dist/features/info-object/License.vue.d.ts +7 -0
  65. package/dist/features/info-object/License.vue.d.ts.map +1 -0
  66. package/dist/features/info-object/License.vue.js +34 -0
  67. package/dist/features/info-object/License.vue2.js +4 -0
  68. package/dist/features/info-object/TermsOfService.vue.d.ts +7 -0
  69. package/dist/features/info-object/TermsOfService.vue.d.ts.map +1 -0
  70. package/dist/features/info-object/TermsOfService.vue.js +30 -0
  71. package/dist/features/info-object/TermsOfService.vue2.js +4 -0
  72. package/dist/features/info-object/index.d.ts +4 -0
  73. package/dist/features/info-object/index.d.ts.map +1 -0
  74. package/dist/features/test-request-button/TestRequestButton.vue.d.ts +3 -2
  75. package/dist/features/test-request-button/TestRequestButton.vue.d.ts.map +1 -1
  76. package/dist/features/test-request-button/TestRequestButton.vue.js +2 -2
  77. package/dist/features/test-request-button/TestRequestButton.vue2.js +21 -19
  78. package/dist/helpers/convert-security-scheme.js +23 -0
  79. package/dist/index.d.ts +0 -1
  80. package/dist/index.d.ts.map +1 -1
  81. package/dist/index.js +13 -15
  82. package/dist/style.css +1 -1
  83. package/dist/v2/ApiReferenceWorkspace.vue.d.ts +3 -1
  84. package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
  85. package/dist/v2/ApiReferenceWorkspace.vue.js +113 -86
  86. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.d.ts +0 -2
  87. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.d.ts.map +1 -1
  88. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.js +4 -0
  89. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue2.js +69 -0
  90. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts.map +1 -1
  91. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.js +7 -0
  92. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue2.js +227 -0
  93. package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.js +20 -3
  94. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-client-options.js +35 -0
  95. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.js +29 -0
  96. package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.js +10 -0
  97. package/dist/v2/blocks/scalar-request-example-block/index.d.ts +2 -2
  98. package/dist/v2/events/definitions.js +7 -0
  99. package/dist/v2/events/index.d.ts +1 -1
  100. package/dist/v2/events/listeners.d.ts +1 -1
  101. package/dist/v2/hooks/useStore.js +14 -0
  102. package/package.json +11 -11
  103. package/LICENSE +0 -21
  104. package/dist/blocks/constants.js +0 -6
  105. package/dist/blocks/helpers/getPointer.js +0 -12
  106. package/dist/blocks/hooks/useBlockProps.d.ts +0 -31
  107. package/dist/blocks/hooks/useBlockProps.d.ts.map +0 -1
  108. package/dist/blocks/hooks/useBlockProps.js +0 -24
  109. package/dist/features/example-request/ExamplePicker.vue.d.ts +0 -13
  110. package/dist/features/example-request/ExamplePicker.vue.d.ts.map +0 -1
  111. package/dist/features/example-request/ExamplePicker.vue.js +0 -7
  112. package/dist/features/example-request/ExamplePicker.vue2.js +0 -57
  113. package/dist/features/example-request/ExampleRequest.vue.d.ts +0 -85
  114. package/dist/features/example-request/ExampleRequest.vue.d.ts.map +0 -1
  115. package/dist/features/example-request/ExampleRequest.vue.js +0 -7
  116. package/dist/features/example-request/ExampleRequest.vue2.js +0 -348
  117. package/dist/features/example-request/TextSelect.vue.d.ts +0 -34
  118. package/dist/features/example-request/TextSelect.vue.d.ts.map +0 -1
  119. package/dist/features/example-request/TextSelect.vue.js +0 -48
  120. package/dist/features/example-request/TextSelect.vue3.js +0 -5
  121. package/dist/features/example-request/index.d.ts +0 -3
  122. package/dist/features/example-request/index.d.ts.map +0 -1
@@ -1,88 +1,86 @@
1
- import { defineComponent as I, computed as N, useId as O, createBlock as l, openBlock as s, unref as o, withCtx as t, createVNode as a, createCommentVNode as i, createElementVNode as n, normalizeClass as S, createTextVNode as m, toDisplayString as q, createSlots as W } from "vue";
2
- import { ScalarMarkdown as D, ScalarErrorBoundary as p } from "@scalar/components";
3
- import { ScalarIconWebhooksLogo as L } from "@scalar/icons";
4
- import { getOperationStability as C, getOperationStabilityColor as P, isOperationDeprecated as R } from "@scalar/oas-utils/helpers";
5
- import $ from "../../../components/OperationPath.vue.js";
6
- import { useConfig as z } from "../../../hooks/useConfig.js";
7
- import A from "../components/callbacks/Callbacks.vue.js";
8
- import H from "../components/OperationParameters.vue.js";
9
- import M from "../components/OperationResponses.vue.js";
10
- import U from "../../../components/Section/Section.vue.js";
11
- import j from "../../../components/Section/SectionContent.vue.js";
12
- import B from "../../../components/Badge/Badge.vue.js";
13
- import _ from "../../../components/Section/SectionHeader.vue.js";
14
- import F from "../../../components/Anchor/Anchor.vue.js";
15
- import G from "../../../components/Section/SectionHeaderTag.vue.js";
16
- import J from "../../../components/Section/SectionColumns.vue.js";
17
- import V from "../../../components/Section/SectionColumn.vue.js";
18
- import K from "../../example-request/ExampleRequest.vue.js";
19
- import Q from "../../test-request-button/TestRequestButton.vue.js";
20
- import X from "../../example-responses/ExampleResponses.vue.js";
21
- const Y = { class: "operation-details" }, Z = { class: "examples" }, ke = /* @__PURE__ */ I({
1
+ import { defineComponent as V, computed as w, useId as q, createBlock as r, openBlock as s, unref as o, withCtx as t, createVNode as a, createCommentVNode as l, createElementVNode as i, normalizeClass as y, createTextVNode as n, toDisplayString as b, createSlots as T } from "vue";
2
+ import { ScalarMarkdown as W, ScalarErrorBoundary as m } from "@scalar/components";
3
+ import { ScalarIconWebhooksLogo as E } from "@scalar/icons";
4
+ import { getOperationStability as S, getOperationStabilityColor as I, isOperationDeprecated as N } from "@scalar/oas-utils/helpers";
5
+ import D from "../../../components/OperationPath.vue.js";
6
+ import L from "../components/callbacks/Callbacks.vue.js";
7
+ import P from "../components/OperationParameters.vue.js";
8
+ import R from "../components/OperationResponses.vue.js";
9
+ import { useConfig as $ } from "../../../hooks/useConfig.js";
10
+ import { useStore as z } from "../../../v2/hooks/useStore.js";
11
+ import A from "../../../components/Section/Section.vue.js";
12
+ import H from "../../../components/Section/SectionContent.vue.js";
13
+ import g from "../../../components/Badge/Badge.vue.js";
14
+ import M from "../../../components/Section/SectionHeader.vue.js";
15
+ import U from "../../../components/Anchor/Anchor.vue.js";
16
+ import j from "../../../components/Section/SectionHeaderTag.vue.js";
17
+ import F from "../../../components/Section/SectionColumns.vue.js";
18
+ import k from "../../../components/Section/SectionColumn.vue.js";
19
+ import G from "../../../v2/blocks/scalar-request-example-block/components/RequestExample.vue.js";
20
+ import J from "../../test-request-button/TestRequestButton.vue.js";
21
+ import K from "../../example-responses/ExampleResponses.vue.js";
22
+ const Q = { class: "operation-details" }, X = { class: "examples" }, be = /* @__PURE__ */ V({
22
23
  __name: "ModernLayout",
23
24
  props: {
24
25
  id: {},
25
26
  path: {},
26
27
  method: {},
27
28
  operation: {},
29
+ oldOperation: {},
28
30
  isWebhook: { type: Boolean },
29
- collection: {},
31
+ securitySchemes: {},
30
32
  server: {},
31
- request: {},
32
33
  schemas: {}
33
34
  },
34
35
  emits: ["update:modelValue"],
35
- setup(d, { emit: w }) {
36
- const u = N(() => {
37
- var e;
38
- return ((e = d.operation) == null ? void 0 : e.summary) || d.path || "";
39
- }), T = w, c = O(), E = z(), f = (e) => {
40
- T("update:modelValue", e);
36
+ setup(d, { emit: v }) {
37
+ const p = w(() => d.operation.summary || d.path || ""), C = v, u = q(), { workspace: B } = z(), O = $(), c = (e) => {
38
+ C("update:modelValue", e);
41
39
  };
42
- return (e, h) => (s(), l(o(U), {
40
+ return (e, h) => (s(), r(o(A), {
43
41
  id: e.id,
44
- "aria-labelledby": o(c),
45
- label: u.value,
42
+ "aria-labelledby": o(u),
43
+ label: p.value,
46
44
  tabindex: "-1"
47
45
  }, {
48
46
  default: t(() => [
49
- a(o(j), {
50
- loading: o(E).isLoading
47
+ a(o(H), {
48
+ loading: o(O).isLoading
51
49
  }, {
52
50
  default: t(() => [
53
- o(C)(e.operation) ? (s(), l(o(B), {
51
+ o(S)(e.operation) ? (s(), r(o(g), {
54
52
  key: 0,
55
- class: S(["capitalize", o(P)(e.operation)])
53
+ class: y(["capitalize", o(I)(e.operation)])
56
54
  }, {
57
55
  default: t(() => [
58
- m(q(o(C)(e.operation)), 1)
56
+ n(b(o(S)(e.operation)), 1)
59
57
  ]),
60
58
  _: 1
61
- }, 8, ["class"])) : i("", !0),
62
- e.isWebhook ? (s(), l(o(B), {
59
+ }, 8, ["class"])) : l("", !0),
60
+ e.isWebhook ? (s(), r(o(g), {
63
61
  key: 1,
64
62
  class: "font-code text-green flex w-fit items-center justify-center gap-1"
65
63
  }, {
66
64
  default: t(() => [
67
- a(o(L), { weight: "bold" }),
68
- h[0] || (h[0] = m("Webhook "))
65
+ a(o(E), { weight: "bold" }),
66
+ h[0] || (h[0] = n("Webhook "))
69
67
  ]),
70
68
  _: 1,
71
69
  __: [0]
72
- })) : i("", !0),
73
- n("div", {
74
- class: S(o(R)(e.operation) ? "deprecated" : "")
70
+ })) : l("", !0),
71
+ i("div", {
72
+ class: y(o(N)(e.operation) ? "deprecated" : "")
75
73
  }, [
76
- a(o(_), null, {
74
+ a(o(M), null, {
77
75
  default: t(() => [
78
- a(o(F), { id: e.id }, {
76
+ a(o(U), { id: e.id }, {
79
77
  default: t(() => [
80
- a(o(G), {
81
- id: o(c),
78
+ a(o(j), {
79
+ id: o(u),
82
80
  level: 3
83
81
  }, {
84
82
  default: t(() => [
85
- m(q(u.value), 1)
83
+ n(b(p.value), 1)
86
84
  ]),
87
85
  _: 1
88
86
  }, 8, ["id"])
@@ -93,98 +91,93 @@ const Y = { class: "operation-details" }, Z = { class: "examples" }, ke = /* @__
93
91
  _: 1
94
92
  })
95
93
  ], 2),
96
- a(o(J), null, {
94
+ a(o(F), null, {
97
95
  default: t(() => [
98
- a(o(V), null, {
99
- default: t(() => {
100
- var r, b, y, g;
101
- return [
102
- n("div", Y, [
103
- a(o(D), {
104
- value: (r = e.operation) == null ? void 0 : r.description,
105
- withImages: "",
106
- withAnchors: "",
107
- transformType: "heading",
108
- anchorPrefix: e.id
109
- }, null, 8, ["value", "anchorPrefix"]),
110
- a(H, {
111
- parameters: (b = e.operation) == null ? void 0 : b.parameters,
112
- requestBody: (y = e.operation) == null ? void 0 : y.requestBody,
113
- schemas: e.schemas,
114
- "onUpdate:modelValue": f
115
- }, null, 8, ["parameters", "requestBody", "schemas"]),
116
- a(M, {
117
- responses: (g = e.operation) == null ? void 0 : g.responses,
118
- schemas: e.schemas
119
- }, null, 8, ["responses", "schemas"]),
120
- a(o(p), null, {
121
- default: t(() => {
122
- var k, v;
123
- return [
124
- (k = e.operation) != null && k.callbacks ? (s(), l(A, {
125
- key: 0,
126
- class: "mt-6",
127
- callbacks: (v = e.operation) == null ? void 0 : v.callbacks,
128
- collection: e.collection,
129
- schemas: e.schemas
130
- }, null, 8, ["callbacks", "collection", "schemas"])) : i("", !0)
131
- ];
132
- }),
133
- _: 1
134
- })
135
- ])
136
- ];
137
- }),
96
+ a(o(k), null, {
97
+ default: t(() => [
98
+ i("div", Q, [
99
+ a(o(W), {
100
+ value: e.operation.description,
101
+ withImages: "",
102
+ withAnchors: "",
103
+ transformType: "heading",
104
+ anchorPrefix: e.id
105
+ }, null, 8, ["value", "anchorPrefix"]),
106
+ a(P, {
107
+ parameters: e.oldOperation.parameters,
108
+ requestBody: e.oldOperation.requestBody,
109
+ schemas: e.schemas,
110
+ "onUpdate:modelValue": c
111
+ }, null, 8, ["parameters", "requestBody", "schemas"]),
112
+ a(R, {
113
+ responses: e.oldOperation.responses,
114
+ schemas: e.schemas
115
+ }, null, 8, ["responses", "schemas"]),
116
+ a(o(m), null, {
117
+ default: t(() => [
118
+ e.operation.callbacks ? (s(), r(L, {
119
+ key: 0,
120
+ class: "mt-6",
121
+ path: e.path,
122
+ callbacks: e.operation.callbacks,
123
+ method: e.method,
124
+ schemas: e.schemas
125
+ }, null, 8, ["path", "callbacks", "method", "schemas"])) : l("", !0)
126
+ ]),
127
+ _: 1
128
+ })
129
+ ])
130
+ ]),
138
131
  _: 1
139
132
  }),
140
- a(o(V), null, {
133
+ a(o(k), null, {
141
134
  default: t(() => [
142
- n("div", Z, [
143
- a(o(p), null, {
135
+ i("div", X, [
136
+ a(o(m), null, {
144
137
  default: t(() => [
145
- a(o(K), {
146
- request: e.request,
138
+ a(o(G), {
147
139
  method: e.method,
148
- collection: e.collection,
140
+ selectedServer: e.server,
141
+ securitySchemes: e.securitySchemes,
142
+ selectedClient: o(B)["x-scalar-default-client"],
143
+ path: e.path,
149
144
  fallback: "",
150
145
  operation: e.operation,
151
- server: e.server,
152
- schemas: e.schemas,
153
- "onUpdate:modelValue": f
154
- }, W({
146
+ "onUpdate:modelValue": c
147
+ }, T({
155
148
  header: t(() => {
156
- var r;
149
+ var f;
157
150
  return [
158
- a($, {
151
+ a(D, {
159
152
  class: "font-code text-c-2 [&_em]:text-c-1 [&_em]:not-italic",
160
- deprecated: (r = e.operation) == null ? void 0 : r.deprecated,
153
+ deprecated: (f = e.operation) == null ? void 0 : f.deprecated,
161
154
  path: e.path
162
155
  }, null, 8, ["deprecated", "path"])
163
156
  ];
164
157
  }),
165
158
  _: 2
166
159
  }, [
167
- e.request ? {
160
+ e.isWebhook ? void 0 : {
168
161
  name: "footer",
169
162
  fn: t(() => [
170
- a(o(Q), { operation: e.request }, null, 8, ["operation"])
163
+ a(o(J), {
164
+ method: e.method,
165
+ path: e.path
166
+ }, null, 8, ["method", "path"])
171
167
  ]),
172
168
  key: "0"
173
- } : void 0
174
- ]), 1032, ["request", "method", "collection", "operation", "server", "schemas"])
169
+ }
170
+ ]), 1032, ["method", "selectedServer", "securitySchemes", "selectedClient", "path", "operation"])
175
171
  ]),
176
172
  _: 1
177
173
  }),
178
- a(o(p), null, {
179
- default: t(() => {
180
- var r;
181
- return [
182
- a(o(X), {
183
- responses: (r = e.operation) == null ? void 0 : r.responses,
184
- style: { "margin-top": "12px" }
185
- }, null, 8, ["responses"])
186
- ];
187
- }),
174
+ a(o(m), null, {
175
+ default: t(() => [
176
+ a(o(K), {
177
+ responses: e.operation.responses,
178
+ style: { "margin-top": "12px" }
179
+ }, null, 8, ["responses"])
180
+ ]),
188
181
  _: 1
189
182
  })
190
183
  ])
@@ -203,5 +196,5 @@ const Y = { class: "operation-details" }, Z = { class: "examples" }, ke = /* @__
203
196
  }
204
197
  });
205
198
  export {
206
- ke as default
199
+ be as default
207
200
  };