@scalar/api-client 2.2.4 → 2.2.7
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 +62 -0
- package/dist/components/AddressBar/AddressBar.vue.js +2 -2
- package/dist/components/AddressBar/AddressBar.vue2.js +1 -1
- package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarServer.vue.js +28 -28
- package/dist/components/CommandPalette/CommandPaletteExample.vue.js +1 -1
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +41 -41
- package/dist/components/CommandPalette/CommandPaletteServer.vue.js +2 -2
- package/dist/components/CommandPalette/CommandPaletteTag.vue.js +5 -5
- package/dist/components/DataTable/DataTableCheckbox.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableCheckbox.vue.js +5 -6
- package/dist/components/DataTable/DataTableInputSelect.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInputSelect.vue.js +8 -8
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +9 -10
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.js +2 -2
- package/dist/components/HttpMethod/HttpMethod.vue2.js +24 -25
- package/dist/components/HttpMethod/index.d.ts +0 -1
- package/dist/components/HttpMethod/index.d.ts.map +1 -1
- package/dist/components/HttpMethod/index.js +2 -4
- package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js +121 -103
- package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/WorkspaceSelector.vue.js +24 -26
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts +6 -0
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts.map +1 -1
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.js +28 -23
- package/dist/components/OpenApiClientButton.vue.d.ts +1 -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 +21 -15
- package/dist/components/Search/useSearch.d.ts.map +1 -1
- package/dist/components/Search/useSearch.js +45 -41
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +5 -6
- package/dist/layouts/App/create-api-client-app.d.ts +1 -0
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
- package/dist/layouts/Modal/ApiClientModal.vue2.js +28 -23
- package/dist/layouts/Modal/create-api-client-modal.d.ts +2 -0
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Web/create-api-client-web.d.ts +1 -0
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +3 -1
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +50 -48
- package/dist/store/store.d.ts +3 -1
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/store.js +47 -45
- package/dist/style.css +1 -1
- package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +18 -20
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +63 -60
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +20 -19
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +84 -86
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestBody.vue2.js +37 -36
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.js +3 -3
- package/dist/views/Request/RequestSidebar.vue2.js +60 -61
- package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
- package/dist/views/Request/RequestSidebarItem.vue2.js +187 -195
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue.js +3 -3
- package/dist/views/Request/RequestSubpageHeader.vue2.js +34 -36
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue2.js +5 -5
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +30 -25
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +41 -30
- package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +3 -5
- package/dist/views/Request/libs/live-sync.d.ts.map +1 -1
- package/dist/views/Request/libs/live-sync.js +77 -78
- package/dist/views/Request/libs/oauth2.d.ts +6 -2
- package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
- package/dist/views/Request/libs/oauth2.js +43 -37
- package/package.json +10 -11
- package/dist/components/HttpMethod/helpers.d.ts +0 -4
- package/dist/components/HttpMethod/helpers.d.ts.map +0 -1
- package/dist/components/HttpMethod/helpers.js +0 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HttpMethod.vue.d.ts","sourceRoot":"","sources":["../../../src/components/HttpMethod/HttpMethod.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"HttpMethod.vue.d.ts","sourceRoot":"","sources":["../../../src/components/HttpMethod/HttpMethod.vue"],"names":[],"mappings":"AAgGA,KAAK,WAAW,GAAG;IACf,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAC;;;;;;cAHW,OAAO;gBAEL,OAAO;;AAwIxB,wBAQG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./HttpMethod.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const _ = /* @__PURE__ */ o(t, [["__scopeId", "data-v-46723816"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
_ as default
|
|
7
7
|
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { defineComponent as g, computed as a, openBlock as c, createBlock as y, unref as t, withCtx as q, createElementVNode as
|
|
2
|
-
import { ScalarListbox as x } from "@scalar/components";
|
|
3
|
-
import { getHttpMethodInfo as
|
|
4
|
-
|
|
5
|
-
const L = /* @__PURE__ */ g({
|
|
1
|
+
import { defineComponent as g, computed as a, openBlock as c, createBlock as y, unref as t, withCtx as q, createElementVNode as l, normalizeClass as s, toDisplayString as p, createElementBlock as k } from "vue";
|
|
2
|
+
import { cva as w, ScalarListbox as x, cx as m } from "@scalar/components";
|
|
3
|
+
import { getHttpMethodInfo as f, REQUEST_METHODS as B } from "@scalar/oas-utils/helpers";
|
|
4
|
+
const H = /* @__PURE__ */ g({
|
|
6
5
|
__name: "HttpMethod",
|
|
7
6
|
props: {
|
|
8
7
|
isSquare: { type: Boolean, default: !1 },
|
|
@@ -11,14 +10,14 @@ const L = /* @__PURE__ */ g({
|
|
|
11
10
|
},
|
|
12
11
|
emits: ["change"],
|
|
13
12
|
setup(b, { emit: h }) {
|
|
14
|
-
const r = b, v = h, o = a(() =>
|
|
13
|
+
const r = b, v = h, o = a(() => f(r.method)), n = Object.entries(B).map(([e]) => ({
|
|
15
14
|
id: e,
|
|
16
|
-
label: e.
|
|
17
|
-
color:
|
|
18
|
-
})),
|
|
19
|
-
get: () =>
|
|
15
|
+
label: e.toUpperCase(),
|
|
16
|
+
color: f(e).color
|
|
17
|
+
})), i = a({
|
|
18
|
+
get: () => n.find(({ id: e }) => e === r.method),
|
|
20
19
|
set: (e) => (e == null ? void 0 : e.id) && v("change", e.id)
|
|
21
|
-
}), d =
|
|
20
|
+
}), d = w({
|
|
22
21
|
base: "text-center font-code text-3xs justify-center items-center flex",
|
|
23
22
|
variants: {
|
|
24
23
|
isSquare: {
|
|
@@ -26,38 +25,38 @@ const L = /* @__PURE__ */ g({
|
|
|
26
25
|
false: "rounded-full"
|
|
27
26
|
},
|
|
28
27
|
isEditable: {
|
|
29
|
-
true: "
|
|
30
|
-
false: "
|
|
28
|
+
true: "http-bg-gradient rounded-md border-1/2 border-r-1/2",
|
|
29
|
+
false: "cursor-auto"
|
|
31
30
|
}
|
|
32
31
|
}
|
|
33
32
|
}), E = a(() => o.value.short);
|
|
34
33
|
return (e, u) => e.isEditable ? (c(), y(t(x), {
|
|
35
34
|
key: 0,
|
|
36
|
-
modelValue:
|
|
37
|
-
"onUpdate:modelValue": u[0] || (u[0] = (S) =>
|
|
38
|
-
class: "mt-1 font-code text-sm
|
|
39
|
-
options: t(
|
|
35
|
+
modelValue: i.value,
|
|
36
|
+
"onUpdate:modelValue": u[0] || (u[0] = (S) => i.value = S),
|
|
37
|
+
class: "mt-1 font-code text-sm scalar-client",
|
|
38
|
+
options: t(n)
|
|
40
39
|
}, {
|
|
41
40
|
default: q(() => [
|
|
42
|
-
|
|
43
|
-
class:
|
|
41
|
+
l("div", {
|
|
42
|
+
class: s(["h-full", { "pointer-events-none": !e.isEditable }])
|
|
44
43
|
}, [
|
|
45
|
-
|
|
46
|
-
class:
|
|
44
|
+
l("button", {
|
|
45
|
+
class: s(["relative h-full", t(m)(t(d)({ isSquare: e.isSquare, isEditable: e.isEditable }), o.value.color)]),
|
|
47
46
|
type: "button"
|
|
48
47
|
}, [
|
|
49
|
-
|
|
48
|
+
l("span", null, p(E.value), 1)
|
|
50
49
|
], 2)
|
|
51
50
|
], 2)
|
|
52
51
|
]),
|
|
53
52
|
_: 1
|
|
54
|
-
}, 8, ["modelValue", "options"])) : (c(),
|
|
53
|
+
}, 8, ["modelValue", "options"])) : (c(), k("div", {
|
|
55
54
|
key: 1,
|
|
56
|
-
class:
|
|
55
|
+
class: s(["relative gap-1 whitespace-nowrap", t(m)(t(d)({ isSquare: e.isSquare, isEditable: e.isEditable }), o.value.color)]),
|
|
57
56
|
type: "button"
|
|
58
57
|
}, p(o.value.short), 3));
|
|
59
58
|
}
|
|
60
59
|
});
|
|
61
60
|
export {
|
|
62
|
-
|
|
61
|
+
H as default
|
|
63
62
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/HttpMethod/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/HttpMethod/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImportCollectionModal.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/ImportCollectionModal.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ImportCollectionModal.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/ImportCollectionModal.vue"],"names":[],"mappings":"AA4ZA,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,SAAS,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,IAAI,CAAA;CAC7C,CAAC;;;;;;AAodF,wBAQG"}
|
|
@@ -1,29 +1,34 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { useUrlPrefetcher as
|
|
8
|
-
import { getOpenApiDocumentVersion as
|
|
9
|
-
import { isDocument as
|
|
10
|
-
import { isUrl as
|
|
11
|
-
import { useActiveEntities as
|
|
12
|
-
import { useModal as
|
|
13
|
-
import { isLocalUrl as
|
|
14
|
-
import { normalize as
|
|
15
|
-
import { getThemeStyles as
|
|
16
|
-
import {
|
|
17
|
-
|
|
1
|
+
import { defineComponent as H, ref as W, computed as c, watch as _, onMounted as K, onUnmounted as G, openBlock as l, createBlock as J, unref as i, withCtx as Q, createElementBlock as a, createCommentVNode as m, createElementVNode as e, normalizeClass as X, Fragment as g, createVNode as d, toDisplayString as Y, createTextVNode as M } from "vue";
|
|
2
|
+
import Z from "../CommandPalette/WatchModeToggle.vue.js";
|
|
3
|
+
import ee from "./ImportNowButton.vue.js";
|
|
4
|
+
import te from "./IntegrationLogo.vue.js";
|
|
5
|
+
import oe from "./PrefetchError.vue.js";
|
|
6
|
+
import se from "./WorkspaceSelector.vue.js";
|
|
7
|
+
import { useUrlPrefetcher as ne } from "./hooks/useUrlPrefetcher.js";
|
|
8
|
+
import { getOpenApiDocumentVersion as U } from "./utils/getOpenApiDocumentVersion.js";
|
|
9
|
+
import { isDocument as A } from "./utils/isDocument.js";
|
|
10
|
+
import { isUrl as C } from "./utils/isUrl.js";
|
|
11
|
+
import { useActiveEntities as re } from "../../store/active-entities.js";
|
|
12
|
+
import { useModal as ie, ScalarModal as le, ScalarIcon as ce } from "@scalar/components";
|
|
13
|
+
import { isLocalUrl as ae } from "@scalar/oas-utils/helpers";
|
|
14
|
+
import { normalize as de } from "@scalar/openapi-parser";
|
|
15
|
+
import { getThemeStyles as me } from "@scalar/themes";
|
|
16
|
+
import { useColorMode as ue } from "@scalar/use-hooks/useColorMode";
|
|
17
|
+
import { useRouter as pe } from "vue-router";
|
|
18
|
+
import { useWorkspace as fe } from "../../store/store.js";
|
|
19
|
+
const ve = ["innerHTML"], he = { class: "flex flex-col h-screen justify-center px-6 overflow-hidden relative md:px-0" }, xe = {
|
|
18
20
|
key: 0,
|
|
19
21
|
class: "flex justify-center items-center mb-2 p-1"
|
|
20
|
-
},
|
|
22
|
+
}, ye = { class: "rounded-xl size-10" }, _e = ["src"], ge = {
|
|
23
|
+
key: 2,
|
|
24
|
+
class: "text-center text-md font-bold mb-2 line-clamp-1"
|
|
25
|
+
}, be = { class: "inline-flex flex-col gap-2 items-center z-10 w-full" }, we = { class: "flex justify-center" }, ke = { class: "inline-flex py-1 px-4 items-center text-xs font-medium text-c-3" }, Ie = {
|
|
21
26
|
key: 0,
|
|
22
27
|
class: "text-sm overflow-hidden mt-5 pt-4 border-t-1/2"
|
|
23
|
-
},
|
|
28
|
+
}, Le = { class: "flex items-center justify-center" }, Me = { class: "flex flex-col justify-center items-center pb-8" }, Ue = { class: "text-center flex items-center flex-col" }, Ae = { class: "mb-2 w-10 h-10 border rounded-[10px] flex items-center justify-center" }, Ce = {
|
|
24
29
|
href: "https://scalar.com/download",
|
|
25
30
|
target: "_blank"
|
|
26
|
-
},
|
|
31
|
+
}, Ge = /* @__PURE__ */ H({
|
|
27
32
|
__name: "ImportCollectionModal",
|
|
28
33
|
props: {
|
|
29
34
|
source: {},
|
|
@@ -31,83 +36,91 @@ const ae = ["innerHTML"], de = { class: "flex flex-col h-screen justify-center p
|
|
|
31
36
|
eventType: {}
|
|
32
37
|
},
|
|
33
38
|
emits: ["importFinished"],
|
|
34
|
-
setup(T, { emit:
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
const
|
|
39
|
+
setup(T, { emit: P }) {
|
|
40
|
+
const s = T, D = P, { activeWorkspace: u } = re(), { workspaceMutators: V, events: j } = fe(), { prefetchResult: n, prefetchUrl: b, resetPrefetchResult: S } = ne(), r = ie(), f = W(!0);
|
|
41
|
+
j.hotKeys.on(() => r.hide());
|
|
42
|
+
const z = c(() => {
|
|
38
43
|
try {
|
|
39
|
-
return
|
|
40
|
-
n.content ||
|
|
44
|
+
return de(
|
|
45
|
+
n.content || s.source || ""
|
|
41
46
|
);
|
|
42
47
|
} catch {
|
|
43
48
|
return;
|
|
44
49
|
}
|
|
45
|
-
}),
|
|
46
|
-
var
|
|
47
|
-
return (t = (
|
|
48
|
-
}),
|
|
49
|
-
() =>
|
|
50
|
-
)
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
50
|
+
}), N = c(() => {
|
|
51
|
+
var o, t;
|
|
52
|
+
return (t = (o = z.value) == null ? void 0 : o.info) == null ? void 0 : t.title;
|
|
53
|
+
}), w = c(
|
|
54
|
+
() => U(n.content || s.source || "")
|
|
55
|
+
), { darkLightMode: O } = ue(), { currentRoute: $ } = pe(), v = c(() => {
|
|
56
|
+
try {
|
|
57
|
+
const o = $.value.query, t = O.value === "dark" ? o.dark_logo : o.light_logo;
|
|
58
|
+
if (t) return decodeURIComponent(t);
|
|
59
|
+
} catch {
|
|
60
|
+
}
|
|
61
|
+
return null;
|
|
62
|
+
});
|
|
63
|
+
_(
|
|
64
|
+
() => s.source,
|
|
65
|
+
async (o) => {
|
|
66
|
+
var t;
|
|
67
|
+
if (S(), C(o)) {
|
|
68
|
+
if (s.eventType && ["paste", "drop"].includes(s.eventType)) {
|
|
69
|
+
const { error: p } = await b(
|
|
70
|
+
o,
|
|
71
|
+
(t = u.value) == null ? void 0 : t.proxyUrl
|
|
59
72
|
);
|
|
60
|
-
|
|
73
|
+
p ? r.hide() : r.show();
|
|
61
74
|
return;
|
|
62
75
|
}
|
|
63
|
-
|
|
76
|
+
b(o, u.value.proxyUrl), r.show();
|
|
64
77
|
return;
|
|
65
78
|
}
|
|
66
|
-
|
|
79
|
+
o && A(o) && U(o) ? r.show() : r.hide();
|
|
67
80
|
}
|
|
68
81
|
);
|
|
69
|
-
const
|
|
70
|
-
document.body.classList.remove("has-no-import-url"), (
|
|
71
|
-
},
|
|
82
|
+
const E = c(() => !!s.source && C(s.source)), F = c(() => !!s.source && A(s.source)), h = c(() => n.url && ae(n.url)), x = (o) => {
|
|
83
|
+
document.body.classList.remove("has-no-import-url"), (E.value || F.value) && r.open ? document.body.classList.add("has-import-url") : document.body.classList.remove("has-import-url");
|
|
84
|
+
}, R = () => {
|
|
72
85
|
document.body.classList.remove("has-import-url"), document.body.classList.add("has-no-import-url");
|
|
73
86
|
};
|
|
74
|
-
|
|
75
|
-
() =>
|
|
76
|
-
(
|
|
77
|
-
|
|
87
|
+
_(
|
|
88
|
+
() => r.open,
|
|
89
|
+
(o) => {
|
|
90
|
+
o ? x() : R();
|
|
78
91
|
}
|
|
79
|
-
),
|
|
80
|
-
() =>
|
|
92
|
+
), _(
|
|
93
|
+
() => s.source,
|
|
81
94
|
() => {
|
|
82
|
-
|
|
95
|
+
x();
|
|
83
96
|
}
|
|
84
|
-
),
|
|
85
|
-
|
|
86
|
-
}),
|
|
97
|
+
), K(() => {
|
|
98
|
+
x();
|
|
99
|
+
}), G(() => {
|
|
87
100
|
document.body.classList.remove("has-import-url"), document.body.classList.remove("has-no-import-url");
|
|
88
101
|
});
|
|
89
|
-
const
|
|
90
|
-
() =>
|
|
102
|
+
const k = c(
|
|
103
|
+
() => u.value && h.value && s.integration && `<style>${me(s.integration)}</style>`
|
|
91
104
|
);
|
|
92
|
-
function
|
|
93
|
-
|
|
94
|
-
|
|
105
|
+
function q() {
|
|
106
|
+
h.value && s.integration && V.edit(
|
|
107
|
+
u.value.uid,
|
|
95
108
|
"themeId",
|
|
96
|
-
|
|
97
|
-
),
|
|
109
|
+
s.integration
|
|
110
|
+
), D("importFinished");
|
|
98
111
|
}
|
|
99
|
-
return (
|
|
112
|
+
return (o, t) => (l(), J(i(le), {
|
|
100
113
|
size: "full",
|
|
101
|
-
state: r
|
|
114
|
+
state: i(r)
|
|
102
115
|
}, {
|
|
103
|
-
default:
|
|
104
|
-
var
|
|
116
|
+
default: Q(() => {
|
|
117
|
+
var y, p, I, L;
|
|
105
118
|
return [
|
|
106
|
-
|
|
119
|
+
k.value ? (l(), a("div", {
|
|
107
120
|
key: 0,
|
|
108
|
-
innerHTML:
|
|
109
|
-
}, null, 8,
|
|
110
|
-
e("div",
|
|
121
|
+
innerHTML: k.value
|
|
122
|
+
}, null, 8, ve)) : m("", !0),
|
|
123
|
+
e("div", he, [
|
|
111
124
|
t[6] || (t[6] = e("div", { class: "section-flare" }, [
|
|
112
125
|
e("div", { class: "section-flare-item" }),
|
|
113
126
|
e("div", { class: "section-flare-item" }),
|
|
@@ -119,54 +132,59 @@ const ae = ["innerHTML"], de = { class: "flex flex-col h-screen justify-center p
|
|
|
119
132
|
e("div", { class: "section-flare-item" })
|
|
120
133
|
], -1)),
|
|
121
134
|
e("div", {
|
|
122
|
-
class:
|
|
135
|
+
class: X(["flex items-center flex-col m-auto px-8 py-8 rounded-xl border-1/2 max-w-[380px] w-full transition-opacity", { "opacity-0": i(n).state === "loading" }])
|
|
123
136
|
}, [
|
|
124
|
-
|
|
137
|
+
i(n).error && i(n).state === "idle" && !w.value ? (l(), a(g, { key: 0 }, [
|
|
125
138
|
t[1] || (t[1] = e("div", { class: "text-center text-md font-bold mb-2 line-clamp-1" }, " No OpenAPI document found ", -1)),
|
|
126
|
-
d(
|
|
127
|
-
url: ((
|
|
139
|
+
d(oe, {
|
|
140
|
+
url: ((y = i(n)) == null ? void 0 : y.input) || s.source
|
|
128
141
|
}, null, 8, ["url"])
|
|
129
|
-
], 64)) : (
|
|
130
|
-
|
|
131
|
-
e("div",
|
|
132
|
-
d(
|
|
142
|
+
], 64)) : (l(), a(g, { key: 1 }, [
|
|
143
|
+
h.value ? (l(), a("div", xe, [
|
|
144
|
+
e("div", ye, [
|
|
145
|
+
d(te, { integration: o.integration }, null, 8, ["integration"])
|
|
133
146
|
])
|
|
134
|
-
])) :
|
|
135
|
-
|
|
147
|
+
])) : v.value ? (l(), a("img", {
|
|
148
|
+
key: 1,
|
|
149
|
+
alt: "Logo",
|
|
150
|
+
class: "w-full object-contain mb-2",
|
|
151
|
+
src: v.value
|
|
152
|
+
}, null, 8, _e)) : m("", !0),
|
|
153
|
+
v.value ? m("", !0) : (l(), a("div", ge, Y(N.value || "Untitled Collection"), 1)),
|
|
136
154
|
t[4] || (t[4] = e("div", { class: "text-c-1 text-sm font-medium text-center text-balance" }, " Import the OpenAPI document to instantly send API requests. No signup required. ", -1)),
|
|
137
|
-
|
|
138
|
-
e("div",
|
|
139
|
-
d(
|
|
140
|
-
source: ((
|
|
155
|
+
w.value ? (l(), a(g, { key: 3 }, [
|
|
156
|
+
e("div", be, [
|
|
157
|
+
d(ee, {
|
|
158
|
+
source: ((p = i(n)) == null ? void 0 : p.url) ?? ((I = i(n)) == null ? void 0 : I.content) ?? o.source,
|
|
141
159
|
variant: "button",
|
|
142
160
|
watchMode: f.value,
|
|
143
|
-
onImportFinished:
|
|
161
|
+
onImportFinished: q
|
|
144
162
|
}, null, 8, ["source", "watchMode"])
|
|
145
163
|
]),
|
|
146
|
-
e("div",
|
|
147
|
-
e("div",
|
|
148
|
-
t[2] || (t[2] =
|
|
149
|
-
d(
|
|
164
|
+
e("div", we, [
|
|
165
|
+
e("div", ke, [
|
|
166
|
+
t[2] || (t[2] = M(" Import to: ")),
|
|
167
|
+
d(se)
|
|
150
168
|
])
|
|
151
169
|
]),
|
|
152
|
-
(
|
|
153
|
-
e("div",
|
|
154
|
-
d(
|
|
170
|
+
(L = i(n)) != null && L.url ? (l(), a("div", Ie, [
|
|
171
|
+
e("div", Le, [
|
|
172
|
+
d(Z, {
|
|
155
173
|
modelValue: f.value,
|
|
156
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
174
|
+
"onUpdate:modelValue": t[0] || (t[0] = (B) => f.value = B),
|
|
157
175
|
disableToolTip: !0
|
|
158
176
|
}, null, 8, ["modelValue"])
|
|
159
177
|
]),
|
|
160
178
|
t[3] || (t[3] = e("div", { class: "pt-0 text-center text-balance font-medium text-xs text-c-3" }, " Automatically update your API client when the OpenAPI document content changes. ", -1))
|
|
161
|
-
])) :
|
|
162
|
-
], 64)) :
|
|
179
|
+
])) : m("", !0)
|
|
180
|
+
], 64)) : m("", !0)
|
|
163
181
|
], 64))
|
|
164
182
|
], 2),
|
|
165
|
-
e("div",
|
|
166
|
-
e("div",
|
|
167
|
-
e("div",
|
|
168
|
-
e("a",
|
|
169
|
-
d(
|
|
183
|
+
e("div", Me, [
|
|
184
|
+
e("div", Ue, [
|
|
185
|
+
e("div", Ae, [
|
|
186
|
+
e("a", Ce, [
|
|
187
|
+
d(i(ce), {
|
|
170
188
|
icon: "Logo",
|
|
171
189
|
size: "xl"
|
|
172
190
|
})
|
|
@@ -179,7 +197,7 @@ const ae = ["innerHTML"], de = { class: "flex flex-col h-screen justify-center p
|
|
|
179
197
|
target: "_blank"
|
|
180
198
|
}, " Download Desktop App "),
|
|
181
199
|
e("br"),
|
|
182
|
-
|
|
200
|
+
M(" free · open-source · offline first ")
|
|
183
201
|
], -1))
|
|
184
202
|
])
|
|
185
203
|
])
|
|
@@ -191,5 +209,5 @@ const ae = ["innerHTML"], de = { class: "flex flex-col h-screen justify-center p
|
|
|
191
209
|
}
|
|
192
210
|
});
|
|
193
211
|
export {
|
|
194
|
-
|
|
212
|
+
Ge as default
|
|
195
213
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkspaceSelector.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/WorkspaceSelector.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"WorkspaceSelector.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/WorkspaceSelector.vue"],"names":[],"mappings":";AA2bA,wBAKG"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as y, ref as W, openBlock as
|
|
1
|
+
import { defineComponent as y, ref as W, openBlock as m, createElementBlock as x, Fragment as w, createElementVNode as t, createVNode as s, unref as e, withCtx as a, renderList as D, createBlock as N, withModifiers as k, normalizeClass as z, toDisplayString as v, withDirectives as M, vModelText as B, createTextVNode as V } from "vue";
|
|
2
2
|
import { useActiveEntities as j } from "../../store/active-entities.js";
|
|
3
|
-
import { useModal as E, ScalarDropdown as T, ScalarDropdownItem as
|
|
3
|
+
import { useModal as E, ScalarDropdown as T, ScalarDropdownItem as h, ScalarIcon as d, ScalarDropdownDivider as $, ScalarButton as _, ScalarModal as A } from "@scalar/components";
|
|
4
4
|
import { useToasts as I } from "@scalar/use-toasts";
|
|
5
5
|
import { useRouter as F } from "vue-router";
|
|
6
6
|
import { useWorkspace as L } from "../../store/store.js";
|
|
@@ -29,63 +29,61 @@ const P = { class: "flex items-center text-sm w-[inherit]" }, R = { class: "font
|
|
|
29
29
|
}
|
|
30
30
|
}), r.value = "", c.hide();
|
|
31
31
|
};
|
|
32
|
-
return (n,
|
|
32
|
+
return (n, o) => (m(), x(w, null, [
|
|
33
33
|
t("div", P, [
|
|
34
34
|
s(e(T), null, {
|
|
35
|
-
items:
|
|
36
|
-
(
|
|
35
|
+
items: a(() => [
|
|
36
|
+
(m(!0), x(w, null, D(e(b), (l, p) => (m(), N(e(h), {
|
|
37
37
|
key: p,
|
|
38
38
|
class: "flex gap-1.5 group/item items-center whitespace-nowrap text-ellipsis overflow-hidden w-full",
|
|
39
39
|
onClick: k((J) => C(p), ["stop"])
|
|
40
40
|
}, {
|
|
41
|
-
default:
|
|
41
|
+
default: a(() => [
|
|
42
42
|
t("div", {
|
|
43
|
-
class:
|
|
43
|
+
class: z([
|
|
44
44
|
"flex items-center justify-center rounded-full p-[3px] w-4 h-4",
|
|
45
45
|
e(i).uid === p ? "bg-c-accent text-b-1" : "group-hover/item:shadow-border text-transparent"
|
|
46
46
|
])
|
|
47
47
|
}, [
|
|
48
|
-
s(e(
|
|
48
|
+
s(e(d), {
|
|
49
49
|
class: "size-2.5",
|
|
50
50
|
icon: "Checkmark",
|
|
51
51
|
thickness: "3.5"
|
|
52
52
|
})
|
|
53
53
|
], 2),
|
|
54
|
-
t("span", q,
|
|
54
|
+
t("span", q, v(l.name), 1)
|
|
55
55
|
]),
|
|
56
56
|
_: 2
|
|
57
57
|
}, 1032, ["onClick"]))), 128)),
|
|
58
58
|
s(e($)),
|
|
59
|
-
s(e(
|
|
59
|
+
s(e(h), {
|
|
60
60
|
class: "flex items-center gap-1.5",
|
|
61
|
-
onClick:
|
|
61
|
+
onClick: o[0] || (o[0] = (l) => e(c).show())
|
|
62
62
|
}, {
|
|
63
|
-
default:
|
|
63
|
+
default: a(() => [
|
|
64
64
|
t("div", G, [
|
|
65
|
-
s(e(
|
|
66
|
-
class: "h-2.5",
|
|
65
|
+
s(e(d), {
|
|
67
66
|
icon: "Add",
|
|
68
|
-
|
|
67
|
+
size: "sm"
|
|
69
68
|
})
|
|
70
69
|
]),
|
|
71
|
-
|
|
70
|
+
o[2] || (o[2] = t("span", null, "New Workspace", -1))
|
|
72
71
|
]),
|
|
73
72
|
_: 1
|
|
74
73
|
})
|
|
75
74
|
]),
|
|
76
|
-
default:
|
|
75
|
+
default: a(() => [
|
|
77
76
|
s(e(_), {
|
|
78
77
|
class: "font-normal h-full justify-start line-clamp-1 py-1 px-1.5 text-c-1 hover:bg-b-2 w-fit text-c-3",
|
|
79
78
|
fullWidth: "",
|
|
80
79
|
variant: "ghost"
|
|
81
80
|
}, {
|
|
82
|
-
default:
|
|
81
|
+
default: a(() => [
|
|
83
82
|
t("div", R, [
|
|
84
|
-
t("h2", U,
|
|
85
|
-
s(e(
|
|
86
|
-
class: "size-3",
|
|
83
|
+
t("h2", U, v(e(i).name), 1),
|
|
84
|
+
s(e(d), {
|
|
87
85
|
icon: "ChevronDown",
|
|
88
|
-
|
|
86
|
+
size: "md"
|
|
89
87
|
})
|
|
90
88
|
])
|
|
91
89
|
]),
|
|
@@ -101,13 +99,13 @@ const P = { class: "flex items-center text-sm w-[inherit]" }, R = { class: "font
|
|
|
101
99
|
state: e(c),
|
|
102
100
|
variant: "form"
|
|
103
101
|
}, {
|
|
104
|
-
default:
|
|
102
|
+
default: a(() => [
|
|
105
103
|
t("form", {
|
|
106
104
|
class: "flex gap-1 rounded",
|
|
107
105
|
onSubmit: k(S, ["prevent"])
|
|
108
106
|
}, [
|
|
109
|
-
|
|
110
|
-
"onUpdate:modelValue":
|
|
107
|
+
M(t("input", {
|
|
108
|
+
"onUpdate:modelValue": o[1] || (o[1] = (l) => r.value = l),
|
|
111
109
|
class: "border-none outline-none flex-1 w-full text-sm min-h-8 p-1.5",
|
|
112
110
|
placeholder: "New Workspace",
|
|
113
111
|
type: "text"
|
|
@@ -119,7 +117,7 @@ const P = { class: "flex items-center text-sm w-[inherit]" }, R = { class: "font
|
|
|
119
117
|
disabled: !r.value.trim(),
|
|
120
118
|
type: "submit"
|
|
121
119
|
}, {
|
|
122
|
-
default:
|
|
120
|
+
default: a(() => o[3] || (o[3] = [
|
|
123
121
|
V(" Continue ")
|
|
124
122
|
])),
|
|
125
123
|
_: 1
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUrlPrefetcher.d.ts","sourceRoot":"","sources":["../../../../src/components/ImportCollection/hooks/useUrlPrefetcher.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;IAClB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CACrB,CAAA;AAED;;GAEG;AACH,wBAAgB,gBAAgB;;eAVvB,MAAM,GAAG,SAAS;iBAChB,MAAM,GAAG,IAAI;eACf,MAAM,GAAG,IAAI;aACf,MAAM,GAAG,IAAI;eACX,MAAM,GAAG,IAAI;;
|
|
1
|
+
{"version":3,"file":"useUrlPrefetcher.d.ts","sourceRoot":"","sources":["../../../../src/components/ImportCollection/hooks/useUrlPrefetcher.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;IAClB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CACrB,CAAA;AAED;;GAEG;AACH,wBAAgB,gBAAgB;;eAVvB,MAAM,GAAG,SAAS;iBAChB,MAAM,GAAG,IAAI;eACf,MAAM,GAAG,IAAI;aACf,MAAM,GAAG,IAAI;eACX,MAAM,GAAG,IAAI;;yBAuHX,MAAM,GAAG,IAAI,UACZ,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;EAoBjB"}
|