@scalar/api-client 2.0.46 → 2.0.48
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 +44 -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 +77 -71
- package/dist/components/CodeInput/CodeInput.vue.d.ts +3 -1
- 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 +49 -44
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +2 -2
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +97 -106
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.js +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue2.js +10 -10
- package/dist/components/Search/SearchModal.vue.d.ts.map +1 -1
- package/dist/components/Search/SearchModal.vue.js +1 -1
- package/dist/components/Search/SearchModal.vue2.js +43 -41
- 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 +22 -19
- package/dist/components/Sidebar/Sidebar.vue.d.ts +24 -3
- package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.js +57 -19
- 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 +1 -1
- package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts +2 -0
- package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarListElementActions.vue.js +22 -21
- 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 +46 -43
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -9
- package/dist/layouts/App/ApiClientApp.vue.js +1 -1
- package/dist/layouts/App/create-api-client-app.d.ts +56 -46
- 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 +20 -20
- package/dist/layouts/Modal/create-api-client-modal.d.ts +112 -92
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +56 -46
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/event-busses/{command-palette.d.ts → command-palette-bus.d.ts} +1 -1
- package/dist/libs/event-busses/command-palette-bus.d.ts.map +1 -0
- package/dist/libs/event-busses/{execute-requestBus.d.ts → execute-request-bus.d.ts} +1 -1
- package/dist/libs/event-busses/execute-request-bus.d.ts.map +1 -0
- package/dist/libs/event-busses/hot-keys-bus.d.ts +33 -0
- package/dist/libs/event-busses/hot-keys-bus.d.ts.map +1 -0
- package/dist/libs/event-busses/hot-keys-bus.js +33 -0
- package/dist/libs/event-busses/index.d.ts +3 -3
- package/dist/libs/event-busses/index.d.ts.map +1 -1
- package/dist/libs/event-busses/index.js +3 -3
- package/dist/libs/index.js +3 -3
- package/dist/libs/local-storage.d.ts +1 -1
- package/dist/libs/local-storage.d.ts.map +1 -1
- package/dist/libs/local-storage.js +15 -30
- package/dist/router.d.ts +2 -2
- package/dist/router.d.ts.map +1 -1
- package/dist/router.js +3 -3
- package/dist/store/workspace.d.ts +112 -92
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/store/workspace.js +140 -137
- 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 -15
- package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +114 -55
- package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
- package/dist/views/Environment/Environment.vue2.js +21 -20
- 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 +132 -128
- 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 +253 -139
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts +27 -5
- 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 +83 -158
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +214 -70
- package/package.json +6 -6
- package/dist/libs/event-busses/command-palette.d.ts.map +0 -1
- package/dist/libs/event-busses/execute-requestBus.d.ts.map +0 -1
- package/dist/libs/event-busses/hot-key.d.ts +0 -34
- package/dist/libs/event-busses/hot-key.d.ts.map +0 -1
- package/dist/libs/event-busses/hot-key.js +0 -25
- /package/dist/libs/event-busses/{command-palette.js → command-palette-bus.js} +0 -0
- /package/dist/libs/event-busses/{execute-requestBus.js → execute-request-bus.js} +0 -0
|
@@ -1,15 +1,36 @@
|
|
|
1
1
|
declare function __VLS_template(): {
|
|
2
2
|
header?(_: {}): any;
|
|
3
|
+
title?(_: {}): any;
|
|
3
4
|
content?(_: {}): any;
|
|
4
5
|
button?(_: {}): any;
|
|
5
6
|
};
|
|
6
|
-
declare const __VLS_component: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
7
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<{
|
|
7
8
|
title?: string;
|
|
8
|
-
|
|
9
|
+
showSideBar: boolean;
|
|
10
|
+
}>, {
|
|
11
|
+
showSideBar: boolean;
|
|
12
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13
|
+
"update:showSideBar": (v: boolean) => void;
|
|
14
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
|
|
9
15
|
title?: string;
|
|
10
|
-
|
|
16
|
+
showSideBar: boolean;
|
|
17
|
+
}>, {
|
|
18
|
+
showSideBar: boolean;
|
|
19
|
+
}>>> & {
|
|
20
|
+
"onUpdate:showSideBar"?: ((v: boolean) => any) | undefined;
|
|
21
|
+
}, {
|
|
22
|
+
showSideBar: boolean;
|
|
23
|
+
}, {}>;
|
|
11
24
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
12
25
|
export default _default;
|
|
26
|
+
type __VLS_WithDefaults<P, D> = {
|
|
27
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
28
|
+
default: D[K];
|
|
29
|
+
}> : P[K];
|
|
30
|
+
};
|
|
31
|
+
type __VLS_Prettify<T> = {
|
|
32
|
+
[K in keyof T]: T[K];
|
|
33
|
+
} & {};
|
|
13
34
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
14
35
|
new (): {
|
|
15
36
|
$slots: S;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/Sidebar.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Sidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/Sidebar.vue"],"names":[],"mappings":"AA+QA,iBAAS,cAAc;oBAqEK,GAAG;mBACJ,GAAG;qBACD,GAAG;oBACJ,GAAG;EAoB9B;AACD,QAAA,MAAM,eAAe;YAlMW,MAAM;iBAAe,OAAO;;;;;;YAA5B,MAAM;iBAAe,OAAO;;;;;;iBAAP,OAAO;MAyM1D,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAC1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAC7C,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KAAC,CAAC,GACvC,CAAC,CAAC,CAAC,CAAC;CACP,CAAC;AAEN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC;AAExD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC;AAEN,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
|
@@ -1,31 +1,69 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useWorkspace as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as B, ref as n, watch as L, onMounted as W, withDirectives as k, openBlock as h, createElementBlock as v, normalizeClass as g, normalizeStyle as D, renderSlot as a, unref as b, createElementVNode as i, createCommentVNode as I, vShow as _ } from "vue";
|
|
2
|
+
import { useWorkspace as $ } from "../../store/workspace.js";
|
|
3
|
+
const C = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "xl:min-h-header py-2.5 flex items-center border-b-1/2 px-4 text-sm"
|
|
6
|
-
},
|
|
6
|
+
}, z = { class: "font-medium m-0 text-sm whitespace-nowrap" }, X = /* @__PURE__ */ B({
|
|
7
7
|
__name: "Sidebar",
|
|
8
8
|
props: {
|
|
9
|
-
title: {}
|
|
9
|
+
title: {},
|
|
10
|
+
showSideBar: { type: Boolean, default: !0 }
|
|
10
11
|
},
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
emits: ["update:showSideBar"],
|
|
13
|
+
setup(w, { emit: S }) {
|
|
14
|
+
const d = w, l = S, { isReadOnly: c } = $(), r = n(!1), m = n(null), s = n(localStorage.getItem("sidebarWidth") || "280px"), u = () => {
|
|
15
|
+
(s.value === "0px" || localStorage.getItem("sidebarWidth") === "0px") && (s.value = "280px");
|
|
16
|
+
}, x = (e) => {
|
|
17
|
+
e.preventDefault();
|
|
18
|
+
const o = e.clientX, y = parseInt(
|
|
19
|
+
getComputedStyle(m.value).width || "280px",
|
|
20
|
+
10
|
|
21
|
+
), p = (E) => {
|
|
22
|
+
r.value = !0, document.body.classList.add("dragging");
|
|
23
|
+
let t = y + E.clientX - o;
|
|
24
|
+
t > 420 && (t = 420 + (t - 420) * 0.2), t < 240 ? (t = 0, l("update:showSideBar", !1)) : l("update:showSideBar", !0), s.value = `${t}px`, localStorage.setItem("sidebarWidth", `${Math.min(t, 420)}px`);
|
|
25
|
+
}, f = () => {
|
|
26
|
+
r.value = !1, document.body.classList.remove("dragging"), document.documentElement.removeEventListener("mousemove", p, !1), document.documentElement.removeEventListener("mouseup", f, !1), parseInt(s.value, 10) > 420 && (s.value = "360px");
|
|
27
|
+
};
|
|
28
|
+
document.documentElement.addEventListener("mousemove", p, !1), document.documentElement.addEventListener("mouseup", f, !1);
|
|
29
|
+
};
|
|
30
|
+
return L(
|
|
31
|
+
() => d.showSideBar,
|
|
32
|
+
(e) => {
|
|
33
|
+
const o = document.querySelector(".sidebar");
|
|
34
|
+
o && (e ? o.classList.remove("blur-content") : (o.classList.add("blur-content"), document.body.classList.remove("dragging"))), u();
|
|
35
|
+
}
|
|
36
|
+
), W(() => {
|
|
37
|
+
u();
|
|
38
|
+
}), (e, o) => k((h(), v("aside", {
|
|
39
|
+
ref_key: "sidebarRef",
|
|
40
|
+
ref: m,
|
|
41
|
+
class: g(["sidebar overflow-hidden relative flex flex-col border-r-1/2 bg-b-1", { dragging: r.value }]),
|
|
42
|
+
style: D({ width: s.value })
|
|
43
|
+
}, [
|
|
44
|
+
a(e.$slots, "header"),
|
|
45
|
+
!b(c) && e.title ? (h(), v("div", C, [
|
|
46
|
+
i("h2", z, [
|
|
47
|
+
a(e.$slots, "title")
|
|
48
|
+
])
|
|
49
|
+
])) : I("", !0),
|
|
50
|
+
i("div", {
|
|
51
|
+
class: g(["custom-scroll sidebar-height", {
|
|
52
|
+
"sidebar-mask": !b(c)
|
|
21
53
|
}])
|
|
22
54
|
}, [
|
|
23
|
-
|
|
55
|
+
a(e.$slots, "content")
|
|
24
56
|
], 2),
|
|
25
|
-
|
|
26
|
-
|
|
57
|
+
a(e.$slots, "button"),
|
|
58
|
+
i("div", {
|
|
59
|
+
class: "resizer",
|
|
60
|
+
onMousedown: x
|
|
61
|
+
}, null, 32)
|
|
62
|
+
], 6)), [
|
|
63
|
+
[_, d.showSideBar]
|
|
64
|
+
]);
|
|
27
65
|
}
|
|
28
66
|
});
|
|
29
67
|
export {
|
|
30
|
-
|
|
68
|
+
X as default
|
|
31
69
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidebarListElement.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/SidebarListElement.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"SidebarListElement.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/SidebarListElement.vue"],"names":[],"mappings":";cA4EY;QACR,GAAG,EAAE,MAAM,CAAA;QACX,IAAI,EAAE,MAAM,CAAA;QACZ,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,SAAS,CAAC,EAAE,OAAO,CAAA;KACpB;qBACgB,MAAM;;;;cANb;QACR,GAAG,EAAE,MAAM,CAAA;QACX,IAAI,EAAE,MAAM,CAAA;QACZ,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,SAAS,CAAC,EAAE,OAAO,CAAA;KACpB;qBACgB,MAAM;;;;AA0JzB,wBAOG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./SidebarListElement.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-e9dbd857"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default
|
|
7
7
|
};
|
|
@@ -22,7 +22,7 @@ const C = {
|
|
|
22
22
|
const d = v("router-link");
|
|
23
23
|
return o(), n("li", null, [
|
|
24
24
|
t(d, {
|
|
25
|
-
class: l(["text-c-2 hover:bg-b-2 group relative block flex items-center gap-1 rounded py-1 pr-2 font-medium no-underline", [e.variable.color ? "pl-1" : "pl-2"]]),
|
|
25
|
+
class: l(["h-8 text-c-2 hover:bg-b-2 group relative block flex items-center gap-1 rounded py-1 pr-2 font-medium no-underline", [e.variable.color ? "pl-1" : "pl-2"]]),
|
|
26
26
|
exactActiveClass: "active-link",
|
|
27
27
|
to: `${e.variable.uid}`,
|
|
28
28
|
onClick: a[0] || (a[0] = f((b) => p(b, e.variable.uid), ["prevent"]))
|
|
@@ -4,6 +4,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
|
4
4
|
name: string;
|
|
5
5
|
isDefault: boolean;
|
|
6
6
|
};
|
|
7
|
+
warningMessage?: string;
|
|
7
8
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
9
|
delete: (id: string) => void;
|
|
9
10
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
@@ -12,6 +13,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
|
12
13
|
name: string;
|
|
13
14
|
isDefault: boolean;
|
|
14
15
|
};
|
|
16
|
+
warningMessage?: string;
|
|
15
17
|
}>>> & {
|
|
16
18
|
onDelete?: ((id: string) => any) | undefined;
|
|
17
19
|
}, {}, {}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidebarListElementActions.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/SidebarListElementActions.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"SidebarListElementActions.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/SidebarListElementActions.vue"],"names":[],"mappings":";cAsFY;QACR,GAAG,EAAE,MAAM,CAAA;QACX,IAAI,EAAE,MAAM,CAAA;QACZ,SAAS,EAAE,OAAO,CAAA;KACnB;qBACgB,MAAM;;;;cALb;QACR,GAAG,EAAE,MAAM,CAAA;QACX,IAAI,EAAE,MAAM,CAAA;QACZ,SAAS,EAAE,OAAO,CAAA;KACnB;qBACgB,MAAM;;;;AA6LzB,wBAOG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
|
@@ -1,41 +1,42 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { useModal as
|
|
4
|
-
import { useClipboard as
|
|
5
|
-
const B = { class: "absolute flex right-1 opacity-0 group-hover:opacity-100" },
|
|
1
|
+
import { defineComponent as w, ref as M, openBlock as l, createElementBlock as c, Fragment as k, createElementVNode as m, unref as a, createVNode as i, withModifiers as y, createCommentVNode as u, withCtx as N, createBlock as $ } from "vue";
|
|
2
|
+
import x from "./Actions/DeleteSidebarListElement.vue.js";
|
|
3
|
+
import { useModal as D, ScalarIcon as d, ScalarModal as S } from "@scalar/components";
|
|
4
|
+
import { useClipboard as A } from "../../hooks/useClipboard.js";
|
|
5
|
+
const B = { class: "absolute flex right-1 opacity-0 group-hover:opacity-100" }, I = /* @__PURE__ */ w({
|
|
6
6
|
__name: "SidebarListElementActions",
|
|
7
7
|
props: {
|
|
8
|
-
variable: {}
|
|
8
|
+
variable: {},
|
|
9
|
+
warningMessage: {}
|
|
9
10
|
},
|
|
10
11
|
emits: ["delete"],
|
|
11
12
|
setup(p, { emit: v }) {
|
|
12
|
-
const { variable: b } = p, f = v, t =
|
|
13
|
+
const { variable: b } = p, f = v, t = M({ action: "None", name: "" }), n = D(), { copyToClipboard: g } = A();
|
|
13
14
|
function C(e) {
|
|
14
15
|
t.value = { action: e, name: b.name }, n.show();
|
|
15
16
|
}
|
|
16
17
|
function r() {
|
|
17
18
|
n.hide(), t.value = { action: "None", name: "" };
|
|
18
19
|
}
|
|
19
|
-
function
|
|
20
|
+
function h(e) {
|
|
20
21
|
f("delete", e), r();
|
|
21
22
|
}
|
|
22
|
-
return (e, o) => (l(), c(
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
return (e, o) => (l(), c(k, null, [
|
|
24
|
+
m("div", B, [
|
|
25
|
+
m("button", {
|
|
25
26
|
class: "text-c-3 hover:bg-b-3 hover:text-c-1 rounded p-[5px]",
|
|
26
27
|
type: "button",
|
|
27
|
-
onClick: o[0] || (o[0] = (s) => a(
|
|
28
|
+
onClick: o[0] || (o[0] = (s) => a(g)(e.variable.name))
|
|
28
29
|
}, [
|
|
29
30
|
i(a(d), {
|
|
30
31
|
class: "h-3 w-3",
|
|
31
32
|
icon: "Clipboard"
|
|
32
33
|
})
|
|
33
34
|
]),
|
|
34
|
-
e.variable.isDefault ?
|
|
35
|
+
e.variable.isDefault ? u("", !0) : (l(), c("button", {
|
|
35
36
|
key: 0,
|
|
36
37
|
class: "text-c-3 hover:bg-b-3 hover:text-c-1 rounded p-1",
|
|
37
38
|
type: "button",
|
|
38
|
-
onClick: o[1] || (o[1] =
|
|
39
|
+
onClick: o[1] || (o[1] = y((s) => C(
|
|
39
40
|
"Delete"
|
|
40
41
|
/* Delete */
|
|
41
42
|
), ["prevent"]))
|
|
@@ -46,19 +47,19 @@ const B = { class: "absolute flex right-1 opacity-0 group-hover:opacity-100" },
|
|
|
46
47
|
})
|
|
47
48
|
]))
|
|
48
49
|
]),
|
|
49
|
-
i(a(
|
|
50
|
+
i(a(S), {
|
|
50
51
|
size: "sm",
|
|
51
52
|
state: a(n),
|
|
52
53
|
title: `${t.value.action} ${t.value.name}`
|
|
53
54
|
}, {
|
|
54
|
-
default:
|
|
55
|
-
t.value.action === "Delete" ? (l(), $(
|
|
55
|
+
default: N(() => [
|
|
56
|
+
t.value.action === "Delete" ? (l(), $(x, {
|
|
56
57
|
key: 0,
|
|
57
58
|
variableName: t.value.name,
|
|
58
|
-
warningMessage:
|
|
59
|
+
warningMessage: e.warningMessage,
|
|
59
60
|
onClose: r,
|
|
60
|
-
onDelete: o[2] || (o[2] = (s) =>
|
|
61
|
-
}, null, 8, ["variableName"])) :
|
|
61
|
+
onDelete: o[2] || (o[2] = (s) => h(e.variable.uid))
|
|
62
|
+
}, null, 8, ["variableName", "warningMessage"])) : u("", !0)
|
|
62
63
|
]),
|
|
63
64
|
_: 1
|
|
64
65
|
}, 8, ["state", "title"])
|
|
@@ -66,5 +67,5 @@ const B = { class: "absolute flex right-1 opacity-0 group-hover:opacity-100" },
|
|
|
66
67
|
}
|
|
67
68
|
});
|
|
68
69
|
export {
|
|
69
|
-
|
|
70
|
+
I as default
|
|
70
71
|
};
|
|
@@ -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":";AAqZA,wBAKG"}
|
|
@@ -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 f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-19efa966"]]);
|
|
5
5
|
export {
|
|
6
6
|
f as default
|
|
7
7
|
};
|
|
@@ -1,77 +1,80 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ROUTES as
|
|
3
|
-
import { ScalarIcon as
|
|
4
|
-
import { capitalize as
|
|
5
|
-
import
|
|
6
|
-
import { useWorkspace as
|
|
7
|
-
|
|
1
|
+
import { defineComponent as x, reactive as S, ref as T, watch as C, computed as B, onMounted as R, onBeforeUnmount as w, openBlock as i, createElementBlock as p, createElementVNode as r, createVNode as _, unref as g, toDisplayString as A, Fragment as M, renderList as z, createBlock as E, pushScopeId as L, popScopeId as V } from "vue";
|
|
2
|
+
import { ROUTES as j } from "../../constants.js";
|
|
3
|
+
import { ScalarIcon as b } from "@scalar/components";
|
|
4
|
+
import { capitalize as q } from "@scalar/oas-utils/helpers";
|
|
5
|
+
import K from "./TopNavItem.vue.js";
|
|
6
|
+
import { useWorkspace as U } from "../../store/workspace.js";
|
|
7
|
+
import { hotKeyBus as k } from "../../libs/event-busses/hot-keys-bus.js";
|
|
8
|
+
const $ = (l) => (L("data-v-19efa966"), l = l(), V(), l), D = { class: "flex h-10 t-app__top-nav" }, F = /* @__PURE__ */ $(() => /* @__PURE__ */ r("div", { class: "t-app__top-nav-draggable" }, null, -1)), H = { class: "flex h-10 flex-1 items-center justify-center gap-1.5 text-sm font-medium relative" }, O = {
|
|
8
9
|
key: 0,
|
|
9
10
|
class: "flex items-center gap-1 w-full justify-center"
|
|
10
|
-
},
|
|
11
|
+
}, Z = /* @__PURE__ */ x({
|
|
11
12
|
__name: "TopNav",
|
|
12
13
|
setup(l) {
|
|
13
|
-
const { activeRequest:
|
|
14
|
-
function
|
|
14
|
+
const { activeRequest: N, router: o } = U(), t = S([{ label: "", path: "", icon: "Add" }]), a = T(0);
|
|
15
|
+
function m() {
|
|
15
16
|
var s;
|
|
16
|
-
const e =
|
|
17
|
+
const e = j.find((c) => o.currentRoute.value.name == c.name);
|
|
17
18
|
e && ((e == null ? void 0 : e.name) === "request" ? t[a.value] = {
|
|
18
|
-
label: ((s =
|
|
19
|
-
path:
|
|
19
|
+
label: ((s = N.value) == null ? void 0 : s.summary) || "",
|
|
20
|
+
path: o.currentRoute.value.path,
|
|
20
21
|
icon: e.icon
|
|
21
22
|
} : t[a.value] = {
|
|
22
|
-
label:
|
|
23
|
-
path:
|
|
23
|
+
label: q(e == null ? void 0 : e.name) || "",
|
|
24
|
+
path: o.currentRoute.value.path,
|
|
24
25
|
icon: e.icon
|
|
25
26
|
});
|
|
26
27
|
}
|
|
27
|
-
function
|
|
28
|
-
|
|
28
|
+
function v() {
|
|
29
|
+
o.push(t[a.value].path);
|
|
29
30
|
}
|
|
30
|
-
function
|
|
31
|
-
t.push({ label: "", path: "", icon: "Add" }), a.value = t.length - 1,
|
|
31
|
+
function d() {
|
|
32
|
+
t.push({ label: "", path: "", icon: "Add" }), a.value = t.length - 1, m();
|
|
32
33
|
}
|
|
33
|
-
function
|
|
34
|
-
a.value = e,
|
|
34
|
+
function u(e) {
|
|
35
|
+
a.value = e, v();
|
|
35
36
|
}
|
|
36
|
-
|
|
37
|
-
() =>
|
|
37
|
+
C(
|
|
38
|
+
() => o.currentRoute.value.path,
|
|
38
39
|
() => {
|
|
39
|
-
|
|
40
|
+
m();
|
|
40
41
|
},
|
|
41
42
|
{ immediate: !0 }
|
|
42
43
|
);
|
|
43
|
-
function
|
|
44
|
+
function f(e) {
|
|
44
45
|
t.splice(e, 1), a.value = Math.min(
|
|
45
46
|
a.value,
|
|
46
47
|
t.length - 1
|
|
47
|
-
),
|
|
48
|
+
), v();
|
|
48
49
|
}
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
50
|
+
const I = B(() => a.value), h = (e) => {
|
|
51
|
+
e.addTopNav && d(), e.closeTopNav && f(a.value), e.navigateTopNavLeft && u(Math.max(a.value - 1, 0)), e.navigateTopNavRight && u(Math.min(a.value + 1, t.length - 1));
|
|
52
|
+
};
|
|
53
|
+
return R(() => k.on(h)), w(() => k.off(h)), (e, s) => (i(), p("nav", D, [
|
|
54
|
+
F,
|
|
55
|
+
r("div", H, [
|
|
56
|
+
t.length === 1 ? (i(), p("div", O, [
|
|
57
|
+
_(g(b), {
|
|
55
58
|
icon: t[0].icon,
|
|
56
59
|
size: "xs",
|
|
57
60
|
thickness: "2.5"
|
|
58
61
|
}, null, 8, ["icon"]),
|
|
59
|
-
|
|
60
|
-
])) : (
|
|
61
|
-
key:
|
|
62
|
-
active:
|
|
63
|
-
hotkey: (
|
|
62
|
+
r("div", null, A(t[0].label), 1)
|
|
63
|
+
])) : (i(!0), p(M, { key: 1 }, z(t, (c, n) => (i(), E(K, {
|
|
64
|
+
key: n,
|
|
65
|
+
active: n === I.value,
|
|
66
|
+
hotkey: (n + 1).toString(),
|
|
64
67
|
icon: c.icon,
|
|
65
68
|
label: c.label,
|
|
66
|
-
onClick: (
|
|
67
|
-
onClose: (
|
|
69
|
+
onClick: (y) => u(n),
|
|
70
|
+
onClose: (y) => f(n)
|
|
68
71
|
}, null, 8, ["active", "hotkey", "icon", "label", "onClick", "onClose"]))), 128)),
|
|
69
|
-
|
|
72
|
+
r("button", {
|
|
70
73
|
class: "text-c-3 hover:bg-b-3 p-1.5 rounded-lg webkit-app-no-drag",
|
|
71
74
|
type: "button",
|
|
72
|
-
onClick:
|
|
75
|
+
onClick: d
|
|
73
76
|
}, [
|
|
74
|
-
|
|
77
|
+
_(g(b), {
|
|
75
78
|
icon: "Add",
|
|
76
79
|
size: "xs",
|
|
77
80
|
thickness: "2.5"
|
|
@@ -82,5 +85,5 @@ const L = (l) => (B("data-v-76f92299"), l = l(), E(), l), $ = { class: "flex h-1
|
|
|
82
85
|
}
|
|
83
86
|
});
|
|
84
87
|
export {
|
|
85
|
-
|
|
88
|
+
Z as default
|
|
86
89
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * from './layouts/Modal/index.js';
|
|
2
2
|
export * from './layouts/App/index.js';
|
|
3
3
|
export { useWorkspace } from './store/workspace.js';
|
|
4
|
-
export { createModalRouter,
|
|
4
|
+
export { createModalRouter, createWebHashRouter, router } from './router.js';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAE7B,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,iBAAiB,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAE7B,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { useWorkspace as
|
|
2
|
-
import { createModalRouter as a,
|
|
3
|
-
import { default as
|
|
1
|
+
import { useWorkspace as o } from "./store/workspace.js";
|
|
2
|
+
import { createModalRouter as a, createWebHashRouter as i, router as l } from "./router.js";
|
|
3
|
+
import { default as c } from "./layouts/App/ApiClientApp.vue.js";
|
|
4
4
|
/* empty css */
|
|
5
|
-
import { default as
|
|
5
|
+
import { default as A } from "./layouts/Modal/ApiClientModal.vue.js";
|
|
6
6
|
import { createApiClientModal as n, createApiClientModalSync as u } from "./layouts/Modal/create-api-client-modal.js";
|
|
7
7
|
import { createApiClientApp as s } from "./layouts/App/create-api-client-app.js";
|
|
8
8
|
export {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
c as ApiClientApp,
|
|
10
|
+
A as ApiClientModal,
|
|
11
11
|
s as createApiClientApp,
|
|
12
12
|
n as createApiClientModal,
|
|
13
13
|
u as createApiClientModalSync,
|
|
14
14
|
a as createModalRouter,
|
|
15
|
-
i as
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
i as createWebHashRouter,
|
|
16
|
+
l as router,
|
|
17
|
+
o as useWorkspace
|
|
18
18
|
};
|
|
@@ -10,7 +10,7 @@ import { RouterView as A } from "vue-router";
|
|
|
10
10
|
import { loadAllResources as D } from "../../libs/local-storage.js";
|
|
11
11
|
import N from "../../components/CommandPalette/TheCommandPalette.vue.js";
|
|
12
12
|
import { useDarkModeState as b } from "../../hooks/useDarkModeState.js";
|
|
13
|
-
import { handleHotKeyDown as H } from "../../libs/event-busses/hot-
|
|
13
|
+
import { handleHotKeyDown as H } from "../../libs/event-busses/hot-keys-bus.js";
|
|
14
14
|
const V = ["innerHTML"], F = {
|
|
15
15
|
key: 0,
|
|
16
16
|
class: "flex min-h-0 flex-1"
|