@scalar/api-client 2.0.47 → 2.0.49
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 +37 -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/Sidebar/Sidebar.vue.d.ts +23 -3
- package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.js +55 -19
- 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/components/TopNav/TopNavItem.vue.js +1 -1
- 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/Request/Request.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.js +1 -1
- package/dist/views/Request/Request.vue2.js +135 -131
- package/dist/views/Request/RequestSection/RequestAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth.vue2.js +165 -148
- 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 +252 -138
- 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 +215 -70
- package/dist/views/Request/consts/new-auth-options.d.ts +0 -1
- package/dist/views/Request/consts/new-auth-options.d.ts.map +1 -1
- package/dist/views/Request/consts/new-auth-options.js +5 -6
- package/package.json +7 -7
- 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
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,42 @@
|
|
|
1
1
|
# @scalar/api-client
|
|
2
2
|
|
|
3
|
+
## 2.0.49
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 56be4fe: feat(api-client): added complex multi auth
|
|
8
|
+
- c450bb3: fix: scalar api ref use scalar-border-width
|
|
9
|
+
- 75a5a64: fix: sidebar title
|
|
10
|
+
- Updated dependencies [c450bb3]
|
|
11
|
+
- @scalar/themes@0.9.23
|
|
12
|
+
- @scalar/components@0.12.31
|
|
13
|
+
- @scalar/oas-utils@0.2.30
|
|
14
|
+
|
|
15
|
+
## 2.0.48
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- db96313: feat: workspace rename and deletion
|
|
20
|
+
- de9747c: fix: topnav alignment
|
|
21
|
+
- 8672a78: feat(api-client): moved command palette to the global key event bus
|
|
22
|
+
- 58e5912: fix: markdown fixes and intro card polish
|
|
23
|
+
- 6f7ab8d: feat: sidebar request transition and dragging capability
|
|
24
|
+
- 89ee9da: fix(api-client): move web hash router to a factory function
|
|
25
|
+
- 078ca72: feat: add topnav and addressbar hotkeys
|
|
26
|
+
- 520caff: fix: hot keys bus modifier
|
|
27
|
+
- 03e9bbb: Move to flatted for localstorage
|
|
28
|
+
- db96313: feat: set request sidebar item context menu
|
|
29
|
+
- Updated dependencies [8672a78]
|
|
30
|
+
- Updated dependencies [db96313]
|
|
31
|
+
- Updated dependencies [078ca72]
|
|
32
|
+
- Updated dependencies [6f107e1]
|
|
33
|
+
- Updated dependencies [520caff]
|
|
34
|
+
- Updated dependencies [03e9bbb]
|
|
35
|
+
- Updated dependencies [db96313]
|
|
36
|
+
- @scalar/oas-utils@0.2.29
|
|
37
|
+
- @scalar/components@0.12.30
|
|
38
|
+
- @scalar/object-utils@1.1.7
|
|
39
|
+
|
|
3
40
|
## 2.0.47
|
|
4
41
|
|
|
5
42
|
### 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":";AAqtBA,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 a = /* @__PURE__ */ r(o, [["__scopeId", "data-v-28ee5506"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default
|
|
7
7
|
};
|
|
@@ -1,129 +1,135 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { useWorkspace as
|
|
4
|
-
import { Listbox as
|
|
5
|
-
import { ScalarButton as
|
|
6
|
-
import { REQUEST_METHODS as
|
|
7
|
-
import { isMacOS as
|
|
8
|
-
import { useMagicKeys as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { executeRequestBus as m } from "../../libs/event-busses/execute-
|
|
12
|
-
import { requestStatusBus as
|
|
13
|
-
|
|
1
|
+
import { defineComponent as L, ref as n, watch as O, onMounted as $, onBeforeUnmount as K, unref as l, openBlock as N, createElementBlock as T, createElementVNode as a, createVNode as i, withCtx as y, normalizeClass as B, normalizeStyle as A, createCommentVNode as D, pushScopeId as Q, popScopeId as W } from "vue";
|
|
2
|
+
import j from "../CodeInput/CodeInput.vue.js";
|
|
3
|
+
import { useWorkspace as F } from "../../store/workspace.js";
|
|
4
|
+
import { Listbox as G } from "@headlessui/vue";
|
|
5
|
+
import { ScalarButton as J, ScalarIcon as P } from "@scalar/components";
|
|
6
|
+
import { REQUEST_METHODS as X } from "@scalar/oas-utils/helpers";
|
|
7
|
+
import { isMacOS as Y } from "@scalar/use-tooltip";
|
|
8
|
+
import { useMagicKeys as Z, whenever as ee } from "@vueuse/core";
|
|
9
|
+
import te from "../HttpMethod/HttpMethod.vue.js";
|
|
10
|
+
import le from "./AddressBarHistory.vue.js";
|
|
11
|
+
import { executeRequestBus as m } from "../../libs/event-busses/execute-request-bus.js";
|
|
12
|
+
import { requestStatusBus as oe } from "../../libs/event-busses/request-status-bus.js";
|
|
13
|
+
import { hotKeyBus as k } from "../../libs/event-busses/hot-keys-bus.js";
|
|
14
|
+
const v = (f) => (Q("data-v-28ee5506"), f = f(), W(), f), ae = {
|
|
14
15
|
key: 0,
|
|
15
16
|
class: "order-last lg:order-none lg:w-auto w-full"
|
|
16
|
-
},
|
|
17
|
+
}, re = { class: "m-auto flex basis-1/2 flex-row items-center" }, se = { class: "pointer-events-none absolute left-0 top-0 z-10 block h-full w-full overflow-hidden" }, ne = { class: "flex gap-1" }, ie = { class: "codemirror-bg-switcher scroll-timeline-x scroll-timeline-x-hidden relative flex w-full" }, ue = /* @__PURE__ */ v(() => /* @__PURE__ */ a("div", { class: "fade-left" }, null, -1)), de = /* @__PURE__ */ v(() => /* @__PURE__ */ a("div", { class: "fade-right" }, null, -1)), fe = /* @__PURE__ */ v(() => /* @__PURE__ */ a("span", { class: "text-xxs relative z-10 lg:flex hidden" }, "Send", -1)), Ee = /* @__PURE__ */ L({
|
|
17
18
|
__name: "AddressBar",
|
|
18
|
-
setup(
|
|
19
|
+
setup(f) {
|
|
19
20
|
const {
|
|
20
21
|
activeRequest: t,
|
|
21
|
-
activeExample:
|
|
22
|
+
activeExample: c,
|
|
22
23
|
isReadOnly: p,
|
|
23
24
|
requestMutators: h,
|
|
24
25
|
requestExampleMutators: S,
|
|
25
|
-
requestsHistory:
|
|
26
|
-
} =
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
requestsHistory: E
|
|
27
|
+
} = F(), x = n(E.value[0]), b = n(null), g = Z();
|
|
28
|
+
ee(
|
|
29
|
+
Y() ? g.meta_enter : g.ctrl_enter,
|
|
29
30
|
() => m.emit()
|
|
30
31
|
);
|
|
31
|
-
const
|
|
32
|
+
const C = (e) => {
|
|
32
33
|
!t.value || t.value.path === e || h.edit(t.value.uid, "path", e);
|
|
33
34
|
};
|
|
34
|
-
|
|
35
|
+
O(
|
|
35
36
|
() => {
|
|
36
37
|
var e;
|
|
37
38
|
return (e = t.value) == null ? void 0 : e.path;
|
|
38
39
|
},
|
|
39
40
|
(e) => {
|
|
40
|
-
t.value &&
|
|
41
|
+
t.value && C(e);
|
|
41
42
|
}
|
|
42
43
|
);
|
|
43
|
-
const
|
|
44
|
-
function
|
|
45
|
-
|
|
44
|
+
const r = n(100), _ = n(0), s = n(!1), u = n();
|
|
45
|
+
function q() {
|
|
46
|
+
s.value ? r.value -= (r.value - 15) / 60 : r.value -= _.value / 20, r.value <= 0 && (clearInterval(u.value), u.value = void 0, r.value = 100, s.value = !1);
|
|
46
47
|
}
|
|
47
|
-
function
|
|
48
|
-
|
|
48
|
+
function R() {
|
|
49
|
+
s.value || (s.value = !0, u.value = setInterval(q, 20));
|
|
49
50
|
}
|
|
50
|
-
function
|
|
51
|
-
|
|
51
|
+
function I() {
|
|
52
|
+
_.value = r.value, s.value = !1;
|
|
52
53
|
}
|
|
53
|
-
function
|
|
54
|
-
clearInterval(
|
|
54
|
+
function V() {
|
|
55
|
+
clearInterval(u.value), u.value = void 0, r.value = 100, s.value = !1;
|
|
55
56
|
}
|
|
56
|
-
|
|
57
|
-
e === "start" &&
|
|
57
|
+
oe.on((e) => {
|
|
58
|
+
e === "start" && R(), e === "stop" && I(), e === "abort" && V();
|
|
58
59
|
});
|
|
59
|
-
function
|
|
60
|
+
function M(e) {
|
|
60
61
|
t.value && h.edit(t.value.uid, "method", e);
|
|
61
62
|
}
|
|
62
|
-
function
|
|
63
|
+
function z() {
|
|
63
64
|
if (!t.value) return;
|
|
64
65
|
const { method: e } = t.value;
|
|
65
|
-
return
|
|
66
|
+
return X[e].backgroundColor;
|
|
66
67
|
}
|
|
67
|
-
const
|
|
68
|
-
|
|
68
|
+
const U = (e) => {
|
|
69
|
+
c.value && S.edit(c.value.uid, "url", e);
|
|
70
|
+
}, w = (e) => {
|
|
71
|
+
var o;
|
|
72
|
+
e.focusAddressBar && ((o = b.value) == null || o.focus());
|
|
69
73
|
};
|
|
70
|
-
return (e,
|
|
71
|
-
|
|
72
|
-
|
|
74
|
+
return $(() => k.on(w)), K(() => k.off(w)), (e, o) => l(t) && l(c) ? (N(), T("div", ae, [
|
|
75
|
+
a("div", re, [
|
|
76
|
+
i(l(G), {
|
|
73
77
|
modelValue: x.value,
|
|
74
|
-
"onUpdate:modelValue":
|
|
78
|
+
"onUpdate:modelValue": o[2] || (o[2] = (d) => x.value = d)
|
|
75
79
|
}, {
|
|
76
|
-
default:
|
|
77
|
-
|
|
78
|
-
class:
|
|
80
|
+
default: y(({ open: d }) => [
|
|
81
|
+
a("div", {
|
|
82
|
+
class: B([
|
|
79
83
|
"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
|
-
{ "rounded-b-none":
|
|
81
|
-
{ "border-transparent":
|
|
84
|
+
{ "rounded-b-none": d },
|
|
85
|
+
{ "border-transparent": d }
|
|
82
86
|
])
|
|
83
87
|
}, [
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
class:
|
|
87
|
-
style:
|
|
88
|
+
a("div", se, [
|
|
89
|
+
a("div", {
|
|
90
|
+
class: B(["bg-mix-transparent bg-mix-amount-90 absolute left-0 top-0 h-full w-full", z()]),
|
|
91
|
+
style: A({ transform: `translate3d(-${r.value}%,0,0)` })
|
|
88
92
|
}, null, 6)
|
|
89
93
|
]),
|
|
90
|
-
|
|
91
|
-
|
|
94
|
+
a("div", ne, [
|
|
95
|
+
i(te, {
|
|
92
96
|
isEditable: !l(p),
|
|
93
97
|
isSquare: "",
|
|
94
98
|
method: l(t).method,
|
|
95
|
-
onChange:
|
|
99
|
+
onChange: M
|
|
96
100
|
}, null, 8, ["isEditable", "method"])
|
|
97
101
|
]),
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
102
|
+
a("div", ie, [
|
|
103
|
+
ue,
|
|
104
|
+
i(j, {
|
|
105
|
+
ref_key: "addressBarRef",
|
|
106
|
+
ref: b,
|
|
101
107
|
disableCloseBrackets: "",
|
|
102
108
|
disabled: l(p),
|
|
103
109
|
disableEnter: "",
|
|
104
110
|
disableTabIndent: "",
|
|
105
111
|
emitOnBlur: !1,
|
|
106
|
-
modelValue: l(
|
|
112
|
+
modelValue: l(c).url,
|
|
107
113
|
placeholder: "Enter URL to get started",
|
|
108
114
|
server: "",
|
|
109
|
-
onSubmit:
|
|
110
|
-
"onUpdate:modelValue":
|
|
115
|
+
onSubmit: o[0] || (o[0] = (H) => l(m).emit()),
|
|
116
|
+
"onUpdate:modelValue": U
|
|
111
117
|
}, null, 8, ["disabled", "modelValue"]),
|
|
112
|
-
|
|
118
|
+
de
|
|
113
119
|
]),
|
|
114
|
-
|
|
115
|
-
|
|
120
|
+
i(le, { open: d }, null, 8, ["open"]),
|
|
121
|
+
i(l(J), {
|
|
116
122
|
class: "relative h-auto shrink-0 gap-1 overflow-hidden pl-2 pr-2.5 py-1 z-[1] font-bold",
|
|
117
|
-
disabled:
|
|
118
|
-
onClick:
|
|
123
|
+
disabled: s.value,
|
|
124
|
+
onClick: o[1] || (o[1] = (H) => l(m).emit())
|
|
119
125
|
}, {
|
|
120
|
-
default:
|
|
121
|
-
|
|
126
|
+
default: y(() => [
|
|
127
|
+
i(l(P), {
|
|
122
128
|
class: "relative z-10 shrink-0 fill-current",
|
|
123
129
|
icon: "Play",
|
|
124
130
|
size: "xs"
|
|
125
131
|
}),
|
|
126
|
-
|
|
132
|
+
fe
|
|
127
133
|
]),
|
|
128
134
|
_: 1
|
|
129
135
|
}, 8, ["disabled"])
|
|
@@ -132,9 +138,9 @@ const v = (c) => (N("data-v-372103f0"), c = c(), T(), c), Z = {
|
|
|
132
138
|
_: 1
|
|
133
139
|
}, 8, ["modelValue"])
|
|
134
140
|
])
|
|
135
|
-
])) :
|
|
141
|
+
])) : D("", !0);
|
|
136
142
|
}
|
|
137
143
|
});
|
|
138
144
|
export {
|
|
139
|
-
|
|
145
|
+
Ee as default
|
|
140
146
|
};
|
|
@@ -28,7 +28,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
28
28
|
nullable: boolean;
|
|
29
29
|
withVariables: boolean;
|
|
30
30
|
withServers: boolean;
|
|
31
|
-
}>, {
|
|
31
|
+
}>, {
|
|
32
|
+
focus: () => void;
|
|
33
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
32
34
|
submit: (v: string) => void;
|
|
33
35
|
"update:modelValue": (v: string) => void;
|
|
34
36
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
|
|
@@ -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,OAiUO,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;;qBA4RG,GAAG;kBACN,GAAG;;AAjT9B,wBAqVC;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
|
|
5
|
+
const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-b044f01b"]]);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
_ as default
|
|
8
8
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useCodeMirror as
|
|
3
|
-
import { nanoid as
|
|
1
|
+
import { defineComponent as E, useAttrs as q, ref as y, toRef as o, watch as I, computed as M, openBlock as t, createElementBlock as s, Fragment as N, createBlock as g, mergeProps as T, unref as A, renderSlot as v, createCommentVNode as B } from "vue";
|
|
2
|
+
import { useCodeMirror as U, colorPicker as W } from "@scalar/use-codemirror";
|
|
3
|
+
import { nanoid as j } from "nanoid";
|
|
4
4
|
import V from "../DataTable/DataTableInputSelect.vue.js";
|
|
5
|
-
import { dropdownPlugin as
|
|
6
|
-
import { pillPlugin as
|
|
7
|
-
import { useWorkspace as
|
|
8
|
-
const
|
|
5
|
+
import { dropdownPlugin as z } from "./codeDropdownWidget.js";
|
|
6
|
+
import { pillPlugin as D, backspaceCommand as G } from "./codeVariableWidget.js";
|
|
7
|
+
import { useWorkspace as H } from "../../store/workspace.js";
|
|
8
|
+
const J = ["id"], K = {
|
|
9
9
|
key: 3,
|
|
10
10
|
class: "absolute centered-y right-7 text-orange text-xs"
|
|
11
|
-
},
|
|
11
|
+
}, L = {
|
|
12
12
|
key: 4,
|
|
13
13
|
class: "required absolute centered-y right-0 pt-px pr-2 text-xxs text-c-3 bg-b-1 shadow-[-8px_0_4px_var(--scalar-background-1)] opacity-100 duration-150 transition-opacity peer-has-[.cm-focused]:opacity-0 pointer-events-none"
|
|
14
|
-
},
|
|
14
|
+
}, Q = {
|
|
15
15
|
inheritAttrs: !1
|
|
16
|
-
},
|
|
17
|
-
...
|
|
16
|
+
}, ae = /* @__PURE__ */ E({
|
|
17
|
+
...Q,
|
|
18
18
|
__name: "CodeInput",
|
|
19
19
|
props: {
|
|
20
20
|
colorPicker: { type: Boolean, default: !1 },
|
|
@@ -38,42 +38,42 @@ const H = ["id"], J = {
|
|
|
38
38
|
withServers: { type: Boolean, default: !1 }
|
|
39
39
|
},
|
|
40
40
|
emits: ["submit", "update:modelValue"],
|
|
41
|
-
setup(k, {
|
|
41
|
+
setup(k, { expose: w, emit: C }) {
|
|
42
42
|
var b;
|
|
43
|
-
const e = k,
|
|
44
|
-
activeWorkspace:
|
|
43
|
+
const e = k, r = C, d = q(), _ = d.id || `id-${j()}`, p = y(!1), {
|
|
44
|
+
activeWorkspace: x,
|
|
45
45
|
activeParsedEnvironments: c,
|
|
46
|
-
isReadOnly:
|
|
46
|
+
isReadOnly: F,
|
|
47
47
|
environments: m,
|
|
48
|
-
router:
|
|
49
|
-
} =
|
|
50
|
-
function S(l) {
|
|
51
|
-
return l === e.modelValue ? null : e.handleFieldChange ? e.handleFieldChange(l) : n("update:modelValue", l);
|
|
52
|
-
}
|
|
48
|
+
router: S
|
|
49
|
+
} = H();
|
|
53
50
|
function P(l) {
|
|
54
|
-
return e.
|
|
51
|
+
return l === e.modelValue ? null : e.handleFieldChange ? e.handleFieldChange(l) : r("update:modelValue", l);
|
|
55
52
|
}
|
|
56
53
|
function O(l) {
|
|
57
|
-
|
|
54
|
+
return e.handleFieldSubmit ? e.handleFieldSubmit(l) : r("submit", l);
|
|
55
|
+
}
|
|
56
|
+
function R(l) {
|
|
57
|
+
p.value = !1, e.emitOnBlur && e.modelValue && O(l);
|
|
58
58
|
}
|
|
59
59
|
const a = [];
|
|
60
|
-
e.colorPicker && a.push(
|
|
61
|
-
|
|
60
|
+
e.colorPicker && a.push(W), e.withVariables && !x.value.isReadOnly && a.push(
|
|
61
|
+
z({
|
|
62
62
|
withServers: e.withServers,
|
|
63
63
|
activeParsedEnvironments: c,
|
|
64
64
|
environments: m,
|
|
65
|
-
router:
|
|
65
|
+
router: S
|
|
66
66
|
})
|
|
67
67
|
), a.push(
|
|
68
|
-
|
|
69
|
-
), a.push(
|
|
70
|
-
const f = y(null), { codeMirror:
|
|
68
|
+
D({ environments: m, activeParsedEnvironments: c, isReadOnly: F })
|
|
69
|
+
), a.push(G);
|
|
70
|
+
const f = y(null), { codeMirror: n } = U({
|
|
71
71
|
content: o(
|
|
72
72
|
() => e.modelValue !== void 0 ? String(e.modelValue) : ""
|
|
73
73
|
),
|
|
74
|
-
onChange:
|
|
74
|
+
onChange: P,
|
|
75
75
|
onFocus: () => p.value = !0,
|
|
76
|
-
onBlur: (l) =>
|
|
76
|
+
onBlur: (l) => R(l),
|
|
77
77
|
codeMirrorRef: f,
|
|
78
78
|
disableTabIndent: o(() => e.disableTabIndent),
|
|
79
79
|
disableEnter: o(() => e.disableEnter),
|
|
@@ -84,45 +84,50 @@ const H = ["id"], J = {
|
|
|
84
84
|
extensions: a,
|
|
85
85
|
placeholder: o(() => e.placeholder)
|
|
86
86
|
});
|
|
87
|
-
(b =
|
|
88
|
-
|
|
87
|
+
(b = n.value) == null || b.focus(), I(n, () => {
|
|
88
|
+
n.value && Object.prototype.hasOwnProperty.call(d, "autofocus") && n.value.focus();
|
|
89
89
|
});
|
|
90
|
-
const
|
|
90
|
+
const $ = M(() => {
|
|
91
91
|
var l;
|
|
92
92
|
return e.type === "boolean" || (l = e.type) != null && l.includes("boolean") || e.nullable ? ["true", "false", "null"] : ["true", "false"];
|
|
93
93
|
});
|
|
94
|
-
return (
|
|
94
|
+
return w({
|
|
95
|
+
focus: () => {
|
|
96
|
+
var l;
|
|
97
|
+
(l = n.value) == null || l.focus();
|
|
98
|
+
}
|
|
99
|
+
}), (l, u) => {
|
|
95
100
|
var h;
|
|
96
|
-
return t(), s(
|
|
101
|
+
return t(), s(N, null, [
|
|
97
102
|
e.enum && e.enum.length ? (t(), g(V, {
|
|
98
103
|
key: 0,
|
|
99
104
|
modelValue: e.modelValue,
|
|
100
105
|
value: e.enum,
|
|
101
|
-
"onUpdate:modelValue": u[0] || (u[0] = (i) =>
|
|
106
|
+
"onUpdate:modelValue": u[0] || (u[0] = (i) => r("update:modelValue", i))
|
|
102
107
|
}, null, 8, ["modelValue", "value"])) : e.type === "boolean" || (h = e.type) != null && h.includes("boolean") ? (t(), g(V, {
|
|
103
108
|
key: 1,
|
|
104
109
|
modelValue: e.modelValue,
|
|
105
|
-
value:
|
|
106
|
-
"onUpdate:modelValue": u[1] || (u[1] = (i) =>
|
|
107
|
-
}, null, 8, ["modelValue", "value"])) : (t(), s("div",
|
|
110
|
+
value: $.value,
|
|
111
|
+
"onUpdate:modelValue": u[1] || (u[1] = (i) => r("update:modelValue", i))
|
|
112
|
+
}, null, 8, ["modelValue", "value"])) : (t(), s("div", T({
|
|
108
113
|
key: 2,
|
|
109
|
-
id:
|
|
114
|
+
id: A(_)
|
|
110
115
|
}, l.$attrs, {
|
|
111
116
|
ref_key: "codeMirrorRef",
|
|
112
117
|
ref: f,
|
|
113
118
|
class: ["peer font-code w-full whitespace-nowrap text-xs leading-[1.44] relative", {
|
|
114
119
|
"flow-code-input--error": l.error
|
|
115
120
|
}]
|
|
116
|
-
}), null, 16,
|
|
117
|
-
l.$slots.warning ? (t(), s("div",
|
|
121
|
+
}), null, 16, J)),
|
|
122
|
+
l.$slots.warning ? (t(), s("div", K, [
|
|
118
123
|
v(l.$slots, "warning", {}, void 0, !0)
|
|
119
124
|
])) : B("", !0),
|
|
120
125
|
v(l.$slots, "icon", {}, void 0, !0),
|
|
121
|
-
l.required ? (t(), s("div",
|
|
126
|
+
l.required ? (t(), s("div", L, " Required ")) : B("", !0)
|
|
122
127
|
], 64);
|
|
123
128
|
};
|
|
124
129
|
}
|
|
125
130
|
});
|
|
126
131
|
export {
|
|
127
|
-
|
|
132
|
+
ae as default
|
|
128
133
|
};
|
|
@@ -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":"AA4WA;;;;GAIG;;AACH,wBA0YI;AAEJ,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOpB,CAAA;AAEV,yCAAyC;AACzC,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,iBAAiB,CACxD"}
|
|
@@ -2,8 +2,8 @@ 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
|
|
5
|
+
const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-67f4ba63"]]);
|
|
6
6
|
export {
|
|
7
7
|
s as PaletteComponents,
|
|
8
|
-
|
|
8
|
+
r as default
|
|
9
9
|
};
|