@scalar/api-reference 1.32.8 → 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.
- package/CHANGELOG.md +35 -0
- package/dist/browser/standalone.js +12720 -12580
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/Badge/Badge.vue.d.ts.map +1 -1
- package/dist/components/Badge/Badge.vue.js +3 -3
- package/dist/components/Content/Content.vue.js +2 -2
- package/dist/components/Content/Content.vue2.js +25 -25
- package/dist/components/Content/Introduction/Description.vue.d.ts.map +1 -1
- package/dist/components/Content/Introduction/Description.vue.js +2 -2
- package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
- package/dist/components/Content/Introduction/Introduction.vue.js +2 -2
- package/dist/components/Content/Introduction/Introduction.vue2.js +104 -72
- package/dist/components/Content/Tag/Tag.vue.d.ts.map +1 -1
- package/dist/components/LinkList/LinkList.vue.d.ts +18 -0
- package/dist/components/LinkList/LinkList.vue.d.ts.map +1 -0
- package/dist/components/LinkList/LinkList.vue.js +12 -0
- package/dist/components/LinkList/index.d.ts +2 -0
- package/dist/components/LinkList/index.d.ts.map +1 -0
- package/dist/components/Section/SectionHeader.vue.d.ts +1 -0
- package/dist/components/Section/SectionHeader.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionHeader.vue.js +2 -2
- package/dist/components/Section/SectionHeader.vue2.js +11 -10
- 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 +5 -6
- 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 +1 -2
- package/dist/features/base-url/BaseUrl.vue.d.ts.map +1 -1
- package/dist/features/base-url/BaseUrl.vue.js +26 -26
- package/dist/features/download-link/DownloadLink.vue.js +1 -1
- package/dist/features/example-responses/ExampleResponseTab.vue.js +2 -2
- package/dist/features/example-responses/ExampleResponseTabList.vue.js +1 -1
- package/dist/features/example-responses/ExampleResponses.vue.d.ts.map +1 -1
- package/dist/features/example-responses/ExampleResponses.vue.js +2 -2
- package/dist/features/example-responses/ExampleResponses.vue2.js +33 -31
- package/dist/features/external-docs/ExternalDocs.vue.d.ts +7 -0
- package/dist/features/external-docs/ExternalDocs.vue.d.ts.map +1 -0
- package/dist/features/external-docs/ExternalDocs.vue.js +36 -0
- package/dist/features/external-docs/ExternalDocs.vue2.js +4 -0
- package/dist/features/external-docs/index.d.ts +2 -0
- package/dist/features/external-docs/index.d.ts.map +1 -0
- package/dist/features/info-object/Contact.vue.d.ts +7 -0
- package/dist/features/info-object/Contact.vue.d.ts.map +1 -0
- package/dist/features/info-object/Contact.vue.js +44 -0
- package/dist/features/info-object/Contact.vue2.js +4 -0
- package/dist/features/info-object/License.vue.d.ts +7 -0
- package/dist/features/info-object/License.vue.d.ts.map +1 -0
- package/dist/features/info-object/License.vue.js +34 -0
- package/dist/features/info-object/License.vue2.js +4 -0
- package/dist/features/info-object/TermsOfService.vue.d.ts +7 -0
- package/dist/features/info-object/TermsOfService.vue.d.ts.map +1 -0
- package/dist/features/info-object/TermsOfService.vue.js +30 -0
- package/dist/features/info-object/TermsOfService.vue2.js +4 -0
- package/dist/features/info-object/index.d.ts +4 -0
- package/dist/features/info-object/index.d.ts.map +1 -0
- 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/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.d.ts +0 -2
- package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue2.js +46 -41
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.js +1 -1
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue2.js +185 -170
- package/package.json +11 -11
- package/LICENSE +0 -21
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { type ScalarComboboxOption } from '@scalar/components';
|
|
2
1
|
import type { ExampleObject } from '@scalar/workspace-store/schemas/v3.1/strict/example';
|
|
3
2
|
type __VLS_Props = {
|
|
4
3
|
examples: Record<string, ExampleObject>;
|
|
@@ -8,7 +7,6 @@ type __VLS_PublicProps = {
|
|
|
8
7
|
} & __VLS_Props;
|
|
9
8
|
declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
10
9
|
getLabel: (key: string | null) => string;
|
|
11
|
-
selectedExample: import("vue").ComputedRef<ScalarComboboxOption>;
|
|
12
10
|
selectedExampleKey: import("vue").ModelRef<string, string, string, string>;
|
|
13
11
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
14
12
|
"update:modelValue": (value: string) => any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExamplePicker.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExamplePicker.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue"],"names":[],"mappings":"AA+EA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qDAAqD,CAAA;AAIxF,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;CACxC,CAAC;AAqCF,KAAK,iBAAiB,GAAG;IACzB,UAAU,EAAE,MAAM,CAAC;CAClB,GAAG,WAAW,CAAC;;oBAjCO,MAAM,GAAG,IAAI;;;;;;;AAkLpC,wBASG"}
|
|
@@ -1,64 +1,69 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import { ScalarIconCaretDown as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as h, mergeModels as _, useModel as v, createBlock as p, openBlock as s, unref as t, withCtx as o, createVNode as c, createElementVNode as m, toDisplayString as d, createElementBlock as w, Fragment as g, renderList as C, normalizeClass as S } from "vue";
|
|
2
|
+
import { ScalarDropdown as b, ScalarButton as k, ScalarDropdownItem as E, ScalarIcon as V } from "@scalar/components";
|
|
3
|
+
import { ScalarIconCaretDown as B } from "@scalar/icons";
|
|
4
|
+
const D = { class: "overflow-hidden text-ellipsis" }, j = /* @__PURE__ */ h({
|
|
5
5
|
__name: "ExamplePicker",
|
|
6
|
-
props: /* @__PURE__ */
|
|
6
|
+
props: /* @__PURE__ */ _({
|
|
7
7
|
examples: {}
|
|
8
8
|
}, {
|
|
9
9
|
modelValue: { required: !0 },
|
|
10
10
|
modelModifiers: {}
|
|
11
11
|
}),
|
|
12
12
|
emits: ["update:modelValue"],
|
|
13
|
-
setup(
|
|
14
|
-
const
|
|
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) => {
|
|
13
|
+
setup(i, { expose: u }) {
|
|
14
|
+
const f = i, a = v(i, "modelValue"), n = (e) => {
|
|
22
15
|
if (!e)
|
|
23
16
|
return "Select an example";
|
|
24
|
-
const
|
|
25
|
-
return (
|
|
17
|
+
const l = f.examples[e];
|
|
18
|
+
return (l == null ? void 0 : l.summary) ?? e;
|
|
26
19
|
}, x = (e) => {
|
|
27
|
-
|
|
20
|
+
a.value = e;
|
|
28
21
|
};
|
|
29
|
-
return
|
|
30
|
-
getLabel:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
22
|
+
return u({
|
|
23
|
+
getLabel: n,
|
|
24
|
+
selectedExampleKey: a
|
|
25
|
+
}), (e, l) => (s(), p(t(b), { placement: "bottom-start" }, {
|
|
26
|
+
items: o(() => [
|
|
27
|
+
(s(!0), w(g, null, C(e.examples, (I, r) => (s(), p(t(E), {
|
|
28
|
+
key: r,
|
|
29
|
+
onClick: (M) => x(r)
|
|
30
|
+
}, {
|
|
31
|
+
default: o(() => [
|
|
32
|
+
m("div", {
|
|
33
|
+
class: S([
|
|
34
|
+
"flex h-4 w-4 items-center justify-center rounded-full p-[3px]",
|
|
35
|
+
a.value === r ? "bg-c-accent text-b-1" : "shadow-border text-transparent"
|
|
36
|
+
])
|
|
37
|
+
}, [
|
|
38
|
+
c(t(V), {
|
|
39
|
+
class: "size-2.5",
|
|
40
|
+
icon: "Checkmark",
|
|
41
|
+
thickness: "3"
|
|
42
|
+
})
|
|
43
|
+
], 2),
|
|
44
|
+
m("span", D, d(n(r)), 1)
|
|
45
|
+
]),
|
|
46
|
+
_: 2
|
|
47
|
+
}, 1032, ["onClick"]))), 128))
|
|
48
|
+
]),
|
|
49
|
+
default: o(() => [
|
|
50
|
+
c(t(k), {
|
|
43
51
|
"data-testid": "example-picker",
|
|
44
|
-
class: "text-c-
|
|
52
|
+
class: "text-c-2 hover:text-c-1 flex h-full w-fit gap-1.5 px-1.5 py-0.75 text-base font-normal",
|
|
45
53
|
fullWidth: "",
|
|
46
54
|
variant: "ghost"
|
|
47
55
|
}, {
|
|
48
|
-
default:
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
d(r(C))
|
|
53
|
-
];
|
|
54
|
-
}),
|
|
56
|
+
default: o(() => [
|
|
57
|
+
m("span", null, d(n(a.value)), 1),
|
|
58
|
+
c(t(B))
|
|
59
|
+
]),
|
|
55
60
|
_: 1
|
|
56
61
|
})
|
|
57
62
|
]),
|
|
58
63
|
_: 1
|
|
59
|
-
}
|
|
64
|
+
}));
|
|
60
65
|
}
|
|
61
66
|
});
|
|
62
67
|
export {
|
|
63
|
-
|
|
68
|
+
j as default
|
|
64
69
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestExample.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-request-example-block/components/RequestExample.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestExample.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-request-example-block/components/RequestExample.vue"],"names":[],"mappings":"AAiZA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAGrF,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAExD,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;AAoBxD,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,wBA0bC;AAWD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./RequestExample.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-03733855"]]);
|
|
5
5
|
export {
|
|
6
6
|
r as default
|
|
7
7
|
};
|
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
import { defineComponent as O, computed as
|
|
2
|
-
import { ScalarCard as x, ScalarCardHeader as
|
|
3
|
-
import { freezeElement as
|
|
4
|
-
import { ScalarIconCaretDown as
|
|
5
|
-
import { isReference as
|
|
6
|
-
import { findClient as
|
|
7
|
-
import { generateClientOptions as
|
|
8
|
-
import { generateCodeSnippet as
|
|
9
|
-
import { getSecrets as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
|
|
1
|
+
import { defineComponent as O, computed as m, ref as S, watch as j, useId as D, createElementBlock as k, openBlock as u, Fragment as I, createBlock as p, createCommentVNode as v, unref as l, withCtx as n, createVNode as o, createSlots as N, createElementVNode as h, renderSlot as y, toDisplayString as R } from "vue";
|
|
2
|
+
import { ScalarCard as x, ScalarCardHeader as z, ScalarCombobox as F, ScalarButton as H, ScalarCardSection as q, ScalarCodeBlock as K, ScalarCardFooter as M } from "@scalar/components";
|
|
3
|
+
import { freezeElement as W } from "@scalar/helpers/dom/freeze-element";
|
|
4
|
+
import { ScalarIconCaretDown as U } from "@scalar/icons";
|
|
5
|
+
import { isReference as A } from "@scalar/workspace-store/schemas/v3.1/type-guard";
|
|
6
|
+
import { findClient as $ } from "../helpers/find-client.js";
|
|
7
|
+
import { generateClientOptions as G, generateCustomId as J } from "../helpers/generate-client-options.js";
|
|
8
|
+
import { generateCodeSnippet as P } from "../helpers/generate-code-snippet.js";
|
|
9
|
+
import { getSecrets as Q } from "../helpers/get-secrets.js";
|
|
10
|
+
import X from "./ExamplePicker.vue2.js";
|
|
11
|
+
import Y from "../../../../components/LinkList/LinkList.vue.js";
|
|
12
|
+
import Z from "../../../../features/external-docs/ExternalDocs.vue.js";
|
|
13
|
+
import B from "../../../../components/HttpMethod/HttpMethod.vue.js";
|
|
14
|
+
import { emitCustomEvent as V } from "../../../events/definitions.js";
|
|
15
|
+
const _ = ["innerHTML"], ee = { class: "text-base" }, te = ["id"], le = {
|
|
14
16
|
key: 0,
|
|
15
17
|
class: "request-card-footer-addon"
|
|
16
|
-
},
|
|
17
|
-
...
|
|
18
|
+
}, ae = { class: "request-header" }, oe = {}, Se = /* @__PURE__ */ O({
|
|
19
|
+
...oe,
|
|
18
20
|
__name: "RequestExample",
|
|
19
21
|
props: {
|
|
20
22
|
allowedClients: {},
|
|
@@ -30,183 +32,196 @@ const X = ["innerHTML"], Y = ["id"], Z = {
|
|
|
30
32
|
generateLabel: { type: Function },
|
|
31
33
|
hideClientSelector: { type: Boolean, default: !1 }
|
|
32
34
|
},
|
|
33
|
-
setup(
|
|
34
|
-
const
|
|
35
|
-
var
|
|
36
|
-
if (
|
|
35
|
+
setup(a) {
|
|
36
|
+
const c = m(() => {
|
|
37
|
+
var d, b;
|
|
38
|
+
if (A(a.operation.requestBody))
|
|
37
39
|
return {};
|
|
38
|
-
const
|
|
39
|
-
return ((
|
|
40
|
-
}),
|
|
41
|
-
|
|
42
|
-
), g =
|
|
40
|
+
const t = ((d = a.operation.requestBody) == null ? void 0 : d.content) ?? {}, e = a.selectedContentType || Object.keys(t)[0];
|
|
41
|
+
return ((b = t[e]) == null ? void 0 : b.examples) ?? {};
|
|
42
|
+
}), C = S(
|
|
43
|
+
a.selectedExample ?? Object.keys(c.value)[0]
|
|
44
|
+
), g = m(() => [
|
|
43
45
|
"x-custom-examples",
|
|
44
46
|
"x-codeSamples",
|
|
45
47
|
"x-code-samples"
|
|
46
48
|
].flatMap(
|
|
47
|
-
(
|
|
48
|
-
)), f =
|
|
49
|
-
() =>
|
|
50
|
-
),
|
|
51
|
-
|
|
49
|
+
(e) => a.operation[e] ?? []
|
|
50
|
+
)), f = m(
|
|
51
|
+
() => G(g.value, a.allowedClients)
|
|
52
|
+
), r = S(
|
|
53
|
+
$(f.value, a.selectedClient)
|
|
52
54
|
);
|
|
53
55
|
j(
|
|
54
|
-
() =>
|
|
55
|
-
(
|
|
56
|
-
const
|
|
57
|
-
|
|
56
|
+
() => a.selectedClient,
|
|
57
|
+
(t) => {
|
|
58
|
+
const e = $(f.value, t);
|
|
59
|
+
e && (r.value = e);
|
|
58
60
|
}
|
|
59
61
|
);
|
|
60
|
-
const
|
|
61
|
-
var
|
|
62
|
+
const E = m(() => {
|
|
63
|
+
var t;
|
|
62
64
|
try {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
65
|
+
if (r.value.id.startsWith("custom"))
|
|
66
|
+
return ((t = g.value.find(
|
|
67
|
+
(d) => J(d) === r.value.id
|
|
68
|
+
)) == null ? void 0 : t.source) ?? "Custom example not found";
|
|
69
|
+
const e = c.value[C.value || ""], s = (e == null ? void 0 : e.value) ?? (e == null ? void 0 : e.summary);
|
|
70
|
+
return P({
|
|
71
|
+
clientId: r.value.id,
|
|
72
|
+
operation: a.operation,
|
|
73
|
+
method: a.method,
|
|
74
|
+
server: a.selectedServer,
|
|
75
|
+
securitySchemes: a.securitySchemes,
|
|
76
|
+
contentType: a.selectedContentType,
|
|
77
|
+
path: a.path,
|
|
78
|
+
example: s
|
|
74
79
|
});
|
|
75
|
-
} catch (
|
|
76
|
-
return console.error("[generateSnippet]",
|
|
80
|
+
} catch (e) {
|
|
81
|
+
return console.error("[generateSnippet]", e), "";
|
|
77
82
|
}
|
|
78
|
-
}), T =
|
|
79
|
-
var
|
|
80
|
-
if (
|
|
81
|
-
const
|
|
83
|
+
}), T = m(() => Q(a.securitySchemes)), i = S(null), L = (t) => {
|
|
84
|
+
var e;
|
|
85
|
+
if (i.value) {
|
|
86
|
+
const s = W(i.value.$el);
|
|
82
87
|
setTimeout(() => {
|
|
83
|
-
|
|
88
|
+
s();
|
|
84
89
|
}, 300);
|
|
85
90
|
}
|
|
86
|
-
|
|
87
|
-
(
|
|
91
|
+
r.value = t, t.id.startsWith("custom") || V(
|
|
92
|
+
(e = i.value) == null ? void 0 : e.$el,
|
|
88
93
|
"scalar-update-selected-client",
|
|
89
|
-
|
|
94
|
+
t.id
|
|
90
95
|
);
|
|
91
|
-
},
|
|
92
|
-
return (
|
|
93
|
-
key: 0,
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
_: 2
|
|
113
|
-
}, [
|
|
114
|
-
e.hideClientSelector ? void 0 : {
|
|
115
|
-
name: "actions",
|
|
116
|
-
fn: s(() => [
|
|
117
|
-
o(a(K), {
|
|
118
|
-
class: "max-h-80",
|
|
119
|
-
modelValue: n.value,
|
|
120
|
-
options: f.value,
|
|
121
|
-
teleport: "",
|
|
122
|
-
placement: "bottom-end",
|
|
123
|
-
"onUpdate:modelValue": t[0] || (t[0] = (r) => w(r))
|
|
124
|
-
}, {
|
|
125
|
-
default: s(() => [
|
|
126
|
-
o(a(M), {
|
|
127
|
-
"data-testid": "client-picker",
|
|
128
|
-
class: "text-c-1 hover:bg-b-3 flex h-full w-fit gap-1.5 px-1.5 py-0.75 font-normal",
|
|
129
|
-
fullWidth: "",
|
|
130
|
-
variant: "ghost"
|
|
131
|
-
}, {
|
|
132
|
-
default: s(() => [
|
|
133
|
-
p("span", null, R(n.value.title), 1),
|
|
134
|
-
o(a(F))
|
|
135
|
-
]),
|
|
136
|
-
_: 1
|
|
137
|
-
})
|
|
138
|
-
]),
|
|
139
|
-
_: 1
|
|
140
|
-
}, 8, ["modelValue", "options"])
|
|
141
|
-
]),
|
|
142
|
-
key: "0"
|
|
143
|
-
}
|
|
144
|
-
]), 1024),
|
|
145
|
-
o(a(q), { class: "request-editor-section custom-scroll p-0" }, {
|
|
146
|
-
default: s(() => [
|
|
147
|
-
p("div", {
|
|
148
|
-
id: `${a(L)}-example`,
|
|
149
|
-
class: "code-snippet"
|
|
150
|
-
}, [
|
|
151
|
-
o(a(W), {
|
|
152
|
-
class: "bg-b-2 !min-h-full -outline-offset-2",
|
|
153
|
-
content: V.value,
|
|
154
|
-
hideCredentials: T.value,
|
|
155
|
-
lang: n.value.lang,
|
|
156
|
-
lineNumbers: ""
|
|
157
|
-
}, null, 8, ["content", "hideCredentials", "lang"])
|
|
158
|
-
], 8, Y)
|
|
159
|
-
]),
|
|
160
|
-
_: 1
|
|
161
|
-
}),
|
|
162
|
-
Object.keys(d.value).length || e.$slots.footer ? (m(), y(a(z), {
|
|
163
|
-
key: 0,
|
|
164
|
-
class: "request-card-footer bg-b-3"
|
|
165
|
-
}, {
|
|
166
|
-
default: s(() => [
|
|
167
|
-
Object.keys(d.value).length ? (m(), b("div", Z, [
|
|
168
|
-
o(Q, {
|
|
169
|
-
examples: d.value,
|
|
170
|
-
modelValue: h.value,
|
|
171
|
-
"onUpdate:modelValue": [
|
|
172
|
-
t[1] || (t[1] = (r) => h.value = r),
|
|
173
|
-
t[2] || (t[2] = (r) => {
|
|
174
|
-
var c;
|
|
175
|
-
return a(B)((c = u.value) == null ? void 0 : c.$el, "scalar-update-selected-example", r);
|
|
176
|
-
})
|
|
177
|
-
]
|
|
178
|
-
}, null, 8, ["examples", "modelValue"])
|
|
179
|
-
])) : S("", !0),
|
|
180
|
-
v(e.$slots, "footer", {}, void 0, !0)
|
|
181
|
-
]),
|
|
182
|
-
_: 3
|
|
183
|
-
})) : S("", !0)
|
|
184
|
-
]),
|
|
185
|
-
_: 3
|
|
186
|
-
}, 512)) : e.fallback ? (m(), y(a(x), {
|
|
187
|
-
key: 1,
|
|
188
|
-
class: "request-card dark-mode"
|
|
189
|
-
}, {
|
|
190
|
-
default: s(() => [
|
|
191
|
-
o(a(q), { class: "request-card-simple" }, {
|
|
192
|
-
default: s(() => [
|
|
193
|
-
p("div", _, [
|
|
194
|
-
o(a($), {
|
|
96
|
+
}, w = D();
|
|
97
|
+
return (t, e) => (u(), k(I, null, [
|
|
98
|
+
t.operation.externalDocs ? (u(), p(l(Y), { key: 0 }, {
|
|
99
|
+
default: n(() => [
|
|
100
|
+
o(l(Z), {
|
|
101
|
+
value: t.operation.externalDocs
|
|
102
|
+
}, null, 8, ["value"])
|
|
103
|
+
]),
|
|
104
|
+
_: 1
|
|
105
|
+
})) : v("", !0),
|
|
106
|
+
f.value.length ? (u(), p(l(x), {
|
|
107
|
+
key: 1,
|
|
108
|
+
class: "request-card dark-mode",
|
|
109
|
+
ref_key: "elem",
|
|
110
|
+
ref: i
|
|
111
|
+
}, {
|
|
112
|
+
default: n(() => [
|
|
113
|
+
o(l(z), { class: "pr-0.5" }, N({
|
|
114
|
+
default: n(() => [
|
|
115
|
+
e[3] || (e[3] = h("span", { class: "sr-only" }, "Request Example for", -1)),
|
|
116
|
+
o(l(B), {
|
|
195
117
|
as: "span",
|
|
196
118
|
class: "request-method",
|
|
197
|
-
method:
|
|
119
|
+
method: t.method
|
|
198
120
|
}, null, 8, ["method"]),
|
|
199
|
-
|
|
121
|
+
t.generateLabel ? (u(), k("span", {
|
|
122
|
+
key: 0,
|
|
123
|
+
innerHTML: t.generateLabel()
|
|
124
|
+
}, null, 8, _)) : y(t.$slots, "header", { key: 1 }, void 0, !0)
|
|
125
|
+
]),
|
|
126
|
+
_: 2
|
|
127
|
+
}, [
|
|
128
|
+
t.hideClientSelector ? void 0 : {
|
|
129
|
+
name: "actions",
|
|
130
|
+
fn: n(() => [
|
|
131
|
+
o(l(F), {
|
|
132
|
+
class: "max-h-80",
|
|
133
|
+
modelValue: r.value,
|
|
134
|
+
options: f.value,
|
|
135
|
+
teleport: "",
|
|
136
|
+
placement: "bottom-end",
|
|
137
|
+
"onUpdate:modelValue": e[0] || (e[0] = (s) => L(s))
|
|
138
|
+
}, {
|
|
139
|
+
default: n(() => [
|
|
140
|
+
o(l(H), {
|
|
141
|
+
"data-testid": "client-picker",
|
|
142
|
+
class: "text-c-2 hover:text-c-1 flex h-full w-fit gap-2 px-1",
|
|
143
|
+
fullWidth: "",
|
|
144
|
+
variant: "ghost"
|
|
145
|
+
}, {
|
|
146
|
+
default: n(() => [
|
|
147
|
+
h("span", ee, R(r.value.title), 1),
|
|
148
|
+
o(l(U), { class: "size-3.5" })
|
|
149
|
+
]),
|
|
150
|
+
_: 1
|
|
151
|
+
})
|
|
152
|
+
]),
|
|
153
|
+
_: 1
|
|
154
|
+
}, 8, ["modelValue", "options"])
|
|
155
|
+
]),
|
|
156
|
+
key: "0"
|
|
157
|
+
}
|
|
158
|
+
]), 1024),
|
|
159
|
+
o(l(q), { class: "request-editor-section custom-scroll p-0" }, {
|
|
160
|
+
default: n(() => [
|
|
161
|
+
h("div", {
|
|
162
|
+
id: `${l(w)}-example`,
|
|
163
|
+
class: "code-snippet"
|
|
164
|
+
}, [
|
|
165
|
+
o(l(K), {
|
|
166
|
+
class: "bg-b-2 !min-h-full -outline-offset-2",
|
|
167
|
+
content: E.value,
|
|
168
|
+
hideCredentials: T.value,
|
|
169
|
+
lang: r.value.lang,
|
|
170
|
+
lineNumbers: ""
|
|
171
|
+
}, null, 8, ["content", "hideCredentials", "lang"])
|
|
172
|
+
], 8, te)
|
|
173
|
+
]),
|
|
174
|
+
_: 1
|
|
175
|
+
}),
|
|
176
|
+
Object.keys(c.value).length || t.$slots.footer ? (u(), p(l(M), {
|
|
177
|
+
key: 0,
|
|
178
|
+
class: "request-card-footer bg-b-3"
|
|
179
|
+
}, {
|
|
180
|
+
default: n(() => [
|
|
181
|
+
Object.keys(c.value).length ? (u(), k("div", le, [
|
|
182
|
+
o(X, {
|
|
183
|
+
examples: c.value,
|
|
184
|
+
modelValue: C.value,
|
|
185
|
+
"onUpdate:modelValue": [
|
|
186
|
+
e[1] || (e[1] = (s) => C.value = s),
|
|
187
|
+
e[2] || (e[2] = (s) => {
|
|
188
|
+
var d;
|
|
189
|
+
return l(V)((d = i.value) == null ? void 0 : d.$el, "scalar-update-selected-example", s);
|
|
190
|
+
})
|
|
191
|
+
]
|
|
192
|
+
}, null, 8, ["examples", "modelValue"])
|
|
193
|
+
])) : v("", !0),
|
|
194
|
+
y(t.$slots, "footer", {}, void 0, !0)
|
|
195
|
+
]),
|
|
196
|
+
_: 3
|
|
197
|
+
})) : v("", !0)
|
|
198
|
+
]),
|
|
199
|
+
_: 3
|
|
200
|
+
}, 512)) : t.fallback ? (u(), p(l(x), {
|
|
201
|
+
key: 2,
|
|
202
|
+
class: "request-card dark-mode"
|
|
203
|
+
}, {
|
|
204
|
+
default: n(() => [
|
|
205
|
+
o(l(q), { class: "request-card-simple" }, {
|
|
206
|
+
default: n(() => [
|
|
207
|
+
h("div", ae, [
|
|
208
|
+
o(l(B), {
|
|
209
|
+
as: "span",
|
|
210
|
+
class: "request-method",
|
|
211
|
+
method: t.method
|
|
212
|
+
}, null, 8, ["method"]),
|
|
213
|
+
y(t.$slots, "header", {}, void 0, !0)
|
|
214
|
+
]),
|
|
215
|
+
y(t.$slots, "footer", {}, void 0, !0)
|
|
200
216
|
]),
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
})) : S("", !0);
|
|
217
|
+
_: 3
|
|
218
|
+
})
|
|
219
|
+
]),
|
|
220
|
+
_: 3
|
|
221
|
+
})) : v("", !0)
|
|
222
|
+
], 64));
|
|
208
223
|
}
|
|
209
224
|
});
|
|
210
225
|
export {
|
|
211
|
-
|
|
226
|
+
Se as default
|
|
212
227
|
};
|
package/package.json
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"vue",
|
|
21
21
|
"vue3"
|
|
22
22
|
],
|
|
23
|
-
"version": "1.32.
|
|
23
|
+
"version": "1.32.10",
|
|
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.
|
|
57
|
+
"@scalar/api-client": "2.5.19",
|
|
58
58
|
"@scalar/code-highlight": "0.1.8",
|
|
59
|
-
"@scalar/components": "0.14.
|
|
59
|
+
"@scalar/components": "0.14.20",
|
|
60
|
+
"@scalar/helpers": "0.0.6",
|
|
60
61
|
"@scalar/icons": "0.4.6",
|
|
62
|
+
"@scalar/oas-utils": "0.4.15",
|
|
63
|
+
"@scalar/openapi-parser": "0.18.2",
|
|
61
64
|
"@scalar/object-utils": "1.2.2",
|
|
62
|
-
"@scalar/oas-utils": "0.4.14",
|
|
63
|
-
"@scalar/helpers": "0.0.6",
|
|
64
65
|
"@scalar/openapi-types": "0.3.6",
|
|
65
|
-
"@scalar/snippetz": "0.4.
|
|
66
|
-
"@scalar/
|
|
67
|
-
"@scalar/openapi-parser": "0.18.1",
|
|
66
|
+
"@scalar/snippetz": "0.4.3",
|
|
67
|
+
"@scalar/types": "0.2.10",
|
|
68
68
|
"@scalar/use-hooks": "0.2.4",
|
|
69
69
|
"@scalar/use-toasts": "0.8.0",
|
|
70
|
-
"@scalar/workspace-store": "0.10.
|
|
71
|
-
"@scalar/
|
|
70
|
+
"@scalar/workspace-store": "0.10.2",
|
|
71
|
+
"@scalar/themes": "0.13.11"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@tailwindcss/vite": "^4.1.7",
|
|
@@ -86,7 +86,7 @@
|
|
|
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/galaxy": "0.5.
|
|
89
|
+
"@scalar/galaxy": "0.5.5",
|
|
90
90
|
"@scalar/react-renderer": "0.2.1"
|
|
91
91
|
},
|
|
92
92
|
"scripts": {
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2023-present Scalar
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|