@scalar/api-client 2.1.17 → 2.1.19
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 +43 -0
- package/dist/components/AddressBar/AddressBar.vue.d.ts +5 -1
- package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBar.vue.js +2 -2
- package/dist/components/AddressBar/AddressBar.vue2.js +78 -75
- package/dist/components/AddressBar/AddressBarHistory.vue.js +2 -2
- package/dist/components/AddressBar/AddressBarHistory.vue2.js +8 -8
- package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarServer.vue.js +6 -6
- package/dist/components/CodeInput/CodeInput.vue.d.ts +6 -2
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +2 -2
- package/dist/components/CodeInput/CodeInput.vue2.js +57 -49
- package/dist/components/CommandPalette/CommandActionForm.vue.d.ts +3 -0
- package/dist/components/CommandPalette/CommandActionForm.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandActionForm.vue.js +13 -11
- package/dist/components/CommandPalette/CommandActionInput.vue.d.ts +0 -2
- package/dist/components/CommandPalette/CommandActionInput.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandActionInput.vue.js +36 -38
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts +1 -1
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts +1 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts +1 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +100 -80
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts +1 -1
- package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts +1 -1
- package/dist/components/CommandPalette/CommandPaletteTag.vue.d.ts +1 -1
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.d.ts +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +7 -7
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +4 -4
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +42 -42
- package/dist/components/ContextBar.vue.d.ts.map +1 -1
- package/dist/components/ContextBar.vue.js +2 -2
- package/dist/components/DataTable/DataTableCheckbox.vue.d.ts +19 -3
- package/dist/components/DataTable/DataTableCheckbox.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableCheckbox.vue.js +27 -14
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +8 -8
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
- package/dist/components/ImportCurl/ImportCurlModal.vue.d.ts +39 -0
- package/dist/components/ImportCurl/ImportCurlModal.vue.d.ts.map +1 -0
- package/dist/components/ImportCurl/ImportCurlModal.vue.js +7 -0
- package/dist/components/ImportCurl/ImportCurlModal.vue2.js +88 -0
- package/dist/components/SideNav/SideHelp.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNav.vue.js +1 -1
- package/dist/components/SideNav/SideNav.vue2.js +37 -26
- package/dist/components/SideNav/SideNavLink.vue.d.ts +2 -2
- package/dist/components/SideNav/SideNavLink.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNavLink.vue.js +10 -11
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.d.ts +1 -1
- package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.js +1 -1
- package/dist/components/Sidebar/Sidebar.vue2.js +1 -1
- package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarButton.vue.js +1 -1
- package/dist/components/Sidebar/SidebarListElement.vue.d.ts +24 -3
- package/dist/components/Sidebar/SidebarListElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarListElement.vue.js +2 -2
- package/dist/components/Sidebar/SidebarListElement.vue2.js +26 -22
- package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts +4 -0
- package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarListElementActions.vue.js +35 -32
- package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNav.vue.js +1 -1
- package/dist/components/TopNav/TopNav.vue2.js +1 -1
- package/dist/components/ViewLayout/ViewLayout.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayout.vue.js +7 -7
- package/dist/components/ViewLayout/ViewLayoutContent.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutContent.vue.js +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +11 -11
- package/dist/constants.d.ts +4 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +2 -1
- package/dist/hooks/useDarkModeState.d.ts +4 -3
- package/dist/hooks/useDarkModeState.d.ts.map +1 -1
- package/dist/hooks/useDarkModeState.js +36 -21
- package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
- package/dist/layouts/App/ApiClientApp.vue.js +34 -41
- package/dist/layouts/App/create-api-client-app.d.ts +35 -32
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
- package/dist/layouts/Modal/ApiClientModal.vue2.js +6 -6
- package/dist/layouts/Modal/create-api-client-modal.d.ts +70 -64
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Web/ApiClientWeb.vue.d.ts.map +1 -1
- package/dist/layouts/Web/ApiClientWeb.vue.js +35 -42
- package/dist/layouts/Web/create-api-client-web.d.ts +35 -32
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +35 -32
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/event-busses/hot-keys-bus.d.ts +1 -1
- package/dist/libs/extractAttachmentFilename.d.ts +2 -0
- package/dist/libs/extractAttachmentFilename.d.ts.map +1 -0
- package/dist/libs/extractAttachmentFilename.js +20 -0
- package/dist/libs/getOpenApiDocumentDetails.d.ts +10 -0
- package/dist/libs/getOpenApiDocumentDetails.d.ts.map +1 -0
- package/dist/libs/getOpenApiDocumentDetails.js +40 -0
- package/dist/libs/importers/curl.d.ts +3 -0
- package/dist/libs/importers/curl.d.ts.map +1 -0
- package/dist/libs/importers/curl.js +61 -0
- package/dist/libs/importers/index.d.ts +2 -0
- package/dist/libs/importers/index.d.ts.map +1 -0
- package/dist/libs/importers/index.js +4 -0
- package/dist/libs/index.d.ts +2 -2
- package/dist/libs/index.d.ts.map +1 -1
- package/dist/libs/index.js +22 -22
- package/dist/libs/isUrl.d.ts +1 -1
- package/dist/libs/isUrl.d.ts.map +1 -1
- package/dist/libs/isUrl.js +4 -3
- package/dist/libs/parse-curl.d.ts +12 -0
- package/dist/libs/parse-curl.d.ts.map +1 -0
- package/dist/libs/parse-curl.js +70 -0
- package/dist/router.d.ts +2 -1
- package/dist/router.d.ts.map +1 -1
- package/dist/router.js +33 -24
- package/dist/store/collections.d.ts +4 -4
- package/dist/store/cookies.d.ts +4 -4
- package/dist/store/environment.d.ts +4 -4
- package/dist/store/import-spec.d.ts.map +1 -1
- package/dist/store/import-spec.js +21 -26
- package/dist/store/request-example.d.ts +4 -4
- package/dist/store/requests.d.ts +4 -4
- package/dist/store/router-params.d.ts +1 -0
- package/dist/store/router-params.d.ts.map +1 -1
- package/dist/store/router-params.js +2 -1
- package/dist/store/servers.d.ts +4 -4
- package/dist/store/store.d.ts +70 -64
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/store.js +126 -119
- package/dist/store/tags.d.ts +4 -4
- package/dist/store/workspace.d.ts +4 -4
- package/dist/style.css +1 -1
- package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +18 -18
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +9 -9
- package/dist/views/Request/Request.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.js +1 -1
- package/dist/views/Request/Request.vue2.js +146 -96
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +1 -1
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +4 -4
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.js +3 -3
- package/dist/views/Request/RequestSidebar.vue2.js +2 -2
- 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 +49 -49
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts +2 -0
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue.js +4 -4
- package/dist/views/Request/RequestSubpageHeader.vue2.js +17 -15
- package/dist/views/Request/ResponseSection/ResponseBody.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBody.vue.js +63 -55
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.d.ts +2 -0
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.js +14 -14
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue2.js +1 -1
- package/dist/views/Settings/Settings.vue.d.ts +4 -0
- package/dist/views/Settings/Settings.vue.d.ts.map +1 -0
- package/dist/views/Settings/Settings.vue.js +4 -0
- package/dist/views/Settings/Settings.vue2.js +59 -0
- package/dist/{components/DarkModeToggle/DarkModeIconToggle.vue.d.ts → views/Settings/SettingsGeneral.vue.d.ts} +1 -1
- package/dist/views/Settings/SettingsGeneral.vue.d.ts.map +1 -0
- package/dist/views/Settings/SettingsGeneral.vue.js +124 -0
- package/dist/views/Settings/SettingsGeneral.vue2.js +4 -0
- package/dist/views/Settings/SettingsGeneralMode.vue.d.ts +3 -0
- package/dist/views/Settings/SettingsGeneralMode.vue.d.ts.map +1 -0
- package/dist/views/Settings/SettingsGeneralMode.vue.js +78 -0
- package/dist/views/Settings/SettingsGeneralMode.vue2.js +4 -0
- package/package.json +60 -36
- package/dist/components/DarkModeToggle/DarkModeIconToggle.vue.d.ts.map +0 -1
- package/dist/components/DarkModeToggle/DarkModeIconToggle.vue.js +0 -31
- package/dist/components/DarkModeToggle/DarkModeIconToggle.vue2.js +0 -4
- package/dist/components/DarkModeToggle/index.d.ts +0 -2
- package/dist/components/DarkModeToggle/index.d.ts.map +0 -1
- package/dist/components/DarkModeToggle/index.js +0 -4
- package/dist/components/ScreenReader.vue.js +0 -7
- package/dist/components/ScreenReader.vue2.js +0 -18
- package/dist/libs/getOpenApiDocumentVersion.d.ts +0 -8
- package/dist/libs/getOpenApiDocumentVersion.d.ts.map +0 -1
- package/dist/libs/getOpenApiDocumentVersion.js +0 -20
- package/dist/libs/isDocument.d.ts +0 -3
- package/dist/libs/isDocument.d.ts.map +0 -1
- package/dist/libs/isDocument.js +0 -7
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as T, useAttrs as A, ref as
|
|
2
|
-
import { useCodeMirror as
|
|
3
|
-
import { nanoid as
|
|
1
|
+
import { defineComponent as T, useAttrs as A, ref as u, toRef as t, watch as U, computed as C, openBlock as a, createElementBlock as s, Fragment as W, createBlock as p, mergeProps as j, unref as i, renderSlot as _, createCommentVNode as m } from "vue";
|
|
2
|
+
import { useCodeMirror as L, useDropdown as Q, colorPicker as z } from "@scalar/use-codemirror";
|
|
3
|
+
import { nanoid as G } from "nanoid";
|
|
4
4
|
import x from "../DataTable/DataTableInputSelect.vue.js";
|
|
5
|
-
import { pillPlugin as
|
|
6
|
-
import
|
|
5
|
+
import { pillPlugin as H, backspaceCommand as J } from "./codeVariableWidget.js";
|
|
6
|
+
import K from "../../views/Environment/EnvironmentVariableDropdown.vue.js";
|
|
7
7
|
import { useWorkspace as X } from "../../store/store.js";
|
|
8
8
|
const Y = ["id"], Z = {
|
|
9
9
|
key: 3,
|
|
@@ -34,32 +34,40 @@ const Y = ["id"], Z = {
|
|
|
34
34
|
enum: {},
|
|
35
35
|
type: {},
|
|
36
36
|
nullable: { type: Boolean, default: !1 },
|
|
37
|
-
withVariables: { type: Boolean, default: !0 }
|
|
37
|
+
withVariables: { type: Boolean, default: !0 },
|
|
38
|
+
importCurl: { type: Boolean }
|
|
38
39
|
},
|
|
39
|
-
emits: ["submit", "update:modelValue"],
|
|
40
|
-
setup(
|
|
40
|
+
emits: ["submit", "update:modelValue", "curl"],
|
|
41
|
+
setup(S, { expose: F, emit: P }) {
|
|
41
42
|
var B;
|
|
42
|
-
const e =
|
|
43
|
+
const e = S, r = P, f = A(), q = f.id || `id-${G()}`, b = u(!1), h = u(!1), y = u(""), v = u({ left: 0, top: 0 }), { activeEnvVariables: g, isReadOnly: V, environments: E, router: $ } = X();
|
|
43
44
|
function O(o) {
|
|
44
|
-
|
|
45
|
+
var n;
|
|
46
|
+
return o === e.modelValue ? null : e.importCurl && o.trim().toLowerCase().startsWith("curl") ? (r("curl", o), (n = l.value) == null || n.dispatch({
|
|
47
|
+
changes: {
|
|
48
|
+
from: 0,
|
|
49
|
+
to: l.value.state.doc.length,
|
|
50
|
+
insert: String(e.modelValue)
|
|
51
|
+
}
|
|
52
|
+
}), null) : e.handleFieldChange ? e.handleFieldChange(o) : r("update:modelValue", o);
|
|
45
53
|
}
|
|
46
54
|
function R(o) {
|
|
47
|
-
return e.handleFieldSubmit ? e.handleFieldSubmit(o) :
|
|
55
|
+
return e.handleFieldSubmit ? e.handleFieldSubmit(o) : r("submit", o);
|
|
48
56
|
}
|
|
49
57
|
function D(o) {
|
|
50
58
|
b.value = !1, e.emitOnBlur && e.modelValue && R(o);
|
|
51
59
|
}
|
|
52
60
|
const d = [];
|
|
53
|
-
e.colorPicker && d.push(
|
|
54
|
-
|
|
61
|
+
e.colorPicker && d.push(z), d.push(
|
|
62
|
+
H({
|
|
55
63
|
environments: E,
|
|
56
64
|
activeEnvVariables: g,
|
|
57
65
|
isReadOnly: V
|
|
58
66
|
}),
|
|
59
|
-
|
|
67
|
+
J
|
|
60
68
|
);
|
|
61
|
-
const w =
|
|
62
|
-
content:
|
|
69
|
+
const w = u(null), { codeMirror: l } = L({
|
|
70
|
+
content: t(
|
|
63
71
|
() => e.modelValue !== void 0 ? String(e.modelValue) : ""
|
|
64
72
|
),
|
|
65
73
|
onChange: (o) => {
|
|
@@ -68,48 +76,48 @@ const Y = ["id"], Z = {
|
|
|
68
76
|
onFocus: () => b.value = !0,
|
|
69
77
|
onBlur: (o) => D(o),
|
|
70
78
|
codeMirrorRef: w,
|
|
71
|
-
disableTabIndent:
|
|
72
|
-
disableEnter:
|
|
73
|
-
disableCloseBrackets:
|
|
74
|
-
lineNumbers:
|
|
75
|
-
language:
|
|
76
|
-
lint:
|
|
79
|
+
disableTabIndent: t(() => e.disableTabIndent),
|
|
80
|
+
disableEnter: t(() => e.disableEnter),
|
|
81
|
+
disableCloseBrackets: t(() => e.disableCloseBrackets),
|
|
82
|
+
lineNumbers: t(() => e.lineNumbers),
|
|
83
|
+
language: t(() => e.language),
|
|
84
|
+
lint: t(() => e.lint),
|
|
77
85
|
extensions: d,
|
|
78
|
-
placeholder:
|
|
86
|
+
placeholder: t(() => e.placeholder)
|
|
79
87
|
});
|
|
80
|
-
(B =
|
|
81
|
-
|
|
88
|
+
(B = l.value) == null || B.focus(), U(l, () => {
|
|
89
|
+
l.value && Object.prototype.hasOwnProperty.call(f, "autofocus") && l.value.focus();
|
|
82
90
|
});
|
|
83
|
-
const { handleDropdownSelect: I, updateDropdownVisibility: M } =
|
|
84
|
-
codeMirror:
|
|
85
|
-
query:
|
|
86
|
-
showDropdown:
|
|
91
|
+
const { handleDropdownSelect: I, updateDropdownVisibility: M } = Q({
|
|
92
|
+
codeMirror: l,
|
|
93
|
+
query: y,
|
|
94
|
+
showDropdown: h,
|
|
87
95
|
dropdownPosition: v
|
|
88
|
-
}), N =
|
|
96
|
+
}), N = C(() => {
|
|
89
97
|
var o;
|
|
90
98
|
return e.type === "boolean" || (o = e.type) != null && o.includes("boolean") || e.nullable ? ["true", "false", "null"] : ["true", "false"];
|
|
91
99
|
});
|
|
92
|
-
return
|
|
100
|
+
return F({
|
|
93
101
|
focus: () => {
|
|
94
102
|
var o;
|
|
95
|
-
(o =
|
|
103
|
+
(o = l.value) == null || o.focus();
|
|
96
104
|
}
|
|
97
|
-
}), (o,
|
|
105
|
+
}), (o, n) => {
|
|
98
106
|
var k;
|
|
99
|
-
return
|
|
100
|
-
e.enum && e.enum.length ? (
|
|
107
|
+
return a(), s(W, null, [
|
|
108
|
+
e.enum && e.enum.length ? (a(), p(x, {
|
|
101
109
|
key: 0,
|
|
102
110
|
modelValue: e.modelValue,
|
|
103
111
|
value: e.enum,
|
|
104
|
-
"onUpdate:modelValue":
|
|
105
|
-
}, null, 8, ["modelValue", "value"])) : e.type === "boolean" || (k = e.type) != null && k.includes("boolean") ? (
|
|
112
|
+
"onUpdate:modelValue": n[0] || (n[0] = (c) => r("update:modelValue", c))
|
|
113
|
+
}, null, 8, ["modelValue", "value"])) : e.type === "boolean" || (k = e.type) != null && k.includes("boolean") ? (a(), p(x, {
|
|
106
114
|
key: 1,
|
|
107
115
|
modelValue: e.modelValue,
|
|
108
116
|
value: N.value,
|
|
109
|
-
"onUpdate:modelValue":
|
|
110
|
-
}, null, 8, ["modelValue", "value"])) : (
|
|
117
|
+
"onUpdate:modelValue": n[1] || (n[1] = (c) => r("update:modelValue", c))
|
|
118
|
+
}, null, 8, ["modelValue", "value"])) : (a(), s("div", j({
|
|
111
119
|
key: 2,
|
|
112
|
-
id:
|
|
120
|
+
id: i(q)
|
|
113
121
|
}, o.$attrs, {
|
|
114
122
|
ref_key: "codeMirrorRef",
|
|
115
123
|
ref: w,
|
|
@@ -117,18 +125,18 @@ const Y = ["id"], Z = {
|
|
|
117
125
|
"flow-code-input--error": o.error
|
|
118
126
|
}]
|
|
119
127
|
}), null, 16, Y)),
|
|
120
|
-
o.$slots.warning ? (
|
|
121
|
-
|
|
128
|
+
o.$slots.warning ? (a(), s("div", Z, [
|
|
129
|
+
_(o.$slots, "warning", {}, void 0, !0)
|
|
122
130
|
])) : m("", !0),
|
|
123
|
-
|
|
124
|
-
o.required ? (
|
|
125
|
-
|
|
131
|
+
_(o.$slots, "icon", {}, void 0, !0),
|
|
132
|
+
o.required ? (a(), s("div", ee, " Required ")) : m("", !0),
|
|
133
|
+
h.value && e.withVariables && !i(V) ? (a(), p(K, {
|
|
126
134
|
key: 5,
|
|
127
|
-
activeEnvVariables:
|
|
135
|
+
activeEnvVariables: C(() => i(g)),
|
|
128
136
|
dropdownPosition: v.value,
|
|
129
|
-
query:
|
|
130
|
-
router:
|
|
131
|
-
onSelect:
|
|
137
|
+
query: y.value,
|
|
138
|
+
router: i($),
|
|
139
|
+
onSelect: i(I)
|
|
132
140
|
}, null, 8, ["activeEnvVariables", "dropdownPosition", "query", "router", "onSelect"])) : m("", !0)
|
|
133
141
|
], 64);
|
|
134
142
|
};
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
+
import { type useLoadingState } from '@scalar/components';
|
|
1
2
|
declare function __VLS_template(): {
|
|
2
3
|
default?(_: {}): any;
|
|
3
4
|
options?(_: {}): any;
|
|
4
5
|
submit?(_: {}): any;
|
|
5
6
|
};
|
|
6
7
|
declare const __VLS_component: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
8
|
+
loading?: ReturnType<typeof useLoadingState>;
|
|
7
9
|
disabled?: boolean;
|
|
8
10
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
11
|
submit: () => void;
|
|
10
12
|
cancel: () => void;
|
|
11
13
|
back: (e: KeyboardEvent) => void;
|
|
12
14
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
15
|
+
loading?: ReturnType<typeof useLoadingState>;
|
|
13
16
|
disabled?: boolean;
|
|
14
17
|
}>>> & {
|
|
15
18
|
onSubmit?: (() => any) | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandActionForm.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandActionForm.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CommandActionForm.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandActionForm.vue"],"names":[],"mappings":"AAsCA,OAAO,EAAgB,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAsBvE,iBAAS,cAAc;qBA+DM,GAAG;qBACH,GAAG;oBACJ,GAAG;EAgB9B;AACD,QAAA,MAAM,eAAe;cAnGT,UAAU,CAAC,OAAO,eAAe,CAAC;eACjC,OAAO;;;;;;cADR,UAAU,CAAC,OAAO,eAAe,CAAC;eACjC,OAAO;;;;;UAyGlB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC;AAEN,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
|
@@ -1,28 +1,30 @@
|
|
|
1
|
-
import { defineComponent as n, openBlock as i, createElementBlock as a, withKeys as d, withModifiers as l, createElementVNode as
|
|
1
|
+
import { defineComponent as n, openBlock as i, createElementBlock as a, withKeys as d, withModifiers as l, createElementVNode as t, renderSlot as s, createVNode as r, unref as m, withCtx as p, createTextVNode as f } from "vue";
|
|
2
2
|
import { ScalarButton as u } from "@scalar/components";
|
|
3
|
-
const c = { class: "
|
|
3
|
+
const c = { class: "flex flex-col rounded min-h-20 relative" }, b = { class: "flex gap-2" }, x = { class: "flex flex-1 max-h-8" }, _ = /* @__PURE__ */ n({
|
|
4
4
|
__name: "CommandActionForm",
|
|
5
5
|
props: {
|
|
6
|
+
loading: {},
|
|
6
7
|
disabled: { type: Boolean }
|
|
7
8
|
},
|
|
8
9
|
emits: ["submit", "cancel", "back"],
|
|
9
|
-
setup(
|
|
10
|
-
return (e,
|
|
10
|
+
setup(g) {
|
|
11
|
+
return (e, o) => (i(), a("form", {
|
|
11
12
|
class: "flex w-full flex-col gap-3",
|
|
12
|
-
onKeydown:
|
|
13
|
+
onKeydown: o[0] || (o[0] = d(l(() => {
|
|
13
14
|
}, ["stop"]), ["enter"])),
|
|
14
|
-
onSubmit:
|
|
15
|
+
onSubmit: o[1] || (o[1] = l((h) => e.$emit("submit"), ["prevent", "stop"]))
|
|
15
16
|
}, [
|
|
16
|
-
|
|
17
|
+
t("div", c, [
|
|
17
18
|
s(e.$slots, "default")
|
|
18
19
|
]),
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
t("div", b, [
|
|
21
|
+
t("div", x, [
|
|
21
22
|
s(e.$slots, "options")
|
|
22
23
|
]),
|
|
23
24
|
r(m(u), {
|
|
24
25
|
class: "max-h-8 text-xs p-0 px-3",
|
|
25
26
|
disabled: e.disabled,
|
|
27
|
+
loading: e.loading,
|
|
26
28
|
type: "submit"
|
|
27
29
|
}, {
|
|
28
30
|
default: p(() => [
|
|
@@ -31,11 +33,11 @@ const c = { class: "gap-3 rounded min-h-20 relative" }, b = { class: "flex gap-2
|
|
|
31
33
|
])
|
|
32
34
|
]),
|
|
33
35
|
_: 3
|
|
34
|
-
}, 8, ["disabled"])
|
|
36
|
+
}, 8, ["disabled", "loading"])
|
|
35
37
|
])
|
|
36
38
|
], 32));
|
|
37
39
|
}
|
|
38
40
|
});
|
|
39
41
|
export {
|
|
40
|
-
|
|
42
|
+
_ as default
|
|
41
43
|
};
|
|
@@ -4,12 +4,10 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
|
4
4
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
5
5
|
"update:modelValue": (v: string) => void;
|
|
6
6
|
onDelete: (event: KeyboardEvent) => void;
|
|
7
|
-
paste: (event: ClipboardEvent) => void;
|
|
8
7
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
9
8
|
modelValue?: string;
|
|
10
9
|
placeholder?: string;
|
|
11
10
|
}>>> & {
|
|
12
|
-
onPaste?: ((event: ClipboardEvent) => any) | undefined;
|
|
13
11
|
"onUpdate:modelValue"?: ((v: string) => any) | undefined;
|
|
14
12
|
onOnDelete?: ((event: KeyboardEvent) => any) | undefined;
|
|
15
13
|
}, {}, {}>;
|
|
@@ -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":";iBA0De,MAAM;kBACL,MAAM;;;;;iBADP,MAAM;kBACL,MAAM;;;;;AAiGtB,wBAOG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
|
@@ -1,51 +1,49 @@
|
|
|
1
|
-
import { defineComponent as f, ref as
|
|
2
|
-
|
|
3
|
-
const P = ["for"], A = ["id", "placeholder"], K = /* @__PURE__ */ f({
|
|
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 k, mergeProps as y, withKeys as s, vModelText as D } from "vue";
|
|
2
|
+
const E = ["placeholder"], b = /* @__PURE__ */ f({
|
|
4
3
|
inheritAttrs: !1,
|
|
5
4
|
__name: "CommandActionInput",
|
|
6
5
|
props: {
|
|
7
6
|
modelValue: {},
|
|
8
7
|
placeholder: {}
|
|
9
8
|
},
|
|
10
|
-
emits: ["update:modelValue", "onDelete"
|
|
9
|
+
emits: ["update:modelValue", "onDelete"],
|
|
11
10
|
setup(i, { emit: p }) {
|
|
12
|
-
const
|
|
13
|
-
|
|
11
|
+
const l = i, r = p, a = c(null);
|
|
12
|
+
h(() => g(() => {
|
|
14
13
|
var e;
|
|
15
|
-
return (e =
|
|
14
|
+
return (e = a.value) == null ? void 0 : e.focus();
|
|
16
15
|
}));
|
|
17
|
-
const
|
|
18
|
-
get: () =>
|
|
19
|
-
set: (e) =>
|
|
20
|
-
})
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
u(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
], 64));
|
|
16
|
+
const o = v({
|
|
17
|
+
get: () => l.modelValue ?? "",
|
|
18
|
+
set: (e) => r("update:modelValue", e)
|
|
19
|
+
});
|
|
20
|
+
function d(e) {
|
|
21
|
+
var u;
|
|
22
|
+
if (e.shiftKey || !e.target) return;
|
|
23
|
+
e.preventDefault();
|
|
24
|
+
const t = e.target, n = new Event("submit", { cancelable: !0 });
|
|
25
|
+
(u = t.form) == null || u.dispatchEvent(n);
|
|
26
|
+
}
|
|
27
|
+
function m(e) {
|
|
28
|
+
o.value === "" && (e.preventDefault(), e.stopPropagation(), r("onDelete", e));
|
|
29
|
+
}
|
|
30
|
+
return (e, t) => w((x(), k("textarea", y({
|
|
31
|
+
ref_key: "input",
|
|
32
|
+
ref: a,
|
|
33
|
+
"onUpdate:modelValue": t[0] || (t[0] = (n) => o.value = n),
|
|
34
|
+
class: "border-none outline-none flex-1 w-full pl-8 text-sm min-h-8 py-1.5 resize-none",
|
|
35
|
+
placeholder: l.placeholder,
|
|
36
|
+
wrap: "hard"
|
|
37
|
+
}, e.$attrs, {
|
|
38
|
+
onKeydown: [
|
|
39
|
+
t[1] || (t[1] = s((n) => m(n), ["delete"])),
|
|
40
|
+
t[2] || (t[2] = s((n) => d(n), ["enter"]))
|
|
41
|
+
]
|
|
42
|
+
}), null, 16, E)), [
|
|
43
|
+
[D, o.value]
|
|
44
|
+
]);
|
|
47
45
|
}
|
|
48
46
|
});
|
|
49
47
|
export {
|
|
50
|
-
|
|
48
|
+
b as default
|
|
51
49
|
};
|
|
@@ -2,8 +2,8 @@ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import
|
|
|
2
2
|
close: () => void;
|
|
3
3
|
back: (e: KeyboardEvent) => void;
|
|
4
4
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
5
|
-
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
6
5
|
onClose?: (() => any) | undefined;
|
|
6
|
+
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
7
7
|
}, {}, {}>;
|
|
8
8
|
export default _default;
|
|
9
9
|
//# sourceMappingURL=CommandPaletteCollection.vue.d.ts.map
|
|
@@ -12,8 +12,8 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
|
12
12
|
itemUid: string;
|
|
13
13
|
};
|
|
14
14
|
}>>> & {
|
|
15
|
-
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
16
15
|
onClose?: (() => any) | undefined;
|
|
16
|
+
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
17
17
|
}, {}, {}>;
|
|
18
18
|
export default _default;
|
|
19
19
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -2,8 +2,8 @@ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import
|
|
|
2
2
|
close: () => void;
|
|
3
3
|
back: (e: KeyboardEvent) => void;
|
|
4
4
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
5
|
-
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
6
5
|
onClose?: (() => any) | undefined;
|
|
6
|
+
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
7
7
|
}, {}, {}>;
|
|
8
8
|
export default _default;
|
|
9
9
|
//# sourceMappingURL=CommandPaletteImport.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandPaletteImport.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteImport.vue"],"names":[],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"CommandPaletteImport.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteImport.vue"],"names":[],"mappings":";;;;;;;AA6eA,wBAMG"}
|
|
@@ -1,76 +1,83 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarButton as
|
|
3
|
-
import { useToasts as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
const X = /* @__PURE__ */ V({
|
|
1
|
+
import { defineComponent as O, ref as P, computed as v, openBlock as l, createBlock as k, unref as n, withCtx as p, createVNode as y, createTextVNode as s, createElementBlock as c, Fragment as u, toDisplayString as _, createElementVNode as w, createCommentVNode as $ } from "vue";
|
|
2
|
+
import { useLoadingState as R, ScalarButton as h, ScalarIcon as T, ScalarCodeBlock as j } from "@scalar/components";
|
|
3
|
+
import { useToasts as M } from "@scalar/use-toasts";
|
|
4
|
+
import z from "./CommandActionForm.vue.js";
|
|
5
|
+
import E from "./CommandActionInput.vue.js";
|
|
6
|
+
import { getOpenApiDocumentDetails as W } from "../../libs/getOpenApiDocumentDetails.js";
|
|
7
|
+
import { isUrl as x } from "../../libs/isUrl.js";
|
|
8
|
+
import { useFileDialog as J } from "../../hooks/useFileDialog.js";
|
|
9
|
+
import { useWorkspace as Y } from "../../store/store.js";
|
|
10
|
+
const q = { class: "flex justify-between" }, G = /* @__PURE__ */ w("div", { class: "pl-8 text-xs min-h-8 py-2 text-c-2" }, "Preview", -1), ne = /* @__PURE__ */ O({
|
|
12
11
|
__name: "CommandPaletteImport",
|
|
13
12
|
emits: ["close", "back"],
|
|
14
|
-
setup(
|
|
15
|
-
const
|
|
13
|
+
setup(H, { emit: U }) {
|
|
14
|
+
const f = U, { activeWorkspace: g, importSpecFile: b, importSpecFromUrl: D } = Y(), { toast: m } = M(), i = R(), e = P(""), o = v(
|
|
15
|
+
() => W(e.value)
|
|
16
|
+
), C = v(
|
|
17
|
+
() => o.value ? o.value.type : "json"
|
|
18
|
+
), S = v(() => x(e.value)), F = v(() => !!o.value), { open: L } = J({
|
|
16
19
|
onChange: async (a) => {
|
|
17
|
-
const
|
|
18
|
-
if (
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
var
|
|
22
|
-
const
|
|
20
|
+
const t = a == null ? void 0 : a[0];
|
|
21
|
+
if (t) {
|
|
22
|
+
const r = new FileReader();
|
|
23
|
+
r.onload = async (A) => {
|
|
24
|
+
var I;
|
|
25
|
+
const B = (I = A.target) == null ? void 0 : I.result;
|
|
23
26
|
try {
|
|
24
|
-
await
|
|
25
|
-
} catch (
|
|
26
|
-
console.error(
|
|
27
|
-
const
|
|
28
|
-
|
|
27
|
+
await b(B, g.value.uid), m("Import successful", "info"), f("close");
|
|
28
|
+
} catch (d) {
|
|
29
|
+
console.error(d);
|
|
30
|
+
const N = (d == null ? void 0 : d.message) || "Unknown error";
|
|
31
|
+
m(`Import failed: ${N}`, "error");
|
|
29
32
|
}
|
|
30
|
-
},
|
|
33
|
+
}, r.readAsText(t);
|
|
31
34
|
}
|
|
32
35
|
},
|
|
33
36
|
multiple: !1,
|
|
34
37
|
accept: ".json,.yaml,.yml"
|
|
35
38
|
});
|
|
36
|
-
async function
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
39
|
+
async function V() {
|
|
40
|
+
if (!(!e.value || i.isLoading)) {
|
|
41
|
+
i.startLoading();
|
|
42
|
+
try {
|
|
43
|
+
if (S.value)
|
|
44
|
+
await D(
|
|
45
|
+
e.value,
|
|
46
|
+
void 0,
|
|
47
|
+
void 0,
|
|
48
|
+
g.value.uid
|
|
49
|
+
);
|
|
50
|
+
else if (F.value)
|
|
51
|
+
await b(
|
|
52
|
+
String(e.value),
|
|
53
|
+
g.value.uid
|
|
54
|
+
);
|
|
55
|
+
else {
|
|
56
|
+
m("Import failed: Invalid URL or OpenAPI document", "error"), i.invalidate(2e3, !0);
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
i.clear(), f("close"), m("Import successful", "info");
|
|
60
|
+
} catch (a) {
|
|
61
|
+
console.error("[importCollection]", a);
|
|
62
|
+
const t = (a == null ? void 0 : a.message) || "Unknown error";
|
|
63
|
+
i.invalidate(2e3, !0), m(`Import failed: ${t}`, "error");
|
|
64
|
+
}
|
|
51
65
|
}
|
|
52
66
|
}
|
|
53
|
-
|
|
54
|
-
return (f(e.value) || {}).type ?? "json";
|
|
55
|
-
}
|
|
56
|
-
function D(a) {
|
|
57
|
-
var t;
|
|
58
|
-
const o = (t = a.clipboardData) == null ? void 0 : t.getData("text");
|
|
59
|
-
o && (e.value = o);
|
|
60
|
-
}
|
|
61
|
-
return (a, o) => (s(), u(N, {
|
|
67
|
+
return (a, t) => (l(), k(z, {
|
|
62
68
|
disabled: !e.value.trim(),
|
|
63
|
-
|
|
69
|
+
loading: n(i),
|
|
70
|
+
onSubmit: V
|
|
64
71
|
}, {
|
|
65
|
-
options:
|
|
66
|
-
|
|
72
|
+
options: p(() => [
|
|
73
|
+
y(n(h), {
|
|
67
74
|
class: "p-2 max-h-8 gap-1.5 text-xs hover:bg-b-2 relative",
|
|
68
75
|
variant: "outlined",
|
|
69
|
-
onClick:
|
|
76
|
+
onClick: n(L)
|
|
70
77
|
}, {
|
|
71
|
-
default:
|
|
72
|
-
|
|
73
|
-
|
|
78
|
+
default: p(() => [
|
|
79
|
+
s(" JSON, or YAML File "),
|
|
80
|
+
y(n(T), {
|
|
74
81
|
class: "text-c-3",
|
|
75
82
|
icon: "UploadSimple",
|
|
76
83
|
size: "md"
|
|
@@ -79,41 +86,54 @@ const X = /* @__PURE__ */ V({
|
|
|
79
86
|
_: 1
|
|
80
87
|
}, 8, ["onClick"])
|
|
81
88
|
]),
|
|
82
|
-
submit:
|
|
83
|
-
|
|
89
|
+
submit: p(() => [
|
|
90
|
+
s(" Import "),
|
|
91
|
+
S.value ? (l(), c(u, { key: 0 }, [
|
|
92
|
+
s(" from URL ")
|
|
93
|
+
], 64)) : o.value && C.value ? (l(), c(u, { key: 1 }, [
|
|
94
|
+
o.value.title ? (l(), c(u, { key: 0 }, [
|
|
95
|
+
s(' "' + _(o.value.title) + '" ', 1)
|
|
96
|
+
], 64)) : (l(), c(u, { key: 1 }, [
|
|
97
|
+
s(_(o.value.version) + " Spec", 1)
|
|
98
|
+
], 64))
|
|
99
|
+
], 64)) : (l(), c(u, { key: 2 }, [
|
|
100
|
+
s("Collection")
|
|
101
|
+
], 64))
|
|
84
102
|
]),
|
|
85
|
-
default:
|
|
86
|
-
!
|
|
103
|
+
default: p(() => [
|
|
104
|
+
!o.value || n(x)(e.value) ? (l(), k(E, {
|
|
87
105
|
key: 0,
|
|
88
106
|
modelValue: e.value,
|
|
89
|
-
"onUpdate:modelValue":
|
|
107
|
+
"onUpdate:modelValue": t[0] || (t[0] = (r) => e.value = r),
|
|
90
108
|
placeholder: "Paste Swagger/OpenAPI File URL or content",
|
|
91
|
-
onOnDelete:
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
109
|
+
onOnDelete: t[1] || (t[1] = (r) => f("back", r))
|
|
110
|
+
}, null, 8, ["modelValue"])) : (l(), c(u, { key: 1 }, [
|
|
111
|
+
w("div", q, [
|
|
112
|
+
G,
|
|
113
|
+
y(n(h), {
|
|
114
|
+
class: "ml-auto p-2 max-h-8 gap-1.5 text-xs hover:bg-b-2 relative",
|
|
115
|
+
variant: "ghost",
|
|
116
|
+
onClick: t[2] || (t[2] = (r) => e.value = "")
|
|
117
|
+
}, {
|
|
118
|
+
default: p(() => [
|
|
119
|
+
s(" Clear ")
|
|
120
|
+
]),
|
|
121
|
+
_: 1
|
|
122
|
+
})
|
|
123
|
+
]),
|
|
124
|
+
o.value && !n(x)(e.value) ? (l(), k(n(j), {
|
|
105
125
|
key: 0,
|
|
106
|
-
class: "
|
|
126
|
+
class: "border max-h-[40dvh] mt-1 bg-b-2 rounded [--scalar-small:--scalar-font-size-4]",
|
|
107
127
|
content: e.value,
|
|
108
128
|
copy: !1,
|
|
109
|
-
lang:
|
|
110
|
-
}, null, 8, ["content", "lang"])) :
|
|
129
|
+
lang: C.value
|
|
130
|
+
}, null, 8, ["content", "lang"])) : $("", !0)
|
|
111
131
|
], 64))
|
|
112
132
|
]),
|
|
113
133
|
_: 1
|
|
114
|
-
}, 8, ["disabled"]));
|
|
134
|
+
}, 8, ["disabled", "loading"]));
|
|
115
135
|
}
|
|
116
136
|
});
|
|
117
137
|
export {
|
|
118
|
-
|
|
138
|
+
ne as default
|
|
119
139
|
};
|
|
@@ -12,8 +12,8 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
|
12
12
|
parentUid: string;
|
|
13
13
|
};
|
|
14
14
|
}>>> & {
|
|
15
|
-
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
16
15
|
onClose?: (() => any) | undefined;
|
|
16
|
+
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
17
17
|
}, {}, {}>;
|
|
18
18
|
export default _default;
|
|
19
19
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|