@scalar/api-client 2.24.0 → 2.25.0
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 +22 -0
- package/dist/style.css +1 -1
- package/dist/v2/blocks/request-block/helpers/get-default-headers.js +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts +2 -2
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts +2 -2
- package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/SidebarMenu.vue.js +6 -6
- package/dist/v2/features/app/App.vue.d.ts +4 -1
- package/dist/v2/features/app/App.vue.d.ts.map +1 -1
- package/dist/v2/features/app/App.vue.js +60 -54
- package/dist/v2/features/app/app-state.d.ts +41 -9
- package/dist/v2/features/app/app-state.d.ts.map +1 -1
- package/dist/v2/features/app/app-state.js +200 -192
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts +2 -2
- 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/WebTopNav.vue.d.ts +3 -3
- package/dist/v2/features/app/components/WebTopNav.vue.d.ts.map +1 -1
- package/dist/v2/features/app/helpers/filter-workspaces.d.ts +49 -0
- package/dist/v2/features/app/helpers/filter-workspaces.d.ts.map +1 -0
- package/dist/v2/features/app/helpers/filter-workspaces.js +5 -0
- package/dist/v2/features/app/helpers/group-workspaces.d.ts +24 -0
- package/dist/v2/features/app/helpers/group-workspaces.d.ts.map +1 -0
- package/dist/v2/features/app/helpers/group-workspaces.js +23 -0
- package/dist/v2/features/operation/Operation.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +11 -11
|
@@ -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.
|
|
4
|
+
const i = "2.25.0", m = "application/json", h = "*/*", c = (r, t, o) => ({
|
|
5
5
|
name: r,
|
|
6
6
|
defaultValue: t,
|
|
7
7
|
isOverridden: o.has(r.toLowerCase())
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type WorkspaceGroup } from '@scalar/components';
|
|
2
2
|
import { type DraggingItem, type HoveredItem, type SidebarState } from '@scalar/sidebar';
|
|
3
3
|
import type { WorkspaceDocument } from '@scalar/workspace-store/schemas';
|
|
4
4
|
import type { TraversedEntry } from '@scalar/workspace-store/schemas/navigation';
|
|
@@ -13,7 +13,7 @@ type __VLS_Props = {
|
|
|
13
13
|
id: string;
|
|
14
14
|
};
|
|
15
15
|
/** The list of all available workspaces */
|
|
16
|
-
workspaces:
|
|
16
|
+
workspaces: WorkspaceGroup[];
|
|
17
17
|
/** The documents belonging to the workspace */
|
|
18
18
|
documents: WorkspaceDocument[];
|
|
19
19
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sidebar.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/sidebar/Sidebar.vue"],"names":[],"mappings":"AAyLA,OAAO,EAGL,KAAK,
|
|
1
|
+
{"version":3,"file":"Sidebar.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/sidebar/Sidebar.vue"],"names":[],"mappings":"AAyLA,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,oBAAoB,CAAA;AAE3B,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,YAAY,EAClB,MAAM,iBAAiB,CAAA;AACxB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AACxE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM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CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type WorkspaceGroup } from '@scalar/components';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
/**
|
|
4
4
|
* The currently active workspace.
|
|
@@ -11,7 +11,7 @@ type __VLS_Props = {
|
|
|
11
11
|
* The list of all available workspaces.
|
|
12
12
|
* Used to render options for workspace switching and selection.
|
|
13
13
|
*/
|
|
14
|
-
workspaces:
|
|
14
|
+
workspaces: WorkspaceGroup[];
|
|
15
15
|
};
|
|
16
16
|
type __VLS_Slots = {
|
|
17
17
|
/** Slot for customizing the actions section of the sidebar menu. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidebarMenu.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/sidebar/SidebarMenu.vue"],"names":[],"mappings":"AAoEA,OAAO,EAOL,KAAK,
|
|
1
|
+
{"version":3,"file":"SidebarMenu.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/sidebar/SidebarMenu.vue"],"names":[],"mappings":"AAoEA,OAAO,EAOL,KAAK,cAAc,EACpB,MAAM,oBAAoB,CAAA;AAI3B,KAAK,WAAW,GAAG;IACjB;;;OAGG;IACH,eAAe,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAA;IAC/B;;;OAGG;IACH,UAAU,EAAE,cAAc,EAAE,CAAA;CAC7B,CAAC;AAWF,KAAK,WAAW,GAAG;IACjB,oEAAoE;IACpE,kBAAkB,CAAC,IAAI,OAAO,CAAA;CAC/B,CAAC;AA8HF,QAAA,MAAM,eAAe;;;;;;kFAOnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -9,8 +9,8 @@ const L = /* @__PURE__ */ p({
|
|
|
9
9
|
workspaces: {}
|
|
10
10
|
},
|
|
11
11
|
emits: ["create:workspace", "select:workspace"],
|
|
12
|
-
setup(
|
|
13
|
-
const
|
|
12
|
+
setup(a, { emit: i }) {
|
|
13
|
+
const n = i;
|
|
14
14
|
return (c, e) => (k(), u(o(S), null, {
|
|
15
15
|
products: t(() => [...e[2] || (e[2] = [])]),
|
|
16
16
|
sections: t(({ close: l }) => [
|
|
@@ -18,10 +18,10 @@ const L = /* @__PURE__ */ p({
|
|
|
18
18
|
default: t(() => [
|
|
19
19
|
m(c.$slots, "sidebarMenuActions", {}, () => [
|
|
20
20
|
r(o(w), {
|
|
21
|
-
modelValue:
|
|
22
|
-
workspaceOptions:
|
|
23
|
-
onCreateWorkspace: e[0] || (e[0] = (s) =>
|
|
24
|
-
"onUpdate:modelValue": e[1] || (e[1] = (s) =>
|
|
21
|
+
modelValue: a.activeWorkspace.id,
|
|
22
|
+
workspaceOptions: a.workspaces,
|
|
23
|
+
onCreateWorkspace: e[0] || (e[0] = (s) => n("create:workspace")),
|
|
24
|
+
"onUpdate:modelValue": e[1] || (e[1] = (s) => n("select:workspace", s))
|
|
25
25
|
}, null, 8, ["modelValue", "workspaceOptions"]),
|
|
26
26
|
r(o(M), {
|
|
27
27
|
is: o(v),
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ModalState } from '@scalar/components';
|
|
1
2
|
import type { ClientPlugin } from '../../../v2/helpers/plugins.js';
|
|
2
3
|
import type { ClientLayout } from '../../../v2/types/layout';
|
|
3
4
|
import type { CommandPaletteState } from '../command-palette/hooks/use-command-palette-state.js';
|
|
@@ -29,7 +30,9 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
29
30
|
* Slot for customizing the create workspace modal.
|
|
30
31
|
* This slot is used to render custom actions or components within the create workspace modal.
|
|
31
32
|
*/
|
|
32
|
-
'create-workspace'?: (
|
|
33
|
+
'create-workspace'?: (payload: {
|
|
34
|
+
state: ModalState;
|
|
35
|
+
}) => unknown;
|
|
33
36
|
}>;
|
|
34
37
|
export default _default;
|
|
35
38
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -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":"AAmQA,OAAO,EAGL,KAAK,UAAU,EAChB,MAAM,oBAAoB,CAAA;AAc3B,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;IAC1B;;;OAGG;yBACkB,CAAC,OAAO,EAAE;QAAE,KAAK,EAAE,UAAU,CAAA;KAAE,KAAK,OAAO;;AAxBlE,wBA4XC;AAOD,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
import { defineComponent as h, computed as
|
|
2
|
-
import { useModal as
|
|
1
|
+
import { defineComponent as h, computed as c, createBlock as u, openBlock as l, unref as t, withCtx as v, createElementVNode as p, createVNode as n, createElementBlock as k, renderSlot as w, normalizeProps as y, guardReactiveProps as T } from "vue";
|
|
2
|
+
import { useModal as g, ScalarTeleportRoot as B } from "@scalar/components";
|
|
3
3
|
import { getThemeStyles as C } from "@scalar/themes";
|
|
4
4
|
import { ScalarToasts as x } from "@scalar/use-toasts";
|
|
5
|
-
import { extensions as
|
|
6
|
-
import { RouterView as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import M from "
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import L from "./components/
|
|
16
|
-
import
|
|
17
|
-
|
|
5
|
+
import { extensions as E } from "@scalar/workspace-store/schemas/extensions";
|
|
6
|
+
import { RouterView as O } from "vue-router";
|
|
7
|
+
import _ from "./components/CreateWorkspaceModal.vue.js";
|
|
8
|
+
import A from "./components/SplashScreen.vue.js";
|
|
9
|
+
import { groupWorkspacesByTeam as U } from "./helpers/group-workspaces.js";
|
|
10
|
+
import { useDocumentWatcher as M } from "./hooks/use-document-watcher.js";
|
|
11
|
+
import I from "../command-palette/TheCommandPalette.vue.js";
|
|
12
|
+
import { useColorMode as D } from "../../hooks/use-color-mode.js";
|
|
13
|
+
import { useGlobalHotKeys as $ } from "../../hooks/use-global-hot-keys.js";
|
|
14
|
+
import N from "./components/AppSidebar.vue.js";
|
|
15
|
+
import L from "./components/DesktopTabs.vue.js";
|
|
16
|
+
import P from "./components/WebTopNav.vue.js";
|
|
17
|
+
import { mergeSecurity as H } from "../../blocks/scalar-auth-selector-block/helpers/merge-security.js";
|
|
18
|
+
const F = ["innerHTML"], V = {
|
|
18
19
|
key: 0,
|
|
19
20
|
class: "flex flex-1 flex-col"
|
|
20
|
-
},
|
|
21
|
-
...
|
|
21
|
+
}, R = { class: "flex min-h-0 flex-1" }, z = { class: "bg-b-1 flex-1" }, G = { key: 1 }, K = {}, pe = /* @__PURE__ */ h({
|
|
22
|
+
...K,
|
|
22
23
|
__name: "App",
|
|
23
24
|
props: {
|
|
24
25
|
layout: {},
|
|
@@ -26,30 +27,30 @@ const P = ["innerHTML"], H = {
|
|
|
26
27
|
getAppState: { type: Function },
|
|
27
28
|
getCommandPaletteState: { type: Function }
|
|
28
29
|
},
|
|
29
|
-
setup(s, { expose:
|
|
30
|
-
|
|
31
|
-
openCreateWorkspace: () =>
|
|
30
|
+
setup(s, { expose: f }) {
|
|
31
|
+
f({
|
|
32
|
+
openCreateWorkspace: () => i.show()
|
|
32
33
|
});
|
|
33
|
-
const e = s.getAppState(),
|
|
34
|
-
typeof window < "u" && (window.dataDumpWorkspace = () => e.store.value, window.dumpAppState = () => e),
|
|
35
|
-
documentName: () => e.store.value?.workspace[
|
|
34
|
+
const e = s.getAppState(), S = s.getCommandPaletteState();
|
|
35
|
+
typeof window < "u" && (window.dataDumpWorkspace = () => e.store.value, window.dumpAppState = () => e), D({ workspaceStore: e.store }), $(e.eventBus, s.layout), M({
|
|
36
|
+
documentName: () => e.store.value?.workspace[E.workspace.activeDocument],
|
|
36
37
|
store: e.store,
|
|
37
38
|
initialTimeout: 5e3
|
|
38
39
|
});
|
|
39
|
-
const
|
|
40
|
+
const b = c(() => {
|
|
40
41
|
if (e.store.value === null)
|
|
41
42
|
return "";
|
|
42
43
|
const o = e.store.value.workspace["x-scalar-theme"];
|
|
43
44
|
return o ? `<style>${C(o)}</style>` : "";
|
|
44
|
-
}),
|
|
45
|
+
}), m = (o) => {
|
|
45
46
|
if (!o)
|
|
46
47
|
return;
|
|
47
48
|
const a = e.workspace.workspaceList.value?.find(
|
|
48
49
|
(r) => r.id === o
|
|
49
50
|
);
|
|
50
51
|
a && e.workspace.navigateToWorkspace(a.namespace, a.slug);
|
|
51
|
-
},
|
|
52
|
-
const o = e.store.value?.auth ?
|
|
52
|
+
}, i = g(), W = c(() => {
|
|
53
|
+
const o = e.store.value?.auth ? H(
|
|
53
54
|
e.document.value?.components?.securitySchemes ?? {},
|
|
54
55
|
{},
|
|
55
56
|
e.store.value.auth,
|
|
@@ -69,26 +70,31 @@ const P = ["innerHTML"], H = {
|
|
|
69
70
|
plugins: s.plugins,
|
|
70
71
|
securitySchemes: o
|
|
71
72
|
};
|
|
72
|
-
})
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
73
|
+
}), d = c(
|
|
74
|
+
() => U(
|
|
75
|
+
e.workspace.filteredWorkspaceList.value,
|
|
76
|
+
e.activeEntities.teamUid.value
|
|
77
|
+
)
|
|
78
|
+
);
|
|
79
|
+
return (o, a) => (l(), u(t(B), null, {
|
|
80
|
+
default: v(() => [
|
|
81
|
+
p("div", { innerHTML: b.value }, null, 8, F),
|
|
76
82
|
n(t(x)),
|
|
77
|
-
t(e).store.value !== null && t(e).workspace.activeWorkspace.value !== null && !t(e).loading.value ? (
|
|
78
|
-
s.layout === "desktop" ? (
|
|
83
|
+
t(e).store.value !== null && t(e).workspace.activeWorkspace.value !== null && !t(e).loading.value ? (l(), k("main", V, [
|
|
84
|
+
s.layout === "desktop" ? (l(), u(L, {
|
|
79
85
|
key: 0,
|
|
80
86
|
activeTabIndex: t(e).tabs.activeTabIndex.value,
|
|
81
87
|
eventBus: t(e).eventBus,
|
|
82
88
|
tabs: t(e).tabs.state.value
|
|
83
|
-
}, null, 8, ["activeTabIndex", "eventBus", "tabs"])) : (
|
|
89
|
+
}, null, 8, ["activeTabIndex", "eventBus", "tabs"])) : (l(), u(P, {
|
|
84
90
|
key: 1,
|
|
85
91
|
activeWorkspace: t(e).workspace.activeWorkspace.value,
|
|
86
|
-
workspaces:
|
|
87
|
-
"onCreate:workspace": a[0] || (a[0] = (r) => t(
|
|
88
|
-
"onSelect:workspace":
|
|
92
|
+
workspaces: d.value,
|
|
93
|
+
"onCreate:workspace": a[0] || (a[0] = (r) => t(i).show()),
|
|
94
|
+
"onSelect:workspace": m
|
|
89
95
|
}, null, 8, ["activeWorkspace", "workspaces"])),
|
|
90
|
-
|
|
91
|
-
n(
|
|
96
|
+
p("div", R, [
|
|
97
|
+
n(N, {
|
|
92
98
|
isSidebarOpen: t(e).sidebar.isOpen.value,
|
|
93
99
|
"onUpdate:isSidebarOpen": a[1] || (a[1] = (r) => t(e).sidebar.isOpen.value = r),
|
|
94
100
|
activeWorkspace: t(e).workspace.activeWorkspace.value,
|
|
@@ -98,35 +104,35 @@ const P = ["innerHTML"], H = {
|
|
|
98
104
|
sidebarState: t(e).sidebar.state,
|
|
99
105
|
sidebarWidth: t(e).sidebar.width.value,
|
|
100
106
|
store: t(e).store.value,
|
|
101
|
-
workspaces:
|
|
107
|
+
workspaces: d.value,
|
|
102
108
|
"onClick:workspace": t(e).workspace.navigateToWorkspace,
|
|
103
|
-
"onCreate:workspace": a[2] || (a[2] = (r) => t(
|
|
104
|
-
"onSelect:workspace":
|
|
109
|
+
"onCreate:workspace": a[2] || (a[2] = (r) => t(i).show()),
|
|
110
|
+
"onSelect:workspace": m,
|
|
105
111
|
onSelectItem: t(e).sidebar.handleSelectItem,
|
|
106
112
|
"onUpdate:sidebarWidth": t(e).sidebar.handleSidebarWidthUpdate
|
|
107
113
|
}, {
|
|
108
|
-
sidebarMenuActions:
|
|
109
|
-
|
|
114
|
+
sidebarMenuActions: v(() => [
|
|
115
|
+
w(o.$slots, "sidebar-menu-actions")
|
|
110
116
|
]),
|
|
111
117
|
_: 3
|
|
112
118
|
}, 8, ["isSidebarOpen", "activeWorkspace", "eventBus", "isWorkspaceOpen", "layout", "sidebarState", "sidebarWidth", "store", "workspaces", "onClick:workspace", "onSelectItem", "onUpdate:sidebarWidth"]),
|
|
113
|
-
|
|
114
|
-
n(t(
|
|
119
|
+
p("div", z, [
|
|
120
|
+
n(t(O), y(T(W.value)), null, 16)
|
|
115
121
|
])
|
|
116
122
|
]),
|
|
117
|
-
|
|
118
|
-
n(
|
|
119
|
-
state: t(
|
|
123
|
+
w(o.$slots, "create-workspace", { state: t(i) }, () => [
|
|
124
|
+
n(_, {
|
|
125
|
+
state: t(i),
|
|
120
126
|
"onCreate:workspace": a[3] || (a[3] = (r) => t(e).workspace.create(r))
|
|
121
127
|
}, null, 8, ["state"])
|
|
122
128
|
]),
|
|
123
|
-
n(
|
|
129
|
+
n(I, {
|
|
124
130
|
eventBus: t(e).eventBus,
|
|
125
|
-
paletteState: t(
|
|
131
|
+
paletteState: t(S),
|
|
126
132
|
workspaceStore: t(e).store.value
|
|
127
133
|
}, null, 8, ["eventBus", "paletteState", "workspaceStore"])
|
|
128
|
-
])) : (
|
|
129
|
-
n(
|
|
134
|
+
])) : (l(), k("main", G, [
|
|
135
|
+
n(A)
|
|
130
136
|
]))
|
|
131
137
|
]),
|
|
132
138
|
_: 3
|
|
@@ -134,5 +140,5 @@ const P = ["innerHTML"], H = {
|
|
|
134
140
|
}
|
|
135
141
|
});
|
|
136
142
|
export {
|
|
137
|
-
|
|
143
|
+
pe as default
|
|
138
144
|
};
|
|
@@ -94,48 +94,80 @@ export type GetEntryByLocation = (location: {
|
|
|
94
94
|
declare const handleSelectItem: (id: string) => Promise<void | import("vue-router").NavigationFailure | undefined> | undefined;
|
|
95
95
|
/** Handler for sidebar width changes. */
|
|
96
96
|
declare const handleSidebarWidthUpdate: (width: number) => void | undefined;
|
|
97
|
-
/**
|
|
98
|
-
* Copies the URL of the tab at the given index to the clipboard.
|
|
99
|
-
* Constructs the full URL using the current origin and the tab path.
|
|
100
|
-
*
|
|
101
|
-
* @throws Will silently fail if clipboard API is unavailable or the tab does not exist.
|
|
102
|
-
*/
|
|
103
|
-
declare const copyTabUrl: (index: number) => Promise<void>;
|
|
97
|
+
/** Defines the overall application state structure and its main feature modules */
|
|
104
98
|
export type AppState = {
|
|
99
|
+
/** The workspace store */
|
|
105
100
|
store: ShallowRef<WorkspaceStore | null>;
|
|
101
|
+
/** The sidebar management */
|
|
106
102
|
sidebar: {
|
|
103
|
+
/** The sidebar state */
|
|
107
104
|
state: typeof sidebarState;
|
|
105
|
+
/** The width of the sidebar */
|
|
108
106
|
width: ComputedRef<number>;
|
|
107
|
+
/** Whether the sidebar is open */
|
|
109
108
|
isOpen: Ref<boolean>;
|
|
109
|
+
/** Handles the selection of an item in the sidebar */
|
|
110
110
|
handleSelectItem: typeof handleSelectItem;
|
|
111
|
+
/** Handles the width update of the sidebar */
|
|
111
112
|
handleSidebarWidthUpdate: typeof handleSidebarWidthUpdate;
|
|
113
|
+
/** Gets the entry by location */
|
|
112
114
|
getEntryByLocation: typeof getEntryByLocation;
|
|
113
115
|
};
|
|
116
|
+
/** The tabs management */
|
|
114
117
|
tabs: {
|
|
118
|
+
/** The tabs state */
|
|
115
119
|
state: Ref<Tab[]>;
|
|
120
|
+
/** The active tab index */
|
|
116
121
|
activeTabIndex: Ref<number>;
|
|
117
|
-
|
|
122
|
+
/** Copies the URL of the tab at the given index to the clipboard */
|
|
123
|
+
copyTabUrl: (index: number) => Promise<void>;
|
|
118
124
|
};
|
|
125
|
+
/** The workspace management */
|
|
119
126
|
workspace: {
|
|
127
|
+
/** Creates a new workspace and navigates to it */
|
|
120
128
|
create: typeof createWorkspace;
|
|
129
|
+
/** All workspace list */
|
|
121
130
|
workspaceList: Ref<WorkspaceOption[]>;
|
|
122
|
-
|
|
131
|
+
/** Filtered workspace list, based on the current teamUid */
|
|
132
|
+
filteredWorkspaceList: ComputedRef<WorkspaceOption[]>;
|
|
133
|
+
/** The currently active workspace */
|
|
134
|
+
activeWorkspace: ShallowRef<{
|
|
135
|
+
id: string;
|
|
136
|
+
label: string;
|
|
137
|
+
} | null>;
|
|
138
|
+
/** Navigates to the specified workspace */
|
|
123
139
|
navigateToWorkspace: typeof navigateToWorkspace;
|
|
140
|
+
/** Whether the workspace page is open */
|
|
124
141
|
isOpen: ComputedRef<boolean>;
|
|
125
142
|
};
|
|
143
|
+
/** The workspace event bus for handling workspace-level events */
|
|
126
144
|
eventBus: WorkspaceEventBus;
|
|
145
|
+
/** The router instance */
|
|
127
146
|
router: ShallowRef<Router | null>;
|
|
147
|
+
/** The current route derived from the router */
|
|
128
148
|
currentRoute: Ref<RouteLocationNormalizedGeneric | null>;
|
|
149
|
+
/** Whether the workspace is currently syncing */
|
|
129
150
|
loading: Ref<boolean>;
|
|
151
|
+
/** The currently active entities */
|
|
130
152
|
activeEntities: {
|
|
153
|
+
/** The namespace of the current entity, e.g. "default" or a custom namespace */
|
|
131
154
|
namespace: Ref<string | undefined>;
|
|
155
|
+
/** The slug identifying the current workspace */
|
|
132
156
|
workspaceSlug: Ref<string | undefined>;
|
|
157
|
+
/** The slug of the currently selected document in the workspace */
|
|
133
158
|
documentSlug: Ref<string | undefined>;
|
|
159
|
+
/** The API path currently selected (e.g. "/users/{id}") */
|
|
134
160
|
path: Ref<string | undefined>;
|
|
161
|
+
/** The HTTP method for the currently selected API path (e.g. GET, POST) */
|
|
135
162
|
method: Ref<HttpMethod | undefined>;
|
|
163
|
+
/** The name of the currently selected example (for examples within an endpoint) */
|
|
136
164
|
exampleName: Ref<string | undefined>;
|
|
165
|
+
/** The unique identifier for the selected team context */
|
|
166
|
+
teamUid: Ref<string>;
|
|
137
167
|
};
|
|
168
|
+
/** The currently active environment */
|
|
138
169
|
environment: ComputedRef<XScalarEnvironment>;
|
|
170
|
+
/** The currently active document */
|
|
139
171
|
document: ComputedRef<WorkspaceDocument | null>;
|
|
140
172
|
};
|
|
141
173
|
export declare function useAppState(_router: Router): AppState;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-state.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/app/app-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AAG7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAGnE,OAAO,EAAE,KAAK,c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