@scalar/api-client 2.34.1 → 2.36.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 +88 -0
- package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +1 -1
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.js +88 -80
- package/dist/v2/blocks/operation-block/helpers/build-request-body.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-body.js +28 -27
- package/dist/v2/blocks/operation-block/helpers/de-serialize-parameter.js +6 -4
- package/dist/v2/blocks/operation-block/helpers/validate-path-parameters.d.ts +16 -0
- package/dist/v2/blocks/operation-block/helpers/validate-path-parameters.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/validate-path-parameters.js +17 -0
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.js +90 -84
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.js +47 -42
- package/dist/v2/blocks/request-block/helpers/get-default-headers.js +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.js +76 -50
- 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 +65 -59
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.js +57 -42
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js +44 -41
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts +2 -2
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.js +50 -44
- package/dist/v2/features/app/App.vue.d.ts.map +1 -1
- package/dist/v2/features/app/App.vue.js +41 -35
- package/dist/v2/features/app/app-events.d.ts +5 -2
- package/dist/v2/features/app/app-events.d.ts.map +1 -1
- package/dist/v2/features/app/app-events.js +58 -44
- package/dist/v2/features/app/app-state.d.ts.map +1 -1
- package/dist/v2/features/app/app-state.js +82 -80
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue.js +2 -2
- package/dist/v2/features/app/components/AppSidebar.vue2.js +78 -76
- package/dist/v2/features/app/components/DesktopTabs.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/DesktopTabs.vue.js +34 -30
- package/dist/v2/features/app/components/SidebarItemMenu.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/SidebarItemMenu.vue.js +73 -45
- package/dist/v2/features/collection/DocumentCollection.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/DocumentCollection.vue.js +20 -20
- package/dist/v2/features/collection/OperationCollection.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/OperationCollection.vue.js +7 -7
- package/dist/v2/features/collection/WorkspaceCollection.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/WorkspaceCollection.vue.js +5 -4
- package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Authentication.vue.js +1 -1
- package/dist/v2/features/collection/components/Authentication.vue2.js +84 -66
- 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 +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts +5 -0
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts.map +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.js +131 -96
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts +25 -0
- 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 +42 -36
- package/dist/v2/features/operation/Operation.vue.js +1 -1
- package/dist/v2/workspace-events.d.ts.map +1 -1
- package/dist/v2/workspace-events.js +8 -5
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts.map +1 -1
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.js +44 -45
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +19 -19
|
@@ -9,7 +9,7 @@ import { getParentEntry as h } from "@scalar/workspace-store/navigation";
|
|
|
9
9
|
import { createWorkspaceStorePersistence as ye, getWorkspaceId as w } from "@scalar/workspace-store/persistence";
|
|
10
10
|
import { persistencePlugin as Se } from "@scalar/workspace-store/plugins/client";
|
|
11
11
|
import { extensions as Ee } from "@scalar/workspace-store/schemas/extensions";
|
|
12
|
-
import { ref as
|
|
12
|
+
import { ref as i, computed as u, shallowRef as z, readonly as We } from "vue";
|
|
13
13
|
import { getRouteParam as l } from "./helpers/get-route-param.js";
|
|
14
14
|
import { groupWorkspacesByTeam as Ue } from "./helpers/group-workspaces.js";
|
|
15
15
|
import { useTheme as Te } from "./hooks/use-theme.js";
|
|
@@ -20,18 +20,18 @@ import { workspaceStorage as Ae } from "../../helpers/storage.js";
|
|
|
20
20
|
import { initializeAppEventHandlers as Ce } from "./app-events.js";
|
|
21
21
|
import { filterWorkspacesByTeam as Be, canLoadWorkspace as G } from "./helpers/filter-workspaces.js";
|
|
22
22
|
const Le = 1e3, Ne = 288, na = async ({
|
|
23
|
-
router:
|
|
23
|
+
router: p,
|
|
24
24
|
fileLoader: J,
|
|
25
25
|
fallbackThemeSlug: Q = () => "default",
|
|
26
26
|
customThemes: B = () => []
|
|
27
27
|
}) => {
|
|
28
|
-
const
|
|
28
|
+
const E = xe({
|
|
29
29
|
debug: !1
|
|
30
30
|
}), { workspace: g } = await ye();
|
|
31
31
|
await we();
|
|
32
|
-
const k =
|
|
33
|
-
|
|
34
|
-
const d =
|
|
32
|
+
const k = i("local"), f = i(void 0), x = i(void 0), W = i(void 0), L = i(void 0), N = i(void 0), O = i(void 0), U = i(!1);
|
|
33
|
+
p.afterEach((e) => de(e));
|
|
34
|
+
const d = u(() => p.currentRoute.value ?? null), T = z(null), v = i([]), b = u(() => Be(v.value, k.value)), X = u(() => Ue(b.value, k.value)), s = z(null), R = u(() => s.value?.workspace.documents[W.value ?? ""] || null), Z = u(() => Ie(s.value, R.value));
|
|
35
35
|
v.value = await g.getAll().then(
|
|
36
36
|
(e) => e.map(({ teamUid: a, namespace: t, slug: n, name: c }) => ({
|
|
37
37
|
id: w(t, n),
|
|
@@ -46,7 +46,7 @@ const Le = 1e3, Ne = 288, na = async ({
|
|
|
46
46
|
if (!a || !t)
|
|
47
47
|
return;
|
|
48
48
|
const n = w(a, t);
|
|
49
|
-
await g.updateName({ namespace: a, slug: t }, e) !== void 0 && (v.value = v.value.map((
|
|
49
|
+
await g.updateName({ namespace: a, slug: t }, e) !== void 0 && (v.value = v.value.map((o) => o.id === n ? { ...o, label: e } : o), T.value = { id: n, label: e });
|
|
50
50
|
}, ae = async ({
|
|
51
51
|
namespace: e,
|
|
52
52
|
slug: a
|
|
@@ -65,7 +65,7 @@ const Le = 1e3, Ne = 288, na = async ({
|
|
|
65
65
|
success: !1
|
|
66
66
|
};
|
|
67
67
|
const n = await ae({ namespace: e, slug: a });
|
|
68
|
-
return n.loadWorkspace(t.workspace),
|
|
68
|
+
return n.loadWorkspace(t.workspace), T.value = { id: w(t.namespace, t.slug), label: t.name }, s.value = n, {
|
|
69
69
|
success: !0,
|
|
70
70
|
workspace: n.workspace
|
|
71
71
|
};
|
|
@@ -93,7 +93,7 @@ const Le = 1e3, Ne = 288, na = async ({
|
|
|
93
93
|
"x-scalar-icon": "interface-edit-tool-pencil"
|
|
94
94
|
}
|
|
95
95
|
});
|
|
96
|
-
const
|
|
96
|
+
const o = await g.setItem(
|
|
97
97
|
{ namespace: t, slug: n },
|
|
98
98
|
{
|
|
99
99
|
name: e,
|
|
@@ -102,18 +102,18 @@ const Le = 1e3, Ne = 288, na = async ({
|
|
|
102
102
|
}
|
|
103
103
|
);
|
|
104
104
|
return v.value.push({
|
|
105
|
-
id: w(
|
|
106
|
-
teamUid:
|
|
107
|
-
namespace:
|
|
108
|
-
slug:
|
|
109
|
-
label:
|
|
110
|
-
}),
|
|
105
|
+
id: w(o.namespace, o.slug),
|
|
106
|
+
teamUid: o.teamUid,
|
|
107
|
+
namespace: o.namespace,
|
|
108
|
+
slug: o.slug,
|
|
109
|
+
label: o.name
|
|
110
|
+
}), o;
|
|
111
111
|
}, y = async (e, a) => {
|
|
112
112
|
if (!e || !a) {
|
|
113
|
-
await
|
|
113
|
+
await p.push("/");
|
|
114
114
|
return;
|
|
115
115
|
}
|
|
116
|
-
await
|
|
116
|
+
await p.push({
|
|
117
117
|
name: "example",
|
|
118
118
|
params: {
|
|
119
119
|
namespace: e,
|
|
@@ -134,7 +134,7 @@ const Le = 1e3, Ne = 288, na = async ({
|
|
|
134
134
|
const c = await be({
|
|
135
135
|
defaultValue: t ?? n,
|
|
136
136
|
// Use the provided id if it exists, otherwise use the name
|
|
137
|
-
validation: async (
|
|
137
|
+
validation: async (D) => !await g.has({ namespace: a ?? "local", slug: D }),
|
|
138
138
|
maxRetries: 100,
|
|
139
139
|
transformation: Re
|
|
140
140
|
});
|
|
@@ -148,57 +148,57 @@ const Le = 1e3, Ne = 288, na = async ({
|
|
|
148
148
|
});
|
|
149
149
|
return await y(m.namespace, m.slug), m;
|
|
150
150
|
}, se = async (e, a) => {
|
|
151
|
-
s.value = null,
|
|
151
|
+
s.value = null, U.value = !0;
|
|
152
152
|
const t = await te(e, a);
|
|
153
153
|
if (t.success) {
|
|
154
|
-
const
|
|
155
|
-
|
|
156
|
-
path:
|
|
154
|
+
const o = t.workspace["x-scalar-active-tab"] ?? 0, m = t.workspace["x-scalar-tabs"], D = m?.[o];
|
|
155
|
+
D && await p.replace({
|
|
156
|
+
path: D.path,
|
|
157
157
|
query: d.value?.query ?? {}
|
|
158
|
-
}), m &&
|
|
158
|
+
}), m && o >= m.length && E.emit("tabs:update:tabs", {
|
|
159
159
|
"x-scalar-active-tab": 0
|
|
160
|
-
}), m ||
|
|
160
|
+
}), m || E.emit("tabs:update:tabs", {
|
|
161
161
|
"x-scalar-tabs": [C(d.value)],
|
|
162
162
|
"x-scalar-active-tab": 0
|
|
163
|
-
}),
|
|
163
|
+
}), U.value = !1;
|
|
164
164
|
return;
|
|
165
165
|
}
|
|
166
|
-
const n = b.value.find((
|
|
166
|
+
const n = b.value.find((o) => o.teamUid === "local" && o.slug === "default") ?? b.value[0];
|
|
167
167
|
if (n)
|
|
168
168
|
return y(n.namespace, n.slug);
|
|
169
169
|
const c = await _({
|
|
170
170
|
name: "Default Workspace",
|
|
171
171
|
slug: "default"
|
|
172
172
|
});
|
|
173
|
-
if (
|
|
173
|
+
if (U.value = !1, !c)
|
|
174
174
|
return console.error("Failed to create the default workspace, something went wrong, can not load the workspace");
|
|
175
|
-
|
|
176
|
-
},
|
|
175
|
+
r.reset();
|
|
176
|
+
}, re = (e) => {
|
|
177
177
|
k.value = e;
|
|
178
178
|
const a = b.value.find(
|
|
179
179
|
(t) => t.namespace === f.value && t.slug === x.value
|
|
180
180
|
);
|
|
181
181
|
if (!(a && G(a.teamUid, e)))
|
|
182
182
|
return y("local", "default");
|
|
183
|
-
}, P =
|
|
183
|
+
}, P = u(() => {
|
|
184
184
|
const e = s.value;
|
|
185
185
|
if (!e)
|
|
186
186
|
return [];
|
|
187
187
|
const a = e.workspace["x-scalar-order"] ?? Object.keys(e.workspace.documents);
|
|
188
188
|
return he(Object.keys(e.workspace.documents), a, (t) => t).map((t) => e.workspace.documents[t]?.["x-scalar-navigation"]).filter(j);
|
|
189
|
-
}),
|
|
189
|
+
}), r = ge(P), A = ({
|
|
190
190
|
document: e,
|
|
191
191
|
path: a,
|
|
192
192
|
method: t,
|
|
193
193
|
example: n
|
|
194
|
-
}) => JSON.stringify([e, a, t, n].filter(j)), V =
|
|
194
|
+
}) => JSON.stringify([e, a, t, n].filter(j)), V = u(
|
|
195
195
|
() => ke({
|
|
196
196
|
items: P.value,
|
|
197
197
|
nestedKey: "children",
|
|
198
198
|
filter: (e) => e.type === "document" || e.type === "operation" || e.type === "example",
|
|
199
199
|
getId: (e) => {
|
|
200
200
|
const a = h("document", e), t = h("operation", e);
|
|
201
|
-
return
|
|
201
|
+
return A({
|
|
202
202
|
document: a?.name ?? "",
|
|
203
203
|
path: t?.path,
|
|
204
204
|
method: t?.method,
|
|
@@ -206,87 +206,88 @@ const Le = 1e3, Ne = 288, na = async ({
|
|
|
206
206
|
});
|
|
207
207
|
}
|
|
208
208
|
})
|
|
209
|
-
),
|
|
210
|
-
const a = V.value.get(
|
|
209
|
+
), I = (e) => {
|
|
210
|
+
const a = V.value.get(A(e));
|
|
211
211
|
return a || V.value.get(
|
|
212
|
-
|
|
212
|
+
A({
|
|
213
213
|
document: e.document,
|
|
214
214
|
path: e.path,
|
|
215
215
|
method: e.method
|
|
216
216
|
})
|
|
217
217
|
);
|
|
218
218
|
}, F = (e) => {
|
|
219
|
-
const a =
|
|
219
|
+
const a = r.getEntryById(e);
|
|
220
220
|
if (!a) {
|
|
221
221
|
console.warn(`Could not find sidebar entry with id ${e} to select`);
|
|
222
222
|
return;
|
|
223
223
|
}
|
|
224
|
+
const t = (n) => (S.value = !1, p.push(n));
|
|
224
225
|
if (a.type === "document") {
|
|
225
|
-
if (
|
|
226
|
-
|
|
226
|
+
if (r.selectedItem.value === e) {
|
|
227
|
+
r.setExpanded(e, !r.isExpanded(e));
|
|
227
228
|
return;
|
|
228
229
|
}
|
|
229
|
-
return
|
|
230
|
+
return r.setSelected(e), r.setExpanded(e, !0), t({
|
|
230
231
|
name: "document.overview",
|
|
231
232
|
params: { documentSlug: a.name }
|
|
232
233
|
});
|
|
233
234
|
}
|
|
234
235
|
if (a.type === "operation") {
|
|
235
|
-
if (
|
|
236
|
-
|
|
236
|
+
if (r.isSelected(e) && r.selectedItem.value !== e) {
|
|
237
|
+
r.setExpanded(e, !r.isExpanded(e));
|
|
237
238
|
return;
|
|
238
239
|
}
|
|
239
|
-
const
|
|
240
|
-
return
|
|
240
|
+
const n = a.children?.find((c) => c.type === "example");
|
|
241
|
+
return n ? (r.setSelected(n.id), r.setExpanded(n.id, !0)) : r.setSelected(e), t({
|
|
241
242
|
name: "example",
|
|
242
243
|
params: {
|
|
243
244
|
documentSlug: h("document", a)?.name,
|
|
244
245
|
pathEncoded: encodeURIComponent(a.path),
|
|
245
246
|
method: a.method,
|
|
246
|
-
exampleName:
|
|
247
|
+
exampleName: n?.name ?? "default"
|
|
247
248
|
}
|
|
248
249
|
});
|
|
249
250
|
}
|
|
250
251
|
if (a.type === "example") {
|
|
251
|
-
|
|
252
|
-
const
|
|
253
|
-
return
|
|
252
|
+
r.setSelected(e);
|
|
253
|
+
const n = h("operation", a);
|
|
254
|
+
return t({
|
|
254
255
|
name: "example",
|
|
255
256
|
params: {
|
|
256
257
|
documentSlug: h("document", a)?.name,
|
|
257
|
-
pathEncoded: encodeURIComponent(
|
|
258
|
-
method:
|
|
258
|
+
pathEncoded: encodeURIComponent(n?.path ?? ""),
|
|
259
|
+
method: n?.method,
|
|
259
260
|
exampleName: a.name
|
|
260
261
|
}
|
|
261
262
|
});
|
|
262
263
|
}
|
|
263
264
|
if (a.type === "text")
|
|
264
|
-
return
|
|
265
|
+
return t({
|
|
265
266
|
name: "document.overview",
|
|
266
267
|
params: {
|
|
267
268
|
documentSlug: h("document", a)?.name
|
|
268
269
|
}
|
|
269
270
|
});
|
|
270
|
-
|
|
271
|
-
},
|
|
271
|
+
r.setExpanded(e, !r.isExpanded(e));
|
|
272
|
+
}, oe = async () => {
|
|
272
273
|
if (!s.value)
|
|
273
274
|
return;
|
|
274
275
|
const e = s.value.workspace["x-scalar-active-tab"] ?? 0, a = s.value.workspace["x-scalar-tabs"]?.[e];
|
|
275
|
-
a && await
|
|
276
|
+
a && await p.replace(a.path);
|
|
276
277
|
}, K = (e) => {
|
|
277
278
|
e && s.value?.buildSidebar(e);
|
|
278
279
|
}, ce = (e) => {
|
|
279
|
-
const a =
|
|
280
|
+
const a = e.documentName ?? R.value?.["x-scalar-navigation"]?.name;
|
|
280
281
|
if (!a)
|
|
281
282
|
return;
|
|
282
|
-
const t =
|
|
283
|
+
const t = I({
|
|
283
284
|
document: a,
|
|
284
285
|
path: e.path,
|
|
285
286
|
method: e.method,
|
|
286
287
|
example: e.exampleKey
|
|
287
288
|
});
|
|
288
289
|
(!t || t.type !== "example") && (K(a), d.value && M(d.value));
|
|
289
|
-
}, le =
|
|
290
|
+
}, le = u(() => s.value?.workspace?.["x-scalar-sidebar-width"] ?? Ne), ue = (e) => s.value?.update("x-scalar-sidebar-width", e), S = i(!1), ie = "x-scalar-tabs", pe = "x-scalar-active-tab", C = (e) => {
|
|
290
291
|
const a = l("method", e), t = l("pathEncoded", e), n = l("documentSlug", e), c = l("workspaceSlug", e);
|
|
291
292
|
return {
|
|
292
293
|
...De({
|
|
@@ -294,11 +295,11 @@ const Le = 1e3, Ne = 288, na = async ({
|
|
|
294
295
|
document: n,
|
|
295
296
|
path: t,
|
|
296
297
|
method: a,
|
|
297
|
-
getEntryByLocation:
|
|
298
|
+
getEntryByLocation: I
|
|
298
299
|
}),
|
|
299
300
|
path: d.value?.path ?? ""
|
|
300
301
|
};
|
|
301
|
-
}, $ =
|
|
302
|
+
}, $ = u(() => s.value?.workspace[ie] ?? [C(d.value)]), me = u(() => s.value?.workspace[pe] ?? 0), q = async (e) => {
|
|
302
303
|
const a = $.value[e];
|
|
303
304
|
if (!a) {
|
|
304
305
|
console.warn(`Cannot copy URL: tab at index ${e} does not exist`);
|
|
@@ -315,11 +316,11 @@ const Le = 1e3, Ne = 288, na = async ({
|
|
|
315
316
|
if (!n || !a)
|
|
316
317
|
return;
|
|
317
318
|
const c = v.value.find(
|
|
318
|
-
(
|
|
319
|
+
(o) => o.slug === a && o.namespace === n
|
|
319
320
|
);
|
|
320
321
|
if (c && !G(c.teamUid, k.value))
|
|
321
322
|
return y("local", "default");
|
|
322
|
-
if (f.value = n, x.value = a,
|
|
323
|
+
if (f.value = n, x.value = a, W.value = t, L.value = l("method", e), N.value = l("pathEncoded", e), O.value = l("exampleName", e), e.path !== "" && Ae.setCurrentPath(e.path), w(f.value, a) !== T.value?.id)
|
|
323
324
|
return se(f.value, a);
|
|
324
325
|
t && t !== s.value?.workspace[Ee.workspace.activeDocument] && s?.value?.update("x-scalar-active-document", t), ve(e), M(e);
|
|
325
326
|
}, ve = (e) => {
|
|
@@ -328,34 +329,35 @@ const Le = 1e3, Ne = 288, na = async ({
|
|
|
328
329
|
}, M = (e) => {
|
|
329
330
|
const a = l("documentSlug", e);
|
|
330
331
|
if (!a) {
|
|
331
|
-
|
|
332
|
+
r.setSelected(null);
|
|
332
333
|
return;
|
|
333
334
|
}
|
|
334
|
-
const t =
|
|
335
|
+
const t = I({
|
|
335
336
|
document: a,
|
|
336
337
|
path: l("pathEncoded", e),
|
|
337
338
|
method: l("method", e),
|
|
338
339
|
example: l("exampleName", e)
|
|
339
340
|
});
|
|
340
|
-
t && (
|
|
341
|
+
t && (r.setSelected(t.id), r.setExpanded(t.id, !0));
|
|
341
342
|
};
|
|
342
343
|
Ce({
|
|
343
|
-
eventBus:
|
|
344
|
-
router:
|
|
344
|
+
eventBus: E,
|
|
345
|
+
router: p,
|
|
345
346
|
store: s,
|
|
346
|
-
navigateToCurrentTab:
|
|
347
|
+
navigateToCurrentTab: oe,
|
|
347
348
|
rebuildSidebar: K,
|
|
348
349
|
onAfterExampleCreation: ce,
|
|
349
350
|
onSelectSidebarItem: F,
|
|
350
351
|
onCopyTabUrl: (e) => q(e),
|
|
351
|
-
onToggleSidebar: () =>
|
|
352
|
+
onToggleSidebar: () => S.value = !S.value,
|
|
353
|
+
closeSidebar: () => S.value = !1,
|
|
352
354
|
renameWorkspace: ee
|
|
353
355
|
});
|
|
354
356
|
const Y = Te({
|
|
355
357
|
fallbackThemeSlug: Q,
|
|
356
358
|
customThemes: B,
|
|
357
359
|
store: s
|
|
358
|
-
}), fe =
|
|
360
|
+
}), fe = u(() => {
|
|
359
361
|
const e = s.value?.workspace["x-scalar-color-mode"] ?? "system";
|
|
360
362
|
return e === "system" ? window.matchMedia?.("(prefers-color-scheme: dark)")?.matches ?? !1 : e === "dark";
|
|
361
363
|
});
|
|
@@ -363,12 +365,12 @@ const Le = 1e3, Ne = 288, na = async ({
|
|
|
363
365
|
/** Active workspace store */
|
|
364
366
|
store: s,
|
|
365
367
|
sidebar: {
|
|
366
|
-
state:
|
|
368
|
+
state: r,
|
|
367
369
|
width: le,
|
|
368
|
-
isOpen:
|
|
370
|
+
isOpen: S,
|
|
369
371
|
handleSelectItem: F,
|
|
370
372
|
handleSidebarWidthUpdate: ue,
|
|
371
|
-
getEntryByLocation:
|
|
373
|
+
getEntryByLocation: I
|
|
372
374
|
},
|
|
373
375
|
tabs: {
|
|
374
376
|
state: $,
|
|
@@ -380,26 +382,26 @@ const Le = 1e3, Ne = 288, na = async ({
|
|
|
380
382
|
workspaceList: v,
|
|
381
383
|
filteredWorkspaceList: b,
|
|
382
384
|
workspaceGroups: X,
|
|
383
|
-
activeWorkspace:
|
|
385
|
+
activeWorkspace: T,
|
|
384
386
|
navigateToWorkspace: y,
|
|
385
|
-
isOpen:
|
|
387
|
+
isOpen: u(() => !!(x.value && !W.value))
|
|
386
388
|
},
|
|
387
|
-
eventBus:
|
|
388
|
-
router:
|
|
389
|
+
eventBus: E,
|
|
390
|
+
router: p,
|
|
389
391
|
currentRoute: d,
|
|
390
|
-
loading:
|
|
392
|
+
loading: U,
|
|
391
393
|
activeEntities: {
|
|
392
394
|
namespace: f,
|
|
393
395
|
workspaceSlug: x,
|
|
394
|
-
documentSlug:
|
|
396
|
+
documentSlug: W,
|
|
395
397
|
path: N,
|
|
396
398
|
method: L,
|
|
397
399
|
exampleName: O,
|
|
398
400
|
teamUid: We(k),
|
|
399
|
-
setTeamUid:
|
|
401
|
+
setTeamUid: re
|
|
400
402
|
},
|
|
401
403
|
environment: Z,
|
|
402
|
-
document:
|
|
404
|
+
document: R,
|
|
403
405
|
isDarkMode: fe,
|
|
404
406
|
theme: {
|
|
405
407
|
styles: Y.themeStyles,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppSidebar.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/components/AppSidebar.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AppSidebar.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/components/AppSidebar.vue"],"names":[],"mappings":"AAmhBA,OAAO,EAML,KAAK,cAAc,EACpB,MAAM,oBAAoB,CAAA;AAQ3B,OAAO,KAAK,EAA6B,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC9E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EACV,cAAc,EAEf,MAAM,4CAA4C,CAAA;AAWnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,KAAK,WAAW,GAAG;IACf;;OAEG;IACH,MAAM,EAAE,YAAY,CAAA;IAEpB;;OAEG;IACH,YAAY,EAAE,YAAY,CAAC,cAAc,CAAC,CAAA;IAE1C;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB;;;OAGG;IACH,eAAe,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;IAC9C;;;OAGG;IACH,UAAU,EAAE,cAAc,EAAE,CAAA;IAC5B;;;OAGG;IACH,QAAQ,EAAE,iBAAiB,CAAA;IAC3B;;;OAGG;IACH,KAAK,EAAE,cAAc,CAAA;CACtB,CAAC;AAiBJ,KAAK,WAAW,GAAG;IACjB,oEAAoE;IACpE,kBAAkB,CAAC,IAAI,OAAO,CAAA;CAC/B,CAAC;AAmMF,KAAK,gBAAgB,GAAG;IACxB,6CAA6C;IAC7C,eAAe,EAAE,OAAO,CAAC;IACzB,wCAAwC;IACxC,cAAc,EAAE,MAAM,CAAC;CACtB,CAAC;AAMF,KAAK,iBAAiB,GAAG,WAAW,GAAG,gBAAgB,CAAC;AAspBxD,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;kFAGd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./AppSidebar.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import p from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const f = /* @__PURE__ */ p(o, [["__scopeId", "data-v-8621f58a"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|