@scalar/api-reference 1.32.8 → 1.32.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 (77) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/blocks/constants.js +6 -0
  3. package/dist/blocks/helpers/getPointer.js +12 -0
  4. package/dist/blocks/hooks/useBlockProps.d.ts +31 -0
  5. package/dist/blocks/hooks/useBlockProps.d.ts.map +1 -0
  6. package/dist/blocks/hooks/useBlockProps.js +24 -0
  7. package/dist/browser/standalone.js +14550 -14647
  8. package/dist/browser/webpack-stats.json +1 -1
  9. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  10. package/dist/components/ApiReferenceLayout.vue.js +2 -2
  11. package/dist/components/ApiReferenceLayout.vue2.js +176 -164
  12. package/dist/components/Content/Content.vue.js +2 -2
  13. package/dist/components/Content/Content.vue2.js +5 -5
  14. package/dist/features/Operation/Operation.vue.d.ts +6 -6
  15. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  16. package/dist/features/Operation/Operation.vue.js +49 -50
  17. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +6 -8
  18. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
  19. package/dist/features/Operation/components/callbacks/Callback.vue.js +3 -3
  20. package/dist/features/Operation/components/callbacks/Callback.vue2.js +28 -21
  21. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts +3 -5
  22. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -1
  23. package/dist/features/Operation/components/callbacks/Callbacks.vue.js +18 -33
  24. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +12 -11
  25. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  26. package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
  27. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +162 -164
  28. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +13 -12
  29. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  30. package/dist/features/Operation/layouts/ModernLayout.vue.js +1 -1
  31. package/dist/features/Operation/layouts/ModernLayout.vue2.js +117 -111
  32. package/dist/features/api-client-modal/useApiClient.d.ts +5795 -5795
  33. package/dist/features/api-client-modal/useApiClient.d.ts.map +1 -1
  34. package/dist/features/example-request/ExamplePicker.vue.d.ts +13 -0
  35. package/dist/features/example-request/ExamplePicker.vue.d.ts.map +1 -0
  36. package/dist/features/example-request/ExamplePicker.vue.js +7 -0
  37. package/dist/features/example-request/ExamplePicker.vue2.js +57 -0
  38. package/dist/features/example-request/ExampleRequest.vue.d.ts +85 -0
  39. package/dist/features/example-request/ExampleRequest.vue.d.ts.map +1 -0
  40. package/dist/features/example-request/ExampleRequest.vue.js +7 -0
  41. package/dist/features/example-request/ExampleRequest.vue2.js +348 -0
  42. package/dist/features/example-request/TextSelect.vue.d.ts +34 -0
  43. package/dist/features/example-request/TextSelect.vue.d.ts.map +1 -0
  44. package/dist/features/example-request/TextSelect.vue.js +48 -0
  45. package/dist/features/example-request/TextSelect.vue3.js +5 -0
  46. package/dist/features/example-request/index.d.ts +3 -0
  47. package/dist/features/example-request/index.d.ts.map +1 -0
  48. package/dist/features/example-responses/ExampleResponses.vue.d.ts.map +1 -1
  49. package/dist/features/example-responses/ExampleResponses.vue.js +1 -1
  50. package/dist/features/example-responses/ExampleResponses.vue2.js +50 -51
  51. package/dist/features/test-request-button/TestRequestButton.vue.d.ts +2 -3
  52. package/dist/features/test-request-button/TestRequestButton.vue.d.ts.map +1 -1
  53. package/dist/features/test-request-button/TestRequestButton.vue.js +2 -2
  54. package/dist/features/test-request-button/TestRequestButton.vue2.js +19 -21
  55. package/dist/index.d.ts +1 -0
  56. package/dist/index.d.ts.map +1 -1
  57. package/dist/index.js +15 -13
  58. package/dist/style.css +1 -1
  59. package/dist/v2/ApiReferenceWorkspace.vue.d.ts +1 -3
  60. package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
  61. package/dist/v2/ApiReferenceWorkspace.vue.js +86 -113
  62. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts.map +1 -1
  63. package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.js +3 -20
  64. package/dist/v2/blocks/scalar-request-example-block/index.d.ts +2 -2
  65. package/dist/v2/events/index.d.ts +1 -1
  66. package/dist/v2/events/listeners.d.ts +1 -1
  67. package/package.json +10 -10
  68. package/dist/helpers/convert-security-scheme.js +0 -23
  69. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.js +0 -4
  70. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue2.js +0 -64
  71. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.js +0 -7
  72. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue2.js +0 -212
  73. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-client-options.js +0 -35
  74. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.js +0 -29
  75. package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.js +0 -10
  76. package/dist/v2/events/definitions.js +0 -7
  77. package/dist/v2/hooks/useStore.js +0 -14
