@scalar/api-client 2.1.10 → 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 +39 -0
- package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarServer.vue.js +18 -18
- 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/router.js +1 -1
- 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/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 +82 -88
- 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 +106 -97
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +26 -26
- 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 +13 -8
- package/dist/views/Components/Schemas/Schemas.vue.d.ts +0 -3
- package/dist/views/Components/Schemas/Schemas.vue.d.ts.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,44 @@
|
|
|
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
|
+
|
|
27
|
+
## 2.1.11
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- 9b010e6: fix: force show servers when not in read only mode
|
|
32
|
+
- d8baf4e: feat: sets draft collection icon
|
|
33
|
+
- 8554e60: fix: add proper scalar version in ascii preview
|
|
34
|
+
- b4d1e1b: fix: remove stray hello world html
|
|
35
|
+
- d9ff13e: fix: updates empty sidebar content
|
|
36
|
+
- Updated dependencies [d8baf4e]
|
|
37
|
+
- Updated dependencies [9057781]
|
|
38
|
+
- @scalar/components@0.12.49
|
|
39
|
+
- @scalar/oas-utils@0.2.50
|
|
40
|
+
- @scalar/use-codemirror@0.11.15
|
|
41
|
+
|
|
3
42
|
## 2.1.10
|
|
4
43
|
|
|
5
44
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddressBarServer.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBarServer.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"AddressBarServer.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBarServer.vue"],"names":[],"mappings":";AAiZA,wBAKG"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as U, computed as u, watch as O,
|
|
2
|
-
import { ScalarDropdown as V, ScalarDropdownDivider as
|
|
3
|
-
import
|
|
1
|
+
import { defineComponent as U, computed as u, watch as O, unref as s, openBlock as l, createBlock as h, withCtx as _, createElementBlock as n, createCommentVNode as v, Fragment as m, renderList as b, createVNode as p, createElementVNode as c, withModifiers as R, toDisplayString as C } from "vue";
|
|
2
|
+
import { ScalarDropdown as V, ScalarDropdownDivider as D, ScalarDropdownItem as W, ScalarIcon as E } from "@scalar/components";
|
|
3
|
+
import A from "./AddressBarServerItem.vue.js";
|
|
4
4
|
import { useWorkspace as I } from "../../store/store.js";
|
|
5
5
|
import { commandPaletteBus as L } from "../../libs/event-busses/command-palette-bus.js";
|
|
6
6
|
const M = {
|
|
@@ -16,8 +16,8 @@ const M = {
|
|
|
16
16
|
activeRequest: S,
|
|
17
17
|
activeCollection: k,
|
|
18
18
|
activeServer: x,
|
|
19
|
-
isReadOnly:
|
|
20
|
-
servers:
|
|
19
|
+
isReadOnly: w,
|
|
20
|
+
servers: y,
|
|
21
21
|
collectionMutators: B
|
|
22
22
|
} = I(), i = u(
|
|
23
23
|
() => {
|
|
@@ -26,7 +26,7 @@ const M = {
|
|
|
26
26
|
var o;
|
|
27
27
|
return {
|
|
28
28
|
id: r,
|
|
29
|
-
label: ((o =
|
|
29
|
+
label: ((o = y[r]) == null ? void 0 : o.url) ?? "Unknown server"
|
|
30
30
|
};
|
|
31
31
|
});
|
|
32
32
|
}
|
|
@@ -37,11 +37,11 @@ const M = {
|
|
|
37
37
|
var o;
|
|
38
38
|
return {
|
|
39
39
|
id: r,
|
|
40
|
-
label: ((o =
|
|
40
|
+
label: ((o = y[r]) == null ? void 0 : o.url) ?? "Unknown server"
|
|
41
41
|
};
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
|
-
),
|
|
44
|
+
), g = u(
|
|
45
45
|
() => {
|
|
46
46
|
var t, e;
|
|
47
47
|
return ((t = i.value) == null ? void 0 : t.length) && ((e = d.value) == null ? void 0 : e.length);
|
|
@@ -62,28 +62,28 @@ const M = {
|
|
|
62
62
|
});
|
|
63
63
|
return (t, e) => {
|
|
64
64
|
var r, o;
|
|
65
|
-
return i.value && ((r = i.value) == null ? void 0 : r.length) > 1 || d.value && ((o = d.value) == null ? void 0 : o.length) > 1 ? (l(), h(s(V), {
|
|
65
|
+
return !s(w) || i.value && ((r = i.value) == null ? void 0 : r.length) > 1 || d.value && ((o = d.value) == null ? void 0 : o.length) > 1 ? (l(), h(s(V), {
|
|
66
66
|
key: 0,
|
|
67
67
|
teleport: ".scalar-client"
|
|
68
68
|
}, {
|
|
69
69
|
items: _(() => [
|
|
70
|
-
|
|
71
|
-
(l(!0), n(m, null,
|
|
70
|
+
g.value ? (l(), n("div", M, " Request Servers ")) : v("", !0),
|
|
71
|
+
(l(!0), n(m, null, b(i.value, (a) => (l(), h(A, {
|
|
72
72
|
key: a.id,
|
|
73
73
|
serverOption: a,
|
|
74
74
|
type: "request"
|
|
75
75
|
}, null, 8, ["serverOption"]))), 128)),
|
|
76
|
-
|
|
77
|
-
p(s(
|
|
76
|
+
g.value ? (l(), n(m, { key: 1 }, [
|
|
77
|
+
p(s(D)),
|
|
78
78
|
j
|
|
79
79
|
], 64)) : v("", !0),
|
|
80
|
-
(l(!0), n(m, null,
|
|
80
|
+
(l(!0), n(m, null, b(d.value, (a) => (l(), h(A, {
|
|
81
81
|
key: a.id,
|
|
82
82
|
serverOption: a,
|
|
83
83
|
type: "collection"
|
|
84
84
|
}, null, 8, ["serverOption"]))), 128)),
|
|
85
|
-
s(
|
|
86
|
-
p(s(
|
|
85
|
+
s(w) ? v("", !0) : (l(), n(m, { key: 2 }, [
|
|
86
|
+
p(s(D)),
|
|
87
87
|
p(s(W), null, {
|
|
88
88
|
default: _(() => [
|
|
89
89
|
c("div", {
|
|
@@ -109,10 +109,10 @@ const M = {
|
|
|
109
109
|
type: "button",
|
|
110
110
|
onClick: e[0] || (e[0] = R(() => {
|
|
111
111
|
}, ["stop"]))
|
|
112
|
-
},
|
|
112
|
+
}, C(f.value), 1)
|
|
113
113
|
]),
|
|
114
114
|
_: 1
|
|
115
|
-
})) : f.value ? (l(), n("div", P,
|
|
115
|
+
})) : f.value ? (l(), n("div", P, C(f.value), 1)) : v("", !0);
|
|
116
116
|
};
|
|
117
117
|
}
|
|
118
118
|
});
|
|
@@ -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"}
|