@scalar/api-client 2.1.11 → 2.1.12
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 +2 -0
- package/dist/components/CommandPalette/CommandActionForm.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandActionForm.vue.js +1 -1
- package/dist/components/CommandPalette/CommandActionInput.vue.d.ts +2 -0
- package/dist/components/CommandPalette/CommandActionInput.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandActionInput.vue.js +27 -23
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts +2 -0
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +32 -31
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts +2 -0
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteExample.vue.js +43 -42
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts +2 -0
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +26 -25
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts +2 -0
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +31 -30
- package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts +2 -0
- package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteServer.vue.js +35 -34
- package/dist/components/CommandPalette/CommandPaletteTag.vue.d.ts +2 -0
- package/dist/components/CommandPalette/CommandPaletteTag.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteTag.vue.js +28 -27
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.d.ts +2 -0
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.js +18 -17
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +14 -0
- 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 +112 -103
- package/dist/components/DataTable/DataTableInput.vue.js +2 -2
- package/dist/components/ImportCollection/DropEventListener.vue.d.ts +7 -0
- package/dist/components/ImportCollection/DropEventListener.vue.d.ts.map +1 -0
- package/dist/components/ImportCollection/DropEventListener.vue.js +75 -0
- package/dist/components/ImportCollection/DropEventListener.vue2.js +4 -0
- package/dist/components/ImportCollection/ImportCollectionListener.vue.d.ts +12 -0
- package/dist/components/ImportCollection/ImportCollectionListener.vue.d.ts.map +1 -0
- package/dist/components/ImportCollection/ImportCollectionListener.vue.js +30 -0
- package/dist/components/ImportCollection/ImportCollectionListener.vue2.js +4 -0
- package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts +20 -0
- package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -0
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js +101 -0
- package/dist/components/ImportCollection/ImportCollectionModal.vue2.js +4 -0
- package/dist/components/ImportCollection/ImportNowButton.vue.d.ts +22 -0
- package/dist/components/ImportCollection/ImportNowButton.vue.d.ts.map +1 -0
- package/dist/components/ImportCollection/ImportNowButton.vue.js +85 -0
- package/dist/components/ImportCollection/ImportNowButton.vue2.js +4 -0
- package/dist/components/ImportCollection/OpenAppButton.vue.d.ts +16 -0
- package/dist/components/ImportCollection/OpenAppButton.vue.d.ts.map +1 -0
- package/dist/components/ImportCollection/OperationBadge.vue.d.ts +19 -0
- package/dist/components/ImportCollection/OperationBadge.vue.d.ts.map +1 -0
- package/dist/components/ImportCollection/PasteEventListener.vue.d.ts +7 -0
- package/dist/components/ImportCollection/PasteEventListener.vue.d.ts.map +1 -0
- package/dist/components/ImportCollection/PasteEventListener.vue.js +24 -0
- package/dist/components/ImportCollection/PasteEventListener.vue2.js +4 -0
- package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.d.ts +7 -0
- package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.d.ts.map +1 -0
- package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.js +15 -0
- package/dist/components/ImportCollection/UrlQueryParameterChecker.vue2.js +4 -0
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts +28 -0
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts.map +1 -0
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.js +55 -0
- package/dist/components/ImportCollection/index.d.ts +2 -0
- package/dist/components/ImportCollection/index.d.ts.map +1 -0
- package/dist/components/ImportCollection/index.js +4 -0
- package/dist/components/ImportCollection/utils/getOpenApiDocumentVersion.d.ts +5 -0
- package/dist/components/ImportCollection/utils/getOpenApiDocumentVersion.d.ts.map +1 -0
- package/dist/components/ImportCollection/utils/getOpenApiDocumentVersion.js +20 -0
- package/dist/components/ImportCollection/utils/isDocument.d.ts +3 -0
- package/dist/components/ImportCollection/utils/isDocument.d.ts.map +1 -0
- package/dist/components/ImportCollection/utils/isDocument.js +7 -0
- package/dist/components/ImportCollection/utils/isUrl.d.ts +3 -0
- package/dist/components/ImportCollection/utils/isUrl.d.ts.map +1 -0
- package/dist/components/ImportCollection/utils/isUrl.js +6 -0
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.d.ts +1 -1
- package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
- package/dist/layouts/App/create-api-client-app.d.ts +129 -2
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +258 -4
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +130 -2
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +54 -41
- package/dist/libs/send-request.d.ts +37 -1
- package/dist/libs/send-request.d.ts.map +1 -1
- package/dist/libs/send-request.js +24 -19
- package/dist/store/import-spec.d.ts +128 -2
- package/dist/store/import-spec.d.ts.map +1 -1
- package/dist/store/import-spec.js +24 -23
- package/dist/store/store.d.ts +256 -4
- package/dist/store/store.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/views/Request/Request.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.js +1 -1
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.js +1 -1
- package/dist/views/Request/RequestSidebar.vue2.js +14 -14
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +39 -39
- package/package.json +14 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @scalar/api-client
|
|
2
2
|
|
|
3
|
+
## 2.1.12
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 3ded00b: fix(api-references): sync selected server state with api client modal
|
|
8
|
+
- aa39741: fix: header names can have leading/trailing whitespaces
|
|
9
|
+
- 07b5439: feat: enhances command palette navigation and style
|
|
10
|
+
- 513e0ad: feat: add import modal
|
|
11
|
+
- 4a78aae: fix: uppercase method on request send
|
|
12
|
+
- Updated dependencies [513e0ad]
|
|
13
|
+
- Updated dependencies [8f12149]
|
|
14
|
+
- Updated dependencies [5127a37]
|
|
15
|
+
- Updated dependencies [1026d81]
|
|
16
|
+
- Updated dependencies [983a5e4]
|
|
17
|
+
- Updated dependencies [aee166c]
|
|
18
|
+
- Updated dependencies [07b5439]
|
|
19
|
+
- Updated dependencies [ef49617]
|
|
20
|
+
- @scalar/components@0.12.50
|
|
21
|
+
- @scalar/types@0.0.12
|
|
22
|
+
- @scalar/themes@0.9.33
|
|
23
|
+
- @scalar/openapi-parser@0.8.5
|
|
24
|
+
- @scalar/oas-utils@0.2.51
|
|
25
|
+
- @scalar/use-codemirror@0.11.16
|
|
26
|
+
|
|
3
27
|
## 2.1.11
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
|
@@ -8,11 +8,13 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_TypePropsToOp
|
|
|
8
8
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
9
|
submit: () => void;
|
|
10
10
|
cancel: () => void;
|
|
11
|
+
back: (e: KeyboardEvent) => void;
|
|
11
12
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
12
13
|
disabled?: boolean;
|
|
13
14
|
}>>> & {
|
|
14
15
|
onSubmit?: (() => any) | undefined;
|
|
15
16
|
onCancel?: (() => any) | undefined;
|
|
17
|
+
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
16
18
|
}, {}, {}>;
|
|
17
19
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
18
20
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandActionForm.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandActionForm.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CommandActionForm.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandActionForm.vue"],"names":[],"mappings":"AAyDA,iBAAS,cAAc;qBA8DM,GAAG;qBACH,GAAG;oBACJ,GAAG;EAgB9B;AACD,QAAA,MAAM,eAAe;eAjGR,OAAO;;;;;;eAAP,OAAO;;;;;UAwGlB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC;AAEN,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
|
@@ -5,7 +5,7 @@ const c = { class: "gap-3 rounded min-h-20 relative" }, b = { class: "flex gap-2
|
|
|
5
5
|
props: {
|
|
6
6
|
disabled: { type: Boolean }
|
|
7
7
|
},
|
|
8
|
-
emits: ["submit", "cancel"],
|
|
8
|
+
emits: ["submit", "cancel", "back"],
|
|
9
9
|
setup(h) {
|
|
10
10
|
return (e, t) => (i(), a("form", {
|
|
11
11
|
class: "flex w-full flex-col gap-3",
|
|
@@ -2,10 +2,12 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
|
2
2
|
modelValue?: string;
|
|
3
3
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
4
4
|
"update:modelValue": (v: string) => void;
|
|
5
|
+
onDelete: (event: KeyboardEvent) => void;
|
|
5
6
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
6
7
|
modelValue?: string;
|
|
7
8
|
}>>> & {
|
|
8
9
|
"onUpdate:modelValue"?: ((v: string) => any) | undefined;
|
|
10
|
+
onOnDelete?: ((event: KeyboardEvent) => any) | undefined;
|
|
9
11
|
}, {}, {}>;
|
|
10
12
|
export default _default;
|
|
11
13
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandActionInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandActionInput.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"CommandActionInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandActionInput.vue"],"names":[],"mappings":";iBAqDe,MAAM;;;;;iBAAN,MAAM;;;;;AA0FrB,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,42 +1,46 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { nanoid as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as f, ref as c, onMounted as h, nextTick as y, computed as v, openBlock as w, createElementBlock as V, Fragment as _, createElementVNode as a, unref as s, withDirectives as k, mergeProps as g, withKeys as x, withModifiers as D, vModelDynamic as b } from "vue";
|
|
2
|
+
import { nanoid as B } from "nanoid";
|
|
3
|
+
const M = ["for"], A = ["id"], K = /* @__PURE__ */ f({
|
|
4
4
|
inheritAttrs: !1,
|
|
5
5
|
__name: "CommandActionInput",
|
|
6
6
|
props: {
|
|
7
7
|
modelValue: {}
|
|
8
8
|
},
|
|
9
|
-
emits: ["update:modelValue"],
|
|
10
|
-
setup(
|
|
11
|
-
const
|
|
12
|
-
|
|
9
|
+
emits: ["update:modelValue", "onDelete"],
|
|
10
|
+
setup(i, { emit: d }) {
|
|
11
|
+
const m = i, l = d, r = B(), u = c(null);
|
|
12
|
+
h(() => y(() => {
|
|
13
13
|
var e;
|
|
14
|
-
return (e =
|
|
14
|
+
return (e = u.value) == null ? void 0 : e.focus();
|
|
15
15
|
}));
|
|
16
|
-
const
|
|
17
|
-
get: () =>
|
|
18
|
-
set: (e) =>
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
const o = v({
|
|
17
|
+
get: () => m.modelValue ?? "",
|
|
18
|
+
set: (e) => l("update:modelValue", e)
|
|
19
|
+
}), p = (e) => {
|
|
20
|
+
o.value === "" && l("onDelete", e);
|
|
21
|
+
};
|
|
22
|
+
return (e, t) => (w(), V(_, null, [
|
|
23
|
+
a("label", {
|
|
22
24
|
class: "absolute w-full h-full opacity-0 cursor-text",
|
|
23
|
-
for:
|
|
24
|
-
}, null, 8,
|
|
25
|
-
|
|
26
|
-
id:
|
|
25
|
+
for: s(r)
|
|
26
|
+
}, null, 8, M),
|
|
27
|
+
k(a("input", g({
|
|
28
|
+
id: s(r),
|
|
27
29
|
ref_key: "input",
|
|
28
|
-
ref:
|
|
29
|
-
"onUpdate:modelValue":
|
|
30
|
+
ref: u,
|
|
31
|
+
"onUpdate:modelValue": t[0] || (t[0] = (n) => o.value = n),
|
|
30
32
|
autocomplete: "off",
|
|
31
33
|
class: "border-transparent outline-none w-full pl-8 text-sm min-h-8 py-1.5",
|
|
32
34
|
"data-form-type": "other",
|
|
33
35
|
"data-lpignore": "true"
|
|
34
|
-
}, e.$attrs
|
|
35
|
-
[x,
|
|
36
|
+
}, e.$attrs, {
|
|
37
|
+
onKeydown: t[1] || (t[1] = x(D((n) => p(n), ["stop"]), ["delete"]))
|
|
38
|
+
}), null, 16, A), [
|
|
39
|
+
[b, o.value]
|
|
36
40
|
])
|
|
37
41
|
], 64));
|
|
38
42
|
}
|
|
39
43
|
});
|
|
40
44
|
export {
|
|
41
|
-
|
|
45
|
+
K as default
|
|
42
46
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
2
2
|
close: () => void;
|
|
3
|
+
back: (e: KeyboardEvent) => void;
|
|
3
4
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
5
|
+
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
4
6
|
onClose?: (() => any) | undefined;
|
|
5
7
|
}, {}, {}>;
|
|
6
8
|
export default _default;
|
|
@@ -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":";;;;;;;AAyPA,wBAMG"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { defineComponent as f, ref as
|
|
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
3
|
import { ScalarButton as V } from "@scalar/components";
|
|
4
|
-
import { LibraryIcon as
|
|
5
|
-
import { useToasts as
|
|
4
|
+
import { LibraryIcon as k } from "@scalar/icons";
|
|
5
|
+
import { useToasts as x } from "@scalar/use-toasts";
|
|
6
6
|
import N from "./CommandActionForm.vue.js";
|
|
7
7
|
import B from "./CommandActionInput.vue.js";
|
|
8
8
|
import { useWorkspace as S } from "../../store/store.js";
|
|
9
|
-
const
|
|
9
|
+
const z = /* @__PURE__ */ f({
|
|
10
10
|
__name: "CommandPaletteCollection",
|
|
11
|
-
emits: ["close"],
|
|
12
|
-
setup($, { emit:
|
|
13
|
-
const
|
|
14
|
-
if (!
|
|
11
|
+
emits: ["close", "back"],
|
|
12
|
+
setup($, { emit: m }) {
|
|
13
|
+
const r = m, { activeWorkspace: c, collectionMutators: u } = S(), o = i(""), a = i("interface-content-folder"), { toast: d } = x(), p = () => {
|
|
14
|
+
if (!o.value) {
|
|
15
15
|
d("Please enter a name before creating a collection.", "error");
|
|
16
16
|
return;
|
|
17
17
|
}
|
|
@@ -19,33 +19,33 @@ const y = /* @__PURE__ */ f({
|
|
|
19
19
|
{
|
|
20
20
|
openapi: "3.1.0",
|
|
21
21
|
info: {
|
|
22
|
-
title:
|
|
22
|
+
title: o.value,
|
|
23
23
|
version: "0.0.1"
|
|
24
24
|
},
|
|
25
|
-
"x-scalar-icon":
|
|
25
|
+
"x-scalar-icon": a.value
|
|
26
26
|
},
|
|
27
|
-
|
|
28
|
-
),
|
|
27
|
+
c.value.uid
|
|
28
|
+
), r("close");
|
|
29
29
|
};
|
|
30
|
-
return (I,
|
|
31
|
-
disabled: !
|
|
30
|
+
return (I, e) => (v(), b(N, {
|
|
31
|
+
disabled: !o.value.trim(),
|
|
32
32
|
onSubmit: p
|
|
33
33
|
}, {
|
|
34
|
-
options:
|
|
35
|
-
|
|
36
|
-
modelValue:
|
|
37
|
-
"onUpdate:modelValue":
|
|
34
|
+
options: l(() => [
|
|
35
|
+
n(C, {
|
|
36
|
+
modelValue: a.value,
|
|
37
|
+
"onUpdate:modelValue": e[2] || (e[2] = (t) => a.value = t),
|
|
38
38
|
placement: "bottom-start"
|
|
39
39
|
}, {
|
|
40
|
-
default:
|
|
41
|
-
|
|
40
|
+
default: l(() => [
|
|
41
|
+
n(s(V), {
|
|
42
42
|
class: "aspect-square px-0 h-auto",
|
|
43
43
|
variant: "outlined"
|
|
44
44
|
}, {
|
|
45
|
-
default:
|
|
46
|
-
|
|
45
|
+
default: l(() => [
|
|
46
|
+
n(s(k), {
|
|
47
47
|
class: "size-4 text-c-2 stroke-2",
|
|
48
|
-
src:
|
|
48
|
+
src: a.value
|
|
49
49
|
}, null, 8, ["src"])
|
|
50
50
|
]),
|
|
51
51
|
_: 1
|
|
@@ -54,15 +54,16 @@ const y = /* @__PURE__ */ f({
|
|
|
54
54
|
_: 1
|
|
55
55
|
}, 8, ["modelValue"])
|
|
56
56
|
]),
|
|
57
|
-
submit:
|
|
58
|
-
|
|
57
|
+
submit: l(() => [
|
|
58
|
+
_("Create Collection")
|
|
59
59
|
]),
|
|
60
|
-
default:
|
|
61
|
-
|
|
62
|
-
modelValue:
|
|
63
|
-
"onUpdate:modelValue":
|
|
60
|
+
default: l(() => [
|
|
61
|
+
n(B, {
|
|
62
|
+
modelValue: o.value,
|
|
63
|
+
"onUpdate:modelValue": e[0] || (e[0] = (t) => o.value = t),
|
|
64
64
|
label: "Collection Name",
|
|
65
|
-
placeholder: "Collection Name"
|
|
65
|
+
placeholder: "Collection Name",
|
|
66
|
+
onOnDelete: e[1] || (e[1] = (t) => r("back", t))
|
|
66
67
|
}, null, 8, ["modelValue"])
|
|
67
68
|
]),
|
|
68
69
|
_: 1
|
|
@@ -70,5 +71,5 @@ const y = /* @__PURE__ */ f({
|
|
|
70
71
|
}
|
|
71
72
|
});
|
|
72
73
|
export {
|
|
73
|
-
|
|
74
|
+
z as default
|
|
74
75
|
};
|
|
@@ -5,12 +5,14 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
|
5
5
|
};
|
|
6
6
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
7
|
close: () => void;
|
|
8
|
+
back: (e: KeyboardEvent) => void;
|
|
8
9
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
9
10
|
/** The request uid to pre-select */
|
|
10
11
|
metaData?: {
|
|
11
12
|
itemUid: string;
|
|
12
13
|
};
|
|
13
14
|
}>>> & {
|
|
15
|
+
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
14
16
|
onClose?: (() => any) | undefined;
|
|
15
17
|
}, {}, {}>;
|
|
16
18
|
export default _default;
|
|
@@ -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":";IAiIE,oCAAoC;eACzB;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE;;;;;IAD9B,oCAAoC;eACzB;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE;;;;;AA+RhC,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,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as y, ref as f, openBlock as u, createBlock as v, withCtx as a, createVNode as s, unref as t, createElementVNode as x, createElementBlock as N, Fragment as V, renderList as B, createTextVNode as i, toDisplayString as b } from "vue";
|
|
2
2
|
import h from "../HttpMethod/HttpMethod.vue.js";
|
|
3
3
|
import { ScalarDropdown as R, ScalarDropdownItem as W, ScalarButton as j, ScalarIcon as z } from "@scalar/components";
|
|
4
4
|
import { useToasts as I } from "@scalar/use-toasts";
|
|
@@ -6,56 +6,56 @@ import { useRouter as M } from "vue-router";
|
|
|
6
6
|
import P from "./CommandActionForm.vue.js";
|
|
7
7
|
import T from "./CommandActionInput.vue.js";
|
|
8
8
|
import { useWorkspace as U } from "../../store/store.js";
|
|
9
|
-
const F = { class: "flex items-center gap-2" }, H = { class: "max-h-40 custom-scroll" }, Z = /* @__PURE__ */
|
|
9
|
+
const F = { class: "flex items-center gap-2" }, H = { class: "max-h-40 custom-scroll" }, Z = /* @__PURE__ */ y({
|
|
10
10
|
__name: "CommandPaletteExample",
|
|
11
11
|
props: {
|
|
12
12
|
metaData: {}
|
|
13
13
|
},
|
|
14
|
-
emits: ["close"],
|
|
15
|
-
setup(
|
|
16
|
-
var
|
|
17
|
-
const
|
|
14
|
+
emits: ["close", "back"],
|
|
15
|
+
setup(k, { emit: _ }) {
|
|
16
|
+
var d;
|
|
17
|
+
const w = k, c = _, { push: C } = M(), {
|
|
18
18
|
activeRequest: S,
|
|
19
|
-
activeWorkspace:
|
|
20
|
-
activeWorkspaceRequests:
|
|
21
|
-
requests:
|
|
22
|
-
requestExampleMutators:
|
|
23
|
-
} = U(), { toast:
|
|
19
|
+
activeWorkspace: D,
|
|
20
|
+
activeWorkspaceRequests: E,
|
|
21
|
+
requests: n,
|
|
22
|
+
requestExampleMutators: $
|
|
23
|
+
} = U(), { toast: g } = I(), r = f(""), o = f(
|
|
24
24
|
// Ensure we pre-select the correct request
|
|
25
|
-
|
|
26
|
-
),
|
|
27
|
-
if (!
|
|
28
|
-
|
|
25
|
+
n[((d = w.metaData) == null ? void 0 : d.itemUid) ?? ""] ?? S.value
|
|
26
|
+
), p = (m) => o.value = m, q = () => {
|
|
27
|
+
if (!r.value) {
|
|
28
|
+
g("Please enter a name before creating an example.", "error");
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
31
|
-
const
|
|
31
|
+
const m = $.add(
|
|
32
32
|
o.value,
|
|
33
|
-
|
|
33
|
+
r.value
|
|
34
34
|
);
|
|
35
|
-
|
|
36
|
-
`/workspace/${
|
|
37
|
-
),
|
|
35
|
+
m && (C(
|
|
36
|
+
`/workspace/${D.value.uid}/request/${o.value.uid}/examples/${m.uid}`
|
|
37
|
+
), c("close"));
|
|
38
38
|
};
|
|
39
|
-
return (
|
|
40
|
-
disabled: !
|
|
41
|
-
onSubmit:
|
|
39
|
+
return (m, l) => (u(), v(P, {
|
|
40
|
+
disabled: !r.value.trim(),
|
|
41
|
+
onSubmit: q
|
|
42
42
|
}, {
|
|
43
43
|
options: a(() => [
|
|
44
|
-
|
|
44
|
+
s(t(R), {
|
|
45
45
|
placement: "bottom",
|
|
46
46
|
resize: ""
|
|
47
47
|
}, {
|
|
48
48
|
items: a(() => [
|
|
49
|
-
|
|
50
|
-
(u(!0), N(V, null, B(
|
|
51
|
-
key:
|
|
49
|
+
x("div", H, [
|
|
50
|
+
(u(!0), N(V, null, B(t(E), (e) => (u(), v(t(W), {
|
|
51
|
+
key: e,
|
|
52
52
|
class: "flex h-7 w-full items-center justify-between px-1 pr-[26px]",
|
|
53
|
-
onClick: (L) =>
|
|
53
|
+
onClick: (L) => p(t(n)[e])
|
|
54
54
|
}, {
|
|
55
55
|
default: a(() => [
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
method:
|
|
56
|
+
i(b(t(n)[e].summary) + " ", 1),
|
|
57
|
+
s(h, {
|
|
58
|
+
method: t(n)[e].method
|
|
59
59
|
}, null, 8, ["method"])
|
|
60
60
|
]),
|
|
61
61
|
_: 2
|
|
@@ -63,18 +63,18 @@ const F = { class: "flex items-center gap-2" }, H = { class: "max-h-40 custom-sc
|
|
|
63
63
|
])
|
|
64
64
|
]),
|
|
65
65
|
default: a(() => [
|
|
66
|
-
|
|
66
|
+
s(t(j), {
|
|
67
67
|
class: "justify-between p-2 max-h-8 w-full gap-1 text-xs hover:bg-b-2",
|
|
68
68
|
variant: "outlined",
|
|
69
|
-
onClick:
|
|
69
|
+
onClick: l[2] || (l[2] = (e) => p(o.value))
|
|
70
70
|
}, {
|
|
71
71
|
default: a(() => [
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
72
|
+
i(b(o.value.summary) + " ", 1),
|
|
73
|
+
x("div", F, [
|
|
74
|
+
s(h, {
|
|
75
75
|
method: o.value.method
|
|
76
76
|
}, null, 8, ["method"]),
|
|
77
|
-
|
|
77
|
+
s(t(z), {
|
|
78
78
|
class: "text-c-3",
|
|
79
79
|
icon: "ChevronDown",
|
|
80
80
|
size: "xs"
|
|
@@ -88,14 +88,15 @@ const F = { class: "flex items-center gap-2" }, H = { class: "max-h-40 custom-sc
|
|
|
88
88
|
})
|
|
89
89
|
]),
|
|
90
90
|
submit: a(() => [
|
|
91
|
-
|
|
91
|
+
i("Create Example")
|
|
92
92
|
]),
|
|
93
93
|
default: a(() => [
|
|
94
|
-
|
|
95
|
-
modelValue:
|
|
96
|
-
"onUpdate:modelValue":
|
|
94
|
+
s(T, {
|
|
95
|
+
modelValue: r.value,
|
|
96
|
+
"onUpdate:modelValue": l[0] || (l[0] = (e) => r.value = e),
|
|
97
97
|
label: "Example Name",
|
|
98
|
-
placeholder: "Example Name"
|
|
98
|
+
placeholder: "Example Name",
|
|
99
|
+
onOnDelete: l[1] || (l[1] = (e) => c("back", e))
|
|
99
100
|
}, null, 8, ["modelValue"])
|
|
100
101
|
]),
|
|
101
102
|
_: 1
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
2
2
|
close: () => void;
|
|
3
|
+
back: (e: KeyboardEvent) => void;
|
|
3
4
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
5
|
+
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
4
6
|
onClose?: (() => any) | undefined;
|
|
5
7
|
}, {}, {}>;
|
|
6
8
|
export default _default;
|
|
@@ -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":";;;;;;;AA6RA,wBAMG"}
|
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
import { defineComponent as w, ref as
|
|
2
|
-
import { ScalarButton as
|
|
3
|
-
import { useToasts as
|
|
4
|
-
import
|
|
1
|
+
import { defineComponent as w, ref as b, openBlock as F, createBlock as h, withCtx as l, createVNode as c, unref as i, createTextVNode as p } from "vue";
|
|
2
|
+
import { ScalarButton as y, ScalarIcon as C } from "@scalar/components";
|
|
3
|
+
import { useToasts as I } from "@scalar/use-toasts";
|
|
4
|
+
import U from "./CommandActionForm.vue.js";
|
|
5
5
|
import V from "./CommandActionInput.vue.js";
|
|
6
6
|
import { useFileDialog as R } from "../../hooks/useFileDialog.js";
|
|
7
7
|
import { useWorkspace as $ } from "../../store/store.js";
|
|
8
|
-
const
|
|
8
|
+
const O = /* @__PURE__ */ w({
|
|
9
9
|
__name: "CommandPaletteImport",
|
|
10
|
-
emits: ["close"],
|
|
10
|
+
emits: ["close", "back"],
|
|
11
11
|
setup(A, { emit: u }) {
|
|
12
|
-
const
|
|
12
|
+
const n = u, { activeWorkspace: f, importSpecFile: d, importSpecFromUrl: g } = $(), r = b(""), { toast: a } = I(), { open: k } = R({
|
|
13
13
|
onChange: async (e) => {
|
|
14
14
|
const o = e == null ? void 0 : e[0];
|
|
15
15
|
if (o) {
|
|
16
|
-
const
|
|
17
|
-
|
|
16
|
+
const t = new FileReader();
|
|
17
|
+
t.onload = async (S) => {
|
|
18
18
|
var m;
|
|
19
|
-
const
|
|
19
|
+
const _ = (m = S.target) == null ? void 0 : m.result;
|
|
20
20
|
try {
|
|
21
|
-
await d(
|
|
21
|
+
await d(_, f.value.uid), a("Import successful", "info"), n("close");
|
|
22
22
|
} catch (s) {
|
|
23
23
|
console.error(s);
|
|
24
24
|
const v = (s == null ? void 0 : s.message) || "Unknown error";
|
|
25
|
-
|
|
25
|
+
a(`Import failed: ${v}`, "error");
|
|
26
26
|
}
|
|
27
|
-
},
|
|
27
|
+
}, t.readAsText(o);
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
multiple: !1,
|
|
31
31
|
accept: ".json,.yaml,.yml"
|
|
32
32
|
}), x = async () => {
|
|
33
|
-
if (
|
|
33
|
+
if (r.value)
|
|
34
34
|
try {
|
|
35
|
-
await g(
|
|
35
|
+
await g(r.value), a("Import successful", "info"), n("close");
|
|
36
36
|
} catch (e) {
|
|
37
37
|
console.error("the error ", e);
|
|
38
38
|
const o = (e == null ? void 0 : e.message) || "Unknown error";
|
|
39
|
-
|
|
39
|
+
a(`Import failed: ${o}`, "error");
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
|
-
return (e, o) => (F(),
|
|
42
|
+
return (e, o) => (F(), h(U, { onSubmit: x }, {
|
|
43
43
|
options: l(() => [
|
|
44
|
-
|
|
44
|
+
c(i(y), {
|
|
45
45
|
class: "p-2 max-h-8 gap-1 text-xs hover:bg-b-2 relative",
|
|
46
46
|
variant: "outlined",
|
|
47
|
-
onClick:
|
|
47
|
+
onClick: i(k)
|
|
48
48
|
}, {
|
|
49
49
|
default: l(() => [
|
|
50
50
|
p(" JSON, or YAML Files "),
|
|
51
|
-
|
|
51
|
+
c(i(C), {
|
|
52
52
|
class: "text-c-3 -rotate-90",
|
|
53
53
|
icon: "ArrowRight",
|
|
54
54
|
size: "sm"
|
|
@@ -61,11 +61,12 @@ const W = /* @__PURE__ */ w({
|
|
|
61
61
|
p("Import Collection")
|
|
62
62
|
]),
|
|
63
63
|
default: l(() => [
|
|
64
|
-
|
|
65
|
-
modelValue:
|
|
66
|
-
"onUpdate:modelValue": o[0] || (o[0] = (
|
|
64
|
+
c(V, {
|
|
65
|
+
modelValue: r.value,
|
|
66
|
+
"onUpdate:modelValue": o[0] || (o[0] = (t) => r.value = t),
|
|
67
67
|
label: "Paste Swagger File URL",
|
|
68
|
-
placeholder: "Paste Swagger File URL"
|
|
68
|
+
placeholder: "Paste Swagger File URL",
|
|
69
|
+
onOnDelete: o[1] || (o[1] = (t) => n("back", t))
|
|
69
70
|
}, null, 8, ["modelValue"])
|
|
70
71
|
]),
|
|
71
72
|
_: 1
|
|
@@ -73,5 +74,5 @@ const W = /* @__PURE__ */ w({
|
|
|
73
74
|
}
|
|
74
75
|
});
|
|
75
76
|
export {
|
|
76
|
-
|
|
77
|
+
O as default
|
|
77
78
|
};
|
|
@@ -5,12 +5,14 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
|
5
5
|
};
|
|
6
6
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
7
|
close: () => void;
|
|
8
|
+
back: (e: KeyboardEvent) => void;
|
|
8
9
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
9
10
|
metaData?: {
|
|
10
11
|
itemUid: string;
|
|
11
12
|
parentUid: string;
|
|
12
13
|
};
|
|
13
14
|
}>>> & {
|
|
15
|
+
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
14
16
|
onClose?: (() => any) | undefined;
|
|
15
17
|
}, {}, {}>;
|
|
16
18
|
export default _default;
|
|
@@ -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":";eAkMa;QACT,OAAO,EAAE,MAAM,CAAA;QACf,SAAS,EAAE,MAAM,CAAA;KAClB;;;;;eAHU;QACT,OAAO,EAAE,MAAM,CAAA;QACf,SAAS,EAAE,MAAM,CAAA;KAClB;;;;;AAqVH,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"}
|