@scalar/api-client 2.2.54 → 2.2.56
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 +24 -0
- package/dist/components/CommandPalette/CommandActionForm.vue.d.ts +1 -1
- package/dist/components/CommandPalette/CommandActionForm.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandActionForm.vue.js +15 -14
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +121 -106
- package/dist/components/{ImportCurl/ImportCurlModal.vue.d.ts → CommandPalette/CommandPaletteImportCurl.vue.d.ts} +9 -17
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue.d.ts.map +1 -0
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue.js +7 -0
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue2.js +141 -0
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +98 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +2 -2
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +128 -113
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
- package/dist/components/OpenApiClientButton.vue.d.ts.map +1 -1
- package/dist/components/OpenApiClientButton.vue.js +2 -2
- package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNav.vue.js +122 -94
- package/dist/components/TopNav/TopNavItem.vue.d.ts +1 -0
- package/dist/components/TopNav/TopNavItem.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNavItem.vue.js +1 -1
- package/dist/components/TopNav/TopNavItem.vue2.js +49 -42
- package/dist/layouts/App/create-api-client-app.d.ts +12 -12
- package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
- package/dist/layouts/Modal/create-api-client-modal.d.ts +24 -24
- package/dist/layouts/Web/create-api-client-web.d.ts +12 -12
- package/dist/libs/create-client.d.ts +12 -12
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +91 -115
- package/dist/libs/get-request-uid-by-path-method.d.ts +7 -0
- package/dist/libs/get-request-uid-by-path-method.d.ts.map +1 -0
- package/dist/libs/get-request-uid-by-path-method.js +10 -0
- package/dist/libs/get-request-uid-by-path-method.test.d.ts +2 -0
- package/dist/libs/get-request-uid-by-path-method.test.d.ts.map +1 -0
- package/dist/libs/send-request/create-fetch-body.d.ts +1 -1
- package/dist/libs/validate-parameters.d.ts +6 -0
- package/dist/libs/validate-parameters.d.ts.map +1 -0
- package/dist/libs/validate-parameters.js +12 -0
- package/dist/libs/validate-parameters.test.d.ts +2 -0
- package/dist/libs/validate-parameters.test.d.ts.map +1 -0
- package/dist/store/cookies.d.ts +4 -4
- package/dist/store/request-example.d.ts +4 -4
- package/dist/store/requests.d.ts +4 -4
- package/dist/store/store.d.ts +12 -12
- package/dist/style.css +1 -1
- package/dist/views/Request/Request.vue.d.ts +6 -3
- package/dist/views/Request/Request.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.js +2 -2
- package/dist/views/Request/Request.vue2.js +96 -145
- package/dist/views/Request/RequestRoot.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestRoot.vue.js +2 -2
- package/dist/views/Request/RequestRoot.vue2.js +68 -57
- 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 +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts +1 -0
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.js +34 -31
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts +1 -0
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestPathParams.vue.js +35 -33
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts +1 -0
- 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 +59 -54
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +1 -0
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestTable.vue2.js +29 -27
- package/dist/views/Request/RequestSidebar.vue.js +2 -2
- package/dist/views/Request/RequestSidebar.vue2.js +23 -23
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue.js +2 -2
- package/dist/views/Request/RequestSubpageHeader.vue2.js +4 -4
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/libs/request.js +1 -2
- package/package.json +12 -12
- package/dist/components/ImportCurl/ImportCurlModal.vue.d.ts.map +0 -1
- package/dist/components/ImportCurl/ImportCurlModal.vue.js +0 -7
- package/dist/components/ImportCurl/ImportCurlModal.vue2.js +0 -125
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
7
7
|
export default _default;
|
|
8
8
|
export declare const PaletteComponents: {
|
|
9
|
-
readonly 'Import from OpenAPI/Swagger/Postman': import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
9
|
+
readonly 'Import from OpenAPI/Swagger/Postman/cURL': import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
10
10
|
close: () => any;
|
|
11
11
|
back: (e: KeyboardEvent) => any;
|
|
12
12
|
}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
|
|
@@ -83,6 +83,103 @@ export declare const PaletteComponents: {
|
|
|
83
83
|
onClose?: () => any;
|
|
84
84
|
onBack?: (e: KeyboardEvent) => any;
|
|
85
85
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
86
|
+
readonly 'Import from cURL': import("vue").DefineComponent<{
|
|
87
|
+
metaData: {
|
|
88
|
+
parsedCurl: {
|
|
89
|
+
path?: string | undefined;
|
|
90
|
+
type?: "request" | undefined;
|
|
91
|
+
uid?: string | undefined;
|
|
92
|
+
description?: string | undefined;
|
|
93
|
+
summary?: string | undefined;
|
|
94
|
+
externalDocs?: {
|
|
95
|
+
url: string;
|
|
96
|
+
description?: unknown;
|
|
97
|
+
} | undefined;
|
|
98
|
+
'x-internal'?: boolean | undefined;
|
|
99
|
+
'x-scalar-ignore'?: boolean | undefined;
|
|
100
|
+
security?: Record<string, string[] | undefined>[] | undefined;
|
|
101
|
+
selectedSecuritySchemeUids?: (string | string[])[] | undefined;
|
|
102
|
+
selectedServerUid?: string | null | undefined;
|
|
103
|
+
servers?: string[] | undefined;
|
|
104
|
+
tags?: string[] | undefined;
|
|
105
|
+
deprecated?: boolean | undefined;
|
|
106
|
+
examples?: string[] | undefined;
|
|
107
|
+
operationId?: string | undefined;
|
|
108
|
+
parameters?: {
|
|
109
|
+
name: string;
|
|
110
|
+
in: "path" | "cookie" | "query" | "header";
|
|
111
|
+
example?: unknown;
|
|
112
|
+
required?: boolean | undefined;
|
|
113
|
+
description?: string | undefined;
|
|
114
|
+
deprecated?: boolean | undefined;
|
|
115
|
+
schema?: unknown;
|
|
116
|
+
content?: unknown;
|
|
117
|
+
style?: "matrix" | "simple" | "form" | "label" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
|
|
118
|
+
examples?: Record<string, {
|
|
119
|
+
value?: unknown;
|
|
120
|
+
summary?: string | undefined;
|
|
121
|
+
}> | undefined;
|
|
122
|
+
}[] | undefined;
|
|
123
|
+
requestBody?: any;
|
|
124
|
+
responses?: Record<string, any> | undefined;
|
|
125
|
+
method?: "options" | "connect" | "delete" | "get" | "head" | "patch" | "post" | "put" | "trace" | undefined;
|
|
126
|
+
} & {
|
|
127
|
+
url?: string;
|
|
128
|
+
};
|
|
129
|
+
collectionUid: string;
|
|
130
|
+
};
|
|
131
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
132
|
+
close: () => any;
|
|
133
|
+
back: (e: KeyboardEvent) => any;
|
|
134
|
+
}, string, import("vue").PublicProps, Readonly<{
|
|
135
|
+
metaData: {
|
|
136
|
+
parsedCurl: {
|
|
137
|
+
path?: string | undefined;
|
|
138
|
+
type?: "request" | undefined;
|
|
139
|
+
uid?: string | undefined;
|
|
140
|
+
description?: string | undefined;
|
|
141
|
+
summary?: string | undefined;
|
|
142
|
+
externalDocs?: {
|
|
143
|
+
url: string;
|
|
144
|
+
description?: unknown;
|
|
145
|
+
} | undefined;
|
|
146
|
+
'x-internal'?: boolean | undefined;
|
|
147
|
+
'x-scalar-ignore'?: boolean | undefined;
|
|
148
|
+
security?: Record<string, string[] | undefined>[] | undefined;
|
|
149
|
+
selectedSecuritySchemeUids?: (string | string[])[] | undefined;
|
|
150
|
+
selectedServerUid?: string | null | undefined;
|
|
151
|
+
servers?: string[] | undefined;
|
|
152
|
+
tags?: string[] | undefined;
|
|
153
|
+
deprecated?: boolean | undefined;
|
|
154
|
+
examples?: string[] | undefined;
|
|
155
|
+
operationId?: string | undefined;
|
|
156
|
+
parameters?: {
|
|
157
|
+
name: string;
|
|
158
|
+
in: "path" | "cookie" | "query" | "header";
|
|
159
|
+
example?: unknown;
|
|
160
|
+
required?: boolean | undefined;
|
|
161
|
+
description?: string | undefined;
|
|
162
|
+
deprecated?: boolean | undefined;
|
|
163
|
+
schema?: unknown;
|
|
164
|
+
content?: unknown;
|
|
165
|
+
style?: "matrix" | "simple" | "form" | "label" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
|
|
166
|
+
examples?: Record<string, {
|
|
167
|
+
value?: unknown;
|
|
168
|
+
summary?: string | undefined;
|
|
169
|
+
}> | undefined;
|
|
170
|
+
}[] | undefined;
|
|
171
|
+
requestBody?: any;
|
|
172
|
+
responses?: Record<string, any> | undefined;
|
|
173
|
+
method?: "options" | "connect" | "delete" | "get" | "head" | "patch" | "post" | "put" | "trace" | undefined;
|
|
174
|
+
} & {
|
|
175
|
+
url?: string;
|
|
176
|
+
};
|
|
177
|
+
collectionUid: string;
|
|
178
|
+
};
|
|
179
|
+
}> & Readonly<{
|
|
180
|
+
onClose?: () => any;
|
|
181
|
+
onBack?: (e: KeyboardEvent) => any;
|
|
182
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
86
183
|
};
|
|
87
184
|
/** Infer the types from the commands */
|
|
88
185
|
export type CommandNames = keyof typeof PaletteComponents;
|
|
@@ -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":"AAwaA;;;;GAIG;;AACH,wBAmfI;AAEJ,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAlhB9B,CAvPoB;qBAuPpB,CAvP2C;;;;;;;mBAuP3C,CAvPoB;qBAuPpB,CAvP2C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+BA6lBmC,CAAC;;;;;;;;;;;;;;;2BAQQ,CAAC;4BAA2B,CAAC;+BACzF,CAAC;8BAAwC,CAAC;0BAAqC,CAAC;2BAA0B,CAAC;yBAChH,CAAC;4BAEiC,CAAC;6BAAqC,CAAA;+BAA8B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;+BAZ/C,CAAC;;;;;;;;;;;;;;;2BAQQ,CAAC;4BAA2B,CAAC;+BACzF,CAAC;8BAAwC,CAAC;0BAAqC,CAAC;2BAA0B,CAAC;yBAChH,CAAC;4BAEiC,CAAC;6BAAqC,CAAA;+BAA8B,CAAC;;;;;;;;;;;;;;;CAyKnH,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,8 +2,8 @@ import o from "./TheCommandPalette.vue2.js";
|
|
|
2
2
|
import { PaletteComponents as s } from "./TheCommandPalette.vue2.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
-
const
|
|
5
|
+
const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-6b717663"]]);
|
|
6
6
|
export {
|
|
7
7
|
s as PaletteComponents,
|
|
8
|
-
|
|
8
|
+
a as default
|
|
9
9
|
};
|
|
@@ -1,41 +1,44 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Dialog as
|
|
3
|
-
import { useModal as
|
|
4
|
-
import { useRouter as
|
|
1
|
+
import { defineComponent as F, ref as c, computed as N, watch as G, onMounted as Q, onBeforeUnmount as j, openBlock as a, createBlock as T, unref as s, withCtx as g, createElementVNode as u, createVNode as f, createTextVNode as U, createElementBlock as m, withKeys as w, withModifiers as P, Fragment as I, renderList as B, withDirectives as J, toDisplayString as M, vShow as X, normalizeClass as Y, createCommentVNode as Z, resolveDynamicComponent as ee, mergeProps as oe, nextTick as W } from "vue";
|
|
2
|
+
import { Dialog as te, DialogPanel as ne, DialogTitle as ae } from "@headlessui/vue";
|
|
3
|
+
import { useModal as le, ScalarIcon as A } from "@scalar/components";
|
|
4
|
+
import { useRouter as re } from "vue-router";
|
|
5
5
|
import { ROUTES as se } from "../../constants.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import fe from "./
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
|
|
6
|
+
import { importCurlCommand as me } from "../../libs/importers/curl.js";
|
|
7
|
+
import { PathId as ie } from "../../routes.js";
|
|
8
|
+
import { useActiveEntities as ce } from "../../store/active-entities.js";
|
|
9
|
+
import ue from "./CommandPaletteCollection.vue.js";
|
|
10
|
+
import de from "./CommandPaletteExample.vue.js";
|
|
11
|
+
import pe from "./CommandPaletteImport.vue.js";
|
|
12
|
+
import fe from "./CommandPaletteImportCurl.vue.js";
|
|
13
|
+
import ve from "./CommandPaletteRequest.vue.js";
|
|
14
|
+
import Ce from "./CommandPaletteServer.vue.js";
|
|
15
|
+
import he from "./CommandPaletteTag.vue.js";
|
|
16
|
+
import xe from "./CommandPaletteWorkspace.vue.js";
|
|
17
|
+
import { useWorkspace as _e } from "../../store/store.js";
|
|
18
|
+
const be = {
|
|
17
19
|
key: 0,
|
|
18
20
|
class: "custom-scroll max-h-[50dvh] min-h-0 flex-1 rounded-lg p-1.5"
|
|
19
|
-
},
|
|
21
|
+
}, ke = { class: "bg-b-2 focus-within:bg-b-1 focus-within:border-b-3 sticky top-0 flex items-center rounded-md border border-transparent pl-2 shadow-[0_-8px_0_8px_var(--scalar-background-1),0_0_8px_8px_var(--scalar-background-1)]" }, ye = { for: "commandmenu" }, ge = ["value", "onKeydown"], we = ["onClick"], Pe = {
|
|
20
22
|
key: 0,
|
|
21
23
|
class: "text-c-3 p-2 pt-3 text-center text-sm"
|
|
22
|
-
},
|
|
24
|
+
}, Ie = {
|
|
23
25
|
key: 1,
|
|
24
26
|
class: "flex-1 p-1.5"
|
|
25
|
-
},
|
|
27
|
+
}, Ae = {
|
|
26
28
|
name: "TheCommandPalette"
|
|
27
|
-
},
|
|
28
|
-
"Import from OpenAPI/Swagger/Postman":
|
|
29
|
-
"Create Request":
|
|
30
|
-
"Create Workspace":
|
|
31
|
-
"Add Tag":
|
|
32
|
-
"Add Server":
|
|
33
|
-
"Create Collection":
|
|
34
|
-
"Add Example":
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
29
|
+
}, Le = {
|
|
30
|
+
"Import from OpenAPI/Swagger/Postman/cURL": pe,
|
|
31
|
+
"Create Request": ve,
|
|
32
|
+
"Create Workspace": xe,
|
|
33
|
+
"Add Tag": he,
|
|
34
|
+
"Add Server": Ce,
|
|
35
|
+
"Create Collection": ue,
|
|
36
|
+
"Add Example": de,
|
|
37
|
+
"Import from cURL": fe
|
|
38
|
+
}, Ge = /* @__PURE__ */ F({
|
|
39
|
+
...Ae,
|
|
40
|
+
setup(Re) {
|
|
41
|
+
const d = le(), L = re(), { activeWorkspace: x, activeCollection: V } = ce(), { events: p } = _e(), R = [
|
|
39
42
|
{
|
|
40
43
|
label: "",
|
|
41
44
|
commands: [
|
|
@@ -44,7 +47,7 @@ const Ce = {
|
|
|
44
47
|
icon: "ExternalLink"
|
|
45
48
|
},
|
|
46
49
|
{
|
|
47
|
-
name: "Import from OpenAPI/Swagger/Postman",
|
|
50
|
+
name: "Import from OpenAPI/Swagger/Postman/cURL",
|
|
48
51
|
icon: "Import"
|
|
49
52
|
},
|
|
50
53
|
{
|
|
@@ -86,164 +89,176 @@ const Ce = {
|
|
|
86
89
|
},
|
|
87
90
|
{
|
|
88
91
|
label: "Pages",
|
|
89
|
-
commands: se.map((
|
|
90
|
-
var
|
|
92
|
+
commands: se.map((e) => {
|
|
93
|
+
var o;
|
|
91
94
|
return {
|
|
92
|
-
name:
|
|
93
|
-
icon:
|
|
94
|
-
path:
|
|
95
|
-
...
|
|
95
|
+
name: e.displayName,
|
|
96
|
+
icon: e.icon,
|
|
97
|
+
path: L.resolve({
|
|
98
|
+
...e.to,
|
|
96
99
|
params: {
|
|
97
|
-
[
|
|
100
|
+
[ie.Workspace]: ((o = x == null ? void 0 : x.value) == null ? void 0 : o.uid) ?? "default"
|
|
98
101
|
}
|
|
99
102
|
}).href
|
|
100
103
|
};
|
|
101
104
|
})
|
|
102
105
|
}
|
|
103
|
-
], _ = c(), l = c(""),
|
|
104
|
-
() =>
|
|
105
|
-
const t =
|
|
106
|
+
], _ = c(), l = c(""), r = c(null), i = c(-1), S = c([]), v = N(
|
|
107
|
+
() => R.reduce((e, o) => {
|
|
108
|
+
const t = o.commands.filter(
|
|
106
109
|
(n) => n.name.toLowerCase().includes(l.value.toLowerCase())
|
|
107
110
|
);
|
|
108
|
-
return [...
|
|
111
|
+
return [...e, ...t];
|
|
109
112
|
}, [])
|
|
110
|
-
),
|
|
111
|
-
d.hide(), l.value = "",
|
|
112
|
-
},
|
|
113
|
-
l.value !== "" && (
|
|
114
|
-
var
|
|
115
|
-
return (
|
|
113
|
+
), C = () => {
|
|
114
|
+
d.hide(), l.value = "", r.value = null, i.value = -1;
|
|
115
|
+
}, H = (e) => {
|
|
116
|
+
l.value !== "" && (e == null || e.preventDefault()), r.value = null, W(() => {
|
|
117
|
+
var o;
|
|
118
|
+
return (o = b.value) == null ? void 0 : o.focus();
|
|
116
119
|
});
|
|
117
|
-
},
|
|
118
|
-
"path" in
|
|
119
|
-
}, b = c(),
|
|
120
|
-
commandName:
|
|
121
|
-
metaData:
|
|
120
|
+
}, D = (e) => {
|
|
121
|
+
"path" in e ? (L.push(e.path), C()) : r.value = e.name;
|
|
122
|
+
}, b = c(), $ = ({
|
|
123
|
+
commandName: e,
|
|
124
|
+
metaData: o
|
|
122
125
|
} = {}) => {
|
|
123
|
-
|
|
126
|
+
r.value = e ?? null, _.value = o, d.show(), W(() => {
|
|
124
127
|
var t;
|
|
125
128
|
return (t = b.value) == null ? void 0 : t.focus();
|
|
126
129
|
});
|
|
127
130
|
};
|
|
128
|
-
|
|
129
|
-
|
|
131
|
+
G(l, (e) => {
|
|
132
|
+
e && v.value.length > 0 && (i.value = 0);
|
|
130
133
|
});
|
|
131
|
-
const
|
|
132
|
-
var
|
|
134
|
+
const E = (e, o) => {
|
|
135
|
+
var h;
|
|
133
136
|
if (!d.open) return;
|
|
134
|
-
|
|
135
|
-
const t =
|
|
136
|
-
i.value = (i.value + t + n) % n, (
|
|
137
|
+
o.preventDefault();
|
|
138
|
+
const t = e === "up" ? -1 : 1, n = v.value.length;
|
|
139
|
+
i.value = (i.value + t + n) % n, (h = S.value[i.value]) == null || h.scrollIntoView({
|
|
137
140
|
behavior: "smooth",
|
|
138
141
|
block: "nearest"
|
|
139
142
|
});
|
|
140
|
-
}, k =
|
|
143
|
+
}, k = N(
|
|
141
144
|
() => v.value[i.value]
|
|
142
|
-
),
|
|
143
|
-
!k.value ||
|
|
144
|
-
},
|
|
145
|
-
d.open &&
|
|
145
|
+
), O = (e) => {
|
|
146
|
+
!k.value || r.value || (e.preventDefault(), e.stopPropagation(), D(k.value));
|
|
147
|
+
}, z = (e) => {
|
|
148
|
+
d.open && e != null && e.closeModal && C();
|
|
149
|
+
}, q = (e) => {
|
|
150
|
+
var o;
|
|
151
|
+
if (e.trim().toLowerCase().startsWith("curl")) {
|
|
152
|
+
p.commandPalette.emit({
|
|
153
|
+
commandName: "Import from cURL",
|
|
154
|
+
metaData: {
|
|
155
|
+
parsedCurl: me(e),
|
|
156
|
+
collectionUid: (o = V.value) == null ? void 0 : o.uid
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
l.value = e;
|
|
146
162
|
};
|
|
147
|
-
return
|
|
148
|
-
p.commandPalette.on(
|
|
149
|
-
}),
|
|
150
|
-
p.commandPalette.off(
|
|
151
|
-
}), (
|
|
152
|
-
open:
|
|
153
|
-
onClose:
|
|
163
|
+
return Q(() => {
|
|
164
|
+
p.commandPalette.on($), p.hotKeys.on(z);
|
|
165
|
+
}), j(() => {
|
|
166
|
+
p.commandPalette.off($), p.hotKeys.off(z);
|
|
167
|
+
}), (e, o) => (a(), T(s(te), {
|
|
168
|
+
open: s(d).open,
|
|
169
|
+
onClose: o[5] || (o[5] = (t) => C())
|
|
154
170
|
}, {
|
|
155
171
|
default: g(() => [
|
|
156
|
-
|
|
157
|
-
f(
|
|
172
|
+
o[7] || (o[7] = u("div", { class: "commandmenu-overlay z-overlay" }, null, -1)),
|
|
173
|
+
f(s(ne), { class: "commandmenu z-overlay flex flex-col" }, {
|
|
158
174
|
default: g(() => [
|
|
159
|
-
f(
|
|
160
|
-
default: g(() =>
|
|
161
|
-
|
|
175
|
+
f(s(ae), { class: "sr-only" }, {
|
|
176
|
+
default: g(() => o[6] || (o[6] = [
|
|
177
|
+
U("API Client Command Menu")
|
|
162
178
|
])),
|
|
163
179
|
_: 1
|
|
164
180
|
}),
|
|
165
|
-
|
|
181
|
+
r.value ? (a(), m("div", Ie, [
|
|
166
182
|
u("button", {
|
|
167
|
-
class: "
|
|
183
|
+
class: "hover:bg-b-3 text-c-3 active:text-c-1 z-1 my-1.25 p-0.75 absolute mr-1.5 rounded",
|
|
168
184
|
type: "button",
|
|
169
|
-
onClick:
|
|
185
|
+
onClick: o[3] || (o[3] = (t) => r.value = null)
|
|
170
186
|
}, [
|
|
171
|
-
f(
|
|
187
|
+
f(s(A), {
|
|
172
188
|
icon: "ChevronLeft",
|
|
173
189
|
size: "md",
|
|
174
190
|
thickness: "1.5"
|
|
175
191
|
})
|
|
176
192
|
]),
|
|
177
|
-
(a(),
|
|
178
|
-
onBack:
|
|
179
|
-
onClose:
|
|
193
|
+
(a(), T(ee(Le[r.value]), oe(_.value ? { metaData: _.value } : {}, {
|
|
194
|
+
onBack: o[4] || (o[4] = (t) => H(t)),
|
|
195
|
+
onClose: C
|
|
180
196
|
}), null, 16))
|
|
181
|
-
])) : (a(), m("div",
|
|
182
|
-
u("div",
|
|
183
|
-
u("label",
|
|
184
|
-
f(
|
|
197
|
+
])) : (a(), m("div", be, [
|
|
198
|
+
u("div", ke, [
|
|
199
|
+
u("label", ye, [
|
|
200
|
+
f(s(A), {
|
|
185
201
|
class: "text-c-2 mr-2.5",
|
|
186
202
|
icon: "Search",
|
|
187
203
|
size: "md",
|
|
188
204
|
thickness: "1.5"
|
|
189
205
|
})
|
|
190
206
|
]),
|
|
191
|
-
|
|
207
|
+
u("input", {
|
|
192
208
|
id: "commandmenu",
|
|
193
209
|
ref_key: "commandInputRef",
|
|
194
210
|
ref: b,
|
|
195
|
-
|
|
211
|
+
value: l.value,
|
|
196
212
|
autocomplete: "off",
|
|
197
213
|
autofocus: "",
|
|
198
214
|
class: "w-full rounded border-none bg-none py-1.5 text-sm focus:outline-none",
|
|
199
215
|
placeholder: "Search commands...",
|
|
200
216
|
type: "text",
|
|
217
|
+
onInput: o[0] || (o[0] = (t) => q(t.target.value)),
|
|
201
218
|
onKeydown: [
|
|
202
|
-
|
|
203
|
-
w(P(
|
|
204
|
-
|
|
219
|
+
o[1] || (o[1] = w(P((t) => E("down", t), ["stop"]), ["down"])),
|
|
220
|
+
w(P(O, ["stop"]), ["enter"]),
|
|
221
|
+
o[2] || (o[2] = w(P((t) => E("up", t), ["stop"]), ["up"]))
|
|
205
222
|
]
|
|
206
|
-
}, null, 40,
|
|
207
|
-
[j, l.value]
|
|
208
|
-
])
|
|
223
|
+
}, null, 40, ge)
|
|
209
224
|
]),
|
|
210
|
-
(a(), m(
|
|
225
|
+
(a(), m(I, null, B(R, (t) => (a(), m(I, {
|
|
211
226
|
key: t.label
|
|
212
227
|
}, [
|
|
213
|
-
|
|
228
|
+
J(u("div", { class: "text-c-3 mb-1 mt-2 px-2 text-xs font-medium" }, M(t.label), 513), [
|
|
214
229
|
[
|
|
215
|
-
|
|
230
|
+
X,
|
|
216
231
|
t.commands.filter(
|
|
217
232
|
(n) => n.name.toLowerCase().includes(l.value.toLowerCase())
|
|
218
233
|
).length > 0
|
|
219
234
|
]
|
|
220
235
|
]),
|
|
221
|
-
(a(!0), m(
|
|
236
|
+
(a(!0), m(I, null, B(t.commands.filter(
|
|
222
237
|
(n) => n.name.toLowerCase().includes(l.value.toLowerCase())
|
|
223
|
-
), (n,
|
|
224
|
-
var
|
|
238
|
+
), (n, h) => {
|
|
239
|
+
var K;
|
|
225
240
|
return a(), m("div", {
|
|
226
241
|
key: n.name,
|
|
227
242
|
ref_for: !0,
|
|
228
243
|
ref: (y) => {
|
|
229
|
-
y && (
|
|
244
|
+
y && (S.value[h] = y);
|
|
230
245
|
},
|
|
231
|
-
class:
|
|
232
|
-
"bg-b-2": n.name === ((
|
|
246
|
+
class: Y(["commandmenu-item hover:bg-b-2 flex cursor-pointer items-center rounded px-2 py-1.5 text-sm", {
|
|
247
|
+
"bg-b-2": n.name === ((K = k.value) == null ? void 0 : K.name)
|
|
233
248
|
}]),
|
|
234
|
-
onClick: (y) =>
|
|
249
|
+
onClick: (y) => D(n)
|
|
235
250
|
}, [
|
|
236
|
-
f(
|
|
251
|
+
f(s(A), {
|
|
237
252
|
class: "text-c-2 mr-2.5",
|
|
238
253
|
icon: n.icon,
|
|
239
254
|
size: "md",
|
|
240
255
|
thickness: "1.5"
|
|
241
256
|
}, null, 8, ["icon"]),
|
|
242
|
-
|
|
243
|
-
], 10,
|
|
257
|
+
U(" " + M(n.name), 1)
|
|
258
|
+
], 10, we);
|
|
244
259
|
}), 128))
|
|
245
260
|
], 64))), 64)),
|
|
246
|
-
v.value.length ?
|
|
261
|
+
v.value.length ? Z("", !0) : (a(), m("div", Pe, " No commands found "))
|
|
247
262
|
]))
|
|
248
263
|
]),
|
|
249
264
|
_: 1
|
|
@@ -254,6 +269,6 @@ const Ce = {
|
|
|
254
269
|
}
|
|
255
270
|
});
|
|
256
271
|
export {
|
|
257
|
-
|
|
258
|
-
|
|
272
|
+
Le as PaletteComponents,
|
|
273
|
+
Ge as default
|
|
259
274
|
};
|
|
@@ -4,9 +4,9 @@ type __VLS_Props = {
|
|
|
4
4
|
isEditable?: boolean;
|
|
5
5
|
};
|
|
6
6
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
7
|
-
change: (value: "delete" | "get" | "
|
|
7
|
+
change: (value: "delete" | "get" | "put" | "post" | "options" | "head" | "patch" | "trace" | "connect") => any;
|
|
8
8
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
|
-
onChange?: (value: "delete" | "get" | "
|
|
9
|
+
onChange?: (value: "delete" | "get" | "put" | "post" | "options" | "head" | "patch" | "trace" | "connect") => any;
|
|
10
10
|
}>, {
|
|
11
11
|
isEditable: boolean;
|
|
12
12
|
isSquare: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenApiClientButton.vue.d.ts","sourceRoot":"","sources":["../../src/components/OpenApiClientButton.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OpenApiClientButton.vue.d.ts","sourceRoot":"","sources":["../../src/components/OpenApiClientButton.vue"],"names":[],"mappings":"AAwHA,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,SAAS,GAAG,OAAO,CAAA;IACjC,MAAM,CAAC,EAAE,eAAe,GAAG,SAAS,CAAA;IACpC,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,CAAC;;AA4HF,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./OpenApiClientButton.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const i = /* @__PURE__ */ o(t, [["__scopeId", "data-v-01d14731"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
i as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopNav.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TopNav/TopNav.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TopNav.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TopNav/TopNav.vue"],"names":[],"mappings":"AAqTA,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;CACjD,CAAC;;AA+eF,wBAOG"}
|