@scalar/api-client 2.27.1 → 2.29.2
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 +166 -0
- 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/request-block/RequestBlock.vue.js +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue2.js +21 -21
- 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 +67 -75
- 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/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 +42 -40
- 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 +5 -5
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts +3 -1
- 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 +35 -35
- 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/sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.js +1 -1
- package/dist/v2/features/app/App.vue.d.ts.map +1 -1
- package/dist/v2/features/app/App.vue.js +70 -70
- 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 +4 -2
- package/dist/v2/features/app/app-state.d.ts.map +1 -1
- package/dist/v2/features/app/app-state.js +185 -156
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue.js +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue2.js +48 -47
- 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/routes.js +11 -11
- 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 +38 -20
- 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 +20 -16
- 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/Settings.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Settings.vue.js +18 -14
- 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/operation/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.js +19 -15
- package/dist/v2/helpers/get-active-proxy-url.d.ts +18 -0
- package/dist/v2/helpers/get-active-proxy-url.d.ts.map +1 -0
- package/dist/v2/helpers/get-active-proxy-url.js +5 -0
- package/dist/v2/workspace-events.d.ts.map +1 -1
- package/dist/v2/workspace-events.js +123 -113
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +18 -18
- 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 $, ScalarIconButton as Y, ScalarButton 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
|
|
6
|
-
import { getParentEntry as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
4
|
+
import { ScalarIconPlus as Z, ScalarIconDotsThree as _ } from "@scalar/icons";
|
|
5
|
+
import { LibraryIcon as ee } from "@scalar/icons/library";
|
|
6
|
+
import { getParentEntry as S } from "@scalar/workspace-store/navigation";
|
|
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,9 +37,9 @@ const le = { class: "flex" }, de = {
|
|
|
36
37
|
},
|
|
37
38
|
sidebarWidthModifiers: {}
|
|
38
39
|
}),
|
|
39
|
-
emits: /* @__PURE__ */
|
|
40
|
+
emits: /* @__PURE__ */ W(["click:workspace", "selectItem", "select:workspace", "create:workspace"], ["update:isSidebarOpen", "update:sidebarWidth"]),
|
|
40
41
|
setup(a, { emit: A }) {
|
|
41
|
-
const f = A, D = k(() => R(a.activeWorkspace.label)), M =
|
|
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
44
|
store: a.store,
|
|
44
45
|
sidebarState: a.sidebarState
|
|
@@ -50,7 +51,7 @@ const le = { class: "flex" }, de = {
|
|
|
50
51
|
const o = s.value?.item;
|
|
51
52
|
if (!o)
|
|
52
53
|
return;
|
|
53
|
-
const e = a.sidebarState.getEntryById(o.id), t =
|
|
54
|
+
const e = a.sidebarState.getEntryById(o.id), t = S("document", e), n = S("operation", e);
|
|
54
55
|
if (t) {
|
|
55
56
|
if (o.type === "document")
|
|
56
57
|
a.eventBus.emit("document:delete:document", { name: t.name });
|
|
@@ -83,7 +84,7 @@ const le = { class: "flex" }, de = {
|
|
|
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
90
|
const t = o.currentTarget;
|
|
@@ -93,16 +94,16 @@ const le = { class: "flex" }, de = {
|
|
|
93
94
|
}, P = () => {
|
|
94
95
|
s.value && (s.value.showMenu = !1);
|
|
95
96
|
}, q = (o) => {
|
|
96
|
-
const e = a.sidebarState.getEntryById(o.id), t =
|
|
97
|
+
const e = a.sidebarState.getEntryById(o.id), t = S("document", e), n = S("tag", e);
|
|
97
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 (o, e) => (u(),
|
|
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),
|
|
@@ -127,14 +128,13 @@ const le = { class: "flex" }, de = {
|
|
|
127
128
|
d(i($), {
|
|
128
129
|
is: "button",
|
|
129
130
|
active: a.isWorkspaceOpen,
|
|
130
|
-
icon: i(ee),
|
|
131
131
|
onClick: e[0] || (e[0] = (t) => f("click:workspace"))
|
|
132
132
|
}, {
|
|
133
133
|
default: r(() => [
|
|
134
134
|
b(F(D.value), 1)
|
|
135
135
|
]),
|
|
136
136
|
_: 1
|
|
137
|
-
}, 8, ["active"
|
|
137
|
+
}, 8, ["active"])
|
|
138
138
|
]),
|
|
139
139
|
decorator: r(({ item: t }) => [
|
|
140
140
|
d(i(Y), {
|
|
@@ -144,23 +144,23 @@ const le = { class: "flex" }, de = {
|
|
|
144
144
|
label: "More options",
|
|
145
145
|
size: "sm",
|
|
146
146
|
weight: "bold",
|
|
147
|
-
onClick: v((n) =>
|
|
147
|
+
onClick: v((n) => c(n, t), ["stop"]),
|
|
148
148
|
onKeydown: [
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
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"])
|
|
153
153
|
]
|
|
154
154
|
}, null, 8, ["icon", "onClick", "onKeydown"])
|
|
155
155
|
]),
|
|
156
156
|
icon: r(({ item: t }) => [
|
|
157
|
-
t.type === "document" && a.store.workspace.documents[t.name]?.["x-scalar-is-dirty"] === !0 ? (u(),
|
|
158
|
-
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), {
|
|
159
159
|
class: "block",
|
|
160
160
|
src: "icon" in t && t.icon || "interface-content-folder"
|
|
161
161
|
}, null, 8, ["src"]),
|
|
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
|
-
])) :
|
|
163
|
+
])) : m("", !0)
|
|
164
164
|
]),
|
|
165
165
|
empty: r(({ item: t }) => [
|
|
166
166
|
d(i($), {
|
|
@@ -183,17 +183,17 @@ const le = { class: "flex" }, de = {
|
|
|
183
183
|
fn: r(() => [
|
|
184
184
|
l("div", {
|
|
185
185
|
class: H({
|
|
186
|
-
"empty-sidebar-item border-t":
|
|
186
|
+
"empty-sidebar-item border-t": x.value
|
|
187
187
|
})
|
|
188
188
|
}, [
|
|
189
|
-
|
|
189
|
+
x.value ? (u(), p("div", ue, [
|
|
190
190
|
l("div", me, [
|
|
191
|
-
d(
|
|
192
|
-
art: i(
|
|
191
|
+
d(O, {
|
|
192
|
+
art: i(te),
|
|
193
193
|
class: "rabbitsit font-bold"
|
|
194
194
|
}, null, 8, ["art"]),
|
|
195
|
-
d(
|
|
196
|
-
art: i(
|
|
195
|
+
d(O, {
|
|
196
|
+
art: i(ae),
|
|
197
197
|
class: "rabbitjump absolute top-0 left-0 font-bold"
|
|
198
198
|
}, null, 8, ["art"])
|
|
199
199
|
]),
|
|
@@ -201,9 +201,9 @@ const le = { class: "flex" }, de = {
|
|
|
201
201
|
l("b", { class: "font-medium" }, "Let's Get Started"),
|
|
202
202
|
l("p", { class: "mt-2 leading-3" }, " Create request, folder, collection or import from OpenAPI/Postman ")
|
|
203
203
|
], -1))
|
|
204
|
-
])) :
|
|
204
|
+
])) : m("", !0),
|
|
205
205
|
l("div", ce, [
|
|
206
|
-
|
|
206
|
+
x.value ? (u(), w(i(E), {
|
|
207
207
|
key: 0,
|
|
208
208
|
class: "w-full",
|
|
209
209
|
size: "sm",
|
|
@@ -216,8 +216,8 @@ const le = { class: "flex" }, de = {
|
|
|
216
216
|
b(" Import Collection ", -1)
|
|
217
217
|
])]),
|
|
218
218
|
_: 1
|
|
219
|
-
})) :
|
|
220
|
-
d(i(
|
|
219
|
+
})) : m("", !0),
|
|
220
|
+
d(i(E), {
|
|
221
221
|
class: "w-full",
|
|
222
222
|
hotkey: "K",
|
|
223
223
|
size: "sm",
|
|
@@ -227,10 +227,10 @@ const le = { class: "flex" }, de = {
|
|
|
227
227
|
default: r(() => [
|
|
228
228
|
e[21] || (e[21] = b(" Add Item ", -1)),
|
|
229
229
|
l("span", pe, [
|
|
230
|
-
i(X)() ? (u(),
|
|
230
|
+
i(X)() ? (u(), p(I, { key: 0 }, [
|
|
231
231
|
e[16] || (e[16] = l("span", { class: "sr-only" }, "Command", -1)),
|
|
232
232
|
e[17] || (e[17] = l("span", { "aria-hidden": "true" }, "⌘", -1))
|
|
233
|
-
], 64)) : (u(),
|
|
233
|
+
], 64)) : (u(), p(I, { key: 1 }, [
|
|
234
234
|
e[18] || (e[18] = l("span", { class: "sr-only" }, "CTRL", -1)),
|
|
235
235
|
e[19] || (e[19] = l("span", { "aria-hidden": "true" }, "⌃", -1))
|
|
236
236
|
], 64)),
|
|
@@ -238,14 +238,15 @@ const le = { class: "flex" }, de = {
|
|
|
238
238
|
])
|
|
239
239
|
]),
|
|
240
240
|
_: 1
|
|
241
|
-
})
|
|
241
|
+
}),
|
|
242
|
+
a.layout === "web" ? (u(), w(ne, { key: 1 })) : m("", !0)
|
|
242
243
|
])
|
|
243
244
|
], 2)
|
|
244
245
|
]),
|
|
245
246
|
key: "0"
|
|
246
247
|
} : void 0
|
|
247
248
|
]), 1032, ["isSidebarOpen", "sidebarWidth", "activeWorkspace", "documents", "layout", "sidebarState", "workspaces"]),
|
|
248
|
-
s.value?.showMenu ? (u(),
|
|
249
|
+
s.value?.showMenu ? (u(), w(ie, {
|
|
249
250
|
key: 0,
|
|
250
251
|
eventBus: a.eventBus,
|
|
251
252
|
item: s.value.item,
|
|
@@ -253,15 +254,15 @@ const le = { class: "flex" }, de = {
|
|
|
253
254
|
target: s.value.el,
|
|
254
255
|
onCloseMenu: P,
|
|
255
256
|
onShowDeleteModal: e[10] || (e[10] = (t) => i(y).show())
|
|
256
|
-
}, null, 8, ["eventBus", "item", "sidebarState", "target"])) :
|
|
257
|
-
s.value ? (u(),
|
|
257
|
+
}, null, 8, ["eventBus", "item", "sidebarState", "target"])) : m("", !0),
|
|
258
|
+
s.value ? (u(), w(i(Q), {
|
|
258
259
|
key: 1,
|
|
259
260
|
size: "xxs",
|
|
260
261
|
state: i(y),
|
|
261
262
|
title: `Delete ${s.value.item.title}`
|
|
262
263
|
}, {
|
|
263
264
|
default: r(() => [
|
|
264
|
-
d(
|
|
265
|
+
d(oe, {
|
|
265
266
|
variableName: s.value.item.title,
|
|
266
267
|
warningMessage: K.value,
|
|
267
268
|
onClose: e[11] || (e[11] = (t) => i(y).hide()),
|
|
@@ -269,10 +270,10 @@ const le = { class: "flex" }, de = {
|
|
|
269
270
|
}, null, 8, ["variableName", "warningMessage"])
|
|
270
271
|
]),
|
|
271
272
|
_: 1
|
|
272
|
-
}, 8, ["state", "title"])) :
|
|
273
|
+
}, 8, ["state", "title"])) : m("", !0)
|
|
273
274
|
]));
|
|
274
275
|
}
|
|
275
276
|
});
|
|
276
277
|
export {
|
|
277
|
-
|
|
278
|
+
Ie as default
|
|
278
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"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarDropdown as
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { defineComponent as C, ref as T, watch as b, nextTick as p, createBlock as i, openBlock as d, unref as n, withCtx as o, createCommentVNode as l, createElementVNode as c, createVNode as u, createTextVNode as s } from "vue";
|
|
2
|
+
import { ScalarDropdown as P, ScalarDropdownItem as r, ScalarIcon as y, ScalarDropdownDivider as z } from "@scalar/components";
|
|
3
|
+
import { ScalarIconPencil as M } from "@scalar/icons";
|
|
4
|
+
import { getParentEntry as f } from "@scalar/workspace-store/navigation";
|
|
5
|
+
const $ = { class: "flex items-center gap-2" }, V = { class: "flex items-center gap-2" }, O = { class: "flex items-center gap-2" }, W = { class: "flex items-center gap-2" }, q = { class: "text-red flex items-center gap-2" }, G = /* @__PURE__ */ C({
|
|
5
6
|
__name: "SidebarItemMenu",
|
|
6
7
|
props: {
|
|
7
8
|
item: {},
|
|
@@ -10,111 +11,138 @@ const z = { class: "flex items-center gap-2" }, N = { class: "flex items-center
|
|
|
10
11
|
target: {}
|
|
11
12
|
},
|
|
12
13
|
emits: ["closeMenu", "showDeleteModal"],
|
|
13
|
-
setup(e, { emit:
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
!
|
|
14
|
+
setup(e, { emit: E }) {
|
|
15
|
+
const v = E, g = T(!1);
|
|
16
|
+
b(g, async (a, t) => {
|
|
17
|
+
!a && t && (await p(), v("closeMenu"));
|
|
17
18
|
});
|
|
18
|
-
const
|
|
19
|
+
const x = () => e.item.type === "document" || e.item.type === "tag", k = () => e.item.type === "document", S = () => e.item.type === "tag", A = () => e.item.type === "operation", B = () => e.item.type === "document" && e.item.id !== "drafts" || e.item.type === "tag" || e.item.type === "operation" || e.item.type === "example", D = () => {
|
|
19
20
|
if (e.item.type === "document" && e.eventBus.emit("ui:open:command-palette", {
|
|
20
21
|
action: "create-request",
|
|
21
22
|
payload: {
|
|
22
|
-
|
|
23
|
+
documentName: e.item.name
|
|
23
24
|
}
|
|
24
25
|
}), e.item.type === "tag") {
|
|
25
|
-
const
|
|
26
|
+
const a = e.sidebarState.getEntryById(e.item.id);
|
|
26
27
|
e.eventBus.emit("ui:open:command-palette", {
|
|
27
28
|
action: "create-request",
|
|
28
29
|
payload: {
|
|
29
|
-
|
|
30
|
+
documentName: f("document", a)?.name,
|
|
30
31
|
tagId: e.item.name
|
|
31
32
|
}
|
|
32
33
|
});
|
|
33
34
|
}
|
|
34
|
-
},
|
|
35
|
+
}, I = () => {
|
|
35
36
|
e.item.type === "document" && e.eventBus.emit("ui:open:command-palette", {
|
|
36
37
|
action: "add-tag",
|
|
37
38
|
payload: {
|
|
38
|
-
|
|
39
|
+
documentName: e.item.name
|
|
39
40
|
}
|
|
40
41
|
});
|
|
42
|
+
}, N = () => {
|
|
43
|
+
if (e.item.type === "tag") {
|
|
44
|
+
const a = e.sidebarState.getEntryById(e.item.id);
|
|
45
|
+
e.eventBus.emit(
|
|
46
|
+
"ui:open:command-palette",
|
|
47
|
+
{
|
|
48
|
+
action: "edit-tag",
|
|
49
|
+
payload: {
|
|
50
|
+
tag: e.item,
|
|
51
|
+
documentName: f("document", a)?.name ?? ""
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
{ skipUnpackProxy: !0 }
|
|
55
|
+
);
|
|
56
|
+
}
|
|
41
57
|
}, w = () => {
|
|
42
58
|
if (e.item.type === "operation") {
|
|
43
|
-
const
|
|
59
|
+
const a = e.sidebarState.getEntryById(e.item.id);
|
|
44
60
|
e.eventBus.emit("ui:open:command-palette", {
|
|
45
61
|
action: "add-example",
|
|
46
62
|
payload: {
|
|
47
|
-
|
|
63
|
+
documentName: f("document", a)?.name,
|
|
48
64
|
operationId: e.item.id
|
|
49
65
|
}
|
|
50
66
|
});
|
|
51
67
|
}
|
|
52
68
|
};
|
|
53
|
-
return (
|
|
54
|
-
open:
|
|
55
|
-
"onUpdate:open": t[
|
|
69
|
+
return (a, t) => (d(), i(n(P), {
|
|
70
|
+
open: g.value,
|
|
71
|
+
"onUpdate:open": t[5] || (t[5] = (m) => g.value = m),
|
|
56
72
|
placement: "bottom-end",
|
|
57
73
|
target: e.target,
|
|
58
74
|
teleport: ""
|
|
59
75
|
}, {
|
|
60
|
-
items:
|
|
61
|
-
|
|
76
|
+
items: o(() => [
|
|
77
|
+
x() ? (d(), i(n(r), {
|
|
62
78
|
key: 0,
|
|
63
|
-
onClick: t[0] || (t[0] = (
|
|
79
|
+
onClick: t[0] || (t[0] = (m) => D())
|
|
64
80
|
}, {
|
|
65
|
-
default:
|
|
66
|
-
|
|
81
|
+
default: o(() => [
|
|
82
|
+
c("div", $, [
|
|
67
83
|
u(n(y), {
|
|
68
84
|
icon: "Add",
|
|
69
85
|
size: "sm"
|
|
70
86
|
}),
|
|
71
|
-
t[
|
|
87
|
+
t[6] || (t[6] = s(" Add Operation ", -1))
|
|
72
88
|
])
|
|
73
89
|
]),
|
|
74
90
|
_: 1
|
|
75
91
|
})) : l("", !0),
|
|
76
|
-
|
|
92
|
+
k() ? (d(), i(n(r), {
|
|
77
93
|
key: 1,
|
|
78
|
-
onClick: t[1] || (t[1] = (
|
|
94
|
+
onClick: t[1] || (t[1] = (m) => I())
|
|
79
95
|
}, {
|
|
80
|
-
default:
|
|
81
|
-
|
|
96
|
+
default: o(() => [
|
|
97
|
+
c("div", V, [
|
|
82
98
|
u(n(y), {
|
|
83
99
|
icon: "Add",
|
|
84
100
|
size: "sm"
|
|
85
101
|
}),
|
|
86
|
-
t[
|
|
102
|
+
t[7] || (t[7] = s(" Add Tag ", -1))
|
|
87
103
|
])
|
|
88
104
|
]),
|
|
89
105
|
_: 1
|
|
90
106
|
})) : l("", !0),
|
|
91
|
-
|
|
107
|
+
S() ? (d(), i(n(r), {
|
|
92
108
|
key: 2,
|
|
93
|
-
onClick: t[2] || (t[2] = (
|
|
109
|
+
onClick: t[2] || (t[2] = (m) => N())
|
|
110
|
+
}, {
|
|
111
|
+
default: o(() => [
|
|
112
|
+
c("div", O, [
|
|
113
|
+
u(n(M), { size: "sm" }),
|
|
114
|
+
t[8] || (t[8] = s(" Rename Tag ", -1))
|
|
115
|
+
])
|
|
116
|
+
]),
|
|
117
|
+
_: 1
|
|
118
|
+
})) : l("", !0),
|
|
119
|
+
A() ? (d(), i(n(r), {
|
|
120
|
+
key: 3,
|
|
121
|
+
onClick: t[3] || (t[3] = (m) => w())
|
|
94
122
|
}, {
|
|
95
|
-
default:
|
|
96
|
-
|
|
123
|
+
default: o(() => [
|
|
124
|
+
c("div", W, [
|
|
97
125
|
u(n(y), {
|
|
98
126
|
icon: "Add",
|
|
99
127
|
size: "sm"
|
|
100
128
|
}),
|
|
101
|
-
t[
|
|
129
|
+
t[9] || (t[9] = s(" Add Example ", -1))
|
|
102
130
|
])
|
|
103
131
|
]),
|
|
104
132
|
_: 1
|
|
105
133
|
})) : l("", !0),
|
|
106
|
-
(
|
|
107
|
-
|
|
108
|
-
key:
|
|
109
|
-
onClick: t[
|
|
134
|
+
(A() || x() || k()) && B() ? (d(), i(n(z), { key: 4 })) : l("", !0),
|
|
135
|
+
B() ? (d(), i(n(r), {
|
|
136
|
+
key: 5,
|
|
137
|
+
onClick: t[4] || (t[4] = (m) => v("showDeleteModal"))
|
|
110
138
|
}, {
|
|
111
|
-
default:
|
|
112
|
-
|
|
139
|
+
default: o(() => [
|
|
140
|
+
c("div", q, [
|
|
113
141
|
u(n(y), {
|
|
114
142
|
icon: "Delete",
|
|
115
143
|
size: "sm"
|
|
116
144
|
}),
|
|
117
|
-
t[
|
|
145
|
+
t[10] || (t[10] = s(" Delete ", -1))
|
|
118
146
|
])
|
|
119
147
|
]),
|
|
120
148
|
_: 1
|
|
@@ -125,5 +153,5 @@ const z = { class: "flex items-center gap-2" }, N = { class: "flex items-center
|
|
|
125
153
|
}
|
|
126
154
|
});
|
|
127
155
|
export {
|
|
128
|
-
|
|
156
|
+
G as default
|
|
129
157
|
};
|
|
@@ -4,17 +4,17 @@ import o from "../../collection/components/Cookies.vue.js";
|
|
|
4
4
|
import n from "../../collection/components/Environment.vue.js";
|
|
5
5
|
import h from "../../collection/components/Overview.vue.js";
|
|
6
6
|
import d from "../../collection/components/Servers.vue.js";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
7
|
+
import m from "../../collection/components/Settings.vue.js";
|
|
8
|
+
import u from "../../collection/DocumentCollection.vue.js";
|
|
9
|
+
import f from "../../collection/WorkspaceCollection.vue.js";
|
|
10
10
|
import l from "../../operation/Operation.vue.js";
|
|
11
|
-
import { workspaceStorage as
|
|
11
|
+
import { workspaceStorage as a } from "../../../helpers/storage.js";
|
|
12
12
|
const A = [
|
|
13
13
|
{
|
|
14
14
|
path: "/@:namespace/:workspaceSlug",
|
|
15
15
|
children: [
|
|
16
16
|
{
|
|
17
|
-
path: "
|
|
17
|
+
path: "document/:documentSlug",
|
|
18
18
|
children: [
|
|
19
19
|
// Example page
|
|
20
20
|
{
|
|
@@ -26,7 +26,7 @@ const A = [
|
|
|
26
26
|
{
|
|
27
27
|
name: "document",
|
|
28
28
|
path: "",
|
|
29
|
-
component:
|
|
29
|
+
component: u,
|
|
30
30
|
children: [
|
|
31
31
|
// Redirect to overview
|
|
32
32
|
{
|
|
@@ -70,7 +70,7 @@ const A = [
|
|
|
70
70
|
{
|
|
71
71
|
name: "document.settings",
|
|
72
72
|
path: "settings",
|
|
73
|
-
component:
|
|
73
|
+
component: m
|
|
74
74
|
}
|
|
75
75
|
]
|
|
76
76
|
}
|
|
@@ -80,7 +80,7 @@ const A = [
|
|
|
80
80
|
{
|
|
81
81
|
name: "workspace",
|
|
82
82
|
path: "",
|
|
83
|
-
component:
|
|
83
|
+
component: f,
|
|
84
84
|
children: [
|
|
85
85
|
// Workspace environment
|
|
86
86
|
{
|
|
@@ -98,7 +98,7 @@ const A = [
|
|
|
98
98
|
{
|
|
99
99
|
name: "workspace.settings",
|
|
100
100
|
path: "settings",
|
|
101
|
-
component:
|
|
101
|
+
component: m
|
|
102
102
|
}
|
|
103
103
|
]
|
|
104
104
|
}
|
|
@@ -107,8 +107,8 @@ const A = [
|
|
|
107
107
|
{
|
|
108
108
|
path: "/:pathMatch(.*)*",
|
|
109
109
|
redirect: () => {
|
|
110
|
-
const e = "/@local/
|
|
111
|
-
|
|
110
|
+
const e = "/@local/default/document/drafts/overview", r = a.getLastPath() ?? e;
|
|
111
|
+
a.setCurrentPath(e);
|
|
112
112
|
const t = new URL(r, "http://example.com"), c = new URLSearchParams(window.location.search), p = i(t.searchParams, c);
|
|
113
113
|
return `${t.pathname}?${p.toString()}`;
|
|
114
114
|
}
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import type { RouteProps } from '../../../v2/features/app/helpers/routes.js';
|
|
2
|
-
/**
|
|
3
|
-
* Document Collection Page
|
|
4
|
-
*
|
|
5
|
-
* Displays primary document editing and viewing interface, enabling users navigate among
|
|
6
|
-
* Overview, Servers, Authentication, Environment, Cookies, and Settings tabs
|
|
7
|
-
*/
|
|
2
|
+
/** Document collection page — tabs for Overview, Servers, Auth, Environment, Cookies, and Settings. */
|
|
8
3
|
declare const _default: typeof __VLS_export;
|
|
9
4
|
export default _default;
|
|
10
5
|
declare const __VLS_export: import("vue").DefineComponent<RouteProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<RouteProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkspaceCollection.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/collection/WorkspaceCollection.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WorkspaceCollection.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/collection/WorkspaceCollection.vue"],"names":[],"mappings":"AA0EA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAA;AAMlE,uGAAuG;wBAClF,OAAO,YAAY;AAAxC,wBAAyC;AAGzC,QAAA,MAAM,YAAY,gSAmId,CAAC"}
|