@scalar/api-client 2.2.56 → 2.2.59
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 +69 -0
- 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 +53 -54
- package/dist/components/CodeInput/CodeInput.vue.d.ts +1 -1
- 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 +93 -81
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +5 -19
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +154 -129
- package/dist/components/DataTable/DataTableInput.vue.d.ts +4 -4
- package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarToggle.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarToggle.vue.js +17 -16
- package/dist/layouts/App/create-api-client-app.d.ts +75 -55
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +146 -106
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.js +1 -2
- package/dist/layouts/Web/create-api-client-web.d.ts +75 -55
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +76 -60
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +82 -80
- package/dist/libs/extractAttachmentFilename.d.ts.map +1 -1
- package/dist/libs/extractAttachmentFilename.js +8 -7
- package/dist/libs/find-request.d.ts +2 -1
- package/dist/libs/find-request.d.ts.map +1 -1
- package/dist/libs/hot-keys.d.ts +1 -1
- package/dist/libs/hot-keys.d.ts.map +1 -1
- package/dist/libs/hot-keys.js +9 -8
- package/dist/libs/send-request/create-request-operation.test.d.ts +4 -2
- package/dist/libs/send-request/create-request-operation.test.d.ts.map +1 -1
- package/dist/store/active-entities.d.ts +5 -3
- package/dist/store/active-entities.d.ts.map +1 -1
- package/dist/store/import-spec.d.ts +3 -3
- package/dist/store/import-spec.d.ts.map +1 -1
- package/dist/store/import-spec.js +4 -1
- package/dist/store/request-example.d.ts +22 -12
- package/dist/store/request-example.d.ts.map +1 -1
- package/dist/store/requests.d.ts +26 -15
- package/dist/store/requests.d.ts.map +1 -1
- package/dist/store/security-schemes.d.ts +6 -6
- package/dist/store/store.d.ts +104 -69
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/store.js +12 -12
- package/dist/store/workspace.d.ts +12 -12
- package/dist/store/workspace.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 +2 -2
- package/dist/views/Request/RequestRoot.test.d.ts +2 -0
- package/dist/views/Request/RequestRoot.test.d.ts.map +1 -0
- 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 +72 -60
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/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 +3 -3
- package/dist/views/Request/RequestSection/RequestBody.vue2.js +113 -107
- 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 +37 -37
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue2.js +55 -51
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.js +2 -2
- package/dist/views/Request/RequestSidebar.vue2.js +171 -166
- 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 +187 -180
- 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 +41 -49
- 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 +62 -45
- package/package.json +13 -13
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts +0 -15
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +0 -1
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +0 -176
- package/dist/components/CommandPalette/CommandPaletteRequest.vue2.js +0 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,74 @@
|
|
|
1
1
|
# @scalar/api-client
|
|
2
2
|
|
|
3
|
+
## 2.2.59
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 168e609: fix: body showing none instead of json
|
|
8
|
+
- Updated dependencies [3f99afc]
|
|
9
|
+
- Updated dependencies [bab7990]
|
|
10
|
+
- Updated dependencies [2c621d4]
|
|
11
|
+
- Updated dependencies [a31973c]
|
|
12
|
+
- @scalar/components@0.13.31
|
|
13
|
+
- @scalar/types@0.0.39
|
|
14
|
+
- @scalar/snippetz@0.2.16
|
|
15
|
+
- @scalar/oas-utils@0.2.113
|
|
16
|
+
- @scalar/use-codemirror@0.11.76
|
|
17
|
+
- @scalar/openapi-parser@0.10.9
|
|
18
|
+
- @scalar/themes@0.9.74
|
|
19
|
+
- @scalar/import@0.2.33
|
|
20
|
+
- @scalar/postman-to-openapi@0.1.36
|
|
21
|
+
- @scalar/use-hooks@0.1.28
|
|
22
|
+
|
|
23
|
+
## 2.2.58
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- 4682a6f: fix: add keyboard instructions for code inputs
|
|
28
|
+
- Updated dependencies [7f1a40e]
|
|
29
|
+
- @scalar/types@0.0.38
|
|
30
|
+
- @scalar/oas-utils@0.2.112
|
|
31
|
+
- @scalar/openapi-parser@0.10.9
|
|
32
|
+
- @scalar/themes@0.9.73
|
|
33
|
+
- @scalar/import@0.2.32
|
|
34
|
+
- @scalar/postman-to-openapi@0.1.35
|
|
35
|
+
- @scalar/components@0.13.30
|
|
36
|
+
- @scalar/use-codemirror@0.11.75
|
|
37
|
+
- @scalar/use-hooks@0.1.27
|
|
38
|
+
|
|
39
|
+
## 2.2.57
|
|
40
|
+
|
|
41
|
+
### Patch Changes
|
|
42
|
+
|
|
43
|
+
- 89d8b75: feat: new ApiReferenceConfiguration type
|
|
44
|
+
- 8c0e147: feat: updates request creation flow
|
|
45
|
+
- 8a04b8d: fix: mime type transformation issue
|
|
46
|
+
- b93b22f: fix(api-client): improve api client sidebar and address bar a11y
|
|
47
|
+
- 73513d3: fix: handle utf-8 encoded file names for content-disposition header
|
|
48
|
+
- 51b7c5c: fix: updates request table form style and logic"
|
|
49
|
+
- 8a04b8d: fix: adds vendor specific mime type support
|
|
50
|
+
- Updated dependencies [89d8b75]
|
|
51
|
+
- Updated dependencies [8a04b8d]
|
|
52
|
+
- Updated dependencies [1459ce7]
|
|
53
|
+
- Updated dependencies [479a2ef]
|
|
54
|
+
- Updated dependencies [8a04b8d]
|
|
55
|
+
- @scalar/oas-utils@0.2.111
|
|
56
|
+
- @scalar/themes@0.9.72
|
|
57
|
+
- @scalar/types@0.0.37
|
|
58
|
+
- @scalar/components@0.13.29
|
|
59
|
+
- @scalar/import@0.2.31
|
|
60
|
+
- @scalar/postman-to-openapi@0.1.34
|
|
61
|
+
- @scalar/use-codemirror@0.11.74
|
|
62
|
+
- @scalar/use-hooks@0.1.26
|
|
63
|
+
- @scalar/openapi-parser@0.10.9
|
|
64
|
+
- @scalar/draggable@0.1.11
|
|
65
|
+
- @scalar/icons@0.1.3
|
|
66
|
+
- @scalar/object-utils@1.1.13
|
|
67
|
+
- @scalar/openapi-types@0.1.9
|
|
68
|
+
- @scalar/snippetz@0.2.15
|
|
69
|
+
- @scalar/use-toasts@0.7.9
|
|
70
|
+
- @scalar/use-tooltip@1.0.6
|
|
71
|
+
|
|
3
72
|
## 2.2.56
|
|
4
73
|
|
|
5
74
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddressBarHistory.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBarHistory.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AddressBarHistory.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBarHistory.vue"],"names":[],"mappings":"AAmJA,OAAO,KAAK,EAAE,SAAS,EAAgB,MAAM,iCAAiC,CAAA;AAc9E,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,SAAS,CAAA;IACpB,qEAAqE;IACrE,MAAM,EAAE,MAAM,CAAA;CACf,CAAC;;AAiQF,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./AddressBarHistory.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const a = /* @__PURE__ */ r(o, [["__scopeId", "data-v-50597ffd"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default
|
|
7
7
|
};
|
|
@@ -1,94 +1,93 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import { ScalarFloating as
|
|
4
|
-
import { httpStatusCodes as
|
|
1
|
+
import { defineComponent as _, computed as y, openBlock as a, createBlock as i, unref as e, withCtx as o, createVNode as l, createSlots as S, createElementVNode as r, createCommentVNode as h, normalizeStyle as b, createElementBlock as M, Fragment as B, renderList as H, toDisplayString as c, normalizeClass as w } from "vue";
|
|
2
|
+
import { Menu as z, MenuButton as I, MenuItems as E, MenuItem as F } from "@headlessui/vue";
|
|
3
|
+
import { ScalarFloating as N, ScalarIcon as U, ScalarFloatingBackdrop as V } from "@scalar/components";
|
|
4
|
+
import { httpStatusCodes as R } from "@scalar/oas-utils/helpers";
|
|
5
5
|
import { useRouter as W } from "vue-router";
|
|
6
6
|
import { formatMs as A } from "../../libs/formatters.js";
|
|
7
|
-
import { PathId as
|
|
7
|
+
import { PathId as g } from "../../routes.js";
|
|
8
8
|
import D from "../HttpMethod/HttpMethod.vue.js";
|
|
9
|
-
import { getStatusCodeColor as
|
|
10
|
-
import { useWorkspace as
|
|
11
|
-
const
|
|
9
|
+
import { getStatusCodeColor as L } from "./httpStatusCodeColors.js";
|
|
10
|
+
import { useWorkspace as P } from "../../store/store.js";
|
|
11
|
+
const $ = { class: "min-w-0" }, j = { class: "text-c-1 min-w-0 truncate" }, te = /* @__PURE__ */ _({
|
|
12
12
|
__name: "AddressBarHistory",
|
|
13
13
|
props: {
|
|
14
14
|
operation: {},
|
|
15
15
|
target: {}
|
|
16
16
|
},
|
|
17
|
-
setup(
|
|
18
|
-
const { requestHistory:
|
|
19
|
-
() =>
|
|
17
|
+
setup(m) {
|
|
18
|
+
const { requestHistory: k, requestExampleMutators: v } = P(), p = W(), f = y(
|
|
19
|
+
() => k.filter((s) => s.request.requestUid === m.operation.uid).slice().reverse()
|
|
20
20
|
);
|
|
21
|
-
function
|
|
22
|
-
const
|
|
23
|
-
|
|
21
|
+
function x(s) {
|
|
22
|
+
const n = p.currentRoute.value.params.workspace;
|
|
23
|
+
m.operation.uid !== s.request.requestUid && p.push({
|
|
24
24
|
name: "request",
|
|
25
25
|
params: {
|
|
26
|
-
[
|
|
27
|
-
[
|
|
26
|
+
[g.Workspace]: n,
|
|
27
|
+
[g.Request]: s.request.requestUid
|
|
28
28
|
}
|
|
29
|
-
}),
|
|
29
|
+
}), v.set({ ...s.request });
|
|
30
30
|
}
|
|
31
|
-
return (
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}, {
|
|
35
|
-
default: r(({ open: m }) => [
|
|
36
|
-
u(e(M), {
|
|
31
|
+
return (s, n) => (a(), i(e(z), { as: "div" }, {
|
|
32
|
+
default: o(({ open: q }) => [
|
|
33
|
+
l(e(N), {
|
|
37
34
|
offset: 0,
|
|
38
35
|
resize: "",
|
|
39
|
-
target:
|
|
40
|
-
},
|
|
41
|
-
default:
|
|
42
|
-
var
|
|
36
|
+
target: s.target
|
|
37
|
+
}, S({
|
|
38
|
+
default: o(() => {
|
|
39
|
+
var u;
|
|
43
40
|
return [
|
|
44
|
-
(
|
|
41
|
+
(u = f.value) != null && u.length ? (a(), i(e(I), {
|
|
45
42
|
key: 0,
|
|
46
|
-
class: "address-bar-history-button z-context-plus text-c-3 focus:text-c-1 mr-1 rounded-lg p-1.5"
|
|
43
|
+
class: "address-bar-history-button z-context-plus text-c-3 focus:text-c-1 relative mr-1 rounded-lg p-1.5"
|
|
47
44
|
}, {
|
|
48
|
-
default:
|
|
49
|
-
|
|
45
|
+
default: o(() => [
|
|
46
|
+
l(e(U), {
|
|
50
47
|
icon: "History",
|
|
51
48
|
size: "sm",
|
|
52
49
|
thickness: "2.25"
|
|
53
50
|
}),
|
|
54
|
-
|
|
51
|
+
n[0] || (n[0] = r("span", { class: "sr-only" }, "Request History", -1))
|
|
55
52
|
]),
|
|
56
53
|
_: 1
|
|
57
|
-
})) :
|
|
54
|
+
})) : h("", !0)
|
|
58
55
|
];
|
|
59
56
|
}),
|
|
60
57
|
_: 2
|
|
61
58
|
}, [
|
|
62
|
-
|
|
59
|
+
q ? {
|
|
63
60
|
name: "floating",
|
|
64
|
-
fn:
|
|
65
|
-
|
|
61
|
+
fn: o(({ width: u }) => [
|
|
62
|
+
l(e(E), {
|
|
66
63
|
class: "custom-scroll p-0.75 grid max-h-[inherit] grid-cols-[44px,1fr,repeat(3,auto)] items-center border-t",
|
|
67
|
-
|
|
64
|
+
static: "",
|
|
65
|
+
style: b({ width: u })
|
|
68
66
|
}, {
|
|
69
|
-
default:
|
|
70
|
-
(
|
|
67
|
+
default: o(() => [
|
|
68
|
+
(a(!0), M(B, null, H(f.value, (t, C) => (a(), i(e(F), {
|
|
71
69
|
key: t.timestamp,
|
|
70
|
+
as: "button",
|
|
72
71
|
class: "font-code *:ui-active:bg-b-2 text-c-2 contents text-sm font-medium *:flex *:h-8 *:cursor-pointer *:items-center *:rounded-none *:px-1.5 first:*:rounded-l last:*:rounded-r",
|
|
73
72
|
value: C,
|
|
74
|
-
onClick: (
|
|
73
|
+
onClick: (d) => x(t)
|
|
75
74
|
}, {
|
|
76
|
-
default:
|
|
77
|
-
var
|
|
75
|
+
default: o(() => {
|
|
76
|
+
var d;
|
|
78
77
|
return [
|
|
79
|
-
t.response.method ? (
|
|
78
|
+
t.response.method ? (a(), i(D, {
|
|
80
79
|
key: 0,
|
|
81
80
|
class: "text-[11px]",
|
|
82
81
|
method: t.response.method
|
|
83
|
-
}, null, 8, ["method"])) :
|
|
84
|
-
|
|
85
|
-
|
|
82
|
+
}, null, 8, ["method"])) : h("", !0),
|
|
83
|
+
r("div", $, [
|
|
84
|
+
r("div", j, c(t.response.path), 1)
|
|
86
85
|
]),
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
class:
|
|
90
|
-
},
|
|
91
|
-
|
|
86
|
+
r("div", null, c(e(A)(t.response.duration)), 1),
|
|
87
|
+
r("div", {
|
|
88
|
+
class: w([e(L)(t.response.status).color])
|
|
89
|
+
}, c(t.response.status), 3),
|
|
90
|
+
r("div", null, c((d = e(R)[t.response.status]) == null ? void 0 : d.name), 1)
|
|
92
91
|
];
|
|
93
92
|
}),
|
|
94
93
|
_: 2
|
|
@@ -96,16 +95,16 @@ const j = { class: "min-w-0" }, G = { class: "text-c-1 min-w-0 truncate" }, se =
|
|
|
96
95
|
]),
|
|
97
96
|
_: 2
|
|
98
97
|
}, 1032, ["style"]),
|
|
99
|
-
|
|
98
|
+
l(e(V), { class: "-top-[--scalar-address-bar-height] rounded-lg" })
|
|
100
99
|
]),
|
|
101
100
|
key: "0"
|
|
102
101
|
} : void 0
|
|
103
102
|
]), 1032, ["target"])
|
|
104
103
|
]),
|
|
105
104
|
_: 1
|
|
106
|
-
}
|
|
105
|
+
}));
|
|
107
106
|
}
|
|
108
107
|
});
|
|
109
108
|
export {
|
|
110
|
-
|
|
109
|
+
te as default
|
|
111
110
|
};
|
|
@@ -69,8 +69,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
69
69
|
onBlur?: (v: string) => any;
|
|
70
70
|
onCurl?: (v: string) => any;
|
|
71
71
|
}>, {
|
|
72
|
-
disabled: boolean;
|
|
73
72
|
nullable: boolean;
|
|
73
|
+
disabled: boolean;
|
|
74
74
|
colorPicker: boolean;
|
|
75
75
|
emitOnBlur: boolean;
|
|
76
76
|
disableTabIndent: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodeInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/CodeInput.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CodeInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/CodeInput.vue"],"names":[],"mappings":"AA6fA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AAC3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AAEzE,OAAO,EAIL,KAAK,kBAAkB,EAExB,MAAM,wBAAwB,CAAA;AAM/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;;kBAYxC,OAAO;eACV,OAAO;gBACN,MAAM,GAAG,MAAM;YACnB,OAAO;iBACF,OAAO;kBACN,OAAO;WACd,OAAO;uBACK,OAAO;eACf,kBAAkB;wBACT,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;wBACnB,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;kBACzB,MAAM;eACT,OAAO;mBACH,OAAO;2BACC,OAAO;WACvB,MAAM,EAAE;eACJ,MAAM,EAAE;WACZ,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS;eACzB,OAAO;oBACF,OAAO;iBACV,OAAO;iBACP,OAAO;cACV,MAAM,GAAG,MAAM;iBACZ,WAAW;kBACV,WAAW,EAAE;eAChB,SAAS;;;;;;;;;kBAzBN,OAAO;eACV,OAAO;gBACN,MAAM,GAAG,MAAM;YACnB,OAAO;iBACF,OAAO;kBACN,OAAO;WACd,OAAO;uBACK,OAAO;eACf,kBAAkB;wBACT,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;wBACnB,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;kBACzB,MAAM;eACT,OAAO;mBACH,OAAO;2BACC,OAAO;WACvB,MAAM,EAAE;eACJ,MAAM,EAAE;WACZ,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS;eACzB,OAAO;oBACF,OAAO;iBACV,OAAO;iBACP,OAAO;cACV,MAAM,GAAG,MAAM;iBACZ,WAAW;kBACV,WAAW,EAAE;eAChB,SAAS;;;;;;;cAPT,OAAO;cAjBP,OAAO;iBADJ,OAAO;gBAIR,OAAO;sBAGD,OAAO;kBAMX,OAAO;0BACC,OAAO;mBAKd,OAAO;gBAEV,OAAO;;qBA4fM,GAAG;kBACN,GAAG;;AArhB9B,wBAglBC;AAeD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -2,7 +2,7 @@ import o from "./CodeInput.vue2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
-
const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
5
|
+
const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-082b146a"]]);
|
|
6
6
|
export {
|
|
7
7
|
_ as default
|
|
8
8
|
};
|
|
@@ -1,26 +1,30 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarIcon as
|
|
3
|
-
import { prettyPrintJson as
|
|
4
|
-
import { useCodeMirror as
|
|
5
|
-
import { useClipboard as
|
|
6
|
-
import { nanoid as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { pillPlugin as
|
|
10
|
-
import { useLayout as
|
|
11
|
-
const
|
|
1
|
+
import { defineComponent as H, useAttrs as J, ref as i, toRef as r, watch as Q, computed as $, openBlock as n, createElementBlock as u, Fragment as W, normalizeClass as G, unref as d, createElementVNode as m, toDisplayString as X, createBlock as y, mergeProps as Y, withKeys as g, withModifiers as q, createVNode as Z, createCommentVNode as f, createTextVNode as V, renderSlot as E } from "vue";
|
|
2
|
+
import { ScalarIcon as _ } from "@scalar/components";
|
|
3
|
+
import { prettyPrintJson as ee } from "@scalar/oas-utils/helpers";
|
|
4
|
+
import { useCodeMirror as oe, useDropdown as te, colorPicker as le } from "@scalar/use-codemirror";
|
|
5
|
+
import { useClipboard as ne } from "@scalar/use-hooks/useClipboard";
|
|
6
|
+
import { nanoid as ae } from "nanoid";
|
|
7
|
+
import re from "../../views/Environment/EnvironmentVariableDropdown.vue.js";
|
|
8
|
+
import k from "../DataTable/DataTableInputSelect.vue.js";
|
|
9
|
+
import { pillPlugin as se, backspaceCommand as ue } from "./codeVariableWidget.js";
|
|
10
|
+
import { useLayout as de } from "../../hooks/useLayout.js";
|
|
11
|
+
const ie = { class: "whitespace-nowrap" }, pe = ["id"], me = {
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "scalar-code-copy z-context"
|
|
14
|
-
},
|
|
14
|
+
}, fe = {
|
|
15
|
+
key: 1,
|
|
16
|
+
class: "z-context text-c-2 absolute bottom-1 right-1.5 hidden font-sans group-has-[:focus-visible]/input:block",
|
|
17
|
+
role: "alert"
|
|
18
|
+
}, ce = {
|
|
15
19
|
key: 5,
|
|
16
20
|
class: "centered-y text-orange absolute right-7 text-xs"
|
|
17
|
-
},
|
|
21
|
+
}, be = {
|
|
18
22
|
key: 6,
|
|
19
23
|
class: "required centered-y text-xxs text-c-3 group-[.error]:text-red bg-b-1 pointer-events-none absolute right-0 pr-2 pt-px opacity-100 shadow-[-8px_0_4px_var(--scalar-background-1)] transition-opacity duration-150 group-[.alert]:bg-transparent group-[.error]:bg-transparent group-[.alert]:shadow-none group-[.error]:shadow-none peer-has-[.cm-focused]:opacity-0"
|
|
20
|
-
},
|
|
24
|
+
}, ye = {
|
|
21
25
|
inheritAttrs: !1
|
|
22
|
-
},
|
|
23
|
-
...
|
|
26
|
+
}, Pe = /* @__PURE__ */ H({
|
|
27
|
+
...ye,
|
|
24
28
|
__name: "CodeInput",
|
|
25
29
|
props: {
|
|
26
30
|
colorPicker: { type: Boolean, default: !1 },
|
|
@@ -51,12 +55,12 @@ const de = { class: "whitespace-nowrap" }, ie = ["id"], pe = {
|
|
|
51
55
|
workspace: {}
|
|
52
56
|
},
|
|
53
57
|
emits: ["submit", "update:modelValue", "curl", "blur"],
|
|
54
|
-
setup(
|
|
55
|
-
var
|
|
56
|
-
const o =
|
|
57
|
-
function
|
|
58
|
-
var
|
|
59
|
-
return e === o.modelValue ? null : o.importCurl && e.trim().toLowerCase().startsWith("curl") ? (s("curl", e), (
|
|
58
|
+
setup(I, { expose: N, emit: R }) {
|
|
59
|
+
var T;
|
|
60
|
+
const o = I, s = R, C = J(), A = C.id || `id-${ae()}`, B = i(!1), v = i(!1), x = i(""), S = i({ left: 0, top: 0 }), c = i(null), { layout: w } = de(), { copyToClipboard: M } = ne();
|
|
61
|
+
function O(e) {
|
|
62
|
+
var t;
|
|
63
|
+
return e === o.modelValue ? null : o.importCurl && e.trim().toLowerCase().startsWith("curl") ? (s("curl", e), (t = a.value) == null || t.dispatch({
|
|
60
64
|
changes: {
|
|
61
65
|
from: 0,
|
|
62
66
|
to: a.value.state.doc.length,
|
|
@@ -64,31 +68,31 @@ const de = { class: "whitespace-nowrap" }, ie = ["id"], pe = {
|
|
|
64
68
|
}
|
|
65
69
|
}), null) : o.handleFieldChange ? o.handleFieldChange(e) : s("update:modelValue", e);
|
|
66
70
|
}
|
|
67
|
-
function
|
|
71
|
+
function P(e) {
|
|
68
72
|
return o.handleFieldSubmit ? o.handleFieldSubmit(e) : s("submit", e);
|
|
69
73
|
}
|
|
70
|
-
function
|
|
71
|
-
B.value = !1, o.emitOnBlur && o.modelValue &&
|
|
74
|
+
function K(e) {
|
|
75
|
+
B.value = !1, o.emitOnBlur && o.modelValue && P(e), s("blur", e);
|
|
72
76
|
}
|
|
73
|
-
const
|
|
74
|
-
o.colorPicker &&
|
|
75
|
-
|
|
77
|
+
const h = [];
|
|
78
|
+
o.colorPicker && h.push(le), h.push(
|
|
79
|
+
se({
|
|
76
80
|
environment: o.environment,
|
|
77
81
|
envVariables: o.envVariables,
|
|
78
82
|
workspace: o.workspace,
|
|
79
|
-
isReadOnly:
|
|
83
|
+
isReadOnly: w === "modal"
|
|
80
84
|
}),
|
|
81
|
-
|
|
85
|
+
ue
|
|
82
86
|
);
|
|
83
|
-
const D =
|
|
87
|
+
const D = i(null), { codeMirror: a } = oe({
|
|
84
88
|
content: r(
|
|
85
89
|
() => o.modelValue !== void 0 ? String(o.modelValue) : ""
|
|
86
90
|
),
|
|
87
91
|
onChange: (e) => {
|
|
88
|
-
|
|
92
|
+
O(e), L();
|
|
89
93
|
},
|
|
90
94
|
onFocus: () => B.value = !0,
|
|
91
|
-
onBlur: (e) =>
|
|
95
|
+
onBlur: (e) => K(e),
|
|
92
96
|
codeMirrorRef: D,
|
|
93
97
|
disableTabIndent: r(() => o.disableTabIndent),
|
|
94
98
|
disableEnter: r(() => o.disableEnter),
|
|
@@ -96,112 +100,120 @@ const de = { class: "whitespace-nowrap" }, ie = ["id"], pe = {
|
|
|
96
100
|
lineNumbers: r(() => o.lineNumbers),
|
|
97
101
|
language: r(() => o.language),
|
|
98
102
|
lint: r(() => o.lint),
|
|
99
|
-
extensions:
|
|
103
|
+
extensions: h,
|
|
100
104
|
placeholder: r(() => o.placeholder)
|
|
101
105
|
});
|
|
102
|
-
(
|
|
106
|
+
(T = a.value) == null || T.focus(), Q(a, () => {
|
|
103
107
|
a.value && Object.prototype.hasOwnProperty.call(C, "autofocus") && a.value.focus();
|
|
104
108
|
});
|
|
105
|
-
const { handleDropdownSelect:
|
|
109
|
+
const { handleDropdownSelect: z, updateDropdownVisibility: L } = te({
|
|
106
110
|
codeMirror: a,
|
|
107
|
-
query:
|
|
108
|
-
showDropdown:
|
|
111
|
+
query: x,
|
|
112
|
+
showDropdown: v,
|
|
109
113
|
dropdownPosition: S
|
|
110
|
-
}),
|
|
114
|
+
}), U = $(() => {
|
|
111
115
|
var e;
|
|
112
116
|
return o.type === "boolean" || (e = o.type) != null && e.includes("boolean") || o.nullable ? ["true", "false", "null"] : ["true", "false"];
|
|
113
117
|
});
|
|
114
|
-
|
|
118
|
+
N({
|
|
115
119
|
focus: () => {
|
|
116
120
|
var e;
|
|
117
121
|
(e = a.value) == null || e.focus();
|
|
118
122
|
}
|
|
119
123
|
});
|
|
120
|
-
const
|
|
121
|
-
var p,
|
|
122
|
-
|
|
123
|
-
},
|
|
124
|
+
const b = (e, t) => {
|
|
125
|
+
var p, l, F;
|
|
126
|
+
v.value ? e === "down" ? (t.preventDefault(), (p = c.value) == null || p.handleArrowKey("down")) : e === "up" ? (t.preventDefault(), (l = c.value) == null || l.handleArrowKey("up")) : e === "enter" && (t.preventDefault(), (F = c.value) == null || F.handleSelect()) : e === "escape" ? o.disableTabIndent || t.stopPropagation() : e === "enter" && t.target instanceof HTMLDivElement && P(t.target.textContent ?? "");
|
|
127
|
+
}, j = $(() => Array.isArray(o.type) ? (
|
|
124
128
|
// Find the first type, that’s not 'null'
|
|
125
129
|
o.type.find((e) => e !== "null") ?? "string"
|
|
126
130
|
) : (
|
|
127
131
|
// If it’s not an array, just return the type
|
|
128
132
|
o.type
|
|
129
133
|
));
|
|
130
|
-
return (e,
|
|
134
|
+
return (e, t) => {
|
|
131
135
|
var p;
|
|
132
|
-
return n(),
|
|
133
|
-
e.disabled ? (n(),
|
|
136
|
+
return n(), u(W, null, [
|
|
137
|
+
e.disabled ? (n(), u("div", {
|
|
134
138
|
key: 0,
|
|
135
|
-
class:
|
|
139
|
+
class: G(["text-c-2 flex cursor-default items-center justify-center", d(w) === "modal" ? "font-code pl-1 pr-2 text-sm" : "px-2"])
|
|
136
140
|
}, [
|
|
137
|
-
|
|
138
|
-
], 2)) : o.enum && o.enum.length ? (n(),
|
|
141
|
+
m("span", ie, X(e.modelValue), 1)
|
|
142
|
+
], 2)) : o.enum && o.enum.length ? (n(), y(k, {
|
|
139
143
|
key: 1,
|
|
140
144
|
default: o.default,
|
|
141
145
|
modelValue: e.modelValue,
|
|
142
|
-
type:
|
|
146
|
+
type: j.value,
|
|
143
147
|
value: o.enum,
|
|
144
|
-
"onUpdate:modelValue":
|
|
145
|
-
}, null, 8, ["default", "modelValue", "type", "value"])) : e.type === "boolean" || (p = e.type) != null && p.includes("boolean") ? (n(),
|
|
148
|
+
"onUpdate:modelValue": t[0] || (t[0] = (l) => s("update:modelValue", l))
|
|
149
|
+
}, null, 8, ["default", "modelValue", "type", "value"])) : e.type === "boolean" || (p = e.type) != null && p.includes("boolean") ? (n(), y(k, {
|
|
146
150
|
key: 2,
|
|
147
151
|
default: o.default,
|
|
148
152
|
modelValue: e.modelValue,
|
|
149
|
-
value:
|
|
150
|
-
"onUpdate:modelValue":
|
|
151
|
-
}, null, 8, ["default", "modelValue", "value"])) : o.examples && o.examples.length ? (n(),
|
|
153
|
+
value: U.value,
|
|
154
|
+
"onUpdate:modelValue": t[1] || (t[1] = (l) => s("update:modelValue", l))
|
|
155
|
+
}, null, 8, ["default", "modelValue", "value"])) : o.examples && o.examples.length ? (n(), y(k, {
|
|
152
156
|
key: 3,
|
|
153
157
|
default: o.default,
|
|
154
158
|
modelValue: o.modelValue,
|
|
155
159
|
value: o.examples,
|
|
156
|
-
"onUpdate:modelValue":
|
|
157
|
-
}, null, 8, ["default", "modelValue", "value"])) : (n(),
|
|
160
|
+
"onUpdate:modelValue": t[2] || (t[2] = (l) => s("update:modelValue", l))
|
|
161
|
+
}, null, 8, ["default", "modelValue", "value"])) : (n(), u("div", Y({
|
|
158
162
|
key: 4,
|
|
159
|
-
id:
|
|
163
|
+
id: d(A)
|
|
160
164
|
}, e.$attrs, {
|
|
161
165
|
ref_key: "codeMirrorRef",
|
|
162
166
|
ref: D,
|
|
163
|
-
class: ["group-[.alert]:outline-orange group-[.error]:outline-red font-code peer relative w-full overflow-hidden whitespace-nowrap text-xs leading-[1.44] -outline-offset-1 has-[:focus-visible]:rounded-[4px] has-[:focus-visible]:outline", {
|
|
167
|
+
class: ["group/input group-[.alert]:outline-orange group-[.error]:outline-red font-code peer relative w-full overflow-hidden whitespace-nowrap text-xs leading-[1.44] -outline-offset-1 has-[:focus-visible]:rounded-[4px] has-[:focus-visible]:outline", {
|
|
164
168
|
"flow-code-input--error": e.error
|
|
165
169
|
}],
|
|
166
170
|
onKeydown: [
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
171
|
+
t[4] || (t[4] = g(q((l) => b("down", l), ["stop"]), ["down"])),
|
|
172
|
+
t[5] || (t[5] = g((l) => b("enter", l), ["enter"])),
|
|
173
|
+
t[6] || (t[6] = g((l) => b("escape", l), ["escape"])),
|
|
174
|
+
t[7] || (t[7] = g(q((l) => b("up", l), ["stop"]), ["up"]))
|
|
170
175
|
]
|
|
171
176
|
}), [
|
|
172
|
-
e.isCopyable ? (n(),
|
|
173
|
-
|
|
177
|
+
e.isCopyable ? (n(), u("div", me, [
|
|
178
|
+
m("button", {
|
|
174
179
|
class: "copy-button",
|
|
175
180
|
type: "button",
|
|
176
|
-
onClick:
|
|
181
|
+
onClick: t[3] || (t[3] = (l) => d(M)(d(ee)(e.modelValue)))
|
|
177
182
|
}, [
|
|
178
|
-
|
|
179
|
-
|
|
183
|
+
t[8] || (t[8] = m("span", { class: "sr-only" }, "Copy content", -1)),
|
|
184
|
+
Z(d(_), {
|
|
180
185
|
icon: "Clipboard",
|
|
181
186
|
size: "md"
|
|
182
187
|
})
|
|
183
188
|
])
|
|
184
|
-
])) :
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
189
|
+
])) : f("", !0),
|
|
190
|
+
e.disableTabIndent ? f("", !0) : (n(), u("div", fe, t[9] || (t[9] = [
|
|
191
|
+
V(" Press "),
|
|
192
|
+
m("kbd", { class: "-mx-0.25 rounded border px-0.5 font-mono" }, "Esc", -1),
|
|
193
|
+
V(" then "),
|
|
194
|
+
m("kbd", { class: "-mx-0.25 rounded border px-0.5 font-mono" }, "Tab", -1),
|
|
195
|
+
V(" to exit ")
|
|
196
|
+
])))
|
|
197
|
+
], 16, pe)),
|
|
198
|
+
e.$slots.warning ? (n(), u("div", ce, [
|
|
199
|
+
E(e.$slots, "warning", {}, void 0, !0)
|
|
200
|
+
])) : f("", !0),
|
|
201
|
+
E(e.$slots, "icon", {}, void 0, !0),
|
|
202
|
+
e.required ? (n(), u("div", be, " Required ")) : f("", !0),
|
|
203
|
+
v.value && e.withVariables && d(w) !== "modal" && e.environment ? (n(), y(re, {
|
|
192
204
|
key: 7,
|
|
193
205
|
ref_key: "dropdownRef",
|
|
194
|
-
ref:
|
|
206
|
+
ref: c,
|
|
195
207
|
dropdownPosition: S.value,
|
|
196
208
|
envVariables: e.envVariables,
|
|
197
209
|
environment: e.environment,
|
|
198
|
-
query:
|
|
199
|
-
onSelect:
|
|
200
|
-
}, null, 8, ["dropdownPosition", "envVariables", "environment", "query", "onSelect"])) :
|
|
210
|
+
query: x.value,
|
|
211
|
+
onSelect: d(z)
|
|
212
|
+
}, null, 8, ["dropdownPosition", "envVariables", "environment", "query", "onSelect"])) : f("", !0)
|
|
201
213
|
], 64);
|
|
202
214
|
};
|
|
203
215
|
}
|
|
204
216
|
});
|
|
205
217
|
export {
|
|
206
|
-
|
|
218
|
+
Pe as default
|
|
207
219
|
};
|
|
@@ -13,23 +13,7 @@ export declare const PaletteComponents: {
|
|
|
13
13
|
onClose?: () => any;
|
|
14
14
|
onBack?: (e: KeyboardEvent) => any;
|
|
15
15
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, HTMLFormElement>;
|
|
16
|
-
readonly 'Create Request':
|
|
17
|
-
metaData?: {
|
|
18
|
-
itemUid: string;
|
|
19
|
-
parentUid: string;
|
|
20
|
-
};
|
|
21
|
-
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
22
|
-
close: () => any;
|
|
23
|
-
back: (e: KeyboardEvent) => any;
|
|
24
|
-
}, string, import("vue").PublicProps, Readonly<{
|
|
25
|
-
metaData?: {
|
|
26
|
-
itemUid: string;
|
|
27
|
-
parentUid: string;
|
|
28
|
-
};
|
|
29
|
-
}> & Readonly<{
|
|
30
|
-
onClose?: () => any;
|
|
31
|
-
onBack?: (e: KeyboardEvent) => any;
|
|
32
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLFormElement>;
|
|
16
|
+
readonly 'Create Request': "";
|
|
33
17
|
readonly 'Create Workspace': import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
34
18
|
close: () => any;
|
|
35
19
|
back: (e: KeyboardEvent) => any;
|
|
@@ -115,13 +99,14 @@ export declare const PaletteComponents: {
|
|
|
115
99
|
schema?: unknown;
|
|
116
100
|
content?: unknown;
|
|
117
101
|
style?: "matrix" | "simple" | "form" | "label" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
|
|
118
|
-
examples?: Record<string, {
|
|
102
|
+
examples?: unknown[] | Record<string, {
|
|
119
103
|
value?: unknown;
|
|
120
104
|
summary?: string | undefined;
|
|
121
105
|
}> | undefined;
|
|
122
106
|
}[] | undefined;
|
|
123
107
|
requestBody?: any;
|
|
124
108
|
responses?: Record<string, any> | undefined;
|
|
109
|
+
'x-scalar-stability'?: unknown;
|
|
125
110
|
method?: "options" | "connect" | "delete" | "get" | "head" | "patch" | "post" | "put" | "trace" | undefined;
|
|
126
111
|
} & {
|
|
127
112
|
url?: string;
|
|
@@ -163,13 +148,14 @@ export declare const PaletteComponents: {
|
|
|
163
148
|
schema?: unknown;
|
|
164
149
|
content?: unknown;
|
|
165
150
|
style?: "matrix" | "simple" | "form" | "label" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
|
|
166
|
-
examples?: Record<string, {
|
|
151
|
+
examples?: unknown[] | Record<string, {
|
|
167
152
|
value?: unknown;
|
|
168
153
|
summary?: string | undefined;
|
|
169
154
|
}> | undefined;
|
|
170
155
|
}[] | undefined;
|
|
171
156
|
requestBody?: any;
|
|
172
157
|
responses?: Record<string, any> | undefined;
|
|
158
|
+
'x-scalar-stability'?: unknown;
|
|
173
159
|
method?: "options" | "connect" | "delete" | "get" | "head" | "patch" | "post" | "put" | "trace" | undefined;
|
|
174
160
|
} & {
|
|
175
161
|
url?: string;
|
|
@@ -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":"AAqcA;;;;GAIG;;AACH,wBA8gBI;AAEJ,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;mBA9iB9B,CAlRqC;qBAkRrC,CAjRY;;;;;;;mBAiRZ,CAlRqC;qBAkRrC,CAjRY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+BAmoB0D,CAAC;;;;;;;;;;;;;;;2BAO+C,CAAC;4BAA2B,CAAC;+BAEnJ,CAAA;8BAEoC,CAAC;0BACxB,CAAC;2BAA0B,CAAC;yBAAwB,CAAC;4BAIjC,CAAC;6BAAgD,CAAC;+BAA8B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;+BAhB5C,CAAC;;;;;;;;;;;;;;;2BAO+C,CAAC;4BAA2B,CAAC;+BAEnJ,CAAA;8BAEoC,CAAC;0BACxB,CAAC;2BAA0B,CAAC;yBAAwB,CAAC;4BAIjC,CAAC;6BAAgD,CAAC;+BAA8B,CAAC;;;;;;;;;;;;;;;;CAqLxG,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"}
|