@scalar/api-client 2.26.2 → 2.29.1
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 +218 -0
- package/dist/components/Server/ServerSelector.vue.js +6 -6
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +6 -6
- package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +1 -1
- package/dist/libs/local-storage.js +3 -3
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-body.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-body.js +29 -25
- package/dist/v2/blocks/operation-block/helpers/get-example.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/get-example.js +15 -15
- package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.d.ts +10 -0
- package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.js +4 -0
- package/dist/v2/blocks/request-block/RequestBlock.vue.js +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue2.js +26 -26
- package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBody.vue.js +2 -2
- package/dist/v2/blocks/request-block/components/RequestBody.vue2.js +88 -103
- package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +2 -0
- package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +2 -0
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/get-default-headers.d.ts +1 -1
- package/dist/v2/blocks/request-block/helpers/get-default-headers.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/get-default-headers.js +20 -19
- package/dist/v2/blocks/response-block/ResponseBlock.vue.js +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue2.js +7 -7
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js +1 -1
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue2.js +31 -40
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +2 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +52 -54
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +3 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +106 -86
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.d.ts +21 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.js +91 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue2.js +4 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +107 -93
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.js +87 -65
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts +36 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.js +35 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.js +18 -10
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.d.ts +5 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.js +27 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts +3 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts +4 -3
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.js +32 -40
- package/dist/v2/components/code-input/CodeInput.vue.d.ts.map +1 -1
- package/dist/v2/components/code-input/CodeInput.vue.js +2 -2
- package/dist/v2/components/layout/CollapsibleSection.vue.js +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts +2 -0
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.js +25 -24
- package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts +2 -0
- package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/SidebarMenu.vue.js +30 -30
- package/dist/v2/features/app/App.vue.d.ts +5 -0
- package/dist/v2/features/app/App.vue.d.ts.map +1 -1
- package/dist/v2/features/app/App.vue.js +80 -78
- package/dist/v2/features/app/app-events.d.ts +2 -1
- package/dist/v2/features/app/app-events.d.ts.map +1 -1
- package/dist/v2/features/app/app-events.js +89 -64
- package/dist/v2/features/app/app-state.d.ts.map +1 -1
- package/dist/v2/features/app/app-state.js +172 -151
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue.js +3 -3
- package/dist/v2/features/app/components/AppSidebar.vue2.js +99 -97
- package/dist/v2/features/app/components/DesktopTabs.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/DesktopTabs.vue.js +4 -4
- package/dist/v2/features/app/components/DownloadAppButton.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/DownloadAppButton.vue.js +1 -1
- package/dist/v2/features/app/components/DownloadAppButton.vue2.js +9 -9
- package/dist/v2/features/app/components/SidebarItemMenu.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/SidebarItemMenu.vue.js +71 -43
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts +11 -1
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts.map +1 -1
- package/dist/v2/features/app/helpers/create-api-client-app.js +12 -10
- package/dist/v2/features/app/helpers/routes.d.ts +2 -0
- package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
- package/dist/v2/features/app/helpers/routes.js +11 -11
- package/dist/v2/features/app/hooks/use-theme.d.ts +42 -0
- package/dist/v2/features/app/hooks/use-theme.d.ts.map +1 -0
- package/dist/v2/features/app/hooks/use-theme.js +34 -0
- package/dist/v2/features/collection/DocumentCollection.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/DocumentCollection.vue.js +27 -26
- package/dist/v2/features/collection/WorkspaceCollection.vue.d.ts +1 -6
- package/dist/v2/features/collection/WorkspaceCollection.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/WorkspaceCollection.vue.js +41 -22
- package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Authentication.vue.js +2 -2
- package/dist/v2/features/collection/components/Authentication.vue2.js +49 -40
- package/dist/v2/features/collection/components/Cookies.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Cookies.vue.js +26 -13
- package/dist/v2/features/collection/components/Environment.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Environment.vue.js +27 -15
- package/dist/v2/features/collection/components/LabelInput.vue.d.ts +3 -0
- package/dist/v2/features/collection/components/LabelInput.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/LabelInput.vue.js +2 -2
- package/dist/v2/features/collection/components/LabelInput.vue2.js +20 -16
- package/dist/v2/features/collection/components/Overview.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Overview.vue.js +2 -2
- package/dist/v2/features/collection/components/Overview.vue2.js +68 -61
- package/dist/v2/features/collection/components/Servers.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Servers.vue.js +93 -88
- package/dist/v2/features/collection/components/Settings.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Settings.vue.js +19 -17
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts +7 -2
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts.map +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.js +70 -71
- package/dist/v2/features/command-palette/components/{CommandPaletteDocument.vue.d.ts → CommandPaletteOpenApiDocument.vue.d.ts} +3 -3
- package/dist/v2/features/command-palette/components/CommandPaletteOpenApiDocument.vue.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/{CommandPaletteDocument.vue.js → CommandPaletteOpenApiDocument.vue.js} +15 -15
- package/dist/v2/features/command-palette/components/CommandPaletteOpenApiDocument.vue2.js +4 -0
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.d.ts +2 -2
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.d.ts.map +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.js +10 -10
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.d.ts +27 -5
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.d.ts.map +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.js +80 -53
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts +34 -9
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts.map +1 -1
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.js +50 -44
- package/dist/v2/features/environments/EnvironmentsList.vue.js +1 -1
- package/dist/v2/features/global-cookies/components/CookiesTable.vue.d.ts.map +1 -1
- package/dist/v2/features/global-cookies/components/CookiesTable.vue.js +2 -2
- package/dist/v2/features/global-cookies/components/CookiesTable.vue2.js +8 -8
- package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
- package/dist/v2/features/modal/Modal.vue.js +15 -15
- package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.js +30 -33
- package/dist/v2/features/settings/CollectionSettings.vue.d.ts +10 -7
- package/dist/v2/features/settings/CollectionSettings.vue.d.ts.map +1 -1
- package/dist/v2/features/settings/CollectionSettings.vue.js +183 -149
- package/dist/v2/features/settings/DocumentSettings.vue.d.ts.map +1 -1
- package/dist/v2/features/settings/DocumentSettings.vue.js +88 -79
- package/dist/v2/features/settings/components/Section.vue.d.ts +2 -1
- package/dist/v2/features/settings/components/Section.vue.d.ts.map +1 -1
- package/dist/v2/features/settings/components/Section.vue.js +26 -15
- package/dist/v2/features/settings/helpers/get-theme-colors.d.ts +4 -3
- package/dist/v2/features/settings/helpers/get-theme-colors.d.ts.map +1 -1
- package/dist/v2/features/settings/helpers/get-theme-colors.js +6 -7
- package/dist/v2/helpers/handle-hotkeys.d.ts.map +1 -1
- package/dist/v2/helpers/handle-hotkeys.js +2 -2
- package/dist/v2/hooks/use-global-hot-keys.d.ts +3 -1
- package/dist/v2/hooks/use-global-hot-keys.d.ts.map +1 -1
- package/dist/v2/hooks/use-global-hot-keys.js +8 -6
- package/dist/v2/workspace-events.d.ts.map +1 -1
- package/dist/v2/workspace-events.js +132 -115
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +17 -16
- package/dist/v2/features/command-palette/components/CommandPaletteDocument.vue.d.ts.map +0 -1
- package/dist/v2/features/command-palette/components/CommandPaletteDocument.vue2.js +0 -4
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { defineComponent as L, mergeModels as
|
|
2
|
-
import { useModal as J, ScalarSidebarItem as
|
|
1
|
+
import { defineComponent as L, mergeModels as W, computed as k, capitalize as R, useModel as h, ref as V, createElementBlock as p, openBlock as u, createVNode as d, createBlock as w, createCommentVNode as m, unref as i, createSlots as j, withCtx as r, createTextVNode as b, createElementVNode as l, withKeys as g, withModifiers as v, toDisplayString as F, renderSlot as G, normalizeClass as H, Fragment as I, nextTick as U } from "vue";
|
|
2
|
+
import { useModal as J, ScalarSidebarItem as $, ScalarIconButton as Y, ScalarButton as E, ScalarModal as Q } from "@scalar/components";
|
|
3
3
|
import { isMacOS as X } from "@scalar/helpers/general/is-mac-os";
|
|
4
|
-
import { ScalarIconPlus as Z, ScalarIconDotsThree as _
|
|
5
|
-
import { LibraryIcon as
|
|
4
|
+
import { ScalarIconPlus as Z, ScalarIconDotsThree as _ } from "@scalar/icons";
|
|
5
|
+
import { LibraryIcon as ee } from "@scalar/icons/library";
|
|
6
6
|
import { getParentEntry as S } from "@scalar/workspace-store/navigation";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
7
|
+
import te from "../../../../assets/rabbit.ascii.js";
|
|
8
|
+
import ae from "../../../../assets/rabbitjump.ascii.js";
|
|
9
|
+
import O from "../../../../components/ScalarAsciiArt.vue.js";
|
|
10
|
+
import oe from "../../../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
|
|
11
|
+
import ne from "./DownloadAppButton.vue.js";
|
|
11
12
|
import ie from "./SidebarItemMenu.vue.js";
|
|
12
13
|
import { dragHandleFactory as se } from "../../../helpers/drag-handle-factory.js";
|
|
13
14
|
import re from "../../../components/sidebar/Sidebar.vue.js";
|
|
@@ -17,9 +18,9 @@ const le = { class: "flex" }, de = {
|
|
|
17
18
|
}, ue = {
|
|
18
19
|
key: 0,
|
|
19
20
|
class: "empty-sidebar-item-content overflow-hidden px-2.5 py-2.5"
|
|
20
|
-
}, me = { class: "rabbit-ascii relative m-auto mt-2 h-[68px] w-[60px]" }, ce = { class: "gap-1.5 p-2" }, pe = { class: "text-sidebar-c-2 rounded border px-1.25 py-1 text-xs leading-none font-medium uppercase" },
|
|
21
|
+
}, me = { class: "rabbit-ascii relative m-auto mt-2 h-[68px] w-[60px]" }, ce = { class: "flex flex-col gap-1.5 p-2" }, pe = { class: "text-sidebar-c-2 rounded border px-1.25 py-1 text-xs leading-none font-medium uppercase" }, Ie = /* @__PURE__ */ L({
|
|
21
22
|
__name: "AppSidebar",
|
|
22
|
-
props: /* @__PURE__ */
|
|
23
|
+
props: /* @__PURE__ */ W({
|
|
23
24
|
layout: {},
|
|
24
25
|
sidebarState: {},
|
|
25
26
|
isWorkspaceOpen: { type: Boolean },
|
|
@@ -36,104 +37,104 @@ const le = { class: "flex" }, de = {
|
|
|
36
37
|
},
|
|
37
38
|
sidebarWidthModifiers: {}
|
|
38
39
|
}),
|
|
39
|
-
emits: /* @__PURE__ */
|
|
40
|
-
setup(
|
|
41
|
-
const f = A, D = k(() => R(
|
|
40
|
+
emits: /* @__PURE__ */ W(["click:workspace", "selectItem", "select:workspace", "create:workspace"], ["update:isSidebarOpen", "update:sidebarWidth"]),
|
|
41
|
+
setup(a, { emit: A }) {
|
|
42
|
+
const f = A, D = k(() => R(a.activeWorkspace.label)), M = h(a, "isSidebarOpen"), B = h(a, "sidebarWidth"), x = k(() => a.sidebarState.items.value.length <= 1), C = k(
|
|
42
43
|
() => se({
|
|
43
|
-
store:
|
|
44
|
-
sidebarState:
|
|
44
|
+
store: a.store,
|
|
45
|
+
sidebarState: a.sidebarState
|
|
45
46
|
})
|
|
46
|
-
), N = (
|
|
47
|
-
const
|
|
48
|
-
return
|
|
47
|
+
), N = (o, e) => C.value.handleDragEnd(o, e), T = (o, e) => C.value.isDroppable(o, e), s = V(null), y = J(), K = k(() => {
|
|
48
|
+
const o = s.value?.item;
|
|
49
|
+
return o?.type === "document" ? "This cannot be undone. You're about to delete the document and all tags and operations inside it." : `Are you sure you want to delete this ${o?.type ?? "item"}? This action cannot be undone.`;
|
|
49
50
|
}), z = () => {
|
|
50
|
-
const
|
|
51
|
-
if (!
|
|
51
|
+
const o = s.value?.item;
|
|
52
|
+
if (!o)
|
|
52
53
|
return;
|
|
53
|
-
const e =
|
|
54
|
+
const e = a.sidebarState.getEntryById(o.id), t = S("document", e), n = S("operation", e);
|
|
54
55
|
if (t) {
|
|
55
|
-
if (
|
|
56
|
-
|
|
57
|
-
else if (
|
|
58
|
-
|
|
56
|
+
if (o.type === "document")
|
|
57
|
+
a.eventBus.emit("document:delete:document", { name: t.name });
|
|
58
|
+
else if (o.type === "tag")
|
|
59
|
+
a.eventBus.emit("tag:delete:tag", {
|
|
59
60
|
documentName: t.name,
|
|
60
|
-
name:
|
|
61
|
+
name: o.name
|
|
61
62
|
});
|
|
62
|
-
else if (
|
|
63
|
+
else if (o.type === "operation") {
|
|
63
64
|
if (!n)
|
|
64
65
|
return;
|
|
65
|
-
|
|
66
|
+
a.eventBus.emit("operation:delete:operation", {
|
|
66
67
|
meta: {
|
|
67
68
|
method: n.method,
|
|
68
69
|
path: n.path
|
|
69
70
|
},
|
|
70
71
|
documentName: t.name
|
|
71
72
|
});
|
|
72
|
-
} else if (
|
|
73
|
+
} else if (o.type === "example") {
|
|
73
74
|
if (!n)
|
|
74
75
|
return;
|
|
75
|
-
|
|
76
|
+
a.eventBus.emit("operation:delete:example", {
|
|
76
77
|
meta: {
|
|
77
78
|
method: n.method,
|
|
78
79
|
path: n.path,
|
|
79
|
-
exampleKey:
|
|
80
|
+
exampleKey: o.name
|
|
80
81
|
},
|
|
81
82
|
documentName: t.name
|
|
82
83
|
});
|
|
83
84
|
}
|
|
84
85
|
y.hide(), s.value = null;
|
|
85
86
|
}
|
|
86
|
-
},
|
|
87
|
+
}, c = async (o, e) => {
|
|
87
88
|
if (s.value?.showMenu)
|
|
88
89
|
return;
|
|
89
|
-
const t =
|
|
90
|
+
const t = o.currentTarget;
|
|
90
91
|
s.value = { item: e, el: t, showMenu: !0 }, await U();
|
|
91
|
-
const n =
|
|
92
|
+
const n = o instanceof MouseEvent ? new MouseEvent(o.type, o) : new KeyboardEvent(o.type, o);
|
|
92
93
|
s.value?.el.dispatchEvent(n);
|
|
93
94
|
}, P = () => {
|
|
94
95
|
s.value && (s.value.showMenu = !1);
|
|
95
|
-
}, q = (
|
|
96
|
-
const e =
|
|
97
|
-
|
|
96
|
+
}, q = (o) => {
|
|
97
|
+
const e = a.sidebarState.getEntryById(o.id), t = S("document", e), n = S("tag", e);
|
|
98
|
+
a.eventBus.emit("ui:open:command-palette", {
|
|
98
99
|
action: "create-request",
|
|
99
100
|
payload: {
|
|
100
|
-
|
|
101
|
+
documentName: t?.name,
|
|
101
102
|
tagId: n?.name
|
|
102
103
|
}
|
|
103
104
|
});
|
|
104
105
|
};
|
|
105
|
-
return (
|
|
106
|
+
return (o, e) => (u(), p("div", le, [
|
|
106
107
|
d(i(re), {
|
|
107
108
|
isSidebarOpen: M.value,
|
|
108
109
|
"onUpdate:isSidebarOpen": e[3] || (e[3] = (t) => M.value = t),
|
|
109
110
|
sidebarWidth: B.value,
|
|
110
111
|
"onUpdate:sidebarWidth": e[4] || (e[4] = (t) => B.value = t),
|
|
111
|
-
activeWorkspace:
|
|
112
|
-
documents: Object.values(
|
|
112
|
+
activeWorkspace: a.activeWorkspace,
|
|
113
|
+
documents: Object.values(a.store.workspace.documents),
|
|
113
114
|
isDroppable: T,
|
|
114
|
-
layout:
|
|
115
|
-
sidebarState:
|
|
116
|
-
workspaces:
|
|
115
|
+
layout: a.layout,
|
|
116
|
+
sidebarState: a.sidebarState,
|
|
117
|
+
workspaces: a.workspaces,
|
|
117
118
|
"onCreate:workspace": e[5] || (e[5] = (t) => f("create:workspace")),
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
119
|
+
"onNavigate:to:settings": e[6] || (e[6] = (t) => a.eventBus.emit("ui:navigate", { page: "workspace", path: "settings" })),
|
|
120
|
+
onReorder: e[7] || (e[7] = (t, n) => N(t, n)),
|
|
121
|
+
"onSelect:workspace": e[8] || (e[8] = (t) => f("select:workspace", t)),
|
|
122
|
+
onSelectItem: e[9] || (e[9] = (t) => f("selectItem", t))
|
|
121
123
|
}, j({
|
|
122
124
|
sidebarMenuActions: r(() => [
|
|
123
|
-
G(
|
|
125
|
+
G(o.$slots, "sidebarMenuActions", {}, void 0, !0)
|
|
124
126
|
]),
|
|
125
127
|
workspaceButton: r(() => [
|
|
126
|
-
d(i(
|
|
128
|
+
d(i($), {
|
|
127
129
|
is: "button",
|
|
128
|
-
active:
|
|
129
|
-
icon: i(ee),
|
|
130
|
+
active: a.isWorkspaceOpen,
|
|
130
131
|
onClick: e[0] || (e[0] = (t) => f("click:workspace"))
|
|
131
132
|
}, {
|
|
132
133
|
default: r(() => [
|
|
133
134
|
b(F(D.value), 1)
|
|
134
135
|
]),
|
|
135
136
|
_: 1
|
|
136
|
-
}, 8, ["active"
|
|
137
|
+
}, 8, ["active"])
|
|
137
138
|
]),
|
|
138
139
|
decorator: r(({ item: t }) => [
|
|
139
140
|
d(i(Y), {
|
|
@@ -143,33 +144,33 @@ const le = { class: "flex" }, de = {
|
|
|
143
144
|
label: "More options",
|
|
144
145
|
size: "sm",
|
|
145
146
|
weight: "bold",
|
|
146
|
-
onClick: v((n) =>
|
|
147
|
+
onClick: v((n) => c(n, t), ["stop"]),
|
|
147
148
|
onKeydown: [
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
149
|
+
g(v((n) => c(n, t), ["stop"]), ["down"]),
|
|
150
|
+
g(v((n) => c(n, t), ["stop"]), ["enter"]),
|
|
151
|
+
g(v((n) => c(n, t), ["stop"]), ["space"]),
|
|
152
|
+
g(v((n) => c(n, t), ["stop"]), ["up"])
|
|
152
153
|
]
|
|
153
154
|
}, null, 8, ["icon", "onClick", "onKeydown"])
|
|
154
155
|
]),
|
|
155
156
|
icon: r(({ item: t }) => [
|
|
156
|
-
t.type === "document" &&
|
|
157
|
-
d(i(
|
|
157
|
+
t.type === "document" && a.store.workspace.documents[t.name]?.["x-scalar-is-dirty"] === !0 ? (u(), p("div", de, [
|
|
158
|
+
d(i(ee), {
|
|
158
159
|
class: "block",
|
|
159
160
|
src: "icon" in t && t.icon || "interface-content-folder"
|
|
160
161
|
}, null, 8, ["src"]),
|
|
161
|
-
e[
|
|
162
|
-
])) :
|
|
162
|
+
e[12] || (e[12] = l("div", { class: "bg-orange absolute -top-1.25 -right-1.25 flex h-2.5 w-2.5 items-center justify-center rounded-full text-[9px] font-bold text-white" }, " ! ", -1))
|
|
163
|
+
])) : m("", !0)
|
|
163
164
|
]),
|
|
164
165
|
empty: r(({ item: t }) => [
|
|
165
|
-
d(i(
|
|
166
|
+
d(i($), {
|
|
166
167
|
is: "button",
|
|
167
168
|
onClick: (n) => q(t)
|
|
168
169
|
}, {
|
|
169
170
|
icon: r(() => [
|
|
170
171
|
d(i(Z))
|
|
171
172
|
]),
|
|
172
|
-
default: r(() => [...e[
|
|
173
|
+
default: r(() => [...e[13] || (e[13] = [
|
|
173
174
|
b("Add operation", -1)
|
|
174
175
|
])]),
|
|
175
176
|
_: 1
|
|
@@ -177,101 +178,102 @@ const le = { class: "flex" }, de = {
|
|
|
177
178
|
]),
|
|
178
179
|
_: 2
|
|
179
180
|
}, [
|
|
180
|
-
|
|
181
|
+
a.layout !== "modal" ? {
|
|
181
182
|
name: "footer",
|
|
182
183
|
fn: r(() => [
|
|
183
184
|
l("div", {
|
|
184
185
|
class: H({
|
|
185
|
-
"empty-sidebar-item border-t":
|
|
186
|
+
"empty-sidebar-item border-t": x.value
|
|
186
187
|
})
|
|
187
188
|
}, [
|
|
188
|
-
|
|
189
|
+
x.value ? (u(), p("div", ue, [
|
|
189
190
|
l("div", me, [
|
|
190
|
-
d(
|
|
191
|
-
art: i(
|
|
191
|
+
d(O, {
|
|
192
|
+
art: i(te),
|
|
192
193
|
class: "rabbitsit font-bold"
|
|
193
194
|
}, null, 8, ["art"]),
|
|
194
|
-
d(
|
|
195
|
-
art: i(
|
|
195
|
+
d(O, {
|
|
196
|
+
art: i(ae),
|
|
196
197
|
class: "rabbitjump absolute top-0 left-0 font-bold"
|
|
197
198
|
}, null, 8, ["art"])
|
|
198
199
|
]),
|
|
199
|
-
e[
|
|
200
|
+
e[14] || (e[14] = l("div", { class: "mt-2 mb-2 text-center text-sm text-balance" }, [
|
|
200
201
|
l("b", { class: "font-medium" }, "Let's Get Started"),
|
|
201
202
|
l("p", { class: "mt-2 leading-3" }, " Create request, folder, collection or import from OpenAPI/Postman ")
|
|
202
203
|
], -1))
|
|
203
|
-
])) :
|
|
204
|
+
])) : m("", !0),
|
|
204
205
|
l("div", ce, [
|
|
205
|
-
|
|
206
|
+
x.value ? (u(), w(i(E), {
|
|
206
207
|
key: 0,
|
|
207
208
|
class: "w-full",
|
|
208
209
|
size: "sm",
|
|
209
|
-
onClick: e[1] || (e[1] = (t) =>
|
|
210
|
+
onClick: e[1] || (e[1] = (t) => a.eventBus.emit("ui:open:command-palette", {
|
|
210
211
|
action: "import-from-openapi-swagger-postman-curl",
|
|
211
212
|
payload: void 0
|
|
212
213
|
}))
|
|
213
214
|
}, {
|
|
214
|
-
default: r(() => [...e[
|
|
215
|
+
default: r(() => [...e[15] || (e[15] = [
|
|
215
216
|
b(" Import Collection ", -1)
|
|
216
217
|
])]),
|
|
217
218
|
_: 1
|
|
218
|
-
})) :
|
|
219
|
-
d(i(
|
|
219
|
+
})) : m("", !0),
|
|
220
|
+
d(i(E), {
|
|
220
221
|
class: "w-full",
|
|
221
222
|
hotkey: "K",
|
|
222
223
|
size: "sm",
|
|
223
224
|
variant: "outlined",
|
|
224
|
-
onClick: e[2] || (e[2] = (t) =>
|
|
225
|
+
onClick: e[2] || (e[2] = (t) => a.eventBus.emit("ui:open:command-palette"))
|
|
225
226
|
}, {
|
|
226
227
|
default: r(() => [
|
|
227
|
-
e[
|
|
228
|
+
e[21] || (e[21] = b(" Add Item ", -1)),
|
|
228
229
|
l("span", pe, [
|
|
229
|
-
i(X)() ? (u(),
|
|
230
|
-
e[
|
|
231
|
-
e[
|
|
232
|
-
], 64)) : (u(),
|
|
233
|
-
e[
|
|
234
|
-
e[
|
|
230
|
+
i(X)() ? (u(), p(I, { key: 0 }, [
|
|
231
|
+
e[16] || (e[16] = l("span", { class: "sr-only" }, "Command", -1)),
|
|
232
|
+
e[17] || (e[17] = l("span", { "aria-hidden": "true" }, "⌘", -1))
|
|
233
|
+
], 64)) : (u(), p(I, { key: 1 }, [
|
|
234
|
+
e[18] || (e[18] = l("span", { class: "sr-only" }, "CTRL", -1)),
|
|
235
|
+
e[19] || (e[19] = l("span", { "aria-hidden": "true" }, "⌃", -1))
|
|
235
236
|
], 64)),
|
|
236
|
-
e[
|
|
237
|
+
e[20] || (e[20] = b(" K ", -1))
|
|
237
238
|
])
|
|
238
239
|
]),
|
|
239
240
|
_: 1
|
|
240
|
-
})
|
|
241
|
+
}),
|
|
242
|
+
a.layout === "web" ? (u(), w(ne, { key: 1 })) : m("", !0)
|
|
241
243
|
])
|
|
242
244
|
], 2)
|
|
243
245
|
]),
|
|
244
246
|
key: "0"
|
|
245
247
|
} : void 0
|
|
246
248
|
]), 1032, ["isSidebarOpen", "sidebarWidth", "activeWorkspace", "documents", "layout", "sidebarState", "workspaces"]),
|
|
247
|
-
s.value?.showMenu ? (u(),
|
|
249
|
+
s.value?.showMenu ? (u(), w(ie, {
|
|
248
250
|
key: 0,
|
|
249
|
-
eventBus:
|
|
251
|
+
eventBus: a.eventBus,
|
|
250
252
|
item: s.value.item,
|
|
251
|
-
sidebarState:
|
|
253
|
+
sidebarState: a.sidebarState,
|
|
252
254
|
target: s.value.el,
|
|
253
255
|
onCloseMenu: P,
|
|
254
|
-
onShowDeleteModal: e[
|
|
255
|
-
}, null, 8, ["eventBus", "item", "sidebarState", "target"])) :
|
|
256
|
-
s.value ? (u(),
|
|
256
|
+
onShowDeleteModal: e[10] || (e[10] = (t) => i(y).show())
|
|
257
|
+
}, null, 8, ["eventBus", "item", "sidebarState", "target"])) : m("", !0),
|
|
258
|
+
s.value ? (u(), w(i(Q), {
|
|
257
259
|
key: 1,
|
|
258
260
|
size: "xxs",
|
|
259
261
|
state: i(y),
|
|
260
262
|
title: `Delete ${s.value.item.title}`
|
|
261
263
|
}, {
|
|
262
264
|
default: r(() => [
|
|
263
|
-
d(
|
|
265
|
+
d(oe, {
|
|
264
266
|
variableName: s.value.item.title,
|
|
265
267
|
warningMessage: K.value,
|
|
266
|
-
onClose: e[
|
|
268
|
+
onClose: e[11] || (e[11] = (t) => i(y).hide()),
|
|
267
269
|
onDelete: z
|
|
268
270
|
}, null, 8, ["variableName", "warningMessage"])
|
|
269
271
|
]),
|
|
270
272
|
_: 1
|
|
271
|
-
}, 8, ["state", "title"])) :
|
|
273
|
+
}, 8, ["state", "title"])) : m("", !0)
|
|
272
274
|
]));
|
|
273
275
|
}
|
|
274
276
|
});
|
|
275
277
|
export {
|
|
276
|
-
|
|
278
|
+
Ie as default
|
|
277
279
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DesktopTabs.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/components/DesktopTabs.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DesktopTabs.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/components/DesktopTabs.vue"],"names":[],"mappings":"AA2EA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,oEAAoE,CAAA;AAK7F,KAAK,WAAW,GAAG;IACjB,iBAAiB;IACjB,IAAI,EAAE,GAAG,EAAE,CAAA;IACX,+BAA+B;IAC/B,cAAc,EAAE,MAAM,CAAA;IACtB,0DAA0D;IAC1D,QAAQ,EAAE,iBAAiB,CAAA;CAC5B,CAAC;AAwJF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as v, computed as d, createElementBlock as l, openBlock as n, createElementVNode as h, Fragment as T, renderList as
|
|
1
|
+
import { defineComponent as v, computed as d, createElementBlock as l, openBlock as n, createElementVNode as h, Fragment as T, renderList as C, createBlock as k, createVNode as p, unref as g } from "vue";
|
|
2
2
|
import { ScalarIcon as f } from "@scalar/components";
|
|
3
3
|
import B from "./DesktopTab.vue.js";
|
|
4
|
-
const y = { class: "
|
|
4
|
+
const y = { class: "t-app__top-nav z-1 flex h-10 items-center gap-2 px-2" }, U = /* @__PURE__ */ v({
|
|
5
5
|
__name: "DesktopTabs",
|
|
6
6
|
props: {
|
|
7
7
|
tabs: {},
|
|
@@ -21,7 +21,7 @@ const y = { class: "mac:pl-[72px] t-app__top-nav z-1 flex h-10 items-center gap-
|
|
|
21
21
|
e.eventBus.emit("tabs:copy:url", { index: t });
|
|
22
22
|
};
|
|
23
23
|
return (t, S) => (n(), l("nav", y, [
|
|
24
|
-
(n(!0), l(T, null,
|
|
24
|
+
(n(!0), l(T, null, C(e.tabs, (m, a) => (n(), k(B, {
|
|
25
25
|
key: a,
|
|
26
26
|
active: a === e.activeTabIndex,
|
|
27
27
|
hotkey: !o.value && a < 9 ? String(a + 1) : void 0,
|
|
@@ -38,7 +38,7 @@ const y = { class: "mac:pl-[72px] t-app__top-nav z-1 flex h-10 items-center gap-
|
|
|
38
38
|
type: "button",
|
|
39
39
|
onClick: s
|
|
40
40
|
}, [
|
|
41
|
-
|
|
41
|
+
p(g(f), {
|
|
42
42
|
icon: "Add",
|
|
43
43
|
size: "sm",
|
|
44
44
|
thickness: "2.5"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DownloadAppButton.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/components/DownloadAppButton.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DownloadAppButton.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/components/DownloadAppButton.vue"],"names":[],"mappings":"AAiGA,QAAA,MAAM,YAAY,+QAChB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./DownloadAppButton.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-9c21e4d7"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as e, createElementBlock as o, openBlock as n, createVNode as a, createElementVNode as m, unref as l } from "vue";
|
|
2
2
|
import { ScalarIconDownloadSimple as r } from "@scalar/icons";
|
|
3
|
-
const
|
|
4
|
-
class: "download-app-button flex flex-row gap-2 rounded
|
|
3
|
+
const s = {
|
|
4
|
+
class: "download-app-button flex w-full flex-row items-center justify-center gap-2 rounded px-3.5 py-2 text-sm leading-5 font-medium",
|
|
5
5
|
href: "https://scalar.com/download?utm_source=web_client&utm_medium=download_button&utm_campaign=topnav",
|
|
6
6
|
target: "_blank",
|
|
7
7
|
type: "button"
|
|
8
|
-
},
|
|
8
|
+
}, i = /* @__PURE__ */ e({
|
|
9
9
|
__name: "DownloadAppButton",
|
|
10
|
-
setup(
|
|
11
|
-
return (d,
|
|
12
|
-
a(
|
|
13
|
-
|
|
10
|
+
setup(p) {
|
|
11
|
+
return (d, t) => (n(), o("a", s, [
|
|
12
|
+
a(l(r), { size: "sm" }),
|
|
13
|
+
t[0] || (t[0] = m("span", { class: "sr-only text-sm font-medium sm:not-sr-only" }, " Download App ", -1))
|
|
14
14
|
]));
|
|
15
15
|
}
|
|
16
16
|
});
|
|
17
17
|
export {
|
|
18
|
-
|
|
18
|
+
i as default
|
|
19
19
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidebarItemMenu.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/components/SidebarItemMenu.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SidebarItemMenu.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/components/SidebarItemMenu.vue"],"names":[],"mappings":"AA2MA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAA;AAGhF,KAAK,WAAW,GAAG;IACjB,4CAA4C;IAC5C,IAAI,EAAE,cAAc,CAAA;IACpB,sCAAsC;IACtC,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,qDAAqD;IACrD,YAAY,EAAE,YAAY,CAAC,cAAc,CAAC,CAAA;IAC1C,sDAAsD;IACtD,MAAM,EAAE,WAAW,CAAA;CACpB,CAAC;AA+YF,QAAA,MAAM,YAAY;;;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|