@scalar/api-client 2.0.22 → 2.0.25
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 +48 -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 +80 -84
- package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarHistory.vue.js +11 -10
- 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 +3 -2
- package/dist/components/CodeInput/CodeInput.vue2.js +42 -37
- 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/DarkModeToggle/DarkModeIconToggle.vue.js +7 -6
- package/dist/components/DataTable/DataTableCheckbox.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableCheckbox.vue.js +3 -2
- 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/DataTable/DataTableInputSelect.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInputSelect.vue.js +15 -14
- package/dist/components/Search/SearchButton.vue.d.ts.map +1 -1
- package/dist/components/Search/SearchButton.vue.js +7 -6
- 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 +18 -16
- 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/Sidebar/SidebarListElementActions.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarListElementActions.vue.js +2 -2
- 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 +31 -29
- 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 +18 -18
- 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 +2 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -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/layouts/Modal/api-client-modal.d.ts.map +1 -0
- package/dist/{Modal → layouts/Modal}/api-client-modal.js +7 -7
- 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 +18 -6
- package/dist/router.d.ts.map +1 -1
- package/dist/router.js +107 -71
- 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 +312 -82
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/store/workspace.js +299 -224
- 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 +9 -12
- 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 +125 -108
- 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/RequestBody.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.js +5 -4
- package/dist/views/Request/RequestSection/RequestSection.vue.js +3 -2
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.js +4 -4
- package/dist/views/Request/RequestSection/RequestTable.vue2.js +22 -21
- 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 +84 -79
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +58 -38
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +3 -2
- 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 +19 -15
- 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 -106
- 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 -184
- package/dist/main.d.ts +0 -2
- package/dist/main.d.ts.map +0 -1
- package/dist/views/Collection/Collection.vue.js +0 -4
- package/dist/views/Collection/Collection.vue2.js +0 -136
- package/dist/views/Components/Schemas/Schemas.vue.js +0 -4
- package/dist/views/Components/Schemas/Schemas.vue2.js +0 -20
- /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}/api-client-modal.d.ts +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,53 @@
|
|
|
1
1
|
# @scalar/api-client
|
|
2
2
|
|
|
3
|
+
## 2.0.25
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 591fe24: fix: clipped border radius in requests items
|
|
8
|
+
- 7f17fe4: feat: move command palette into the client app base
|
|
9
|
+
- 1dab515: feat: revamp address bar
|
|
10
|
+
- 4d76ff5: feat: add support for multiple workspaces
|
|
11
|
+
- e8cd161: feat: store workspace in local storage
|
|
12
|
+
- a431eb0: fix: table checkbox for required params on import
|
|
13
|
+
- ff59399: fix: api client spacing issues, and icon thickness
|
|
14
|
+
- ec47287: feat: made request examples functional in client
|
|
15
|
+
- 747e80e: fix: only flex addressbar codemirror
|
|
16
|
+
- 9d561b7: fix: make app topbar draggable
|
|
17
|
+
- Updated dependencies [1dab515]
|
|
18
|
+
- Updated dependencies [5e060b1]
|
|
19
|
+
- Updated dependencies [ff59399]
|
|
20
|
+
- Updated dependencies [694c1d8]
|
|
21
|
+
- @scalar/oas-utils@0.2.15
|
|
22
|
+
- @scalar/themes@0.9.15
|
|
23
|
+
- @scalar/components@0.12.16
|
|
24
|
+
- @scalar/use-codemirror@0.11.7
|
|
25
|
+
- @scalar/object-utils@1.1.4
|
|
26
|
+
- @scalar/use-toasts@0.7.4
|
|
27
|
+
- @scalar/use-tooltip@1.0.2
|
|
28
|
+
|
|
29
|
+
## 2.0.24
|
|
30
|
+
|
|
31
|
+
### Patch Changes
|
|
32
|
+
|
|
33
|
+
- 7076725: feat(components): add outline icons
|
|
34
|
+
- 1e72b03: fix(components): polish history icon
|
|
35
|
+
- cbe984b: fix: adjust command palette icon thickness
|
|
36
|
+
- Updated dependencies [7076725]
|
|
37
|
+
- Updated dependencies [1e72b03]
|
|
38
|
+
- Updated dependencies [dd2a42e]
|
|
39
|
+
- @scalar/components@0.12.15
|
|
40
|
+
|
|
41
|
+
## 2.0.23
|
|
42
|
+
|
|
43
|
+
### Patch Changes
|
|
44
|
+
|
|
45
|
+
- 3928ac3: feat: add routing portion for multiple workspaces
|
|
46
|
+
- Updated dependencies [96e7106]
|
|
47
|
+
- @scalar/themes@0.9.14
|
|
48
|
+
- @scalar/components@0.12.14
|
|
49
|
+
- @scalar/oas-utils@0.2.14
|
|
50
|
+
|
|
3
51
|
## 2.0.22
|
|
4
52
|
|
|
5
53
|
### 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-1d480492"), 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(
|
|
118
|
-
class: "relative z-10 shrink-0",
|
|
112
|
+
default: _(() => [
|
|
113
|
+
r(l(T), {
|
|
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-1d480492"), 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":";UA8HQ,OAAO;;UAAP,OAAO;;AAqPf,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,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as q, openBlock as n, createElementBlock as f, Fragment as d, unref as t, createBlock as i, withCtx as m, createVNode as x, createCommentVNode as b, createElementVNode as o, normalizeClass as h, renderList as U, toDisplayString as c } from "vue";
|
|
2
2
|
import { formatMs as w } from "../../libs/formatters.js";
|
|
3
3
|
import { useWorkspace as y } from "../../store/workspace.js";
|
|
4
4
|
import { ListboxButton as C, ListboxOptions as L, ListboxOption as R } from "@headlessui/vue";
|
|
@@ -7,20 +7,20 @@ import { httpStatusCodes as S } from "@scalar/oas-utils/helpers";
|
|
|
7
7
|
import { useRouter as H } 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" }, N = { class: "text-c-2 gap-0" }, V = { class: "font-code text-c-3 flex flex-row items-center gap-1.5 text-sm font-medium" }, Q = /* @__PURE__ */
|
|
10
|
+
const E = { class: "font-code flex flex-1 gap-1.5 text-sm font-medium" }, N = { class: "text-c-2 gap-0" }, V = { class: "font-code text-c-3 flex flex-row items-center gap-1.5 text-sm font-medium" }, Q = /* @__PURE__ */ q({
|
|
11
11
|
__name: "AddressBarHistory",
|
|
12
12
|
props: {
|
|
13
13
|
open: { type: Boolean }
|
|
14
14
|
},
|
|
15
15
|
setup($) {
|
|
16
|
-
const { requestsHistory: u, activeRequest:
|
|
16
|
+
const { requestsHistory: u, activeRequest: g, requestExampleMutators: _ } = y(), v = H();
|
|
17
17
|
function p(a, r) {
|
|
18
18
|
const e = new URL(a.responseURL), s = new URLSearchParams(e.search).get("scalar_url");
|
|
19
19
|
return s ? new URL(s)[r].toString() : e.origin;
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function k(a) {
|
|
22
22
|
const r = u.value[a];
|
|
23
|
-
|
|
23
|
+
g.value.uid !== r.request.requestUid && v.push(`/request/${r.request.requestUid}`), _.set(r.request);
|
|
24
24
|
}
|
|
25
25
|
return (a, r) => (n(), f(d, null, [
|
|
26
26
|
t(u).length ? (n(), i(t(C), {
|
|
@@ -31,24 +31,25 @@ const E = { class: "font-code flex flex-1 gap-1.5 text-sm font-medium" }, N = {
|
|
|
31
31
|
x(t(B), {
|
|
32
32
|
class: "text-c-3",
|
|
33
33
|
icon: "History",
|
|
34
|
-
size: "
|
|
34
|
+
size: "sm",
|
|
35
|
+
thickness: "2.25"
|
|
35
36
|
})
|
|
36
37
|
]),
|
|
37
38
|
_: 1
|
|
38
39
|
})) : b("", !0),
|
|
39
40
|
o("div", {
|
|
40
|
-
class:
|
|
41
|
+
class: h([
|
|
41
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",
|
|
42
43
|
{ "before:shadow-lg": a.open }
|
|
43
44
|
])
|
|
44
45
|
}, [
|
|
45
46
|
x(t(L), { class: "bg-b-1 custom-scroll bg-mix-transparent bg-mix-amount-30 max-h-[300px] rounded-b p-[3px] pt-0 backdrop-blur" }, {
|
|
46
47
|
default: m(() => [
|
|
47
|
-
(n(!0), f(d, null,
|
|
48
|
+
(n(!0), f(d, null, U(t(u), ({ response: e }, l) => (n(), i(t(R), {
|
|
48
49
|
key: l,
|
|
49
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",
|
|
50
51
|
value: l,
|
|
51
|
-
onClick: (s) =>
|
|
52
|
+
onClick: (s) => k(l)
|
|
52
53
|
}, {
|
|
53
54
|
default: m(() => {
|
|
54
55
|
var s;
|
|
@@ -64,7 +65,7 @@ const E = { class: "font-code flex flex-1 gap-1.5 text-sm font-medium" }, N = {
|
|
|
64
65
|
o("div", V, [
|
|
65
66
|
o("span", null, c(t(w)(e.duration)), 1),
|
|
66
67
|
o("span", {
|
|
67
|
-
class:
|
|
68
|
+
class: h([t(z)(e.status).color])
|
|
68
69
|
}, c(e.status), 3),
|
|
69
70
|
o("span", null, c((s = t(S)[e.status]) == null ? void 0 : s.name), 1)
|
|
70
71
|
])
|
|
@@ -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,OAoRO,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;;qBAwPG,GAAG;kBACN,GAAG;;AA7Q9B,wBAgTC;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
|
|
5
|
+
const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-93d0e1be"]]);
|
|
5
6
|
export {
|
|
6
|
-
|
|
7
|
+
_ 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 s, 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: k }) {
|
|
37
42
|
var m;
|
|
38
|
-
const e =
|
|
43
|
+
const e = v, a = k, d = P(), V = d.id || `id-${N()}`, p = b(!1), { activeWorkspace: w } = W();
|
|
39
44
|
function C(l) {
|
|
40
45
|
return 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(), s(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] = (i) => a("update:modelValue", i))
|
|
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] = (i) => a("update:modelValue", i))
|
|
92
|
+
}, null, 8, ["modelValue", "value"])) : (t(), s("div", q({
|
|
88
93
|
key: 2,
|
|
89
|
-
id: E(
|
|
94
|
+
id: E(V)
|
|
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(), s("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(), s("div", D, " Required ")) : g("", !0)
|
|
102
107
|
], 64);
|
|
103
108
|
};
|
|
104
109
|
}
|
|
105
110
|
});
|
|
106
111
|
export {
|
|
107
|
-
|
|
112
|
+
Z as default
|
|
108
113
|
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type DecorationSet, type EditorView, ViewPlugin, type ViewUpdate, WidgetType } from '@scalar/use-codemirror';
|
|
2
|
+
declare class DropdownWidget extends WidgetType {
|
|
3
|
+
private queryTerm;
|
|
4
|
+
private onSelect;
|
|
5
|
+
private dropdown;
|
|
6
|
+
private withServers?;
|
|
7
|
+
constructor(queryTerm: string, onSelect: (item: string) => void, withServers?: boolean);
|
|
8
|
+
updateQueryTerm(newQueryTerm: string): void;
|
|
9
|
+
getQueryTerm(): string;
|
|
10
|
+
toDOM(view: EditorView): HTMLSpanElement;
|
|
11
|
+
destroy(): void;
|
|
12
|
+
eq(other: WidgetType): boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare const dropdownPlugin: (props: {
|
|
15
|
+
withServers?: boolean;
|
|
16
|
+
}) => ViewPlugin<{
|
|
17
|
+
decorations: DecorationSet;
|
|
18
|
+
widget: DropdownWidget | null;
|
|
19
|
+
view: EditorView;
|
|
20
|
+
handleDropdownSelect(item: string): void;
|
|
21
|
+
update(update: ViewUpdate): void;
|
|
22
|
+
}>;
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=codeDropdownWidget.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codeDropdownWidget.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/codeDropdownWidget.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,UAAU,EAEf,UAAU,EACV,KAAK,UAAU,EACf,UAAU,EACX,MAAM,wBAAwB,CAAA;AAK/B,cAAM,cAAe,SAAQ,UAAU;IACrC,OAAO,CAAC,SAAS,CAAQ;IACzB,OAAO,CAAC,QAAQ,CAAwB;IACxC,OAAO,CAAC,QAAQ,CAAY;IAC5B,OAAO,CAAC,WAAW,CAAC,CAAS;gBAG3B,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,EAChC,WAAW,CAAC,EAAE,OAAO;IAQvB,eAAe,CAAC,YAAY,EAAE,MAAM;IAMpC,YAAY;IAIZ,KAAK,CAAC,IAAI,EAAE,UAAU;IAoCtB,OAAO;IAOP,EAAE,CAAC,KAAK,EAAE,UAAU;CAGrB;AAED,eAAO,MAAM,cAAc,UAAW;IAAE,WAAW,CAAC,EAAE,OAAO,CAAA;CAAE;iBAG5C,aAAa;YAClB,cAAc,GAAG,IAAI;UACvB,UAAU;+BAQW,MAAM;mBAqClB,UAAU;EAsC5B,CAAA"}
|