@scalar/api-client 2.0.24 → 2.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +39 -0
- package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBar.vue.js +2 -2
- package/dist/components/AddressBar/AddressBar.vue2.js +79 -83
- package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarHistory.vue.js +38 -38
- package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.d.ts +10 -0
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +2 -1
- package/dist/components/CodeInput/CodeInput.vue2.js +43 -38
- package/dist/components/CodeInput/codeDropdownWidget.d.ts +24 -0
- package/dist/components/CodeInput/codeDropdownWidget.d.ts.map +1 -0
- package/dist/components/CodeInput/codeDropdownWidget.js +110 -0
- package/dist/components/CodeInput/codeVariableWidget.d.ts +8 -0
- package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -0
- package/dist/components/CodeInput/codeVariableWidget.js +124 -0
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts +2 -15
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +51 -54
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts +4 -2
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteExample.vue.js +106 -92
- package/dist/components/CommandPalette/CommandPaletteFolder.vue.d.ts +2 -15
- package/dist/components/CommandPalette/CommandPaletteFolder.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteFolder.vue.js +68 -74
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts +2 -15
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +56 -62
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts +2 -15
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +106 -99
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.d.ts +7 -0
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.d.ts.map +1 -0
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.js +57 -0
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue2.js +4 -0
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +50 -0
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -0
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +9 -0
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +198 -0
- package/dist/components/CommandPalette/index.d.ts +2 -0
- package/dist/components/CommandPalette/index.d.ts.map +1 -0
- package/dist/components/CommandPalette/index.js +4 -0
- package/dist/components/ContextBar.vue.js +4 -4
- package/dist/components/DataTable/DataTableInput.vue.d.ts +1 -1
- package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInput.vue.js +3 -3
- package/dist/components/DataTable/DataTableInput.vue2.js +36 -49
- package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNav.vue.js +26 -23
- package/dist/components/SideNav/SideNavLink.vue.d.ts +3 -2
- package/dist/components/SideNav/SideNavLink.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNavLink.vue.js +5 -5
- package/dist/components/Sidebar/Sidebar.vue.d.ts +15 -2
- package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.js +14 -12
- package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarButton.vue.js +5 -5
- package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNav.vue.js +2 -2
- package/dist/components/TopNav/TopNav.vue2.js +31 -28
- package/dist/components/TopNav/TopNavItem.vue.d.ts +7 -3
- package/dist/components/TopNav/TopNavItem.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNavItem.vue.js +2 -2
- package/dist/components/TopNav/TopNavItem.vue2.js +16 -15
- package/dist/components/ViewLayout/ViewLayout.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayout.vue.js +1 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +2 -1
- package/dist/constants.d.ts +13 -7
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +4 -4
- package/dist/index.d.ts +3 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -16
- package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -0
- package/dist/layouts/App/ApiClientApp.vue.js +72 -0
- package/dist/{App → layouts/App}/createApiClientApp.d.ts +1 -1
- package/dist/layouts/App/createApiClientApp.d.ts.map +1 -0
- package/dist/{App → layouts/App}/createApiClientApp.js +2 -2
- package/dist/layouts/App/index.d.ts.map +1 -0
- package/dist/{Modal → layouts/Modal}/ApiClientModal.vue.d.ts +1 -0
- package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -0
- package/dist/{Modal → layouts/Modal}/ApiClientModal.vue.js +2 -2
- package/dist/{Modal → layouts/Modal}/api-client-modal.d.ts +1 -1
- package/dist/layouts/Modal/api-client-modal.d.ts.map +1 -0
- package/dist/{Modal → layouts/Modal}/api-client-modal.js +42 -42
- package/dist/layouts/Modal/index.d.ts.map +1 -0
- package/dist/libs/eventBusses/command-palette.d.ts +14 -0
- package/dist/libs/eventBusses/command-palette.d.ts.map +1 -0
- package/dist/libs/eventBusses/command-palette.js +5 -0
- package/dist/libs/local-storage.d.ts +1 -1
- package/dist/libs/local-storage.d.ts.map +1 -1
- package/dist/libs/local-storage.js +19 -19
- package/dist/router.d.ts +5 -10
- package/dist/router.d.ts.map +1 -1
- package/dist/router.js +23 -19
- package/dist/store/topNav.d.ts +94 -82
- package/dist/store/topNav.d.ts.map +1 -1
- package/dist/store/topNav.js +21 -20
- package/dist/store/workspace.d.ts +348 -94
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/store/workspace.js +314 -221
- package/dist/style.css +1 -1
- package/dist/views/Collection/Collection.vue.d.ts.map +1 -1
- package/dist/views/Components/Schemas/Schemas.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +27 -30
- package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
- package/dist/views/Environment/Environment.vue2.js +22 -25
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +38 -47
- 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 +130 -109
- package/dist/views/Request/RequestSection/RequestAuthDataTableInput.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuthDataTableInput.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +5 -4
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue2.js +19 -19
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +6 -5
- package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
- package/dist/views/Request/RequestSidebarItem.vue2.js +78 -81
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +60 -42
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +6 -5
- package/dist/views/Request/components/OAuth2.vue.d.ts.map +1 -1
- package/dist/views/Request/components/OAuth2.vue.js +2 -0
- package/dist/{App.vue.d.ts → views/Request/components/WorkspaceDropdown.vue.d.ts} +1 -2
- package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -0
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +80 -0
- package/dist/views/Request/components/WorkspaceDropdown.vue2.js +4 -0
- package/dist/views/Request/components/index.d.ts +1 -0
- package/dist/views/Request/components/index.d.ts.map +1 -1
- package/dist/views/Request/components/index.js +4 -2
- package/dist/views/Servers/Servers.vue.d.ts.map +1 -1
- package/dist/views/Servers/Servers.vue2.js +12 -15
- package/package.json +22 -18
- package/dist/App/ApiClientApp.vue.d.ts.map +0 -1
- package/dist/App/ApiClientApp.vue.js +0 -56
- package/dist/App/createApiClientApp.d.ts.map +0 -1
- package/dist/App/index.d.ts.map +0 -1
- package/dist/App.vue.d.ts.map +0 -1
- package/dist/App.vue.js +0 -77
- package/dist/App.vue3.js +0 -5
- package/dist/Modal/ApiClientModal.vue.d.ts.map +0 -1
- package/dist/Modal/api-client-modal.d.ts.map +0 -1
- package/dist/Modal/index.d.ts.map +0 -1
- package/dist/components/AddressBar/AddressBarServer.vue.js +0 -113
- package/dist/components/AddressBar/AddressBarServer.vue2.js +0 -4
- package/dist/components/CommandPalette/CommandPalette.vue.d.ts +0 -17
- package/dist/components/CommandPalette/CommandPalette.vue.d.ts.map +0 -1
- package/dist/components/CommandPalette/CommandPalette.vue.js +0 -7
- package/dist/components/CommandPalette/CommandPalette.vue2.js +0 -185
- package/dist/main.d.ts +0 -2
- package/dist/main.d.ts.map +0 -1
- /package/dist/{App → layouts/App}/ApiClientApp.vue.d.ts +0 -0
- /package/dist/{App → layouts/App}/ApiClientApp.vue3.js +0 -0
- /package/dist/{App → layouts/App}/index.d.ts +0 -0
- /package/dist/{App → layouts/App}/index.js +0 -0
- /package/dist/{Modal → layouts/Modal}/ApiClientModal.vue2.js +0 -0
- /package/dist/{Modal → layouts/Modal}/index.d.ts +0 -0
- /package/dist/{Modal → layouts/Modal}/index.js +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,44 @@
|
|
|
1
1
|
# @scalar/api-client
|
|
2
2
|
|
|
3
|
+
## 2.0.26
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 54f7654: fix: add local storage to client.scalar/com
|
|
8
|
+
- b0b3290: feat: create a default workspace if no OpenAPI document is passed to the modal
|
|
9
|
+
- 7e01b12: fix: only trigger codeinput change event if the value has changed
|
|
10
|
+
- b7211fb: fix: request history
|
|
11
|
+
- Updated dependencies [67aefbf]
|
|
12
|
+
- Updated dependencies [7761630]
|
|
13
|
+
- @scalar/components@0.12.17
|
|
14
|
+
- @scalar/oas-utils@0.2.16
|
|
15
|
+
|
|
16
|
+
## 2.0.25
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- 591fe24: fix: clipped border radius in requests items
|
|
21
|
+
- 7f17fe4: feat: move command palette into the client app base
|
|
22
|
+
- 1dab515: feat: revamp address bar
|
|
23
|
+
- 4d76ff5: feat: add support for multiple workspaces
|
|
24
|
+
- e8cd161: feat: store workspace in local storage
|
|
25
|
+
- a431eb0: fix: table checkbox for required params on import
|
|
26
|
+
- ff59399: fix: api client spacing issues, and icon thickness
|
|
27
|
+
- ec47287: feat: made request examples functional in client
|
|
28
|
+
- 747e80e: fix: only flex addressbar codemirror
|
|
29
|
+
- 9d561b7: fix: make app topbar draggable
|
|
30
|
+
- Updated dependencies [1dab515]
|
|
31
|
+
- Updated dependencies [5e060b1]
|
|
32
|
+
- Updated dependencies [ff59399]
|
|
33
|
+
- Updated dependencies [694c1d8]
|
|
34
|
+
- @scalar/oas-utils@0.2.15
|
|
35
|
+
- @scalar/themes@0.9.15
|
|
36
|
+
- @scalar/components@0.12.16
|
|
37
|
+
- @scalar/use-codemirror@0.11.7
|
|
38
|
+
- @scalar/object-utils@1.1.4
|
|
39
|
+
- @scalar/use-toasts@0.7.4
|
|
40
|
+
- @scalar/use-tooltip@1.0.2
|
|
41
|
+
|
|
3
42
|
## 2.0.24
|
|
4
43
|
|
|
5
44
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddressBar.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBar.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"AddressBar.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBar.vue"],"names":[],"mappings":";AAkkBA,wBAKG"}
|
|
@@ -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
|
|
4
|
+
const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-231a70ec"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
e as default
|
|
7
7
|
};
|
|
@@ -1,125 +1,121 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as q, ref as m, watch as V, unref as l, openBlock as B, createElementBlock as I, createElementVNode as o, createVNode as r, withCtx as _, normalizeClass as b, normalizeStyle as R, createCommentVNode as z, pushScopeId as M, popScopeId as U } from "vue";
|
|
2
|
+
import $ from "../CodeInput/CodeInput.vue.js";
|
|
3
|
+
import { useWorkspace as O } from "../../store/workspace.js";
|
|
3
4
|
import { Listbox as H } from "@headlessui/vue";
|
|
4
|
-
import { ScalarButton as
|
|
5
|
-
import { REQUEST_METHODS as
|
|
6
|
-
import { isMacOS as
|
|
7
|
-
import { useMagicKeys as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
const v = (d) => (K("data-v-02983c4d"), d = d(), O(), d), Y = {
|
|
5
|
+
import { ScalarButton as N, ScalarIcon as T } from "@scalar/components";
|
|
6
|
+
import { REQUEST_METHODS as L } from "@scalar/oas-utils/helpers";
|
|
7
|
+
import { isMacOS as A } from "@scalar/use-tooltip";
|
|
8
|
+
import { useMagicKeys as D, whenever as K } from "@vueuse/core";
|
|
9
|
+
import Q from "../HttpMethod/HttpMethod.vue.js";
|
|
10
|
+
import W from "./AddressBarHistory.vue.js";
|
|
11
|
+
import { executeRequestBus as c } from "../../libs/eventBusses/executeRequestBus.js";
|
|
12
|
+
const f = (n) => (M("data-v-231a70ec"), n = n(), U(), n), j = {
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "order-last lg:order-none lg:w-auto w-full"
|
|
15
|
-
},
|
|
15
|
+
}, F = { class: "m-auto flex basis-1/2 flex-row items-center" }, G = { class: "pointer-events-none absolute left-0 top-0 z-10 block h-full w-full overflow-hidden" }, J = { class: "flex gap-1" }, P = { class: "scroll-timeline-x scroll-timeline-x-hidden relative flex w-full" }, X = /* @__PURE__ */ f(() => /* @__PURE__ */ o("div", { class: "fade-left" }, null, -1)), Y = /* @__PURE__ */ f(() => /* @__PURE__ */ o("div", { class: "fade-right" }, null, -1)), Z = /* @__PURE__ */ f(() => /* @__PURE__ */ o("span", { class: "text-xxs relative z-10 lg:flex hidden" }, "Send", -1)), me = /* @__PURE__ */ q({
|
|
16
16
|
__name: "AddressBar",
|
|
17
|
-
setup(
|
|
17
|
+
setup(n) {
|
|
18
18
|
const {
|
|
19
19
|
activeRequest: t,
|
|
20
|
-
activeExample:
|
|
21
|
-
isReadOnly:
|
|
22
|
-
requestMutators:
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
()
|
|
20
|
+
activeExample: i,
|
|
21
|
+
isReadOnly: p,
|
|
22
|
+
requestMutators: v,
|
|
23
|
+
requestExampleMutators: g,
|
|
24
|
+
requestsHistory: w
|
|
25
|
+
} = O(), x = m(w.value[0]), h = D();
|
|
26
|
+
K(
|
|
27
|
+
A() ? h.meta_enter : h.ctrl_enter,
|
|
28
|
+
() => c.emit()
|
|
28
29
|
);
|
|
29
|
-
const
|
|
30
|
-
!t.value || t.value.path === e ||
|
|
30
|
+
const k = (e) => {
|
|
31
|
+
!t.value || t.value.path === e || v.edit(t.value.uid, "path", e);
|
|
31
32
|
};
|
|
32
|
-
|
|
33
|
+
V(
|
|
33
34
|
() => {
|
|
34
35
|
var e;
|
|
35
36
|
return (e = t.value) == null ? void 0 : e.path;
|
|
36
37
|
},
|
|
37
38
|
(e) => {
|
|
38
|
-
t.value &&
|
|
39
|
+
t.value && k(e);
|
|
39
40
|
}
|
|
40
41
|
);
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
if (
|
|
44
|
-
|
|
42
|
+
const d = m(100), u = m(!1);
|
|
43
|
+
c.on(() => {
|
|
44
|
+
if (u.value) return;
|
|
45
|
+
u.value = !0;
|
|
45
46
|
const e = setInterval(() => {
|
|
46
|
-
|
|
47
|
+
d.value -= 5, d.value <= 0 && (clearInterval(e), d.value = 100, u.value = !1);
|
|
47
48
|
}, 20);
|
|
48
49
|
});
|
|
49
50
|
function E(e) {
|
|
50
|
-
t.value &&
|
|
51
|
+
t.value && v.edit(t.value.uid, "method", e);
|
|
51
52
|
}
|
|
52
|
-
function
|
|
53
|
+
function S() {
|
|
53
54
|
if (!t.value) return;
|
|
54
55
|
const { method: e } = t.value;
|
|
55
|
-
return
|
|
56
|
+
return L[e].backgroundColor;
|
|
56
57
|
}
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
e.preventDefault();
|
|
60
|
-
const a = (((y = e.clipboardData) == null ? void 0 : y.getData("text/plain")) || "").replace(/\n/g, ""), s = window.getSelection();
|
|
61
|
-
if (!s || s.rangeCount === 0) return;
|
|
62
|
-
const i = s.getRangeAt(0);
|
|
63
|
-
i.deleteContents();
|
|
64
|
-
const b = document.createTextNode(a);
|
|
65
|
-
i.insertNode(b), i.setStartAfter(b), s.removeAllRanges(), s.addRange(i);
|
|
66
|
-
const f = i.startContainer.parentElement;
|
|
67
|
-
f && (f.scrollLeft = f.scrollWidth);
|
|
58
|
+
const y = (e) => {
|
|
59
|
+
i.value && g.edit(i.value.uid, "url", e);
|
|
68
60
|
};
|
|
69
|
-
return (e,
|
|
70
|
-
|
|
71
|
-
r(
|
|
72
|
-
modelValue:
|
|
73
|
-
"onUpdate:modelValue":
|
|
61
|
+
return (e, a) => l(t) && l(i) ? (B(), I("div", j, [
|
|
62
|
+
o("div", F, [
|
|
63
|
+
r(l(H), {
|
|
64
|
+
modelValue: x.value,
|
|
65
|
+
"onUpdate:modelValue": a[2] || (a[2] = (s) => x.value = s)
|
|
74
66
|
}, {
|
|
75
|
-
default:
|
|
76
|
-
|
|
77
|
-
class:
|
|
67
|
+
default: _(({ open: s }) => [
|
|
68
|
+
o("div", {
|
|
69
|
+
class: b([
|
|
78
70
|
"text-xxs bg-b-1 relative flex w-full lg:min-w-[720px] lg:max-w-[720px] order-last lg:order-none flex-1 flex-row items-stretch rounded border p-[3px]",
|
|
79
|
-
{ "rounded-b-none":
|
|
80
|
-
{ "border-transparent":
|
|
71
|
+
{ "rounded-b-none": s },
|
|
72
|
+
{ "border-transparent": s }
|
|
81
73
|
])
|
|
82
74
|
}, [
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
class:
|
|
86
|
-
style:
|
|
75
|
+
o("div", G, [
|
|
76
|
+
o("div", {
|
|
77
|
+
class: b(["bg-mix-transparent bg-mix-amount-95 absolute left-0 top-0 h-full w-full", S()]),
|
|
78
|
+
style: R({ transform: `translate3d(-${d.value}%,0,0)` })
|
|
87
79
|
}, null, 6)
|
|
88
80
|
]),
|
|
89
|
-
|
|
90
|
-
r(
|
|
81
|
+
o("div", J, [
|
|
82
|
+
r(Q, {
|
|
91
83
|
class: "font-code text-xxs font-medium",
|
|
92
|
-
isEditable: !
|
|
84
|
+
isEditable: !l(p),
|
|
93
85
|
isSquare: "",
|
|
94
|
-
method:
|
|
86
|
+
method: l(t).method,
|
|
95
87
|
onChange: E
|
|
96
|
-
}, null, 8, ["isEditable", "method"])
|
|
97
|
-
r(X)
|
|
88
|
+
}, null, 8, ["isEditable", "method"])
|
|
98
89
|
]),
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
90
|
+
o("div", P, [
|
|
91
|
+
X,
|
|
92
|
+
r($, {
|
|
93
|
+
disableCloseBrackets: "",
|
|
94
|
+
disabled: l(p),
|
|
95
|
+
disableEnter: "",
|
|
96
|
+
disableTabIndent: "",
|
|
97
|
+
emitOnBlur: !1,
|
|
98
|
+
modelValue: l(i).url,
|
|
99
|
+
placeholder: "Enter URL to get started",
|
|
100
|
+
server: "",
|
|
101
|
+
onSubmit: a[0] || (a[0] = (C) => l(c).emit()),
|
|
102
|
+
"onUpdate:modelValue": y
|
|
103
|
+
}, null, 8, ["disabled", "modelValue"]),
|
|
104
|
+
Y
|
|
109
105
|
]),
|
|
110
|
-
r(
|
|
111
|
-
r(
|
|
106
|
+
r(W, { open: s }, null, 8, ["open"]),
|
|
107
|
+
r(l(N), {
|
|
112
108
|
class: "relative h-auto shrink-0 gap-1 overflow-hidden pl-2 pr-2.5 py-1 z-[1]",
|
|
113
|
-
disabled:
|
|
114
|
-
onClick:
|
|
109
|
+
disabled: u.value,
|
|
110
|
+
onClick: a[1] || (a[1] = (C) => l(c).emit())
|
|
115
111
|
}, {
|
|
116
|
-
default:
|
|
117
|
-
r(
|
|
112
|
+
default: _(() => [
|
|
113
|
+
r(l(T), {
|
|
118
114
|
class: "relative z-10 shrink-0 fill-current",
|
|
119
115
|
icon: "Play",
|
|
120
116
|
size: "xs"
|
|
121
117
|
}),
|
|
122
|
-
|
|
118
|
+
Z
|
|
123
119
|
]),
|
|
124
120
|
_: 1
|
|
125
121
|
}, 8, ["disabled"])
|
|
@@ -128,9 +124,9 @@ const v = (d) => (K("data-v-02983c4d"), d = d(), O(), d), Y = {
|
|
|
128
124
|
_: 1
|
|
129
125
|
}, 8, ["modelValue"])
|
|
130
126
|
])
|
|
131
|
-
])) :
|
|
127
|
+
])) : z("", !0);
|
|
132
128
|
}
|
|
133
129
|
});
|
|
134
130
|
export {
|
|
135
|
-
|
|
131
|
+
me as default
|
|
136
132
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddressBarHistory.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBarHistory.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"AddressBarHistory.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBarHistory.vue"],"names":[],"mappings":";UAkHQ,OAAO;;UAAP,OAAO;;AA0Of,wBAMG;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,34 +1,34 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as y, openBlock as n, createElementBlock as p, Fragment as f, unref as e, createBlock as i, withCtx as m, createVNode as d, createCommentVNode as x, createElementVNode as r, normalizeClass as h, renderList as k, toDisplayString as u } from "vue";
|
|
2
2
|
import { formatMs as w } from "../../libs/formatters.js";
|
|
3
|
-
import { useWorkspace as
|
|
4
|
-
import { ListboxButton as
|
|
5
|
-
import { ScalarIcon as
|
|
6
|
-
import { httpStatusCodes as
|
|
7
|
-
import { useRouter as
|
|
3
|
+
import { useWorkspace as C } from "../../store/workspace.js";
|
|
4
|
+
import { ListboxButton as q, ListboxOptions as U, ListboxOption as L } from "@headlessui/vue";
|
|
5
|
+
import { ScalarIcon as R } from "@scalar/components";
|
|
6
|
+
import { httpStatusCodes as B } from "@scalar/oas-utils/helpers";
|
|
7
|
+
import { useRouter as S } from "vue-router";
|
|
8
8
|
import P from "../HttpMethod/HttpMethod.vue.js";
|
|
9
9
|
import { getStatusCodeColor as z } from "./httpStatusCodeColors.js";
|
|
10
|
-
const E = { class: "font-code flex flex-1 gap-1.5 text-sm font-medium" },
|
|
10
|
+
const E = { class: "font-code flex flex-1 gap-1.5 text-sm font-medium" }, H = { class: "text-c-2 gap-0" }, N = { class: "font-code text-c-3 flex flex-row items-center gap-1.5 text-sm font-medium" }, G = /* @__PURE__ */ y({
|
|
11
11
|
__name: "AddressBarHistory",
|
|
12
12
|
props: {
|
|
13
13
|
open: { type: Boolean }
|
|
14
14
|
},
|
|
15
|
-
setup(
|
|
16
|
-
const {
|
|
17
|
-
function
|
|
18
|
-
const
|
|
19
|
-
return s ? new URL(s)
|
|
15
|
+
setup(V) {
|
|
16
|
+
const { activeRequest: l, requestExampleMutators: b } = C(), g = S();
|
|
17
|
+
function _(a) {
|
|
18
|
+
const o = new URL(a), s = new URLSearchParams(o.search).get("scalar_url");
|
|
19
|
+
return s ? new URL(s).href : o.href;
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
const
|
|
23
|
-
|
|
21
|
+
function v(a) {
|
|
22
|
+
const o = l.value.history[a];
|
|
23
|
+
l.value.uid !== o.request.requestUid && g.push(`/request/${o.request.requestUid}`), b.set(o.request);
|
|
24
24
|
}
|
|
25
|
-
return (a,
|
|
26
|
-
|
|
25
|
+
return (a, o) => (n(), p(f, null, [
|
|
26
|
+
e(l).history.length ? (n(), i(e(q), {
|
|
27
27
|
key: 0,
|
|
28
28
|
class: "hover:bg-b-2 mr-1 rounded p-1.5"
|
|
29
29
|
}, {
|
|
30
30
|
default: m(() => [
|
|
31
|
-
|
|
31
|
+
d(e(R), {
|
|
32
32
|
class: "text-c-3",
|
|
33
33
|
icon: "History",
|
|
34
34
|
size: "sm",
|
|
@@ -36,38 +36,38 @@ const E = { class: "font-code flex flex-1 gap-1.5 text-sm font-medium" }, N = {
|
|
|
36
36
|
})
|
|
37
37
|
]),
|
|
38
38
|
_: 1
|
|
39
|
-
})) :
|
|
40
|
-
|
|
39
|
+
})) : x("", !0),
|
|
40
|
+
r("div", {
|
|
41
41
|
class: h([
|
|
42
42
|
"absolute left-0 top-[33px] w-full rounded before:pointer-events-none before:absolute before:left-0 before:top-[-33px] before:h-[calc(100%+33px)] before:w-full before:rounded z-50",
|
|
43
43
|
{ "before:shadow-lg": a.open }
|
|
44
44
|
])
|
|
45
45
|
}, [
|
|
46
|
-
|
|
46
|
+
d(e(U), { class: "bg-b-1 custom-scroll bg-mix-transparent bg-mix-amount-30 max-h-[300px] rounded-b p-[3px] pt-0 backdrop-blur" }, {
|
|
47
47
|
default: m(() => [
|
|
48
|
-
(n(!0), f
|
|
49
|
-
key:
|
|
48
|
+
(n(!0), p(f, null, k(e(l).history, ({ response: t }, s) => (n(), i(e(L), {
|
|
49
|
+
key: s,
|
|
50
50
|
class: "ui-active:bg-b-2 text-c-1 ui-active:text-c-1 flex cursor-pointer flex-row gap-2.5 rounded py-1.5 pr-3",
|
|
51
|
-
value:
|
|
52
|
-
onClick: (
|
|
51
|
+
value: s,
|
|
52
|
+
onClick: (c) => v(s)
|
|
53
53
|
}, {
|
|
54
54
|
default: m(() => {
|
|
55
|
-
var
|
|
55
|
+
var c;
|
|
56
56
|
return [
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
r("div", E, [
|
|
58
|
+
t.config.method ? (n(), i(P, {
|
|
59
59
|
key: 0,
|
|
60
60
|
class: "text-[11px] min-w-[44px]",
|
|
61
|
-
method:
|
|
62
|
-
}, null, 8, ["method"])) :
|
|
63
|
-
|
|
61
|
+
method: t.config.method
|
|
62
|
+
}, null, 8, ["method"])) : x("", !0),
|
|
63
|
+
r("span", H, u(_(t.config.url)), 1)
|
|
64
64
|
]),
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
class: h([
|
|
69
|
-
},
|
|
70
|
-
|
|
65
|
+
r("div", N, [
|
|
66
|
+
r("span", null, u(e(w)(t.duration)), 1),
|
|
67
|
+
r("span", {
|
|
68
|
+
class: h([e(z)(t.status).color])
|
|
69
|
+
}, u(t.status), 3),
|
|
70
|
+
r("span", null, u((c = e(B)[t.status]) == null ? void 0 : c.name), 1)
|
|
71
71
|
])
|
|
72
72
|
];
|
|
73
73
|
}),
|
|
@@ -81,5 +81,5 @@ const E = { class: "font-code flex flex-1 gap-1.5 text-sm font-medium" }, N = {
|
|
|
81
81
|
}
|
|
82
82
|
});
|
|
83
83
|
export {
|
|
84
|
-
|
|
84
|
+
G as default
|
|
85
85
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddressBarServer.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBarServer.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"AddressBarServer.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBarServer.vue"],"names":[],"mappings":";AA2ZA,wBAKG"}
|
|
@@ -17,6 +17,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
17
17
|
enum?: string[];
|
|
18
18
|
type?: string;
|
|
19
19
|
nullable?: boolean;
|
|
20
|
+
withVariables?: boolean;
|
|
21
|
+
withServers?: boolean;
|
|
20
22
|
}>, {
|
|
21
23
|
disableCloseBrackets: boolean;
|
|
22
24
|
disableEnter: boolean;
|
|
@@ -24,6 +26,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
24
26
|
emitOnBlur: boolean;
|
|
25
27
|
colorPicker: boolean;
|
|
26
28
|
nullable: boolean;
|
|
29
|
+
withVariables: boolean;
|
|
30
|
+
withServers: boolean;
|
|
27
31
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
28
32
|
submit: (v: string) => void;
|
|
29
33
|
"update:modelValue": (v: string) => void;
|
|
@@ -45,6 +49,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
45
49
|
enum?: string[];
|
|
46
50
|
type?: string;
|
|
47
51
|
nullable?: boolean;
|
|
52
|
+
withVariables?: boolean;
|
|
53
|
+
withServers?: boolean;
|
|
48
54
|
}>, {
|
|
49
55
|
disableCloseBrackets: boolean;
|
|
50
56
|
disableEnter: boolean;
|
|
@@ -52,16 +58,20 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
52
58
|
emitOnBlur: boolean;
|
|
53
59
|
colorPicker: boolean;
|
|
54
60
|
nullable: boolean;
|
|
61
|
+
withVariables: boolean;
|
|
62
|
+
withServers: boolean;
|
|
55
63
|
}>>> & {
|
|
56
64
|
onSubmit?: ((v: string) => any) | undefined;
|
|
57
65
|
"onUpdate:modelValue"?: ((v: string) => any) | undefined;
|
|
58
66
|
}, {
|
|
59
67
|
nullable: boolean;
|
|
68
|
+
withServers: boolean;
|
|
60
69
|
colorPicker: boolean;
|
|
61
70
|
emitOnBlur: boolean;
|
|
62
71
|
disableTabIndent: boolean;
|
|
63
72
|
disableEnter: boolean;
|
|
64
73
|
disableCloseBrackets: boolean;
|
|
74
|
+
withVariables: boolean;
|
|
65
75
|
}, {}>, {
|
|
66
76
|
warning?(_: {}): any;
|
|
67
77
|
icon?(_: {}): any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodeInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/CodeInput.vue"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"CodeInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/CodeInput.vue"],"names":[],"mappings":"AAAA,OAuRO,EAGL,KAAK,kBAAkB,EAExB,MAAM,wBAAwB,CAAA;;kBAeb,OAAO;gBACT,MAAM,GAAG,MAAM;YACnB,OAAO;iBACF,OAAO;kBACN,OAAO;WACd,OAAO;uBACK,OAAO;eACf,kBAAkB;wBACT,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;wBACnB,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;kBACzB,MAAM;eACT,OAAO;mBACH,OAAO;2BACC,OAAO;WACvB,MAAM,EAAE;WACR,MAAM;eACF,OAAO;oBACF,OAAO;kBACT,OAAO;;;;;;;;;;;;;;kBAlBP,OAAO;gBACT,MAAM,GAAG,MAAM;YACnB,OAAO;iBACF,OAAO;kBACN,OAAO;WACd,OAAO;uBACK,OAAO;eACf,kBAAkB;wBACT,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;wBACnB,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;kBACzB,MAAM;eACT,OAAO;mBACH,OAAO;2BACC,OAAO;WACvB,MAAM,EAAE;WACR,MAAM;eACF,OAAO;oBACF,OAAO;kBACT,OAAO;;;;;;;;;;;;;;cAFV,OAAO;iBAEJ,OAAO;iBAlBP,OAAO;gBAGR,OAAO;sBAGD,OAAO;kBAMX,OAAO;0BACC,OAAO;mBAId,OAAO;;qBA2PG,GAAG;kBACN,GAAG;;AAhR9B,wBAmTC;AAMD,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAC1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAC7C,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KAAC,CAAC,GACvC,CAAC,CAAC,CAAC,CAAC;CACP,CAAC;AAEN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC;AAExD,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,7 +1,8 @@
|
|
|
1
1
|
import o from "./CodeInput.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
+
/* empty css */
|
|
3
4
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
5
|
+
const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-ee1f4723"]]);
|
|
5
6
|
export {
|
|
6
7
|
f as default
|
|
7
8
|
};
|
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as S, useAttrs as P, ref as b, toRef as o, watch as O, computed as $, openBlock as t, createElementBlock as i, Fragment as R, createBlock as h, mergeProps as q, unref as E, renderSlot as y, createCommentVNode as g } from "vue";
|
|
2
2
|
import { useCodeMirror as I, colorPicker as M } from "@scalar/use-codemirror";
|
|
3
3
|
import { nanoid as N } from "nanoid";
|
|
4
4
|
import B from "../DataTable/DataTableInputSelect.vue.js";
|
|
5
|
-
|
|
5
|
+
import { dropdownPlugin as T } from "./codeDropdownWidget.js";
|
|
6
|
+
import { pillPlugin as A, backspaceCommand as U } from "./codeVariableWidget.js";
|
|
7
|
+
import { useWorkspace as W } from "../../store/workspace.js";
|
|
8
|
+
const j = ["id"], z = {
|
|
6
9
|
key: 3,
|
|
7
10
|
class: "absolute centered-y right-7 text-orange text-xs"
|
|
8
|
-
},
|
|
11
|
+
}, D = {
|
|
9
12
|
key: 4,
|
|
10
13
|
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"
|
|
11
|
-
},
|
|
14
|
+
}, G = {
|
|
12
15
|
inheritAttrs: !1
|
|
13
|
-
},
|
|
14
|
-
...
|
|
16
|
+
}, Z = /* @__PURE__ */ S({
|
|
17
|
+
...G,
|
|
15
18
|
__name: "CodeInput",
|
|
16
19
|
props: {
|
|
17
20
|
colorPicker: { type: Boolean, default: !1 },
|
|
@@ -30,79 +33,81 @@ const R = ["id"], T = {
|
|
|
30
33
|
disableCloseBrackets: { type: Boolean, default: !1 },
|
|
31
34
|
enum: {},
|
|
32
35
|
type: {},
|
|
33
|
-
nullable: { type: Boolean, default: !1 }
|
|
36
|
+
nullable: { type: Boolean, default: !1 },
|
|
37
|
+
withVariables: { type: Boolean, default: !0 },
|
|
38
|
+
withServers: { type: Boolean, default: !1 }
|
|
34
39
|
},
|
|
35
40
|
emits: ["submit", "update:modelValue"],
|
|
36
|
-
setup(
|
|
41
|
+
setup(v, { emit: V }) {
|
|
37
42
|
var m;
|
|
38
|
-
const e =
|
|
43
|
+
const e = v, a = V, d = P(), k = d.id || `id-${N()}`, p = b(!1), { activeWorkspace: w } = W();
|
|
39
44
|
function C(l) {
|
|
40
|
-
return e.handleFieldChange ? e.handleFieldChange(l) : a("update:modelValue", l);
|
|
45
|
+
return l === e.modelValue ? null : e.handleFieldChange ? e.handleFieldChange(l) : a("update:modelValue", l);
|
|
41
46
|
}
|
|
42
47
|
function _(l) {
|
|
43
48
|
return e.handleFieldSubmit ? e.handleFieldSubmit(l) : a("submit", l);
|
|
44
49
|
}
|
|
45
|
-
function
|
|
46
|
-
|
|
50
|
+
function x(l) {
|
|
51
|
+
p.value = !1, e.emitOnBlur && e.modelValue && _(l);
|
|
47
52
|
}
|
|
48
|
-
const
|
|
49
|
-
e.colorPicker &&
|
|
50
|
-
const
|
|
53
|
+
const n = [];
|
|
54
|
+
e.colorPicker && n.push(M), e.withVariables && !w.value.isReadOnly && n.push(T({ withServers: e.withServers })), n.push(A, U);
|
|
55
|
+
const c = b(null), { codeMirror: r } = I({
|
|
51
56
|
content: o(
|
|
52
57
|
() => e.modelValue !== void 0 ? String(e.modelValue) : ""
|
|
53
58
|
),
|
|
54
59
|
onChange: C,
|
|
55
|
-
onFocus: () =>
|
|
56
|
-
onBlur: (l) =>
|
|
57
|
-
codeMirrorRef:
|
|
60
|
+
onFocus: () => p.value = !0,
|
|
61
|
+
onBlur: (l) => x(l),
|
|
62
|
+
codeMirrorRef: c,
|
|
58
63
|
disableTabIndent: o(() => e.disableTabIndent),
|
|
59
64
|
disableEnter: o(() => e.disableEnter),
|
|
60
65
|
disableCloseBrackets: o(() => e.disableCloseBrackets),
|
|
61
66
|
lineNumbers: o(() => e.lineNumbers),
|
|
62
67
|
language: o(() => e.language),
|
|
63
68
|
lint: o(() => e.lint),
|
|
64
|
-
extensions:
|
|
69
|
+
extensions: n,
|
|
65
70
|
placeholder: o(() => e.placeholder)
|
|
66
71
|
});
|
|
67
|
-
(m =
|
|
68
|
-
|
|
72
|
+
(m = r.value) == null || m.focus(), O(r, () => {
|
|
73
|
+
r.value && Object.prototype.hasOwnProperty.call(d, "autofocus") && r.value.focus();
|
|
69
74
|
});
|
|
70
|
-
const
|
|
75
|
+
const F = $(() => {
|
|
71
76
|
var l;
|
|
72
77
|
return e.type === "boolean" || (l = e.type) != null && l.includes("boolean") || e.nullable ? ["true", "false", "null"] : ["true", "false"];
|
|
73
78
|
});
|
|
74
|
-
return (l,
|
|
79
|
+
return (l, u) => {
|
|
75
80
|
var f;
|
|
76
|
-
return t(),
|
|
77
|
-
e.enum && e.enum.length ? (t(),
|
|
81
|
+
return t(), i(R, null, [
|
|
82
|
+
e.enum && e.enum.length ? (t(), h(B, {
|
|
78
83
|
key: 0,
|
|
79
84
|
modelValue: e.modelValue,
|
|
80
85
|
value: e.enum,
|
|
81
|
-
"onUpdate:modelValue":
|
|
82
|
-
}, null, 8, ["modelValue", "value"])) : e.type === "boolean" || (f = e.type) != null && f.includes("boolean") ? (t(),
|
|
86
|
+
"onUpdate:modelValue": u[0] || (u[0] = (s) => a("update:modelValue", s))
|
|
87
|
+
}, null, 8, ["modelValue", "value"])) : e.type === "boolean" || (f = e.type) != null && f.includes("boolean") ? (t(), h(B, {
|
|
83
88
|
key: 1,
|
|
84
89
|
modelValue: e.modelValue,
|
|
85
|
-
value:
|
|
86
|
-
"onUpdate:modelValue":
|
|
87
|
-
}, null, 8, ["modelValue", "value"])) : (t(),
|
|
90
|
+
value: F.value,
|
|
91
|
+
"onUpdate:modelValue": u[1] || (u[1] = (s) => a("update:modelValue", s))
|
|
92
|
+
}, null, 8, ["modelValue", "value"])) : (t(), i("div", q({
|
|
88
93
|
key: 2,
|
|
89
|
-
id: E(
|
|
94
|
+
id: E(k)
|
|
90
95
|
}, l.$attrs, {
|
|
91
96
|
ref_key: "codeMirrorRef",
|
|
92
|
-
ref:
|
|
97
|
+
ref: c,
|
|
93
98
|
class: ["peer font-code w-full whitespace-nowrap text-xs leading-[1.44] relative", {
|
|
94
99
|
"flow-code-input--error": l.error
|
|
95
100
|
}]
|
|
96
|
-
}), null, 16,
|
|
97
|
-
l.$slots.warning ? (t(),
|
|
98
|
-
|
|
101
|
+
}), null, 16, j)),
|
|
102
|
+
l.$slots.warning ? (t(), i("div", z, [
|
|
103
|
+
y(l.$slots, "warning", {}, void 0, !0)
|
|
99
104
|
])) : g("", !0),
|
|
100
|
-
|
|
101
|
-
l.required ? (t(),
|
|
105
|
+
y(l.$slots, "icon", {}, void 0, !0),
|
|
106
|
+
l.required ? (t(), i("div", D, " Required ")) : g("", !0)
|
|
102
107
|
], 64);
|
|
103
108
|
};
|
|
104
109
|
}
|
|
105
110
|
});
|
|
106
111
|
export {
|
|
107
|
-
|
|
112
|
+
Z as default
|
|
108
113
|
};
|