@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.
- package/CHANGELOG.md +6 -0
- package/dist/blocks/constants.js +6 -0
- package/dist/blocks/helpers/getPointer.js +12 -0
- package/dist/blocks/hooks/useBlockProps.d.ts +31 -0
- package/dist/blocks/hooks/useBlockProps.d.ts.map +1 -0
- package/dist/blocks/hooks/useBlockProps.js +24 -0
- package/dist/browser/standalone.js +14550 -14647
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +2 -2
- package/dist/components/ApiReferenceLayout.vue2.js +176 -164
- package/dist/components/Content/Content.vue.js +2 -2
- package/dist/components/Content/Content.vue2.js +5 -5
- package/dist/features/Operation/Operation.vue.d.ts +6 -6
- package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
- package/dist/features/Operation/Operation.vue.js +49 -50
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +6 -8
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/callbacks/Callback.vue.js +3 -3
- package/dist/features/Operation/components/callbacks/Callback.vue2.js +28 -21
- package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts +3 -5
- package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/callbacks/Callbacks.vue.js +18 -33
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +12 -11
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
- package/dist/features/Operation/layouts/ClassicLayout.vue2.js +162 -164
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +13 -12
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.js +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue2.js +117 -111
- package/dist/features/api-client-modal/useApiClient.d.ts +5795 -5795
- package/dist/features/api-client-modal/useApiClient.d.ts.map +1 -1
- package/dist/features/example-request/ExamplePicker.vue.d.ts +13 -0
- package/dist/features/example-request/ExamplePicker.vue.d.ts.map +1 -0
- package/dist/features/example-request/ExamplePicker.vue.js +7 -0
- package/dist/features/example-request/ExamplePicker.vue2.js +57 -0
- package/dist/features/example-request/ExampleRequest.vue.d.ts +85 -0
- package/dist/features/example-request/ExampleRequest.vue.d.ts.map +1 -0
- package/dist/features/example-request/ExampleRequest.vue.js +7 -0
- package/dist/features/example-request/ExampleRequest.vue2.js +348 -0
- package/dist/features/example-request/TextSelect.vue.d.ts +34 -0
- package/dist/features/example-request/TextSelect.vue.d.ts.map +1 -0
- package/dist/features/example-request/TextSelect.vue.js +48 -0
- package/dist/features/example-request/TextSelect.vue3.js +5 -0
- package/dist/features/example-request/index.d.ts +3 -0
- package/dist/features/example-request/index.d.ts.map +1 -0
- package/dist/features/example-responses/ExampleResponses.vue.d.ts.map +1 -1
- package/dist/features/example-responses/ExampleResponses.vue.js +1 -1
- package/dist/features/example-responses/ExampleResponses.vue2.js +50 -51
- package/dist/features/test-request-button/TestRequestButton.vue.d.ts +2 -3
- package/dist/features/test-request-button/TestRequestButton.vue.d.ts.map +1 -1
- package/dist/features/test-request-button/TestRequestButton.vue.js +2 -2
- package/dist/features/test-request-button/TestRequestButton.vue2.js +19 -21
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -13
- package/dist/style.css +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.d.ts +1 -3
- package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.js +86 -113
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.js +3 -20
- package/dist/v2/blocks/scalar-request-example-block/index.d.ts +2 -2
- package/dist/v2/events/index.d.ts +1 -1
- package/dist/v2/events/listeners.d.ts +1 -1
- package/package.json +10 -10
- package/dist/helpers/convert-security-scheme.js +0 -23
- package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.js +0 -4
- package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue2.js +0 -64
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.js +0 -7
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue2.js +0 -212
- package/dist/v2/blocks/scalar-request-example-block/helpers/generate-client-options.js +0 -35
- package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.js +0 -29
- package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.js +0 -10
- package/dist/v2/events/definitions.js +0 -7
- package/dist/v2/hooks/useStore.js +0 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiReferenceWorkspace.vue.d.ts","sourceRoot":"","sources":["../../src/v2/ApiReferenceWorkspace.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ApiReferenceWorkspace.vue.d.ts","sourceRoot":"","sources":["../../src/v2/ApiReferenceWorkspace.vue"],"names":[],"mappings":"AAqUA,OAAO,KAAK,EACV,4BAA4B,EAE7B,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,gCAAgC,CAAA;AA0BpE,KAAK,WAAW,GAAG;IACjB,aAAa,CAAC,EAAE,4BAA4B,CAAA;IAC5C,iBAAiB,EAAE,MAAM,cAAc,CAAA;CACxC,CAAC;AAuNF,iBAAS,cAAc;WA0GT,OAAO,IAA6B;;wBAVrB,GAAG;wBACH,GAAG;iCACM,GAAG;;;;EAaxC;AAeD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,47 +1,43 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { safeLocalStorage as
|
|
3
|
-
import { parseJsonOrYaml as
|
|
4
|
-
import { useColorMode as
|
|
5
|
-
import { useSeoMeta as
|
|
6
|
-
import { useFavicon as
|
|
7
|
-
import
|
|
8
|
-
import { NAV_STATE_SYMBOL as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
|
|
14
|
-
import re from "../features/multiple-documents/DocumentSelector.vue.js";
|
|
15
|
-
const xe = /* @__PURE__ */ b({
|
|
1
|
+
import { defineComponent as V, ref as f, toRef as b, provide as _, shallowRef as w, onServerPrefetch as $, onMounted as C, watch as d, computed as A, createElementBlock as B, openBlock as D, Fragment as F, createBlock as P, createCommentVNode as U, createVNode as S, unref as r, resolveDynamicComponent as W, withCtx as n, createTextVNode as Y, toDisplayString as O, renderSlot as p, isRef as j } from "vue";
|
|
2
|
+
import { safeLocalStorage as x, REFERENCE_LS_KEYS as h } from "@scalar/helpers/object/local-storage";
|
|
3
|
+
import { parseJsonOrYaml as J, redirectToProxy as K } from "@scalar/oas-utils/helpers";
|
|
4
|
+
import { useColorMode as q } from "@scalar/use-hooks/useColorMode";
|
|
5
|
+
import { useSeoMeta as z } from "@unhead/vue";
|
|
6
|
+
import { useFavicon as G } from "@vueuse/core";
|
|
7
|
+
import H from "../components/ApiReferenceLayout.vue.js";
|
|
8
|
+
import { NAV_STATE_SYMBOL as Q } from "../hooks/useNavState.js";
|
|
9
|
+
import { isClient as X } from "./blocks/scalar-request-example-block/helpers/find-client.js";
|
|
10
|
+
import { useMultipleDocuments as Z } from "../features/multiple-documents/useMultipleDocuments.js";
|
|
11
|
+
import { onCustomEvent as v } from "./events/listeners.js";
|
|
12
|
+
import ee from "../features/multiple-documents/DocumentSelector.vue.js";
|
|
13
|
+
const fe = /* @__PURE__ */ V({
|
|
16
14
|
__name: "ApiReferenceWorkspace",
|
|
17
15
|
props: {
|
|
18
16
|
configuration: {},
|
|
19
17
|
getWorkspaceStore: { type: Function }
|
|
20
18
|
},
|
|
21
|
-
setup(
|
|
22
|
-
const
|
|
23
|
-
availableDocuments:
|
|
19
|
+
setup(M) {
|
|
20
|
+
const k = M, {
|
|
21
|
+
availableDocuments: l,
|
|
24
22
|
selectedConfiguration: a,
|
|
25
|
-
selectedDocumentIndex:
|
|
26
|
-
isIntersectionEnabled:
|
|
27
|
-
hash:
|
|
28
|
-
hashPrefix:
|
|
29
|
-
} =
|
|
30
|
-
configuration:
|
|
31
|
-
isIntersectionEnabled:
|
|
32
|
-
hash:
|
|
33
|
-
hashPrefix:
|
|
34
|
-
}),
|
|
35
|
-
|
|
23
|
+
selectedDocumentIndex: s,
|
|
24
|
+
isIntersectionEnabled: g,
|
|
25
|
+
hash: y,
|
|
26
|
+
hashPrefix: T
|
|
27
|
+
} = Z({
|
|
28
|
+
configuration: b(k, "configuration"),
|
|
29
|
+
isIntersectionEnabled: f(!1),
|
|
30
|
+
hash: f(""),
|
|
31
|
+
hashPrefix: f("")
|
|
32
|
+
}), L = (e, t) => fetch(
|
|
33
|
+
K(a.value.proxyUrl, e.toString()),
|
|
36
34
|
t
|
|
37
35
|
);
|
|
38
|
-
|
|
39
|
-
const
|
|
40
|
-
oe(o);
|
|
41
|
-
const f = u, m = (e) => {
|
|
36
|
+
_(Q, { isIntersectionEnabled: g, hash: y, hashPrefix: T });
|
|
37
|
+
const i = w(null), o = k.getWorkspaceStore(), c = l, u = (e) => {
|
|
42
38
|
if (o.workspace.documents[e.slug ?? "default"] === void 0) {
|
|
43
39
|
if (e.content) {
|
|
44
|
-
const t = typeof e.content == "string" ?
|
|
40
|
+
const t = typeof e.content == "string" ? J(e.content) : e.content;
|
|
45
41
|
return o.addDocumentSync({
|
|
46
42
|
name: e.slug ?? "default",
|
|
47
43
|
document: typeof t == "function" ? t() : t
|
|
@@ -51,120 +47,97 @@ const xe = /* @__PURE__ */ b({
|
|
|
51
47
|
return o.addDocument({
|
|
52
48
|
name: e.slug ?? "default",
|
|
53
49
|
url: e.url,
|
|
54
|
-
fetch:
|
|
50
|
+
fetch: L
|
|
55
51
|
});
|
|
56
52
|
}
|
|
57
53
|
};
|
|
58
|
-
|
|
59
|
-
e.content &&
|
|
60
|
-
}),
|
|
61
|
-
|
|
62
|
-
e.url &&
|
|
54
|
+
c.value.forEach((e) => {
|
|
55
|
+
e.content && u(e);
|
|
56
|
+
}), $(() => {
|
|
57
|
+
c.value.forEach((e) => {
|
|
58
|
+
e.url && u(e);
|
|
63
59
|
});
|
|
64
|
-
}),
|
|
65
|
-
|
|
66
|
-
|
|
60
|
+
}), C(() => {
|
|
61
|
+
c.value.forEach((e) => {
|
|
62
|
+
e.url && u(e);
|
|
67
63
|
});
|
|
68
|
-
|
|
69
|
-
g.SELECTED_CLIENT
|
|
70
|
-
);
|
|
71
|
-
k(e) && !o.workspace["x-scalar-default-client"] && o.update("x-scalar-default-client", e);
|
|
72
|
-
}), C(c, "scalar-update-dark-mode", (e) => {
|
|
64
|
+
}), v(i, "scalar-update-dark-mode", (e) => {
|
|
73
65
|
o.update("x-scalar-dark-mode", e.detail.value);
|
|
74
|
-
}),
|
|
66
|
+
}), v(i, "scalar-update-active-document", (e) => {
|
|
75
67
|
o.update("x-scalar-active-document", e.detail.value);
|
|
76
|
-
}),
|
|
77
|
-
o.update("x-scalar-default-client", e.detail),
|
|
78
|
-
|
|
79
|
-
x(
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
})
|
|
84
|
-
|
|
85
|
-
(e) => e && L(e)
|
|
86
|
-
), n($, (e) => {
|
|
87
|
-
var r;
|
|
88
|
-
const t = `${e.targetKey}/${e.clientKey}`;
|
|
89
|
-
e && ((r = o.workspace.activeDocument) == null ? void 0 : r["x-scalar-default-client"]) !== t && k(t) && o.update("x-scalar-default-client", t);
|
|
90
|
-
}), n(
|
|
91
|
-
() => a.value.defaultHttpClient,
|
|
92
|
-
(e) => {
|
|
93
|
-
if (e) {
|
|
94
|
-
const { targetKey: t, clientKey: r } = e, s = `${t}/${r}`;
|
|
95
|
-
k(s) && o.update("x-scalar-default-client", s), x(e);
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
{ immediate: !0 }
|
|
99
|
-
);
|
|
100
|
-
const { toggleColorMode: N, isDarkMode: R } = G({
|
|
68
|
+
}), v(i, "scalar-update-selected-client", (e) => {
|
|
69
|
+
o.update("x-scalar-default-client", e.detail), x().setItem(h.SELECTED_CLIENT, e.detail);
|
|
70
|
+
}), C(() => {
|
|
71
|
+
const e = x().getItem(
|
|
72
|
+
h.SELECTED_CLIENT
|
|
73
|
+
);
|
|
74
|
+
X(e) && o.update("x-scalar-default-client", e);
|
|
75
|
+
});
|
|
76
|
+
const { toggleColorMode: I, isDarkMode: N } = q({
|
|
101
77
|
initialColorMode: a.value.darkMode ? "dark" : void 0,
|
|
102
78
|
overrideColorMode: a.value.forceDarkModeState
|
|
103
79
|
});
|
|
104
|
-
|
|
80
|
+
d(
|
|
105
81
|
() => a.value.darkMode,
|
|
106
82
|
(e) => o.update("x-scalar-dark-mode", !!e)
|
|
107
|
-
),
|
|
108
|
-
() =>
|
|
83
|
+
), d(
|
|
84
|
+
() => N.value,
|
|
109
85
|
(e) => o.update("x-scalar-dark-mode", e),
|
|
110
86
|
{ immediate: !0 }
|
|
111
|
-
),
|
|
112
|
-
() =>
|
|
87
|
+
), d(
|
|
88
|
+
() => s.value,
|
|
113
89
|
(e) => {
|
|
114
90
|
var t;
|
|
115
91
|
return o.update(
|
|
116
92
|
"x-scalar-active-document",
|
|
117
|
-
(t =
|
|
93
|
+
(t = l.value[e]) == null ? void 0 : t.slug
|
|
118
94
|
);
|
|
119
95
|
},
|
|
120
96
|
{ immediate: !0 }
|
|
121
|
-
),
|
|
122
|
-
() =>
|
|
97
|
+
), d(
|
|
98
|
+
() => l.value,
|
|
123
99
|
(e) => {
|
|
124
|
-
e.forEach(
|
|
100
|
+
e.forEach(u);
|
|
125
101
|
}
|
|
126
|
-
), a.value.metaData &&
|
|
127
|
-
const
|
|
128
|
-
return
|
|
129
|
-
var
|
|
130
|
-
return
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
(r = l(a)) != null && r.customCss ? (y(), W(O("style"), { key: 0 }, {
|
|
135
|
-
default: i(() => [
|
|
136
|
-
j(w(l(a).customCss), 1)
|
|
102
|
+
), a.value.metaData && z(a.value.metaData);
|
|
103
|
+
const R = A(() => a.value.favicon);
|
|
104
|
+
return G(R), (e, t) => {
|
|
105
|
+
var E;
|
|
106
|
+
return D(), B(F, null, [
|
|
107
|
+
(E = r(a)) != null && E.customCss ? (D(), P(W("style"), { key: 0 }, {
|
|
108
|
+
default: n(() => [
|
|
109
|
+
Y(O(r(a).customCss), 1)
|
|
137
110
|
]),
|
|
138
111
|
_: 1
|
|
139
|
-
})) :
|
|
140
|
-
|
|
141
|
-
configuration:
|
|
142
|
-
isDark: !!
|
|
143
|
-
onToggleDarkMode: t[1] || (t[1] = () =>
|
|
144
|
-
onUpdateContent: t[2] || (t[2] = (
|
|
112
|
+
})) : U("", !0),
|
|
113
|
+
S(H, {
|
|
114
|
+
configuration: r(a),
|
|
115
|
+
isDark: !!r(o).workspace["x-scalar-dark-mode"],
|
|
116
|
+
onToggleDarkMode: t[1] || (t[1] = () => r(I)()),
|
|
117
|
+
onUpdateContent: t[2] || (t[2] = (m) => e.$emit("updateContent", m))
|
|
145
118
|
}, {
|
|
146
|
-
footer:
|
|
147
|
-
|
|
119
|
+
footer: n(() => [
|
|
120
|
+
p(e.$slots, "footer")
|
|
148
121
|
]),
|
|
149
|
-
"content-end":
|
|
150
|
-
|
|
122
|
+
"content-end": n(() => [
|
|
123
|
+
p(e.$slots, "footer")
|
|
151
124
|
]),
|
|
152
|
-
"document-selector":
|
|
153
|
-
|
|
154
|
-
modelValue:
|
|
155
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
156
|
-
options: l
|
|
125
|
+
"document-selector": n(() => [
|
|
126
|
+
S(r(ee), {
|
|
127
|
+
modelValue: r(s),
|
|
128
|
+
"onUpdate:modelValue": t[0] || (t[0] = (m) => j(s) ? s.value = m : null),
|
|
129
|
+
options: r(l)
|
|
157
130
|
}, null, 8, ["modelValue", "options"])
|
|
158
131
|
]),
|
|
159
|
-
"sidebar-start":
|
|
160
|
-
|
|
132
|
+
"sidebar-start": n(() => [
|
|
133
|
+
p(e.$slots, "sidebar-start")
|
|
161
134
|
]),
|
|
162
135
|
_: 3
|
|
163
136
|
}, 8, ["configuration", "isDark"])
|
|
164
|
-
],
|
|
137
|
+
], 64);
|
|
165
138
|
};
|
|
166
139
|
}
|
|
167
140
|
});
|
|
168
141
|
export {
|
|
169
|
-
|
|
142
|
+
fe as default
|
|
170
143
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestExample.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-request-example-block/components/RequestExample.vue"],"names":[],"mappings":"AAqYA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAGrF,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6DAA6D,CAAA;AAClG,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6DAA6D,CAAA;AACvG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oDAAoD,CAAA;AACtF,OAAO,EAEL,KAAK,WAAW,EACjB,MAAM,iDAAiD,CAAA;AAkBxD,MAAM,MAAM,mBAAmB,GAAG;IAChC;;;;;;;OAOG;IACH,cAAc,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,EAAE,CAAA;IAC3C;;;;OAIG;IACH,cAAc,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAA;IACzC;;OAEG;IACH,cAAc,CAAC,EAAE,YAAY,GAAG,SAAS,CAAA;IACzC;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB;;OAEG;IACH,eAAe,CAAC,EAAE,oBAAoB,EAAE,CAAA;IACxC;;OAEG;IACH,MAAM,EAAE,cAAc,CAAA;IACtB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,SAAS,EAAE,WAAW,CAAC,eAAe,CAAC,CAAA;IACvC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,MAAM,CAAA;IAC5B;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC7B,CAAA;AAED;;;;;;;;GAQG;;YAoBO,MAAM,OAAO;YACb,MAAM,OAAO;;YADb,MAAM,OAAO;YACb,MAAM,OAAO;;AApBvB,
|
|
1
|
+
{"version":3,"file":"RequestExample.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-request-example-block/components/RequestExample.vue"],"names":[],"mappings":"AAqYA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAGrF,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6DAA6D,CAAA;AAClG,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6DAA6D,CAAA;AACvG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oDAAoD,CAAA;AACtF,OAAO,EAEL,KAAK,WAAW,EACjB,MAAM,iDAAiD,CAAA;AAkBxD,MAAM,MAAM,mBAAmB,GAAG;IAChC;;;;;;;OAOG;IACH,cAAc,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,EAAE,CAAA;IAC3C;;;;OAIG;IACH,cAAc,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAA;IACzC;;OAEG;IACH,cAAc,CAAC,EAAE,YAAY,GAAG,SAAS,CAAA;IACzC;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB;;OAEG;IACH,eAAe,CAAC,EAAE,oBAAoB,EAAE,CAAA;IACxC;;OAEG;IACH,MAAM,EAAE,cAAc,CAAA;IACtB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,SAAS,EAAE,WAAW,CAAC,eAAe,CAAC,CAAA;IACvC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,MAAM,CAAA;IAC5B;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC7B,CAAA;AAED;;;;;;;;GAQG;;YAoBO,MAAM,OAAO;YACb,MAAM,OAAO;;YADb,MAAM,OAAO;YACb,MAAM,OAAO;;AApBvB,wBAkaC;AAWD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,22 +1,5 @@
|
|
|
1
|
-
import { AVAILABLE_CLIENTS as
|
|
2
|
-
const
|
|
3
|
-
var f;
|
|
4
|
-
const n = (f = o[0]) == null ? void 0 : f.options[0];
|
|
5
|
-
if (r)
|
|
6
|
-
for (const i of o) {
|
|
7
|
-
const t = i.options.find((s) => s.id === r);
|
|
8
|
-
if (t)
|
|
9
|
-
return t;
|
|
10
|
-
}
|
|
11
|
-
if (!(n != null && n.id.startsWith("custom")))
|
|
12
|
-
for (const i of o) {
|
|
13
|
-
const t = i.options.find((s) => s.id === d);
|
|
14
|
-
if (t)
|
|
15
|
-
return t;
|
|
16
|
-
}
|
|
17
|
-
return n;
|
|
18
|
-
};
|
|
1
|
+
import { AVAILABLE_CLIENTS as o } from "@scalar/snippetz";
|
|
2
|
+
const e = (i) => o.includes(i);
|
|
19
3
|
export {
|
|
20
|
-
e as
|
|
21
|
-
u as isClient
|
|
4
|
+
e as isClient
|
|
22
5
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { default as RequestExample } from './components/RequestExample.vue
|
|
2
|
-
export { default as ExamplePicker } from './components/ExamplePicker.vue
|
|
1
|
+
export { default as RequestExample } from './components/RequestExample.vue';
|
|
2
|
+
export { default as ExamplePicker } from './components/ExamplePicker.vue';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { type ApiReferenceEvents, type ApiReferenceEvent, emitCustomEvent } from './definitions
|
|
1
|
+
export { type ApiReferenceEvents, type ApiReferenceEvent, emitCustomEvent } from './definitions';
|
|
2
2
|
export { onCustomEvent } from './listeners.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/package.json
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"vue",
|
|
21
21
|
"vue3"
|
|
22
22
|
],
|
|
23
|
-
"version": "1.32.
|
|
23
|
+
"version": "1.32.9",
|
|
24
24
|
"engines": {
|
|
25
25
|
"node": ">=20"
|
|
26
26
|
},
|
|
@@ -54,21 +54,21 @@
|
|
|
54
54
|
"nanoid": "5.1.5",
|
|
55
55
|
"vue": "^3.5.17",
|
|
56
56
|
"zod": "3.24.1",
|
|
57
|
-
"@scalar/api-client": "2.5.18",
|
|
58
57
|
"@scalar/code-highlight": "0.1.8",
|
|
58
|
+
"@scalar/api-client": "2.5.18",
|
|
59
|
+
"@scalar/helpers": "0.0.6",
|
|
59
60
|
"@scalar/components": "0.14.19",
|
|
60
61
|
"@scalar/icons": "0.4.6",
|
|
62
|
+
"@scalar/openapi-parser": "0.18.1",
|
|
61
63
|
"@scalar/object-utils": "1.2.2",
|
|
62
|
-
"@scalar/oas-utils": "0.4.14",
|
|
63
|
-
"@scalar/helpers": "0.0.6",
|
|
64
64
|
"@scalar/openapi-types": "0.3.6",
|
|
65
|
-
"@scalar/
|
|
65
|
+
"@scalar/types": "0.2.9",
|
|
66
|
+
"@scalar/oas-utils": "0.4.14",
|
|
66
67
|
"@scalar/themes": "0.13.10",
|
|
67
|
-
"@scalar/openapi-parser": "0.18.1",
|
|
68
68
|
"@scalar/use-hooks": "0.2.4",
|
|
69
|
+
"@scalar/snippetz": "0.4.2",
|
|
69
70
|
"@scalar/use-toasts": "0.8.0",
|
|
70
|
-
"@scalar/workspace-store": "0.10.1"
|
|
71
|
-
"@scalar/types": "0.2.9"
|
|
71
|
+
"@scalar/workspace-store": "0.10.1"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@tailwindcss/vite": "^4.1.7",
|
|
@@ -86,8 +86,8 @@
|
|
|
86
86
|
"vite-plugin-css-injected-by-js": "^3.4.0",
|
|
87
87
|
"vitest": "^1.6.1",
|
|
88
88
|
"@scalar/build-tooling": "0.2.4",
|
|
89
|
-
"@scalar/
|
|
90
|
-
"@scalar/
|
|
89
|
+
"@scalar/react-renderer": "0.2.1",
|
|
90
|
+
"@scalar/galaxy": "0.5.4"
|
|
91
91
|
},
|
|
92
92
|
"scripts": {
|
|
93
93
|
"build": "pnpm build:default && pnpm build:standalone && pnpm types:build && tsc-alias -p tsconfig.build.json",
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
const e = (r) => r.type === "apiKey" ? {
|
|
2
|
-
...r,
|
|
3
|
-
"x-scalar-secret-token": r.value
|
|
4
|
-
} : r.type === "http" ? {
|
|
5
|
-
...r,
|
|
6
|
-
"x-scalar-secret-token": r.token,
|
|
7
|
-
"x-scalar-secret-username": r.username,
|
|
8
|
-
"x-scalar-secret-password": r.password
|
|
9
|
-
} : r.type === "oauth2" ? {
|
|
10
|
-
...r,
|
|
11
|
-
flows: Object.fromEntries(
|
|
12
|
-
Object.entries(r.flows).map(([a, t]) => [
|
|
13
|
-
a,
|
|
14
|
-
t && {
|
|
15
|
-
...t,
|
|
16
|
-
"x-scalar-secret-token": t.token
|
|
17
|
-
}
|
|
18
|
-
])
|
|
19
|
-
)
|
|
20
|
-
} : r;
|
|
21
|
-
export {
|
|
22
|
-
e as convertSecurityScheme
|
|
23
|
-
};
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { defineComponent as f, mergeModels as b, useModel as v, computed as c, createBlock as V, openBlock as h, unref as r, withCtx as u, createVNode as d, createElementVNode as g, toDisplayString as S } from "vue";
|
|
2
|
-
import { ScalarCombobox as _, ScalarButton as E } from "@scalar/components";
|
|
3
|
-
import { ScalarIconCaretDown as C } from "@scalar/icons";
|
|
4
|
-
const k = /* @__PURE__ */ f({
|
|
5
|
-
__name: "ExamplePicker",
|
|
6
|
-
props: /* @__PURE__ */ b({
|
|
7
|
-
examples: {}
|
|
8
|
-
}, {
|
|
9
|
-
modelValue: { required: !0 },
|
|
10
|
-
modelModifiers: {}
|
|
11
|
-
}),
|
|
12
|
-
emits: ["update:modelValue"],
|
|
13
|
-
setup(m, { expose: i }) {
|
|
14
|
-
const n = m, l = v(m, "modelValue"), a = c(() => Object.keys(n.examples).map((e) => ({
|
|
15
|
-
id: e,
|
|
16
|
-
label: s(e)
|
|
17
|
-
}))), o = c(
|
|
18
|
-
() => a.value.find(
|
|
19
|
-
(e) => e.id === l.value
|
|
20
|
-
) ?? a.value[0]
|
|
21
|
-
), s = (e) => {
|
|
22
|
-
if (!e)
|
|
23
|
-
return "Select an example";
|
|
24
|
-
const t = n.examples[e];
|
|
25
|
-
return (t == null ? void 0 : t.summary) ?? e;
|
|
26
|
-
}, x = (e) => {
|
|
27
|
-
l.value = e.id;
|
|
28
|
-
};
|
|
29
|
-
return i({
|
|
30
|
-
getLabel: s,
|
|
31
|
-
selectedExample: o,
|
|
32
|
-
selectedExampleKey: l
|
|
33
|
-
}), (e, t) => (h(), V(r(_), {
|
|
34
|
-
class: "max-h-80",
|
|
35
|
-
modelValue: o.value,
|
|
36
|
-
options: a.value,
|
|
37
|
-
teleport: "",
|
|
38
|
-
placement: "bottom-start",
|
|
39
|
-
"onUpdate:modelValue": x
|
|
40
|
-
}, {
|
|
41
|
-
default: u(() => [
|
|
42
|
-
d(r(E), {
|
|
43
|
-
"data-testid": "example-picker",
|
|
44
|
-
class: "text-c-1 hover:bg-b-2 flex h-full w-fit gap-1.5 px-1.5 py-0.75 font-normal",
|
|
45
|
-
fullWidth: "",
|
|
46
|
-
variant: "ghost"
|
|
47
|
-
}, {
|
|
48
|
-
default: u(() => {
|
|
49
|
-
var p;
|
|
50
|
-
return [
|
|
51
|
-
g("span", null, S(((p = o.value) == null ? void 0 : p.label) || "Select an example"), 1),
|
|
52
|
-
d(r(C))
|
|
53
|
-
];
|
|
54
|
-
}),
|
|
55
|
-
_: 1
|
|
56
|
-
})
|
|
57
|
-
]),
|
|
58
|
-
_: 1
|
|
59
|
-
}, 8, ["modelValue", "options"]));
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
export {
|
|
63
|
-
k as default
|
|
64
|
-
};
|