@scalar/api-client 2.18.3 → 2.18.4
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 +19 -0
- package/dist/style.css +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 +31 -26
- package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts +11 -1
- package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/SidebarMenu.vue.js +31 -32
- package/dist/v2/features/app/App.vue.d.ts +16 -2
- package/dist/v2/features/app/App.vue.d.ts.map +1 -1
- package/dist/v2/features/app/App.vue.js +53 -48
- package/dist/v2/features/app/app-state.d.ts +2 -1
- package/dist/v2/features/app/app-state.d.ts.map +1 -1
- package/dist/v2/features/app/app-state.js +10 -10
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts +11 -1
- 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 +77 -74
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts +5 -59
- 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 +9 -8
- package/dist/v2/features/app/index.d.ts +5 -1
- package/dist/v2/features/app/index.d.ts.map +1 -1
- package/dist/v2/features/app/index.js +8 -2
- package/dist/v2/features/operation/Operation.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +10 -10
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { defineComponent as q, mergeModels as x, computed as b, capitalize as V, useModel as C, ref as G, createElementBlock as W, openBlock as m, createVNode as l, createBlock as g, createCommentVNode as f, unref as i, createSlots as R, withCtx as r, createTextVNode as y, withKeys as k, withModifiers as c, toDisplayString as j, createElementVNode as d, normalizeClass as
|
|
2
|
-
import { useModal as
|
|
3
|
-
import { ScalarIconPlus as
|
|
1
|
+
import { defineComponent as q, mergeModels as x, computed as b, capitalize as V, useModel as C, ref as G, createElementBlock as W, openBlock as m, createVNode as l, createBlock as g, createCommentVNode as f, unref as i, createSlots as R, withCtx as r, createTextVNode as y, withKeys as k, withModifiers as c, toDisplayString as j, renderSlot as F, createElementVNode as d, normalizeClass as H, nextTick as L } from "vue";
|
|
2
|
+
import { useModal as U, ScalarSidebarItem as I, ScalarIconButton as J, ScalarButton as $, ScalarModal as Y } from "@scalar/components";
|
|
3
|
+
import { ScalarIconPlus as Q, ScalarIconDotsThree as X, ScalarIconGlobe as Z } from "@scalar/icons";
|
|
4
4
|
import { getParentEntry as w } from "@scalar/workspace-store/navigation";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { dragHandleFactory as
|
|
11
|
-
import
|
|
12
|
-
const
|
|
5
|
+
import _ from "../../../../assets/rabbit.ascii.js";
|
|
6
|
+
import ee from "../../../../assets/rabbitjump.ascii.js";
|
|
7
|
+
import E from "../../../../components/ScalarAsciiArt.vue.js";
|
|
8
|
+
import te from "../../../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
|
|
9
|
+
import ae from "./SidebarItemMenu.vue.js";
|
|
10
|
+
import { dragHandleFactory as oe } from "../../../helpers/drag-handle-factory.js";
|
|
11
|
+
import ne from "../../../components/sidebar/Sidebar.vue.js";
|
|
12
|
+
const ie = { class: "flex" }, se = {
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "empty-sidebar-item-content overflow-hidden px-2.5 py-2.5"
|
|
15
|
-
},
|
|
15
|
+
}, re = { class: "rabbit-ascii relative m-auto mt-2 h-[68px] w-[60px]" }, le = { class: "gap-1.5 p-2" }, Se = /* @__PURE__ */ q({
|
|
16
16
|
__name: "AppSidebar",
|
|
17
17
|
props: /* @__PURE__ */ x({
|
|
18
18
|
layout: {},
|
|
@@ -32,64 +32,64 @@ const ne = { class: "flex" }, ie = {
|
|
|
32
32
|
sidebarWidthModifiers: {}
|
|
33
33
|
}),
|
|
34
34
|
emits: /* @__PURE__ */ x(["click:workspace", "selectItem", "select:workspace", "create:workspace"], ["update:isSidebarOpen", "update:sidebarWidth"]),
|
|
35
|
-
setup(
|
|
36
|
-
const p =
|
|
37
|
-
() =>
|
|
38
|
-
store:
|
|
39
|
-
sidebarState:
|
|
35
|
+
setup(o, { emit: O }) {
|
|
36
|
+
const p = O, D = b(() => V(o.activeWorkspace.label)), B = C(o, "isSidebarOpen"), M = C(o, "sidebarWidth"), S = b(() => o.sidebarState.items.value.length <= 1), h = b(
|
|
37
|
+
() => oe({
|
|
38
|
+
store: o.store,
|
|
39
|
+
sidebarState: o.sidebarState
|
|
40
40
|
})
|
|
41
|
-
),
|
|
42
|
-
const
|
|
43
|
-
return
|
|
41
|
+
), A = (a, e) => h.value.handleDragEnd(a, e), N = (a, e) => h.value.isDroppable(a, e), s = G(null), v = U(), T = b(() => {
|
|
42
|
+
const a = s.value?.item;
|
|
43
|
+
return a?.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 ${a?.type ?? "item"}? This action cannot be undone.`;
|
|
44
44
|
}), z = () => {
|
|
45
|
-
const
|
|
46
|
-
if (!
|
|
45
|
+
const a = s.value?.item;
|
|
46
|
+
if (!a)
|
|
47
47
|
return;
|
|
48
|
-
const e =
|
|
48
|
+
const e = o.sidebarState.getEntryById(a.id), t = w("document", e), n = w("operation", e);
|
|
49
49
|
if (t) {
|
|
50
|
-
if (
|
|
51
|
-
|
|
52
|
-
else if (
|
|
53
|
-
|
|
50
|
+
if (a.type === "document")
|
|
51
|
+
o.eventBus.emit("document:delete:document", { name: t.name });
|
|
52
|
+
else if (a.type === "tag")
|
|
53
|
+
o.eventBus.emit("tag:delete:tag", {
|
|
54
54
|
documentName: t.name,
|
|
55
|
-
name:
|
|
55
|
+
name: a.name
|
|
56
56
|
});
|
|
57
|
-
else if (
|
|
57
|
+
else if (a.type === "operation") {
|
|
58
58
|
if (!n)
|
|
59
59
|
return;
|
|
60
|
-
|
|
60
|
+
o.eventBus.emit("operation:delete:operation", {
|
|
61
61
|
meta: {
|
|
62
62
|
method: n.method,
|
|
63
63
|
path: n.path
|
|
64
64
|
},
|
|
65
65
|
documentName: t.name
|
|
66
66
|
});
|
|
67
|
-
} else if (
|
|
67
|
+
} else if (a.type === "example") {
|
|
68
68
|
if (!n)
|
|
69
69
|
return;
|
|
70
|
-
|
|
70
|
+
o.eventBus.emit("operation:delete:example", {
|
|
71
71
|
meta: {
|
|
72
72
|
method: n.method,
|
|
73
73
|
path: n.path,
|
|
74
|
-
exampleKey:
|
|
74
|
+
exampleKey: a.name
|
|
75
75
|
},
|
|
76
76
|
documentName: t.name
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
79
|
v.hide(), s.value = null;
|
|
80
80
|
}
|
|
81
|
-
}, u = async (
|
|
81
|
+
}, u = async (a, e) => {
|
|
82
82
|
if (s.value?.showMenu)
|
|
83
83
|
return;
|
|
84
|
-
const t =
|
|
85
|
-
s.value = { item: e, el: t, showMenu: !0 }, await
|
|
86
|
-
const n =
|
|
84
|
+
const t = a.currentTarget;
|
|
85
|
+
s.value = { item: e, el: t, showMenu: !0 }, await L();
|
|
86
|
+
const n = a instanceof MouseEvent ? new MouseEvent(a.type, a) : new KeyboardEvent(a.type, a);
|
|
87
87
|
s.value?.el.dispatchEvent(n);
|
|
88
88
|
}, K = () => {
|
|
89
89
|
s.value && (s.value.showMenu = !1);
|
|
90
|
-
}, P = (
|
|
91
|
-
const e =
|
|
92
|
-
|
|
90
|
+
}, P = (a) => {
|
|
91
|
+
const e = o.sidebarState.getEntryById(a.id), t = w("document", e), n = w("tag", e);
|
|
92
|
+
o.eventBus.emit("ui:open:command-palette", {
|
|
93
93
|
action: "create-request",
|
|
94
94
|
payload: {
|
|
95
95
|
documentId: t?.id,
|
|
@@ -97,29 +97,32 @@ const ne = { class: "flex" }, ie = {
|
|
|
97
97
|
}
|
|
98
98
|
});
|
|
99
99
|
};
|
|
100
|
-
return (
|
|
101
|
-
l(i(
|
|
100
|
+
return (a, e) => (m(), W("div", ie, [
|
|
101
|
+
l(i(ne), {
|
|
102
102
|
isSidebarOpen: B.value,
|
|
103
103
|
"onUpdate:isSidebarOpen": e[3] || (e[3] = (t) => B.value = t),
|
|
104
104
|
sidebarWidth: M.value,
|
|
105
105
|
"onUpdate:sidebarWidth": e[4] || (e[4] = (t) => M.value = t),
|
|
106
|
-
activeWorkspace:
|
|
107
|
-
documents: Object.values(
|
|
108
|
-
eventBus:
|
|
109
|
-
isDroppable:
|
|
110
|
-
layout:
|
|
111
|
-
sidebarState:
|
|
112
|
-
workspaces:
|
|
106
|
+
activeWorkspace: o.activeWorkspace,
|
|
107
|
+
documents: Object.values(o.store.workspace.documents),
|
|
108
|
+
eventBus: o.eventBus,
|
|
109
|
+
isDroppable: N,
|
|
110
|
+
layout: o.layout,
|
|
111
|
+
sidebarState: o.sidebarState,
|
|
112
|
+
workspaces: o.workspaces,
|
|
113
113
|
"onCreate:workspace": e[5] || (e[5] = (t) => p("create:workspace")),
|
|
114
|
-
onReorder: e[6] || (e[6] = (t, n) =>
|
|
114
|
+
onReorder: e[6] || (e[6] = (t, n) => A(t, n)),
|
|
115
115
|
"onSelect:workspace": e[7] || (e[7] = (t) => p("select:workspace", t)),
|
|
116
116
|
onSelectItem: e[8] || (e[8] = (t) => p("selectItem", t))
|
|
117
117
|
}, R({
|
|
118
|
+
"sidebar-menu-actions": r(() => [
|
|
119
|
+
F(a.$slots, "sidebarMenuActions", {}, void 0, !0)
|
|
120
|
+
]),
|
|
118
121
|
workspaceButton: r(() => [
|
|
119
122
|
l(i(I), {
|
|
120
123
|
is: "button",
|
|
121
|
-
active:
|
|
122
|
-
icon: i(
|
|
124
|
+
active: o.isWorkspaceOpen,
|
|
125
|
+
icon: i(Z),
|
|
123
126
|
onClick: e[0] || (e[0] = (t) => p("click:workspace"))
|
|
124
127
|
}, {
|
|
125
128
|
default: r(() => [
|
|
@@ -129,10 +132,10 @@ const ne = { class: "flex" }, ie = {
|
|
|
129
132
|
}, 8, ["active", "icon"])
|
|
130
133
|
]),
|
|
131
134
|
decorator: r(({ item: t }) => [
|
|
132
|
-
l(i(
|
|
135
|
+
l(i(J), {
|
|
133
136
|
"aria-expanded": "false",
|
|
134
137
|
"aria-haspopup": "menu",
|
|
135
|
-
icon: i(
|
|
138
|
+
icon: i(X),
|
|
136
139
|
label: "More options",
|
|
137
140
|
size: "sm",
|
|
138
141
|
weight: "bold",
|
|
@@ -151,7 +154,7 @@ const ne = { class: "flex" }, ie = {
|
|
|
151
154
|
onClick: (n) => P(t)
|
|
152
155
|
}, {
|
|
153
156
|
icon: r(() => [
|
|
154
|
-
l(i(
|
|
157
|
+
l(i(Q))
|
|
155
158
|
]),
|
|
156
159
|
default: r(() => [...e[11] || (e[11] = [
|
|
157
160
|
y("Add operation", -1)
|
|
@@ -161,22 +164,22 @@ const ne = { class: "flex" }, ie = {
|
|
|
161
164
|
]),
|
|
162
165
|
_: 2
|
|
163
166
|
}, [
|
|
164
|
-
|
|
167
|
+
o.layout !== "modal" ? {
|
|
165
168
|
name: "footer",
|
|
166
169
|
fn: r(() => [
|
|
167
170
|
d("div", {
|
|
168
|
-
class:
|
|
171
|
+
class: H({
|
|
169
172
|
"empty-sidebar-item border-t": S.value
|
|
170
173
|
})
|
|
171
174
|
}, [
|
|
172
|
-
S.value ? (m(), W("div",
|
|
173
|
-
d("div",
|
|
174
|
-
l(
|
|
175
|
-
art: i(
|
|
175
|
+
S.value ? (m(), W("div", se, [
|
|
176
|
+
d("div", re, [
|
|
177
|
+
l(E, {
|
|
178
|
+
art: i(_),
|
|
176
179
|
class: "rabbitsit font-bold"
|
|
177
180
|
}, null, 8, ["art"]),
|
|
178
|
-
l(
|
|
179
|
-
art: i(
|
|
181
|
+
l(E, {
|
|
182
|
+
art: i(ee),
|
|
180
183
|
class: "rabbitjump absolute top-0 left-0 font-bold"
|
|
181
184
|
}, null, 8, ["art"])
|
|
182
185
|
]),
|
|
@@ -185,12 +188,12 @@ const ne = { class: "flex" }, ie = {
|
|
|
185
188
|
d("p", { class: "mt-2 leading-3" }, " Create request, folder, collection or import from OpenAPI/Postman ")
|
|
186
189
|
], -1))
|
|
187
190
|
])) : f("", !0),
|
|
188
|
-
d("div",
|
|
189
|
-
S.value ? (m(), g(i(
|
|
191
|
+
d("div", le, [
|
|
192
|
+
S.value ? (m(), g(i($), {
|
|
190
193
|
key: 0,
|
|
191
194
|
class: "w-full",
|
|
192
195
|
size: "sm",
|
|
193
|
-
onClick: e[1] || (e[1] = (t) =>
|
|
196
|
+
onClick: e[1] || (e[1] = (t) => o.eventBus.emit("ui:open:command-palette", {
|
|
194
197
|
action: "import-from-openapi-swagger-postman-curl",
|
|
195
198
|
payload: void 0
|
|
196
199
|
}))
|
|
@@ -200,12 +203,12 @@ const ne = { class: "flex" }, ie = {
|
|
|
200
203
|
])]),
|
|
201
204
|
_: 1
|
|
202
205
|
})) : f("", !0),
|
|
203
|
-
l(i(
|
|
206
|
+
l(i($), {
|
|
204
207
|
class: "w-full",
|
|
205
208
|
hotkey: "K",
|
|
206
209
|
size: "sm",
|
|
207
210
|
variant: "outlined",
|
|
208
|
-
onClick: e[2] || (e[2] = (t) =>
|
|
211
|
+
onClick: e[2] || (e[2] = (t) => o.eventBus.emit("ui:open:command-palette"))
|
|
209
212
|
}, {
|
|
210
213
|
default: r(() => [...e[14] || (e[14] = [
|
|
211
214
|
y(" Add Item ", -1)
|
|
@@ -218,23 +221,23 @@ const ne = { class: "flex" }, ie = {
|
|
|
218
221
|
key: "0"
|
|
219
222
|
} : void 0
|
|
220
223
|
]), 1032, ["isSidebarOpen", "sidebarWidth", "activeWorkspace", "documents", "eventBus", "layout", "sidebarState", "workspaces"]),
|
|
221
|
-
s.value?.showMenu ? (m(), g(
|
|
224
|
+
s.value?.showMenu ? (m(), g(ae, {
|
|
222
225
|
key: 0,
|
|
223
|
-
eventBus:
|
|
226
|
+
eventBus: o.eventBus,
|
|
224
227
|
item: s.value.item,
|
|
225
|
-
sidebarState:
|
|
228
|
+
sidebarState: o.sidebarState,
|
|
226
229
|
target: s.value.el,
|
|
227
230
|
onCloseMenu: K,
|
|
228
231
|
onShowDeleteModal: e[9] || (e[9] = (t) => i(v).show())
|
|
229
232
|
}, null, 8, ["eventBus", "item", "sidebarState", "target"])) : f("", !0),
|
|
230
|
-
s.value ? (m(), g(i(
|
|
233
|
+
s.value ? (m(), g(i(Y), {
|
|
231
234
|
key: 1,
|
|
232
235
|
size: "xxs",
|
|
233
236
|
state: i(v),
|
|
234
237
|
title: `Delete ${s.value.item.title}`
|
|
235
238
|
}, {
|
|
236
239
|
default: r(() => [
|
|
237
|
-
l(
|
|
240
|
+
l(te, {
|
|
238
241
|
variableName: s.value.item.title,
|
|
239
242
|
warningMessage: T.value,
|
|
240
243
|
onClose: e[10] || (e[10] = (t) => i(v).hide()),
|
|
@@ -247,5 +250,5 @@ const ne = { class: "flex" }, ie = {
|
|
|
247
250
|
}
|
|
248
251
|
});
|
|
249
252
|
export {
|
|
250
|
-
|
|
253
|
+
Se as default
|
|
251
254
|
};
|
|
@@ -13,70 +13,16 @@ type CreateApiClientOptions = {
|
|
|
13
13
|
*/
|
|
14
14
|
plugins?: ClientPlugin[];
|
|
15
15
|
};
|
|
16
|
+
/**
|
|
17
|
+
* Creates the appropriate router with the appropriate routes based on the layout
|
|
18
|
+
*/
|
|
19
|
+
export declare const createAppRouter: (layout: CreateApiClientOptions["layout"]) => import("vue-router").Router;
|
|
16
20
|
/**
|
|
17
21
|
* Create the API Client with router and passes in the workspace store as a prop
|
|
18
22
|
*/
|
|
19
23
|
export declare const createApiClientApp: (el: HTMLElement | null, { layout, plugins }: CreateApiClientOptions) => {
|
|
20
24
|
app: import("vue").App<Element>;
|
|
21
|
-
state:
|
|
22
|
-
store: import("vue").ShallowRef<import("@scalar/workspace-store/client").WorkspaceStore | null>;
|
|
23
|
-
sidebar: {
|
|
24
|
-
state: {
|
|
25
|
-
items: import("vue").ComputedRef<import("@scalar/workspace-store/schemas/navigation").TraversedEntry[]>;
|
|
26
|
-
index: import("vue").ComputedRef<Map<string, import("@scalar/workspace-store/schemas/navigation").TraversedEntry & {
|
|
27
|
-
parent?: import("@scalar/workspace-store/schemas/navigation").TraversedEntry | undefined;
|
|
28
|
-
}>>;
|
|
29
|
-
selectedItems: import("vue").Ref<Record<string, boolean>, Record<string, boolean>>;
|
|
30
|
-
expandedItems: import("vue").Ref<Record<string, boolean>, Record<string, boolean>>;
|
|
31
|
-
selectedItem: import("vue").Ref<string | null, string | null>;
|
|
32
|
-
setSelected: (id: string | null) => void;
|
|
33
|
-
setExpanded: (id: string, value: boolean) => void;
|
|
34
|
-
isExpanded: (id: string) => boolean;
|
|
35
|
-
isSelected: (id: string) => boolean;
|
|
36
|
-
getEntryById: (id: string) => (import("@scalar/workspace-store/schemas/navigation").TraversedEntry & {
|
|
37
|
-
parent?: import("@scalar/workspace-store/schemas/navigation").TraversedEntry | undefined;
|
|
38
|
-
}) | undefined;
|
|
39
|
-
reset: () => void;
|
|
40
|
-
};
|
|
41
|
-
width: import("vue").ComputedRef<number>;
|
|
42
|
-
isOpen: import("vue").Ref<boolean>;
|
|
43
|
-
handleSelectItem: (id: string) => Promise<void | import("vue-router").NavigationFailure | undefined> | undefined;
|
|
44
|
-
handleSidebarWidthUpdate: (width: number) => void | undefined;
|
|
45
|
-
getEntryByLocation: import("../../../../v2/features/app/app-state.js").GetEntryByLocation;
|
|
46
|
-
};
|
|
47
|
-
tabs: {
|
|
48
|
-
state: import("vue").Ref<import("@scalar/workspace-store/schemas/extensions/workspace/x-scalar-tabs").Tab[]>;
|
|
49
|
-
activeTabIndex: import("vue").Ref<number>;
|
|
50
|
-
copyTabUrl: (index: number) => Promise<void>;
|
|
51
|
-
};
|
|
52
|
-
workspace: {
|
|
53
|
-
create: ({ id, name, }: {
|
|
54
|
-
id?: string;
|
|
55
|
-
name: string;
|
|
56
|
-
}) => Promise<{
|
|
57
|
-
id: string;
|
|
58
|
-
name: string;
|
|
59
|
-
} | undefined>;
|
|
60
|
-
workspaceList: import("vue").Ref<import("@scalar/components").ScalarListboxOption[]>;
|
|
61
|
-
activeWorkspace: import("vue").ShallowRef<import("@scalar/components").ScalarListboxOption | null>;
|
|
62
|
-
setId: (id?: string) => Promise<void>;
|
|
63
|
-
isOpen: import("vue").ComputedRef<boolean>;
|
|
64
|
-
};
|
|
65
|
-
commandPalette: import("../../command-palette/hooks/use-command-palette-state.js").UseCommandPaletteStateReturn;
|
|
66
|
-
eventBus: import("@scalar/workspace-store/events").WorkspaceEventBus;
|
|
67
|
-
router: import("vue").ShallowRef<import("vue-router").Router | null>;
|
|
68
|
-
currentRoute: import("vue").Ref<import("vue-router").RouteLocationNormalizedGeneric | null>;
|
|
69
|
-
loading: import("vue").Ref<boolean>;
|
|
70
|
-
activeEntities: {
|
|
71
|
-
workspaceSlug: import("vue").Ref<string | undefined>;
|
|
72
|
-
documentSlug: import("vue").Ref<string | undefined>;
|
|
73
|
-
path: import("vue").Ref<string | undefined>;
|
|
74
|
-
method: import("vue").Ref<import("@scalar/helpers/http/http-methods").HttpMethod | undefined>;
|
|
75
|
-
exampleName: import("vue").Ref<string | undefined>;
|
|
76
|
-
};
|
|
77
|
-
environment: import("vue").ComputedRef<import("@scalar/workspace-store/schemas/extensions/document/x-scalar-environments").XScalarEnvironment>;
|
|
78
|
-
document: import("vue").ComputedRef<import("@scalar/workspace-store/schemas").WorkspaceDocument | null>;
|
|
79
|
-
};
|
|
25
|
+
state: import("../../../../v2/features/app/app-state.js").AppState;
|
|
80
26
|
} | undefined;
|
|
81
27
|
export {};
|
|
82
28
|
//# sourceMappingURL=create-api-client-app.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-api-client-app.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/helpers/create-api-client-app.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,KAAK,sBAAsB,GAAG;IAC5B;;;;;OAKG;IACH,MAAM,EAAE,OAAO,CAAC,YAAY,EAAE,OAAO,CAAC,CAAA;IACtC;;OAEG;IACH,OAAO,CAAC,EAAE,YAAY,EAAE,CAAA;CACzB,CAAA;
|
|
1
|
+
{"version":3,"file":"create-api-client-app.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/helpers/create-api-client-app.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,KAAK,sBAAsB,GAAG;IAC5B;;;;;OAKG;IACH,MAAM,EAAE,OAAO,CAAC,YAAY,EAAE,OAAO,CAAC,CAAA;IACtC;;OAEG;IACH,OAAO,CAAC,EAAE,YAAY,EAAE,CAAA;CACzB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,eAAe,GAAI,QAAQ,sBAAsB,CAAC,QAAQ,CAAC,gCAQvE,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAAI,IAAI,WAAW,GAAG,IAAI,EAAE,qBAAiC,sBAAsB;;;aAyBjH,CAAA"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { createApp as c } from "vue";
|
|
2
|
-
import { createRouter as
|
|
2
|
+
import { createRouter as p, createWebHistory as n, createWebHashHistory as m } from "vue-router";
|
|
3
3
|
import u from "../App.vue.js";
|
|
4
4
|
/* empty css */
|
|
5
5
|
import { useAppState as l } from "../app-state.js";
|
|
6
|
-
import { ROUTES as
|
|
7
|
-
const f = (
|
|
8
|
-
const
|
|
9
|
-
if (
|
|
6
|
+
import { ROUTES as i } from "./routes.js";
|
|
7
|
+
const f = (t) => t === "web" ? p({ history: n(), routes: i }) : p({ history: m(), routes: i }), g = (t, { layout: r = "desktop", plugins: s }) => {
|
|
8
|
+
const o = f(r), a = l(o), e = c(u, { layout: r, plugins: s, getAppState: () => a });
|
|
9
|
+
if (e.use(o), !t) {
|
|
10
10
|
console.error(
|
|
11
11
|
"[@scalar/api-client-modal] Could not create the API client.",
|
|
12
12
|
"Invalid HTML element provided.",
|
|
@@ -14,11 +14,12 @@ const f = (e) => e === "web" ? i({ history: n(), routes: p }) : i({ history: m()
|
|
|
14
14
|
);
|
|
15
15
|
return;
|
|
16
16
|
}
|
|
17
|
-
return
|
|
18
|
-
app:
|
|
17
|
+
return e.mount(t), {
|
|
18
|
+
app: e,
|
|
19
19
|
state: a
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
22
|
export {
|
|
23
|
-
|
|
23
|
+
g as createApiClientApp,
|
|
24
|
+
f as createAppRouter
|
|
24
25
|
};
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { type AppState, useAppState } from '../../../v2/features/app/app-state.js';
|
|
2
|
+
export type { ClientPlugin } from '../../../v2/helpers/plugins.js';
|
|
3
|
+
export type { ClientLayout } from '../../../v2/types/layout';
|
|
4
|
+
export { default as ClientApp } from './App.vue.js';
|
|
5
|
+
export { createApiClientApp, createAppRouter } from './helpers/create-api-client-app.js';
|
|
2
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/app/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/app/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AACxE,YAAY,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACxD,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,WAAW,CAAA;AAChD,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAA"}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useAppState as r } from "./app-state.js";
|
|
2
|
+
import { default as a } from "./App.vue.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import { createApiClientApp as f, createAppRouter as i } from "./helpers/create-api-client-app.js";
|
|
2
5
|
export {
|
|
3
|
-
|
|
6
|
+
a as ClientApp,
|
|
7
|
+
f as createApiClientApp,
|
|
8
|
+
i as createAppRouter,
|
|
9
|
+
r as useAppState
|
|
4
10
|
};
|
|
@@ -33,7 +33,7 @@ const W = { class: "flex-center relative flex flex-1 flex-col gap-6 p-2 capitali
|
|
|
33
33
|
}));
|
|
34
34
|
}, f = (u) => {
|
|
35
35
|
u?.createNew && g.name === "request" && p();
|
|
36
|
-
}, v = "2.18.
|
|
36
|
+
}, v = "2.18.4";
|
|
37
37
|
return q(() => a.hotKeys.on(f)), R(() => a.hotKeys.off(f)), (u, e) => (l(), n("div", W, [
|
|
38
38
|
s("div", {
|
|
39
39
|
class: y(["flex h-[calc(100%_-_50px)] flex-col items-center justify-center", {
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"rest",
|
|
19
19
|
"testing"
|
|
20
20
|
],
|
|
21
|
-
"version": "2.18.
|
|
21
|
+
"version": "2.18.4",
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=20"
|
|
24
24
|
},
|
|
@@ -326,26 +326,26 @@
|
|
|
326
326
|
"whatwg-mimetype": "^4.0.0",
|
|
327
327
|
"yaml": "^2.8.0",
|
|
328
328
|
"zod": "^4.3.5",
|
|
329
|
+
"@scalar/helpers": "0.2.8",
|
|
329
330
|
"@scalar/analytics-client": "1.0.1",
|
|
331
|
+
"@scalar/icons": "0.5.2",
|
|
330
332
|
"@scalar/draggable": "0.3.0",
|
|
331
333
|
"@scalar/import": "0.4.45",
|
|
332
|
-
"@scalar/icons": "0.5.2",
|
|
333
|
-
"@scalar/helpers": "0.2.8",
|
|
334
334
|
"@scalar/json-magic": "0.9.1",
|
|
335
|
+
"@scalar/oas-utils": "0.6.20",
|
|
335
336
|
"@scalar/object-utils": "1.2.22",
|
|
337
|
+
"@scalar/openapi-types": "0.5.3",
|
|
336
338
|
"@scalar/openapi-parser": "0.24.1",
|
|
337
339
|
"@scalar/postman-to-openapi": "0.3.60",
|
|
338
|
-
"@scalar/
|
|
339
|
-
"@scalar/
|
|
340
|
-
"@scalar/openapi-types": "0.5.3",
|
|
340
|
+
"@scalar/sidebar": "0.7.13",
|
|
341
|
+
"@scalar/themes": "0.13.26",
|
|
341
342
|
"@scalar/snippetz": "0.6.5",
|
|
343
|
+
"@scalar/use-codemirror": "0.13.17",
|
|
342
344
|
"@scalar/types": "0.5.8",
|
|
343
|
-
"@scalar/themes": "0.13.26",
|
|
344
|
-
"@scalar/use-codemirror": "0.13.16",
|
|
345
345
|
"@scalar/use-hooks": "0.3.6",
|
|
346
|
-
"@scalar/components": "0.16.22",
|
|
347
346
|
"@scalar/use-toasts": "0.9.1",
|
|
348
|
-
"@scalar/
|
|
347
|
+
"@scalar/components": "0.16.23",
|
|
348
|
+
"@scalar/workspace-store": "0.24.10"
|
|
349
349
|
},
|
|
350
350
|
"devDependencies": {
|
|
351
351
|
"@tailwindcss/vite": "^4.1.18",
|