@@ -1,86 +1,88 @@
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({
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({
23
22
  __name: "ModernLayout",
24
23
  props: {
25
24
  id: {},
26
25
  path: {},
27
26
  method: {},
28
27
  operation: {},
29
- oldOperation: {},
30
28
  isWebhook: { type: Boolean },
31
- securitySchemes: {},
29
+ collection: {},
32
30
  server: {},
31
+ request: {},
33
32
  schemas: {}
34
33
  },
35
34
  emits: ["update:modelValue"],
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);
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);
39
41
  };
40
- return (e, h) => (s(), r(o(A), {
42
+ return (e, h) => (s(), l(o(U), {
41
43
  id: e.id,
42
- "aria-labelledby": o(u),
43
- label: p.value,
44
+ "aria-labelledby": o(c),
45
+ label: u.value,
44
46
  tabindex: "-1"
45
47
  }, {
46
48
  default: t(() => [
47
- a(o(H), {
48
- loading: o(O).isLoading
49
+ a(o(j), {
50
+ loading: o(E).isLoading
49
51
  }, {
50
52
  default: t(() => [
51
- o(S)(e.operation) ? (s(), r(o(g), {
53
+ o(C)(e.operation) ? (s(), l(o(B), {
52
54
  key: 0,
53
- class: y(["capitalize", o(I)(e.operation)])
55
+ class: S(["capitalize", o(P)(e.operation)])
54
56
  }, {
55
57
  default: t(() => [
56
- n(b(o(S)(e.operation)), 1)
58
+ m(q(o(C)(e.operation)), 1)
57
59
  ]),
58
60
  _: 1
59
- }, 8, ["class"])) : l("", !0),
60
- e.isWebhook ? (s(), r(o(g), {
61
+ }, 8, ["class"])) : i("", !0),
62
+ e.isWebhook ? (s(), l(o(B), {
61
63
  key: 1,
62
64
  class: "font-code text-green flex w-fit items-center justify-center gap-1"
63
65
  }, {
64
66
  default: t(() => [
65
- a(o(E), { weight: "bold" }),
66
- h[0] || (h[0] = n("Webhook "))
67
+ a(o(L), { weight: "bold" }),
68
+ h[0] || (h[0] = m("Webhook "))
67
69
  ]),
68
70
  _: 1,
69
71
  __: [0]
70
- })) : l("", !0),
71
- i("div", {
72
- class: y(o(N)(e.operation) ? "deprecated" : "")
72
+ })) : i("", !0),
73
+ n("div", {
74
+ class: S(o(R)(e.operation) ? "deprecated" : "")
73
75
  }, [
74
- a(o(M), null, {
76
+ a(o(_), null, {
75
77
  default: t(() => [
76
- a(o(U), { id: e.id }, {
78
+ a(o(F), { id: e.id }, {
77
79
  default: t(() => [
78
- a(o(j), {
79
- id: o(u),
80
+ a(o(G), {
81
+ id: o(c),
80
82
  level: 3
81
83
  }, {
82
84
  default: t(() => [
83
- n(b(p.value), 1)
85
+ m(q(u.value), 1)
84
86
  ]),
85
87
  _: 1
86
88
  }, 8, ["id"])
@@ -91,94 +93,98 @@ const Q = { class: "operation-details" }, X = { class: "examples" }, be = /* @__
91
93
  _: 1
92
94
  })
93
95
  ], 2),
94
- a(o(F), null, {
96
+ a(o(J), null, {
95
97
  default: t(() => [
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
- ]),
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
+ }),
131
138
  _: 1
132
139
  }),
133
- a(o(k), null, {
140
+ a(o(V), null, {
134
141
  default: t(() => [
135
- i("div", X, [
136
- a(o(m), null, {
142
+ n("div", Z, [
143
+ a(o(p), null, {
137
144
  default: t(() => [
138
- a(o(G), {
145
+ a(o(K), {
146
+ request: e.request,
139
147
  method: e.method,
140
- selectedServer: e.server,
141
- securitySchemes: e.securitySchemes,
142
- selectedClient: o(B)["x-scalar-default-client"],
143
- path: e.path,
148
+ collection: e.collection,
144
149
  fallback: "",
145
150
  operation: e.operation,
151
+ server: e.server,
146
152
  schemas: e.schemas,
147
- "onUpdate:modelValue": c
148
- }, T({
153
+ "onUpdate:modelValue": f
154
+ }, W({
149
155
  header: t(() => {
150
- var f;
156
+ var r;
151
157
  return [
152
- a(D, {
158
+ a($, {
153
159
  class: "font-code text-c-2 [&_em]:text-c-1 [&_em]:not-italic",
154
- deprecated: (f = e.operation) == null ? void 0 : f.deprecated,
160
+ deprecated: (r = e.operation) == null ? void 0 : r.deprecated,
155
161
  path: e.path
156
162
  }, null, 8, ["deprecated", "path"])
157
163
  ];
158
164
  }),
159
165
  _: 2
160
166
  }, [
161
- e.isWebhook ? void 0 : {
167
+ e.request ? {
162
168
  name: "footer",
163
169
  fn: t(() => [
164
- a(o(J), {
165
- method: e.method,
166
- path: e.path
167
- }, null, 8, ["method", "path"])
170
+ a(o(Q), { operation: e.request }, null, 8, ["operation"])
168
171
  ]),
169
172
  key: "0"
170
- }
171
- ]), 1032, ["method", "selectedServer", "securitySchemes", "selectedClient", "path", "operation", "schemas"])
173
+ } : void 0
174
+ ]), 1032, ["request", "method", "collection", "operation", "server", "schemas"])
172
175
  ]),
173
176
  _: 1
174
177
  }),
175
- a(o(m), null, {
176
- default: t(() => [
177
- a(o(K), {
178
- responses: e.operation.responses,
179
- style: { "margin-top": "12px" }
180
- }, null, 8, ["responses"])
181
- ]),
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
+ }),
182
188
  _: 1
183
189
  })
184
190
  ])
@@ -197,5 +203,5 @@ const Q = { class: "operation-details" }, X = { class: "examples" }, be = /* @__
197
203
  }
198
204
  });
199
205
  export {
200
- be as default
206
+ ke as default
201
207
  };