@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,33 +1,31 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useModal as
|
|
3
|
-
import { useRouter as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
import { hotKeyBus as W } from "../../libs/event-busses/hot-keys-bus.js";
|
|
14
|
-
const ue = { class: "commandmenu custom-scroll" }, de = { class: "bg-b-2 flex items-center rounded-md mb-2.5 pl-2 focus-within:bg-b-1 focus-within:shadow-border" }, fe = { for: "commandmenu" }, pe = ["onKeydown"], ve = ["onClick"], Ce = {
|
|
1
|
+
import { defineComponent as q, ref as u, computed as K, watch as F, onMounted as U, onBeforeUnmount as G, openBlock as a, createElementBlock as r, Fragment as d, withDirectives as k, createElementVNode as m, vShow as y, unref as f, createVNode as g, withKeys as $, withModifiers as S, vModelText as Q, renderList as B, toDisplayString as M, normalizeClass as j, createTextVNode as J, createCommentVNode as O, createBlock as X, resolveDynamicComponent as Y, mergeProps as Z, nextTick as T } from "vue";
|
|
2
|
+
import { useModal as ee, ScalarIcon as A } from "@scalar/components";
|
|
3
|
+
import { useRouter as oe } from "vue-router";
|
|
4
|
+
import te from "./CommandPaletteCollection.vue.js";
|
|
5
|
+
import ne from "./CommandPaletteExample.vue.js";
|
|
6
|
+
import ae from "./CommandPaletteImport.vue.js";
|
|
7
|
+
import le from "./CommandPaletteRequest.vue.js";
|
|
8
|
+
import se from "./CommandPaletteServer.vue.js";
|
|
9
|
+
import re from "./CommandPaletteTag.vue.js";
|
|
10
|
+
import me from "./CommandPaletteWorkspace.vue.js";
|
|
11
|
+
import { useWorkspace as ce } from "../../store/store.js";
|
|
12
|
+
const ie = { class: "commandmenu z-overlay custom-scroll" }, ue = { class: "bg-b-2 flex items-center rounded-md mb-2.5 pl-2 focus-within:bg-b-1 focus-within:shadow-border" }, de = { for: "commandmenu" }, fe = ["onKeydown"], pe = ["onClick"], ve = {
|
|
15
13
|
key: 0,
|
|
16
14
|
class: "text-c-3 text-center text-sm p-2 pt-3"
|
|
17
|
-
},
|
|
15
|
+
}, Ce = {
|
|
18
16
|
name: "TheCommandPalette"
|
|
19
|
-
},
|
|
20
|
-
"Import Collection":
|
|
21
|
-
"Create Request":
|
|
22
|
-
"Create Workspace":
|
|
23
|
-
"Add Tag":
|
|
24
|
-
"Add Server":
|
|
25
|
-
"Create Collection":
|
|
26
|
-
"Add Example":
|
|
27
|
-
},
|
|
28
|
-
...
|
|
29
|
-
setup(
|
|
30
|
-
const
|
|
17
|
+
}, he = {
|
|
18
|
+
"Import Collection": ae,
|
|
19
|
+
"Create Request": le,
|
|
20
|
+
"Create Workspace": me,
|
|
21
|
+
"Add Tag": re,
|
|
22
|
+
"Add Server": se,
|
|
23
|
+
"Create Collection": te,
|
|
24
|
+
"Add Example": ne
|
|
25
|
+
}, Re = /* @__PURE__ */ q({
|
|
26
|
+
...Ce,
|
|
27
|
+
setup(ke) {
|
|
28
|
+
const D = [
|
|
31
29
|
{
|
|
32
30
|
label: "",
|
|
33
31
|
commands: [
|
|
@@ -76,92 +74,92 @@ const ue = { class: "commandmenu custom-scroll" }, de = { class: "bg-b-2 flex it
|
|
|
76
74
|
}
|
|
77
75
|
]
|
|
78
76
|
}
|
|
79
|
-
], c =
|
|
80
|
-
() =>
|
|
77
|
+
], c = ee(), { push: V } = oe(), { activeWorkspace: W, events: p } = ce(), b = u(), l = u(""), s = u(null), i = u(-1), L = u([]), v = K(
|
|
78
|
+
() => D.reduce((e, o) => {
|
|
81
79
|
const t = o.commands.filter(
|
|
82
80
|
(n) => n.name.toLowerCase().includes(l.value.toLowerCase())
|
|
83
81
|
);
|
|
84
82
|
return [...e, ...t];
|
|
85
83
|
}, [])
|
|
86
|
-
),
|
|
84
|
+
), C = () => {
|
|
87
85
|
c.hide(), l.value = "", s.value = null, i.value = -1;
|
|
88
|
-
},
|
|
86
|
+
}, N = (e) => {
|
|
89
87
|
l.value !== "" && (e == null || e.preventDefault()), s.value = null, T(() => {
|
|
90
88
|
var o;
|
|
91
|
-
return (o =
|
|
89
|
+
return (o = x.value) == null ? void 0 : o.focus();
|
|
92
90
|
});
|
|
93
|
-
},
|
|
94
|
-
"path" in e ? (
|
|
95
|
-
},
|
|
91
|
+
}, R = (e) => {
|
|
92
|
+
"path" in e ? (V(`/workspace/${W.value.uid}${e.path}`), C()) : s.value = e.name;
|
|
93
|
+
}, x = u(), P = ({
|
|
96
94
|
commandName: e,
|
|
97
95
|
metaData: o
|
|
98
96
|
} = {}) => {
|
|
99
|
-
s.value = e ?? null,
|
|
97
|
+
s.value = e ?? null, b.value = o, c.show(), T(() => {
|
|
100
98
|
var t;
|
|
101
|
-
return (t =
|
|
99
|
+
return (t = x.value) == null ? void 0 : t.focus();
|
|
102
100
|
});
|
|
103
101
|
};
|
|
104
|
-
|
|
105
|
-
e &&
|
|
102
|
+
F(l, (e) => {
|
|
103
|
+
e && v.value.length > 0 && (i.value = 0);
|
|
106
104
|
});
|
|
107
|
-
const
|
|
108
|
-
var
|
|
105
|
+
const z = (e, o) => {
|
|
106
|
+
var h;
|
|
109
107
|
if (!c.open) return;
|
|
110
108
|
o.preventDefault();
|
|
111
|
-
const t = e === "up" ? -1 : 1, n =
|
|
112
|
-
i.value = (i.value + t + n) % n, (
|
|
109
|
+
const t = e === "up" ? -1 : 1, n = v.value.length;
|
|
110
|
+
i.value = (i.value + t + n) % n, (h = L.value[i.value]) == null || h.scrollIntoView({
|
|
113
111
|
behavior: "smooth",
|
|
114
112
|
block: "nearest"
|
|
115
113
|
});
|
|
116
|
-
},
|
|
117
|
-
() =>
|
|
118
|
-
),
|
|
119
|
-
!
|
|
114
|
+
}, _ = K(
|
|
115
|
+
() => v.value[i.value]
|
|
116
|
+
), H = (e) => {
|
|
117
|
+
!_.value || s.value || (e.preventDefault(), e.stopPropagation(), R(_.value));
|
|
120
118
|
}, E = (e) => {
|
|
121
|
-
c.open && e.closeModal &&
|
|
119
|
+
c.open && e != null && e.closeModal && C();
|
|
122
120
|
};
|
|
123
|
-
return
|
|
124
|
-
|
|
125
|
-
}),
|
|
126
|
-
|
|
121
|
+
return U(() => {
|
|
122
|
+
p.commandPalette.on(P), p.hotKeys.on(E);
|
|
123
|
+
}), G(() => {
|
|
124
|
+
p.commandPalette.off(P), p.hotKeys.off(E);
|
|
127
125
|
}), (e, o) => (a(), r(d, null, [
|
|
128
|
-
|
|
129
|
-
class: "commandmenu-clickout",
|
|
130
|
-
onClick: o[0] || (o[0] = (t) =>
|
|
126
|
+
k(m("div", {
|
|
127
|
+
class: "commandmenu-clickout z-overlay",
|
|
128
|
+
onClick: o[0] || (o[0] = (t) => C())
|
|
131
129
|
}, null, 512), [
|
|
132
|
-
[
|
|
130
|
+
[y, f(c).open]
|
|
133
131
|
]),
|
|
134
|
-
|
|
132
|
+
k(m("div", ie, [
|
|
135
133
|
s.value ? (a(), r(d, { key: 1 }, [
|
|
136
134
|
m("button", {
|
|
137
|
-
class: "absolute p-0.75 hover:bg-b-3 rounded text-c-3 active:text-c-1 mr-1.5 my-1.
|
|
135
|
+
class: "absolute p-0.75 hover:bg-b-3 rounded text-c-3 active:text-c-1 mr-1.5 my-1.25 z-1",
|
|
138
136
|
type: "button",
|
|
139
137
|
onClick: o[4] || (o[4] = (t) => s.value = null)
|
|
140
138
|
}, [
|
|
141
|
-
|
|
139
|
+
g(f(A), {
|
|
142
140
|
icon: "ChevronLeft",
|
|
143
141
|
size: "md",
|
|
144
142
|
thickness: "1.5"
|
|
145
143
|
})
|
|
146
144
|
]),
|
|
147
|
-
(a(), Y(
|
|
148
|
-
onBack: o[5] || (o[5] = (t) =>
|
|
149
|
-
onClose:
|
|
145
|
+
(a(), X(Y(he[s.value]), Z(b.value ? { metaData: b.value } : {}, {
|
|
146
|
+
onBack: o[5] || (o[5] = (t) => N(t)),
|
|
147
|
+
onClose: C
|
|
150
148
|
}), null, 16))
|
|
151
149
|
], 64)) : (a(), r(d, { key: 0 }, [
|
|
152
|
-
m("div",
|
|
153
|
-
m("label",
|
|
154
|
-
|
|
150
|
+
m("div", ue, [
|
|
151
|
+
m("label", de, [
|
|
152
|
+
g(f(A), {
|
|
155
153
|
class: "text-c-2 mr-2.5",
|
|
156
154
|
icon: "Search",
|
|
157
155
|
size: "md",
|
|
158
156
|
thickness: "1.5"
|
|
159
157
|
})
|
|
160
158
|
]),
|
|
161
|
-
|
|
159
|
+
k(m("input", {
|
|
162
160
|
id: "commandmenu",
|
|
163
161
|
ref_key: "commandInputRef",
|
|
164
|
-
ref:
|
|
162
|
+
ref: x,
|
|
165
163
|
"onUpdate:modelValue": o[1] || (o[1] = (t) => l.value = t),
|
|
166
164
|
autocomplete: "off",
|
|
167
165
|
autofocus: "",
|
|
@@ -169,59 +167,59 @@ const ue = { class: "commandmenu custom-scroll" }, de = { class: "bg-b-2 flex it
|
|
|
169
167
|
placeholder: "Search commands...",
|
|
170
168
|
type: "text",
|
|
171
169
|
onKeydown: [
|
|
172
|
-
o[2] || (o[2] =
|
|
173
|
-
|
|
174
|
-
o[3] || (o[3] =
|
|
170
|
+
o[2] || (o[2] = $(S((t) => z("down", t), ["stop"]), ["down"])),
|
|
171
|
+
$(S(H, ["stop"]), ["enter"]),
|
|
172
|
+
o[3] || (o[3] = $(S((t) => z("up", t), ["stop"]), ["up"]))
|
|
175
173
|
]
|
|
176
|
-
}, null, 40,
|
|
177
|
-
[
|
|
174
|
+
}, null, 40, fe), [
|
|
175
|
+
[Q, l.value]
|
|
178
176
|
])
|
|
179
177
|
]),
|
|
180
|
-
(a(), r(d, null,
|
|
178
|
+
(a(), r(d, null, B(D, (t) => (a(), r(d, {
|
|
181
179
|
key: t.label
|
|
182
180
|
}, [
|
|
183
|
-
|
|
181
|
+
k(m("div", { class: "text-c-3 font-medium text-xs px-2 mb-1 mt-2" }, M(t.label), 513), [
|
|
184
182
|
[
|
|
185
|
-
|
|
183
|
+
y,
|
|
186
184
|
t.commands.filter(
|
|
187
185
|
(n) => n.name.toLowerCase().includes(l.value.toLowerCase())
|
|
188
186
|
).length > 0
|
|
189
187
|
]
|
|
190
188
|
]),
|
|
191
|
-
(a(!0), r(d, null,
|
|
189
|
+
(a(!0), r(d, null, B(t.commands.filter(
|
|
192
190
|
(n) => n.name.toLowerCase().includes(l.value.toLowerCase())
|
|
193
|
-
), (n,
|
|
191
|
+
), (n, h) => {
|
|
194
192
|
var I;
|
|
195
193
|
return a(), r("div", {
|
|
196
194
|
key: n.name,
|
|
197
195
|
ref_for: !0,
|
|
198
|
-
ref: (
|
|
199
|
-
|
|
196
|
+
ref: (w) => {
|
|
197
|
+
w && (L.value[h] = w);
|
|
200
198
|
},
|
|
201
|
-
class:
|
|
202
|
-
"bg-b-2": n.name === ((I =
|
|
199
|
+
class: j(["commandmenu-item text-sm flex items-center py-1.5 px-2 rounded hover:bg-b-2 cursor-pointer", {
|
|
200
|
+
"bg-b-2": n.name === ((I = _.value) == null ? void 0 : I.name)
|
|
203
201
|
}]),
|
|
204
|
-
onClick: (
|
|
202
|
+
onClick: (w) => R(n)
|
|
205
203
|
}, [
|
|
206
|
-
|
|
204
|
+
g(f(A), {
|
|
207
205
|
class: "text-c-2 mr-2.5",
|
|
208
206
|
icon: n.icon,
|
|
209
207
|
size: "md",
|
|
210
208
|
thickness: "1.5"
|
|
211
209
|
}, null, 8, ["icon"]),
|
|
212
|
-
|
|
213
|
-
], 10,
|
|
210
|
+
J(" " + M(n.name), 1)
|
|
211
|
+
], 10, pe);
|
|
214
212
|
}), 128))
|
|
215
213
|
], 64))), 64)),
|
|
216
|
-
|
|
214
|
+
v.value.length ? O("", !0) : (a(), r("div", ve, " No commands found "))
|
|
217
215
|
], 64))
|
|
218
216
|
], 512), [
|
|
219
|
-
[
|
|
217
|
+
[y, f(c).open]
|
|
220
218
|
])
|
|
221
219
|
], 64));
|
|
222
220
|
}
|
|
223
221
|
});
|
|
224
222
|
export {
|
|
225
|
-
|
|
226
|
-
|
|
223
|
+
he as PaletteComponents,
|
|
224
|
+
Re as default
|
|
227
225
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextBar.vue.d.ts","sourceRoot":"","sources":["../../src/components/ContextBar.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ContextBar.vue.d.ts","sourceRoot":"","sources":["../../src/components/ContextBar.vue"],"names":[],"mappings":";cA0HY,MAAM,EAAE;mBACH,MAAM;;;;cADX,MAAM,EAAE;mBACH,MAAM;;;;AAqIvB,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-10366d6c"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1,15 +1,31 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
1
|
+
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<{
|
|
2
2
|
modelValue: boolean;
|
|
3
3
|
disabled?: boolean;
|
|
4
|
+
align?: "left" | "center";
|
|
5
|
+
}>, {
|
|
6
|
+
align: string;
|
|
4
7
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
5
8
|
"update:modelValue": (v: boolean) => void;
|
|
6
|
-
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
9
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
|
|
7
10
|
modelValue: boolean;
|
|
8
11
|
disabled?: boolean;
|
|
12
|
+
align?: "left" | "center";
|
|
13
|
+
}>, {
|
|
14
|
+
align: string;
|
|
9
15
|
}>>> & {
|
|
10
16
|
"onUpdate:modelValue"?: ((v: boolean) => any) | undefined;
|
|
11
|
-
}, {
|
|
17
|
+
}, {
|
|
18
|
+
align: "left" | "center";
|
|
19
|
+
}, {}>;
|
|
12
20
|
export default _default;
|
|
21
|
+
type __VLS_WithDefaults<P, D> = {
|
|
22
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
23
|
+
default: D[K];
|
|
24
|
+
}> : P[K];
|
|
25
|
+
};
|
|
26
|
+
type __VLS_Prettify<T> = {
|
|
27
|
+
[K in keyof T]: T[K];
|
|
28
|
+
} & {};
|
|
13
29
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
14
30
|
type __VLS_TypePropsToOption<T> = {
|
|
15
31
|
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTableCheckbox.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTableCheckbox.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"DataTableCheckbox.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTableCheckbox.vue"],"names":[],"mappings":";gBA0DgB,OAAO;eACR,OAAO;YACV,MAAM,GAAG,QAAQ;;;;;;gBAFb,OAAO;eACR,OAAO;YACV,MAAM,GAAG,QAAQ;;;;;;WAAjB,MAAM,GAAG,QAAQ;;AAoG7B,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,36 +1,49 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarIcon as
|
|
3
|
-
import
|
|
4
|
-
|
|
1
|
+
import { defineComponent as n, openBlock as s, createBlock as c, withCtx as i, createElementVNode as t, normalizeClass as d, unref as r, createVNode as f } from "vue";
|
|
2
|
+
import { ScalarIcon as p } from "@scalar/components";
|
|
3
|
+
import { cva as b } from "cva";
|
|
4
|
+
import m from "./DataTableCell.vue.js";
|
|
5
|
+
const u = ["checked", "disabled"], v = /* @__PURE__ */ n({
|
|
5
6
|
__name: "DataTableCheckbox",
|
|
6
7
|
props: {
|
|
7
8
|
modelValue: { type: Boolean },
|
|
8
|
-
disabled: { type: Boolean }
|
|
9
|
+
disabled: { type: Boolean },
|
|
10
|
+
align: { default: "center" }
|
|
9
11
|
},
|
|
10
12
|
emits: ["update:modelValue"],
|
|
11
|
-
setup(
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
setup(h) {
|
|
14
|
+
const a = b({
|
|
15
|
+
base: "w-8 h-8 flex items-center justify-center text-border peer-checked:text-c-2 pointer-events-none absolute before:absolute before:opacity-0 group-hover/cell:before:opacity-100 before:border before:rounded before:w-9/12 before:aspect-square before:top-1/2 before:left-1/2 before:transform before:-translate-x-1/2 before:-translate-y-1/2 before:border-[1px]",
|
|
16
|
+
variants: {
|
|
17
|
+
align: {
|
|
18
|
+
left: "left-0",
|
|
19
|
+
center: "centered"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
return (e, o) => (s(), c(m, { class: "group/cell relative flex min-w-8" }, {
|
|
24
|
+
default: i(() => [
|
|
14
25
|
t("input", {
|
|
15
26
|
checked: e.modelValue,
|
|
16
27
|
class: "peer absolute inset-0 opacity-0 cursor-pointer",
|
|
17
28
|
disabled: e.disabled,
|
|
18
29
|
tabindex: "-1",
|
|
19
30
|
type: "checkbox",
|
|
20
|
-
onChange: o[0] || (o[0] = (
|
|
21
|
-
}, null, 40,
|
|
22
|
-
t("div",
|
|
23
|
-
|
|
31
|
+
onChange: o[0] || (o[0] = (l) => e.$emit("update:modelValue", l.target.checked))
|
|
32
|
+
}, null, 40, u),
|
|
33
|
+
t("div", {
|
|
34
|
+
class: d(r(a)({ align: e.align }))
|
|
35
|
+
}, [
|
|
36
|
+
f(r(p), {
|
|
24
37
|
icon: "Checkmark",
|
|
25
38
|
size: "xs",
|
|
26
39
|
thickness: "2.5"
|
|
27
40
|
})
|
|
28
|
-
])
|
|
41
|
+
], 2)
|
|
29
42
|
]),
|
|
30
43
|
_: 1
|
|
31
44
|
}));
|
|
32
45
|
}
|
|
33
46
|
});
|
|
34
47
|
export {
|
|
35
|
-
|
|
48
|
+
v as default
|
|
36
49
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EnvironmentSelector.vue.d.ts","sourceRoot":"","sources":["../../../src/components/EnvironmentSelector/EnvironmentSelector.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"EnvironmentSelector.vue.d.ts","sourceRoot":"","sources":["../../../src/components/EnvironmentSelector/EnvironmentSelector.vue"],"names":[],"mappings":";AAkdA,wBAKG"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { defineComponent as y, computed as S, openBlock as a, createElementBlock as f, createVNode as n, unref as e, withCtx as o, Fragment as N, renderList as D, createBlock as v, withModifiers as h, createElementVNode as r, normalizeClass as
|
|
1
|
+
import { defineComponent as y, computed as S, openBlock as a, createElementBlock as f, createVNode as n, unref as e, withCtx as o, Fragment as N, renderList as D, createBlock as v, withModifiers as h, createElementVNode as r, normalizeClass as w, createTextVNode as l, toDisplayString as x, createCommentVNode as j } from "vue";
|
|
2
2
|
import { ScalarDropdown as z, ScalarDropdownItem as d, ScalarIcon as c, ScalarDropdownDivider as B, ScalarButton as I } from "@scalar/components";
|
|
3
3
|
import { useRouter as V } from "vue-router";
|
|
4
4
|
import { useWorkspace as M } from "../../store/store.js";
|
|
5
|
-
const W = { class: "font-medium m-0 text-sm flex gap-1.5 items-center" }, $ = { class: "flex items-center justify-center h-4 w-4" }, O = /* @__PURE__ */ r("span", { class: "leading-none" }, "Manage Environments", -1), G = /* @__PURE__ */ y({
|
|
5
|
+
const W = { class: "font-medium m-0 text-sm flex gap-1.5 items-center whitespace-nowrap" }, $ = { class: "flex items-center justify-center h-4 w-4" }, O = /* @__PURE__ */ r("span", { class: "leading-none" }, "Manage Environments", -1), G = /* @__PURE__ */ y({
|
|
6
6
|
__name: "EnvironmentSelector",
|
|
7
7
|
setup(R) {
|
|
8
8
|
const {
|
|
9
9
|
environments: u,
|
|
10
10
|
activeWorkspace: s,
|
|
11
|
-
workspaceMutators:
|
|
11
|
+
workspaceMutators: k,
|
|
12
12
|
activeEnvironment: _,
|
|
13
13
|
isReadOnly: g
|
|
14
14
|
} = M(), b = V(), m = (i) => {
|
|
15
|
-
|
|
15
|
+
k.edit(s.value.uid, "activeEnvironmentId", i);
|
|
16
16
|
}, C = () => b.push(`/workspace/${s.value.uid}/environment`), E = S(() => [
|
|
17
17
|
// Always add the default environment
|
|
18
18
|
u.default,
|
|
@@ -28,7 +28,7 @@ const W = { class: "font-medium m-0 text-sm flex gap-1.5 items-center" }, $ = {
|
|
|
28
28
|
}, {
|
|
29
29
|
default: o(() => [
|
|
30
30
|
r("div", {
|
|
31
|
-
class:
|
|
31
|
+
class: w([
|
|
32
32
|
"flex items-center justify-center rounded-full p-[3px] w-4 h-4 group-hover/item:shadow-border",
|
|
33
33
|
e(s).activeEnvironmentId === t.uid ? "bg-blue text-b-1" : "text-transparent"
|
|
34
34
|
])
|
|
@@ -39,7 +39,7 @@ const W = { class: "font-medium m-0 text-sm flex gap-1.5 items-center" }, $ = {
|
|
|
39
39
|
thickness: "3.5"
|
|
40
40
|
})
|
|
41
41
|
], 2),
|
|
42
|
-
l(" " +
|
|
42
|
+
l(" " + x(t.name), 1)
|
|
43
43
|
]),
|
|
44
44
|
_: 2
|
|
45
45
|
}, 1032, ["onClick"]))), 128)),
|
|
@@ -49,7 +49,7 @@ const W = { class: "font-medium m-0 text-sm flex gap-1.5 items-center" }, $ = {
|
|
|
49
49
|
}, {
|
|
50
50
|
default: o(() => [
|
|
51
51
|
r("div", {
|
|
52
|
-
class:
|
|
52
|
+
class: w([
|
|
53
53
|
"flex items-center justify-center rounded-full p-[3px] w-4 h-4 group-hover/item:shadow-border",
|
|
54
54
|
e(s).activeEnvironmentId === "" ? "bg-blue text-b-1" : "text-transparent"
|
|
55
55
|
])
|
|
@@ -92,7 +92,7 @@ const W = { class: "font-medium m-0 text-sm flex gap-1.5 items-center" }, $ = {
|
|
|
92
92
|
var t;
|
|
93
93
|
return [
|
|
94
94
|
r("h2", W, [
|
|
95
|
-
l(
|
|
95
|
+
l(x(((t = e(_)) == null ? void 0 : t.name) ?? "No Environment") + " ", 1),
|
|
96
96
|
n(e(c), {
|
|
97
97
|
class: "size-3",
|
|
98
98
|
icon: "ChevronDown",
|
|
@@ -7,7 +7,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
7
7
|
isDisable: boolean;
|
|
8
8
|
isEditable: boolean;
|
|
9
9
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
10
|
-
change: (value: "
|
|
10
|
+
change: (value: "connect" | "delete" | "get" | "head" | "options" | "patch" | "post" | "put" | "trace") => void;
|
|
11
11
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
|
|
12
12
|
isSquare?: boolean;
|
|
13
13
|
method: string;
|
|
@@ -17,7 +17,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
17
17
|
isDisable: boolean;
|
|
18
18
|
isEditable: boolean;
|
|
19
19
|
}>>> & {
|
|
20
|
-
onChange?: ((value: "
|
|
20
|
+
onChange?: ((value: "connect" | "delete" | "get" | "head" | "options" | "patch" | "post" | "put" | "trace") => any) | undefined;
|
|
21
21
|
}, {
|
|
22
22
|
isSquare: boolean;
|
|
23
23
|
isEditable: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImportCollectionModal.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/ImportCollectionModal.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ImportCollectionModal.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/ImportCollectionModal.vue"],"names":[],"mappings":";YAqKU,MAAM,GAAG,IAAI;;;;YAAb,MAAM,GAAG,IAAI;;;;AAsQvB,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,72 +1,69 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useUrlPrefetcher as
|
|
1
|
+
import { defineComponent as C, computed as d, watch as S, openBlock as l, createBlock as I, unref as o, withCtx as z, createElementVNode as t, toDisplayString as f, createVNode as i, createElementBlock as a, Fragment as B, createCommentVNode as h } from "vue";
|
|
2
|
+
import { useUrlPrefetcher as D } from "./hooks/useUrlPrefetcher.js";
|
|
3
3
|
import { getOpenApiDocumentVersion as _ } from "./utils/getOpenApiDocumentVersion.js";
|
|
4
|
-
import { isDocument as
|
|
5
|
-
import { isUrl as
|
|
6
|
-
import { useModal as
|
|
7
|
-
import { normalize as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { useWorkspace as
|
|
11
|
-
import { hotKeyBus as O } from "../../libs/event-busses/hot-keys-bus.js";
|
|
4
|
+
import { isDocument as E } from "./utils/isDocument.js";
|
|
5
|
+
import { isUrl as F } from "./utils/isUrl.js";
|
|
6
|
+
import { useModal as U, ScalarModal as V, ScalarIcon as x, ScalarCodeBlock as A } from "@scalar/components";
|
|
7
|
+
import { normalize as M } from "@scalar/openapi-parser";
|
|
8
|
+
import N from "./ImportNowButton.vue.js";
|
|
9
|
+
import $ from "../../views/Request/components/WorkspaceDropdown.vue.js";
|
|
10
|
+
import { useWorkspace as O } from "../../store/store.js";
|
|
12
11
|
const P = { class: "flex gap-5 flex-col my-24" }, W = { class: "text-center text-xl font-medium" }, j = { class: "flex justify-center" }, K = { class: "inline-block bg-b-2 py-1 px-4 rounded" }, R = {
|
|
13
12
|
key: 0,
|
|
14
13
|
class: "flex gap-2 items-center p-3 font-code text-sm border rounded break-words"
|
|
15
14
|
}, T = { class: "break-all" }, q = { class: "flex gap-2 items-center p-3 font-code text-sm border rounded" }, G = /* @__PURE__ */ t("div", null, "This doesn’t look like a valid OpenAPI/Swagger document.", -1), H = { class: "bg-b-2 h-48 border rounded custom-scroll" }, J = {
|
|
16
15
|
key: 2,
|
|
17
16
|
class: "inline-flex flex-col gap-2 items-center mt-2"
|
|
18
|
-
},
|
|
17
|
+
}, ne = /* @__PURE__ */ C({
|
|
19
18
|
__name: "ImportCollectionModal",
|
|
20
19
|
props: {
|
|
21
20
|
source: {}
|
|
22
21
|
},
|
|
23
22
|
emits: ["importFinished"],
|
|
24
23
|
setup(v) {
|
|
25
|
-
const c = v, { activeWorkspace: k } =
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
});
|
|
29
|
-
const b = d(() => {
|
|
24
|
+
const c = v, { activeWorkspace: k, events: g } = O(), { prefetchResult: r, prefetchUrl: b } = D(), s = U();
|
|
25
|
+
g.hotKeys.on(() => s.hide());
|
|
26
|
+
const y = d(() => {
|
|
30
27
|
try {
|
|
31
|
-
return
|
|
28
|
+
return M(
|
|
32
29
|
r.content || c.source || ""
|
|
33
30
|
);
|
|
34
31
|
} catch {
|
|
35
32
|
return;
|
|
36
33
|
}
|
|
37
|
-
}),
|
|
34
|
+
}), w = d(() => {
|
|
38
35
|
var e, n;
|
|
39
|
-
return (n = (e =
|
|
40
|
-
}),
|
|
36
|
+
return (n = (e = y.value) == null ? void 0 : e.info) == null ? void 0 : n.title;
|
|
37
|
+
}), m = d(
|
|
41
38
|
() => _(r.content || c.source || "")
|
|
42
39
|
);
|
|
43
|
-
return
|
|
40
|
+
return S(
|
|
44
41
|
() => c.source,
|
|
45
42
|
(e) => {
|
|
46
|
-
|
|
43
|
+
b(e, k.value.proxyUrl), e && (F(e) || E(e) && _(e)) ? s.show() : s.hide();
|
|
47
44
|
}
|
|
48
|
-
), (e, n) => (l(),
|
|
45
|
+
), (e, n) => (l(), I(o(V), {
|
|
49
46
|
size: "md",
|
|
50
47
|
state: o(s)
|
|
51
48
|
}, {
|
|
52
|
-
default:
|
|
49
|
+
default: z(() => {
|
|
53
50
|
var p, u;
|
|
54
51
|
return [
|
|
55
52
|
t("div", P, [
|
|
56
|
-
t("div", W, f(
|
|
53
|
+
t("div", W, f(w.value ?? "Import Collection"), 1),
|
|
57
54
|
t("div", j, [
|
|
58
55
|
t("div", K, [
|
|
59
|
-
i(o(
|
|
56
|
+
i(o($))
|
|
60
57
|
])
|
|
61
58
|
]),
|
|
62
|
-
o(r).state !== "loading" && o(r).error ? (l(),
|
|
59
|
+
o(r).state !== "loading" && o(r).error ? (l(), a("div", R, [
|
|
63
60
|
i(o(x), {
|
|
64
61
|
class: "text-red flex-shrink-0",
|
|
65
62
|
icon: "Error",
|
|
66
63
|
size: "sm"
|
|
67
64
|
}),
|
|
68
65
|
t("div", T, f(o(r).error), 1)
|
|
69
|
-
])) :
|
|
66
|
+
])) : m.value ? h("", !0) : (l(), a(B, { key: 1 }, [
|
|
70
67
|
t("div", q, [
|
|
71
68
|
i(o(x), {
|
|
72
69
|
class: "text-red",
|
|
@@ -76,14 +73,14 @@ const P = { class: "flex gap-5 flex-col my-24" }, W = { class: "text-center text
|
|
|
76
73
|
G
|
|
77
74
|
]),
|
|
78
75
|
t("div", H, [
|
|
79
|
-
i(o(
|
|
76
|
+
i(o(A), {
|
|
80
77
|
content: ((p = o(r).content) == null ? void 0 : p.trim()) || ((u = c.source) == null ? void 0 : u.trim()) || "",
|
|
81
78
|
copy: !1
|
|
82
79
|
}, null, 8, ["content"])
|
|
83
80
|
])
|
|
84
81
|
], 64)),
|
|
85
|
-
|
|
86
|
-
i(
|
|
82
|
+
m.value ? (l(), a("div", J, [
|
|
83
|
+
i(N, {
|
|
87
84
|
source: e.source,
|
|
88
85
|
variant: "button",
|
|
89
86
|
onImportFinished: n[0] || (n[0] = () => e.$emit("importFinished"))
|
|
@@ -97,5 +94,5 @@ const P = { class: "flex gap-5 flex-col my-24" }, W = { class: "text-center text
|
|
|
97
94
|
}
|
|
98
95
|
});
|
|
99
96
|
export {
|
|
100
|
-
|
|
97
|
+
ne as default
|
|
101
98
|
};
|