@scalar/api-client 2.1.52 → 2.2.1
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.map +1 -1
- package/dist/components/AddressBar/AddressBar.vue.js +1 -1
- package/dist/components/AddressBar/AddressBar.vue2.js +36 -43
- package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarHistory.vue.js +2 -2
- package/dist/components/AddressBar/AddressBarHistory.vue2.js +25 -24
- package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarServer.vue.js +32 -39
- package/dist/components/AddressBar/AddressBarServerItem.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarServerItem.vue.js +10 -15
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +1 -1
- package/dist/components/CodeInput/CodeInput.vue2.js +48 -47
- package/dist/components/CodeInput/codeVariableWidget.d.ts +3 -2
- package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +15 -14
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteExample.vue.js +18 -23
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +27 -26
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +19 -20
- package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteServer.vue.js +19 -24
- package/dist/components/CommandPalette/CommandPaletteTag.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteTag.vue.js +23 -22
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +4 -4
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +47 -46
- package/dist/components/DataTable/DataTableInput.vue.d.ts +1 -1
- package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +23 -28
- 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 +127 -96
- package/dist/components/ImportCollection/ImportNowButton.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportNowButton.vue.js +28 -27
- package/dist/components/ImportCollection/IntegrationLogo.vue.d.ts +1 -1
- package/dist/components/ImportCollection/IntegrationLogo.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/IntegrationLogo.vue.js +14 -18
- package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/WorkspaceSelector.vue.js +15 -14
- package/dist/components/Search/useSearch.d.ts.map +1 -1
- package/dist/components/Search/useSearch.js +20 -19
- package/dist/components/SideNav/SideNav.vue.js +4 -4
- package/dist/components/SideNav/SideNavRouterLink.vue.js +9 -9
- package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNav.vue.js +165 -5
- package/dist/components/TopNav/TopNav.vue2.js +2 -164
- package/dist/components/TopNav/TopNavItem.vue.d.ts +2 -2
- package/dist/components/TopNav/TopNavItem.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNavItem.vue.js +2 -2
- package/dist/components/TopNav/TopNavItem.vue2.js +5 -5
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +2 -2
- package/dist/hooks/index.js +3 -2
- package/dist/hooks/useLayout.d.ts +2 -0
- package/dist/hooks/useLayout.d.ts.map +1 -1
- package/dist/hooks/useLayout.js +4 -3
- package/dist/layouts/App/ApiClientApp.vue.d.ts +1 -1
- package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
- package/dist/layouts/App/ApiClientApp.vue.js +35 -31
- package/dist/layouts/App/MainLayout.vue.d.ts.map +1 -1
- package/dist/layouts/App/MainLayout.vue.js +3 -3
- package/dist/layouts/App/create-api-client-app.d.ts +669 -1232
- 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 +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue2.js +24 -23
- package/dist/layouts/Modal/create-api-client-modal.d.ts +1382 -2508
- 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 +34 -33
- package/dist/layouts/Web/create-api-client-web.d.ts +669 -1232
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +673 -1236
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +91 -102
- package/dist/libs/hot-keys.d.ts +1 -1
- package/dist/libs/send-request.d.ts +2 -3
- package/dist/libs/send-request.d.ts.map +1 -1
- package/dist/libs/send-request.js +127 -123
- package/dist/store/active-entities.d.ts +333 -0
- package/dist/store/active-entities.d.ts.map +1 -0
- package/dist/store/active-entities.js +97 -0
- package/dist/store/collections.d.ts +4 -274
- package/dist/store/collections.d.ts.map +1 -1
- package/dist/store/cookies.d.ts +4 -4
- package/dist/store/environment.d.ts +4 -4
- package/dist/store/import-spec.d.ts +0 -54
- package/dist/store/import-spec.d.ts.map +1 -1
- package/dist/store/index.js +4 -3
- package/dist/store/request-example.d.ts +4 -4
- package/dist/store/requests.d.ts +15 -15
- package/dist/store/security-schemes.d.ts +527 -317
- package/dist/store/security-schemes.d.ts.map +1 -1
- package/dist/store/security-schemes.js +33 -41
- package/dist/store/servers.d.ts +4 -4
- package/dist/store/store-context.d.ts +0 -3
- package/dist/store/store-context.d.ts.map +1 -1
- package/dist/store/store.d.ts +640 -5297
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/store.js +111 -189
- package/dist/store/tags.d.ts +4 -4
- package/dist/store/workspace.d.ts +14 -24
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/tailwind/desktop-variants.d.ts +18 -0
- package/dist/tailwind/desktop-variants.d.ts.map +1 -0
- package/dist/views/Cookies/CookieForm.vue.d.ts.map +1 -1
- package/dist/views/Cookies/CookieForm.vue.js +14 -13
- package/dist/views/Cookies/CookieRaw.vue.d.ts.map +1 -1
- package/dist/views/Cookies/CookieRaw.vue.js +14 -13
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts +3 -3
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +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 +92 -92
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +96 -99
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +49 -46
- 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 +94 -100
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.js +60 -67
- package/dist/views/Request/RequestSection/RequestAuthDataTableInput.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuthDataTableInput.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestBody.vue2.js +29 -28
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.js +11 -10
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestPathParams.vue.js +24 -28
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +17 -16
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +2 -2
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.js +1 -1
- package/dist/views/Request/RequestSidebar.vue2.js +72 -73
- 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 +111 -109
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +2 -2
- package/dist/views/Request/RequestSidebarItemMenu.vue2.js +15 -16
- package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue2.js +14 -14
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue2.js +25 -21
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +26 -25
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +7 -7
- package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +32 -31
- package/dist/views/Request/consts/new-auth-options.d.ts +16 -8
- package/dist/views/Request/consts/new-auth-options.d.ts.map +1 -1
- package/dist/views/Request/consts/new-auth-options.js +16 -8
- package/dist/views/Request/handle-drag.d.ts +2 -1
- package/dist/views/Request/handle-drag.d.ts.map +1 -1
- package/dist/views/Request/handle-drag.js +23 -25
- package/dist/views/Request/hooks/useOpenApiWatcher.d.ts.map +1 -1
- package/dist/views/Request/hooks/useOpenApiWatcher.js +40 -39
- package/dist/views/Request/libs/auth.d.ts +1 -29
- package/dist/views/Request/libs/auth.d.ts.map +1 -1
- package/dist/views/Request/libs/auth.js +2 -9
- package/dist/views/Request/libs/index.js +6 -8
- package/dist/views/Request/libs/live-sync.d.ts +6 -5
- package/dist/views/Request/libs/live-sync.d.ts.map +1 -1
- package/dist/views/Request/libs/live-sync.js +164 -185
- package/dist/views/Request/libs/oauth2.d.ts +6 -10
- package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
- package/dist/views/Request/libs/oauth2.js +54 -69
- package/dist/views/Servers/ServerForm.vue.d.ts.map +1 -1
- package/dist/views/Servers/ServerForm.vue.js +14 -13
- package/dist/views/Servers/Servers.vue.d.ts.map +1 -1
- package/dist/views/Servers/Servers.vue2.js +18 -17
- package/dist/views/Settings/SettingsGeneral.vue.d.ts.map +1 -1
- package/dist/views/Settings/SettingsGeneral.vue.js +218 -126
- package/dist/views/Settings/{SettingsGeneralMode.vue.d.ts → components/SettingsAppearance.vue.d.ts} +2 -2
- package/dist/views/Settings/components/SettingsAppearance.vue.d.ts.map +1 -0
- package/dist/views/Settings/components/SettingsAppearance.vue.js +74 -0
- package/dist/views/Settings/components/SettingsAppearance.vue2.js +4 -0
- package/dist/views/Settings/components/SettingsSection.vue.d.ts +24 -0
- package/dist/views/Settings/components/SettingsSection.vue.d.ts.map +1 -0
- package/dist/views/Settings/components/SettingsSection.vue.js +24 -0
- package/dist/views/Settings/components/SettingsSection.vue2.js +4 -0
- package/package.json +9 -9
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthModal.vue.d.ts +0 -16
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthModal.vue.d.ts.map +0 -1
- package/dist/views/Settings/SettingsGeneralMode.vue.d.ts.map +0 -1
- package/dist/views/Settings/SettingsGeneralMode.vue.js +0 -78
- package/dist/views/Settings/SettingsGeneralMode.vue2.js +0 -4
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
import { defineComponent as J, useAttrs as L, ref as
|
|
1
|
+
import { defineComponent as J, useAttrs as L, ref as u, toRef as a, watch as Q, computed as v, openBlock as i, createElementBlock as p, Fragment as G, createBlock as h, mergeProps as H, unref as n, withKeys as w, withModifiers as D, createElementVNode as $, createVNode as X, createCommentVNode as f, renderSlot as q } from "vue";
|
|
2
2
|
import { useCodeMirror as Y, useDropdown as Z, colorPicker as ee } from "@scalar/use-codemirror";
|
|
3
3
|
import { nanoid as oe } from "nanoid";
|
|
4
4
|
import R from "../DataTable/DataTableInputSelect.vue.js";
|
|
5
5
|
import { pillPlugin as te, backspaceCommand as le } from "./codeVariableWidget.js";
|
|
6
6
|
import ne from "../../views/Environment/EnvironmentVariableDropdown.vue.js";
|
|
7
|
-
import { useClipboard as
|
|
8
|
-
import { ScalarIcon as
|
|
9
|
-
import { prettyPrintJson as
|
|
10
|
-
import {
|
|
11
|
-
|
|
7
|
+
import { useClipboard as re } from "@scalar/use-hooks/useClipboard";
|
|
8
|
+
import { ScalarIcon as ae } from "@scalar/components";
|
|
9
|
+
import { prettyPrintJson as ie } from "@scalar/oas-utils/helpers";
|
|
10
|
+
import { useActiveEntities as ue } from "../../store/active-entities.js";
|
|
11
|
+
import { useWorkspace as se } from "../../store/store.js";
|
|
12
|
+
const de = ["id"], pe = {
|
|
12
13
|
key: 0,
|
|
13
14
|
class: "scalar-code-copy z-context"
|
|
14
|
-
},
|
|
15
|
+
}, ce = {
|
|
15
16
|
key: 3,
|
|
16
17
|
class: "absolute centered-y right-7 text-orange text-xs"
|
|
17
|
-
},
|
|
18
|
+
}, fe = {
|
|
18
19
|
key: 4,
|
|
19
20
|
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"
|
|
20
|
-
},
|
|
21
|
+
}, me = {
|
|
21
22
|
inheritAttrs: !1
|
|
22
|
-
},
|
|
23
|
-
...
|
|
23
|
+
}, Se = /* @__PURE__ */ J({
|
|
24
|
+
...me,
|
|
24
25
|
__name: "CodeInput",
|
|
25
26
|
props: {
|
|
26
27
|
colorPicker: { type: Boolean, default: !1 },
|
|
@@ -48,13 +49,13 @@ const se = ["id"], de = {
|
|
|
48
49
|
emits: ["submit", "update:modelValue", "curl"],
|
|
49
50
|
setup(N, { expose: O, emit: _ }) {
|
|
50
51
|
var P;
|
|
51
|
-
const e = N, s = _, V = L(),
|
|
52
|
-
function
|
|
52
|
+
const e = N, s = _, V = L(), A = V.id || `id-${oe()}`, g = u(!1), m = u(!1), B = u(""), C = u({ left: 0, top: 0 }), c = u(null), { activeEnvVariables: k, activeEnvironment: E, router: I } = ue(), { isReadOnly: S } = se(), { copyToClipboard: K } = re();
|
|
53
|
+
function M(o) {
|
|
53
54
|
var t;
|
|
54
|
-
return o === e.modelValue ? null : e.importCurl && o.trim().toLowerCase().startsWith("curl") ? (s("curl", o), (t =
|
|
55
|
+
return o === e.modelValue ? null : e.importCurl && o.trim().toLowerCase().startsWith("curl") ? (s("curl", o), (t = r.value) == null || t.dispatch({
|
|
55
56
|
changes: {
|
|
56
57
|
from: 0,
|
|
57
|
-
to:
|
|
58
|
+
to: r.value.state.doc.length,
|
|
58
59
|
insert: String(e.modelValue)
|
|
59
60
|
}
|
|
60
61
|
}), null) : e.handleFieldChange ? e.handleFieldChange(o) : s("update:modelValue", o);
|
|
@@ -68,36 +69,36 @@ const se = ["id"], de = {
|
|
|
68
69
|
const y = [];
|
|
69
70
|
e.colorPicker && y.push(ee), y.push(
|
|
70
71
|
te({
|
|
71
|
-
activeEnvironment:
|
|
72
|
+
activeEnvironment: E,
|
|
72
73
|
activeEnvVariables: k,
|
|
73
74
|
isReadOnly: S
|
|
74
75
|
}),
|
|
75
76
|
le
|
|
76
77
|
);
|
|
77
|
-
const
|
|
78
|
-
content:
|
|
78
|
+
const x = u(null), { codeMirror: r } = Y({
|
|
79
|
+
content: a(
|
|
79
80
|
() => e.modelValue !== void 0 ? String(e.modelValue) : ""
|
|
80
81
|
),
|
|
81
82
|
onChange: (o) => {
|
|
82
|
-
|
|
83
|
+
M(o), W();
|
|
83
84
|
},
|
|
84
85
|
onFocus: () => g.value = !0,
|
|
85
86
|
onBlur: (o) => z(o),
|
|
86
|
-
codeMirrorRef:
|
|
87
|
-
disableTabIndent:
|
|
88
|
-
disableEnter:
|
|
89
|
-
disableCloseBrackets:
|
|
90
|
-
lineNumbers:
|
|
91
|
-
language:
|
|
92
|
-
lint:
|
|
87
|
+
codeMirrorRef: x,
|
|
88
|
+
disableTabIndent: a(() => e.disableTabIndent),
|
|
89
|
+
disableEnter: a(() => e.disableEnter),
|
|
90
|
+
disableCloseBrackets: a(() => e.disableCloseBrackets),
|
|
91
|
+
lineNumbers: a(() => e.lineNumbers),
|
|
92
|
+
language: a(() => e.language),
|
|
93
|
+
lint: a(() => e.lint),
|
|
93
94
|
extensions: y,
|
|
94
|
-
placeholder:
|
|
95
|
+
placeholder: a(() => e.placeholder)
|
|
95
96
|
});
|
|
96
|
-
(P =
|
|
97
|
-
|
|
97
|
+
(P = r.value) == null || P.focus(), Q(r, () => {
|
|
98
|
+
r.value && Object.prototype.hasOwnProperty.call(V, "autofocus") && r.value.focus();
|
|
98
99
|
});
|
|
99
100
|
const { handleDropdownSelect: U, updateDropdownVisibility: W } = Z({
|
|
100
|
-
codeMirror:
|
|
101
|
+
codeMirror: r,
|
|
101
102
|
query: B,
|
|
102
103
|
showDropdown: m,
|
|
103
104
|
dropdownPosition: C
|
|
@@ -108,7 +109,7 @@ const se = ["id"], de = {
|
|
|
108
109
|
O({
|
|
109
110
|
focus: () => {
|
|
110
111
|
var o;
|
|
111
|
-
(o =
|
|
112
|
+
(o = r.value) == null || o.focus();
|
|
112
113
|
}
|
|
113
114
|
});
|
|
114
115
|
const b = (o, t) => {
|
|
@@ -117,25 +118,25 @@ const se = ["id"], de = {
|
|
|
117
118
|
};
|
|
118
119
|
return (o, t) => {
|
|
119
120
|
var d;
|
|
120
|
-
return
|
|
121
|
-
e.enum && e.enum.length ? (
|
|
121
|
+
return i(), p(G, null, [
|
|
122
|
+
e.enum && e.enum.length ? (i(), h(R, {
|
|
122
123
|
key: 0,
|
|
123
124
|
default: e.default,
|
|
124
125
|
modelValue: e.modelValue,
|
|
125
126
|
value: e.enum,
|
|
126
127
|
"onUpdate:modelValue": t[0] || (t[0] = (l) => s("update:modelValue", l))
|
|
127
|
-
}, null, 8, ["default", "modelValue", "value"])) : e.type === "boolean" || (d = e.type) != null && d.includes("boolean") ? (
|
|
128
|
+
}, null, 8, ["default", "modelValue", "value"])) : e.type === "boolean" || (d = e.type) != null && d.includes("boolean") ? (i(), h(R, {
|
|
128
129
|
key: 1,
|
|
129
130
|
default: e.default,
|
|
130
131
|
modelValue: e.modelValue,
|
|
131
132
|
value: j.value,
|
|
132
133
|
"onUpdate:modelValue": t[1] || (t[1] = (l) => s("update:modelValue", l))
|
|
133
|
-
}, null, 8, ["default", "modelValue", "value"])) : (
|
|
134
|
+
}, null, 8, ["default", "modelValue", "value"])) : (i(), p("div", H({
|
|
134
135
|
key: 2,
|
|
135
|
-
id: n(
|
|
136
|
+
id: n(A)
|
|
136
137
|
}, o.$attrs, {
|
|
137
138
|
ref_key: "codeMirrorRef",
|
|
138
|
-
ref:
|
|
139
|
+
ref: x,
|
|
139
140
|
class: ["peer font-code w-full whitespace-nowrap overflow-hidden text-xs leading-[1.44] relative has-[:focus-visible]:outline has-[:focus-visible]:rounded-[4px] -outline-offset-2", {
|
|
140
141
|
"flow-code-input--error": o.error
|
|
141
142
|
}],
|
|
@@ -145,34 +146,34 @@ const se = ["id"], de = {
|
|
|
145
146
|
t[5] || (t[5] = w(D((l) => b("up", l), ["stop"]), ["up"]))
|
|
146
147
|
]
|
|
147
148
|
}), [
|
|
148
|
-
o.isCopyable ? (
|
|
149
|
+
o.isCopyable ? (i(), p("div", pe, [
|
|
149
150
|
$("button", {
|
|
150
151
|
class: "copy-button",
|
|
151
152
|
type: "button",
|
|
152
|
-
onClick: t[2] || (t[2] = (l) => n(
|
|
153
|
+
onClick: t[2] || (t[2] = (l) => n(K)(n(ie)(e.modelValue)))
|
|
153
154
|
}, [
|
|
154
155
|
t[6] || (t[6] = $("span", { class: "sr-only" }, "Copy content", -1)),
|
|
155
|
-
X(n(
|
|
156
|
+
X(n(ae), {
|
|
156
157
|
icon: "Clipboard",
|
|
157
158
|
size: "md"
|
|
158
159
|
})
|
|
159
160
|
])
|
|
160
161
|
])) : f("", !0)
|
|
161
|
-
], 16,
|
|
162
|
-
o.$slots.warning ? (
|
|
162
|
+
], 16, de)),
|
|
163
|
+
o.$slots.warning ? (i(), p("div", ce, [
|
|
163
164
|
q(o.$slots, "warning", {}, void 0, !0)
|
|
164
165
|
])) : f("", !0),
|
|
165
166
|
q(o.$slots, "icon", {}, void 0, !0),
|
|
166
|
-
o.required ? (
|
|
167
|
-
m.value && e.withVariables && !n(S) ? (
|
|
167
|
+
o.required ? (i(), p("div", fe, " Required ")) : f("", !0),
|
|
168
|
+
m.value && e.withVariables && !n(S) ? (i(), h(ne, {
|
|
168
169
|
key: 5,
|
|
169
170
|
ref_key: "dropdownRef",
|
|
170
171
|
ref: c,
|
|
171
172
|
activeEnvVariables: v(() => n(k)),
|
|
172
|
-
activeEnvironment: v(() => n(
|
|
173
|
+
activeEnvironment: v(() => n(E)),
|
|
173
174
|
dropdownPosition: C.value,
|
|
174
175
|
query: B.value,
|
|
175
|
-
router: n(
|
|
176
|
+
router: n(I),
|
|
176
177
|
onSelect: n(U)
|
|
177
178
|
}, null, 8, ["activeEnvVariables", "activeEnvironment", "dropdownPosition", "query", "router", "onSelect"])) : f("", !0)
|
|
178
179
|
], 64);
|
|
@@ -180,5 +181,5 @@ const se = ["id"], de = {
|
|
|
180
181
|
}
|
|
181
182
|
});
|
|
182
183
|
export {
|
|
183
|
-
|
|
184
|
+
Se as default
|
|
184
185
|
};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { WorkspaceStore } from '../../store/index.js';
|
|
2
|
+
import type { ActiveEntitiesStore } from '../../store/active-entities.js';
|
|
2
3
|
import { Decoration, type DecorationSet, EditorView, ViewPlugin, type ViewUpdate } from '@scalar/use-codemirror';
|
|
3
|
-
type ActiveParsedEnvironments =
|
|
4
|
+
type ActiveParsedEnvironments = ActiveEntitiesStore['activeEnvVariables'];
|
|
4
5
|
type IsReadOnly = WorkspaceStore['isReadOnly'];
|
|
5
6
|
/**
|
|
6
7
|
* Styles the active environment variable pill
|
|
7
8
|
*/
|
|
8
9
|
export declare const pillPlugin: (props: {
|
|
9
|
-
activeEnvironment:
|
|
10
|
+
activeEnvironment: ActiveEntitiesStore["activeEnvironment"];
|
|
10
11
|
activeEnvVariables: ActiveParsedEnvironments;
|
|
11
12
|
isReadOnly: IsReadOnly;
|
|
12
13
|
}) => ViewPlugin<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codeVariableWidget.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/codeVariableWidget.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"codeVariableWidget.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/codeVariableWidget.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC7C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAGlE,OAAO,EACL,UAAU,EACV,KAAK,aAAa,EAClB,UAAU,EAEV,UAAU,EACV,KAAK,UAAU,EAEhB,MAAM,wBAAwB,CAAA;AAI/B,KAAK,wBAAwB,GAAG,mBAAmB,CAAC,oBAAoB,CAAC,CAAA;AACzE,KAAK,UAAU,GAAG,cAAc,CAAC,YAAY,CAAC,CAAA;AAqI9C;;GAEG;AACH,eAAO,MAAM,UAAU,UAAW;IAChC,iBAAiB,EAAE,mBAAmB,CAAC,mBAAmB,CAAC,CAAA;IAC3D,kBAAkB,EAAE,wBAAwB,CAAA;IAC5C,UAAU,EAAE,UAAU,CAAA;CACvB;iBAGkB,aAAa;mBAMX,UAAU;2BAMF,UAAU;EAiCpC,CAAA;AAEH,eAAO,MAAM,gBAAgB,uCA8B3B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandPaletteCollection.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteCollection.vue"],"names":[],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"CommandPaletteCollection.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteCollection.vue"],"names":[],"mappings":";;;;;;;AA+PA,wBAOG"}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { defineComponent as f, ref as i, openBlock as v, createBlock as b, withCtx as l, createVNode as n, unref as s, createTextVNode as _ } from "vue";
|
|
2
2
|
import C from "../IconSelector.vue.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import N from "
|
|
7
|
-
import B from "./
|
|
8
|
-
import
|
|
9
|
-
|
|
3
|
+
import { useActiveEntities as V } from "../../store/active-entities.js";
|
|
4
|
+
import { ScalarButton as k } from "@scalar/components";
|
|
5
|
+
import { LibraryIcon as x } from "@scalar/icons";
|
|
6
|
+
import { useToasts as N } from "@scalar/use-toasts";
|
|
7
|
+
import B from "./CommandActionForm.vue.js";
|
|
8
|
+
import S from "./CommandActionInput.vue.js";
|
|
9
|
+
import { useWorkspace as $ } from "../../store/store.js";
|
|
10
|
+
const D = /* @__PURE__ */ f({
|
|
10
11
|
__name: "CommandPaletteCollection",
|
|
11
12
|
emits: ["close", "back"],
|
|
12
|
-
setup(
|
|
13
|
-
const r = m, { activeWorkspace: c, collectionMutators: u } =
|
|
13
|
+
setup(I, { emit: m }) {
|
|
14
|
+
const r = m, { activeWorkspace: c } = V(), { collectionMutators: u } = $(), o = i(""), a = i("interface-content-folder"), { toast: d } = N(), p = () => {
|
|
14
15
|
if (!o.value) {
|
|
15
16
|
d("Please enter a name before creating a collection.", "error");
|
|
16
17
|
return;
|
|
@@ -27,7 +28,7 @@ const z = /* @__PURE__ */ f({
|
|
|
27
28
|
c.value.uid
|
|
28
29
|
), r("close");
|
|
29
30
|
};
|
|
30
|
-
return (
|
|
31
|
+
return (P, e) => (v(), b(B, {
|
|
31
32
|
disabled: !o.value.trim(),
|
|
32
33
|
onSubmit: p
|
|
33
34
|
}, {
|
|
@@ -38,12 +39,12 @@ const z = /* @__PURE__ */ f({
|
|
|
38
39
|
placement: "bottom-start"
|
|
39
40
|
}, {
|
|
40
41
|
default: l(() => [
|
|
41
|
-
n(s(
|
|
42
|
+
n(s(k), {
|
|
42
43
|
class: "aspect-square px-0 h-auto",
|
|
43
44
|
variant: "outlined"
|
|
44
45
|
}, {
|
|
45
46
|
default: l(() => [
|
|
46
|
-
n(s(
|
|
47
|
+
n(s(x), {
|
|
47
48
|
class: "size-4 text-c-2 stroke-[1.75]",
|
|
48
49
|
src: a.value
|
|
49
50
|
}, null, 8, ["src"])
|
|
@@ -58,7 +59,7 @@ const z = /* @__PURE__ */ f({
|
|
|
58
59
|
_("Create Collection")
|
|
59
60
|
])),
|
|
60
61
|
default: l(() => [
|
|
61
|
-
n(
|
|
62
|
+
n(S, {
|
|
62
63
|
modelValue: o.value,
|
|
63
64
|
"onUpdate:modelValue": e[0] || (e[0] = (t) => o.value = t),
|
|
64
65
|
label: "Collection Name",
|
|
@@ -71,5 +72,5 @@ const z = /* @__PURE__ */ f({
|
|
|
71
72
|
}
|
|
72
73
|
});
|
|
73
74
|
export {
|
|
74
|
-
|
|
75
|
+
D as default
|
|
75
76
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandPaletteExample.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteExample.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CommandPaletteExample.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteExample.vue"],"names":[],"mappings":"AA8HA,KAAK,WAAW,GAAG;IACjB,oCAAoC;IACpC,QAAQ,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAA;CAC/B,CAAC;;;;;;;;AAuQF,wBAQG"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { defineComponent as y, ref as f, openBlock as u, createBlock as v, withCtx as o, createVNode as s, unref as a, createElementVNode as x, createElementBlock as N, Fragment as V, renderList as B, createTextVNode as i, toDisplayString as b } from "vue";
|
|
2
2
|
import k from "../HttpMethod/HttpMethod.vue.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import P from "
|
|
7
|
-
import T from "./
|
|
8
|
-
import
|
|
9
|
-
|
|
3
|
+
import { useActiveEntities as R } from "../../store/active-entities.js";
|
|
4
|
+
import { ScalarDropdown as W, ScalarDropdownItem as j, ScalarButton as z, ScalarIcon as I } from "@scalar/components";
|
|
5
|
+
import { useToasts as M } from "@scalar/use-toasts";
|
|
6
|
+
import { useRouter as P } from "vue-router";
|
|
7
|
+
import T from "./CommandActionForm.vue.js";
|
|
8
|
+
import U from "./CommandActionInput.vue.js";
|
|
9
|
+
import { useWorkspace as A } from "../../store/store.js";
|
|
10
|
+
const F = { class: "flex items-center gap-2" }, H = { class: "max-h-40 custom-scroll" }, te = /* @__PURE__ */ y({
|
|
10
11
|
__name: "CommandPaletteExample",
|
|
11
12
|
props: {
|
|
12
13
|
metaData: {}
|
|
@@ -14,15 +15,9 @@ const F = { class: "flex items-center gap-2" }, H = { class: "max-h-40 custom-sc
|
|
|
14
15
|
emits: ["close", "back"],
|
|
15
16
|
setup(h, { emit: _ }) {
|
|
16
17
|
var d;
|
|
17
|
-
const w = h, c = _, { push: C } = M(),
|
|
18
|
-
activeRequest: S,
|
|
19
|
-
activeWorkspace: D,
|
|
20
|
-
activeWorkspaceRequests: E,
|
|
21
|
-
requests: n,
|
|
22
|
-
requestExampleMutators: $
|
|
23
|
-
} = U(), { toast: g } = I(), r = f(""), l = f(
|
|
18
|
+
const w = h, c = _, { push: C } = P(), { activeRequest: E, activeWorkspace: S, activeWorkspaceRequests: D } = R(), { requests: n, requestExampleMutators: $ } = A(), { toast: g } = M(), r = f(""), l = f(
|
|
24
19
|
// Ensure we pre-select the correct request
|
|
25
|
-
n[((d = w.metaData) == null ? void 0 : d.itemUid) ?? ""] ??
|
|
20
|
+
n[((d = w.metaData) == null ? void 0 : d.itemUid) ?? ""] ?? E.value
|
|
26
21
|
), p = (m) => l.value = m, q = () => {
|
|
27
22
|
if (!r.value) {
|
|
28
23
|
g("Please enter a name before creating an example.", "error");
|
|
@@ -33,21 +28,21 @@ const F = { class: "flex items-center gap-2" }, H = { class: "max-h-40 custom-sc
|
|
|
33
28
|
r.value
|
|
34
29
|
);
|
|
35
30
|
m && (C(
|
|
36
|
-
`/workspace/${
|
|
31
|
+
`/workspace/${S.value.uid}/request/${l.value.uid}/examples/${m.uid}`
|
|
37
32
|
), c("close"));
|
|
38
33
|
};
|
|
39
|
-
return (m, t) => (u(), v(
|
|
34
|
+
return (m, t) => (u(), v(T, {
|
|
40
35
|
disabled: !r.value.trim(),
|
|
41
36
|
onSubmit: q
|
|
42
37
|
}, {
|
|
43
38
|
options: o(() => [
|
|
44
|
-
s(a(
|
|
39
|
+
s(a(W), {
|
|
45
40
|
placement: "bottom",
|
|
46
41
|
resize: ""
|
|
47
42
|
}, {
|
|
48
43
|
items: o(() => [
|
|
49
44
|
x("div", H, [
|
|
50
|
-
(u(!0), N(V, null, B(a(
|
|
45
|
+
(u(!0), N(V, null, B(a(D), (e) => (u(), v(a(j), {
|
|
51
46
|
key: e,
|
|
52
47
|
class: "flex h-7 w-full items-center justify-between px-1 pr-[26px]",
|
|
53
48
|
onClick: (L) => p(a(n)[e])
|
|
@@ -63,7 +58,7 @@ const F = { class: "flex items-center gap-2" }, H = { class: "max-h-40 custom-sc
|
|
|
63
58
|
])
|
|
64
59
|
]),
|
|
65
60
|
default: o(() => [
|
|
66
|
-
s(a(
|
|
61
|
+
s(a(z), {
|
|
67
62
|
class: "justify-between p-2 max-h-8 w-full gap-1 text-xs hover:bg-b-2",
|
|
68
63
|
variant: "outlined",
|
|
69
64
|
onClick: t[2] || (t[2] = (e) => p(l.value))
|
|
@@ -74,7 +69,7 @@ const F = { class: "flex items-center gap-2" }, H = { class: "max-h-40 custom-sc
|
|
|
74
69
|
s(k, {
|
|
75
70
|
method: l.value.method
|
|
76
71
|
}, null, 8, ["method"]),
|
|
77
|
-
s(a(
|
|
72
|
+
s(a(I), {
|
|
78
73
|
class: "text-c-3",
|
|
79
74
|
icon: "ChevronDown",
|
|
80
75
|
size: "xs"
|
|
@@ -91,7 +86,7 @@ const F = { class: "flex items-center gap-2" }, H = { class: "max-h-40 custom-sc
|
|
|
91
86
|
i("Create Example")
|
|
92
87
|
])),
|
|
93
88
|
default: o(() => [
|
|
94
|
-
s(
|
|
89
|
+
s(U, {
|
|
95
90
|
modelValue: r.value,
|
|
96
91
|
"onUpdate:modelValue": t[0] || (t[0] = (e) => r.value = e),
|
|
97
92
|
label: "Example Name",
|
|
@@ -104,5 +99,5 @@ const F = { class: "flex items-center gap-2" }, H = { class: "max-h-40 custom-sc
|
|
|
104
99
|
}
|
|
105
100
|
});
|
|
106
101
|
export {
|
|
107
|
-
|
|
102
|
+
te as default
|
|
108
103
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandPaletteImport.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteImport.vue"],"names":[],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"CommandPaletteImport.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteImport.vue"],"names":[],"mappings":";;;;;;;AA+mBA,wBAOG"}
|
|
@@ -1,28 +1,29 @@
|
|
|
1
1
|
import { defineComponent as $, ref as U, computed as k, watch as _, openBlock as a, createBlock as h, unref as r, withCtx as u, createElementVNode as f, createVNode as g, createTextVNode as c, createElementBlock as s, Fragment as d, toDisplayString as A, createCommentVNode as z } from "vue";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import J from "
|
|
5
|
-
import Y from "./
|
|
6
|
-
import q from "./
|
|
7
|
-
import
|
|
2
|
+
import { useActiveEntities as B } from "../../store/active-entities.js";
|
|
3
|
+
import { useLoadingState as N, ScalarButton as O, ScalarIcon as j, ScalarTooltip as E, ScalarCodeBlock as W } from "@scalar/components";
|
|
4
|
+
import { useToasts as J } from "@scalar/use-toasts";
|
|
5
|
+
import Y from "./CommandActionForm.vue.js";
|
|
6
|
+
import q from "./CommandActionInput.vue.js";
|
|
7
|
+
import G from "./WatchModeToggle.vue.js";
|
|
8
|
+
import { getOpenApiDocumentDetails as H } from "../../libs/getOpenApiDocumentDetails.js";
|
|
8
9
|
import { isUrl as w } from "../../libs/isUrl.js";
|
|
9
|
-
import { useFileDialog as
|
|
10
|
-
import { useWorkspace as
|
|
11
|
-
const
|
|
10
|
+
import { useFileDialog as K } from "../../hooks/useFileDialog.js";
|
|
11
|
+
import { useWorkspace as Q } from "../../store/store.js";
|
|
12
|
+
const X = { class: "flex justify-between" }, Z = { class: "flex flex-row items-center justify-between gap-3 w-full" }, ee = { class: "grid gap-1.5 pointer-events-none max-w-[320px] w-content shadow-lg rounded bg-b-1 z-100 p-2 text-xxs leading-5 z-10 text-c-1" }, te = { class: "flex items-center text-c-2" }, oe = {
|
|
12
13
|
key: 0,
|
|
13
14
|
class: "text-pretty"
|
|
14
|
-
},
|
|
15
|
+
}, ae = {
|
|
15
16
|
key: 1,
|
|
16
17
|
class: "text-pretty"
|
|
17
|
-
},
|
|
18
|
+
}, ge = /* @__PURE__ */ $({
|
|
18
19
|
__name: "CommandPaletteImport",
|
|
19
20
|
emits: ["close", "back"],
|
|
20
|
-
setup(
|
|
21
|
-
const b = L, { activeWorkspace: y, importSpecFile: I, importSpecFromUrl: V } =
|
|
22
|
-
() =>
|
|
21
|
+
setup(le, { emit: L }) {
|
|
22
|
+
const b = L, { activeWorkspace: y } = B(), { importSpecFile: I, importSpecFromUrl: V } = Q(), { toast: m } = J(), i = N(), o = U(""), p = U(!0), l = k(
|
|
23
|
+
() => H(o.value)
|
|
23
24
|
), S = k(
|
|
24
25
|
() => l.value ? l.value.type : "json"
|
|
25
|
-
), v = k(() => w(o.value)), P = k(() => !!l.value), { open: R } =
|
|
26
|
+
), v = k(() => w(o.value)), P = k(() => !!l.value), { open: R } = K({
|
|
26
27
|
onChange: async (t) => {
|
|
27
28
|
const e = t == null ? void 0 : t[0];
|
|
28
29
|
if (e) {
|
|
@@ -86,13 +87,13 @@ const Q = { class: "flex justify-between" }, X = { class: "flex flex-row items-c
|
|
|
86
87
|
}
|
|
87
88
|
}
|
|
88
89
|
}
|
|
89
|
-
return (t, e) => (a(), h(
|
|
90
|
+
return (t, e) => (a(), h(Y, {
|
|
90
91
|
disabled: !o.value.trim(),
|
|
91
92
|
loading: r(i),
|
|
92
93
|
onSubmit: D
|
|
93
94
|
}, {
|
|
94
95
|
options: u(() => [
|
|
95
|
-
f("div",
|
|
96
|
+
f("div", Z, [
|
|
96
97
|
g(r(O), {
|
|
97
98
|
class: "p-2 max-h-8 gap-1.5 text-xs hover:bg-b-2 relative",
|
|
98
99
|
variant: "outlined",
|
|
@@ -100,7 +101,7 @@ const Q = { class: "flex justify-between" }, X = { class: "flex flex-row items-c
|
|
|
100
101
|
}, {
|
|
101
102
|
default: u(() => [
|
|
102
103
|
e[6] || (e[6] = c(" JSON, or YAML File ")),
|
|
103
|
-
g(r(
|
|
104
|
+
g(r(j), {
|
|
104
105
|
class: "text-c-3",
|
|
105
106
|
icon: "UploadSimple",
|
|
106
107
|
size: "md"
|
|
@@ -108,23 +109,23 @@ const Q = { class: "flex justify-between" }, X = { class: "flex flex-row items-c
|
|
|
108
109
|
]),
|
|
109
110
|
_: 1
|
|
110
111
|
}, 8, ["onClick"]),
|
|
111
|
-
g(r(
|
|
112
|
+
g(r(E), {
|
|
112
113
|
as: "div",
|
|
113
114
|
class: "z-[10001]",
|
|
114
115
|
side: "bottom",
|
|
115
116
|
sideOffset: 5
|
|
116
117
|
}, {
|
|
117
118
|
trigger: u(() => [
|
|
118
|
-
g(
|
|
119
|
+
g(G, {
|
|
119
120
|
modelValue: p.value,
|
|
120
121
|
"onUpdate:modelValue": e[3] || (e[3] = (n) => p.value = n),
|
|
121
122
|
disabled: !v.value
|
|
122
123
|
}, null, 8, ["modelValue", "disabled"])
|
|
123
124
|
]),
|
|
124
125
|
content: u(() => [
|
|
125
|
-
f("div",
|
|
126
|
-
f("div",
|
|
127
|
-
v.value ? (a(), s("span",
|
|
126
|
+
f("div", ee, [
|
|
127
|
+
f("div", te, [
|
|
128
|
+
v.value ? (a(), s("span", oe, " Automatically updates the API client when the OpenAPI URL content changes, ensuring your client remains up-to-date. ")) : (a(), s("span", ae, " Watch Mode is only available for URL imports. It automatically updates the API client when the OpenAPI URL content changes. "))
|
|
128
129
|
])
|
|
129
130
|
])
|
|
130
131
|
]),
|
|
@@ -147,14 +148,14 @@ const Q = { class: "flex justify-between" }, X = { class: "flex flex-row items-c
|
|
|
147
148
|
], 64))
|
|
148
149
|
]),
|
|
149
150
|
default: u(() => [
|
|
150
|
-
!l.value || r(w)(o.value) ? (a(), h(
|
|
151
|
+
!l.value || r(w)(o.value) ? (a(), h(q, {
|
|
151
152
|
key: 0,
|
|
152
153
|
modelValue: o.value,
|
|
153
154
|
"onUpdate:modelValue": e[0] || (e[0] = (n) => o.value = n),
|
|
154
155
|
placeholder: "OpenAPI/Swagger URL or document",
|
|
155
156
|
onOnDelete: e[1] || (e[1] = (n) => b("back", n))
|
|
156
157
|
}, null, 8, ["modelValue"])) : (a(), s(d, { key: 1 }, [
|
|
157
|
-
f("div",
|
|
158
|
+
f("div", X, [
|
|
158
159
|
e[5] || (e[5] = f("div", { class: "pl-8 text-xs min-h-8 py-2 text-c-2" }, "Preview", -1)),
|
|
159
160
|
g(r(O), {
|
|
160
161
|
class: "ml-auto p-2 max-h-8 gap-1.5 text-xs hover:bg-b-2 relative",
|
|
@@ -181,5 +182,5 @@ const Q = { class: "flex justify-between" }, X = { class: "flex flex-row items-c
|
|
|
181
182
|
}
|
|
182
183
|
});
|
|
183
184
|
export {
|
|
184
|
-
|
|
185
|
+
ge as default
|
|
185
186
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandPaletteRequest.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteRequest.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CommandPaletteRequest.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteRequest.vue"],"names":[],"mappings":"AAwMA,KAAK,WAAW,GAAG;IACjB,QAAQ,CAAC,EAAE;QACT,OAAO,EAAE,MAAM,CAAA;QACf,SAAS,EAAE,MAAM,CAAA;KAClB,CAAA;CACF,CAAC;;;;;;;;AA0TF,wBAQG"}
|
|
@@ -1,27 +1,26 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as P, ref as c, computed as x, openBlock as C, createBlock as h, withCtx as u, createElementVNode as f, createVNode as i, unref as n, normalizeClass as q, toDisplayString as V, createCommentVNode as W, createTextVNode as j } from "vue";
|
|
2
2
|
import H from "../HttpMethod/HttpMethod.vue.js";
|
|
3
|
+
import { useActiveEntities as I } from "../../store/active-entities.js";
|
|
3
4
|
import { ScalarListbox as D, ScalarButton as k, ScalarIcon as w } from "@scalar/components";
|
|
4
|
-
import { useToasts as
|
|
5
|
-
import { useRouter as
|
|
5
|
+
import { useToasts as $ } from "@scalar/use-toasts";
|
|
6
|
+
import { useRouter as A } from "vue-router";
|
|
6
7
|
import L from "./CommandActionForm.vue.js";
|
|
7
8
|
import O from "./CommandActionInput.vue.js";
|
|
8
|
-
import { isHTTPMethod as
|
|
9
|
-
import { useWorkspace as
|
|
10
|
-
const
|
|
9
|
+
import { isHTTPMethod as F } from "../HttpMethod/helpers.js";
|
|
10
|
+
import { useWorkspace as G } from "../../store/store.js";
|
|
11
|
+
const J = { class: "flex gap-2" }, se = /* @__PURE__ */ P({
|
|
11
12
|
__name: "CommandPaletteRequest",
|
|
12
13
|
props: {
|
|
13
14
|
metaData: {}
|
|
14
15
|
},
|
|
15
16
|
emits: ["close", "back"],
|
|
16
17
|
setup(S, { emit: _ }) {
|
|
17
|
-
const r = S, b = _, { push: M } =
|
|
18
|
+
const r = S, b = _, { push: M } = A(), { toast: N } = $(), {
|
|
18
19
|
activeCollection: R,
|
|
19
20
|
activeWorkspace: U,
|
|
20
21
|
activeWorkspaceCollections: g,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
tags: z
|
|
24
|
-
} = F(), o = c(""), d = c("get"), p = x(
|
|
22
|
+
activeRequest: T
|
|
23
|
+
} = I(), { requestMutators: y, tags: z } = G(), o = c(""), d = c("get"), p = x(
|
|
25
24
|
() => g.value.map((t) => {
|
|
26
25
|
var e;
|
|
27
26
|
return {
|
|
@@ -62,17 +61,17 @@ const G = { class: "flex gap-2" }, le = /* @__PURE__ */ W({
|
|
|
62
61
|
return t.id === ((e = r.metaData) == null ? void 0 : e.itemUid);
|
|
63
62
|
}) : m.value.find((t) => {
|
|
64
63
|
var e, a;
|
|
65
|
-
return t.label === ((a = (e =
|
|
64
|
+
return t.label === ((a = (e = T.value) == null ? void 0 : e.tags) == null ? void 0 : a[0]);
|
|
66
65
|
})
|
|
67
|
-
), B = (t) => d.value = t,
|
|
66
|
+
), B = (t) => d.value = t, E = () => {
|
|
68
67
|
var e;
|
|
69
68
|
if (!o.value.trim()) {
|
|
70
69
|
N("Please enter a name before creating a request.", "error");
|
|
71
70
|
return;
|
|
72
71
|
}
|
|
73
|
-
if (!((e = l.value) != null && e.id) || !
|
|
72
|
+
if (!((e = l.value) != null && e.id) || !F(d.value))
|
|
74
73
|
return;
|
|
75
|
-
const t =
|
|
74
|
+
const t = y.add(
|
|
76
75
|
{
|
|
77
76
|
path: "",
|
|
78
77
|
method: d.value,
|
|
@@ -93,10 +92,10 @@ const G = { class: "flex gap-2" }, le = /* @__PURE__ */ W({
|
|
|
93
92
|
};
|
|
94
93
|
return (t, e) => (C(), h(L, {
|
|
95
94
|
disabled: !o.value.trim(),
|
|
96
|
-
onSubmit:
|
|
95
|
+
onSubmit: E
|
|
97
96
|
}, {
|
|
98
97
|
options: u(() => [
|
|
99
|
-
f("div",
|
|
98
|
+
f("div", J, [
|
|
100
99
|
i(H, {
|
|
101
100
|
isEditable: !0,
|
|
102
101
|
isSquare: "",
|
|
@@ -153,11 +152,11 @@ const G = { class: "flex gap-2" }, le = /* @__PURE__ */ W({
|
|
|
153
152
|
})
|
|
154
153
|
]),
|
|
155
154
|
_: 1
|
|
156
|
-
}, 8, ["modelValue", "options"])) :
|
|
155
|
+
}, 8, ["modelValue", "options"])) : W("", !0)
|
|
157
156
|
])
|
|
158
157
|
]),
|
|
159
158
|
submit: u(() => e[4] || (e[4] = [
|
|
160
|
-
|
|
159
|
+
j("Create Request")
|
|
161
160
|
])),
|
|
162
161
|
default: u(() => [
|
|
163
162
|
i(O, {
|
|
@@ -173,5 +172,5 @@ const G = { class: "flex gap-2" }, le = /* @__PURE__ */ W({
|
|
|
173
172
|
}
|
|
174
173
|
});
|
|
175
174
|
export {
|
|
176
|
-
|
|
175
|
+
se as default
|
|
177
176
|
};
|
|
@@ -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":";;;;;;;AAuWA,wBAOG"}
|