@scalar/api-client 2.22.0 → 2.22.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 +6 -0
- package/dist/v2/blocks/request-block/helpers/get-default-headers.js +1 -1
- package/dist/v2/features/app/App.vue.d.ts +3 -1
- package/dist/v2/features/app/App.vue.d.ts.map +1 -1
- package/dist/v2/features/app/App.vue.js +46 -43
- package/dist/v2/features/app/index.d.ts +3 -0
- package/dist/v2/features/app/index.d.ts.map +1 -1
- package/dist/v2/features/app/index.js +17 -11
- package/dist/v2/features/operation/Operation.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { canMethodHaveBody as p } from "@scalar/helpers/http/can-method-have-body";
|
|
2
2
|
import { getResolvedRef as n } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
3
3
|
import { isElectron as u } from "../../../../libs/electron.js";
|
|
4
|
-
const i = "2.22.
|
|
4
|
+
const i = "2.22.1", m = "application/json", h = "*/*", c = (r, t, a) => ({
|
|
5
5
|
name: r,
|
|
6
6
|
defaultValue: t,
|
|
7
7
|
isOverridden: a.has(r.toLowerCase())
|
|
@@ -12,7 +12,9 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
12
12
|
plugins?: ClientPlugin[];
|
|
13
13
|
getAppState: () => AppState;
|
|
14
14
|
getCommandPaletteState: () => CommandPaletteState;
|
|
15
|
-
}, {
|
|
15
|
+
}, {
|
|
16
|
+
openCreateWorkspace: () => void;
|
|
17
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
16
18
|
layout: Exclude<ClientLayout, "modal">;
|
|
17
19
|
plugins?: ClientPlugin[];
|
|
18
20
|
getAppState: () => AppState;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"App.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/app/App.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"App.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/app/App.vue"],"names":[],"mappings":"AAmOA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAGxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oDAAoD,CAAA;AAC7F,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAA;AAM3C;;;;GAIG;;YAGO,OAAO,CAAC,YAAY,EAAE,OAAO,CAAC;cAC5B,YAAY,EAAE;iBACX,MAAM,QAAQ;4BACH,MAAM,mBAAmB;;;;YAHzC,OAAO,CAAC,YAAY,EAAE,OAAO,CAAC;cAC5B,YAAY,EAAE;iBACX,MAAM,QAAQ;4BACH,MAAM,mBAAmB;;IAUjD;;;OAGG;4BACqB,EAAE;;AAnB5B,wBAiVC;AAOD,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useModal as
|
|
1
|
+
import { defineComponent as f, computed as u, createElementBlock as b, createBlock as c, unref as t, openBlock as l, Fragment as h, createElementVNode as p, createVNode as s, withCtx as m, renderSlot as W, normalizeProps as y, guardReactiveProps as T } from "vue";
|
|
2
|
+
import { useModal as g, ScalarTeleportRoot as C } from "@scalar/components";
|
|
3
3
|
import { getThemeStyles as B } from "@scalar/themes";
|
|
4
|
-
import { ScalarToasts as
|
|
4
|
+
import { ScalarToasts as x } from "@scalar/use-toasts";
|
|
5
5
|
import { extensions as E } from "@scalar/workspace-store/schemas/extensions";
|
|
6
|
-
import { RouterView as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { useDocumentWatcher as
|
|
10
|
-
import
|
|
11
|
-
import { useColorMode as
|
|
12
|
-
import { useGlobalHotKeys as
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
const
|
|
17
|
-
...
|
|
6
|
+
import { RouterView as O } from "vue-router";
|
|
7
|
+
import I from "./components/CreateWorkspaceModal.vue.js";
|
|
8
|
+
import A from "./components/SplashScreen.vue.js";
|
|
9
|
+
import { useDocumentWatcher as M } from "./hooks/use-document-watcher.js";
|
|
10
|
+
import U from "../command-palette/TheCommandPalette.vue.js";
|
|
11
|
+
import { useColorMode as _ } from "../../hooks/use-color-mode.js";
|
|
12
|
+
import { useGlobalHotKeys as D } from "../../hooks/use-global-hot-keys.js";
|
|
13
|
+
import N from "./components/AppSidebar.vue.js";
|
|
14
|
+
import $ from "./components/DesktopTabs.vue.js";
|
|
15
|
+
import L from "./components/WebTopNav.vue.js";
|
|
16
|
+
const P = ["innerHTML"], F = { class: "flex min-h-0 flex-1" }, H = { class: "bg-b-1 flex-1" }, V = {}, re = /* @__PURE__ */ f({
|
|
17
|
+
...V,
|
|
18
18
|
__name: "App",
|
|
19
19
|
props: {
|
|
20
20
|
layout: {},
|
|
@@ -22,24 +22,27 @@ const L = ["innerHTML"], P = { class: "flex min-h-0 flex-1" }, F = { class: "bg-
|
|
|
22
22
|
getAppState: { type: Function },
|
|
23
23
|
getCommandPaletteState: { type: Function }
|
|
24
24
|
},
|
|
25
|
-
setup(o) {
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
setup(o, { expose: d }) {
|
|
26
|
+
d({
|
|
27
|
+
openCreateWorkspace: () => n.show()
|
|
28
|
+
});
|
|
29
|
+
const e = o.getAppState(), v = o.getCommandPaletteState();
|
|
30
|
+
typeof window < "u" && (window.dataDumpWorkspace = () => e.store.value, window.dumpAppState = () => e), _({ workspaceStore: e.store }), D(e.eventBus, o.layout), M({
|
|
28
31
|
documentName: () => e.store.value?.workspace[E.workspace.activeDocument],
|
|
29
32
|
store: e.store,
|
|
30
33
|
initialTimeout: 5e3
|
|
31
34
|
});
|
|
32
|
-
const
|
|
35
|
+
const k = u(() => {
|
|
33
36
|
if (e.store.value === null)
|
|
34
37
|
return "";
|
|
35
|
-
const
|
|
36
|
-
return
|
|
37
|
-
}),
|
|
38
|
+
const i = e.store.value.workspace["x-scalar-theme"];
|
|
39
|
+
return i ? `<style>${B(i)}</style>` : "";
|
|
40
|
+
}), w = () => e.router.value?.push({
|
|
38
41
|
name: "workspace.environment",
|
|
39
42
|
params: {
|
|
40
43
|
workspaceSlug: e.activeEntities.workspaceSlug.value
|
|
41
44
|
}
|
|
42
|
-
}),
|
|
45
|
+
}), n = g(), S = u(() => ({
|
|
43
46
|
documentSlug: e.activeEntities.documentSlug.value ?? "",
|
|
44
47
|
document: e.store.value?.workspace.activeDocument ?? null,
|
|
45
48
|
environment: e.environment.value,
|
|
@@ -53,25 +56,25 @@ const L = ["innerHTML"], P = { class: "flex min-h-0 flex-1" }, F = { class: "bg-
|
|
|
53
56
|
plugins: o.plugins,
|
|
54
57
|
securitySchemes: e.document.value?.components?.securitySchemes ?? {}
|
|
55
58
|
}));
|
|
56
|
-
return (
|
|
57
|
-
|
|
58
|
-
s(t(
|
|
59
|
+
return (i, a) => t(e).store.value !== null && t(e).workspace.activeWorkspace.value !== null && !t(e).loading.value ? (l(), b(h, { key: 0 }, [
|
|
60
|
+
p("div", { innerHTML: k.value }, null, 8, P),
|
|
61
|
+
s(t(C), null, {
|
|
59
62
|
default: m(() => [
|
|
60
|
-
s(t(
|
|
61
|
-
o.layout === "desktop" ? (
|
|
63
|
+
s(t(x)),
|
|
64
|
+
o.layout === "desktop" ? (l(), c($, {
|
|
62
65
|
key: 0,
|
|
63
66
|
activeTabIndex: t(e).tabs.activeTabIndex.value,
|
|
64
67
|
eventBus: t(e).eventBus,
|
|
65
68
|
tabs: t(e).tabs.state.value
|
|
66
|
-
}, null, 8, ["activeTabIndex", "eventBus", "tabs"])) : (
|
|
69
|
+
}, null, 8, ["activeTabIndex", "eventBus", "tabs"])) : (l(), c(L, {
|
|
67
70
|
key: 1,
|
|
68
71
|
activeWorkspace: t(e).workspace.activeWorkspace.value,
|
|
69
72
|
workspaces: t(e).workspace.workspaceList.value,
|
|
70
|
-
"onCreate:workspace": a[0] || (a[0] = (r) => t(
|
|
73
|
+
"onCreate:workspace": a[0] || (a[0] = (r) => t(n).show()),
|
|
71
74
|
"onSelect:workspace": t(e).workspace.setId
|
|
72
75
|
}, null, 8, ["activeWorkspace", "workspaces", "onSelect:workspace"])),
|
|
73
|
-
|
|
74
|
-
s(
|
|
76
|
+
p("main", F, [
|
|
77
|
+
s(N, {
|
|
75
78
|
isSidebarOpen: t(e).sidebar.isOpen.value,
|
|
76
79
|
"onUpdate:isSidebarOpen": a[1] || (a[1] = (r) => t(e).sidebar.isOpen.value = r),
|
|
77
80
|
activeWorkspace: t(e).workspace.activeWorkspace.value,
|
|
@@ -82,36 +85,36 @@ const L = ["innerHTML"], P = { class: "flex min-h-0 flex-1" }, F = { class: "bg-
|
|
|
82
85
|
sidebarWidth: t(e).sidebar.width.value,
|
|
83
86
|
store: t(e).store.value,
|
|
84
87
|
workspaces: t(e).workspace.workspaceList.value,
|
|
85
|
-
"onClick:workspace":
|
|
86
|
-
"onCreate:workspace": a[2] || (a[2] = (r) => t(
|
|
88
|
+
"onClick:workspace": w,
|
|
89
|
+
"onCreate:workspace": a[2] || (a[2] = (r) => t(n).show()),
|
|
87
90
|
"onSelect:workspace": t(e).workspace.setId,
|
|
88
91
|
onSelectItem: t(e).sidebar.handleSelectItem,
|
|
89
92
|
"onUpdate:sidebarWidth": t(e).sidebar.handleSidebarWidthUpdate
|
|
90
93
|
}, {
|
|
91
94
|
sidebarMenuActions: m(() => [
|
|
92
|
-
|
|
95
|
+
W(i.$slots, "sidebar-menu-actions")
|
|
93
96
|
]),
|
|
94
97
|
_: 3
|
|
95
98
|
}, 8, ["isSidebarOpen", "activeWorkspace", "eventBus", "isWorkspaceOpen", "layout", "sidebarState", "sidebarWidth", "store", "workspaces", "onSelect:workspace", "onSelectItem", "onUpdate:sidebarWidth"]),
|
|
96
|
-
s(
|
|
97
|
-
state: t(
|
|
99
|
+
s(I, {
|
|
100
|
+
state: t(n),
|
|
98
101
|
"onCreate:workspace": a[3] || (a[3] = (r) => t(e).workspace.create(r))
|
|
99
102
|
}, null, 8, ["state"]),
|
|
100
|
-
s(
|
|
103
|
+
s(U, {
|
|
101
104
|
eventBus: t(e).eventBus,
|
|
102
|
-
paletteState: t(
|
|
105
|
+
paletteState: t(v),
|
|
103
106
|
workspaceStore: t(e).store.value
|
|
104
107
|
}, null, 8, ["eventBus", "paletteState", "workspaceStore"]),
|
|
105
|
-
|
|
106
|
-
s(t(
|
|
108
|
+
p("div", H, [
|
|
109
|
+
s(t(O), y(T(S.value)), null, 16)
|
|
107
110
|
])
|
|
108
111
|
])
|
|
109
112
|
]),
|
|
110
113
|
_: 3
|
|
111
114
|
})
|
|
112
|
-
], 64)) : (
|
|
115
|
+
], 64)) : (l(), c(A, { key: 1 }));
|
|
113
116
|
}
|
|
114
117
|
});
|
|
115
118
|
export {
|
|
116
|
-
|
|
119
|
+
re as default
|
|
117
120
|
};
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export { type AppState, useAppState } from '../../../v2/features/app/app-state.js';
|
|
2
|
+
export { default as CreateWorkspaceModal } from '../../../v2/features/app/components/CreateWorkspaceModal.vue.js';
|
|
3
|
+
export { default as CommandActionForm } from '../../../v2/features/command-palette/components/CommandActionForm.vue.js';
|
|
4
|
+
export { default as CommandActionInput } from '../../../v2/features/command-palette/components/CommandActionInput.vue.js';
|
|
2
5
|
export type { ClientPlugin } from '../../../v2/helpers/plugins.js';
|
|
3
6
|
export type { ClientLayout } from '../../../v2/types/layout';
|
|
4
7
|
export { type CommandPaletteAction, type CommandPaletteRoute, baseClientActions, baseRoutes, useCommandPaletteState, } from '../command-palette/hooks/use-command-palette-state.js';
|
|
@@ -1 +1 @@
|
|
|
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,EACL,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,iBAAiB,EACjB,UAAU,EACV,sBAAsB,GACvB,MAAM,oDAAoD,CAAA;AAC3D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,WAAW,CAAA;AAChD,OAAO,EAAE,kBAAkB,EAAE,eAAe,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,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,uDAAuD,CAAA;AACvG,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,gEAAgE,CAAA;AAC7G,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,iEAAiE,CAAA;AAC/G,YAAY,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACxD,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,iBAAiB,EACjB,UAAU,EACV,sBAAsB,GACvB,MAAM,oDAAoD,CAAA;AAC3D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,WAAW,CAAA;AAChD,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAA"}
|
|
@@ -1,14 +1,20 @@
|
|
|
1
|
-
import { useAppState as
|
|
2
|
-
import {
|
|
3
|
-
import { default as
|
|
1
|
+
import { useAppState as a } from "./app-state.js";
|
|
2
|
+
import { default as p } from "./components/CreateWorkspaceModal.vue.js";
|
|
3
|
+
import { default as f } from "../command-palette/components/CommandActionForm.vue.js";
|
|
4
|
+
import { default as n } from "../command-palette/components/CommandActionInput.vue.js";
|
|
5
|
+
import { baseClientActions as u, baseRoutes as d, useCommandPaletteState as i } from "../command-palette/hooks/use-command-palette-state.js";
|
|
6
|
+
import { default as x } from "./App.vue.js";
|
|
4
7
|
/* empty css */
|
|
5
|
-
import { createApiClientApp as
|
|
8
|
+
import { createApiClientApp as c, createAppRouter as b } from "./helpers/create-api-client-app.js";
|
|
6
9
|
export {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
x as ClientApp,
|
|
11
|
+
f as CommandActionForm,
|
|
12
|
+
n as CommandActionInput,
|
|
13
|
+
p as CreateWorkspaceModal,
|
|
14
|
+
u as baseClientActions,
|
|
15
|
+
d as baseRoutes,
|
|
16
|
+
c as createApiClientApp,
|
|
17
|
+
b as createAppRouter,
|
|
18
|
+
a as useAppState,
|
|
19
|
+
i as useCommandPaletteState
|
|
14
20
|
};
|
|
@@ -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.22.
|
|
36
|
+
}, v = "2.22.1";
|
|
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.22.
|
|
21
|
+
"version": "2.22.1",
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=20"
|
|
24
24
|
},
|
|
@@ -321,26 +321,26 @@
|
|
|
321
321
|
"whatwg-mimetype": "4.0.0",
|
|
322
322
|
"yaml": "^2.8.0",
|
|
323
323
|
"zod": "^4.3.5",
|
|
324
|
-
"@scalar/draggable": "0.3.0",
|
|
325
324
|
"@scalar/analytics-client": "1.0.1",
|
|
326
325
|
"@scalar/components": "0.17.0",
|
|
326
|
+
"@scalar/draggable": "0.3.0",
|
|
327
327
|
"@scalar/helpers": "0.2.9",
|
|
328
328
|
"@scalar/icons": "0.5.2",
|
|
329
329
|
"@scalar/import": "0.4.46",
|
|
330
330
|
"@scalar/json-magic": "0.9.4",
|
|
331
331
|
"@scalar/oas-utils": "0.6.30",
|
|
332
|
-
"@scalar/
|
|
332
|
+
"@scalar/object-utils": "1.2.23",
|
|
333
333
|
"@scalar/openapi-types": "0.5.3",
|
|
334
334
|
"@scalar/postman-to-openapi": "0.4.1",
|
|
335
|
-
"@scalar/object-utils": "1.2.23",
|
|
336
335
|
"@scalar/sidebar": "0.7.23",
|
|
337
|
-
"@scalar/types": "0.6.0",
|
|
338
|
-
"@scalar/snippetz": "0.6.9",
|
|
339
|
-
"@scalar/use-toasts": "0.9.1",
|
|
340
336
|
"@scalar/themes": "0.14.0",
|
|
337
|
+
"@scalar/snippetz": "0.6.9",
|
|
338
|
+
"@scalar/openapi-parser": "0.24.5",
|
|
339
|
+
"@scalar/types": "0.6.0",
|
|
341
340
|
"@scalar/use-codemirror": "0.13.27",
|
|
342
|
-
"@scalar/
|
|
343
|
-
"@scalar/use-
|
|
341
|
+
"@scalar/use-hooks": "0.3.6",
|
|
342
|
+
"@scalar/use-toasts": "0.9.1",
|
|
343
|
+
"@scalar/workspace-store": "0.27.2"
|
|
344
344
|
},
|
|
345
345
|
"devDependencies": {
|
|
346
346
|
"@tailwindcss/vite": "^4.1.18",
|