@scalar/api-client 2.1.52 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBar.vue.js +1 -1
- package/dist/components/AddressBar/AddressBar.vue2.js +35 -42
- package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarHistory.vue.js +2 -2
- package/dist/components/AddressBar/AddressBarHistory.vue2.js +25 -24
- package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarServer.vue.js +32 -39
- package/dist/components/AddressBar/AddressBarServerItem.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarServerItem.vue.js +10 -15
- 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 +48 -47
- package/dist/components/CodeInput/codeVariableWidget.d.ts +3 -2
- package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +15 -14
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteExample.vue.js +18 -23
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +27 -26
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +19 -20
- package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteServer.vue.js +19 -24
- package/dist/components/CommandPalette/CommandPaletteTag.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteTag.vue.js +23 -22
- 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 +47 -46
- package/dist/components/DataTable/DataTableInput.vue.d.ts +1 -1
- package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +23 -28
- 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 +127 -96
- package/dist/components/ImportCollection/ImportNowButton.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportNowButton.vue.js +28 -27
- package/dist/components/ImportCollection/IntegrationLogo.vue.d.ts +1 -1
- package/dist/components/ImportCollection/IntegrationLogo.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/IntegrationLogo.vue.js +14 -18
- package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/WorkspaceSelector.vue.js +15 -14
- package/dist/components/Search/useSearch.d.ts.map +1 -1
- package/dist/components/Search/useSearch.js +20 -19
- package/dist/components/SideNav/SideNavRouterLink.vue.js +9 -9
- package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNav.vue.js +1 -1
- package/dist/components/TopNav/TopNav.vue2.js +20 -19
- package/dist/components/TopNav/TopNavItem.vue.d.ts +2 -2
- package/dist/hooks/index.js +3 -2
- package/dist/hooks/useLayout.d.ts +2 -0
- package/dist/hooks/useLayout.d.ts.map +1 -1
- package/dist/hooks/useLayout.js +4 -3
- package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
- package/dist/layouts/App/ApiClientApp.vue.js +38 -37
- package/dist/layouts/App/MainLayout.vue.d.ts.map +1 -1
- package/dist/layouts/App/MainLayout.vue.js +3 -3
- package/dist/layouts/App/create-api-client-app.d.ts +669 -1232
- 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 +24 -23
- package/dist/layouts/Modal/create-api-client-modal.d.ts +1382 -2508
- 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 +34 -33
- package/dist/layouts/Web/create-api-client-web.d.ts +669 -1232
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +673 -1236
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +91 -102
- package/dist/libs/hot-keys.d.ts +1 -1
- package/dist/libs/send-request.d.ts +2 -3
- package/dist/libs/send-request.d.ts.map +1 -1
- package/dist/libs/send-request.js +127 -123
- package/dist/store/active-entities.d.ts +333 -0
- package/dist/store/active-entities.d.ts.map +1 -0
- package/dist/store/active-entities.js +97 -0
- package/dist/store/collections.d.ts +4 -274
- package/dist/store/collections.d.ts.map +1 -1
- package/dist/store/cookies.d.ts +4 -4
- package/dist/store/environment.d.ts +4 -4
- package/dist/store/import-spec.d.ts +0 -54
- package/dist/store/import-spec.d.ts.map +1 -1
- package/dist/store/index.js +4 -3
- package/dist/store/request-example.d.ts +4 -4
- package/dist/store/requests.d.ts +15 -15
- package/dist/store/security-schemes.d.ts +527 -317
- package/dist/store/security-schemes.d.ts.map +1 -1
- package/dist/store/security-schemes.js +33 -41
- package/dist/store/servers.d.ts +4 -4
- package/dist/store/store-context.d.ts +0 -3
- package/dist/store/store-context.d.ts.map +1 -1
- package/dist/store/store.d.ts +640 -5297
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/store.js +111 -189
- package/dist/store/tags.d.ts +4 -4
- package/dist/store/workspace.d.ts +14 -24
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/views/Cookies/CookieForm.vue.d.ts.map +1 -1
- package/dist/views/Cookies/CookieForm.vue.js +14 -13
- package/dist/views/Cookies/CookieRaw.vue.d.ts.map +1 -1
- package/dist/views/Cookies/CookieRaw.vue.js +14 -13
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts +3 -3
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.js +2 -2
- package/dist/views/Request/Request.vue2.js +92 -92
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +96 -99
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +49 -46
- 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 +94 -100
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.js +60 -67
- package/dist/views/Request/RequestSection/RequestAuthDataTableInput.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuthDataTableInput.vue.d.ts.map +1 -1
- 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 +29 -28
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.js +11 -10
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestPathParams.vue.js +24 -28
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +19 -18
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +2 -2
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.js +1 -1
- package/dist/views/Request/RequestSidebar.vue2.js +72 -73
- 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 +111 -109
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +2 -2
- package/dist/views/Request/RequestSidebarItemMenu.vue2.js +15 -16
- package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue2.js +14 -14
- 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 +23 -22
- package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +32 -31
- package/dist/views/Request/consts/new-auth-options.d.ts +16 -8
- package/dist/views/Request/consts/new-auth-options.d.ts.map +1 -1
- package/dist/views/Request/consts/new-auth-options.js +16 -8
- package/dist/views/Request/handle-drag.d.ts +2 -1
- package/dist/views/Request/handle-drag.d.ts.map +1 -1
- package/dist/views/Request/handle-drag.js +23 -25
- package/dist/views/Request/hooks/useOpenApiWatcher.d.ts.map +1 -1
- package/dist/views/Request/hooks/useOpenApiWatcher.js +40 -39
- package/dist/views/Request/libs/auth.d.ts +1 -29
- package/dist/views/Request/libs/auth.d.ts.map +1 -1
- package/dist/views/Request/libs/auth.js +2 -9
- package/dist/views/Request/libs/index.js +6 -8
- package/dist/views/Request/libs/live-sync.d.ts +6 -5
- package/dist/views/Request/libs/live-sync.d.ts.map +1 -1
- package/dist/views/Request/libs/live-sync.js +164 -185
- package/dist/views/Request/libs/oauth2.d.ts +6 -10
- package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
- package/dist/views/Request/libs/oauth2.js +54 -69
- package/dist/views/Servers/ServerForm.vue.d.ts.map +1 -1
- package/dist/views/Servers/ServerForm.vue.js +14 -13
- package/dist/views/Servers/Servers.vue.d.ts.map +1 -1
- package/dist/views/Servers/Servers.vue2.js +18 -17
- package/dist/views/Settings/SettingsGeneral.vue.d.ts.map +1 -1
- package/dist/views/Settings/SettingsGeneral.vue.js +218 -126
- package/dist/views/Settings/{SettingsGeneralMode.vue.d.ts → components/SettingsAppearance.vue.d.ts} +2 -2
- package/dist/views/Settings/components/SettingsAppearance.vue.d.ts.map +1 -0
- package/dist/views/Settings/components/SettingsAppearance.vue.js +74 -0
- package/dist/views/Settings/components/SettingsAppearance.vue2.js +4 -0
- package/dist/views/Settings/components/SettingsSection.vue.d.ts +24 -0
- package/dist/views/Settings/components/SettingsSection.vue.d.ts.map +1 -0
- package/dist/views/Settings/components/SettingsSection.vue.js +24 -0
- package/dist/views/Settings/components/SettingsSection.vue2.js +4 -0
- package/package.json +8 -8
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthModal.vue.d.ts +0 -16
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthModal.vue.d.ts.map +0 -1
- package/dist/views/Settings/SettingsGeneralMode.vue.d.ts.map +0 -1
- package/dist/views/Settings/SettingsGeneralMode.vue.js +0 -78
- package/dist/views/Settings/SettingsGeneralMode.vue2.js +0 -4
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import w from "
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { useActiveEntities as w } from "../../store/active-entities.js";
|
|
2
|
+
import T from "fuse.js";
|
|
3
|
+
import { ref as a, watch as W, computed as x, nextTick as A } from "vue";
|
|
4
|
+
import { useRouter as E } from "vue-router";
|
|
5
|
+
import { useWorkspace as I } from "../../store/store.js";
|
|
6
|
+
function M() {
|
|
7
|
+
const m = E(), { activeWorkspace: f, activeWorkspaceRequests: d } = w(), { requests: R } = I(), o = a([]), u = a([]), s = a(0), c = a(""), l = a(null), n = a([]), i = new T(o.value, {
|
|
7
8
|
keys: ["title", "description", "body"]
|
|
8
9
|
}), k = () => {
|
|
9
|
-
|
|
10
|
+
c.value = "", s.value = 0, u.value = [], l.value instanceof HTMLInputElement && l.value.blur();
|
|
10
11
|
}, S = (t) => {
|
|
11
12
|
o.value = t.map((e) => ({
|
|
12
13
|
id: e.uid,
|
|
@@ -17,10 +18,10 @@ function H() {
|
|
|
17
18
|
link: `/workspace/${f.value.uid}/request/${e.uid}`
|
|
18
19
|
})), i.setCollection(o.value);
|
|
19
20
|
}, b = () => {
|
|
20
|
-
s.value = 0,
|
|
21
|
+
s.value = 0, u.value = i.search(c.value);
|
|
21
22
|
}, y = (t) => {
|
|
22
|
-
const e = t === "up" ? -1 : 1,
|
|
23
|
-
s.value = (s.value + e +
|
|
23
|
+
const e = t === "up" ? -1 : 1, h = r.value.length;
|
|
24
|
+
s.value = (s.value + e + h) % h, A(() => {
|
|
24
25
|
const p = n.value[s.value];
|
|
25
26
|
p instanceof HTMLElement && p.scrollIntoView({
|
|
26
27
|
behavior: "smooth",
|
|
@@ -28,29 +29,29 @@ function H() {
|
|
|
28
29
|
});
|
|
29
30
|
});
|
|
30
31
|
}, g = () => {
|
|
31
|
-
s.value >= 0 &&
|
|
32
|
+
s.value >= 0 && v(
|
|
32
33
|
r.value[s.value]
|
|
33
34
|
);
|
|
34
35
|
};
|
|
35
|
-
|
|
36
|
+
W(
|
|
36
37
|
d,
|
|
37
38
|
(t) => {
|
|
38
39
|
S(t.map((e) => R[e]));
|
|
39
40
|
},
|
|
40
41
|
{ immediate: !0 }
|
|
41
42
|
);
|
|
42
|
-
const
|
|
43
|
+
const v = (t) => {
|
|
43
44
|
m.push(t.item.id), k();
|
|
44
|
-
}, r =
|
|
45
|
-
() =>
|
|
45
|
+
}, r = x(
|
|
46
|
+
() => c.value.length === 0 ? o.value.map((t) => ({
|
|
46
47
|
item: t
|
|
47
|
-
})) :
|
|
48
|
+
})) : u.value
|
|
48
49
|
);
|
|
49
50
|
return {
|
|
50
|
-
searchText:
|
|
51
|
+
searchText: c,
|
|
51
52
|
searchResultsWithPlaceholderResults: r,
|
|
52
53
|
selectedSearchResult: s,
|
|
53
|
-
onSearchResultClick:
|
|
54
|
+
onSearchResultClick: v,
|
|
54
55
|
fuseSearch: b,
|
|
55
56
|
searchInputRef: l,
|
|
56
57
|
searchResultRefs: n,
|
|
@@ -59,5 +60,5 @@ function H() {
|
|
|
59
60
|
};
|
|
60
61
|
}
|
|
61
62
|
export {
|
|
62
|
-
|
|
63
|
+
M as useSearch
|
|
63
64
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as i, openBlock as n, createBlock as r, unref as o, withCtx as a, renderSlot as c } from "vue";
|
|
2
|
+
import s from "./SideNavLink.vue.js";
|
|
3
|
+
import { useActiveEntities as p } from "../../store/active-entities.js";
|
|
4
|
+
import { RouterLink as m } from "vue-router";
|
|
5
|
+
const k = /* @__PURE__ */ i({
|
|
6
6
|
__name: "SideNavRouterLink",
|
|
7
7
|
props: {
|
|
8
8
|
icon: {},
|
|
@@ -10,9 +10,9 @@ const v = /* @__PURE__ */ r({
|
|
|
10
10
|
active: { type: Boolean }
|
|
11
11
|
},
|
|
12
12
|
setup(f) {
|
|
13
|
-
const { activeWorkspace: t } =
|
|
14
|
-
return (e, u) => (
|
|
15
|
-
is: o(
|
|
13
|
+
const { activeWorkspace: t } = p();
|
|
14
|
+
return (e, u) => (n(), r(s, {
|
|
15
|
+
is: o(m),
|
|
16
16
|
active: e.active,
|
|
17
17
|
icon: e.icon,
|
|
18
18
|
to: `/workspace/${o(t).uid}/${e.name}`
|
|
@@ -25,5 +25,5 @@ const v = /* @__PURE__ */ r({
|
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
27
|
export {
|
|
28
|
-
|
|
28
|
+
k as default
|
|
29
29
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopNav.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TopNav/TopNav.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TopNav.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TopNav/TopNav.vue"],"names":[],"mappings":"AAiRA,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;CACjD,CAAC;;AAkaF,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./TopNav.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-4e5c93a2"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as $, reactive as z, ref as E, computed as M, watch as w, onMounted as j, onBeforeUnmount as B, openBlock as m, createElementBlock as b, createElementVNode as f, createVNode as n, unref as l, withCtx as u, toDisplayString as O, createTextVNode as x, Fragment as V, renderList as D, createBlock as K } from "vue";
|
|
2
2
|
import q from "../ScalarHotkey.vue.js";
|
|
3
3
|
import { ROUTES as F } from "../../constants.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import P from "
|
|
8
|
-
import
|
|
9
|
-
|
|
4
|
+
import { useActiveEntities as H } from "../../store/active-entities.js";
|
|
5
|
+
import { ScalarContextMenu as W, ScalarIcon as d, ScalarDropdown as G, ScalarDropdownItem as _ } from "@scalar/components";
|
|
6
|
+
import { capitalize as J } from "@scalar/oas-utils/helpers";
|
|
7
|
+
import { useClipboard as P } from "@scalar/use-hooks/useClipboard";
|
|
8
|
+
import Q from "./TopNavItem.vue.js";
|
|
9
|
+
import { useWorkspace as X } from "../../store/store.js";
|
|
10
|
+
const Y = { class: "flex h-10 t-app__top-nav" }, Z = { class: "flex h-10 flex-1 items-center gap-1.5 text-sm font-medium pr-2.5 relative overflow-hidden" }, ee = {
|
|
10
11
|
key: 0,
|
|
11
12
|
class: "h-full w-full overflow-hidden"
|
|
12
|
-
},
|
|
13
|
+
}, ue = /* @__PURE__ */ $({
|
|
13
14
|
__name: "TopNav",
|
|
14
15
|
props: {
|
|
15
16
|
openNewTab: {}
|
|
16
17
|
},
|
|
17
18
|
setup(I) {
|
|
18
|
-
const L = I, { activeRequest: S, router: i, events: g } =
|
|
19
|
+
const L = I, { activeRequest: S, router: i } = H(), { events: g } = X(), { copyToClipboard: U } = P(), t = z([{ label: "", path: "", icon: "Add" }]), a = E(0), T = M(() => a.value);
|
|
19
20
|
function k() {
|
|
20
21
|
var o;
|
|
21
22
|
const e = F.find((c) => i.currentRoute.value.name == c.name);
|
|
@@ -24,7 +25,7 @@ const X = { class: "flex h-10 t-app__top-nav" }, Y = { class: "flex h-10 flex-1
|
|
|
24
25
|
path: i.currentRoute.value.path,
|
|
25
26
|
icon: e.icon
|
|
26
27
|
} : t[a.value] = {
|
|
27
|
-
label:
|
|
28
|
+
label: J(e == null ? void 0 : e.name) || "",
|
|
28
29
|
path: i.currentRoute.value.path,
|
|
29
30
|
icon: e.icon
|
|
30
31
|
});
|
|
@@ -64,7 +65,7 @@ const X = { class: "flex h-10 t-app__top-nav" }, Y = { class: "flex h-10 flex-1
|
|
|
64
65
|
}
|
|
65
66
|
e.jumpToLastTab && r(t.length - 1);
|
|
66
67
|
}
|
|
67
|
-
},
|
|
68
|
+
}, A = (e) => {
|
|
68
69
|
t.push({
|
|
69
70
|
label: e.name,
|
|
70
71
|
path: e.uid,
|
|
@@ -74,14 +75,14 @@ const X = { class: "flex h-10 t-app__top-nav" }, Y = { class: "flex h-10 flex-1
|
|
|
74
75
|
return w(
|
|
75
76
|
() => L.openNewTab,
|
|
76
77
|
(e) => {
|
|
77
|
-
e &&
|
|
78
|
+
e && A(e);
|
|
78
79
|
},
|
|
79
80
|
{ immediate: !0 }
|
|
80
|
-
),
|
|
81
|
+
), j(() => g.hotKeys.on(C)), B(() => g.hotKeys.off(C)), (e, o) => (m(), b("nav", Y, [
|
|
81
82
|
o[3] || (o[3] = f("div", { class: "t-app__top-nav-draggable" }, null, -1)),
|
|
82
|
-
f("div",
|
|
83
|
-
t.length === 1 ? (m(), b("div",
|
|
84
|
-
n(l(
|
|
83
|
+
f("div", Z, [
|
|
84
|
+
t.length === 1 ? (m(), b("div", ee, [
|
|
85
|
+
n(l(W), { triggerClass: "flex custom-scroll gap-1.5 h-full items-center justify-center w-full whitespace-nowrap" }, {
|
|
85
86
|
trigger: u(() => [
|
|
86
87
|
n(l(d), {
|
|
87
88
|
icon: t[0].icon,
|
|
@@ -91,7 +92,7 @@ const X = { class: "flex h-10 t-app__top-nav" }, Y = { class: "flex h-10 flex-1
|
|
|
91
92
|
f("span", null, O(t[0].label), 1)
|
|
92
93
|
]),
|
|
93
94
|
content: u(() => [
|
|
94
|
-
n(l(
|
|
95
|
+
n(l(G), {
|
|
95
96
|
class: "scalar-client",
|
|
96
97
|
static: ""
|
|
97
98
|
}, {
|
|
@@ -134,7 +135,7 @@ const X = { class: "flex h-10 t-app__top-nav" }, Y = { class: "flex h-10 flex-1
|
|
|
134
135
|
]),
|
|
135
136
|
_: 1
|
|
136
137
|
})
|
|
137
|
-
])) : (m(!0), b(V, { key: 1 }, D(t, (c, s) => (m(), K(
|
|
138
|
+
])) : (m(!0), b(V, { key: 1 }, D(t, (c, s) => (m(), K(Q, {
|
|
138
139
|
key: s,
|
|
139
140
|
active: s === T.value,
|
|
140
141
|
hotkey: (s + 1).toString(),
|
|
@@ -162,5 +163,5 @@ const X = { class: "flex h-10 t-app__top-nav" }, Y = { class: "flex h-10 flex-1
|
|
|
162
163
|
}
|
|
163
164
|
});
|
|
164
165
|
export {
|
|
165
|
-
|
|
166
|
+
ue as default
|
|
166
167
|
};
|
|
@@ -6,14 +6,14 @@ type __VLS_Props = {
|
|
|
6
6
|
icon: Icon;
|
|
7
7
|
};
|
|
8
8
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
9
|
-
click: () => any;
|
|
10
9
|
close: () => any;
|
|
10
|
+
click: () => any;
|
|
11
11
|
newTab: () => any;
|
|
12
12
|
copyUrl: () => any;
|
|
13
13
|
closeOtherTabs: () => any;
|
|
14
14
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
15
|
-
onClick?: (() => any) | undefined;
|
|
16
15
|
onClose?: (() => any) | undefined;
|
|
16
|
+
onClick?: (() => any) | undefined;
|
|
17
17
|
onNewTab?: (() => any) | undefined;
|
|
18
18
|
onCopyUrl?: (() => any) | undefined;
|
|
19
19
|
onCloseOtherTabs?: (() => any) | undefined;
|
package/dist/hooks/index.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { keyMap as r } from "./useKeyMap.js";
|
|
2
2
|
import { useFileDialog as t } from "./useFileDialog.js";
|
|
3
3
|
import { useSidebar as f } from "./useSidebar.js";
|
|
4
|
-
import {
|
|
4
|
+
import { LAYOUT_SYMBOL as u, useLayout as x } from "./useLayout.js";
|
|
5
5
|
export {
|
|
6
|
+
u as LAYOUT_SYMBOL,
|
|
6
7
|
r as keyMap,
|
|
7
8
|
t as useFileDialog,
|
|
8
|
-
|
|
9
|
+
x as useLayout,
|
|
9
10
|
f as useSidebar
|
|
10
11
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLayout.d.ts","sourceRoot":"","sources":["../../src/hooks/useLayout.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useLayout.d.ts","sourceRoot":"","sources":["../../src/hooks/useLayout.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,YAAY,EAAU,MAAM,KAAK,CAAA;AAE/C;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,KAAK,GAAG,SAAS,CAAA;AACtD,eAAO,MAAM,aAAa,EAAe,YAAY,CAAC,YAAY,CAAC,CAAA;AAEnE;;;;GAIG;AACH,eAAO,MAAM,SAAS;;CAEpB,CAAA"}
|
package/dist/hooks/useLayout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiClientApp.vue.d.ts","sourceRoot":"","sources":["../../../src/layouts/App/ApiClientApp.vue"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"ApiClientApp.vue.d.ts","sourceRoot":"","sources":["../../../src/layouts/App/ApiClientApp.vue"],"names":[],"mappings":";;cAgI8B,MAAM;aAAO,MAAM;;;;cAAnB,MAAM;aAAO,MAAM;;;AA8KjD,wBAMG"}
|
|
@@ -1,58 +1,59 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
1
|
+
import { defineComponent as T, ref as _, onBeforeMount as y, onMounted as h, onBeforeUnmount as v, computed as K, openBlock as t, createElementBlock as C, Fragment as k, createElementVNode as E, createVNode as r, unref as a, createBlock as m, withCtx as p, KeepAlive as N, resolveDynamicComponent as H, createCommentVNode as b } from "vue";
|
|
2
|
+
import A from "../../components/TopNav/TopNav.vue.js";
|
|
3
|
+
import S from "./MainLayout.vue.js";
|
|
4
|
+
import { useActiveEntities as B } from "../../store/active-entities.js";
|
|
5
|
+
import { addScalarClassesToHeadless as D } from "@scalar/components";
|
|
6
|
+
import { getThemeStyles as L } from "@scalar/themes";
|
|
7
|
+
import { useColorMode as M } from "@scalar/use-hooks/useColorMode";
|
|
8
|
+
import { ScalarToasts as P } from "@scalar/use-toasts";
|
|
9
|
+
import { RouterView as V } from "vue-router";
|
|
10
|
+
import { APP_HOTKEYS as g } from "./hotkeys.js";
|
|
11
|
+
import { DEFAULT_HOTKEYS as x, handleHotKeyDown as F } from "../../libs/hot-keys.js";
|
|
12
|
+
import { useWorkspace as O } from "../../store/store.js";
|
|
13
|
+
const U = ["innerHTML"], oe = /* @__PURE__ */ T({
|
|
13
14
|
__name: "ApiClientApp",
|
|
14
15
|
emits: ["newTab"],
|
|
15
|
-
setup(
|
|
16
|
-
const d = { ...
|
|
16
|
+
setup(W) {
|
|
17
|
+
const d = { ...x, ...g }, l = _(null), u = (e) => {
|
|
17
18
|
l.value = e;
|
|
18
19
|
};
|
|
19
|
-
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
const s = (e) =>
|
|
23
|
-
e && e.openCommandPalette && (e.openCommandPalette.preventDefault(),
|
|
20
|
+
M();
|
|
21
|
+
const { activeWorkspace: n } = B(), { events: o } = O();
|
|
22
|
+
y(() => D());
|
|
23
|
+
const s = (e) => F(e, o.hotKeys, { hotKeys: d }), i = (e) => {
|
|
24
|
+
e && e.openCommandPalette && (e.openCommandPalette.preventDefault(), o.commandPalette.emit());
|
|
24
25
|
};
|
|
25
|
-
|
|
26
|
-
window.addEventListener("keydown", s),
|
|
27
|
-
}),
|
|
28
|
-
window.removeEventListener("keydown", s),
|
|
26
|
+
h(() => {
|
|
27
|
+
window.addEventListener("keydown", s), o.hotKeys.on(i);
|
|
28
|
+
}), v(() => {
|
|
29
|
+
window.removeEventListener("keydown", s), o.hotKeys.off(i);
|
|
29
30
|
});
|
|
30
|
-
const f =
|
|
31
|
-
() =>
|
|
31
|
+
const f = K(
|
|
32
|
+
() => n.value && `<style>${L(n.value.themeId)}</style>`
|
|
32
33
|
);
|
|
33
|
-
return (e,
|
|
34
|
-
var
|
|
35
|
-
return
|
|
36
|
-
|
|
37
|
-
r(
|
|
38
|
-
(
|
|
34
|
+
return (e, Y) => {
|
|
35
|
+
var c;
|
|
36
|
+
return t(), C(k, null, [
|
|
37
|
+
E("div", { innerHTML: f.value }, null, 8, U),
|
|
38
|
+
r(A, { openNewTab: l.value }, null, 8, ["openNewTab"]),
|
|
39
|
+
(c = a(n)) != null && c.uid ? (t(), m(S, { key: 0 }, {
|
|
39
40
|
default: p(() => [
|
|
40
|
-
r(a(
|
|
41
|
+
r(a(V), { onNewTab: u }, {
|
|
41
42
|
default: p(({ Component: w }) => [
|
|
42
|
-
(
|
|
43
|
-
(
|
|
43
|
+
(t(), m(N, null, [
|
|
44
|
+
(t(), m(H(w)))
|
|
44
45
|
], 1024))
|
|
45
46
|
]),
|
|
46
47
|
_: 1
|
|
47
48
|
})
|
|
48
49
|
]),
|
|
49
50
|
_: 1
|
|
50
|
-
})) :
|
|
51
|
-
r(a(
|
|
51
|
+
})) : b("", !0),
|
|
52
|
+
r(a(P))
|
|
52
53
|
], 64);
|
|
53
54
|
};
|
|
54
55
|
}
|
|
55
56
|
});
|
|
56
57
|
export {
|
|
57
|
-
|
|
58
|
+
oe as default
|
|
58
59
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MainLayout.vue.d.ts","sourceRoot":"","sources":["../../../src/layouts/App/MainLayout.vue"],"names":[],"mappings":"AA0CA,iBAAS,cAAc;
|
|
1
|
+
{"version":3,"file":"MainLayout.vue.d.ts","sourceRoot":"","sources":["../../../src/layouts/App/MainLayout.vue"],"names":[],"mappings":"AA0CA,iBAAS,cAAc;WAoET,OAAO,IAA6B;;yBARpB,GAAG;;;;EAahC;AAUD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,+QAKnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAKpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as s, openBlock as
|
|
1
|
+
import { defineComponent as s, openBlock as n, createElementBlock as t, normalizeClass as r, unref as e, createVNode as m, createElementVNode as a, renderSlot as f } from "vue";
|
|
2
2
|
import c from "../../components/SideNav/SideNav.vue.js";
|
|
3
3
|
import d from "../../components/CommandPalette/TheCommandPalette.vue.js";
|
|
4
4
|
import { useLayout as i } from "../../hooks/useLayout.js";
|
|
@@ -6,10 +6,10 @@ const b = /* @__PURE__ */ s({
|
|
|
6
6
|
__name: "MainLayout",
|
|
7
7
|
setup(u) {
|
|
8
8
|
const { layout: o } = i();
|
|
9
|
-
return (l, p) => (
|
|
9
|
+
return (l, p) => (n(), t("main", {
|
|
10
10
|
class: r(["flex flex-col sm:flex-row min-h-0 flex-1", e(o) === "web" ? "sm:flex-col" : "sm:flex-row"])
|
|
11
11
|
}, [
|
|
12
|
-
m(c, { class: "order-last sm:order-none" }),
|
|
12
|
+
m(c, { class: "order-last sm:order-none sidenav" }),
|
|
13
13
|
m(e(d)),
|
|
14
14
|
a("div", {
|
|
15
15
|
class: r(["flex flex-1 flex-col min-w-0 min-h-0", {
|