@scalar/api-client 2.1.18 → 2.1.20
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 +41 -0
- package/dist/components/AddressBar/AddressBar.vue.d.ts +5 -1
- 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 +70 -69
- package/dist/components/AddressBar/AddressBarHistory.vue.js +2 -2
- package/dist/components/AddressBar/AddressBarHistory.vue2.js +8 -8
- package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarServer.vue.js +29 -29
- package/dist/components/CodeInput/CodeInput.vue.d.ts +6 -2
- 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 +57 -49
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts +1 -1
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts +1 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts +1 -1
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts +1 -1
- package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts +1 -1
- package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteServer.vue.js +62 -45
- package/dist/components/CommandPalette/CommandPaletteTag.vue.d.ts +1 -1
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.d.ts +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +13 -7
- 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 +87 -89
- package/dist/components/ContextBar.vue.d.ts.map +1 -1
- package/dist/components/ContextBar.vue.js +2 -2
- package/dist/components/DataTable/DataTableCheckbox.vue.d.ts +19 -3
- package/dist/components/DataTable/DataTableCheckbox.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableCheckbox.vue.js +27 -14
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +8 -8
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
- package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js +29 -32
- package/dist/components/ImportCurl/ImportCurlModal.vue.d.ts +39 -0
- package/dist/components/ImportCurl/ImportCurlModal.vue.d.ts.map +1 -0
- package/dist/components/ImportCurl/ImportCurlModal.vue.js +7 -0
- package/dist/components/ImportCurl/ImportCurlModal.vue2.js +88 -0
- package/dist/components/SideNav/SideHelp.vue.d.ts.map +1 -1
- 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 +37 -26
- package/dist/components/SideNav/SideNavLink.vue.d.ts +2 -2
- package/dist/components/SideNav/SideNavLink.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNavLink.vue.js +10 -11
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.d.ts +1 -1
- package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.js +1 -1
- package/dist/components/Sidebar/Sidebar.vue2.js +1 -1
- package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarButton.vue.js +1 -1
- package/dist/components/Sidebar/SidebarListElement.vue.d.ts +24 -3
- 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 +26 -22
- package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts +4 -0
- package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarListElementActions.vue.js +35 -32
- package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNav.vue.js +3 -3
- package/dist/components/TopNav/TopNav.vue2.js +41 -40
- package/dist/components/ViewLayout/ViewLayout.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayout.vue.js +7 -7
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +1 -1
- package/dist/components/ViewLayout/ViewLayoutContent.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutContent.vue.js +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +11 -11
- package/dist/constants.d.ts +4 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +2 -1
- package/dist/hooks/useDarkModeState.d.ts +4 -3
- package/dist/hooks/useDarkModeState.d.ts.map +1 -1
- package/dist/hooks/useDarkModeState.js +36 -21
- package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
- package/dist/layouts/App/ApiClientApp.vue.js +40 -44
- package/dist/layouts/App/create-api-client-app.d.ts +46 -36
- 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 +17 -17
- package/dist/layouts/Modal/create-api-client-modal.d.ts +92 -72
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Web/ApiClientWeb.vue.d.ts.map +1 -1
- package/dist/layouts/Web/ApiClientWeb.vue.js +30 -34
- package/dist/layouts/Web/create-api-client-web.d.ts +46 -36
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +46 -36
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/event-bus.d.ts +41 -0
- package/dist/libs/event-bus.d.ts.map +1 -0
- package/dist/libs/event-bus.js +32 -0
- package/dist/libs/{event-busses/hot-keys-bus.d.ts → hot-keys.d.ts} +6 -7
- package/dist/libs/hot-keys.d.ts.map +1 -0
- package/dist/libs/hot-keys.js +45 -0
- package/dist/libs/importers/curl.d.ts +3 -0
- package/dist/libs/importers/curl.d.ts.map +1 -0
- package/dist/libs/importers/curl.js +61 -0
- package/dist/libs/importers/index.d.ts +2 -0
- package/dist/libs/importers/index.d.ts.map +1 -0
- package/dist/libs/importers/index.js +4 -0
- package/dist/libs/index.d.ts +4 -1
- package/dist/libs/index.d.ts.map +1 -1
- package/dist/libs/index.js +31 -31
- package/dist/libs/parse-curl.d.ts +12 -0
- package/dist/libs/parse-curl.d.ts.map +1 -0
- package/dist/libs/parse-curl.js +70 -0
- package/dist/libs/send-request.d.ts +4 -1
- package/dist/libs/send-request.d.ts.map +1 -1
- package/dist/libs/send-request.js +103 -103
- package/dist/router.d.ts +2 -1
- package/dist/router.d.ts.map +1 -1
- package/dist/router.js +33 -24
- package/dist/store/collections.d.ts +4 -4
- package/dist/store/cookies.d.ts +4 -4
- package/dist/store/environment.d.ts +4 -4
- package/dist/store/events.d.ts +29 -0
- package/dist/store/events.d.ts.map +1 -0
- package/dist/store/events.js +31 -0
- package/dist/store/request-example.d.ts +4 -4
- package/dist/store/requests.d.ts +4 -4
- package/dist/store/router-params.d.ts +1 -0
- package/dist/store/router-params.d.ts.map +1 -1
- package/dist/store/router-params.js +2 -1
- package/dist/store/security-schemes.d.ts +4 -4
- package/dist/store/servers.d.ts +4 -4
- package/dist/store/store.d.ts +92 -72
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/store.js +138 -129
- package/dist/store/tags.d.ts +4 -4
- package/dist/store/workspace.d.ts +4 -4
- package/dist/style.css +1 -1
- package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +18 -18
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +9 -9
- 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 +148 -98
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +1 -1
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +4 -4
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.js +3 -3
- package/dist/views/Request/RequestSidebar.vue2.js +101 -102
- package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
- package/dist/views/Request/RequestSidebarItem.vue2.js +73 -73
- 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 +33 -34
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts +2 -0
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue.js +4 -4
- package/dist/views/Request/RequestSubpageHeader.vue2.js +17 -15
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.d.ts +16 -0
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.d.ts.map +1 -0
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.js +31 -0
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue3.js +5 -0
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +30 -33
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.js +3 -3
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue2.js +18 -19
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +20 -20
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +68 -56
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +29 -30
- package/dist/views/Settings/Settings.vue.d.ts +4 -0
- package/dist/views/Settings/Settings.vue.d.ts.map +1 -0
- package/dist/views/Settings/Settings.vue.js +4 -0
- package/dist/views/Settings/Settings.vue2.js +59 -0
- package/dist/{components/DarkModeToggle/DarkModeIconToggle.vue.d.ts → views/Settings/SettingsGeneral.vue.d.ts} +1 -1
- package/dist/views/Settings/SettingsGeneral.vue.d.ts.map +1 -0
- package/dist/views/Settings/SettingsGeneral.vue.js +124 -0
- package/dist/views/Settings/SettingsGeneral.vue2.js +4 -0
- package/dist/views/Settings/SettingsGeneralMode.vue.d.ts +3 -0
- package/dist/views/Settings/SettingsGeneralMode.vue.d.ts.map +1 -0
- package/dist/views/Settings/SettingsGeneralMode.vue.js +78 -0
- package/dist/views/Settings/SettingsGeneralMode.vue2.js +4 -0
- package/package.json +59 -35
- package/dist/components/DarkModeToggle/DarkModeIconToggle.vue.d.ts.map +0 -1
- package/dist/components/DarkModeToggle/DarkModeIconToggle.vue.js +0 -31
- package/dist/components/DarkModeToggle/DarkModeIconToggle.vue2.js +0 -4
- package/dist/components/DarkModeToggle/index.d.ts +0 -2
- package/dist/components/DarkModeToggle/index.d.ts.map +0 -1
- package/dist/components/DarkModeToggle/index.js +0 -4
- package/dist/components/ScreenReader.vue.js +0 -7
- package/dist/components/ScreenReader.vue2.js +0 -18
- package/dist/libs/event-busses/cancel-request-bus.d.ts +0 -2
- package/dist/libs/event-busses/cancel-request-bus.d.ts.map +0 -1
- package/dist/libs/event-busses/cancel-request-bus.js +0 -5
- package/dist/libs/event-busses/command-palette-bus.d.ts +0 -14
- package/dist/libs/event-busses/command-palette-bus.d.ts.map +0 -1
- package/dist/libs/event-busses/command-palette-bus.js +0 -5
- package/dist/libs/event-busses/execute-request-bus.d.ts +0 -2
- package/dist/libs/event-busses/execute-request-bus.d.ts.map +0 -1
- package/dist/libs/event-busses/execute-request-bus.js +0 -5
- package/dist/libs/event-busses/hot-keys-bus.d.ts.map +0 -1
- package/dist/libs/event-busses/hot-keys-bus.js +0 -47
- package/dist/libs/event-busses/index.d.ts +0 -6
- package/dist/libs/event-busses/index.d.ts.map +0 -1
- package/dist/libs/event-busses/index.js +0 -15
- package/dist/libs/event-busses/request-status-bus.d.ts +0 -5
- package/dist/libs/event-busses/request-status-bus.d.ts.map +0 -1
- package/dist/libs/event-busses/request-status-bus.js +0 -5
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as T, useAttrs as A, ref as
|
|
2
|
-
import { useCodeMirror as
|
|
3
|
-
import { nanoid as
|
|
1
|
+
import { defineComponent as T, useAttrs as A, ref as u, toRef as t, watch as U, computed as C, openBlock as a, createElementBlock as s, Fragment as W, createBlock as p, mergeProps as j, unref as i, renderSlot as _, createCommentVNode as m } from "vue";
|
|
2
|
+
import { useCodeMirror as L, useDropdown as Q, colorPicker as z } from "@scalar/use-codemirror";
|
|
3
|
+
import { nanoid as G } from "nanoid";
|
|
4
4
|
import x from "../DataTable/DataTableInputSelect.vue.js";
|
|
5
|
-
import { pillPlugin as
|
|
6
|
-
import
|
|
5
|
+
import { pillPlugin as H, backspaceCommand as J } from "./codeVariableWidget.js";
|
|
6
|
+
import K from "../../views/Environment/EnvironmentVariableDropdown.vue.js";
|
|
7
7
|
import { useWorkspace as X } from "../../store/store.js";
|
|
8
8
|
const Y = ["id"], Z = {
|
|
9
9
|
key: 3,
|
|
@@ -34,32 +34,40 @@ const Y = ["id"], Z = {
|
|
|
34
34
|
enum: {},
|
|
35
35
|
type: {},
|
|
36
36
|
nullable: { type: Boolean, default: !1 },
|
|
37
|
-
withVariables: { type: Boolean, default: !0 }
|
|
37
|
+
withVariables: { type: Boolean, default: !0 },
|
|
38
|
+
importCurl: { type: Boolean }
|
|
38
39
|
},
|
|
39
|
-
emits: ["submit", "update:modelValue"],
|
|
40
|
-
setup(
|
|
40
|
+
emits: ["submit", "update:modelValue", "curl"],
|
|
41
|
+
setup(S, { expose: F, emit: P }) {
|
|
41
42
|
var B;
|
|
42
|
-
const e =
|
|
43
|
+
const e = S, r = P, f = A(), q = f.id || `id-${G()}`, b = u(!1), h = u(!1), y = u(""), v = u({ left: 0, top: 0 }), { activeEnvVariables: g, isReadOnly: V, environments: E, router: $ } = X();
|
|
43
44
|
function O(o) {
|
|
44
|
-
|
|
45
|
+
var n;
|
|
46
|
+
return o === e.modelValue ? null : e.importCurl && o.trim().toLowerCase().startsWith("curl") ? (r("curl", o), (n = l.value) == null || n.dispatch({
|
|
47
|
+
changes: {
|
|
48
|
+
from: 0,
|
|
49
|
+
to: l.value.state.doc.length,
|
|
50
|
+
insert: String(e.modelValue)
|
|
51
|
+
}
|
|
52
|
+
}), null) : e.handleFieldChange ? e.handleFieldChange(o) : r("update:modelValue", o);
|
|
45
53
|
}
|
|
46
54
|
function R(o) {
|
|
47
|
-
return e.handleFieldSubmit ? e.handleFieldSubmit(o) :
|
|
55
|
+
return e.handleFieldSubmit ? e.handleFieldSubmit(o) : r("submit", o);
|
|
48
56
|
}
|
|
49
57
|
function D(o) {
|
|
50
58
|
b.value = !1, e.emitOnBlur && e.modelValue && R(o);
|
|
51
59
|
}
|
|
52
60
|
const d = [];
|
|
53
|
-
e.colorPicker && d.push(
|
|
54
|
-
|
|
61
|
+
e.colorPicker && d.push(z), d.push(
|
|
62
|
+
H({
|
|
55
63
|
environments: E,
|
|
56
64
|
activeEnvVariables: g,
|
|
57
65
|
isReadOnly: V
|
|
58
66
|
}),
|
|
59
|
-
|
|
67
|
+
J
|
|
60
68
|
);
|
|
61
|
-
const w =
|
|
62
|
-
content:
|
|
69
|
+
const w = u(null), { codeMirror: l } = L({
|
|
70
|
+
content: t(
|
|
63
71
|
() => e.modelValue !== void 0 ? String(e.modelValue) : ""
|
|
64
72
|
),
|
|
65
73
|
onChange: (o) => {
|
|
@@ -68,48 +76,48 @@ const Y = ["id"], Z = {
|
|
|
68
76
|
onFocus: () => b.value = !0,
|
|
69
77
|
onBlur: (o) => D(o),
|
|
70
78
|
codeMirrorRef: w,
|
|
71
|
-
disableTabIndent:
|
|
72
|
-
disableEnter:
|
|
73
|
-
disableCloseBrackets:
|
|
74
|
-
lineNumbers:
|
|
75
|
-
language:
|
|
76
|
-
lint:
|
|
79
|
+
disableTabIndent: t(() => e.disableTabIndent),
|
|
80
|
+
disableEnter: t(() => e.disableEnter),
|
|
81
|
+
disableCloseBrackets: t(() => e.disableCloseBrackets),
|
|
82
|
+
lineNumbers: t(() => e.lineNumbers),
|
|
83
|
+
language: t(() => e.language),
|
|
84
|
+
lint: t(() => e.lint),
|
|
77
85
|
extensions: d,
|
|
78
|
-
placeholder:
|
|
86
|
+
placeholder: t(() => e.placeholder)
|
|
79
87
|
});
|
|
80
|
-
(B =
|
|
81
|
-
|
|
88
|
+
(B = l.value) == null || B.focus(), U(l, () => {
|
|
89
|
+
l.value && Object.prototype.hasOwnProperty.call(f, "autofocus") && l.value.focus();
|
|
82
90
|
});
|
|
83
|
-
const { handleDropdownSelect: I, updateDropdownVisibility: M } =
|
|
84
|
-
codeMirror:
|
|
85
|
-
query:
|
|
86
|
-
showDropdown:
|
|
91
|
+
const { handleDropdownSelect: I, updateDropdownVisibility: M } = Q({
|
|
92
|
+
codeMirror: l,
|
|
93
|
+
query: y,
|
|
94
|
+
showDropdown: h,
|
|
87
95
|
dropdownPosition: v
|
|
88
|
-
}), N =
|
|
96
|
+
}), N = C(() => {
|
|
89
97
|
var o;
|
|
90
98
|
return e.type === "boolean" || (o = e.type) != null && o.includes("boolean") || e.nullable ? ["true", "false", "null"] : ["true", "false"];
|
|
91
99
|
});
|
|
92
|
-
return
|
|
100
|
+
return F({
|
|
93
101
|
focus: () => {
|
|
94
102
|
var o;
|
|
95
|
-
(o =
|
|
103
|
+
(o = l.value) == null || o.focus();
|
|
96
104
|
}
|
|
97
|
-
}), (o,
|
|
105
|
+
}), (o, n) => {
|
|
98
106
|
var k;
|
|
99
|
-
return
|
|
100
|
-
e.enum && e.enum.length ? (
|
|
107
|
+
return a(), s(W, null, [
|
|
108
|
+
e.enum && e.enum.length ? (a(), p(x, {
|
|
101
109
|
key: 0,
|
|
102
110
|
modelValue: e.modelValue,
|
|
103
111
|
value: e.enum,
|
|
104
|
-
"onUpdate:modelValue":
|
|
105
|
-
}, null, 8, ["modelValue", "value"])) : e.type === "boolean" || (k = e.type) != null && k.includes("boolean") ? (
|
|
112
|
+
"onUpdate:modelValue": n[0] || (n[0] = (c) => r("update:modelValue", c))
|
|
113
|
+
}, null, 8, ["modelValue", "value"])) : e.type === "boolean" || (k = e.type) != null && k.includes("boolean") ? (a(), p(x, {
|
|
106
114
|
key: 1,
|
|
107
115
|
modelValue: e.modelValue,
|
|
108
116
|
value: N.value,
|
|
109
|
-
"onUpdate:modelValue":
|
|
110
|
-
}, null, 8, ["modelValue", "value"])) : (
|
|
117
|
+
"onUpdate:modelValue": n[1] || (n[1] = (c) => r("update:modelValue", c))
|
|
118
|
+
}, null, 8, ["modelValue", "value"])) : (a(), s("div", j({
|
|
111
119
|
key: 2,
|
|
112
|
-
id:
|
|
120
|
+
id: i(q)
|
|
113
121
|
}, o.$attrs, {
|
|
114
122
|
ref_key: "codeMirrorRef",
|
|
115
123
|
ref: w,
|
|
@@ -117,18 +125,18 @@ const Y = ["id"], Z = {
|
|
|
117
125
|
"flow-code-input--error": o.error
|
|
118
126
|
}]
|
|
119
127
|
}), null, 16, Y)),
|
|
120
|
-
o.$slots.warning ? (
|
|
121
|
-
|
|
128
|
+
o.$slots.warning ? (a(), s("div", Z, [
|
|
129
|
+
_(o.$slots, "warning", {}, void 0, !0)
|
|
122
130
|
])) : m("", !0),
|
|
123
|
-
|
|
124
|
-
o.required ? (
|
|
125
|
-
|
|
131
|
+
_(o.$slots, "icon", {}, void 0, !0),
|
|
132
|
+
o.required ? (a(), s("div", ee, " Required ")) : m("", !0),
|
|
133
|
+
h.value && e.withVariables && !i(V) ? (a(), p(K, {
|
|
126
134
|
key: 5,
|
|
127
|
-
activeEnvVariables:
|
|
135
|
+
activeEnvVariables: C(() => i(g)),
|
|
128
136
|
dropdownPosition: v.value,
|
|
129
|
-
query:
|
|
130
|
-
router:
|
|
131
|
-
onSelect:
|
|
137
|
+
query: y.value,
|
|
138
|
+
router: i($),
|
|
139
|
+
onSelect: i(I)
|
|
132
140
|
}, null, 8, ["activeEnvVariables", "dropdownPosition", "query", "router", "onSelect"])) : m("", !0)
|
|
133
141
|
], 64);
|
|
134
142
|
};
|
|
@@ -2,8 +2,8 @@ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import
|
|
|
2
2
|
close: () => void;
|
|
3
3
|
back: (e: KeyboardEvent) => void;
|
|
4
4
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
5
|
-
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
6
5
|
onClose?: (() => any) | undefined;
|
|
6
|
+
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
7
7
|
}, {}, {}>;
|
|
8
8
|
export default _default;
|
|
9
9
|
//# sourceMappingURL=CommandPaletteCollection.vue.d.ts.map
|
|
@@ -12,8 +12,8 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
|
12
12
|
itemUid: string;
|
|
13
13
|
};
|
|
14
14
|
}>>> & {
|
|
15
|
-
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
16
15
|
onClose?: (() => any) | undefined;
|
|
16
|
+
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
17
17
|
}, {}, {}>;
|
|
18
18
|
export default _default;
|
|
19
19
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -2,8 +2,8 @@ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import
|
|
|
2
2
|
close: () => void;
|
|
3
3
|
back: (e: KeyboardEvent) => void;
|
|
4
4
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
5
|
-
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
6
5
|
onClose?: (() => any) | undefined;
|
|
6
|
+
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
7
7
|
}, {}, {}>;
|
|
8
8
|
export default _default;
|
|
9
9
|
//# sourceMappingURL=CommandPaletteImport.vue.d.ts.map
|
|
@@ -12,8 +12,8 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
|
12
12
|
parentUid: string;
|
|
13
13
|
};
|
|
14
14
|
}>>> & {
|
|
15
|
-
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
16
15
|
onClose?: (() => any) | undefined;
|
|
16
|
+
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
17
17
|
}, {}, {}>;
|
|
18
18
|
export default _default;
|
|
19
19
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -2,8 +2,8 @@ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import
|
|
|
2
2
|
close: () => void;
|
|
3
3
|
back: (e: KeyboardEvent) => void;
|
|
4
4
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
5
|
-
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
6
5
|
onClose?: (() => any) | undefined;
|
|
6
|
+
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
7
7
|
}, {}, {}>;
|
|
8
8
|
export default _default;
|
|
9
9
|
//# sourceMappingURL=CommandPaletteServer.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandPaletteServer.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteServer.vue"],"names":[],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"CommandPaletteServer.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteServer.vue"],"names":[],"mappings":";;;;;;;AA6XA,wBAMG"}
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarListbox as
|
|
3
|
-
import { useToasts as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { useWorkspace as
|
|
7
|
-
const
|
|
1
|
+
import { defineComponent as U, ref as v, computed as w, openBlock as s, createBlock as c, withCtx as a, createVNode as u, unref as n, createElementVNode as p, normalizeClass as h, toDisplayString as y, createTextVNode as D } from "vue";
|
|
2
|
+
import { ScalarListbox as N, ScalarButton as f, ScalarIcon as P } from "@scalar/components";
|
|
3
|
+
import { useToasts as B } from "@scalar/use-toasts";
|
|
4
|
+
import L from "./CommandActionForm.vue.js";
|
|
5
|
+
import M from "./CommandActionInput.vue.js";
|
|
6
|
+
import { useWorkspace as T } from "../../store/store.js";
|
|
7
|
+
const j = /* @__PURE__ */ p("span", { class: "text-c-1" }, "Create Collection", -1), q = /* @__PURE__ */ U({
|
|
8
8
|
__name: "CommandPaletteServer",
|
|
9
9
|
emits: ["close", "back"],
|
|
10
|
-
setup(
|
|
11
|
-
const
|
|
12
|
-
activeCollection:
|
|
13
|
-
activeWorkspaceCollections:
|
|
14
|
-
collectionMutators:
|
|
15
|
-
serverMutators:
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
setup(z, { emit: b }) {
|
|
11
|
+
const d = b, { toast: m } = B(), {
|
|
12
|
+
activeCollection: C,
|
|
13
|
+
activeWorkspaceCollections: x,
|
|
14
|
+
collectionMutators: S,
|
|
15
|
+
serverMutators: _,
|
|
16
|
+
events: k
|
|
17
|
+
} = T(), r = v(""), i = w(
|
|
18
|
+
() => x.value.flatMap(
|
|
18
19
|
(l) => {
|
|
19
20
|
var e, t;
|
|
20
21
|
return ((e = l.info) == null ? void 0 : e.title) === "Drafts" ? [] : {
|
|
@@ -23,65 +24,81 @@ const E = /* @__PURE__ */ S({
|
|
|
23
24
|
};
|
|
24
25
|
}
|
|
25
26
|
)
|
|
26
|
-
), o =
|
|
27
|
-
|
|
27
|
+
), o = v(
|
|
28
|
+
i.value.find(
|
|
28
29
|
(l) => {
|
|
29
30
|
var e;
|
|
30
|
-
return l.id === ((e =
|
|
31
|
+
return l.id === ((e = C.value) == null ? void 0 : e.uid);
|
|
31
32
|
}
|
|
32
33
|
)
|
|
33
|
-
),
|
|
34
|
+
), V = () => {
|
|
34
35
|
var t;
|
|
35
|
-
if (!
|
|
36
|
+
if (!r.value.trim()) {
|
|
36
37
|
m("Please enter a valid url before creating a server.", "error");
|
|
37
38
|
return;
|
|
38
39
|
}
|
|
39
40
|
const l = (t = o.value) == null ? void 0 : t.id;
|
|
40
|
-
if (!l)
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
if (!l) {
|
|
42
|
+
m("Please select a collection before creating a server.", "error");
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
const e = _.add({ url: r.value }, l);
|
|
46
|
+
S.edit(l, "selectedServerUid", e.uid), d("close");
|
|
47
|
+
}, g = () => {
|
|
48
|
+
k.commandPalette.emit({ commandName: "Create Collection" });
|
|
43
49
|
};
|
|
44
|
-
return (l, e) => (
|
|
45
|
-
disabled: !
|
|
46
|
-
onSubmit:
|
|
50
|
+
return (l, e) => (s(), c(L, {
|
|
51
|
+
disabled: !r.value.trim() || !o.value,
|
|
52
|
+
onSubmit: V
|
|
47
53
|
}, {
|
|
48
|
-
options:
|
|
49
|
-
|
|
54
|
+
options: a(() => [
|
|
55
|
+
u(n(N), {
|
|
50
56
|
modelValue: o.value,
|
|
51
57
|
"onUpdate:modelValue": e[2] || (e[2] = (t) => o.value = t),
|
|
52
|
-
options:
|
|
58
|
+
options: i.value
|
|
53
59
|
}, {
|
|
54
|
-
default:
|
|
55
|
-
i(s(
|
|
60
|
+
default: a(() => [
|
|
61
|
+
i.value.length > 0 ? (s(), c(n(f), {
|
|
62
|
+
key: 0,
|
|
56
63
|
class: "justify-between p-2 max-h-8 w-full gap-1 text-xs hover:bg-b-2",
|
|
57
64
|
variant: "outlined"
|
|
58
65
|
}, {
|
|
59
|
-
default:
|
|
60
|
-
|
|
61
|
-
class:
|
|
62
|
-
},
|
|
63
|
-
|
|
66
|
+
default: a(() => [
|
|
67
|
+
p("span", {
|
|
68
|
+
class: h(o.value ? "text-c-1" : "text-c-3")
|
|
69
|
+
}, y(o.value ? o.value.label : "Select Collection"), 3),
|
|
70
|
+
u(n(P), {
|
|
64
71
|
class: "text-c-3",
|
|
65
72
|
icon: "ChevronDown",
|
|
66
73
|
size: "xs"
|
|
67
74
|
})
|
|
68
75
|
]),
|
|
69
76
|
_: 1
|
|
70
|
-
})
|
|
77
|
+
})) : (s(), c(n(f), {
|
|
78
|
+
key: 1,
|
|
79
|
+
class: "justify-between p-2 max-h-8 w-full gap-1 text-xs hover:bg-b-2",
|
|
80
|
+
variant: "outlined",
|
|
81
|
+
onClick: g
|
|
82
|
+
}, {
|
|
83
|
+
default: a(() => [
|
|
84
|
+
j
|
|
85
|
+
]),
|
|
86
|
+
_: 1
|
|
87
|
+
}))
|
|
71
88
|
]),
|
|
72
89
|
_: 1
|
|
73
90
|
}, 8, ["modelValue", "options"])
|
|
74
91
|
]),
|
|
75
|
-
submit:
|
|
76
|
-
|
|
92
|
+
submit: a(() => [
|
|
93
|
+
D("Create Server")
|
|
77
94
|
]),
|
|
78
|
-
default:
|
|
79
|
-
|
|
80
|
-
modelValue:
|
|
81
|
-
"onUpdate:modelValue": e[0] || (e[0] = (t) =>
|
|
95
|
+
default: a(() => [
|
|
96
|
+
u(M, {
|
|
97
|
+
modelValue: r.value,
|
|
98
|
+
"onUpdate:modelValue": e[0] || (e[0] = (t) => r.value = t),
|
|
82
99
|
label: "Server URL",
|
|
83
100
|
placeholder: "Server URL",
|
|
84
|
-
onOnDelete: e[1] || (e[1] = (t) =>
|
|
101
|
+
onOnDelete: e[1] || (e[1] = (t) => d("back", t))
|
|
85
102
|
}, null, 8, ["modelValue"])
|
|
86
103
|
]),
|
|
87
104
|
_: 1
|
|
@@ -89,5 +106,5 @@ const E = /* @__PURE__ */ S({
|
|
|
89
106
|
}
|
|
90
107
|
});
|
|
91
108
|
export {
|
|
92
|
-
|
|
109
|
+
q as default
|
|
93
110
|
};
|
|
@@ -2,8 +2,8 @@ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import
|
|
|
2
2
|
close: () => void;
|
|
3
3
|
back: (e: KeyboardEvent) => void;
|
|
4
4
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
5
|
-
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
6
5
|
onClose?: (() => any) | undefined;
|
|
6
|
+
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
7
7
|
}, {}, {}>;
|
|
8
8
|
export default _default;
|
|
9
9
|
//# sourceMappingURL=CommandPaletteTag.vue.d.ts.map
|
|
@@ -2,8 +2,8 @@ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import
|
|
|
2
2
|
close: () => void;
|
|
3
3
|
back: (e: KeyboardEvent) => void;
|
|
4
4
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
5
|
-
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
6
5
|
onClose?: (() => any) | undefined;
|
|
6
|
+
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
7
7
|
}, {}, {}>;
|
|
8
8
|
export default _default;
|
|
9
9
|
//# sourceMappingURL=CommandPaletteWorkspace.vue.d.ts.map
|
|
@@ -10,8 +10,8 @@ export declare const PaletteComponents: {
|
|
|
10
10
|
close: () => void;
|
|
11
11
|
back: (e: KeyboardEvent) => void;
|
|
12
12
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
13
|
-
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
14
13
|
onClose?: (() => any) | undefined;
|
|
14
|
+
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
15
15
|
}, {}, {}>;
|
|
16
16
|
readonly 'Create Request': import("vue").DefineComponent<{
|
|
17
17
|
metaData: {
|
|
@@ -31,36 +31,36 @@ export declare const PaletteComponents: {
|
|
|
31
31
|
}>;
|
|
32
32
|
};
|
|
33
33
|
}>> & {
|
|
34
|
-
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
35
34
|
onClose?: (() => any) | undefined;
|
|
35
|
+
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
36
36
|
}, {}, {}>;
|
|
37
37
|
readonly 'Create Workspace': import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
38
38
|
close: () => void;
|
|
39
39
|
back: (e: KeyboardEvent) => void;
|
|
40
40
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
41
|
-
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
42
41
|
onClose?: (() => any) | undefined;
|
|
42
|
+
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
43
43
|
}, {}, {}>;
|
|
44
44
|
readonly 'Add Tag': import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
45
45
|
close: () => void;
|
|
46
46
|
back: (e: KeyboardEvent) => void;
|
|
47
47
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
48
|
-
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
49
48
|
onClose?: (() => any) | undefined;
|
|
49
|
+
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
50
50
|
}, {}, {}>;
|
|
51
51
|
readonly 'Add Server': import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
52
52
|
close: () => void;
|
|
53
53
|
back: (e: KeyboardEvent) => void;
|
|
54
54
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
55
|
-
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
56
55
|
onClose?: (() => any) | undefined;
|
|
56
|
+
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
57
57
|
}, {}, {}>;
|
|
58
58
|
readonly 'Create Collection': import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
59
59
|
close: () => void;
|
|
60
60
|
back: (e: KeyboardEvent) => void;
|
|
61
61
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
62
|
-
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
63
62
|
onClose?: (() => any) | undefined;
|
|
63
|
+
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
64
64
|
}, {}, {}>;
|
|
65
65
|
readonly 'Add Example': import("vue").DefineComponent<{
|
|
66
66
|
metaData: {
|
|
@@ -78,10 +78,16 @@ export declare const PaletteComponents: {
|
|
|
78
78
|
}>;
|
|
79
79
|
};
|
|
80
80
|
}>> & {
|
|
81
|
-
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
82
81
|
onClose?: (() => any) | undefined;
|
|
82
|
+
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
83
83
|
}, {}, {}>;
|
|
84
84
|
};
|
|
85
85
|
/** Infer the types from the commands */
|
|
86
86
|
export type CommandNames = keyof typeof PaletteComponents;
|
|
87
|
+
export type CommandPaletteEvent = {
|
|
88
|
+
/** The command name which matches with the command palette */
|
|
89
|
+
commandName?: CommandNames;
|
|
90
|
+
/** Any extra metadata we want to pass to the command palettes */
|
|
91
|
+
metaData?: Record<string, any>;
|
|
92
|
+
};
|
|
87
93
|
//# sourceMappingURL=TheCommandPalette.vue.d.ts.map
|
|
@@ -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":"AA8XA;;;;GAIG;;AACH,wBAybI;AAEJ,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQpB,CAAA;AAEV,yCAAyC;AACzC,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,iBAAiB,CAAA;AAEzD,MAAM,MAAM,mBAAmB,GAAG;IAChC,8DAA8D;IAC9D,WAAW,CAAC,EAAE,YAAY,CAAA;IAC1B,iEAAiE;IACjE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAC/B,CACA"}
|
|
@@ -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-60105bc4"]]);
|
|
6
6
|
export {
|
|
7
7
|
s as PaletteComponents,
|
|
8
8
|
a as default
|