@scalar/api-client 2.2.35 → 2.2.38
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 +61 -0
- package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBar.vue.js +1 -1
- package/dist/components/AddressBar/AddressBar.vue2.js +107 -116
- package/dist/components/AddressBar/AddressBarHistory.vue.d.ts +2 -1
- 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 +96 -76
- package/dist/components/AddressBar/AddressBarServer.vue.d.ts +5 -1
- package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarServer.vue.js +92 -86
- package/dist/components/AddressBar/AddressBarServerItem.vue.d.ts +7 -10
- package/dist/components/AddressBar/AddressBarServerItem.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarServerItem.vue.js +5 -52
- package/dist/components/AddressBar/AddressBarServerItem.vue2.js +75 -2
- package/dist/components/CodeInput/CodeInput.vue.d.ts +5 -0
- 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 +126 -112
- package/dist/components/CodeInput/codeVariableWidget.d.ts +1 -4
- package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandActionInput.vue.d.ts +1 -0
- package/dist/components/CommandPalette/CommandActionInput.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandActionInput.vue.js +21 -18
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +2 -2
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +2 -2
- package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInput.vue.js +2 -2
- package/dist/components/DataTable/DataTableInputSelect.vue.d.ts +1 -0
- package/dist/components/DataTable/DataTableInputSelect.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInputSelect.vue.js +86 -54
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +22 -21
- package/dist/components/Form/Form.vue.d.ts.map +1 -1
- package/dist/components/Form/Form.vue.js +3 -3
- package/dist/components/Server/ServerVariablesForm.vue.d.ts +14 -0
- package/dist/components/Server/ServerVariablesForm.vue.d.ts.map +1 -0
- package/dist/components/Server/ServerVariablesForm.vue.js +47 -0
- package/dist/components/Server/ServerVariablesForm.vue2.js +4 -0
- package/dist/components/Server/ServerVariablesSelect.vue.d.ts +12 -0
- package/dist/components/Server/ServerVariablesSelect.vue.d.ts.map +1 -0
- package/dist/components/Server/ServerVariablesSelect.vue.js +54 -0
- package/dist/components/Server/ServerVariablesSelect.vue2.js +4 -0
- package/dist/components/Server/ServerVariablesTextbox.vue.d.ts +11 -0
- package/dist/components/Server/ServerVariablesTextbox.vue.d.ts.map +1 -0
- package/dist/components/Server/ServerVariablesTextbox.vue.js +29 -0
- package/dist/components/Server/ServerVariablesTextbox.vue2.js +4 -0
- package/dist/components/Server/types.d.ts +9 -0
- package/dist/components/Server/types.d.ts.map +1 -0
- package/dist/components/SideNav/SideHelp.vue.js +16 -16
- package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.js +2 -2
- package/dist/components/Sidebar/Sidebar.vue2.js +11 -10
- package/dist/components/Sidebar/SidebarListElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarListElement.vue.js +1 -1
- package/dist/components/Sidebar/SidebarListElement.vue2.js +10 -9
- package/dist/components/TopNav/TopNav.vue.js +27 -27
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts +1 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
- package/dist/layouts/App/create-api-client-app.d.ts +99 -84
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +198 -168
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Web/create-api-client-web.d.ts +99 -84
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +110 -90
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +86 -81
- package/dist/libs/find-request.d.ts.map +1 -1
- package/dist/libs/importers/curl.js +4 -4
- package/dist/libs/index.js +18 -19
- package/dist/libs/send-request/index.js +3 -4
- package/dist/libs/send-request/send-request.d.ts +0 -14
- package/dist/libs/send-request/send-request.d.ts.map +1 -1
- package/dist/libs/send-request/send-request.js +120 -142
- package/dist/libs/send-request/set-request-cookies.d.ts +27 -0
- package/dist/libs/send-request/set-request-cookies.d.ts.map +1 -0
- package/dist/libs/send-request/set-request-cookies.js +54 -0
- package/dist/store/active-entities.d.ts +13 -4
- package/dist/store/active-entities.d.ts.map +1 -1
- package/dist/store/active-entities.js +15 -12
- package/dist/store/collections.d.ts.map +1 -1
- package/dist/store/cookies.d.ts +4 -58
- package/dist/store/cookies.d.ts.map +1 -1
- package/dist/store/cookies.js +5 -17
- package/dist/store/import-spec.d.ts.map +1 -1
- package/dist/store/request-example.d.ts +52 -2
- package/dist/store/request-example.d.ts.map +1 -1
- package/dist/store/requests.d.ts +2 -2
- package/dist/store/requests.d.ts.map +1 -1
- package/dist/store/servers.d.ts +40 -20
- package/dist/store/servers.d.ts.map +1 -1
- package/dist/store/store.d.ts +99 -86
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/store.js +51 -53
- package/dist/style.css +1 -1
- package/dist/views/Cookies/CookieForm.vue.d.ts.map +1 -1
- package/dist/views/Cookies/CookieForm.vue.js +24 -37
- package/dist/views/Cookies/CookieModal.vue.d.ts +21 -0
- package/dist/views/Cookies/CookieModal.vue.d.ts.map +1 -0
- package/dist/views/Cookies/CookieModal.vue.js +7 -0
- package/dist/views/Cookies/CookieModal.vue2.js +88 -0
- package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +98 -119
- package/dist/views/Environment/Environment.vue2.js +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/Request.vue2.js +88 -89
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +87 -88
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts +2 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +3 -3
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +16 -17
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue2.js +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestBody.vue2.js +34 -34
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts +7 -0
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.js +79 -66
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestPathParams.vue.js +57 -74
- 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 +91 -64
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +9 -2
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestTable.vue2.js +168 -129
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +5 -64
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue2.js +46 -2
- 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 +143 -143
- 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 +71 -71
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue2.js +37 -37
- package/dist/views/Request/ResponseSection/ResponseCookies.vue.js +19 -17
- 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 +27 -27
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +31 -31
- package/dist/views/Request/handle-drag.d.ts +1 -1
- package/dist/views/Request/handle-drag.d.ts.map +1 -1
- package/dist/views/Request/handle-drag.js +27 -26
- package/dist/views/Request/hooks/useOpenApiWatcher.js +1 -1
- package/dist/views/Request/libs/request.d.ts +12 -0
- package/dist/views/Request/libs/request.d.ts.map +1 -0
- package/dist/views/Request/libs/request.js +4 -0
- package/dist/views/Request/libs/{live-sync.d.ts → watch-mode.d.ts} +1 -1
- package/dist/views/Request/libs/watch-mode.d.ts.map +1 -0
- package/dist/views/Request/libs/{live-sync.js → watch-mode.js} +6 -6
- package/dist/views/Servers/Servers.vue2.js +29 -29
- package/package.json +10 -12
- package/dist/views/Cookies/CookieRaw.vue.js +0 -28
- package/dist/views/Cookies/CookieRaw.vue2.js +0 -4
- package/dist/views/Request/libs/live-sync.d.ts.map +0 -1
|
@@ -1,30 +1,34 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useCodeMirror as
|
|
3
|
-
import { nanoid as
|
|
4
|
-
import
|
|
5
|
-
import { pillPlugin as te, backspaceCommand as
|
|
6
|
-
import
|
|
7
|
-
import { useClipboard as
|
|
8
|
-
import { ScalarIcon as
|
|
9
|
-
import { prettyPrintJson as
|
|
10
|
-
import { useActiveEntities as
|
|
11
|
-
import {
|
|
12
|
-
const
|
|
1
|
+
import { defineComponent as W, useAttrs as J, ref as d, toRef as s, watch as Q, computed as G, openBlock as n, createElementBlock as i, Fragment as H, createElementVNode as w, toDisplayString as X, createBlock as f, mergeProps as Y, unref as a, withKeys as V, withModifiers as $, createVNode as Z, createCommentVNode as c, renderSlot as q } from "vue";
|
|
2
|
+
import { useCodeMirror as _, useDropdown as ee, colorPicker as oe } from "@scalar/use-codemirror";
|
|
3
|
+
import { nanoid as le } from "nanoid";
|
|
4
|
+
import g from "../DataTable/DataTableInputSelect.vue.js";
|
|
5
|
+
import { pillPlugin as te, backspaceCommand as ne } from "./codeVariableWidget.js";
|
|
6
|
+
import ae from "../../views/Environment/EnvironmentVariableDropdown.vue.js";
|
|
7
|
+
import { useClipboard as re } from "@scalar/use-hooks/useClipboard";
|
|
8
|
+
import { ScalarIcon as se } from "@scalar/components";
|
|
9
|
+
import { prettyPrintJson as ue } from "@scalar/oas-utils/helpers";
|
|
10
|
+
import { useActiveEntities as de } from "../../store/active-entities.js";
|
|
11
|
+
import { useLayout as ie } from "../../hooks/useLayout.js";
|
|
12
|
+
const pe = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "flex items-center justify-center px-1"
|
|
15
|
+
}, me = { class: "text-c-1 text-sm font-code" }, fe = ["id"], ce = {
|
|
13
16
|
key: 0,
|
|
14
17
|
class: "scalar-code-copy z-context"
|
|
15
|
-
},
|
|
16
|
-
key:
|
|
18
|
+
}, ye = {
|
|
19
|
+
key: 5,
|
|
17
20
|
class: "absolute centered-y right-7 text-orange text-xs"
|
|
18
|
-
},
|
|
19
|
-
key:
|
|
21
|
+
}, be = {
|
|
22
|
+
key: 6,
|
|
20
23
|
class: "required absolute centered-y right-0 pt-px pr-2 text-xxs text-c-3 bg-b-1 shadow-[-8px_0_4px_var(--scalar-background-1)] opacity-100 duration-150 transition-opacity peer-has-[.cm-focused]:opacity-0 pointer-events-none"
|
|
21
|
-
},
|
|
24
|
+
}, ve = {
|
|
22
25
|
inheritAttrs: !1
|
|
23
|
-
},
|
|
24
|
-
...
|
|
26
|
+
}, Fe = /* @__PURE__ */ W({
|
|
27
|
+
...ve,
|
|
25
28
|
__name: "CodeInput",
|
|
26
29
|
props: {
|
|
27
30
|
colorPicker: { type: Boolean, default: !1 },
|
|
31
|
+
disabled: { type: Boolean, default: !1 },
|
|
28
32
|
modelValue: {},
|
|
29
33
|
error: { type: Boolean },
|
|
30
34
|
emitOnBlur: { type: Boolean, default: !0 },
|
|
@@ -39,6 +43,7 @@ const de = ["id"], pe = {
|
|
|
39
43
|
disableEnter: { type: Boolean, default: !1 },
|
|
40
44
|
disableCloseBrackets: { type: Boolean, default: !1 },
|
|
41
45
|
enum: {},
|
|
46
|
+
examples: {},
|
|
42
47
|
type: {},
|
|
43
48
|
nullable: { type: Boolean, default: !1 },
|
|
44
49
|
withVariables: { type: Boolean, default: !0 },
|
|
@@ -48,138 +53,147 @@ const de = ["id"], pe = {
|
|
|
48
53
|
},
|
|
49
54
|
emits: ["submit", "update:modelValue", "curl"],
|
|
50
55
|
setup(R, { expose: N, emit: O }) {
|
|
51
|
-
var
|
|
52
|
-
const
|
|
53
|
-
function
|
|
54
|
-
var
|
|
55
|
-
return
|
|
56
|
+
var F;
|
|
57
|
+
const o = R, u = O, B = J(), A = B.id || `id-${le()}`, k = d(!1), y = d(!1), C = d(""), S = d({ left: 0, top: 0 }), m = d(null), { activeEnvVariables: x, activeEnvironment: b, activeWorkspace: I } = de(), { layout: P } = ie(), { copyToClipboard: K } = re();
|
|
58
|
+
function M(e) {
|
|
59
|
+
var l;
|
|
60
|
+
return e === o.modelValue ? null : o.importCurl && e.trim().toLowerCase().startsWith("curl") ? (u("curl", e), (l = r.value) == null || l.dispatch({
|
|
56
61
|
changes: {
|
|
57
62
|
from: 0,
|
|
58
|
-
to:
|
|
59
|
-
insert: String(
|
|
63
|
+
to: r.value.state.doc.length,
|
|
64
|
+
insert: String(o.modelValue)
|
|
60
65
|
}
|
|
61
|
-
}), null) :
|
|
66
|
+
}), null) : o.handleFieldChange ? o.handleFieldChange(e) : u("update:modelValue", e);
|
|
62
67
|
}
|
|
63
|
-
function
|
|
64
|
-
return
|
|
68
|
+
function T(e) {
|
|
69
|
+
return o.handleFieldSubmit ? o.handleFieldSubmit(e) : u("submit", e);
|
|
65
70
|
}
|
|
66
|
-
function
|
|
67
|
-
|
|
71
|
+
function U(e) {
|
|
72
|
+
k.value = !1, o.emitOnBlur && o.modelValue && T(e);
|
|
68
73
|
}
|
|
69
|
-
const
|
|
70
|
-
|
|
74
|
+
const v = [];
|
|
75
|
+
o.colorPicker && v.push(oe), v.push(
|
|
71
76
|
te({
|
|
72
77
|
environment: b.value,
|
|
73
|
-
envVariables:
|
|
74
|
-
workspace:
|
|
75
|
-
isReadOnly:
|
|
78
|
+
envVariables: x.value,
|
|
79
|
+
workspace: I.value,
|
|
80
|
+
isReadOnly: P === "modal"
|
|
76
81
|
}),
|
|
77
|
-
|
|
82
|
+
ne
|
|
78
83
|
);
|
|
79
|
-
const
|
|
80
|
-
content:
|
|
81
|
-
() =>
|
|
84
|
+
const D = d(null), { codeMirror: r } = _({
|
|
85
|
+
content: s(
|
|
86
|
+
() => o.modelValue !== void 0 ? String(o.modelValue) : ""
|
|
82
87
|
),
|
|
83
|
-
onChange: (
|
|
84
|
-
|
|
88
|
+
onChange: (e) => {
|
|
89
|
+
M(e), z();
|
|
85
90
|
},
|
|
86
|
-
onFocus: () =>
|
|
87
|
-
onBlur: (
|
|
88
|
-
codeMirrorRef:
|
|
89
|
-
disableTabIndent:
|
|
90
|
-
disableEnter:
|
|
91
|
-
disableCloseBrackets:
|
|
92
|
-
lineNumbers:
|
|
93
|
-
language:
|
|
94
|
-
lint:
|
|
95
|
-
extensions:
|
|
96
|
-
placeholder:
|
|
91
|
+
onFocus: () => k.value = !0,
|
|
92
|
+
onBlur: (e) => U(e),
|
|
93
|
+
codeMirrorRef: D,
|
|
94
|
+
disableTabIndent: s(() => o.disableTabIndent),
|
|
95
|
+
disableEnter: s(() => o.disableEnter),
|
|
96
|
+
disableCloseBrackets: s(() => o.disableCloseBrackets),
|
|
97
|
+
lineNumbers: s(() => o.lineNumbers),
|
|
98
|
+
language: s(() => o.language),
|
|
99
|
+
lint: s(() => o.lint),
|
|
100
|
+
extensions: v,
|
|
101
|
+
placeholder: s(() => o.placeholder)
|
|
97
102
|
});
|
|
98
|
-
(
|
|
99
|
-
|
|
103
|
+
(F = r.value) == null || F.focus(), Q(r, () => {
|
|
104
|
+
r.value && Object.prototype.hasOwnProperty.call(B, "autofocus") && r.value.focus();
|
|
100
105
|
});
|
|
101
|
-
const { handleDropdownSelect:
|
|
102
|
-
codeMirror:
|
|
103
|
-
query:
|
|
104
|
-
showDropdown:
|
|
105
|
-
dropdownPosition:
|
|
106
|
-
}),
|
|
107
|
-
var
|
|
108
|
-
return
|
|
106
|
+
const { handleDropdownSelect: j, updateDropdownVisibility: z } = ee({
|
|
107
|
+
codeMirror: r,
|
|
108
|
+
query: C,
|
|
109
|
+
showDropdown: y,
|
|
110
|
+
dropdownPosition: S
|
|
111
|
+
}), L = G(() => {
|
|
112
|
+
var e;
|
|
113
|
+
return o.type === "boolean" || (e = o.type) != null && e.includes("boolean") || o.nullable ? ["true", "false", "null"] : ["true", "false"];
|
|
109
114
|
});
|
|
110
115
|
N({
|
|
111
116
|
focus: () => {
|
|
112
|
-
var
|
|
113
|
-
(
|
|
117
|
+
var e;
|
|
118
|
+
(e = r.value) == null || e.focus();
|
|
114
119
|
}
|
|
115
120
|
});
|
|
116
|
-
const
|
|
117
|
-
var
|
|
118
|
-
|
|
121
|
+
const h = (e, l) => {
|
|
122
|
+
var p, t, E;
|
|
123
|
+
y.value && (e === "down" ? (l.preventDefault(), (p = m.value) == null || p.handleArrowKey("down")) : e === "up" ? (l.preventDefault(), (t = m.value) == null || t.handleArrowKey("up")) : e === "enter" && (l.preventDefault(), (E = m.value) == null || E.handleSelect()));
|
|
119
124
|
};
|
|
120
|
-
return (
|
|
121
|
-
var
|
|
122
|
-
return
|
|
123
|
-
e.
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
modelValue: e.modelValue,
|
|
127
|
-
value: e.enum,
|
|
128
|
-
"onUpdate:modelValue": t[0] || (t[0] = (l) => i("update:modelValue", l))
|
|
129
|
-
}, null, 8, ["default", "modelValue", "value"])) : e.type === "boolean" || (d = e.type) != null && d.includes("boolean") ? (s(), h(q, {
|
|
125
|
+
return (e, l) => {
|
|
126
|
+
var p;
|
|
127
|
+
return n(), i(H, null, [
|
|
128
|
+
e.disabled ? (n(), i("div", pe, [
|
|
129
|
+
w("span", me, X(e.modelValue), 1)
|
|
130
|
+
])) : o.enum && o.enum.length ? (n(), f(g, {
|
|
130
131
|
key: 1,
|
|
131
|
-
default:
|
|
132
|
+
default: o.default,
|
|
132
133
|
modelValue: e.modelValue,
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
134
|
+
type: e.type,
|
|
135
|
+
value: o.enum,
|
|
136
|
+
"onUpdate:modelValue": l[0] || (l[0] = (t) => u("update:modelValue", t))
|
|
137
|
+
}, null, 8, ["default", "modelValue", "type", "value"])) : e.type === "boolean" || (p = e.type) != null && p.includes("boolean") ? (n(), f(g, {
|
|
136
138
|
key: 2,
|
|
137
|
-
|
|
138
|
-
|
|
139
|
+
default: o.default,
|
|
140
|
+
modelValue: e.modelValue,
|
|
141
|
+
value: L.value,
|
|
142
|
+
"onUpdate:modelValue": l[1] || (l[1] = (t) => u("update:modelValue", t))
|
|
143
|
+
}, null, 8, ["default", "modelValue", "value"])) : o.examples && o.examples.length ? (n(), f(g, {
|
|
144
|
+
key: 3,
|
|
145
|
+
default: o.default,
|
|
146
|
+
modelValue: o.modelValue,
|
|
147
|
+
value: o.examples,
|
|
148
|
+
"onUpdate:modelValue": l[2] || (l[2] = (t) => u("update:modelValue", t))
|
|
149
|
+
}, null, 8, ["default", "modelValue", "value"])) : (n(), i("div", Y({
|
|
150
|
+
key: 4,
|
|
151
|
+
id: a(A)
|
|
152
|
+
}, e.$attrs, {
|
|
139
153
|
ref_key: "codeMirrorRef",
|
|
140
|
-
ref:
|
|
141
|
-
class: ["peer font-code w-full whitespace-nowrap overflow-hidden text-xs leading-[1.44] relative has-[:focus-visible]:outline has-[:focus-visible]:rounded-[4px] -outline-offset-
|
|
142
|
-
"flow-code-input--error":
|
|
154
|
+
ref: D,
|
|
155
|
+
class: ["peer font-code w-full whitespace-nowrap overflow-hidden text-xs leading-[1.44] relative has-[:focus-visible]:outline has-[:focus-visible]:rounded-[4px] -outline-offset-1", {
|
|
156
|
+
"flow-code-input--error": e.error
|
|
143
157
|
}],
|
|
144
158
|
onKeydown: [
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
159
|
+
l[4] || (l[4] = V($((t) => h("down", t), ["stop"]), ["down"])),
|
|
160
|
+
l[5] || (l[5] = V((t) => h("enter", t), ["enter"])),
|
|
161
|
+
l[6] || (l[6] = V($((t) => h("up", t), ["stop"]), ["up"]))
|
|
148
162
|
]
|
|
149
163
|
}), [
|
|
150
|
-
|
|
151
|
-
|
|
164
|
+
e.isCopyable ? (n(), i("div", ce, [
|
|
165
|
+
w("button", {
|
|
152
166
|
class: "copy-button",
|
|
153
167
|
type: "button",
|
|
154
|
-
onClick:
|
|
168
|
+
onClick: l[3] || (l[3] = (t) => a(K)(a(ue)(e.modelValue)))
|
|
155
169
|
}, [
|
|
156
|
-
|
|
157
|
-
|
|
170
|
+
l[7] || (l[7] = w("span", { class: "sr-only" }, "Copy content", -1)),
|
|
171
|
+
Z(a(se), {
|
|
158
172
|
icon: "Clipboard",
|
|
159
173
|
size: "md"
|
|
160
174
|
})
|
|
161
175
|
])
|
|
162
|
-
])) :
|
|
163
|
-
], 16,
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
])) :
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
key:
|
|
176
|
+
])) : c("", !0)
|
|
177
|
+
], 16, fe)),
|
|
178
|
+
e.$slots.warning ? (n(), i("div", ye, [
|
|
179
|
+
q(e.$slots, "warning", {}, void 0, !0)
|
|
180
|
+
])) : c("", !0),
|
|
181
|
+
q(e.$slots, "icon", {}, void 0, !0),
|
|
182
|
+
e.required ? (n(), i("div", be, " Required ")) : c("", !0),
|
|
183
|
+
y.value && e.withVariables && a(P) !== "modal" && a(b) ? (n(), f(ae, {
|
|
184
|
+
key: 7,
|
|
171
185
|
ref_key: "dropdownRef",
|
|
172
|
-
ref:
|
|
173
|
-
dropdownPosition:
|
|
174
|
-
envVariables:
|
|
175
|
-
environment:
|
|
176
|
-
query:
|
|
177
|
-
onSelect:
|
|
178
|
-
}, null, 8, ["dropdownPosition", "envVariables", "environment", "query", "onSelect"])) :
|
|
186
|
+
ref: m,
|
|
187
|
+
dropdownPosition: S.value,
|
|
188
|
+
envVariables: a(x),
|
|
189
|
+
environment: a(b),
|
|
190
|
+
query: C.value,
|
|
191
|
+
onSelect: a(j)
|
|
192
|
+
}, null, 8, ["dropdownPosition", "envVariables", "environment", "query", "onSelect"])) : c("", !0)
|
|
179
193
|
], 64);
|
|
180
194
|
};
|
|
181
195
|
}
|
|
182
196
|
});
|
|
183
197
|
export {
|
|
184
|
-
|
|
198
|
+
Fe as default
|
|
185
199
|
};
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { type EnvVariables } from '../../libs/env-helpers.js';
|
|
2
|
-
import type { WorkspaceStore } from '../../store/index.js';
|
|
3
2
|
import type { Environment } from '@scalar/oas-utils/entities/environment';
|
|
4
3
|
import type { Workspace } from '@scalar/oas-utils/entities/workspace';
|
|
5
4
|
import { Decoration, type DecorationSet, EditorView, ViewPlugin, type ViewUpdate } from '@scalar/use-codemirror';
|
|
6
|
-
type IsReadOnly = WorkspaceStore['isReadOnly'];
|
|
7
5
|
/**
|
|
8
6
|
* Styles the active environment variable pill
|
|
9
7
|
*/
|
|
@@ -11,12 +9,11 @@ export declare const pillPlugin: (props: {
|
|
|
11
9
|
environment?: Environment;
|
|
12
10
|
envVariables?: EnvVariables;
|
|
13
11
|
workspace?: Workspace;
|
|
14
|
-
isReadOnly?:
|
|
12
|
+
isReadOnly?: boolean;
|
|
15
13
|
}) => ViewPlugin<{
|
|
16
14
|
decorations: DecorationSet;
|
|
17
15
|
update(update: ViewUpdate): void;
|
|
18
16
|
buildDecorations(view: EditorView): import("@codemirror/state").RangeSet<Decoration>;
|
|
19
17
|
}>;
|
|
20
18
|
export declare const backspaceCommand: import("@codemirror/state").Extension;
|
|
21
|
-
export {};
|
|
22
19
|
//# sourceMappingURL=codeVariableWidget.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codeVariableWidget.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/codeVariableWidget.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAe,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"codeVariableWidget.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/codeVariableWidget.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAe,MAAM,oBAAoB,CAAA;AAEnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAErE,OAAO,EACL,UAAU,EACV,KAAK,aAAa,EAClB,UAAU,EAEV,UAAU,EACV,KAAK,UAAU,EAEhB,MAAM,wBAAwB,CAAA;AAmI/B;;GAEG;AACH,eAAO,MAAM,UAAU,UAAW;IAChC,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB,YAAY,CAAC,EAAE,YAAY,CAAA;IAC3B,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;iBAGkB,aAAa;mBAMX,UAAU;2BASF,UAAU;EAkCpC,CAAA;AAEH,eAAO,MAAM,gBAAgB,uCA8B3B,CAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
2
|
modelValue?: string;
|
|
3
3
|
placeholder?: string;
|
|
4
|
+
autofocus?: boolean;
|
|
4
5
|
};
|
|
5
6
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
6
7
|
"update:modelValue": (v: string) => any;
|
|
@@ -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":"AAgEA,KAAK,WAAW,GAAG;IACjB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAC;;;;;;;;AAkHF,wBAOG"}
|
|
@@ -1,46 +1,49 @@
|
|
|
1
|
-
import { defineComponent as f, ref as c, onMounted as h, nextTick as g, computed as v, withDirectives as w, openBlock as x, createElementBlock as
|
|
1
|
+
import { defineComponent as f, ref as c, onMounted as h, nextTick as g, computed as v, withDirectives as w, openBlock as x, createElementBlock as y, mergeProps as k, withKeys as s, vModelText as D } from "vue";
|
|
2
2
|
const E = ["placeholder"], b = /* @__PURE__ */ f({
|
|
3
3
|
inheritAttrs: !1,
|
|
4
4
|
__name: "CommandActionInput",
|
|
5
5
|
props: {
|
|
6
6
|
modelValue: {},
|
|
7
|
-
placeholder: {}
|
|
7
|
+
placeholder: {},
|
|
8
|
+
autofocus: { type: Boolean }
|
|
8
9
|
},
|
|
9
10
|
emits: ["update:modelValue", "onDelete"],
|
|
10
11
|
setup(i, { emit: p }) {
|
|
11
|
-
const
|
|
12
|
-
h(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
const n = i, r = p, a = c(null);
|
|
13
|
+
h(
|
|
14
|
+
() => g(() => {
|
|
15
|
+
var e;
|
|
16
|
+
n.autofocus || (e = a.value) == null || e.focus();
|
|
17
|
+
})
|
|
18
|
+
);
|
|
19
|
+
const l = v({
|
|
20
|
+
get: () => n.modelValue ?? "",
|
|
18
21
|
set: (e) => r("update:modelValue", e)
|
|
19
22
|
});
|
|
20
23
|
function d(e) {
|
|
21
24
|
var u;
|
|
22
25
|
if (e.shiftKey || !e.target) return;
|
|
23
26
|
e.preventDefault();
|
|
24
|
-
const t = e.target,
|
|
25
|
-
(u = t.form) == null || u.dispatchEvent(
|
|
27
|
+
const t = e.target, o = new Event("submit", { cancelable: !0 });
|
|
28
|
+
(u = t.form) == null || u.dispatchEvent(o);
|
|
26
29
|
}
|
|
27
30
|
function m(e) {
|
|
28
|
-
|
|
31
|
+
l.value === "" && (e.preventDefault(), e.stopPropagation(), r("onDelete", e));
|
|
29
32
|
}
|
|
30
|
-
return (e, t) => w((x(),
|
|
33
|
+
return (e, t) => w((x(), y("textarea", k({
|
|
31
34
|
ref_key: "input",
|
|
32
35
|
ref: a,
|
|
33
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
36
|
+
"onUpdate:modelValue": t[0] || (t[0] = (o) => l.value = o),
|
|
34
37
|
class: "border-none outline-none flex-1 w-full pl-8 text-sm min-h-8 py-1.5 resize-none",
|
|
35
|
-
placeholder:
|
|
38
|
+
placeholder: n.placeholder,
|
|
36
39
|
wrap: "hard"
|
|
37
40
|
}, e.$attrs, {
|
|
38
41
|
onKeydown: [
|
|
39
|
-
t[1] || (t[1] = s((
|
|
40
|
-
t[2] || (t[2] = s((
|
|
42
|
+
t[1] || (t[1] = s((o) => m(o), ["delete"])),
|
|
43
|
+
t[2] || (t[2] = s((o) => d(o), ["enter"]))
|
|
41
44
|
]
|
|
42
45
|
}), null, 16, E)), [
|
|
43
|
-
[D,
|
|
46
|
+
[D, l.value]
|
|
44
47
|
]);
|
|
45
48
|
}
|
|
46
49
|
});
|
|
@@ -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":"AAkZA;;;;GAIG;;AACH,wBAieI;AAEJ,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBA7f9B,CA9OiD;qBA8OjD,CA7OQ;;;;;;;mBA6OR,CA9OiD;qBA8OjD,CA7OQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkvBE,CAAA;AAEV,yCAAyC;AACzC,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,iBAAiB,CAAA;AAEzD,MAAM,MAAM,mBAAmB,GAAG;IAChC,8DAA8D;IAC9D,WAAW,CAAC,EAAE,YAAY,CAAA;IAC1B,iEAAiE;IACjE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAC/B,CACA"}
|
|
@@ -2,8 +2,8 @@ import o from "./TheCommandPalette.vue2.js";
|
|
|
2
2
|
import { PaletteComponents as s } from "./TheCommandPalette.vue2.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
-
const
|
|
5
|
+
const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-f73a73e6"]]);
|
|
6
6
|
export {
|
|
7
7
|
s as PaletteComponents,
|
|
8
|
-
|
|
8
|
+
r as default
|
|
9
9
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTableInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTableInput.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DataTableInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTableInput.vue"],"names":[],"mappings":"AAoKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAS/C,KAAK,WAAW,GAAG;IACf,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,sEAAsE;IACtE,cAAc,CAAC,EAAE,YAAY,CAAA;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,EAAE,MAAM,GAAG,MAAM,CAAA;IAC3B,0EAA0E;IAC1E,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,CAAC;AAwCJ,iBAAS,cAAc;WA4OT,OAAO,IAA6B;;yBAVrB,GAAG;yBACF,GAAG;sBACN,GAAG;;;;EAa7B;AAkBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;cApTN,OAAO;2BAGM,OAAO;cACpB,OAAO;6EAwTpB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAgBpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./DataTableInput.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const e = /* @__PURE__ */
|
|
3
|
+
import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const e = /* @__PURE__ */ o(t, [["__scopeId", "data-v-de383491"]]);
|
|
5
5
|
export {
|
|
6
6
|
e as default
|
|
7
7
|
};
|
|
@@ -3,6 +3,7 @@ type __VLS_Props = {
|
|
|
3
3
|
value?: string[];
|
|
4
4
|
default?: string | number;
|
|
5
5
|
canAddCustomValue?: boolean;
|
|
6
|
+
type?: string;
|
|
6
7
|
};
|
|
7
8
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
8
9
|
"update:modelValue": (v: string) => any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTableInputSelect.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTableInputSelect.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DataTableInputSelect.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTableInputSelect.vue"],"names":[],"mappings":"AA8LA,KAAK,WAAW,GAAG;IACf,UAAU,EAAE,MAAM,GAAG,MAAM,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACzB,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAC;;;;;;uBAFoB,OAAO;;AAyW/B,wBASG"}
|