@scalar/api-client 2.0.45 → 2.0.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -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.vue.d.ts.map +1 -1
- package/dist/components/Search/SearchModal.vue.js +1 -1
- package/dist/components/Search/SearchModal.vue2.js +44 -42
- 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/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/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/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 +2 -2
- package/dist/views/Request/Request.vue2.js +118 -118
- 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 +20 -20
- 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.d.ts.map +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +13 -13
- package/package.json +10 -10
- 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
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# @scalar/api-client
|
|
2
2
|
|
|
3
|
+
## 2.0.47
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- b00e50e: fix(api-client): improve api client responsiveness
|
|
8
|
+
- df7372f: feat: make side navigation a drag region
|
|
9
|
+
- 6f0632e: fix: sidebar list element action prop
|
|
10
|
+
- 3023afe: fix: sidenav endpoint ui
|
|
11
|
+
- 711ad03: fix: search modal data population
|
|
12
|
+
- 14ed31f: feat: group cookie by domain and path
|
|
13
|
+
- Updated dependencies [60e63d3]
|
|
14
|
+
- Updated dependencies [db92a85]
|
|
15
|
+
- Updated dependencies [dba83e4]
|
|
16
|
+
- @scalar/themes@0.9.22
|
|
17
|
+
- @scalar/use-toasts@0.7.5
|
|
18
|
+
- @scalar/object-utils@1.1.6
|
|
19
|
+
- @scalar/oas-utils@0.2.28
|
|
20
|
+
- @scalar/components@0.12.29
|
|
21
|
+
|
|
22
|
+
## 2.0.46
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- 2f6180a: fix: improve address bar styles
|
|
27
|
+
- Updated dependencies [17e06de]
|
|
28
|
+
- @scalar/oas-utils@0.2.27
|
|
29
|
+
|
|
3
30
|
## 2.0.45
|
|
4
31
|
|
|
5
32
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddressBar.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBar.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"AddressBar.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBar.vue"],"names":[],"mappings":";AAirBA,wBAKG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./AddressBar.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-372103f0"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as M, ref as d, watch as U, unref as l, openBlock as L, createElementBlock as
|
|
1
|
+
import { defineComponent as M, ref as d, watch as U, unref as l, openBlock as L, createElementBlock as H, createElementVNode as o, createVNode as n, withCtx as _, normalizeClass as w, normalizeStyle as O, createCommentVNode as $, pushScopeId as N, popScopeId as T } from "vue";
|
|
2
2
|
import A from "../CodeInput/CodeInput.vue.js";
|
|
3
3
|
import { useWorkspace as D } from "../../store/workspace.js";
|
|
4
4
|
import { Listbox as K } from "@headlessui/vue";
|
|
@@ -8,12 +8,12 @@ import { isMacOS as F } from "@scalar/use-tooltip";
|
|
|
8
8
|
import { useMagicKeys as G, whenever as J } from "@vueuse/core";
|
|
9
9
|
import P from "../HttpMethod/HttpMethod.vue.js";
|
|
10
10
|
import X from "./AddressBarHistory.vue.js";
|
|
11
|
-
import { executeRequestBus as m } from "../../libs/
|
|
12
|
-
import { requestStatusBus as Y } from "../../libs/
|
|
13
|
-
const v = (c) => (N("data-v-
|
|
11
|
+
import { executeRequestBus as m } from "../../libs/event-busses/execute-requestBus.js";
|
|
12
|
+
import { requestStatusBus as Y } from "../../libs/event-busses/request-status-bus.js";
|
|
13
|
+
const v = (c) => (N("data-v-372103f0"), c = c(), T(), c), Z = {
|
|
14
14
|
key: 0,
|
|
15
15
|
class: "order-last lg:order-none lg:w-auto w-full"
|
|
16
|
-
}, ee = { class: "m-auto flex basis-1/2 flex-row items-center" }, te = { class: "pointer-events-none absolute left-0 top-0 z-10 block h-full w-full overflow-hidden" }, le = { class: "flex gap-1" }, oe = { class: "scroll-timeline-x scroll-timeline-x-hidden relative flex w-full" }, ae = /* @__PURE__ */ v(() => /* @__PURE__ */ o("div", { class: "fade-left" }, null, -1)), re = /* @__PURE__ */ v(() => /* @__PURE__ */ o("div", { class: "fade-right" }, null, -1)), se = /* @__PURE__ */ v(() => /* @__PURE__ */ o("span", { class: "text-xxs relative z-10 lg:flex hidden" }, "Send", -1)),
|
|
16
|
+
}, ee = { class: "m-auto flex basis-1/2 flex-row items-center" }, te = { class: "pointer-events-none absolute left-0 top-0 z-10 block h-full w-full overflow-hidden" }, le = { class: "flex gap-1" }, oe = { class: "codemirror-bg-switcher scroll-timeline-x scroll-timeline-x-hidden relative flex w-full" }, ae = /* @__PURE__ */ v(() => /* @__PURE__ */ o("div", { class: "fade-left" }, null, -1)), re = /* @__PURE__ */ v(() => /* @__PURE__ */ o("div", { class: "fade-right" }, null, -1)), se = /* @__PURE__ */ v(() => /* @__PURE__ */ o("span", { class: "text-xxs relative z-10 lg:flex hidden" }, "Send", -1)), _e = /* @__PURE__ */ M({
|
|
17
17
|
__name: "AddressBar",
|
|
18
18
|
setup(c) {
|
|
19
19
|
const {
|
|
@@ -23,9 +23,9 @@ const v = (c) => (N("data-v-6d9e4813"), c = c(), T(), c), Z = {
|
|
|
23
23
|
requestMutators: h,
|
|
24
24
|
requestExampleMutators: S,
|
|
25
25
|
requestsHistory: k
|
|
26
|
-
} = D(), x = d(k.value[0]),
|
|
26
|
+
} = D(), x = d(k.value[0]), b = G();
|
|
27
27
|
J(
|
|
28
|
-
F() ?
|
|
28
|
+
F() ? b.meta_enter : b.ctrl_enter,
|
|
29
29
|
() => m.emit()
|
|
30
30
|
);
|
|
31
31
|
const E = (e) => {
|
|
@@ -40,15 +40,15 @@ const v = (c) => (N("data-v-6d9e4813"), c = c(), T(), c), Z = {
|
|
|
40
40
|
t.value && E(e);
|
|
41
41
|
}
|
|
42
42
|
);
|
|
43
|
-
const a = d(100),
|
|
43
|
+
const a = d(100), g = d(0), r = d(!1), i = d();
|
|
44
44
|
function y() {
|
|
45
|
-
r.value ? a.value -= (a.value - 15) / 60 : a.value -=
|
|
45
|
+
r.value ? a.value -= (a.value - 15) / 60 : a.value -= g.value / 20, a.value <= 0 && (clearInterval(i.value), i.value = void 0, a.value = 100, r.value = !1);
|
|
46
46
|
}
|
|
47
47
|
function C() {
|
|
48
48
|
r.value || (r.value = !0, i.value = setInterval(y, 20));
|
|
49
49
|
}
|
|
50
50
|
function q() {
|
|
51
|
-
|
|
51
|
+
g.value = a.value, r.value = !1;
|
|
52
52
|
}
|
|
53
53
|
function B() {
|
|
54
54
|
clearInterval(i.value), i.value = void 0, a.value = 100, r.value = !1;
|
|
@@ -67,16 +67,16 @@ const v = (c) => (N("data-v-6d9e4813"), c = c(), T(), c), Z = {
|
|
|
67
67
|
const R = (e) => {
|
|
68
68
|
f.value && S.edit(f.value.uid, "url", e);
|
|
69
69
|
};
|
|
70
|
-
return (e, s) => l(t) && l(f) ? (L(),
|
|
70
|
+
return (e, s) => l(t) && l(f) ? (L(), H("div", Z, [
|
|
71
71
|
o("div", ee, [
|
|
72
72
|
n(l(K), {
|
|
73
73
|
modelValue: x.value,
|
|
74
74
|
"onUpdate:modelValue": s[2] || (s[2] = (u) => x.value = u)
|
|
75
75
|
}, {
|
|
76
|
-
default:
|
|
76
|
+
default: _(({ open: u }) => [
|
|
77
77
|
o("div", {
|
|
78
78
|
class: w([
|
|
79
|
-
"
|
|
79
|
+
"addressbar-bg-states text-xxs relative flex w-full lg:min-w-[720px] lg:max-w-[720px] order-last lg:order-none flex-1 flex-row items-stretch rounded-lg border-1/2 p-[3px]",
|
|
80
80
|
{ "rounded-b-none": u },
|
|
81
81
|
{ "border-transparent": u }
|
|
82
82
|
])
|
|
@@ -117,7 +117,7 @@ const v = (c) => (N("data-v-6d9e4813"), c = c(), T(), c), Z = {
|
|
|
117
117
|
disabled: r.value,
|
|
118
118
|
onClick: s[1] || (s[1] = (z) => l(m).emit())
|
|
119
119
|
}, {
|
|
120
|
-
default:
|
|
120
|
+
default: _(() => [
|
|
121
121
|
n(l(W), {
|
|
122
122
|
class: "relative z-10 shrink-0 fill-current",
|
|
123
123
|
icon: "Play",
|
|
@@ -132,9 +132,9 @@ const v = (c) => (N("data-v-6d9e4813"), c = c(), T(), c), Z = {
|
|
|
132
132
|
_: 1
|
|
133
133
|
}, 8, ["modelValue"])
|
|
134
134
|
])
|
|
135
|
-
])) :
|
|
135
|
+
])) : $("", !0);
|
|
136
136
|
}
|
|
137
137
|
});
|
|
138
138
|
export {
|
|
139
|
-
|
|
139
|
+
_e as default
|
|
140
140
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddressBarHistory.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBarHistory.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"AddressBarHistory.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBarHistory.vue"],"names":[],"mappings":";UA0GQ,OAAO;;UAAP,OAAO;;AAmOf,wBAMG;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,19 +1,19 @@
|
|
|
1
|
-
import { defineComponent as C, computed as w, openBlock as n, createElementBlock as
|
|
1
|
+
import { defineComponent as C, computed as w, openBlock as n, createElementBlock as d, Fragment as m, unref as t, createBlock as i, withCtx as p, createVNode as f, createCommentVNode as h, createElementVNode as r, normalizeClass as b, renderList as U, toDisplayString as l } from "vue";
|
|
2
2
|
import { formatMs as L } from "../../libs/formatters.js";
|
|
3
3
|
import { useWorkspace as q } from "../../store/workspace.js";
|
|
4
|
-
import { ListboxButton as
|
|
5
|
-
import { ScalarIcon as
|
|
6
|
-
import { httpStatusCodes as
|
|
7
|
-
import { useRouter as
|
|
8
|
-
import
|
|
9
|
-
import { getStatusCodeColor as
|
|
10
|
-
const
|
|
4
|
+
import { ListboxButton as y, ListboxOptions as B, ListboxOption as S } from "@headlessui/vue";
|
|
5
|
+
import { ScalarIcon as H } from "@scalar/components";
|
|
6
|
+
import { httpStatusCodes as P } from "@scalar/oas-utils/helpers";
|
|
7
|
+
import { useRouter as R } from "vue-router";
|
|
8
|
+
import z from "../HttpMethod/HttpMethod.vue.js";
|
|
9
|
+
import { getStatusCodeColor as E } from "./httpStatusCodeColors.js";
|
|
10
|
+
const M = { class: "min-w-0" }, N = { class: "min-w-0 truncate text-c-1" }, J = /* @__PURE__ */ C({
|
|
11
11
|
__name: "AddressBarHistory",
|
|
12
12
|
props: {
|
|
13
13
|
open: { type: Boolean }
|
|
14
14
|
},
|
|
15
|
-
setup(
|
|
16
|
-
const { activeRequest: u, requestExampleMutators: x } = q(), g =
|
|
15
|
+
setup(V) {
|
|
16
|
+
const { activeRequest: u, requestExampleMutators: x } = q(), g = R(), v = w(() => u.value.history.slice().reverse());
|
|
17
17
|
function _(o) {
|
|
18
18
|
const c = new URL(o), s = new URLSearchParams(c.search).get("scalar_url");
|
|
19
19
|
return s ? new URL(s).href : c.href;
|
|
@@ -21,30 +21,29 @@ const N = { class: "min-w-0" }, V = { class: "min-w-0 truncate text-c-1" }, J =
|
|
|
21
21
|
function k(o) {
|
|
22
22
|
u.value.uid !== o.request.requestUid && g.push(`/request/${o.request.requestUid}`), x.set({ ...o.request });
|
|
23
23
|
}
|
|
24
|
-
return (o, c) => (n(), m
|
|
25
|
-
t(u).history.length ? (n(), i(t(
|
|
24
|
+
return (o, c) => (n(), d(m, null, [
|
|
25
|
+
t(u).history.length ? (n(), i(t(y), {
|
|
26
26
|
key: 0,
|
|
27
|
-
class: "
|
|
27
|
+
class: "adressbar-history-button mr-1 rounded p-1.5 text-c-3 focus:text-c-1"
|
|
28
28
|
}, {
|
|
29
29
|
default: p(() => [
|
|
30
|
-
f(t(
|
|
31
|
-
class: "text-c-3",
|
|
30
|
+
f(t(H), {
|
|
32
31
|
icon: "History",
|
|
33
32
|
size: "sm",
|
|
34
33
|
thickness: "2.25"
|
|
35
34
|
})
|
|
36
35
|
]),
|
|
37
36
|
_: 1
|
|
38
|
-
})) :
|
|
37
|
+
})) : h("", !0),
|
|
39
38
|
r("div", {
|
|
40
|
-
class:
|
|
39
|
+
class: b([
|
|
41
40
|
"absolute left-0 top-[33px] w-full rounded before:pointer-events-none before:absolute before:left-0 before:top-[-33px] before:h-[calc(100%+33px)] before:w-full before:rounded z-50",
|
|
42
41
|
{ "before:shadow-lg": o.open }
|
|
43
42
|
])
|
|
44
43
|
}, [
|
|
45
|
-
f(t(
|
|
44
|
+
f(t(B), { class: "bg-b-1 custom-scroll bg-mix-transparent bg-mix-amount-30 max-h-[300px] rounded-b p-[3px] pt-0 backdrop-blur grid grid-cols-[44px,1fr,repeat(3,auto)] items-center" }, {
|
|
46
45
|
default: p(() => [
|
|
47
|
-
(n(!0), m
|
|
46
|
+
(n(!0), d(m, null, U(v.value, (e, s) => (n(), i(t(S), {
|
|
48
47
|
key: s,
|
|
49
48
|
class: "contents font-code text-sm *:rounded-none first:*:rounded-l last:*:rounded-r *:h-8 *:hover:bg-b-2 *:flex *:items-center *:cursor-pointer *:px-1.5 text-c-2 font-medium",
|
|
50
49
|
value: s,
|
|
@@ -53,19 +52,19 @@ const N = { class: "min-w-0" }, V = { class: "min-w-0 truncate text-c-1" }, J =
|
|
|
53
52
|
default: p(() => {
|
|
54
53
|
var a;
|
|
55
54
|
return [
|
|
56
|
-
e.response.config.method ? (n(), i(
|
|
55
|
+
e.response.config.method ? (n(), i(z, {
|
|
57
56
|
key: 0,
|
|
58
57
|
class: "text-[11px]",
|
|
59
58
|
method: e.response.config.method
|
|
60
|
-
}, null, 8, ["method"])) :
|
|
61
|
-
r("div",
|
|
62
|
-
r("div",
|
|
59
|
+
}, null, 8, ["method"])) : h("", !0),
|
|
60
|
+
r("div", M, [
|
|
61
|
+
r("div", N, l(_(e.response.config.url)), 1)
|
|
63
62
|
]),
|
|
64
63
|
r("div", null, l(t(L)(e.response.duration)), 1),
|
|
65
64
|
r("div", {
|
|
66
|
-
class:
|
|
65
|
+
class: b([t(E)(e.response.status).color])
|
|
67
66
|
}, l(e.response.status), 3),
|
|
68
|
-
r("div", null, l((a = t(
|
|
67
|
+
r("div", null, l((a = t(P)[e.response.status]) == null ? void 0 : a.name), 1)
|
|
69
68
|
];
|
|
70
69
|
}),
|
|
71
70
|
_: 2
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodeInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/CodeInput.vue"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"CodeInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/CodeInput.vue"],"names":[],"mappings":"AAAA,OA0TO,EAGL,KAAK,kBAAkB,EAExB,MAAM,wBAAwB,CAAA;;kBAeb,OAAO;gBACT,MAAM,GAAG,MAAM;YACnB,OAAO;iBACF,OAAO;kBACN,OAAO;WACd,OAAO;uBACK,OAAO;eACf,kBAAkB;wBACT,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;wBACnB,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;kBACzB,MAAM;eACT,OAAO;mBACH,OAAO;2BACC,OAAO;WACvB,MAAM,EAAE;WACR,MAAM;eACF,OAAO;oBACF,OAAO;kBACT,OAAO;;;;;;;;;;;;;;kBAlBP,OAAO;gBACT,MAAM,GAAG,MAAM;YACnB,OAAO;iBACF,OAAO;kBACN,OAAO;WACd,OAAO;uBACK,OAAO;eACf,kBAAkB;wBACT,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;wBACnB,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;kBACzB,MAAM;eACT,OAAO;mBACH,OAAO;2BACC,OAAO;WACvB,MAAM,EAAE;WACR,MAAM;eACF,OAAO;oBACF,OAAO;kBACT,OAAO;;;;;;;;;;;;;;iBAAP,OAAO;iBAlBP,OAAO;gBAGR,OAAO;sBAGD,OAAO;kBAMX,OAAO;0BACC,OAAO;cAGnB,OAAO;mBACF,OAAO;;qBAgRG,GAAG;kBACN,GAAG;;AArS9B,wBAwUC;AAMD,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"}
|
|
@@ -2,7 +2,7 @@ import o from "./CodeInput.vue2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
-
const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
5
|
+
const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-caf4efcd"]]);
|
|
6
6
|
export {
|
|
7
7
|
a as default
|
|
8
8
|
};
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as $, ref as i, onMounted as f, openBlock as m, createElementBlock as h, createElementVNode as l, withDirectives as B, withKeys as I, withModifiers as R, vModelText as V, createVNode as a, unref as s, withCtx as n, Fragment as q, renderList as K, createBlock as W, createTextVNode as d, toDisplayString as v } from "vue";
|
|
2
2
|
import _ from "../HttpMethod/HttpMethod.vue.js";
|
|
3
3
|
import { useWorkspace as j } from "../../store/workspace.js";
|
|
4
4
|
import { ScalarDropdown as z, ScalarDropdownItem as T, ScalarButton as w, ScalarIcon as F } from "@scalar/components";
|
|
5
|
-
import { useRouter as
|
|
6
|
-
const
|
|
5
|
+
import { useRouter as H } from "vue-router";
|
|
6
|
+
const L = { class: "flex w-full flex-col gap-3" }, P = { class: "gap-3 rounded bg-b-2 focus-within:bg-b-1 focus-within:shadow-border min-h-20 relative" }, U = /* @__PURE__ */ l("label", {
|
|
7
7
|
class: "absolute w-full h-full opacity-0 cursor-text",
|
|
8
8
|
for: "examplename"
|
|
9
|
-
}, null, -1),
|
|
9
|
+
}, null, -1), A = ["onKeydown"], G = { class: "flex gap-2" }, J = { class: "flex flex-1 max-h-8" }, O = { class: "flex items-center gap-2" }, Q = { class: "max-h-40 custom-scroll" }, oe = /* @__PURE__ */ $({
|
|
10
10
|
__name: "CommandPaletteExample",
|
|
11
11
|
props: {
|
|
12
12
|
metaData: {}
|
|
13
13
|
},
|
|
14
14
|
emits: ["close"],
|
|
15
15
|
setup(b, { emit: k }) {
|
|
16
|
-
const y = b, g = k, { push: C } =
|
|
16
|
+
const y = b, g = k, { push: C } = H(), {
|
|
17
17
|
activeRequest: D,
|
|
18
18
|
activeWorkspace: E,
|
|
19
19
|
activeWorkspaceRequests: S,
|
|
20
20
|
requests: N,
|
|
21
|
-
requestExampleMutators:
|
|
22
|
-
} = j(), c =
|
|
21
|
+
requestExampleMutators: M
|
|
22
|
+
} = j(), c = i(""), o = i(
|
|
23
23
|
// Ensure we pre-select the correct request
|
|
24
24
|
N[y.metaData ?? ""] ?? D.value
|
|
25
|
-
), p = (e) => o.value = e,
|
|
26
|
-
|
|
25
|
+
), p = (e) => o.value = e, u = i(null);
|
|
26
|
+
f(() => {
|
|
27
27
|
var e;
|
|
28
|
-
return (e =
|
|
28
|
+
return (e = u.value) == null ? void 0 : e.focus();
|
|
29
29
|
});
|
|
30
|
-
const
|
|
31
|
-
const e =
|
|
30
|
+
const x = () => {
|
|
31
|
+
const e = M.add(
|
|
32
32
|
o.value,
|
|
33
33
|
c.value
|
|
34
34
|
);
|
|
@@ -36,26 +36,26 @@ const P = { class: "flex w-full flex-col gap-3" }, U = { class: "gap-3 rounded b
|
|
|
36
36
|
`/workspace/${E.value.uid}/request/${o.value.uid}/examples/${e.uid}`
|
|
37
37
|
), g("close"));
|
|
38
38
|
};
|
|
39
|
-
return
|
|
39
|
+
return f(() => {
|
|
40
40
|
var e;
|
|
41
|
-
(e =
|
|
42
|
-
}), (e, r) => (m(), h("div",
|
|
43
|
-
l("div",
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
(e = u.value) == null || e.focus();
|
|
42
|
+
}), (e, r) => (m(), h("div", L, [
|
|
43
|
+
l("div", P, [
|
|
44
|
+
U,
|
|
45
|
+
B(l("input", {
|
|
46
46
|
id: "examplename",
|
|
47
47
|
ref_key: "exampleInput",
|
|
48
|
-
ref:
|
|
48
|
+
ref: u,
|
|
49
49
|
"onUpdate:modelValue": r[0] || (r[0] = (t) => c.value = t),
|
|
50
50
|
class: "border-transparent outline-none w-full pl-8 text-sm min-h-8 py-1.5",
|
|
51
51
|
label: "Example Name",
|
|
52
52
|
placeholder: "Example Name",
|
|
53
|
-
onKeydown:
|
|
54
|
-
}, null, 40,
|
|
53
|
+
onKeydown: I(R(x, ["prevent"]), ["enter"])
|
|
54
|
+
}, null, 40, A), [
|
|
55
55
|
[V, c.value]
|
|
56
56
|
])
|
|
57
57
|
]),
|
|
58
|
-
l("div",
|
|
58
|
+
l("div", G, [
|
|
59
59
|
l("div", J, [
|
|
60
60
|
a(s(z), {
|
|
61
61
|
placement: "bottom",
|
|
@@ -105,7 +105,7 @@ const P = { class: "flex w-full flex-col gap-3" }, U = { class: "gap-3 rounded b
|
|
|
105
105
|
]),
|
|
106
106
|
a(s(w), {
|
|
107
107
|
class: "max-h-8 text-xs p-0 px-3",
|
|
108
|
-
onClick:
|
|
108
|
+
onClick: x
|
|
109
109
|
}, {
|
|
110
110
|
default: n(() => [
|
|
111
111
|
d(" Create Example ")
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as K, ref as d, computed as v, onMounted as T, openBlock as k, createElementBlock as W, createElementVNode as u, withDirectives as $, withKeys as G, withModifiers as
|
|
1
|
+
import { defineComponent as K, ref as d, computed as v, onMounted as T, openBlock as k, createElementBlock as W, createElementVNode as u, withDirectives as $, withKeys as G, withModifiers as H, vModelText as L, createVNode as o, unref as s, withCtx as r, normalizeClass as M, toDisplayString as S, createBlock as O, createCommentVNode as P, createTextVNode as A } from "vue";
|
|
2
2
|
import J from "../HttpMethod/HttpMethod.vue.js";
|
|
3
3
|
import { useWorkspace as Q } from "../../store/workspace.js";
|
|
4
4
|
import { ScalarListbox as U, ScalarButton as p, ScalarIcon as N } from "@scalar/components";
|
|
@@ -92,9 +92,9 @@ const Y = { class: "flex w-full flex-col gap-3" }, Z = { class: "gap-3 rounded b
|
|
|
92
92
|
"data-lpignore": "true",
|
|
93
93
|
label: "Request Name",
|
|
94
94
|
placeholder: "Request Name",
|
|
95
|
-
onKeydown: G(
|
|
95
|
+
onKeydown: G(H(w, ["prevent"]), ["enter"])
|
|
96
96
|
}, null, 40, te), [
|
|
97
|
-
[
|
|
97
|
+
[L, i.value]
|
|
98
98
|
])
|
|
99
99
|
]),
|
|
100
100
|
u("div", le, [
|
|
@@ -130,7 +130,7 @@ const Y = { class: "flex w-full flex-col gap-3" }, Z = { class: "gap-3 rounded b
|
|
|
130
130
|
]),
|
|
131
131
|
_: 1
|
|
132
132
|
}, 8, ["modelValue", "options"]),
|
|
133
|
-
m.value.length ? (k(),
|
|
133
|
+
m.value.length ? (k(), O(s(U), {
|
|
134
134
|
key: 0,
|
|
135
135
|
modelValue: a.value,
|
|
136
136
|
"onUpdate:modelValue": t[2] || (t[2] = (l) => a.value = l),
|
|
@@ -155,14 +155,14 @@ const Y = { class: "flex w-full flex-col gap-3" }, Z = { class: "gap-3 rounded b
|
|
|
155
155
|
})
|
|
156
156
|
]),
|
|
157
157
|
_: 1
|
|
158
|
-
}, 8, ["modelValue", "options"])) :
|
|
158
|
+
}, 8, ["modelValue", "options"])) : P("", !0)
|
|
159
159
|
]),
|
|
160
160
|
o(s(p), {
|
|
161
161
|
class: "max-h-8 text-xs p-0 px-3",
|
|
162
162
|
onClick: w
|
|
163
163
|
}, {
|
|
164
164
|
default: r(() => [
|
|
165
|
-
|
|
165
|
+
A(" Create Request ")
|
|
166
166
|
]),
|
|
167
167
|
_: 1
|
|
168
168
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TheCommandPalette.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/TheCommandPalette.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TheCommandPalette.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/TheCommandPalette.vue"],"names":[],"mappings":"AAmYA;;;;GAIG;;AACH,wBAuaI;AAEJ,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOpB,CAAA;AAEV,yCAAyC;AACzC,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,iBAAiB,CACxD"}
|
|
@@ -2,7 +2,7 @@ import o from "./TheCommandPalette.vue2.js";
|
|
|
2
2
|
import { PaletteComponents as s } from "./TheCommandPalette.vue2.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
-
const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
5
|
+
const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-3e82dc40"]]);
|
|
6
6
|
export {
|
|
7
7
|
s as PaletteComponents,
|
|
8
8
|
a as default
|
|
@@ -3,7 +3,6 @@ import { useModal as Q, ScalarIcon as g } from "@scalar/components";
|
|
|
3
3
|
import { useMagicKeys as j, whenever as b } from "@vueuse/core";
|
|
4
4
|
import { useRouter as J } from "vue-router";
|
|
5
5
|
import { isMacOS as X } from "@scalar/use-tooltip";
|
|
6
|
-
import { commandPaletteBus as M } from "../../libs/eventBusses/command-palette.js";
|
|
7
6
|
import { useWorkspace as Y } from "../../store/workspace.js";
|
|
8
7
|
import Z from "./CommandPaletteCollection.vue.js";
|
|
9
8
|
import ee from "./CommandPaletteExample.vue.js";
|
|
@@ -11,6 +10,7 @@ import oe from "./CommandPaletteFolder.vue.js";
|
|
|
11
10
|
import te from "./CommandPaletteImport.vue.js";
|
|
12
11
|
import ne from "./CommandPaletteRequest.vue.js";
|
|
13
12
|
import ae from "./CommandPaletteWorkspace.vue.js";
|
|
13
|
+
import { commandPaletteBus as M } from "../../libs/event-busses/command-palette.js";
|
|
14
14
|
const le = { class: "commandmenu" }, re = { class: "bg-b-2 flex items-center rounded mb-2 pl-2 focus-within:bg-b-1 focus-within:shadow-border" }, se = { for: "commandmenu" }, me = ["onClick"], ce = {
|
|
15
15
|
key: 0,
|
|
16
16
|
class: "text-c-3 text-center text-sm p-2 pt-3"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextBar.vue.d.ts","sourceRoot":"","sources":["../../src/components/ContextBar.vue"],"names":[],"mappings":";cA8CY,MAAM,EAAE;mBACH,MAAM;;;;cADX,MAAM,EAAE;mBACH,MAAM;;;;
|
|
1
|
+
{"version":3,"file":"ContextBar.vue.d.ts","sourceRoot":"","sources":["../../src/components/ContextBar.vue"],"names":[],"mappings":";cA8CY,MAAM,EAAE;mBACH,MAAM;;;;cADX,MAAM,EAAE;mBACH,MAAM;;;;AA8FvB,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 o from "./ContextBar.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-3656da18"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const p = { class: "fade-request-section-content sticky top-0 z-10 pointer-events-none" },
|
|
1
|
+
import { defineComponent as i, openBlock as n, createElementBlock as o, createElementVNode as s, Fragment as c, renderList as r, normalizeClass as a, toDisplayString as l } from "vue";
|
|
2
|
+
const p = { class: "fade-request-section-content sticky top-0 z-10 pointer-events-none" }, d = { class: "request-section-content request-section-content-filter bg-b-1 border-1/2 text-c-3 bg-b-1 mb-2.5 hidden xl:flex justify-center rounded p-[2.25px] text-xs gap-0.5 pointer-events-auto" }, u = ["isActive", "onClick"], _ = /* @__PURE__ */ i({
|
|
3
3
|
__name: "ContextBar",
|
|
4
4
|
props: {
|
|
5
5
|
sections: {},
|
|
6
6
|
activeSection: {}
|
|
7
7
|
},
|
|
8
8
|
emits: ["setActiveSection"],
|
|
9
|
-
setup(
|
|
10
|
-
return (t,
|
|
11
|
-
s("div",
|
|
12
|
-
(n(!0), o(
|
|
9
|
+
setup(m) {
|
|
10
|
+
return (t, v) => (n(), o("div", p, [
|
|
11
|
+
s("div", d, [
|
|
12
|
+
(n(!0), o(c, null, r(t.sections, (e) => (n(), o("button", {
|
|
13
13
|
key: e,
|
|
14
|
-
class: a(["hover:bg-b-
|
|
15
|
-
t.activeSection === e ? "bg-b-
|
|
14
|
+
class: a(["hover:bg-b-2 w-full rounded px-1 py-1 text-center font-medium", [
|
|
15
|
+
t.activeSection === e ? "bg-b-2 text-c-1 pointer-events-none" : ""
|
|
16
16
|
]]),
|
|
17
17
|
isActive: t.activeSection === e,
|
|
18
18
|
type: "button",
|
|
19
|
-
onClick: (
|
|
20
|
-
},
|
|
19
|
+
onClick: (b) => t.$emit("setActiveSection", e)
|
|
20
|
+
}, l(e), 11, u))), 128))
|
|
21
21
|
])
|
|
22
22
|
]));
|
|
23
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HttpMethod.vue.d.ts","sourceRoot":"","sources":["../../../src/components/HttpMethod/HttpMethod.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"HttpMethod.vue.d.ts","sourceRoot":"","sources":["../../../src/components/HttpMethod/HttpMethod.vue"],"names":[],"mappings":";eA0Ge,OAAO;YACV,MAAM;iBACD,OAAO;;;;;;;;eAFT,OAAO;YACV,MAAM;iBACD,OAAO;;;;;;;;cAFT,OAAO;gBAEL,OAAO;;AAgIxB,wBAOG;AAOH,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,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,69 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
const j = /* @__PURE__ */ g({
|
|
6
|
-
__name: "HttpMethod",
|
|
7
|
-
props: {
|
|
8
|
-
isSquare: { type: Boolean, default: !1 },
|
|
9
|
-
method: {},
|
|
10
|
-
isEditable: { type: Boolean, default: !1 }
|
|
11
|
-
},
|
|
12
|
-
emits: ["change"],
|
|
13
|
-
setup(b, { emit: h }) {
|
|
14
|
-
const i = b, v = h, o = l(() => w(i.method)), u = Object.entries(B).map(
|
|
15
|
-
([e, { short: s }]) => ({
|
|
16
|
-
id: e,
|
|
17
|
-
label: e.charAt(0) + e.toLowerCase().slice(1)
|
|
18
|
-
})
|
|
19
|
-
), d = l({
|
|
20
|
-
get: () => u.find(({ id: e }) => e === i.method),
|
|
21
|
-
set: (e) => (e == null ? void 0 : e.id) && v("change", e.id)
|
|
22
|
-
}), c = V({
|
|
23
|
-
base: "text-center font-code text-3xs justify-center items-center flex",
|
|
24
|
-
variants: {
|
|
25
|
-
isSquare: {
|
|
26
|
-
true: "px-2.5 rounded-md border-1/2 whitespace-nowrap !bg-transparent font-bold",
|
|
27
|
-
false: "rounded-full"
|
|
28
|
-
},
|
|
29
|
-
isEditable: {
|
|
30
|
-
true: "px-0 hover:bg-mix-b-2",
|
|
31
|
-
false: "cusor-pointer"
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}), E = l(() => o.value.short);
|
|
35
|
-
return (e, s) => e.isEditable ? (r(), m(t(x), {
|
|
36
|
-
key: 0,
|
|
37
|
-
modelValue: d.value,
|
|
38
|
-
"onUpdate:modelValue": s[0] || (s[0] = (S) => d.value = S),
|
|
39
|
-
options: t(u)
|
|
40
|
-
}, {
|
|
41
|
-
default: y(() => [
|
|
42
|
-
n("div", {
|
|
43
|
-
class: a(["h-full", { "pointer-events-none": !e.isEditable }])
|
|
44
|
-
}, [
|
|
45
|
-
n("button", {
|
|
46
|
-
class: a(["relative h-full gap-1", t(f)(t(c)({ isSquare: e.isSquare, isEditable: e.isEditable }), o.value.color)]),
|
|
47
|
-
type: "button"
|
|
48
|
-
}, [
|
|
49
|
-
n("span", null, p(E.value), 1),
|
|
50
|
-
e.isEditable ? (r(), m(t(C), {
|
|
51
|
-
key: 0,
|
|
52
|
-
class: a(o.value.color),
|
|
53
|
-
icon: "ChevronDown",
|
|
54
|
-
size: "xs"
|
|
55
|
-
}, null, 8, ["class"])) : q("", !0)
|
|
56
|
-
], 2)
|
|
57
|
-
], 2)
|
|
58
|
-
]),
|
|
59
|
-
_: 1
|
|
60
|
-
}, 8, ["modelValue", "options"])) : (r(), k("div", {
|
|
61
|
-
key: 1,
|
|
62
|
-
class: a(["relative gap-1", t(f)(t(c)({ isSquare: e.isSquare, isEditable: e.isEditable }), o.value.color)]),
|
|
63
|
-
type: "button"
|
|
64
|
-
}, p(o.value.short), 3));
|
|
65
|
-
}
|
|
66
|
-
});
|
|
1
|
+
import t from "./HttpMethod.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const f = /* @__PURE__ */ o(t, [["__scopeId", "data-v-5fe98831"]]);
|
|
67
5
|
export {
|
|
68
|
-
|
|
6
|
+
f as default
|
|
69
7
|
};
|