@scalar/api-client 2.14.0 → 2.15.0
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 +54 -0
- package/dist/libs/string-template.d.ts +2 -0
- package/dist/libs/string-template.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.js +28 -51
- package/dist/v2/blocks/operation-block/components/Header.vue.d.ts +0 -12
- package/dist/v2/blocks/operation-block/components/Header.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue.js +3 -3
- package/dist/v2/blocks/operation-block/components/Header.vue2.js +26 -28
- package/dist/v2/blocks/operation-block/helpers/build-request-parameters.d.ts +33 -0
- package/dist/v2/blocks/operation-block/helpers/build-request-parameters.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/build-request-security.d.ts +18 -0
- package/dist/v2/blocks/operation-block/helpers/build-request-security.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/decode-buffer.d.ts +7 -0
- package/dist/v2/blocks/operation-block/helpers/decode-buffer.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/get-delimiter.d.ts +8 -0
- package/dist/v2/blocks/operation-block/helpers/get-delimiter.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/get-example.d.ts +4 -0
- package/dist/v2/blocks/operation-block/helpers/get-example.d.ts.map +1 -0
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.js +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue2.js +134 -125
- package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts +2 -0
- package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBody.vue.js +2 -2
- package/dist/v2/blocks/request-block/components/RequestBody.vue2.js +11 -10
- package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts +2 -2
- package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +2 -4
- package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTable.vue.js +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +2 -2
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js +10 -10
- package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts +1 -1
- package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.js +21 -15
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts +4 -13
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +106 -70
- package/dist/v2/components/code-input/CodeInput.vue.d.ts +10 -1
- package/dist/v2/components/code-input/CodeInput.vue.d.ts.map +1 -1
- package/dist/v2/components/code-input/CodeInput.vue.js +1 -1
- package/dist/v2/components/code-input/CodeInput.vue2.js +65 -51
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts +4 -0
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.js +42 -39
- package/dist/v2/features/app/App.vue.d.ts.map +1 -1
- package/dist/v2/features/app/App.vue.js +64 -66
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue.js +2 -2
- package/dist/v2/features/app/components/AppSidebar.vue2.js +193 -106
- package/dist/v2/features/app/components/ItemDecorator.vue.d.ts +22 -0
- package/dist/v2/features/app/components/ItemDecorator.vue.d.ts.map +1 -0
- package/dist/v2/features/app/components/ItemDecorator.vue.js +138 -0
- package/dist/v2/features/app/components/ItemDecorator.vue2.js +4 -0
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts +8 -0
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts.map +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.js +76 -68
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.d.ts +8 -0
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.d.ts.map +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.js +83 -75
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.d.ts +4 -0
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.d.ts.map +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.js +32 -34
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts +16 -0
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts.map +1 -1
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.js +24 -21
- package/dist/v2/features/operation/Operation.vue.js +1 -1
- package/dist/v2/features/settings/DocumentSettings.vue.js +2 -2
- package/dist/v2/features/settings/DocumentSettings.vue2.js +1 -1
- package/dist/v2/helpers/storage.d.ts.map +1 -1
- package/dist/v2/helpers/storage.js +5 -5
- package/dist/v2/hooks/use-workspace-client-events.d.ts.map +1 -1
- package/dist/v2/hooks/use-workspace-client-events.js +102 -61
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +21 -21
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-parameter-handlers.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/helpers/create-parameter-handlers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAA;AAE5E,KAAK,aAAa,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAA;AAE3D,uDAAuD;AACvD,eAAO,MAAM,uBAAuB,GAClC,MAAM,aAAa,EACnB,UAAU,iBAAiB,EAC3B,MAAM,oBAAoB;mBAEX;QAAE,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE;sBAU7B;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE;;sBAWjB;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,OAAO,CAAC;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,
|
|
1
|
+
{"version":3,"file":"create-parameter-handlers.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/helpers/create-parameter-handlers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAA;AAE5E,KAAK,aAAa,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAA;AAE3D,uDAAuD;AACvD,eAAO,MAAM,uBAAuB,GAClC,MAAM,aAAa,EACnB,UAAU,iBAAiB,EAC3B,MAAM,oBAAoB;mBAEX;QAAE,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE;sBAU7B;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE;;sBAWjB;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,OAAO,CAAC;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,UAAU,EAAE,OAAO,CAAA;SAAE,CAAC,CAAA;KAAE;CAa1G,CAAA"}
|
|
@@ -1,29 +1,35 @@
|
|
|
1
|
-
const
|
|
2
|
-
add: (e) =>
|
|
1
|
+
const i = (a, d, r) => ({
|
|
2
|
+
add: (e) => d.emit("operation:add:parameter", {
|
|
3
3
|
type: a,
|
|
4
4
|
payload: {
|
|
5
5
|
key: e.key ?? "",
|
|
6
6
|
value: e.value ?? "",
|
|
7
|
-
|
|
7
|
+
isDisabled: !1
|
|
8
8
|
},
|
|
9
|
-
meta:
|
|
9
|
+
meta: r
|
|
10
10
|
}),
|
|
11
|
-
delete: (e) =>
|
|
11
|
+
delete: (e) => d.emit("operation:delete:parameter", {
|
|
12
12
|
type: a,
|
|
13
13
|
index: e.index,
|
|
14
|
-
meta:
|
|
14
|
+
meta: r
|
|
15
15
|
}),
|
|
16
|
-
deleteAll: () =>
|
|
16
|
+
deleteAll: () => d.emit("operation:delete-all:parameters", {
|
|
17
17
|
type: a,
|
|
18
|
-
meta:
|
|
18
|
+
meta: r
|
|
19
19
|
}),
|
|
20
|
-
update: (e) =>
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
update: (e) => d.emit(
|
|
21
|
+
"operation:update:parameter",
|
|
22
|
+
{
|
|
23
|
+
type: a,
|
|
24
|
+
index: e.index,
|
|
25
|
+
payload: e.payload,
|
|
26
|
+
meta: r
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
debounceKey: `update:parameter-${a}-${e.index}-${Object.keys(e.payload).join("-")}`
|
|
30
|
+
}
|
|
31
|
+
)
|
|
26
32
|
});
|
|
27
33
|
export {
|
|
28
|
-
|
|
34
|
+
i as createParameterHandlers
|
|
29
35
|
};
|
|
@@ -24,24 +24,15 @@ type __VLS_Props = {
|
|
|
24
24
|
/** Environment */
|
|
25
25
|
environment: XScalarEnvironment;
|
|
26
26
|
};
|
|
27
|
-
declare const _default: import("vue").DefineComponent<__VLS_Props, {
|
|
27
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {
|
|
28
|
+
methodConflict: import("vue").Ref<"delete" | "get" | "head" | "options" | "patch" | "post" | "put" | "trace" | null, "delete" | "get" | "head" | "options" | "patch" | "post" | "put" | "trace" | null>;
|
|
29
|
+
pathConflict: import("vue").Ref<string | null, string | null>;
|
|
30
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
28
31
|
execute: () => any;
|
|
29
32
|
"update:servers": () => any;
|
|
30
|
-
"update:path": (payload: {
|
|
31
|
-
value: string;
|
|
32
|
-
}) => any;
|
|
33
|
-
"update:method": (payload: {
|
|
34
|
-
value: HttpMethodType;
|
|
35
|
-
}) => any;
|
|
36
33
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
37
34
|
onExecute?: (() => any) | undefined;
|
|
38
35
|
"onUpdate:servers"?: (() => any) | undefined;
|
|
39
|
-
"onUpdate:path"?: ((payload: {
|
|
40
|
-
value: string;
|
|
41
|
-
}) => any) | undefined;
|
|
42
|
-
"onUpdate:method"?: ((payload: {
|
|
43
|
-
value: HttpMethodType;
|
|
44
|
-
}) => any) | undefined;
|
|
45
36
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
46
37
|
export default _default;
|
|
47
38
|
//# sourceMappingURL=AddressBar.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddressBar.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-address-bar-block/components/AddressBar.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AddressBar.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-address-bar-block/components/AddressBar.vue"],"names":[],"mappings":"AA2YA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAErF,OAAO,KAAK,EAEV,iBAAiB,EAClB,MAAM,gCAAgC,CAAA;AACvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAWhG,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAA;AAI3C,OAA0B,EAAE,KAAK,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAEzE,KAAK,WAAW,GAAG;IACjB,2BAA2B;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,6BAA6B;IAC7B,MAAM,EAAE,cAAc,CAAA;IACtB,gCAAgC;IAChC,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;IAC3B,mDAAmD;IACnD,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,8BAA8B;IAC9B,OAAO,EAAE,OAAO,EAAE,CAAA;IAClB,oBAAoB;IACpB,MAAM,EAAE,YAAY,CAAA;IACpB,iDAAiD;IACjD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,gBAAgB;IAChB,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,kBAAkB;IAClB,WAAW,EAAE,kBAAkB,CAAA;CAChC,CAAC;;;;;;;;;;;AAohBF,wBAQG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./AddressBar.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const d = /* @__PURE__ */ r(o, [["__scopeId", "data-v-
|
|
4
|
+
const d = /* @__PURE__ */ r(o, [["__scopeId", "data-v-6cf7598d"]]);
|
|
5
5
|
export {
|
|
6
6
|
d as default
|
|
7
7
|
};
|
|
@@ -1,14 +1,18 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarButton as
|
|
3
|
-
import { REQUEST_METHODS as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
|
|
1
|
+
import { defineComponent as V, useId as T, computed as B, ref as C, useTemplateRef as w, onMounted as I, onBeforeUnmount as M, createElementBlock as k, openBlock as p, unref as s, createElementVNode as o, normalizeClass as A, createVNode as r, createCommentVNode as S, normalizeStyle as N, createBlock as q, createTextVNode as c, toDisplayString as i, withCtx as D } from "vue";
|
|
2
|
+
import { ScalarWrappingText as F, ScalarButton as H, ScalarIcon as L } from "@scalar/components";
|
|
3
|
+
import { REQUEST_METHODS as O } from "@scalar/helpers/http/http-info";
|
|
4
|
+
import { ScalarIconWarningCircle as P } from "@scalar/icons";
|
|
5
|
+
import W from "./AddressBarHistory.vue.js";
|
|
6
|
+
import K from "../../../../components/HttpMethod/HttpMethod.vue.js";
|
|
7
|
+
import Q from "../../../components/server/ServerDropdown.vue.js";
|
|
8
|
+
import j from "../../../components/code-input/CodeInput.vue.js";
|
|
9
|
+
const G = ["id"], J = { class: "pointer-events-none absolute top-0 left-0 block h-full w-full overflow-hidden rounded-lg border" }, X = { class: "z-context-plus flex gap-1" }, Y = { class: "scroll-timeline-x scroll-timeline-x-hidden z-context-plus relative flex w-full bg-blend-normal" }, Z = {
|
|
10
|
+
key: 0,
|
|
11
|
+
class: "z-context absolute inset-x-0 top-[calc(100%+4px)] flex flex-col items-center rounded px-6"
|
|
12
|
+
}, _ = { class: "text-c-danger bg-b-danger border-c-danger flex items-center gap-1 rounded border p-1" }, ee = { class: "min-w-0 flex-1" }, te = {
|
|
9
13
|
"aria-hidden": "true",
|
|
10
14
|
class: "inline-flex items-center gap-1"
|
|
11
|
-
},
|
|
15
|
+
}, le = { class: "sr-only" }, me = /* @__PURE__ */ V({
|
|
12
16
|
__name: "AddressBar",
|
|
13
17
|
props: {
|
|
14
18
|
path: {},
|
|
@@ -21,106 +25,138 @@ const D = ["id"], F = { class: "address-bar-bg-states text-xxs group relative or
|
|
|
21
25
|
eventBus: {},
|
|
22
26
|
environment: {}
|
|
23
27
|
},
|
|
24
|
-
emits: ["execute", "update:
|
|
25
|
-
setup(
|
|
26
|
-
const
|
|
27
|
-
backgroundColor: `color-mix(in srgb, transparent 90%, ${
|
|
28
|
-
transform: `translate3d(-${
|
|
29
|
-
})),
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
emits: ["execute", "update:servers"],
|
|
29
|
+
setup(l, { expose: U, emit: E }) {
|
|
30
|
+
const u = E, m = T(), R = B(() => ({
|
|
31
|
+
backgroundColor: `color-mix(in srgb, transparent 90%, ${O[l.method].colorVar})`,
|
|
32
|
+
transform: `translate3d(-${l.percentage}%,0,0)`
|
|
33
|
+
})), d = C(null), a = C(null), h = B(() => a.value || d.value), b = (e, t, n) => l.eventBus.emit(
|
|
34
|
+
"operation:update:pathMethod",
|
|
35
|
+
{
|
|
36
|
+
meta: { method: l.method, path: l.path },
|
|
37
|
+
payload: { method: e, path: t },
|
|
38
|
+
callback: (v) => {
|
|
39
|
+
v === "success" || v === "no-change" ? (a.value = null, d.value = null) : v === "conflict" && (e !== l.method && (a.value = e), t !== l.path && (d.value = t));
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
n
|
|
43
|
+
), z = (e) => b(e, d.value ?? l.path), $ = (e) => b(a.value ?? l.method, e, {
|
|
44
|
+
debounceKey: `operation:update:pathMethod-${l.path}-${l.method}`
|
|
45
|
+
}), g = w("sendButtonRef"), f = w("addressBarRef"), x = () => g.value?.$el?.focus(), y = (e) => {
|
|
46
|
+
f.value?.isFocused && l.layout !== "desktop" || (f.value?.focus(!0), e?.event.preventDefault());
|
|
33
47
|
};
|
|
34
|
-
return
|
|
35
|
-
|
|
36
|
-
}),
|
|
37
|
-
|
|
38
|
-
}), (
|
|
39
|
-
|
|
48
|
+
return I(() => {
|
|
49
|
+
l.eventBus.on("ui:focus:address-bar", y), l.eventBus.on("ui:focus:send-button", x);
|
|
50
|
+
}), M(() => {
|
|
51
|
+
l.eventBus.off("ui:focus:address-bar", y), l.eventBus.off("ui:focus:send-button", x);
|
|
52
|
+
}), U({
|
|
53
|
+
methodConflict: a,
|
|
54
|
+
pathConflict: d
|
|
55
|
+
}), (e, t) => (p(), k("div", {
|
|
56
|
+
id: s(m),
|
|
40
57
|
class: "scalar-address-bar order-last flex h-(--scalar-address-bar-height) w-full [--scalar-address-bar-height:32px] lg:order-none lg:w-auto"
|
|
41
58
|
}, [
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
59
|
+
o("div", {
|
|
60
|
+
class: A(["address-bar-bg-states text-xxs group relative order-last flex w-full max-w-[calc(100dvw-24px)] flex-1 flex-row items-stretch rounded-lg p-0.75 lg:order-none lg:max-w-[580px] lg:min-w-[580px] xl:max-w-[720px] xl:min-w-[720px]", {
|
|
61
|
+
"outline-c-danger outline": h.value
|
|
62
|
+
}])
|
|
63
|
+
}, [
|
|
64
|
+
o("div", J, [
|
|
65
|
+
o("div", {
|
|
45
66
|
class: "absolute top-0 left-0 z-[1002] h-full w-full",
|
|
46
|
-
style:
|
|
67
|
+
style: N(R.value)
|
|
47
68
|
}, null, 4)
|
|
48
69
|
]),
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
isEditable:
|
|
70
|
+
o("div", X, [
|
|
71
|
+
r(s(K), {
|
|
72
|
+
isEditable: e.layout !== "modal",
|
|
52
73
|
isSquare: "",
|
|
53
|
-
method:
|
|
74
|
+
method: a.value ?? e.method,
|
|
54
75
|
teleport: "",
|
|
55
|
-
onChange:
|
|
76
|
+
onChange: z
|
|
56
77
|
}, null, 8, ["isEditable", "method"])
|
|
57
78
|
]),
|
|
58
|
-
|
|
59
|
-
|
|
79
|
+
o("div", Y, [
|
|
80
|
+
e.servers.length ? (p(), q(s(Q), {
|
|
60
81
|
key: 0,
|
|
61
|
-
layout:
|
|
62
|
-
server:
|
|
63
|
-
servers:
|
|
64
|
-
target:
|
|
65
|
-
"onUpdate:selectedServer":
|
|
66
|
-
"onUpdate:servers":
|
|
67
|
-
"onUpdate:variable":
|
|
68
|
-
}, null, 8, ["layout", "server", "servers", "target"])) :
|
|
69
|
-
|
|
70
|
-
|
|
82
|
+
layout: e.layout,
|
|
83
|
+
server: e.server,
|
|
84
|
+
servers: e.servers,
|
|
85
|
+
target: s(m),
|
|
86
|
+
"onUpdate:selectedServer": t[0] || (t[0] = (n) => e.eventBus.emit("server:update:selected", n)),
|
|
87
|
+
"onUpdate:servers": t[1] || (t[1] = (n) => u("update:servers")),
|
|
88
|
+
"onUpdate:variable": t[2] || (t[2] = (n) => e.eventBus.emit("server:update:variables", n))
|
|
89
|
+
}, null, 8, ["layout", "server", "servers", "target"])) : S("", !0),
|
|
90
|
+
t[6] || (t[6] = o("div", { class: "fade-left" }, null, -1)),
|
|
91
|
+
r(s(j), {
|
|
71
92
|
ref_key: "addressBarRef",
|
|
72
|
-
ref:
|
|
93
|
+
ref: f,
|
|
94
|
+
alwaysEmitChange: "",
|
|
73
95
|
"aria-label": "Path",
|
|
74
96
|
class: "min-w-fit outline-none",
|
|
75
97
|
disableCloseBrackets: "",
|
|
76
|
-
disabled:
|
|
98
|
+
disabled: e.layout === "modal",
|
|
77
99
|
disableEnter: "",
|
|
78
100
|
disableTabIndent: "",
|
|
79
101
|
emitOnBlur: !1,
|
|
80
|
-
environment:
|
|
102
|
+
environment: e.environment,
|
|
81
103
|
importCurl: "",
|
|
82
|
-
modelValue:
|
|
83
|
-
placeholder:
|
|
104
|
+
modelValue: e.path,
|
|
105
|
+
placeholder: e.server ? "" : "Enter a URL or cURL command",
|
|
84
106
|
server: "",
|
|
85
|
-
onCurl:
|
|
107
|
+
onCurl: t[3] || (t[3] = (n) => e.eventBus.emit("ui:open:command-palette", {
|
|
86
108
|
action: "import-curl-command",
|
|
87
109
|
payload: {
|
|
88
|
-
curl:
|
|
110
|
+
curl: n
|
|
89
111
|
}
|
|
90
112
|
})),
|
|
91
|
-
onSubmit:
|
|
92
|
-
"onUpdate:modelValue":
|
|
113
|
+
onSubmit: t[4] || (t[4] = (n) => u("execute")),
|
|
114
|
+
"onUpdate:modelValue": $
|
|
93
115
|
}, null, 8, ["disabled", "environment", "modelValue", "placeholder"]),
|
|
94
|
-
|
|
116
|
+
t[7] || (t[7] = o("div", { class: "fade-right" }, null, -1))
|
|
95
117
|
]),
|
|
96
|
-
|
|
97
|
-
history:
|
|
98
|
-
target:
|
|
118
|
+
r(W, {
|
|
119
|
+
history: e.history,
|
|
120
|
+
target: s(m)
|
|
99
121
|
}, null, 8, ["history", "target"]),
|
|
100
|
-
|
|
122
|
+
h.value ? (p(), k("div", Z, [
|
|
123
|
+
o("div", _, [
|
|
124
|
+
r(s(P), { size: "sm" }),
|
|
125
|
+
o("div", ee, [
|
|
126
|
+
t[8] || (t[8] = c(" A ", -1)),
|
|
127
|
+
o("em", null, i(a.value?.toUpperCase() ?? e.method.toUpperCase()), 1),
|
|
128
|
+
t[9] || (t[9] = c(" request to ", -1)),
|
|
129
|
+
r(s(F), {
|
|
130
|
+
text: d.value ?? e.path
|
|
131
|
+
}, null, 8, ["text"]),
|
|
132
|
+
t[10] || (t[10] = c(" already exists in this document ", -1))
|
|
133
|
+
])
|
|
134
|
+
])
|
|
135
|
+
])) : S("", !0),
|
|
136
|
+
r(s(H), {
|
|
101
137
|
ref_key: "sendButtonRef",
|
|
102
|
-
ref:
|
|
138
|
+
ref: g,
|
|
103
139
|
class: "z-context-plus relative h-auto shrink-0 overflow-hidden py-1 pr-2.5 pl-2 font-bold",
|
|
104
|
-
disabled:
|
|
105
|
-
onClick:
|
|
140
|
+
disabled: e.percentage < 100,
|
|
141
|
+
onClick: t[5] || (t[5] = (n) => u("execute"))
|
|
106
142
|
}, {
|
|
107
|
-
default:
|
|
108
|
-
|
|
109
|
-
|
|
143
|
+
default: D(() => [
|
|
144
|
+
o("span", te, [
|
|
145
|
+
r(s(L), {
|
|
110
146
|
class: "relative shrink-0 fill-current",
|
|
111
147
|
icon: "Play",
|
|
112
148
|
size: "xs"
|
|
113
149
|
}),
|
|
114
|
-
|
|
150
|
+
t[11] || (t[11] = o("span", { class: "text-xxs hidden lg:flex" }, "Send", -1))
|
|
115
151
|
]),
|
|
116
|
-
|
|
152
|
+
o("span", le, " Send " + i(e.method) + " request to " + i(e.server?.url ?? "") + i(e.path), 1)
|
|
117
153
|
]),
|
|
118
154
|
_: 1
|
|
119
155
|
}, 8, ["disabled"])
|
|
120
|
-
])
|
|
121
|
-
], 8,
|
|
156
|
+
], 2)
|
|
157
|
+
], 8, G));
|
|
122
158
|
}
|
|
123
159
|
});
|
|
124
160
|
export {
|
|
125
|
-
|
|
161
|
+
me as default
|
|
126
162
|
};
|
|
@@ -50,12 +50,19 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
50
50
|
withVariables?: boolean;
|
|
51
51
|
/** Detect and emit curl commands */
|
|
52
52
|
importCurl?: boolean;
|
|
53
|
+
/** Emit change event even if the value is the same */
|
|
54
|
+
alwaysEmitChange?: boolean;
|
|
53
55
|
/** Custom change handler, prevents default emit */
|
|
54
56
|
handleFieldChange?: (value: string) => void;
|
|
55
57
|
/** Custom submit handler, prevents default emit */
|
|
56
58
|
handleFieldSubmit?: (value: string) => void;
|
|
57
59
|
}, {
|
|
58
|
-
|
|
60
|
+
/**
|
|
61
|
+
* Focus the codemirror element
|
|
62
|
+
*
|
|
63
|
+
* @param cursorAtEnd boolean place the cursor at the end of the input
|
|
64
|
+
*/
|
|
65
|
+
focus: (cursorAtEnd?: boolean) => void;
|
|
59
66
|
isFocused: Ref<boolean, boolean>;
|
|
60
67
|
handleChange: (value: string) => void;
|
|
61
68
|
handleSubmit: (value: string) => void;
|
|
@@ -117,6 +124,8 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
117
124
|
withVariables?: boolean;
|
|
118
125
|
/** Detect and emit curl commands */
|
|
119
126
|
importCurl?: boolean;
|
|
127
|
+
/** Emit change event even if the value is the same */
|
|
128
|
+
alwaysEmitChange?: boolean;
|
|
120
129
|
/** Custom change handler, prevents default emit */
|
|
121
130
|
handleFieldChange?: (value: string) => void;
|
|
122
131
|
/** Custom submit handler, prevents default emit */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodeInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/code-input/CodeInput.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CodeInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/code-input/CodeInput.vue"],"names":[],"mappings":"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"}
|
|
@@ -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 a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
5
|
+
const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-802d60c5"]]);
|
|
6
6
|
export {
|
|
7
7
|
a as default
|
|
8
8
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as W, useAttrs as j, ref as d, computed as s, toRef as r, watch as H, createElementBlock as i, openBlock as
|
|
1
|
+
import { defineComponent as W, useAttrs as j, ref as d, computed as s, toRef as r, watch as H, createElementBlock as i, openBlock as o, Fragment as Q, createBlock as m, createCommentVNode as f, normalizeClass as G, createElementVNode as w, toDisplayString as J, mergeProps as X, unref as T, withKeys as b, withModifiers as D, createTextVNode as V, renderSlot as $ } from "vue";
|
|
2
2
|
import { useCodeMirror as Y, useDropdown as Z, colorPicker as _ } from "@scalar/use-codemirror";
|
|
3
3
|
import { nanoid as ee } from "nanoid";
|
|
4
4
|
import B from "../data-table/DataTableInputSelect.vue.js";
|
|
@@ -19,7 +19,7 @@ const oe = { class: "whitespace-nowrap" }, ae = ["id"], re = {
|
|
|
19
19
|
class: "required centered-y text-xxs text-c-3 group-[.error]:text-red bg-b-1 pointer-events-none absolute right-0 mr-0.5 pt-px pr-2 opacity-100 shadow-[-8px_0_4px_var(--scalar-background-1)] transition-opacity duration-150 group-[.alert]:bg-transparent group-[.alert]:shadow-none group-[.error]:bg-transparent group-[.error]:shadow-none peer-has-[.cm-focused]:opacity-0"
|
|
20
20
|
}, se = {
|
|
21
21
|
inheritAttrs: !1
|
|
22
|
-
},
|
|
22
|
+
}, pe = /* @__PURE__ */ W({
|
|
23
23
|
...se,
|
|
24
24
|
__name: "CodeInput",
|
|
25
25
|
props: {
|
|
@@ -47,18 +47,19 @@ const oe = { class: "whitespace-nowrap" }, ae = ["id"], re = {
|
|
|
47
47
|
emitOnBlur: { type: Boolean, default: !0 },
|
|
48
48
|
withVariables: { type: Boolean, default: !0 },
|
|
49
49
|
importCurl: { type: Boolean, default: !1 },
|
|
50
|
+
alwaysEmitChange: { type: Boolean, default: !1 },
|
|
50
51
|
handleFieldChange: { type: Function },
|
|
51
52
|
handleFieldSubmit: { type: Function }
|
|
52
53
|
},
|
|
53
54
|
emits: ["update:modelValue", "submit", "blur", "curl", "redirectToEnvironment"],
|
|
54
|
-
setup(t, { expose:
|
|
55
|
-
const u =
|
|
56
|
-
if (e
|
|
55
|
+
setup(t, { expose: I, emit: M }) {
|
|
56
|
+
const u = M, k = j(), R = k.id || `id-${ee()}`, y = d(!1), q = s(() => t.enum?.length ? !1 : t.type === "boolean" || Array.isArray(t.type) && t.type.includes("boolean")), x = s(() => t.nullable ? ["true", "false", "null"] : ["true", "false"]), A = s(() => Array.isArray(t.type) ? t.type.find((e) => e !== "null") ?? "string" : t.type), C = (e) => {
|
|
57
|
+
if (!(!t.alwaysEmitChange && e === t.modelValue)) {
|
|
57
58
|
if (t.importCurl && e.trim().toLowerCase().startsWith("curl")) {
|
|
58
|
-
u("curl", e),
|
|
59
|
+
u("curl", e), n.value && n.value.dispatch({
|
|
59
60
|
changes: {
|
|
60
61
|
from: 0,
|
|
61
|
-
to:
|
|
62
|
+
to: n.value.state.doc.length,
|
|
62
63
|
insert: String(t.modelValue)
|
|
63
64
|
}
|
|
64
65
|
});
|
|
@@ -66,11 +67,11 @@ const oe = { class: "whitespace-nowrap" }, ae = ["id"], re = {
|
|
|
66
67
|
}
|
|
67
68
|
t.handleFieldChange ? t.handleFieldChange(e) : u("update:modelValue", e);
|
|
68
69
|
}
|
|
69
|
-
},
|
|
70
|
+
}, h = (e) => {
|
|
70
71
|
t.handleFieldSubmit ? t.handleFieldSubmit(e) : u("submit", e);
|
|
71
|
-
},
|
|
72
|
-
|
|
73
|
-
},
|
|
72
|
+
}, E = (e) => {
|
|
73
|
+
y.value = !1, t.emitOnBlur && t.modelValue && h(e), u("blur", e);
|
|
74
|
+
}, p = (e) => {
|
|
74
75
|
u("update:modelValue", e);
|
|
75
76
|
}, N = () => {
|
|
76
77
|
const e = [...t.extensions];
|
|
@@ -84,16 +85,16 @@ const oe = { class: "whitespace-nowrap" }, ae = ["id"], re = {
|
|
|
84
85
|
...N(),
|
|
85
86
|
O.value,
|
|
86
87
|
ne
|
|
87
|
-
]),
|
|
88
|
+
]), S = d(null), { codeMirror: n } = Y({
|
|
88
89
|
content: r(() => String(t.modelValue ?? "")),
|
|
89
90
|
onChange: (e) => {
|
|
90
91
|
C(e), L();
|
|
91
92
|
},
|
|
92
93
|
onFocus: () => {
|
|
93
|
-
|
|
94
|
+
y.value = !0;
|
|
94
95
|
},
|
|
95
|
-
onBlur:
|
|
96
|
-
codeMirrorRef:
|
|
96
|
+
onBlur: E,
|
|
97
|
+
codeMirrorRef: S,
|
|
97
98
|
disableTabIndent: r(() => t.disableTabIndent),
|
|
98
99
|
disableEnter: r(() => t.disableEnter),
|
|
99
100
|
disableCloseBrackets: r(() => t.disableCloseBrackets),
|
|
@@ -103,74 +104,87 @@ const oe = { class: "whitespace-nowrap" }, ae = ["id"], re = {
|
|
|
103
104
|
extensions: z,
|
|
104
105
|
placeholder: r(() => t.placeholder)
|
|
105
106
|
});
|
|
106
|
-
H(
|
|
107
|
-
|
|
107
|
+
H(n, () => {
|
|
108
|
+
n.value && Object.hasOwn(k, "autofocus") && n.value.focus();
|
|
108
109
|
});
|
|
109
|
-
const
|
|
110
|
-
codeMirror:
|
|
110
|
+
const g = d(!1), F = d(""), P = d({ left: 0, top: 0 }), v = d(null), { handleDropdownSelect: K, updateDropdownVisibility: L } = Z({
|
|
111
|
+
codeMirror: n,
|
|
111
112
|
query: F,
|
|
112
|
-
showDropdown:
|
|
113
|
+
showDropdown: g,
|
|
113
114
|
dropdownPosition: P
|
|
114
|
-
}), U = s(() =>
|
|
115
|
-
if (
|
|
115
|
+
}), U = s(() => g.value && t.withVariables && t.layout !== "modal" && !!t.environment), c = (e, l) => {
|
|
116
|
+
if (g.value) {
|
|
116
117
|
e === "down" || e === "up" ? (l.preventDefault(), v.value?.handleArrowKey(e)) : e === "enter" && (l.preventDefault(), v.value?.handleSelect());
|
|
117
118
|
return;
|
|
118
119
|
}
|
|
119
|
-
e === "escape" && !t.disableTabIndent && l.stopPropagation(), e === "enter" && l.target instanceof HTMLDivElement &&
|
|
120
|
+
e === "escape" && !t.disableTabIndent && l.stopPropagation(), e === "enter" && l.target instanceof HTMLDivElement && h(l.target.textContent ?? "");
|
|
120
121
|
};
|
|
121
|
-
return
|
|
122
|
-
|
|
123
|
-
|
|
122
|
+
return I({
|
|
123
|
+
/**
|
|
124
|
+
* Focus the codemirror element
|
|
125
|
+
*
|
|
126
|
+
* @param cursorAtEnd boolean place the cursor at the end of the input
|
|
127
|
+
*/
|
|
128
|
+
focus: (e) => {
|
|
129
|
+
if (!n.value || (n.value.focus(), !e))
|
|
130
|
+
return;
|
|
131
|
+
const l = n.value.state.doc.length;
|
|
132
|
+
n.value.dispatch({
|
|
133
|
+
selection: { anchor: l },
|
|
134
|
+
scrollIntoView: !0
|
|
135
|
+
});
|
|
136
|
+
},
|
|
137
|
+
isFocused: y,
|
|
124
138
|
handleChange: C,
|
|
125
|
-
handleSubmit:
|
|
126
|
-
handleBlur:
|
|
139
|
+
handleSubmit: h,
|
|
140
|
+
handleBlur: E,
|
|
127
141
|
booleanOptions: x,
|
|
128
|
-
codeMirror:
|
|
142
|
+
codeMirror: n,
|
|
129
143
|
modelValue: t.modelValue
|
|
130
|
-
}), (e, l) => (
|
|
131
|
-
e.disabled ? (
|
|
144
|
+
}), (e, l) => (o(), i(Q, null, [
|
|
145
|
+
e.disabled ? (o(), i("div", {
|
|
132
146
|
key: 0,
|
|
133
147
|
class: G(["text-c-2 flex cursor-default items-center justify-center", e.layout === "modal" ? "font-code pr-2 pl-1 text-base" : "px-2"]),
|
|
134
148
|
"data-testid": "code-input-disabled"
|
|
135
149
|
}, [
|
|
136
150
|
w("span", oe, J(e.modelValue), 1)
|
|
137
|
-
], 2)) : t.enum?.length ? (
|
|
151
|
+
], 2)) : t.enum?.length ? (o(), m(B, {
|
|
138
152
|
key: 1,
|
|
139
153
|
default: t.default,
|
|
140
154
|
modelValue: e.modelValue,
|
|
141
|
-
type:
|
|
155
|
+
type: A.value,
|
|
142
156
|
value: t.enum,
|
|
143
|
-
"onUpdate:modelValue":
|
|
144
|
-
}, null, 8, ["default", "modelValue", "type", "value"])) :
|
|
157
|
+
"onUpdate:modelValue": p
|
|
158
|
+
}, null, 8, ["default", "modelValue", "type", "value"])) : q.value ? (o(), m(B, {
|
|
145
159
|
key: 2,
|
|
146
160
|
default: t.default,
|
|
147
161
|
modelValue: e.modelValue,
|
|
148
162
|
value: x.value,
|
|
149
|
-
"onUpdate:modelValue":
|
|
150
|
-
}, null, 8, ["default", "modelValue", "value"])) : e.examples?.length ? (
|
|
163
|
+
"onUpdate:modelValue": p
|
|
164
|
+
}, null, 8, ["default", "modelValue", "value"])) : e.examples?.length ? (o(), m(B, {
|
|
151
165
|
key: 3,
|
|
152
166
|
default: t.default,
|
|
153
167
|
modelValue: e.modelValue,
|
|
154
168
|
value: e.examples,
|
|
155
|
-
"onUpdate:modelValue":
|
|
156
|
-
}, null, 8, ["default", "modelValue", "value"])) : (
|
|
169
|
+
"onUpdate:modelValue": p
|
|
170
|
+
}, null, 8, ["default", "modelValue", "value"])) : (o(), i("div", X({
|
|
157
171
|
key: 4,
|
|
158
|
-
id: T(
|
|
172
|
+
id: T(R)
|
|
159
173
|
}, e.$attrs, {
|
|
160
174
|
ref_key: "codeMirrorRef",
|
|
161
|
-
ref:
|
|
175
|
+
ref: S,
|
|
162
176
|
class: ["group/input group-[.alert]:outline-orange group-[.error]:outline-red font-code peer relative w-full overflow-hidden text-xs leading-[1.44] whitespace-nowrap -outline-offset-1 has-[:focus-visible]:rounded-[4px] has-[:focus-visible]:outline", {
|
|
163
177
|
"line-wrapping has-[:focus-visible]:bg-b-1 has-[:focus-visible]:absolute has-[:focus-visible]:z-1": e.lineWrapping,
|
|
164
178
|
"flow-code-input--error": e.error
|
|
165
179
|
}],
|
|
166
180
|
onKeydown: [
|
|
167
|
-
l[0] || (l[0] = b(D((a) =>
|
|
168
|
-
l[1] || (l[1] = b((a) =>
|
|
169
|
-
l[2] || (l[2] = b((a) =>
|
|
170
|
-
l[3] || (l[3] = b(D((a) =>
|
|
181
|
+
l[0] || (l[0] = b(D((a) => c("down", a), ["stop"]), ["down"])),
|
|
182
|
+
l[1] || (l[1] = b((a) => c("enter", a), ["enter"])),
|
|
183
|
+
l[2] || (l[2] = b((a) => c("escape", a), ["escape"])),
|
|
184
|
+
l[3] || (l[3] = b(D((a) => c("up", a), ["stop"]), ["up"]))
|
|
171
185
|
]
|
|
172
186
|
}), [
|
|
173
|
-
e.disableTabIndent ? f("", !0) : (
|
|
187
|
+
e.disableTabIndent ? f("", !0) : (o(), i("div", re, [...l[5] || (l[5] = [
|
|
174
188
|
V(" Press ", -1),
|
|
175
189
|
w("kbd", { class: "-mx-0.25 rounded border px-0.5 font-mono" }, "Esc", -1),
|
|
176
190
|
V(" then ", -1),
|
|
@@ -178,14 +192,14 @@ const oe = { class: "whitespace-nowrap" }, ae = ["id"], re = {
|
|
|
178
192
|
V(" to exit ", -1)
|
|
179
193
|
])]))
|
|
180
194
|
], 16, ae)),
|
|
181
|
-
e.$slots.warning ? (
|
|
195
|
+
e.$slots.warning ? (o(), i("div", ie, [
|
|
182
196
|
$(e.$slots, "warning", {}, void 0, !0)
|
|
183
197
|
])) : f("", !0),
|
|
184
|
-
e.$slots.icon ? (
|
|
198
|
+
e.$slots.icon ? (o(), i("div", ue, [
|
|
185
199
|
$(e.$slots, "icon", {}, void 0, !0)
|
|
186
200
|
])) : f("", !0),
|
|
187
|
-
e.required ? (
|
|
188
|
-
U.value && e.environment ? (
|
|
201
|
+
e.required ? (o(), i("div", de, " Required ")) : f("", !0),
|
|
202
|
+
U.value && e.environment ? (o(), m(te, {
|
|
189
203
|
key: 8,
|
|
190
204
|
ref_key: "dropdownRef",
|
|
191
205
|
ref: v,
|
|
@@ -199,5 +213,5 @@ const oe = { class: "whitespace-nowrap" }, ae = ["id"], re = {
|
|
|
199
213
|
}
|
|
200
214
|
});
|
|
201
215
|
export {
|
|
202
|
-
|
|
216
|
+
pe as default
|
|
203
217
|
};
|
|
@@ -27,6 +27,10 @@ type __VLS_Props = {
|
|
|
27
27
|
type __VLS_Slots = {
|
|
28
28
|
/** Slot to add the workspace button */
|
|
29
29
|
workspaceButton?(): unknown;
|
|
30
|
+
/** Slot to add additional content to the decorator */
|
|
31
|
+
decorator?(props: {
|
|
32
|
+
item: TraversedEntry;
|
|
33
|
+
}): unknown;
|
|
30
34
|
/** Slot to add additional content to the footer */
|
|
31
35
|
footer?(): unknown;
|
|
32
36
|
};
|