@scalar/api-client 2.1.45 → 2.1.47
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 +39 -0
- package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBar.vue.js +2 -2
- package/dist/components/AddressBar/AddressBar.vue2.js +66 -58
- package/dist/components/AddressBar/AddressBarHistory.vue.js +2 -2
- package/dist/components/AddressBar/AddressBarHistory.vue2.js +8 -8
- package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarServer.vue.js +40 -39
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +1 -1
- package/dist/components/CodeInput/CodeInput.vue2.js +7 -7
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +32 -26
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.js +14 -9
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +4 -4
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +15 -10
- package/dist/components/ContextBar.vue.d.ts +1 -1
- package/dist/components/ContextBar.vue.d.ts.map +1 -1
- package/dist/components/ContextBar.vue.js +2 -2
- package/dist/components/ContextBar.vue2.js +30 -19
- package/dist/components/DataTable/DataTableCheckbox.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableCheckbox.vue.js +17 -17
- package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInput.vue.js +2 -2
- package/dist/components/DataTable/DataTableInput.vue2.js +10 -10
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +23 -18
- package/dist/components/Form/Form.vue.js +15 -15
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
- package/dist/components/ImportCollection/DropEventListener.vue.d.ts +2 -2
- package/dist/components/ImportCollection/DropEventListener.vue.js +6 -6
- package/dist/components/ImportCollection/ImportCollectionListener.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportCollectionListener.vue.js +22 -21
- package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts +1 -0
- package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js +87 -74
- package/dist/components/ImportCollection/ImportNowButton.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportNowButton.vue.js +14 -13
- package/dist/components/ImportCollection/PasteEventListener.vue.d.ts +2 -2
- package/dist/components/ImportCollection/PasteEventListener.vue.js +5 -5
- package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.d.ts +2 -2
- package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.js +10 -5
- package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/WorkspaceSelector.vue.js +43 -33
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts +1 -0
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts.map +1 -1
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.js +31 -21
- package/dist/components/Search/useSearch.d.ts +2 -0
- package/dist/components/Search/useSearch.d.ts.map +1 -1
- package/dist/components/Search/useSearch.js +25 -24
- package/dist/components/SideNav/DownloadAppButton.vue.d.ts +3 -0
- package/dist/components/SideNav/DownloadAppButton.vue.d.ts.map +1 -0
- package/dist/components/SideNav/DownloadAppButton.vue.js +7 -0
- package/dist/components/SideNav/DownloadAppButton.vue2.js +33 -0
- package/dist/components/SideNav/SideHelp.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideHelp.vue.js +55 -53
- package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNav.vue.js +82 -5
- package/dist/components/SideNav/SideNav.vue2.js +2 -72
- package/dist/components/{SubpageHeader.vue.d.ts → SideNav/SideNavGroup.vue.d.ts} +3 -3
- package/dist/components/SideNav/SideNavGroup.vue.d.ts.map +1 -0
- package/dist/components/SideNav/SideNavGroup.vue.js +16 -0
- package/dist/components/SideNav/SideNavGroup.vue2.js +4 -0
- package/dist/components/SideNav/SideNavLink.vue.d.ts +5 -5
- package/dist/components/SideNav/SideNavLink.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNavLink.vue.js +31 -34
- package/dist/components/SideNav/SideNavRouterLink.vue.d.ts +25 -0
- package/dist/components/SideNav/SideNavRouterLink.vue.d.ts.map +1 -0
- package/dist/components/SideNav/SideNavRouterLink.vue.js +29 -0
- package/dist/components/SideNav/SideNavRouterLink.vue2.js +4 -0
- package/dist/components/Sidebar/SidebarButton.vue.d.ts +1 -4
- package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarButton.vue.js +17 -17
- package/dist/components/Sidebar/SidebarToggle.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarToggle.vue.js +16 -15
- package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNav.vue.js +2 -2
- package/dist/components/TopNav/TopNav.vue2.js +14 -14
- package/dist/components/TopNav/TopNavItem.vue.d.ts +2 -2
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +31 -31
- package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +13 -21
- package/dist/hooks/index.d.ts +2 -1
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +6 -4
- package/dist/hooks/useLayout.d.ts +13 -0
- package/dist/hooks/useLayout.d.ts.map +1 -0
- package/dist/hooks/useLayout.js +7 -0
- package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
- package/dist/layouts/App/ApiClientApp.vue.js +37 -37
- package/dist/layouts/App/MainLayout.vue.d.ts.map +1 -1
- package/dist/layouts/App/MainLayout.vue.js +21 -13
- package/dist/layouts/App/create-api-client-app.d.ts +28 -28
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/App/create-api-client-app.js +10 -8
- package/dist/layouts/Modal/ApiClientModal.vue.d.ts +3 -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 +37 -25
- package/dist/layouts/Modal/create-api-client-modal.d.ts +56 -56
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.js +8 -7
- package/dist/layouts/Web/ApiClientWeb.vue.d.ts.map +1 -1
- package/dist/layouts/Web/ApiClientWeb.vue.js +30 -30
- package/dist/layouts/Web/create-api-client-web.d.ts +28 -28
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/layouts/Web/create-api-client-web.js +9 -7
- package/dist/libs/create-client.d.ts +35 -29
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +55 -42
- package/dist/libs/hot-keys.d.ts +1 -1
- package/dist/router.d.ts +4 -41
- package/dist/router.d.ts.map +1 -1
- package/dist/router.js +18 -149
- package/dist/routes.d.ts +150 -0
- package/dist/routes.d.ts.map +1 -0
- package/dist/routes.js +182 -0
- package/dist/store/collections.d.ts +4 -4
- package/dist/store/cookies.d.ts +4 -4
- package/dist/store/request-example.d.ts +4 -4
- package/dist/store/requests.d.ts +4 -4
- package/dist/store/router-params.js +1 -1
- package/dist/store/security-schemes.d.ts +4 -4
- package/dist/store/store.d.ts +56 -56
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/store.js +90 -90
- package/dist/store/tags.d.ts +4 -4
- package/dist/store/workspace.d.ts +4 -4
- package/dist/style.css +1 -1
- package/dist/views/Cookies/CookieRaw.vue.js +10 -10
- package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +52 -53
- package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
- package/dist/views/Environment/Environment.vue2.js +79 -80
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +20 -15
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +146 -108
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.js +53 -52
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +102 -97
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +2 -2
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestTable.vue2.js +44 -40
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.js +2 -2
- package/dist/views/Request/RequestSidebar.vue2.js +152 -134
- package/dist/views/Request/RequestSidebarItem.vue.d.ts +2 -2
- package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
- package/dist/views/Request/RequestSidebarItem.vue2.js +129 -115
- package/dist/views/Request/RequestSidebarItemMenu.vue2.js +6 -6
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue2.js +36 -34
- package/dist/views/Request/ResponseSection/ResponseBody.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBody.vue.js +21 -21
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.js +13 -10
- 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 +0 -2
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.js +8 -8
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +3 -3
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +32 -33
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +61 -55
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +32 -25
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +102 -70
- package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +60 -50
- package/dist/views/Request/types/sidebar-item.d.ts +2 -1
- package/dist/views/Request/types/sidebar-item.d.ts.map +1 -1
- package/dist/views/Servers/Servers.vue.d.ts.map +1 -1
- package/dist/views/Servers/Servers.vue2.js +12 -7
- package/package.json +10 -8
- package/dist/components/SubpageHeader.vue.d.ts.map +0 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue2.js +0 -4
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +0 -7
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const u = /* @__PURE__ */
|
|
1
|
+
import { defineComponent as i, onMounted as r, onBeforeUnmount as c } from "vue";
|
|
2
|
+
const u = /* @__PURE__ */ i({
|
|
3
3
|
__name: "PasteEventListener",
|
|
4
4
|
emits: ["input"],
|
|
5
5
|
setup(m, { emit: o }) {
|
|
6
|
-
const
|
|
7
|
-
|
|
6
|
+
const s = o;
|
|
7
|
+
r(() => {
|
|
8
8
|
document.addEventListener("paste", n);
|
|
9
9
|
}), c(() => {
|
|
10
10
|
document.removeEventListener("paste", n);
|
|
@@ -13,7 +13,7 @@ const u = /* @__PURE__ */ r({
|
|
|
13
13
|
const t = e.target;
|
|
14
14
|
if (!(t && (t.tagName === "INPUT" || t.tagName === "TEXTAREA" || t.isContentEditable)) && e.clipboardData) {
|
|
15
15
|
const a = e.clipboardData.getData("text");
|
|
16
|
-
a &&
|
|
16
|
+
a && s("input", a, null, "paste");
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
return (e, t) => null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
2
|
-
input: (url: string, integration: string | null) => any;
|
|
2
|
+
input: (url: string, integration: string | null, eventType: "query") => any;
|
|
3
3
|
}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
|
|
4
|
-
onInput?: ((url: string, integration: string | null) => any) | undefined;
|
|
4
|
+
onInput?: ((url: string, integration: string | null, eventType: "query") => any) | undefined;
|
|
5
5
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
6
|
export default _default;
|
|
7
7
|
//# sourceMappingURL=UrlQueryParameterChecker.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UrlQueryParameterChecker.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/UrlQueryParameterChecker.vue"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"UrlQueryParameterChecker.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/UrlQueryParameterChecker.vue"],"names":[],"mappings":";;;;;AAkHA,wBAMG"}
|
|
@@ -2,12 +2,17 @@ import { defineComponent as a, onMounted as o } from "vue";
|
|
|
2
2
|
const c = /* @__PURE__ */ a({
|
|
3
3
|
__name: "UrlQueryParameterChecker",
|
|
4
4
|
emits: ["input"],
|
|
5
|
-
setup(
|
|
6
|
-
const n =
|
|
5
|
+
setup(u, { emit: t }) {
|
|
6
|
+
const n = t;
|
|
7
7
|
return o(() => {
|
|
8
|
-
const e = new URLSearchParams(window.location.search),
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
const e = new URLSearchParams(window.location.search), r = e.get("url");
|
|
9
|
+
r && n(
|
|
10
|
+
"input",
|
|
11
|
+
r,
|
|
12
|
+
e.get("integration"),
|
|
13
|
+
"query"
|
|
14
|
+
);
|
|
15
|
+
}), (e, r) => null;
|
|
11
16
|
}
|
|
12
17
|
});
|
|
13
18
|
export {
|
|
@@ -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,77 +1,87 @@
|
|
|
1
|
-
import { defineComponent as y, ref as
|
|
2
|
-
import { useModal as
|
|
1
|
+
import { defineComponent as y, ref as W, openBlock as d, createElementBlock as x, Fragment as w, createElementVNode as t, createVNode as s, unref as e, withCtx as o, renderList as D, createBlock as N, withModifiers as k, normalizeClass as M, toDisplayString as h, withDirectives as z, vModelText as B, createTextVNode as V } from "vue";
|
|
2
|
+
import { useModal as j, ScalarDropdown as T, ScalarDropdownItem as v, ScalarIcon as m, ScalarDropdownDivider as $, ScalarButton as _, ScalarModal as E } from "@scalar/components";
|
|
3
3
|
import { useToasts as I } from "@scalar/use-toasts";
|
|
4
4
|
import { useRouter as A } from "vue-router";
|
|
5
5
|
import { useWorkspace as F } from "../../store/store.js";
|
|
6
6
|
const L = { class: "flex items-center text-sm w-[inherit]" }, P = { class: "font-medium m-0 text-sm flex gap-1 items-center" }, R = { class: "line-clamp-1 text-left w-[calc(100%-10px)] text-xs" }, U = { class: "text-ellipsis overflow-hidden" }, q = { class: "flex items-center justify-center h-4 w-4" }, Y = /* @__PURE__ */ y({
|
|
7
7
|
__name: "WorkspaceSelector",
|
|
8
8
|
setup(G) {
|
|
9
|
-
const { activeWorkspace: i, workspaces: b, workspaceMutators: g } = F(), { push:
|
|
10
|
-
|
|
9
|
+
const { activeWorkspace: i, workspaces: b, workspaceMutators: g } = F(), { push: u } = A(), c = j(), { toast: f } = I(), r = W(""), C = (n) => {
|
|
10
|
+
n !== i.value.uid && u({
|
|
11
|
+
name: "workspace",
|
|
12
|
+
params: {
|
|
13
|
+
workspace: n
|
|
14
|
+
}
|
|
15
|
+
});
|
|
11
16
|
}, S = () => {
|
|
12
|
-
if (!
|
|
17
|
+
if (!r.value.trim()) {
|
|
13
18
|
f("Please enter a name before creating a workspace.", "error");
|
|
14
19
|
return;
|
|
15
20
|
}
|
|
16
|
-
const
|
|
17
|
-
name:
|
|
21
|
+
const n = g.add({
|
|
22
|
+
name: r.value
|
|
18
23
|
});
|
|
19
|
-
|
|
24
|
+
f(`Created new workspace '${n.name}'`), u({
|
|
25
|
+
name: "workspace",
|
|
26
|
+
params: {
|
|
27
|
+
workspace: n.uid
|
|
28
|
+
}
|
|
29
|
+
}), r.value = "", c.hide();
|
|
20
30
|
};
|
|
21
|
-
return (
|
|
31
|
+
return (n, a) => (d(), x(w, null, [
|
|
22
32
|
t("div", L, [
|
|
23
|
-
s(e(
|
|
24
|
-
items:
|
|
25
|
-
(d(!0), x(w, null,
|
|
33
|
+
s(e(T), null, {
|
|
34
|
+
items: o(() => [
|
|
35
|
+
(d(!0), x(w, null, D(e(b), (l, p) => (d(), N(e(v), {
|
|
26
36
|
key: p,
|
|
27
37
|
class: "flex gap-1.5 group/item items-center whitespace-nowrap text-ellipsis overflow-hidden w-full",
|
|
28
|
-
onClick:
|
|
38
|
+
onClick: k((H) => C(p), ["stop"])
|
|
29
39
|
}, {
|
|
30
|
-
default:
|
|
40
|
+
default: o(() => [
|
|
31
41
|
t("div", {
|
|
32
42
|
class: M([
|
|
33
43
|
"flex items-center justify-center rounded-full p-[3px] w-4 h-4",
|
|
34
44
|
e(i).uid === p ? "bg-c-accent text-b-1" : "group-hover/item:shadow-border text-transparent"
|
|
35
45
|
])
|
|
36
46
|
}, [
|
|
37
|
-
s(e(
|
|
47
|
+
s(e(m), {
|
|
38
48
|
class: "size-2.5",
|
|
39
49
|
icon: "Checkmark",
|
|
40
50
|
thickness: "3.5"
|
|
41
51
|
})
|
|
42
52
|
], 2),
|
|
43
|
-
t("span", U,
|
|
53
|
+
t("span", U, h(l.name), 1)
|
|
44
54
|
]),
|
|
45
55
|
_: 2
|
|
46
56
|
}, 1032, ["onClick"]))), 128)),
|
|
47
|
-
s(e(
|
|
57
|
+
s(e($)),
|
|
48
58
|
s(e(v), {
|
|
49
59
|
class: "flex items-center gap-1.5",
|
|
50
|
-
onClick:
|
|
60
|
+
onClick: a[0] || (a[0] = (l) => e(c).show())
|
|
51
61
|
}, {
|
|
52
|
-
default:
|
|
62
|
+
default: o(() => [
|
|
53
63
|
t("div", q, [
|
|
54
|
-
s(e(
|
|
64
|
+
s(e(m), {
|
|
55
65
|
class: "h-2.5",
|
|
56
66
|
icon: "Add",
|
|
57
67
|
thickness: "3"
|
|
58
68
|
})
|
|
59
69
|
]),
|
|
60
|
-
|
|
70
|
+
a[2] || (a[2] = t("span", null, "New Workspace", -1))
|
|
61
71
|
]),
|
|
62
72
|
_: 1
|
|
63
73
|
})
|
|
64
74
|
]),
|
|
65
|
-
default:
|
|
75
|
+
default: o(() => [
|
|
66
76
|
s(e(_), {
|
|
67
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",
|
|
68
78
|
fullWidth: "",
|
|
69
79
|
variant: "ghost"
|
|
70
80
|
}, {
|
|
71
|
-
default:
|
|
81
|
+
default: o(() => [
|
|
72
82
|
t("div", P, [
|
|
73
|
-
t("h2", R,
|
|
74
|
-
s(e(
|
|
83
|
+
t("h2", R, h(e(i).name), 1),
|
|
84
|
+
s(e(m), {
|
|
75
85
|
class: "size-3",
|
|
76
86
|
icon: "ChevronDown",
|
|
77
87
|
thickness: "3"
|
|
@@ -90,26 +100,26 @@ const L = { class: "flex items-center text-sm w-[inherit]" }, P = { class: "font
|
|
|
90
100
|
state: e(c),
|
|
91
101
|
variant: "form"
|
|
92
102
|
}, {
|
|
93
|
-
default:
|
|
103
|
+
default: o(() => [
|
|
94
104
|
t("form", {
|
|
95
105
|
class: "flex gap-1 rounded",
|
|
96
|
-
onSubmit:
|
|
106
|
+
onSubmit: k(S, ["prevent"])
|
|
97
107
|
}, [
|
|
98
|
-
|
|
99
|
-
"onUpdate:modelValue":
|
|
108
|
+
z(t("input", {
|
|
109
|
+
"onUpdate:modelValue": a[1] || (a[1] = (l) => r.value = l),
|
|
100
110
|
class: "border-none outline-none flex-1 w-full text-sm min-h-8 p-1.5",
|
|
101
111
|
placeholder: "New Workspace",
|
|
102
112
|
type: "text"
|
|
103
113
|
}, null, 512), [
|
|
104
|
-
[
|
|
114
|
+
[B, r.value]
|
|
105
115
|
]),
|
|
106
116
|
s(e(_), {
|
|
107
117
|
class: "max-h-8 text-xs p-0 px-3",
|
|
108
|
-
disabled: !
|
|
118
|
+
disabled: !r.value.trim(),
|
|
109
119
|
type: "submit"
|
|
110
120
|
}, {
|
|
111
|
-
default:
|
|
112
|
-
|
|
121
|
+
default: o(() => a[3] || (a[3] = [
|
|
122
|
+
V(" Continue ")
|
|
113
123
|
])),
|
|
114
124
|
_: 1
|
|
115
125
|
}, 8, ["disabled"])
|
|
@@ -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;;yBAiHX,MAAM,GAAG,IAAI,UACZ,MAAM;;;;;;;;;;;;;;;;;;;;EAoBjB"}
|
|
@@ -1,16 +1,25 @@
|
|
|
1
|
-
import { resolve as
|
|
2
|
-
import { redirectToProxy as
|
|
3
|
-
import { reactive as
|
|
4
|
-
import { isUrl as
|
|
5
|
-
function
|
|
6
|
-
const
|
|
1
|
+
import { resolve as i } from "@scalar/import";
|
|
2
|
+
import { redirectToProxy as f, fetchWithProxyFallback as d } from "@scalar/oas-utils/helpers";
|
|
3
|
+
import { reactive as h } from "vue";
|
|
4
|
+
import { isUrl as m } from "../../../libs/isUrl.js";
|
|
5
|
+
function b() {
|
|
6
|
+
const n = h({
|
|
7
7
|
state: "idle",
|
|
8
8
|
content: null,
|
|
9
9
|
url: null,
|
|
10
10
|
input: null,
|
|
11
11
|
error: null
|
|
12
12
|
});
|
|
13
|
-
async function u(
|
|
13
|
+
async function u() {
|
|
14
|
+
Object.assign(n, {
|
|
15
|
+
state: "idle",
|
|
16
|
+
content: null,
|
|
17
|
+
url: null,
|
|
18
|
+
input: null,
|
|
19
|
+
error: null
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
async function s(t, r) {
|
|
14
23
|
if (!t)
|
|
15
24
|
return {
|
|
16
25
|
state: "idle",
|
|
@@ -20,8 +29,8 @@ function v() {
|
|
|
20
29
|
error: null
|
|
21
30
|
};
|
|
22
31
|
try {
|
|
23
|
-
const e = await
|
|
24
|
-
fetch: (c) => fetch(r ?
|
|
32
|
+
const e = await i(t, {
|
|
33
|
+
fetch: (c) => fetch(r ? f(r, c) : c, {
|
|
25
34
|
cache: "no-cache"
|
|
26
35
|
})
|
|
27
36
|
});
|
|
@@ -35,7 +44,7 @@ function v() {
|
|
|
35
44
|
input: t,
|
|
36
45
|
error: `Could not find an OpenAPI document in ${t}`
|
|
37
46
|
};
|
|
38
|
-
if (!
|
|
47
|
+
if (!m(e))
|
|
39
48
|
return {
|
|
40
49
|
state: "idle",
|
|
41
50
|
content: null,
|
|
@@ -43,13 +52,13 @@ function v() {
|
|
|
43
52
|
input: t,
|
|
44
53
|
error: "Oops, we got invalid content for the given URL."
|
|
45
54
|
};
|
|
46
|
-
const o = e,
|
|
55
|
+
const o = e, l = await d(o, {
|
|
47
56
|
proxy: r,
|
|
48
57
|
cache: "no-cache"
|
|
49
58
|
});
|
|
50
|
-
return
|
|
59
|
+
return l.ok ? {
|
|
51
60
|
state: "idle",
|
|
52
|
-
content: await
|
|
61
|
+
content: await l.text(),
|
|
53
62
|
url: o,
|
|
54
63
|
error: null
|
|
55
64
|
} : {
|
|
@@ -57,7 +66,7 @@ function v() {
|
|
|
57
66
|
content: null,
|
|
58
67
|
url: null,
|
|
59
68
|
input: t,
|
|
60
|
-
error: `Couldn't fetch ${o}, got error ${[
|
|
69
|
+
error: `Couldn't fetch ${o}, got error ${[l.status, l.statusText].join(" ").trim()}.`
|
|
61
70
|
};
|
|
62
71
|
} catch (e) {
|
|
63
72
|
return console.error("[prefetchDocument]", e), {
|
|
@@ -69,22 +78,23 @@ function v() {
|
|
|
69
78
|
};
|
|
70
79
|
}
|
|
71
80
|
}
|
|
72
|
-
async function
|
|
73
|
-
Object.assign(
|
|
81
|
+
async function a(t, r) {
|
|
82
|
+
Object.assign(n, {
|
|
74
83
|
state: "loading",
|
|
75
84
|
content: null,
|
|
76
85
|
url: null,
|
|
77
86
|
input: t,
|
|
78
87
|
error: null
|
|
79
88
|
});
|
|
80
|
-
const e = await
|
|
81
|
-
return Object.assign(
|
|
89
|
+
const e = await s(t, r);
|
|
90
|
+
return Object.assign(n, e), e;
|
|
82
91
|
}
|
|
83
92
|
return {
|
|
84
|
-
prefetchResult:
|
|
85
|
-
prefetchUrl:
|
|
93
|
+
prefetchResult: n,
|
|
94
|
+
prefetchUrl: a,
|
|
95
|
+
resetPrefetchResult: u
|
|
86
96
|
};
|
|
87
97
|
}
|
|
88
98
|
export {
|
|
89
|
-
|
|
99
|
+
b as useUrlPrefetcher
|
|
90
100
|
};
|
|
@@ -11,6 +11,7 @@ export declare function useSearch(): {
|
|
|
11
11
|
httpVerb: string;
|
|
12
12
|
id: string;
|
|
13
13
|
path: string;
|
|
14
|
+
link: string;
|
|
14
15
|
}>[]>;
|
|
15
16
|
selectedSearchResult: import("vue").Ref<number, number>;
|
|
16
17
|
onSearchResultClick: (entry: FuseResult<{
|
|
@@ -19,6 +20,7 @@ export declare function useSearch(): {
|
|
|
19
20
|
httpVerb: string;
|
|
20
21
|
id: string;
|
|
21
22
|
path: string;
|
|
23
|
+
link: string;
|
|
22
24
|
}>) => void;
|
|
23
25
|
fuseSearch: () => void;
|
|
24
26
|
searchInputRef: import("vue").Ref<HTMLInputElement | null, HTMLInputElement | null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSearch.d.ts","sourceRoot":"","sources":["../../../src/components/Search/useSearch.ts"],"names":[],"mappings":"AAEA,OAAa,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAA;AAI/C;;;GAGG;AACH,wBAAgB,SAAS;;;eAKd,MAAM;qBACA,MAAM;kBACT,MAAM;YACZ,MAAM;cACJ,MAAM;;;
|
|
1
|
+
{"version":3,"file":"useSearch.d.ts","sourceRoot":"","sources":["../../../src/components/Search/useSearch.ts"],"names":[],"mappings":"AAEA,OAAa,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAA;AAI/C;;;GAGG;AACH,wBAAgB,SAAS;;;eAKd,MAAM;qBACA,MAAM;kBACT,MAAM;YACZ,MAAM;cACJ,MAAM;cACN,MAAM;;;iCA6EsB,UAAU;eAlFrC,MAAM;qBACA,MAAM;kBACT,MAAM;YACZ,MAAM;cACJ,MAAM;cACN,MAAM;MA6E0C;sBA1CjC,IAAI;;;uCAKe,IAAI,GAAG,MAAM;;EAmExD"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ref as a, watch as T, computed as
|
|
1
|
+
import w from "fuse.js";
|
|
2
|
+
import { ref as a, watch as T, computed as W, nextTick as x } from "vue";
|
|
3
3
|
import { useRouter as I } from "vue-router";
|
|
4
|
-
import { useWorkspace as
|
|
5
|
-
function
|
|
6
|
-
const
|
|
4
|
+
import { useWorkspace as A } from "../../store/store.js";
|
|
5
|
+
function H() {
|
|
6
|
+
const m = I(), { activeWorkspace: f, activeWorkspaceRequests: d, requests: R } = A(), o = a([]), c = a([]), s = a(0), u = a(""), l = a(null), n = a([]), i = new w(o.value, {
|
|
7
7
|
keys: ["title", "description", "body"]
|
|
8
|
-
}),
|
|
8
|
+
}), k = () => {
|
|
9
9
|
u.value = "", s.value = 0, c.value = [], l.value instanceof HTMLInputElement && l.value.blur();
|
|
10
10
|
}, S = (t) => {
|
|
11
11
|
o.value = t.map((e) => ({
|
|
@@ -13,50 +13,51 @@ function F() {
|
|
|
13
13
|
title: e.summary ?? e.method,
|
|
14
14
|
description: e.description ?? "",
|
|
15
15
|
httpVerb: e.method,
|
|
16
|
-
path: e.path
|
|
16
|
+
path: e.path,
|
|
17
|
+
link: `/workspace/${f.value.uid}/request/${e.uid}`
|
|
17
18
|
})), i.setCollection(o.value);
|
|
18
|
-
},
|
|
19
|
+
}, b = () => {
|
|
19
20
|
s.value = 0, c.value = i.search(u.value);
|
|
20
|
-
},
|
|
21
|
-
const e = t === "up" ? -1 : 1, v =
|
|
21
|
+
}, y = (t) => {
|
|
22
|
+
const e = t === "up" ? -1 : 1, v = r.value.length;
|
|
22
23
|
s.value = (s.value + e + v) % v, x(() => {
|
|
23
|
-
const
|
|
24
|
-
|
|
24
|
+
const p = n.value[s.value];
|
|
25
|
+
p instanceof HTMLElement && p.scrollIntoView({
|
|
25
26
|
behavior: "smooth",
|
|
26
27
|
block: "center"
|
|
27
28
|
});
|
|
28
29
|
});
|
|
29
|
-
},
|
|
30
|
+
}, g = () => {
|
|
30
31
|
s.value >= 0 && h(
|
|
31
|
-
|
|
32
|
+
r.value[s.value]
|
|
32
33
|
);
|
|
33
34
|
};
|
|
34
35
|
T(
|
|
35
|
-
|
|
36
|
+
d,
|
|
36
37
|
(t) => {
|
|
37
|
-
S(t.map((e) =>
|
|
38
|
+
S(t.map((e) => R[e]));
|
|
38
39
|
},
|
|
39
40
|
{ immediate: !0 }
|
|
40
41
|
);
|
|
41
42
|
const h = (t) => {
|
|
42
|
-
|
|
43
|
-
},
|
|
43
|
+
m.push(t.item.id), k();
|
|
44
|
+
}, r = W(
|
|
44
45
|
() => u.value.length === 0 ? o.value.map((t) => ({
|
|
45
46
|
item: t
|
|
46
47
|
})) : c.value
|
|
47
48
|
);
|
|
48
49
|
return {
|
|
49
50
|
searchText: u,
|
|
50
|
-
searchResultsWithPlaceholderResults:
|
|
51
|
+
searchResultsWithPlaceholderResults: r,
|
|
51
52
|
selectedSearchResult: s,
|
|
52
53
|
onSearchResultClick: h,
|
|
53
|
-
fuseSearch:
|
|
54
|
+
fuseSearch: b,
|
|
54
55
|
searchInputRef: l,
|
|
55
|
-
searchResultRefs:
|
|
56
|
-
navigateSearchResults:
|
|
57
|
-
selectSearchResult:
|
|
56
|
+
searchResultRefs: n,
|
|
57
|
+
navigateSearchResults: y,
|
|
58
|
+
selectSearchResult: g
|
|
58
59
|
};
|
|
59
60
|
}
|
|
60
61
|
export {
|
|
61
|
-
|
|
62
|
+
H as useSearch
|
|
62
63
|
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
3
|
+
//# sourceMappingURL=DownloadAppButton.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DownloadAppButton.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SideNav/DownloadAppButton.vue"],"names":[],"mappings":";AA6IA,wBAMG"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { defineComponent as e, openBlock as a, createBlock as m, withCtx as o, createVNode as s, unref as t, createElementVNode as r, normalizeClass as c } from "vue";
|
|
2
|
+
import p from "./SideNavLink.vue.js";
|
|
3
|
+
import { ScalarIcon as l } from "@scalar/components";
|
|
4
|
+
import { useLayout as i } from "../../hooks/useLayout.js";
|
|
5
|
+
const h = /* @__PURE__ */ e({
|
|
6
|
+
__name: "DownloadAppButton",
|
|
7
|
+
setup(u) {
|
|
8
|
+
const { layout: n } = i();
|
|
9
|
+
return (d, _) => (a(), m(p, {
|
|
10
|
+
class: "download-app-button sm:px-3 gap-2 !px-3 !py-1.5",
|
|
11
|
+
href: "https://scalar.com/download?utm_source=web_client&utm_medium=download_button&utm_campaign=topnav",
|
|
12
|
+
icon: "Download",
|
|
13
|
+
target: "_blank"
|
|
14
|
+
}, {
|
|
15
|
+
icon: o(() => [
|
|
16
|
+
s(t(l), {
|
|
17
|
+
icon: "Download",
|
|
18
|
+
size: "sm",
|
|
19
|
+
thickness: "2"
|
|
20
|
+
})
|
|
21
|
+
]),
|
|
22
|
+
default: o(() => [
|
|
23
|
+
r("span", {
|
|
24
|
+
class: c(["text-sm font-medium sr-only", { "sm:not-sr-only": t(n) === "web" }])
|
|
25
|
+
}, " Download App ", 2)
|
|
26
|
+
]),
|
|
27
|
+
_: 1
|
|
28
|
+
}));
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
export {
|
|
32
|
+
h as default
|
|
33
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SideHelp.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SideNav/SideHelp.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"SideHelp.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SideNav/SideHelp.vue"],"names":[],"mappings":";AA2TA,wBAMG"}
|