@scalar/api-client 2.21.1 → 2.22.0
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 +34 -0
- package/dist/components/OpenApiClientButton.vue.d.ts.map +1 -1
- package/dist/components/OpenApiClientButton.vue.js +2 -2
- package/dist/components/OpenApiClientButton.vue2.js +1 -1
- package/dist/hooks/useClientConfig.d.ts +9 -0
- package/dist/hooks/useClientConfig.d.ts.map +1 -1
- package/dist/layouts/App/create-api-client-app.d.ts +2 -2
- package/dist/layouts/Web/create-api-client-web.d.ts +2 -2
- package/dist/libs/create-client.d.ts +2 -2
- package/dist/store/request-example.d.ts +2 -2
- package/dist/store/store.d.ts +2 -2
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-block/helpers/get-example.d.ts +2 -2
- package/dist/v2/blocks/operation-block/helpers/get-example.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/get-example.js +29 -22
- package/dist/v2/blocks/operation-block/index.d.ts +1 -0
- package/dist/v2/blocks/operation-block/index.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/index.js +2 -0
- package/dist/v2/blocks/request-block/helpers/get-default-headers.js +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +3 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js +96 -78
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue3.js +5 -0
- package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
- package/dist/v2/features/modal/Modal.vue.js +2 -2
- package/dist/v2/features/modal/Modal.vue2.js +17 -15
- package/dist/v2/features/operation/Operation.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +2 -2
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +16 -16
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue2.js +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ExampleObject, ParameterObject, RequestBodyObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
1
|
+
import type { ExampleObject, MediaTypeObject, ParameterObject, RequestBodyObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
2
2
|
/**
|
|
3
3
|
* Resolve an example value for a parameter or requestBody from either `examples` or `content.*.examples`.
|
|
4
4
|
* Or the [deprecated] `example` field.
|
|
@@ -6,5 +6,5 @@ import type { ExampleObject, ParameterObject, RequestBodyObject } from '@scalar/
|
|
|
6
6
|
* `example` field.
|
|
7
7
|
* Used both for send-request and generating code snippets.
|
|
8
8
|
*/
|
|
9
|
-
export declare const getExample: (param: ParameterObject | RequestBodyObject, exampleKey: string | undefined, contentType: string | undefined) => ExampleObject | undefined;
|
|
9
|
+
export declare const getExample: (param: ParameterObject | RequestBodyObject | MediaTypeObject, exampleKey: string | undefined, contentType: string | undefined) => ExampleObject | undefined;
|
|
10
10
|
//# sourceMappingURL=get-example.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-example.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-block/helpers/get-example.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-example.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-block/helpers/get-example.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,eAAe,EACf,eAAe,EACf,iBAAiB,EAClB,MAAM,8DAA8D,CAAA;AA6BrE;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,GACrB,OAAO,eAAe,GAAG,iBAAiB,GAAG,eAAe,EAC5D,YAAY,MAAM,GAAG,SAAS,EAC9B,aAAa,MAAM,GAAG,SAAS,KAC9B,aAAa,GAAG,SA6ClB,CAAA"}
|
|
@@ -1,29 +1,36 @@
|
|
|
1
|
-
import { getResolvedRef as l } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
2
1
|
import { getResolvedRefDeep as s } from "../../operation-code-sample/helpers/get-resolved-ref-deep.js";
|
|
3
|
-
const
|
|
4
|
-
if (
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
const r = (t, n, o) => {
|
|
3
|
+
if (!t && !n)
|
|
4
|
+
return;
|
|
5
|
+
const i = o || Object.keys(t ?? {})[0] || "", e = s(t?.[i]);
|
|
6
|
+
if (e !== void 0)
|
|
7
|
+
return e;
|
|
8
|
+
if (!o && n !== void 0)
|
|
9
|
+
return { value: s(n) };
|
|
10
|
+
}, c = (t, n, o) => {
|
|
11
|
+
if ("content" in t) {
|
|
12
|
+
const e = t.content?.[o ?? Object.keys(t.content)[0] ?? ""], u = r(e?.examples, e?.example, n);
|
|
13
|
+
if (u !== void 0)
|
|
14
|
+
return u;
|
|
7
15
|
}
|
|
8
|
-
if ("examples" in
|
|
9
|
-
const
|
|
10
|
-
if (
|
|
11
|
-
return
|
|
12
|
-
if (!c && n.example)
|
|
13
|
-
return { value: s(n.example) };
|
|
16
|
+
if ("examples" in t || "example" in t) {
|
|
17
|
+
const e = r(t.examples, t.example, n);
|
|
18
|
+
if (e !== void 0)
|
|
19
|
+
return e;
|
|
14
20
|
}
|
|
15
|
-
const
|
|
16
|
-
if ("schema" in
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
const i = s(t);
|
|
22
|
+
if ("schema" in i && i.schema) {
|
|
23
|
+
const e = i.schema;
|
|
24
|
+
if ("default" in e && e.default !== void 0)
|
|
25
|
+
return { value: e.default };
|
|
26
|
+
if ("enum" in e && e.enum?.[0] !== void 0)
|
|
27
|
+
return { value: e.enum[0] };
|
|
28
|
+
if ("examples" in e && e.examples?.[0] !== void 0)
|
|
29
|
+
return { value: e.examples[0] };
|
|
30
|
+
if ("example" in e && e.example !== void 0)
|
|
31
|
+
return { value: e.example };
|
|
25
32
|
}
|
|
26
33
|
};
|
|
27
34
|
export {
|
|
28
|
-
|
|
35
|
+
c as getExample
|
|
29
36
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/operation-block/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AACrE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/operation-block/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAClD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { getSecuritySchemes as r } from "./helpers/build-request-security.js";
|
|
2
|
+
import { getExample as m } from "./helpers/get-example.js";
|
|
2
3
|
import { default as a } from "./OperationBlock.vue.js";
|
|
3
4
|
export {
|
|
4
5
|
a as OperationBlock,
|
|
6
|
+
m as getExample,
|
|
5
7
|
r as getSecuritySchemes
|
|
6
8
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { canMethodHaveBody as p } from "@scalar/helpers/http/can-method-have-body";
|
|
2
2
|
import { getResolvedRef as n } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
3
3
|
import { isElectron as u } from "../../../../libs/electron.js";
|
|
4
|
-
const i = "2.
|
|
4
|
+
const i = "2.22.0", m = "application/json", h = "*/*", c = (r, t, a) => ({
|
|
5
5
|
name: r,
|
|
6
6
|
defaultValue: t,
|
|
7
7
|
isOverridden: a.has(r.toLowerCase())
|
|
@@ -3,10 +3,11 @@ import { useLoadingState as L, ScalarButton as S } from "@scalar/components";
|
|
|
3
3
|
import { pkceOptions as P } from "@scalar/oas-utils/entities/spec";
|
|
4
4
|
import { useToasts as R } from "@scalar/use-toasts";
|
|
5
5
|
import F from "./OAuthScopesInput.vue.js";
|
|
6
|
+
/* empty css */
|
|
6
7
|
import { authorizeOauth2 as O } from "../helpers/oauth.js";
|
|
7
8
|
import m from "./RequestAuthDataTableInput.vue.js";
|
|
8
9
|
import u from "../../../../components/DataTable/DataTableRow.vue.js";
|
|
9
|
-
const A = { class: "flex h-8 items-center justify-end gap-2 border-t" }, I = { class: "flex h-8 w-full items-center justify-end border-t" },
|
|
10
|
+
const A = { class: "flex h-8 items-center justify-end gap-2 border-t" }, I = { class: "flex h-8 w-full items-center justify-end border-t" }, X = /* @__PURE__ */ b({
|
|
10
11
|
__name: "OAuth2",
|
|
11
12
|
props: {
|
|
12
13
|
environment: {},
|
|
@@ -275,5 +276,5 @@ const A = { class: "flex h-8 items-center justify-end gap-2 border-t" }, I = { c
|
|
|
275
276
|
}
|
|
276
277
|
});
|
|
277
278
|
export {
|
|
278
|
-
|
|
279
|
+
X as default
|
|
279
280
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OAuthScopesInput.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OAuthScopesInput.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue"],"names":[],"mappings":"AAwNA,OAAO,KAAK,EACV,SAAS,EACT,gBAAgB,EACjB,MAAM,8DAA8D,CAAA;AAWrE,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,gBAAgB,CAAA;IAChC,IAAI,EAAE,SAAS,CAAA;IACf,cAAc,EAAE,MAAM,EAAE,CAAA;CACzB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;AAibF,wBAOG"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as T, computed as
|
|
2
|
-
import { Disclosure as
|
|
3
|
-
import { useModal as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
const
|
|
9
|
-
class: "grid auto-rows-auto",
|
|
1
|
+
import { defineComponent as T, ref as z, computed as f, createBlock as u, openBlock as r, unref as s, withCtx as o, createElementVNode as a, createVNode as c, normalizeClass as B, toDisplayString as p, createCommentVNode as m, withModifiers as S, createTextVNode as x, createElementBlock as V, Fragment as N, renderList as M } from "vue";
|
|
2
|
+
import { Disclosure as E, DisclosureButton as I, DisclosurePanel as R } from "@headlessui/vue";
|
|
3
|
+
import { useModal as U, ScalarButton as v, ScalarIcon as P, ScalarSearchInput as F } from "@scalar/components";
|
|
4
|
+
import L from "./OAuthScopesAddModal.vue.js";
|
|
5
|
+
import A from "../../../../components/DataTable/DataTableCell.vue.js";
|
|
6
|
+
import Q from "../../../../components/DataTable/DataTableRow.vue.js";
|
|
7
|
+
import q from "../../../../components/DataTable/DataTableCheckbox.vue.js";
|
|
8
|
+
const G = { class: "flex h-fit w-full" }, H = { class: "flex-1" }, J = { class: "flex items-center gap-1.75" }, W = {
|
|
9
|
+
class: "grid max-h-40 auto-rows-auto overflow-x-hidden overflow-y-scroll",
|
|
10
10
|
style: { gridTemplateColumns: "1fr auto" }
|
|
11
|
-
},
|
|
11
|
+
}, X = { class: "font-code text-xs" }, Y = { key: 0 }, oe = /* @__PURE__ */ T({
|
|
12
12
|
__name: "OAuthScopesInput",
|
|
13
13
|
props: {
|
|
14
14
|
flowType: {},
|
|
@@ -16,111 +16,129 @@ const F = { class: "flex h-fit w-full" }, L = { class: "flex-1" }, q = { class:
|
|
|
16
16
|
selectedScopes: {}
|
|
17
17
|
},
|
|
18
18
|
emits: ["update:selectedScopes"],
|
|
19
|
-
setup(
|
|
20
|
-
const d =
|
|
21
|
-
() => Object.entries(
|
|
19
|
+
setup(l, { emit: $ }) {
|
|
20
|
+
const i = $, d = z(""), w = f(
|
|
21
|
+
() => Object.entries(l.flow?.scopes ?? {}).map(([n, e]) => ({
|
|
22
22
|
id: n,
|
|
23
23
|
label: n,
|
|
24
24
|
description: e
|
|
25
25
|
}))
|
|
26
|
-
),
|
|
27
|
-
|
|
26
|
+
), D = f(() => {
|
|
27
|
+
if (!d.value)
|
|
28
|
+
return w.value;
|
|
29
|
+
const n = new RegExp(
|
|
30
|
+
d.value.split("").map((e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join(".*"),
|
|
31
|
+
"i"
|
|
32
|
+
);
|
|
33
|
+
return w.value.filter(
|
|
34
|
+
({ label: e, description: t }) => n.test(`${e} ${t}`)
|
|
35
|
+
);
|
|
36
|
+
}), h = f(
|
|
37
|
+
() => l.selectedScopes.length === Object.keys(l.flow?.scopes ?? {}).length
|
|
28
38
|
);
|
|
29
|
-
function
|
|
39
|
+
function g(n, e) {
|
|
30
40
|
if (e)
|
|
31
|
-
return
|
|
32
|
-
scopes: Array.from(/* @__PURE__ */ new Set([...
|
|
41
|
+
return i("update:selectedScopes", {
|
|
42
|
+
scopes: Array.from(/* @__PURE__ */ new Set([...l.selectedScopes, n]))
|
|
33
43
|
});
|
|
34
|
-
|
|
35
|
-
scopes:
|
|
44
|
+
i("update:selectedScopes", {
|
|
45
|
+
scopes: l.selectedScopes.filter((t) => t !== n)
|
|
36
46
|
});
|
|
37
47
|
}
|
|
38
|
-
const
|
|
39
|
-
return (n, e) => (
|
|
40
|
-
default:
|
|
41
|
-
|
|
42
|
-
e[
|
|
43
|
-
c(s(
|
|
48
|
+
const O = () => i("update:selectedScopes", { scopes: Object.keys(l.flow?.scopes ?? {}) }), j = () => i("update:selectedScopes", { scopes: [] }), y = U();
|
|
49
|
+
return (n, e) => (r(), u(s(A), { class: "h-auto !max-h-[initial] min-h-8 items-center" }, {
|
|
50
|
+
default: o(() => [
|
|
51
|
+
a("div", G, [
|
|
52
|
+
e[7] || (e[7] = a("div", { class: "text-c-1 h-full items-center" }, null, -1)),
|
|
53
|
+
c(s(E), {
|
|
44
54
|
as: "div",
|
|
45
55
|
class: "bl flex w-full flex-col"
|
|
46
56
|
}, {
|
|
47
|
-
default:
|
|
48
|
-
c(s(
|
|
49
|
-
class:
|
|
57
|
+
default: o(() => [
|
|
58
|
+
c(s(I), {
|
|
59
|
+
class: B([
|
|
50
60
|
"group/scopes-accordion hover:text-c-1 flex h-auto min-h-8 cursor-pointer items-center gap-1.5 pr-2.25 pl-3 text-left",
|
|
51
|
-
(
|
|
61
|
+
(l.selectedScopes.length || 0) > 0 ? "text-c-1" : "text-c-3"
|
|
52
62
|
])
|
|
53
63
|
}, {
|
|
54
|
-
default:
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
c(s(
|
|
64
|
+
default: o(({ open: t }) => [
|
|
65
|
+
a("div", H, " Scopes Selected " + p(l.selectedScopes.length || 0) + " / " + p(Object.keys(l.flow?.scopes ?? {}).length || 0), 1),
|
|
66
|
+
a("div", J, [
|
|
67
|
+
c(s(v), {
|
|
58
68
|
class: "pr-0.75 pl-1 transition-none",
|
|
59
69
|
size: "sm",
|
|
60
70
|
variant: "ghost",
|
|
61
|
-
onClick: e[0] || (e[0] =
|
|
71
|
+
onClick: e[0] || (e[0] = S((k) => s(y).show(), ["stop"]))
|
|
62
72
|
}, {
|
|
63
|
-
default:
|
|
64
|
-
|
|
73
|
+
default: o(() => [...e[3] || (e[3] = [
|
|
74
|
+
x(" Add Scope ", -1)
|
|
65
75
|
])]),
|
|
66
76
|
_: 1
|
|
67
77
|
}),
|
|
68
|
-
|
|
78
|
+
h.value ? (r(), u(s(v), {
|
|
69
79
|
key: 0,
|
|
70
80
|
class: "pr-0.75 pl-1 transition-none",
|
|
71
81
|
size: "sm",
|
|
72
82
|
variant: "ghost",
|
|
73
|
-
onClick:
|
|
83
|
+
onClick: S(j, ["stop"])
|
|
74
84
|
}, {
|
|
75
|
-
default:
|
|
76
|
-
|
|
85
|
+
default: o(() => [...e[4] || (e[4] = [
|
|
86
|
+
x(" Deselect All ", -1)
|
|
77
87
|
])]),
|
|
78
88
|
_: 1
|
|
79
|
-
})) :
|
|
80
|
-
|
|
89
|
+
})) : m("", !0),
|
|
90
|
+
h.value ? m("", !0) : (r(), u(s(v), {
|
|
81
91
|
key: 1,
|
|
82
92
|
class: "pr-0.75 pl-1 transition-none",
|
|
83
93
|
size: "sm",
|
|
84
94
|
variant: "ghost",
|
|
85
|
-
onClick:
|
|
95
|
+
onClick: S(O, ["stop"])
|
|
86
96
|
}, {
|
|
87
|
-
default:
|
|
88
|
-
|
|
97
|
+
default: o(() => [...e[5] || (e[5] = [
|
|
98
|
+
x(" Select All ", -1)
|
|
89
99
|
])]),
|
|
90
100
|
_: 1
|
|
91
101
|
})),
|
|
92
|
-
c(s(
|
|
102
|
+
c(s(P), {
|
|
93
103
|
class: "text-c-3 group-hover/scopes-accordion:text-c-2",
|
|
94
|
-
icon:
|
|
104
|
+
icon: t ? "ChevronDown" : "ChevronRight",
|
|
95
105
|
size: "md"
|
|
96
106
|
}, null, 8, ["icon"])
|
|
97
107
|
])
|
|
98
108
|
]),
|
|
99
109
|
_: 1
|
|
100
110
|
}, 8, ["class"]),
|
|
101
|
-
c(s(
|
|
102
|
-
default:
|
|
103
|
-
|
|
104
|
-
(
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
},
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
111
|
+
c(s(R), { as: "template" }, {
|
|
112
|
+
default: o(() => [
|
|
113
|
+
a("div", null, [
|
|
114
|
+
c(s(F), {
|
|
115
|
+
modelValue: d.value,
|
|
116
|
+
"onUpdate:modelValue": e[1] || (e[1] = (t) => d.value = t),
|
|
117
|
+
class: "flex items-center text-xs"
|
|
118
|
+
}, null, 8, ["modelValue"]),
|
|
119
|
+
a("table", W, [
|
|
120
|
+
(r(!0), V(N, null, M(D.value, ({ id: t, label: k, description: b }) => (r(), u(s(Q), {
|
|
121
|
+
key: t,
|
|
122
|
+
class: "text-c-2",
|
|
123
|
+
onClick: (C) => g(t, !l.selectedScopes.includes(t))
|
|
124
|
+
}, {
|
|
125
|
+
default: o(() => [
|
|
126
|
+
c(s(A), { class: "no-scrollbar hover:text-c-1 box-border flex !max-h-[initial] w-full cursor-pointer items-center gap-1 overflow-x-scroll px-3 py-1.5 text-nowrap" }, {
|
|
127
|
+
default: o(() => [
|
|
128
|
+
a("span", X, p(k), 1),
|
|
129
|
+
e[6] || (e[6] = a("span", null, "–", -1)),
|
|
130
|
+
b ? (r(), V("span", Y, p(b), 1)) : m("", !0)
|
|
131
|
+
]),
|
|
132
|
+
_: 2
|
|
133
|
+
}, 1024),
|
|
134
|
+
c(s(q), {
|
|
135
|
+
modelValue: l.selectedScopes.includes(t),
|
|
136
|
+
"onUpdate:modelValue": (C) => g(t, C)
|
|
137
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
138
|
+
]),
|
|
139
|
+
_: 2
|
|
140
|
+
}, 1032, ["onClick"]))), 128))
|
|
141
|
+
])
|
|
124
142
|
])
|
|
125
143
|
]),
|
|
126
144
|
_: 1
|
|
@@ -129,12 +147,12 @@ const F = { class: "flex h-fit w-full" }, L = { class: "flex-1" }, q = { class:
|
|
|
129
147
|
_: 1
|
|
130
148
|
})
|
|
131
149
|
]),
|
|
132
|
-
c(
|
|
133
|
-
scopes: Object.keys(
|
|
134
|
-
state: s(
|
|
135
|
-
onSubmit: e[
|
|
136
|
-
scopes:
|
|
137
|
-
newScopePayload: { ...
|
|
150
|
+
c(L, {
|
|
151
|
+
scopes: Object.keys(l.flow.scopes ?? {}),
|
|
152
|
+
state: s(y),
|
|
153
|
+
onSubmit: e[2] || (e[2] = (t) => i("update:selectedScopes", {
|
|
154
|
+
scopes: l.selectedScopes,
|
|
155
|
+
newScopePayload: { ...t, flowType: l.flowType }
|
|
138
156
|
}))
|
|
139
157
|
}, null, 8, ["scopes", "state"])
|
|
140
158
|
]),
|
|
@@ -143,5 +161,5 @@ const F = { class: "flex h-fit w-full" }, L = { class: "flex-1" }, q = { class:
|
|
|
143
161
|
}
|
|
144
162
|
});
|
|
145
163
|
export {
|
|
146
|
-
|
|
164
|
+
oe as default
|
|
147
165
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/modal/Modal.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Modal.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/modal/Modal.vue"],"names":[],"mappings":"AAkZA,OAAO,EAGL,KAAK,UAAU,EAEhB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AACnE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAA;AAE/E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AAExE,OAAO,EASL,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACtB,MAAM,KAAK,CAAA;AAIZ,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,6CAA6C,CAAA;AAIxF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAKxD,MAAM,MAAM,UAAU,GAAG;IACvB,4DAA4D;IAC5D,cAAc,EAAE,cAAc,CAAA;IAC9B,qDAAqD;IACrD,QAAQ,EAAE,WAAW,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAA;IAC/C,iDAAiD;IACjD,IAAI,EAAE,WAAW,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IACrC,4CAA4C;IAC5C,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,mDAAmD;IACnD,MAAM,EAAE,WAAW,CAAC,UAAU,GAAG,SAAS,CAAC,CAAA;IAC3C,yDAAyD;IACzD,WAAW,EAAE,WAAW,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IAC5C,2CAA2C;IAC3C,UAAU,EAAE,UAAU,CAAA;IACtB,0DAA0D;IAC1D,YAAY,EAAE,qBAAqB,CAAA;IACnC,iDAAiD;IACjD,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,wDAAwD;IACxD,OAAO,EAAE,gBAAgB,CACvB,OAAO,CACL,IAAI,CACF,4BAA4B,EAC1B,gBAAgB,GAChB,eAAe,GACf,kBAAkB,GAClB,eAAe,GACf,SAAS,CACZ,CACF,CACF,CAAA;CACF,CAAA;AAED;;;;GAIG;;;;;AACH,wBA0WC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Modal.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-b54530a3"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as W, ref as w, useId as
|
|
1
|
+
import { defineComponent as W, ref as w, useId as D, watch as I, nextTick as N, onBeforeMount as E, onBeforeUnmount as F, computed as d, toValue as U, withDirectives as k, createElementBlock as u, openBlock as m, createElementVNode as s, unref as o, createVNode as l, withCtx as V, vShow as b } from "vue";
|
|
2
2
|
import { addScalarClassesToHeadless as A, ScalarTeleportRoot as $ } from "@scalar/components";
|
|
3
3
|
import { ScalarToasts as z } from "@scalar/use-toasts";
|
|
4
4
|
import { useFocusTrap as H } from "@vueuse/integrations/useFocusTrap";
|
|
@@ -44,20 +44,22 @@ const P = { class: "scalar scalar-app" }, J = { class: "scalar-container" }, Q =
|
|
|
44
44
|
modalState: e.modalState,
|
|
45
45
|
store: e.workspaceStore
|
|
46
46
|
}), j(e.eventBus, "modal");
|
|
47
|
-
const v = w(null), f =
|
|
47
|
+
const v = w(null), f = D(), { activate: y, deactivate: B } = H(v, {
|
|
48
48
|
allowOutsideClick: !0,
|
|
49
49
|
fallbackFocus: `#${f}`
|
|
50
50
|
}), S = () => {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
B(), e.eventBus.emit("operation:cancel:request"), e.workspaceStore.revertDocumentChanges(
|
|
52
|
+
e.document.value?.["x-scalar-navigation"]?.name ?? ""
|
|
53
|
+
);
|
|
54
|
+
}, g = q(() => typeof window < "u" ? window.document.body : null);
|
|
55
|
+
I(
|
|
54
56
|
() => e.modalState.open,
|
|
55
57
|
(a) => {
|
|
56
|
-
|
|
58
|
+
g.value = a, a ? y({ checkCanFocusTrap: () => N() }) : S();
|
|
57
59
|
}
|
|
58
60
|
), E(() => A()), F(() => S());
|
|
59
|
-
const
|
|
60
|
-
() => e.workspaceStore?.workspace?.["x-scalar-sidebar-width"] ??
|
|
61
|
+
const p = 288, c = d(
|
|
62
|
+
() => e.workspaceStore?.workspace?.["x-scalar-sidebar-width"] ?? p
|
|
61
63
|
), T = (a) => e.workspaceStore?.update("x-scalar-sidebar-width", a), h = d(
|
|
62
64
|
() => R(e.workspaceStore, e.document.value)
|
|
63
65
|
), C = d(
|
|
@@ -70,8 +72,8 @@ const P = { class: "scalar scalar-app" }, J = { class: "scalar-container" }, Q =
|
|
|
70
72
|
sidebarWidth: c,
|
|
71
73
|
environment: h
|
|
72
74
|
}), (a, t) => k((m(), u("div", P, [
|
|
73
|
-
|
|
74
|
-
|
|
75
|
+
s("div", J, [
|
|
76
|
+
s("div", {
|
|
75
77
|
id: o(f),
|
|
76
78
|
ref_key: "client",
|
|
77
79
|
ref: v,
|
|
@@ -87,13 +89,13 @@ const P = { class: "scalar scalar-app" }, J = { class: "scalar-container" }, Q =
|
|
|
87
89
|
e.document.value && e.path?.value && e.method?.value ? (m(), u("main", X, [
|
|
88
90
|
l(o(G), {
|
|
89
91
|
modelValue: n.value,
|
|
90
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
92
|
+
"onUpdate:modelValue": t[0] || (t[0] = (i) => n.value = i),
|
|
91
93
|
class: "absolute top-2 left-3 z-[10001]"
|
|
92
94
|
}, null, 8, ["modelValue"]),
|
|
93
95
|
k(l(o(K), {
|
|
94
96
|
sidebarWidth: c.value,
|
|
95
97
|
"onUpdate:sidebarWidth": [
|
|
96
|
-
t[1] || (t[1] = (
|
|
98
|
+
t[1] || (t[1] = (i) => c.value = i),
|
|
97
99
|
T
|
|
98
100
|
],
|
|
99
101
|
activeWorkspace: r,
|
|
@@ -125,15 +127,15 @@ const P = { class: "scalar scalar-app" }, J = { class: "scalar-container" }, Q =
|
|
|
125
127
|
workspaceStore: e.workspaceStore
|
|
126
128
|
}, null, 8, ["document", "documentSlug", "environment", "eventBus", "exampleName", "method", "options", "path", "plugins", "securitySchemes", "workspaceStore"])
|
|
127
129
|
])) : (m(), u("div", Y, [...t[3] || (t[3] = [
|
|
128
|
-
|
|
130
|
+
s("span", { class: "text-c-3" }, "No document selected", -1)
|
|
129
131
|
])]))
|
|
130
132
|
]),
|
|
131
133
|
_: 1
|
|
132
134
|
})
|
|
133
135
|
], 8, Q),
|
|
134
|
-
|
|
136
|
+
s("div", {
|
|
135
137
|
class: "scalar-app-exit",
|
|
136
|
-
onClick: t[2] || (t[2] = (
|
|
138
|
+
onClick: t[2] || (t[2] = (i) => e.modalState.hide())
|
|
137
139
|
})
|
|
138
140
|
])
|
|
139
141
|
], 512)), [
|
|
@@ -19,7 +19,7 @@ type __VLS_Props = {
|
|
|
19
19
|
label?: string;
|
|
20
20
|
};
|
|
21
21
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
22
|
-
updateRow: (idx: number, field: "
|
|
22
|
+
updateRow: (idx: number, field: "key" | "value", value: string) => any;
|
|
23
23
|
toggleRow: (idx: number, enabled: boolean) => any;
|
|
24
24
|
addRow: () => any;
|
|
25
25
|
deleteRow: (idx: number) => any;
|
|
@@ -28,7 +28,7 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
28
28
|
uploadFile: (idx: number) => any;
|
|
29
29
|
removeFile: (idx: number) => any;
|
|
30
30
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
31
|
-
onUpdateRow?: ((idx: number, field: "
|
|
31
|
+
onUpdateRow?: ((idx: number, field: "key" | "value", value: string) => any) | undefined;
|
|
32
32
|
onToggleRow?: ((idx: number, enabled: boolean) => any) | undefined;
|
|
33
33
|
onAddRow?: (() => any) | undefined;
|
|
34
34
|
onDeleteRow?: ((idx: number) => any) | undefined;
|
|
@@ -33,7 +33,7 @@ const W = { class: "flex-center relative flex flex-1 flex-col gap-6 p-2 capitali
|
|
|
33
33
|
}));
|
|
34
34
|
}, f = (u) => {
|
|
35
35
|
u?.createNew && g.name === "request" && p();
|
|
36
|
-
}, v = "2.
|
|
36
|
+
}, v = "2.22.0";
|
|
37
37
|
return q(() => a.hotKeys.on(f)), R(() => a.hotKeys.off(f)), (u, e) => (l(), n("div", W, [
|
|
38
38
|
s("div", {
|
|
39
39
|
class: y(["flex h-[calc(100%_-_50px)] flex-col items-center justify-center", {
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"rest",
|
|
19
19
|
"testing"
|
|
20
20
|
],
|
|
21
|
-
"version": "2.
|
|
21
|
+
"version": "2.22.0",
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=20"
|
|
24
24
|
},
|
|
@@ -318,34 +318,34 @@
|
|
|
318
318
|
"type-fest": "^5.3.1",
|
|
319
319
|
"vue": "^3.5.26",
|
|
320
320
|
"vue-router": "4.6.2",
|
|
321
|
-
"whatwg-mimetype": "
|
|
321
|
+
"whatwg-mimetype": "4.0.0",
|
|
322
322
|
"yaml": "^2.8.0",
|
|
323
323
|
"zod": "^4.3.5",
|
|
324
|
-
"@scalar/analytics-client": "1.0.1",
|
|
325
|
-
"@scalar/components": "0.16.32",
|
|
326
324
|
"@scalar/draggable": "0.3.0",
|
|
325
|
+
"@scalar/analytics-client": "1.0.1",
|
|
326
|
+
"@scalar/components": "0.17.0",
|
|
327
327
|
"@scalar/helpers": "0.2.9",
|
|
328
328
|
"@scalar/icons": "0.5.2",
|
|
329
329
|
"@scalar/import": "0.4.46",
|
|
330
330
|
"@scalar/json-magic": "0.9.4",
|
|
331
|
-
"@scalar/oas-utils": "0.6.
|
|
332
|
-
"@scalar/object-utils": "1.2.23",
|
|
331
|
+
"@scalar/oas-utils": "0.6.30",
|
|
333
332
|
"@scalar/openapi-parser": "0.24.5",
|
|
334
333
|
"@scalar/openapi-types": "0.5.3",
|
|
335
|
-
"@scalar/sidebar": "0.7.22",
|
|
336
334
|
"@scalar/postman-to-openapi": "0.4.1",
|
|
337
|
-
"@scalar/
|
|
338
|
-
"@scalar/
|
|
339
|
-
"@scalar/
|
|
340
|
-
"@scalar/
|
|
341
|
-
"@scalar/use-hooks": "0.3.6",
|
|
335
|
+
"@scalar/object-utils": "1.2.23",
|
|
336
|
+
"@scalar/sidebar": "0.7.23",
|
|
337
|
+
"@scalar/types": "0.6.0",
|
|
338
|
+
"@scalar/snippetz": "0.6.9",
|
|
342
339
|
"@scalar/use-toasts": "0.9.1",
|
|
343
|
-
"@scalar/
|
|
340
|
+
"@scalar/themes": "0.14.0",
|
|
341
|
+
"@scalar/use-codemirror": "0.13.27",
|
|
342
|
+
"@scalar/workspace-store": "0.27.2",
|
|
343
|
+
"@scalar/use-hooks": "0.3.6"
|
|
344
344
|
},
|
|
345
345
|
"devDependencies": {
|
|
346
346
|
"@tailwindcss/vite": "^4.1.18",
|
|
347
347
|
"@types/shell-quote": "^1.7.5",
|
|
348
|
-
"@types/whatwg-mimetype": "
|
|
348
|
+
"@types/whatwg-mimetype": "3.0.2",
|
|
349
349
|
"@vitejs/plugin-vue": "^6.0.3",
|
|
350
350
|
"@vue/test-utils": "2.4.6",
|
|
351
351
|
"fake-indexeddb": "6.2.3",
|
|
@@ -355,8 +355,8 @@
|
|
|
355
355
|
"vite": "^7.3.1",
|
|
356
356
|
"vite-svg-loader": "5.1.0",
|
|
357
357
|
"vitest": "4.0.16",
|
|
358
|
-
"@scalar/
|
|
359
|
-
"@scalar/
|
|
358
|
+
"@scalar/galaxy": "0.5.12",
|
|
359
|
+
"@scalar/build-tooling": "0.4.1"
|
|
360
360
|
},
|
|
361
361
|
"scripts": {
|
|
362
362
|
"build": "scalar-build-vite",
|