@scalar/api-client 2.1.18 → 2.1.20
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 +41 -0
- package/dist/components/AddressBar/AddressBar.vue.d.ts +5 -1
- 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 +70 -69
- 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 +29 -29
- package/dist/components/CodeInput/CodeInput.vue.d.ts +6 -2
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +2 -2
- package/dist/components/CodeInput/CodeInput.vue2.js +57 -49
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts +1 -1
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts +1 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts +1 -1
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts +1 -1
- package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts +1 -1
- package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteServer.vue.js +62 -45
- package/dist/components/CommandPalette/CommandPaletteTag.vue.d.ts +1 -1
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.d.ts +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +13 -7
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +87 -89
- package/dist/components/ContextBar.vue.d.ts.map +1 -1
- package/dist/components/ContextBar.vue.js +2 -2
- package/dist/components/DataTable/DataTableCheckbox.vue.d.ts +19 -3
- package/dist/components/DataTable/DataTableCheckbox.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableCheckbox.vue.js +27 -14
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +8 -8
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
- package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js +29 -32
- package/dist/components/ImportCurl/ImportCurlModal.vue.d.ts +39 -0
- package/dist/components/ImportCurl/ImportCurlModal.vue.d.ts.map +1 -0
- package/dist/components/ImportCurl/ImportCurlModal.vue.js +7 -0
- package/dist/components/ImportCurl/ImportCurlModal.vue2.js +88 -0
- package/dist/components/SideNav/SideHelp.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNav.vue.js +1 -1
- package/dist/components/SideNav/SideNav.vue2.js +37 -26
- package/dist/components/SideNav/SideNavLink.vue.d.ts +2 -2
- package/dist/components/SideNav/SideNavLink.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNavLink.vue.js +10 -11
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.d.ts +1 -1
- package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.js +1 -1
- package/dist/components/Sidebar/Sidebar.vue2.js +1 -1
- package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarButton.vue.js +1 -1
- package/dist/components/Sidebar/SidebarListElement.vue.d.ts +24 -3
- package/dist/components/Sidebar/SidebarListElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarListElement.vue.js +2 -2
- package/dist/components/Sidebar/SidebarListElement.vue2.js +26 -22
- package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts +4 -0
- package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarListElementActions.vue.js +35 -32
- package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNav.vue.js +3 -3
- package/dist/components/TopNav/TopNav.vue2.js +41 -40
- package/dist/components/ViewLayout/ViewLayout.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayout.vue.js +7 -7
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +1 -1
- package/dist/components/ViewLayout/ViewLayoutContent.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutContent.vue.js +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +11 -11
- package/dist/constants.d.ts +4 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +2 -1
- package/dist/hooks/useDarkModeState.d.ts +4 -3
- package/dist/hooks/useDarkModeState.d.ts.map +1 -1
- package/dist/hooks/useDarkModeState.js +36 -21
- package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
- package/dist/layouts/App/ApiClientApp.vue.js +40 -44
- package/dist/layouts/App/create-api-client-app.d.ts +46 -36
- 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 +17 -17
- package/dist/layouts/Modal/create-api-client-modal.d.ts +92 -72
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Web/ApiClientWeb.vue.d.ts.map +1 -1
- package/dist/layouts/Web/ApiClientWeb.vue.js +30 -34
- package/dist/layouts/Web/create-api-client-web.d.ts +46 -36
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +46 -36
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/event-bus.d.ts +41 -0
- package/dist/libs/event-bus.d.ts.map +1 -0
- package/dist/libs/event-bus.js +32 -0
- package/dist/libs/{event-busses/hot-keys-bus.d.ts → hot-keys.d.ts} +6 -7
- package/dist/libs/hot-keys.d.ts.map +1 -0
- package/dist/libs/hot-keys.js +45 -0
- package/dist/libs/importers/curl.d.ts +3 -0
- package/dist/libs/importers/curl.d.ts.map +1 -0
- package/dist/libs/importers/curl.js +61 -0
- package/dist/libs/importers/index.d.ts +2 -0
- package/dist/libs/importers/index.d.ts.map +1 -0
- package/dist/libs/importers/index.js +4 -0
- package/dist/libs/index.d.ts +4 -1
- package/dist/libs/index.d.ts.map +1 -1
- package/dist/libs/index.js +31 -31
- package/dist/libs/parse-curl.d.ts +12 -0
- package/dist/libs/parse-curl.d.ts.map +1 -0
- package/dist/libs/parse-curl.js +70 -0
- package/dist/libs/send-request.d.ts +4 -1
- package/dist/libs/send-request.d.ts.map +1 -1
- package/dist/libs/send-request.js +103 -103
- package/dist/router.d.ts +2 -1
- package/dist/router.d.ts.map +1 -1
- package/dist/router.js +33 -24
- package/dist/store/collections.d.ts +4 -4
- package/dist/store/cookies.d.ts +4 -4
- package/dist/store/environment.d.ts +4 -4
- package/dist/store/events.d.ts +29 -0
- package/dist/store/events.d.ts.map +1 -0
- package/dist/store/events.js +31 -0
- package/dist/store/request-example.d.ts +4 -4
- package/dist/store/requests.d.ts +4 -4
- package/dist/store/router-params.d.ts +1 -0
- package/dist/store/router-params.d.ts.map +1 -1
- package/dist/store/router-params.js +2 -1
- package/dist/store/security-schemes.d.ts +4 -4
- package/dist/store/servers.d.ts +4 -4
- package/dist/store/store.d.ts +92 -72
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/store.js +138 -129
- 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/Cookies.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +18 -18
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +9 -9
- package/dist/views/Request/Request.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.js +1 -1
- package/dist/views/Request/Request.vue2.js +148 -98
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +1 -1
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +4 -4
- 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 +101 -102
- 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 +73 -73
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +4 -4
- package/dist/views/Request/RequestSidebarItemMenu.vue2.js +33 -34
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts +2 -0
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue.js +4 -4
- package/dist/views/Request/RequestSubpageHeader.vue2.js +17 -15
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.d.ts +16 -0
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.d.ts.map +1 -0
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.js +31 -0
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue3.js +5 -0
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +30 -33
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.js +3 -3
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue2.js +18 -19
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +20 -20
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +68 -56
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +29 -30
- package/dist/views/Settings/Settings.vue.d.ts +4 -0
- package/dist/views/Settings/Settings.vue.d.ts.map +1 -0
- package/dist/views/Settings/Settings.vue.js +4 -0
- package/dist/views/Settings/Settings.vue2.js +59 -0
- package/dist/{components/DarkModeToggle/DarkModeIconToggle.vue.d.ts → views/Settings/SettingsGeneral.vue.d.ts} +1 -1
- package/dist/views/Settings/SettingsGeneral.vue.d.ts.map +1 -0
- package/dist/views/Settings/SettingsGeneral.vue.js +124 -0
- package/dist/views/Settings/SettingsGeneral.vue2.js +4 -0
- package/dist/views/Settings/SettingsGeneralMode.vue.d.ts +3 -0
- package/dist/views/Settings/SettingsGeneralMode.vue.d.ts.map +1 -0
- package/dist/views/Settings/SettingsGeneralMode.vue.js +78 -0
- package/dist/views/Settings/SettingsGeneralMode.vue2.js +4 -0
- package/package.json +59 -35
- package/dist/components/DarkModeToggle/DarkModeIconToggle.vue.d.ts.map +0 -1
- package/dist/components/DarkModeToggle/DarkModeIconToggle.vue.js +0 -31
- package/dist/components/DarkModeToggle/DarkModeIconToggle.vue2.js +0 -4
- package/dist/components/DarkModeToggle/index.d.ts +0 -2
- package/dist/components/DarkModeToggle/index.d.ts.map +0 -1
- package/dist/components/DarkModeToggle/index.js +0 -4
- package/dist/components/ScreenReader.vue.js +0 -7
- package/dist/components/ScreenReader.vue2.js +0 -18
- package/dist/libs/event-busses/cancel-request-bus.d.ts +0 -2
- package/dist/libs/event-busses/cancel-request-bus.d.ts.map +0 -1
- package/dist/libs/event-busses/cancel-request-bus.js +0 -5
- package/dist/libs/event-busses/command-palette-bus.d.ts +0 -14
- package/dist/libs/event-busses/command-palette-bus.d.ts.map +0 -1
- package/dist/libs/event-busses/command-palette-bus.js +0 -5
- package/dist/libs/event-busses/execute-request-bus.d.ts +0 -2
- package/dist/libs/event-busses/execute-request-bus.d.ts.map +0 -1
- package/dist/libs/event-busses/execute-request-bus.js +0 -5
- package/dist/libs/event-busses/hot-keys-bus.d.ts.map +0 -1
- package/dist/libs/event-busses/hot-keys-bus.js +0 -47
- package/dist/libs/event-busses/index.d.ts +0 -6
- package/dist/libs/event-busses/index.d.ts.map +0 -1
- package/dist/libs/event-busses/index.js +0 -15
- package/dist/libs/event-busses/request-status-bus.d.ts +0 -5
- package/dist/libs/event-busses/request-status-bus.d.ts.map +0 -1
- package/dist/libs/event-busses/request-status-bus.js +0 -5
|
@@ -1,89 +1,101 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { ScalarIcon as
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { defineComponent as A, computed as i, ref as C, openBlock as t, createBlock as a, withCtx as d, createVNode as c, unref as S, createElementVNode as f, createTextVNode as B, createCommentVNode as l, createElementBlock as v, Fragment as _ } from "vue";
|
|
2
|
+
import g from "../../../components/ContextBar.vue.js";
|
|
3
|
+
import H from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
|
|
4
|
+
import R from "./ResponseBody.vue.js";
|
|
5
|
+
import V from "./ResponseEmpty.vue.js";
|
|
6
|
+
import $ from "./ResponseLoadingOverlay.vue.js";
|
|
7
|
+
import E from "./ResponseMetaInformation.vue.js";
|
|
8
|
+
import { ScalarIcon as I } from "@scalar/components";
|
|
9
|
+
import L from "./ResponseBodyVirtual.vue.js";
|
|
10
|
+
/* empty css */
|
|
11
|
+
import N from "./ResponseCookies.vue.js";
|
|
12
|
+
import O from "./ResponseHeaders.vue.js";
|
|
13
|
+
const T = { class: "flex items-center flex-1" }, q = { class: "custom-scroll relative flex flex-1 flex-col px-2 xl:px-4 py-2.5" }, z = 5e6, J = /* @__PURE__ */ A({
|
|
12
14
|
__name: "ResponseSection",
|
|
13
15
|
props: {
|
|
14
16
|
response: {}
|
|
15
17
|
},
|
|
16
|
-
setup(
|
|
17
|
-
const
|
|
18
|
-
var
|
|
19
|
-
const
|
|
20
|
-
return
|
|
21
|
-
name:
|
|
22
|
-
value: o
|
|
18
|
+
setup(k) {
|
|
19
|
+
const r = k, p = i(() => {
|
|
20
|
+
var n;
|
|
21
|
+
const e = (n = r.response) == null ? void 0 : n.headers;
|
|
22
|
+
return e ? Object.keys(e).map((o) => ({
|
|
23
|
+
name: o,
|
|
24
|
+
value: e[o],
|
|
23
25
|
required: !1
|
|
24
26
|
})).filter(
|
|
25
|
-
(
|
|
27
|
+
(o) => ![
|
|
26
28
|
"rest-api-client-content-length",
|
|
27
29
|
"X-API-Client-Content-Length"
|
|
28
|
-
].includes(
|
|
30
|
+
].includes(o.name)
|
|
29
31
|
) : [];
|
|
30
|
-
}),
|
|
32
|
+
}), y = i(
|
|
31
33
|
() => {
|
|
32
|
-
var
|
|
33
|
-
return ((
|
|
34
|
-
var m,
|
|
35
|
-
const
|
|
36
|
-
return
|
|
37
|
-
name:
|
|
38
|
-
value:
|
|
34
|
+
var e;
|
|
35
|
+
return ((e = r.response) == null ? void 0 : e.cookieHeaderKeys.flatMap((n) => {
|
|
36
|
+
var m, u;
|
|
37
|
+
const o = (u = (m = r.response) == null ? void 0 : m.headers) == null ? void 0 : u[n];
|
|
38
|
+
return o ? {
|
|
39
|
+
name: n,
|
|
40
|
+
value: o,
|
|
39
41
|
required: !1
|
|
40
42
|
} : [];
|
|
41
43
|
})) ?? [];
|
|
42
44
|
}
|
|
43
|
-
),
|
|
44
|
-
|
|
45
|
+
), h = ["All", "Cookies", "Headers", "Body"], s = C("All"), x = i(
|
|
46
|
+
() => {
|
|
47
|
+
var e;
|
|
48
|
+
return typeof ((e = r.response) == null ? void 0 : e.data) == "string" && r.response.data.length > z;
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
return (e, n) => (t(), a(H, null, {
|
|
45
52
|
title: d(() => [
|
|
46
|
-
|
|
53
|
+
c(S(I), {
|
|
47
54
|
class: "text-c-3 mr-2 rotate-180",
|
|
48
55
|
icon: "ExternalLink",
|
|
49
56
|
size: "sm",
|
|
50
57
|
thickness: "2.5"
|
|
51
58
|
}),
|
|
52
|
-
f("div",
|
|
53
|
-
|
|
54
|
-
|
|
59
|
+
f("div", T, [
|
|
60
|
+
B(" Response "),
|
|
61
|
+
e.response ? (t(), a(E, {
|
|
55
62
|
key: 0,
|
|
56
|
-
response:
|
|
63
|
+
response: e.response
|
|
57
64
|
}, null, 8, ["response"])) : l("", !0),
|
|
58
|
-
|
|
59
|
-
activeSection:
|
|
60
|
-
sections:
|
|
61
|
-
onSetActiveSection:
|
|
65
|
+
c(g, {
|
|
66
|
+
activeSection: s.value,
|
|
67
|
+
sections: h,
|
|
68
|
+
onSetActiveSection: n[0] || (n[0] = (o) => s.value = o)
|
|
62
69
|
}, null, 8, ["activeSection"])
|
|
63
70
|
])
|
|
64
71
|
]),
|
|
65
72
|
default: d(() => {
|
|
66
|
-
var
|
|
73
|
+
var o;
|
|
67
74
|
return [
|
|
68
|
-
f("div",
|
|
69
|
-
|
|
70
|
-
|
|
75
|
+
f("div", q, [
|
|
76
|
+
e.response ? (t(), v(_, { key: 1 }, [
|
|
77
|
+
s.value === "All" || s.value === "Cookies" ? (t(), a(N, {
|
|
71
78
|
key: 0,
|
|
72
|
-
cookies:
|
|
79
|
+
cookies: y.value
|
|
73
80
|
}, null, 8, ["cookies"])) : l("", !0),
|
|
74
|
-
|
|
81
|
+
s.value === "All" || s.value === "Headers" ? (t(), a(O, {
|
|
75
82
|
key: 1,
|
|
76
|
-
headers:
|
|
83
|
+
headers: p.value
|
|
77
84
|
}, null, 8, ["headers"])) : l("", !0),
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
s.value === "All" || s.value === "Body" ? (t(), v(_, { key: 2 }, [
|
|
86
|
+
x.value ? (t(), a(L, {
|
|
87
|
+
key: 0,
|
|
88
|
+
content: r.response.data
|
|
89
|
+
}, null, 8, ["content"])) : (t(), a(R, {
|
|
90
|
+
key: 1,
|
|
91
|
+
active: !0,
|
|
92
|
+
data: (o = r.response) == null ? void 0 : o.data,
|
|
93
|
+
headers: p.value,
|
|
94
|
+
title: "Body"
|
|
95
|
+
}, null, 8, ["data", "headers"]))
|
|
96
|
+
], 64)) : l("", !0)
|
|
97
|
+
], 64)) : (t(), a(V, { key: 0 })),
|
|
98
|
+
c($)
|
|
87
99
|
])
|
|
88
100
|
];
|
|
89
101
|
}),
|
|
@@ -92,5 +104,5 @@ const q = { class: "flex items-center flex-1" }, I = { class: "custom-scroll rel
|
|
|
92
104
|
}
|
|
93
105
|
});
|
|
94
106
|
export {
|
|
95
|
-
|
|
107
|
+
J as default
|
|
96
108
|
};
|
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { useModal as C, ScalarDropdown as $, ScalarDropdownItem as m, ScalarIcon as i, ScalarTooltip as
|
|
5
|
-
import { useRouter as
|
|
6
|
-
import { useWorkspace as
|
|
7
|
-
import { commandPaletteBus as G } from "../../../libs/event-busses/command-palette-bus.js";
|
|
1
|
+
import { defineComponent as O, computed as A, ref as M, openBlock as u, createElementBlock as W, createElementVNode as o, createVNode as t, unref as e, withCtx as s, Fragment as I, renderList as L, createBlock as x, withModifiers as r, normalizeClass as U, toDisplayString as z } from "vue";
|
|
2
|
+
import V from "../../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
|
|
3
|
+
import q from "../../../components/Sidebar/Actions/EditSidebarListElement.vue.js";
|
|
4
|
+
import { useModal as C, ScalarDropdown as $, ScalarDropdownItem as m, ScalarIcon as i, ScalarTooltip as F, ScalarButton as S, ScalarDropdownDivider as P, ScalarModal as N } from "@scalar/components";
|
|
5
|
+
import { useRouter as Y } from "vue-router";
|
|
6
|
+
import { useWorkspace as G } from "../../../store/store.js";
|
|
8
7
|
const H = { class: "flex items-center text-sm w-[inherit]" }, J = { class: "font-medium m-0 text-sm flex gap-1.5 items-center" }, K = { class: "line-clamp-1 text-left w-[calc(100%-10px)]" }, Q = { class: "text-ellipsis overflow-hidden" }, X = /* @__PURE__ */ o("span", null, "Rename", -1), Z = /* @__PURE__ */ o("span", null, "Delete", -1), ee = /* @__PURE__ */ o("div", { class: "grid gap-1.5 pointer-events-none min-w-48 w-content shadow-lg rounded bg-b-1 z-100 p-2 text-xxs leading-5 z-10 text-c-1" }, [
|
|
9
8
|
/* @__PURE__ */ o("div", { class: "flex items-center text-c-2" }, [
|
|
10
9
|
/* @__PURE__ */ o("span", null, "Only workspace cannot be deleted.")
|
|
11
10
|
])
|
|
12
|
-
], -1), te = /* @__PURE__ */ o("span", null, "Delete", -1), se = { class: "flex items-center justify-center h-4 w-4" }, ne = /* @__PURE__ */ o("span", null, "Create Workspace", -1),
|
|
11
|
+
], -1), te = /* @__PURE__ */ o("span", null, "Delete", -1), se = { class: "flex items-center justify-center h-4 w-4" }, ne = /* @__PURE__ */ o("span", null, "Create Workspace", -1), pe = /* @__PURE__ */ O({
|
|
13
12
|
__name: "WorkspaceDropdown",
|
|
14
13
|
setup(oe) {
|
|
15
|
-
const { activeWorkspace: f, workspaces: d, workspaceMutators: _ } =
|
|
14
|
+
const { activeWorkspace: f, workspaces: d, workspaceMutators: _, events: T } = G(), { push: g } = Y(), E = (n) => {
|
|
16
15
|
n !== f.value.uid && g(`/workspace/${n}`);
|
|
17
|
-
}, b =
|
|
18
|
-
|
|
19
|
-
},
|
|
20
|
-
n.trim() && (_.edit(c.value, "name", n.trim()),
|
|
16
|
+
}, b = A(() => Object.keys(d).length === 1), j = () => T.commandPalette.emit({ commandName: "Create Workspace" }), v = M(""), c = M(""), h = C(), w = C(), y = (n) => {
|
|
17
|
+
v.value = d[n].name, c.value = n, h.show();
|
|
18
|
+
}, B = (n) => {
|
|
19
|
+
n.trim() && (_.edit(c.value, "name", n.trim()), h.hide());
|
|
21
20
|
}, D = (n) => {
|
|
22
|
-
|
|
23
|
-
},
|
|
21
|
+
v.value = d[n].name, c.value = n, w.show();
|
|
22
|
+
}, R = async () => {
|
|
24
23
|
if (!b.value) {
|
|
25
24
|
const n = f.value.uid === c.value, a = { ...d };
|
|
26
25
|
if (delete a[c.value], _.delete(c.value), n) {
|
|
@@ -34,14 +33,14 @@ const H = { class: "flex items-center text-sm w-[inherit]" }, J = { class: "font
|
|
|
34
33
|
o("div", H, [
|
|
35
34
|
t(e($), null, {
|
|
36
35
|
items: s(() => [
|
|
37
|
-
(u(!0), W(
|
|
36
|
+
(u(!0), W(I, null, L(e(d), (p, l) => (u(), x(e(m), {
|
|
38
37
|
key: l,
|
|
39
38
|
class: "flex gap-1.5 group/item items-center whitespace-nowrap text-ellipsis overflow-hidden w-full",
|
|
40
|
-
onClick: r((k) =>
|
|
39
|
+
onClick: r((k) => E(l), ["stop"])
|
|
41
40
|
}, {
|
|
42
41
|
default: s(() => [
|
|
43
42
|
o("div", {
|
|
44
|
-
class:
|
|
43
|
+
class: U([
|
|
45
44
|
"flex items-center justify-center rounded-full p-[3px] w-4 h-4 group-hover/item:shadow-border",
|
|
46
45
|
e(f).uid === l ? "bg-blue text-b-1" : "text-transparent"
|
|
47
46
|
])
|
|
@@ -71,7 +70,7 @@ const H = { class: "flex items-center text-sm w-[inherit]" }, J = { class: "font
|
|
|
71
70
|
]),
|
|
72
71
|
_: 2
|
|
73
72
|
}, 1032, ["onMousedown", "onTouchend"]),
|
|
74
|
-
b.value ? (u(), x(e(
|
|
73
|
+
b.value ? (u(), x(e(F), {
|
|
75
74
|
key: 0,
|
|
76
75
|
class: "z-10",
|
|
77
76
|
side: "bottom"
|
|
@@ -140,10 +139,10 @@ const H = { class: "flex items-center text-sm w-[inherit]" }, J = { class: "font
|
|
|
140
139
|
]),
|
|
141
140
|
_: 2
|
|
142
141
|
}, 1032, ["onClick"]))), 128)),
|
|
143
|
-
t(e(
|
|
142
|
+
t(e(P)),
|
|
144
143
|
t(e(m), {
|
|
145
144
|
class: "flex items-center gap-1.5",
|
|
146
|
-
onClick:
|
|
145
|
+
onClick: j
|
|
147
146
|
}, {
|
|
148
147
|
default: s(() => [
|
|
149
148
|
o("div", se, [
|
|
@@ -186,25 +185,25 @@ const H = { class: "flex items-center text-sm w-[inherit]" }, J = { class: "font
|
|
|
186
185
|
title: "Delete workspace"
|
|
187
186
|
}, {
|
|
188
187
|
default: s(() => [
|
|
189
|
-
t(
|
|
190
|
-
variableName:
|
|
188
|
+
t(V, {
|
|
189
|
+
variableName: v.value,
|
|
191
190
|
warningMessage: "This cannot be undone. You’re about to delete the workspace and everything inside it.",
|
|
192
191
|
onClose: a[2] || (a[2] = (p) => e(w).hide()),
|
|
193
|
-
onDelete:
|
|
192
|
+
onDelete: R
|
|
194
193
|
}, null, 8, ["variableName"])
|
|
195
194
|
]),
|
|
196
195
|
_: 1
|
|
197
196
|
}, 8, ["state"]),
|
|
198
197
|
t(e(N), {
|
|
199
198
|
size: "xxs",
|
|
200
|
-
state: e(
|
|
199
|
+
state: e(h),
|
|
201
200
|
title: "Rename Workspace"
|
|
202
201
|
}, {
|
|
203
202
|
default: s(() => [
|
|
204
|
-
t(
|
|
205
|
-
name:
|
|
206
|
-
onClose: a[3] || (a[3] = (p) => e(
|
|
207
|
-
onEdit:
|
|
203
|
+
t(q, {
|
|
204
|
+
name: v.value,
|
|
205
|
+
onClose: a[3] || (a[3] = (p) => e(h).hide()),
|
|
206
|
+
onEdit: B
|
|
208
207
|
}, null, 8, ["name"])
|
|
209
208
|
]),
|
|
210
209
|
_: 1
|
|
@@ -213,5 +212,5 @@ const H = { class: "flex items-center text-sm w-[inherit]" }, J = { class: "font
|
|
|
213
212
|
}
|
|
214
213
|
});
|
|
215
214
|
export {
|
|
216
|
-
|
|
215
|
+
pe as default
|
|
217
216
|
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type DefineComponent } from 'vue';
|
|
2
|
+
declare const _default: DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
3
|
+
export default _default;
|
|
4
|
+
//# sourceMappingURL=Settings.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Settings.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Settings/Settings.vue"],"names":[],"mappings":"AA0DA,OAAO,EAAE,KAAK,eAAe,EAAO,MAAM,KAAK,CAAA;;AAuI/C,wBAKG"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { defineComponent as i, ref as m, openBlock as a, createBlock as r, withCtx as e, createVNode as o, unref as s, createElementVNode as c, createElementBlock as f, Fragment as p, renderList as u, createTextVNode as _, toDisplayString as d, resolveDynamicComponent as x } from "vue";
|
|
2
|
+
import b from "../../components/Sidebar/SidebarList.vue.js";
|
|
3
|
+
import S from "../../components/Sidebar/SidebarListElement.vue.js";
|
|
4
|
+
import g from "../../components/ViewLayout/ViewLayout.vue.js";
|
|
5
|
+
import v from "../../components/ViewLayout/ViewLayoutContent.vue.js";
|
|
6
|
+
import y from "./SettingsGeneral.vue.js";
|
|
7
|
+
import C from "../../components/Sidebar/Sidebar.vue.js";
|
|
8
|
+
const L = { class: "flex-1" }, T = /* @__PURE__ */ i({
|
|
9
|
+
__name: "Settings",
|
|
10
|
+
setup(V) {
|
|
11
|
+
const l = {
|
|
12
|
+
general: {
|
|
13
|
+
component: y,
|
|
14
|
+
title: "general"
|
|
15
|
+
}
|
|
16
|
+
}, n = m("general");
|
|
17
|
+
return (k, h) => (a(), r(g, null, {
|
|
18
|
+
default: e(() => [
|
|
19
|
+
o(s(C), { title: "Settings" }, {
|
|
20
|
+
content: e(() => [
|
|
21
|
+
c("div", L, [
|
|
22
|
+
o(b, null, {
|
|
23
|
+
default: e(() => [
|
|
24
|
+
(a(), f(p, null, u(l, (t) => o(S, {
|
|
25
|
+
key: t.title,
|
|
26
|
+
class: "text-xs capitalize",
|
|
27
|
+
isCopyable: !1,
|
|
28
|
+
isDeletable: !1,
|
|
29
|
+
variable: {
|
|
30
|
+
uid: t.title,
|
|
31
|
+
name: t.title
|
|
32
|
+
}
|
|
33
|
+
}, {
|
|
34
|
+
default: e(() => [
|
|
35
|
+
_(d(t.title), 1)
|
|
36
|
+
]),
|
|
37
|
+
_: 2
|
|
38
|
+
}, 1032, ["variable"])), 64))
|
|
39
|
+
]),
|
|
40
|
+
_: 1
|
|
41
|
+
})
|
|
42
|
+
])
|
|
43
|
+
]),
|
|
44
|
+
_: 1
|
|
45
|
+
}),
|
|
46
|
+
o(v, { class: "flex-1" }, {
|
|
47
|
+
default: e(() => [
|
|
48
|
+
(a(), r(x(l[n.value].component)))
|
|
49
|
+
]),
|
|
50
|
+
_: 1
|
|
51
|
+
})
|
|
52
|
+
]),
|
|
53
|
+
_: 1
|
|
54
|
+
}));
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
export {
|
|
58
|
+
T as default
|
|
59
|
+
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
2
2
|
export default _default;
|
|
3
|
-
//# sourceMappingURL=
|
|
3
|
+
//# sourceMappingURL=SettingsGeneral.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SettingsGeneral.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Settings/SettingsGeneral.vue"],"names":[],"mappings":";AA2bA,wBAKG"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { defineComponent as w, openBlock as f, createBlock as v, withCtx as t, createTextVNode as a, createElementVNode as s, createVNode as e, unref as l, createElementBlock as y, Fragment as b, renderList as S, withModifiers as C, normalizeClass as $, toDisplayString as u } from "vue";
|
|
2
|
+
import V from "../../components/DataTable/DataTable.vue.js";
|
|
3
|
+
import D from "../../components/DataTable/DataTableCell.vue.js";
|
|
4
|
+
import P from "../../components/DataTable/DataTableCheckbox.vue.js";
|
|
5
|
+
import n from "../../components/DataTable/DataTableRow.vue.js";
|
|
6
|
+
import p from "../../components/DataTable/DataTableText.vue.js";
|
|
7
|
+
import z from "../../components/ViewLayout/ViewLayoutSection.vue.js";
|
|
8
|
+
import { ScalarDropdown as B, ScalarDropdownItem as T, ScalarIcon as d, ScalarButton as U } from "@scalar/components";
|
|
9
|
+
import { themeLabels as _ } from "@scalar/themes";
|
|
10
|
+
import I from "./SettingsGeneralMode.vue.js";
|
|
11
|
+
import { useWorkspace as N } from "../../store/store.js";
|
|
12
|
+
const W = { class: "flex flex-col p-2" }, j = { class: "font-medium m-0 text-sm flex gap-1.5 items-center" }, Y = /* @__PURE__ */ w({
|
|
13
|
+
__name: "SettingsGeneral",
|
|
14
|
+
setup(E) {
|
|
15
|
+
const { activeWorkspace: r, workspaceMutators: h, proxyUrl: i, setProxyUrl: c } = N(), x = () => {
|
|
16
|
+
i.value ? c("") : c("https://proxy.scalar.com");
|
|
17
|
+
}, k = [
|
|
18
|
+
"default",
|
|
19
|
+
"alternate",
|
|
20
|
+
"moon",
|
|
21
|
+
"purple",
|
|
22
|
+
"solarized",
|
|
23
|
+
"bluePlanet",
|
|
24
|
+
"saturn",
|
|
25
|
+
"kepler",
|
|
26
|
+
"mars",
|
|
27
|
+
"deepSpace"
|
|
28
|
+
], g = (m) => {
|
|
29
|
+
h.edit(r.value.uid, "themeId", m);
|
|
30
|
+
};
|
|
31
|
+
return (m, G) => (f(), v(z, null, {
|
|
32
|
+
title: t(() => [
|
|
33
|
+
a("General")
|
|
34
|
+
]),
|
|
35
|
+
default: t(() => [
|
|
36
|
+
s("div", W, [
|
|
37
|
+
e(V, { columns: ["", ""] }, {
|
|
38
|
+
default: t(() => [
|
|
39
|
+
e(n, null, {
|
|
40
|
+
default: t(() => [
|
|
41
|
+
e(p, { text: "Use Scalar Proxy" }),
|
|
42
|
+
e(P, {
|
|
43
|
+
align: "left",
|
|
44
|
+
modelValue: !!l(i),
|
|
45
|
+
"onUpdate:modelValue": x
|
|
46
|
+
}, null, 8, ["modelValue"])
|
|
47
|
+
]),
|
|
48
|
+
_: 1
|
|
49
|
+
}),
|
|
50
|
+
e(n, null, {
|
|
51
|
+
default: t(() => [
|
|
52
|
+
e(p, { text: "Theme Picker" }),
|
|
53
|
+
e(D, null, {
|
|
54
|
+
default: t(() => [
|
|
55
|
+
e(l(B), null, {
|
|
56
|
+
items: t(() => [
|
|
57
|
+
(f(), y(b, null, S(k, (o) => e(l(T), {
|
|
58
|
+
key: o,
|
|
59
|
+
class: "flex gap-1.5 group/item items-center whitespace-nowrap text-ellipsis overflow-hidden",
|
|
60
|
+
onClick: C((L) => g(o), ["stop"])
|
|
61
|
+
}, {
|
|
62
|
+
default: t(() => [
|
|
63
|
+
s("div", {
|
|
64
|
+
class: $([
|
|
65
|
+
"flex items-center justify-center rounded-full p-[3px] w-4 h-4 group-hover/item:shadow-border",
|
|
66
|
+
l(r).themeId === o ? "bg-blue text-b-1" : "text-transparent"
|
|
67
|
+
])
|
|
68
|
+
}, [
|
|
69
|
+
e(l(d), {
|
|
70
|
+
class: "size-2.5",
|
|
71
|
+
icon: "Checkmark",
|
|
72
|
+
thickness: "3.5"
|
|
73
|
+
})
|
|
74
|
+
], 2),
|
|
75
|
+
a(" " + u(l(_)[o]), 1)
|
|
76
|
+
]),
|
|
77
|
+
_: 2
|
|
78
|
+
}, 1032, ["onClick"])), 64))
|
|
79
|
+
]),
|
|
80
|
+
default: t(() => [
|
|
81
|
+
e(l(U), {
|
|
82
|
+
class: "font-normal h-full justify-start py-1.5 px-1.5 text-c-1 hover:bg-b-2 w-fit",
|
|
83
|
+
fullWidth: "",
|
|
84
|
+
variant: "ghost"
|
|
85
|
+
}, {
|
|
86
|
+
default: t(() => [
|
|
87
|
+
s("h2", j, [
|
|
88
|
+
a(u(l(_)[l(r).themeId]) + " ", 1),
|
|
89
|
+
e(l(d), {
|
|
90
|
+
class: "size-2.5",
|
|
91
|
+
icon: "ChevronDown",
|
|
92
|
+
thickness: "3.5"
|
|
93
|
+
})
|
|
94
|
+
])
|
|
95
|
+
]),
|
|
96
|
+
_: 1
|
|
97
|
+
})
|
|
98
|
+
]),
|
|
99
|
+
_: 1
|
|
100
|
+
})
|
|
101
|
+
]),
|
|
102
|
+
_: 1
|
|
103
|
+
})
|
|
104
|
+
]),
|
|
105
|
+
_: 1
|
|
106
|
+
}),
|
|
107
|
+
e(n, null, {
|
|
108
|
+
default: t(() => [
|
|
109
|
+
e(I)
|
|
110
|
+
]),
|
|
111
|
+
_: 1
|
|
112
|
+
})
|
|
113
|
+
]),
|
|
114
|
+
_: 1
|
|
115
|
+
})
|
|
116
|
+
])
|
|
117
|
+
]),
|
|
118
|
+
_: 1
|
|
119
|
+
}));
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
export {
|
|
123
|
+
Y as default
|
|
124
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
2
|
+
export default _default;
|
|
3
|
+
//# sourceMappingURL=SettingsGeneralMode.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SettingsGeneralMode.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Settings/SettingsGeneralMode.vue"],"names":[],"mappings":";AAgUA,wBAKG"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { defineComponent as u, ref as d, openBlock as p, createElementBlock as _, Fragment as h, createVNode as e, withCtx as o, unref as r, withModifiers as n, createTextVNode as a, createElementVNode as k, toDisplayString as v } from "vue";
|
|
2
|
+
import M from "../../components/DataTable/DataTableCell.vue.js";
|
|
3
|
+
import S from "../../components/DataTable/DataTableText.vue.js";
|
|
4
|
+
import { ScalarDropdown as D, ScalarDropdownItem as s, ScalarButton as g, ScalarIcon as x } from "@scalar/components";
|
|
5
|
+
import { useDarkModeState as y } from "../../hooks/useDarkModeState.js";
|
|
6
|
+
const w = { class: "font-medium m-0 text-sm flex gap-1.5 items-center" }, I = /* @__PURE__ */ u({
|
|
7
|
+
__name: "SettingsGeneralMode",
|
|
8
|
+
setup(C) {
|
|
9
|
+
const { colorMode: c, setDarkMode: l } = y(), t = d("System Preference");
|
|
10
|
+
c.value === "system" ? t.value = "System Preference" : c.value === "dark" ? t.value = "Dark" : t.value = "Light";
|
|
11
|
+
const i = () => {
|
|
12
|
+
l(null), t.value = "System Preference";
|
|
13
|
+
}, f = () => {
|
|
14
|
+
l(!1), t.value = "Light";
|
|
15
|
+
}, m = () => {
|
|
16
|
+
l(!0), t.value = "Dark";
|
|
17
|
+
};
|
|
18
|
+
return (P, L) => (p(), _(h, null, [
|
|
19
|
+
e(S, { text: "Mode" }),
|
|
20
|
+
e(M, null, {
|
|
21
|
+
default: o(() => [
|
|
22
|
+
e(r(D), null, {
|
|
23
|
+
items: o(() => [
|
|
24
|
+
e(r(s), {
|
|
25
|
+
onClick: n(i, ["stop"])
|
|
26
|
+
}, {
|
|
27
|
+
default: o(() => [
|
|
28
|
+
a(" System Preference ")
|
|
29
|
+
]),
|
|
30
|
+
_: 1
|
|
31
|
+
}),
|
|
32
|
+
e(r(s), {
|
|
33
|
+
onClick: n(f, ["stop"])
|
|
34
|
+
}, {
|
|
35
|
+
default: o(() => [
|
|
36
|
+
a(" Light Mode ")
|
|
37
|
+
]),
|
|
38
|
+
_: 1
|
|
39
|
+
}),
|
|
40
|
+
e(r(s), {
|
|
41
|
+
onClick: n(m, ["stop"])
|
|
42
|
+
}, {
|
|
43
|
+
default: o(() => [
|
|
44
|
+
a(" Dark Mode ")
|
|
45
|
+
]),
|
|
46
|
+
_: 1
|
|
47
|
+
})
|
|
48
|
+
]),
|
|
49
|
+
default: o(() => [
|
|
50
|
+
e(r(g), {
|
|
51
|
+
class: "font-normal h-full justify-start py-1.5 px-1.5 text-c-1 hover:bg-b-2 w-fit",
|
|
52
|
+
fullWidth: "",
|
|
53
|
+
variant: "ghost"
|
|
54
|
+
}, {
|
|
55
|
+
default: o(() => [
|
|
56
|
+
k("h2", w, [
|
|
57
|
+
a(v(t.value) + " ", 1),
|
|
58
|
+
e(r(x), {
|
|
59
|
+
class: "size-2.5",
|
|
60
|
+
icon: "ChevronDown",
|
|
61
|
+
thickness: "3.5"
|
|
62
|
+
})
|
|
63
|
+
])
|
|
64
|
+
]),
|
|
65
|
+
_: 1
|
|
66
|
+
})
|
|
67
|
+
]),
|
|
68
|
+
_: 1
|
|
69
|
+
})
|
|
70
|
+
]),
|
|
71
|
+
_: 1
|
|
72
|
+
})
|
|
73
|
+
], 64));
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
export {
|
|
77
|
+
I as default
|
|
78
|
+
};
|