@scalar/api-client 2.0.45 → 2.0.46
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 +8 -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 +16 -16
- package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarHistory.vue.js +24 -25
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +1 -1
- package/dist/components/CommandPalette/CommandPaletteExample.vue.js +23 -23
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +6 -6
- 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 +1 -1
- package/dist/components/ContextBar.vue.d.ts.map +1 -1
- package/dist/components/ContextBar.vue.js +2 -2
- package/dist/components/ContextBar.vue2.js +10 -10
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.js +5 -67
- package/dist/components/HttpMethod/HttpMethod.vue2.js +61 -2
- package/dist/components/Search/SearchModal.vue2.js +22 -22
- package/dist/components/SubpageHeader.vue.js +2 -2
- package/dist/components/SubpageHeader.vue2.js +2 -2
- package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
- package/dist/layouts/App/ApiClientApp.vue.js +46 -43
- package/dist/layouts/App/create-api-client-app.d.ts +158 -81
- 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 -20
- package/dist/layouts/Modal/create-api-client-modal.d.ts +316 -162
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +159 -83
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +18 -19
- package/dist/libs/event-busses/command-palette.d.ts.map +1 -0
- package/dist/libs/{eventBusses/executeRequestBus.d.ts → event-busses/execute-requestBus.d.ts} +1 -1
- package/dist/libs/event-busses/execute-requestBus.d.ts.map +1 -0
- package/dist/libs/event-busses/hot-key.d.ts +34 -0
- package/dist/libs/event-busses/hot-key.d.ts.map +1 -0
- package/dist/libs/event-busses/hot-key.js +25 -0
- package/dist/libs/event-busses/index.d.ts +5 -0
- package/dist/libs/event-busses/index.d.ts.map +1 -0
- package/dist/libs/event-busses/index.js +12 -0
- package/dist/libs/{eventBusses/requestStatusBus.d.ts → event-busses/request-status-bus.d.ts} +1 -1
- package/dist/libs/event-busses/request-status-bus.d.ts.map +1 -0
- package/dist/libs/index.d.ts +1 -1
- package/dist/libs/index.d.ts.map +1 -1
- package/dist/libs/index.js +19 -13
- package/dist/store/workspace.d.ts +316 -162
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/views/Request/Request.vue.js +2 -2
- package/dist/views/Request/Request.vue2.js +4 -4
- package/dist/views/Request/RequestSidebarItem.vue2.js +32 -32
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +4 -4
- package/dist/views/Request/RequestSidebarItemMenu.vue2.js +19 -19
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +9 -9
- package/package.json +6 -6
- package/dist/libs/eventBusses/command-palette.d.ts.map +0 -1
- package/dist/libs/eventBusses/executeRequestBus.d.ts.map +0 -1
- package/dist/libs/eventBusses/index.d.ts +0 -3
- package/dist/libs/eventBusses/index.d.ts.map +0 -1
- package/dist/libs/eventBusses/index.js +0 -6
- package/dist/libs/eventBusses/requestStatusBus.d.ts.map +0 -1
- /package/dist/libs/{eventBusses → event-busses}/command-palette.d.ts +0 -0
- /package/dist/libs/{eventBusses → event-busses}/command-palette.js +0 -0
- /package/dist/libs/{eventBusses/executeRequestBus.js → event-busses/execute-requestBus.js} +0 -0
- /package/dist/libs/{eventBusses/requestStatusBus.js → event-busses/request-status-bus.js} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as y, ref as i, watch as
|
|
1
|
+
import { defineComponent as y, ref as i, watch as _, computed as C, openBlock as w, createBlock as E, unref as d, withCtx as r, createElementVNode as h, createVNode as R, createTextVNode as m, toDisplayString as p, createElementBlock as F, Fragment as N, renderList as A, createSlots as D, pushScopeId as T, popScopeId as W } from "vue";
|
|
2
2
|
import { useWorkspace as L } from "../../store/workspace.js";
|
|
3
|
-
import { ScalarModal as U, ScalarSearchInput as j, ScalarSearchResultList as
|
|
4
|
-
import { useMagicKeys as
|
|
5
|
-
import
|
|
6
|
-
import { useRouter as
|
|
7
|
-
import
|
|
3
|
+
import { ScalarModal as U, ScalarSearchInput as j, ScalarSearchResultList as H, ScalarSearchResultItem as K } from "@scalar/components";
|
|
4
|
+
import { useMagicKeys as O, whenever as g } from "@vueuse/core";
|
|
5
|
+
import P from "fuse.js";
|
|
6
|
+
import { useRouter as z } from "vue-router";
|
|
7
|
+
import G from "../HttpMethod/HttpMethod.vue.js";
|
|
8
8
|
const J = (u) => (T("data-v-67d6f77b"), u = u(), W(), u), Q = /* @__PURE__ */ J(() => /* @__PURE__ */ h("div", { class: "ref-search-meta" }, [
|
|
9
9
|
/* @__PURE__ */ h("span", null, "↑↓ Navigate"),
|
|
10
10
|
/* @__PURE__ */ h("span", null, "⏎ Select")
|
|
@@ -14,12 +14,12 @@ const J = (u) => (T("data-v-67d6f77b"), u = u(), W(), u), Q = /* @__PURE__ */ J(
|
|
|
14
14
|
modalState: {}
|
|
15
15
|
},
|
|
16
16
|
setup(u) {
|
|
17
|
-
const c = u,
|
|
17
|
+
const c = u, M = z(), { activeWorkspaceRequests: B } = L(), v = O(), l = i([]), f = i([]), o = i(0), s = i(""), I = i(null), S = new P(l.value, {
|
|
18
18
|
keys: ["title", "description", "body"]
|
|
19
|
-
}),
|
|
19
|
+
}), $ = () => {
|
|
20
20
|
o.value = 0, f.value = S.search(s.value);
|
|
21
21
|
};
|
|
22
|
-
|
|
22
|
+
_(
|
|
23
23
|
() => c.modalState.open,
|
|
24
24
|
(e) => {
|
|
25
25
|
var a;
|
|
@@ -27,9 +27,9 @@ const J = (u) => (T("data-v-67d6f77b"), u = u(), W(), u), Q = /* @__PURE__ */ J(
|
|
|
27
27
|
l.value.length > 0 && (l.value = [], S.setCollection(l.value));
|
|
28
28
|
return;
|
|
29
29
|
}
|
|
30
|
-
(a =
|
|
30
|
+
(a = I.value) == null || a.focus(), s.value = "", o.value = 0, f.value = [];
|
|
31
31
|
}
|
|
32
|
-
),
|
|
32
|
+
), _(
|
|
33
33
|
B,
|
|
34
34
|
(e) => {
|
|
35
35
|
Object.values(e).forEach((a) => {
|
|
@@ -44,8 +44,8 @@ const J = (u) => (T("data-v-67d6f77b"), u = u(), W(), u), Q = /* @__PURE__ */ J(
|
|
|
44
44
|
},
|
|
45
45
|
{ immediate: !0 }
|
|
46
46
|
);
|
|
47
|
-
function
|
|
48
|
-
|
|
47
|
+
function V(e) {
|
|
48
|
+
M.push(e.item.id), c.modalState.hide();
|
|
49
49
|
}
|
|
50
50
|
const k = C(
|
|
51
51
|
() => n.value[o.value]
|
|
@@ -55,7 +55,7 @@ const J = (u) => (T("data-v-67d6f77b"), u = u(), W(), u), Q = /* @__PURE__ */ J(
|
|
|
55
55
|
})) : f.value
|
|
56
56
|
);
|
|
57
57
|
return g(v.enter, () => {
|
|
58
|
-
c.modalState.open && window &&
|
|
58
|
+
c.modalState.open && window && V(k.value);
|
|
59
59
|
}), g(v.ArrowDown, () => {
|
|
60
60
|
var e;
|
|
61
61
|
c.modalState.open && window && (o.value < n.value.length - 1 ? o.value++ : o.value = 0, (e = document.getElementById(`search-modal-${k.value.item.id}`)) == null || e.scrollIntoView({
|
|
@@ -75,16 +75,16 @@ const J = (u) => (T("data-v-67d6f77b"), u = u(), W(), u), Q = /* @__PURE__ */ J(
|
|
|
75
75
|
default: r(() => [
|
|
76
76
|
h("div", {
|
|
77
77
|
ref_key: "searchModalRef",
|
|
78
|
-
ref:
|
|
78
|
+
ref: I,
|
|
79
79
|
class: "ref-search-container"
|
|
80
80
|
}, [
|
|
81
81
|
R(d(j), {
|
|
82
82
|
modelValue: s.value,
|
|
83
83
|
"onUpdate:modelValue": a[0] || (a[0] = (t) => s.value = t),
|
|
84
|
-
onInput:
|
|
84
|
+
onInput: $
|
|
85
85
|
}, null, 8, ["modelValue"])
|
|
86
86
|
], 512),
|
|
87
|
-
R(d(
|
|
87
|
+
R(d(H), {
|
|
88
88
|
class: "ref-search-results custom-scroll",
|
|
89
89
|
noResults: !n.value.length
|
|
90
90
|
}, {
|
|
@@ -92,16 +92,16 @@ const J = (u) => (T("data-v-67d6f77b"), u = u(), W(), u), Q = /* @__PURE__ */ J(
|
|
|
92
92
|
m(p(s.value), 1)
|
|
93
93
|
]),
|
|
94
94
|
default: r(() => [
|
|
95
|
-
(w(!0), F(N, null, A(n.value, (t,
|
|
95
|
+
(w(!0), F(N, null, A(n.value, (t, b) => (w(), E(d(K), {
|
|
96
96
|
id: `#search-modal-${t.item.id}`,
|
|
97
97
|
key: t.refIndex,
|
|
98
|
-
active: o.value ===
|
|
98
|
+
active: o.value === b,
|
|
99
99
|
icon: "Terminal",
|
|
100
|
-
onClick: (x) =>
|
|
101
|
-
onFocus: (x) => o.value =
|
|
100
|
+
onClick: (x) => V(t),
|
|
101
|
+
onFocus: (x) => o.value = b
|
|
102
102
|
}, D({
|
|
103
103
|
addon: r(() => [
|
|
104
|
-
R(d(
|
|
104
|
+
R(d(G), {
|
|
105
105
|
method: t.item.httpVerb ?? "get"
|
|
106
106
|
}, null, 8, ["method"])
|
|
107
107
|
]),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from "./SubpageHeader.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const p = /* @__PURE__ */ o(
|
|
4
|
+
const p = /* @__PURE__ */ o(e, [["__scopeId", "data-v-8a69ee40"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as a, resolveComponent as d, openBlock as l, createElementBlock as i, createElementVNode as r, createVNode as t, unref as o, withCtx as p, renderSlot as u, pushScopeId as m, popScopeId as f } from "vue";
|
|
2
2
|
import { ScalarIcon as _ } from "@scalar/components";
|
|
3
3
|
import { useRoute as h } from "vue-router";
|
|
4
|
-
const b = (e) => (m("data-v-
|
|
4
|
+
const b = (e) => (m("data-v-8a69ee40"), e = e(), f(), e), v = { class: "flex flex-1 flex-col rounded pt-0 h-full bg-b-1 relative border-1/2 rounded mr-1.5 mb-1.5 overflow-hidden" }, x = { class: "lg:min-h-header items-center w-full p-1 t-app__top-container flex items-center border-b-1/2" }, k = /* @__PURE__ */ b(() => /* @__PURE__ */ r("span", { class: "leading-none" }, "Back To Requests", -1)), I = /* @__PURE__ */ a({
|
|
5
5
|
__name: "SubpageHeader",
|
|
6
6
|
setup(e) {
|
|
7
7
|
const n = h();
|
|
@@ -10,7 +10,7 @@ const b = (e) => (m("data-v-a15baa95"), e = e(), f(), e), v = { class: "flex fle
|
|
|
10
10
|
return l(), i("div", v, [
|
|
11
11
|
r("div", x, [
|
|
12
12
|
t(c, {
|
|
13
|
-
class: "text-c-2 text-sm font-medium ml-1 flex items-center p-1.5 hover:bg-b-
|
|
13
|
+
class: "text-c-2 text-sm font-medium ml-1 flex items-center p-1.5 hover:bg-b-2 rounded cursor-pointer gap-0.5 active:text-c-1 no-underline dark:hover:bg-b-2",
|
|
14
14
|
to: `/workspace/${o(n).params.workspace}/request/default`
|
|
15
15
|
}, {
|
|
16
16
|
default: p(() => [
|
|
@@ -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":";AAiVA,wBAKG"}
|
|
@@ -1,72 +1,75 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { useWorkspace as
|
|
5
|
-
import { addScalarClassesToHeadless as
|
|
6
|
-
import { LS_KEYS as
|
|
1
|
+
import { defineComponent as _, onMounted as i, watchEffect as v, onBeforeMount as y, onBeforeUnmount as h, computed as k, openBlock as l, createElementBlock as d, Fragment as g, createElementVNode as p, createVNode as a, unref as n, withCtx as w, createBlock as f, KeepAlive as S, resolveDynamicComponent as x, createCommentVNode as T } from "vue";
|
|
2
|
+
import C from "../../components/SideNav/SideNav.vue.js";
|
|
3
|
+
import L from "../../components/TopNav/TopNav.vue.js";
|
|
4
|
+
import { useWorkspace as B } from "../../store/workspace.js";
|
|
5
|
+
import { addScalarClassesToHeadless as E } from "@scalar/components";
|
|
6
|
+
import { LS_KEYS as K } from "@scalar/object-utils/mutator-record";
|
|
7
7
|
import { getThemeStyles as M } from "@scalar/themes";
|
|
8
8
|
import { ScalarToasts as W } from "@scalar/use-toasts";
|
|
9
9
|
import { RouterView as A } from "vue-router";
|
|
10
|
-
import { loadAllResources as
|
|
11
|
-
import
|
|
12
|
-
import { useDarkModeState as
|
|
13
|
-
|
|
10
|
+
import { loadAllResources as D } from "../../libs/local-storage.js";
|
|
11
|
+
import N from "../../components/CommandPalette/TheCommandPalette.vue.js";
|
|
12
|
+
import { useDarkModeState as b } from "../../hooks/useDarkModeState.js";
|
|
13
|
+
import { handleHotKeyDown as H } from "../../libs/event-busses/hot-key.js";
|
|
14
|
+
const V = ["innerHTML"], F = {
|
|
14
15
|
key: 0,
|
|
15
16
|
class: "flex min-h-0 flex-1"
|
|
16
|
-
},
|
|
17
|
+
}, O = { class: "flex flex-1 flex-col min-w-0" }, ee = /* @__PURE__ */ _({
|
|
17
18
|
__name: "ApiClientApp",
|
|
18
|
-
setup(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
document.body.classList.toggle("dark-mode",
|
|
19
|
+
setup(P) {
|
|
20
|
+
i(() => {
|
|
21
|
+
v(() => {
|
|
22
|
+
document.body.classList.toggle("dark-mode", c.value), document.body.classList.toggle("light-mode", !c.value);
|
|
22
23
|
});
|
|
23
24
|
});
|
|
24
|
-
const { isDark:
|
|
25
|
-
|
|
26
|
-
if (localStorage.getItem(
|
|
27
|
-
const
|
|
28
|
-
let
|
|
25
|
+
const { isDark: c } = b(), r = B();
|
|
26
|
+
y(async () => {
|
|
27
|
+
if (localStorage.getItem(K.WORKSPACE)) {
|
|
28
|
+
const o = {};
|
|
29
|
+
let s = 0, t = 0, e = "";
|
|
29
30
|
for (e in localStorage)
|
|
30
|
-
Object.prototype.hasOwnProperty.call(localStorage, e) && (
|
|
31
|
-
|
|
31
|
+
Object.prototype.hasOwnProperty.call(localStorage, e) && (t = (localStorage[e].length + e.length) * 2, s += t, o[e] = (t / 1024).toFixed(2) + " KB");
|
|
32
|
+
o.Total = (s / 1024).toFixed(2) + " KB", console.table(o), D(r);
|
|
32
33
|
} else
|
|
33
|
-
|
|
34
|
+
r.workspaceMutators.add({
|
|
34
35
|
uid: "default",
|
|
35
36
|
name: "Workspace",
|
|
36
37
|
proxyUrl: "https://proxy.scalar.com"
|
|
37
38
|
});
|
|
38
|
-
|
|
39
|
+
E();
|
|
39
40
|
});
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
const m = (o) => H(o);
|
|
42
|
+
i(() => window.addEventListener("keydown", m)), h(() => window.removeEventListener("keydown", m));
|
|
43
|
+
const u = k(
|
|
44
|
+
() => r.activeWorkspace.value && `<style>
|
|
45
|
+
${M(r.activeWorkspace.value.themeId, {
|
|
43
46
|
fonts: !0
|
|
44
47
|
})}</style>`
|
|
45
48
|
);
|
|
46
|
-
return (
|
|
47
|
-
var
|
|
48
|
-
return
|
|
49
|
-
|
|
50
|
-
a(
|
|
51
|
-
(
|
|
52
|
-
a(
|
|
53
|
-
a(
|
|
54
|
-
|
|
55
|
-
a(
|
|
56
|
-
default:
|
|
57
|
-
(
|
|
58
|
-
(
|
|
49
|
+
return (o, s) => {
|
|
50
|
+
var t;
|
|
51
|
+
return l(), d(g, null, [
|
|
52
|
+
p("div", { innerHTML: u.value }, null, 8, V),
|
|
53
|
+
a(L),
|
|
54
|
+
(t = n(r).activeWorkspace.value) != null && t.uid ? (l(), d("main", F, [
|
|
55
|
+
a(C),
|
|
56
|
+
a(n(N)),
|
|
57
|
+
p("div", O, [
|
|
58
|
+
a(n(A), null, {
|
|
59
|
+
default: w(({ Component: e }) => [
|
|
60
|
+
(l(), f(S, null, [
|
|
61
|
+
(l(), f(x(e)))
|
|
59
62
|
], 1024))
|
|
60
63
|
]),
|
|
61
64
|
_: 1
|
|
62
65
|
})
|
|
63
66
|
])
|
|
64
|
-
])) :
|
|
65
|
-
a(
|
|
67
|
+
])) : T("", !0),
|
|
68
|
+
a(n(W))
|
|
66
69
|
], 64);
|
|
67
70
|
};
|
|
68
71
|
}
|
|
69
72
|
});
|
|
70
73
|
export {
|
|
71
|
-
|
|
74
|
+
ee as default
|
|
72
75
|
};
|