@scalar/api-client 2.23.3 → 2.24.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 +55 -0
- package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +8 -0
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.js +33 -29
- package/dist/v2/blocks/operation-block/components/Header.vue.d.ts +6 -0
- package/dist/v2/blocks/operation-block/components/Header.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue.js +2 -2
- package/dist/v2/blocks/operation-block/components/Header.vue2.js +46 -29
- 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 +15 -0
- package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.js +125 -0
- package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue2.js +4 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.d.ts +5 -1
- 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 +61 -61
- package/dist/v2/components/sidebar/SidebarMenu.vue.js +6 -6
- package/dist/v2/features/app/App.vue.d.ts +5 -0
- package/dist/v2/features/app/App.vue.d.ts.map +1 -1
- package/dist/v2/features/app/App.vue.js +89 -108
- package/dist/v2/features/app/app-state.d.ts +5 -7
- package/dist/v2/features/app/app-state.d.ts.map +1 -1
- package/dist/v2/features/app/app-state.js +210 -205
- package/dist/v2/features/app/hooks/use-document-watcher.js +8 -8
- package/dist/v2/features/collection/components/Environment.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Environment.vue.js +12 -11
- package/dist/v2/features/collection/components/Settings.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Settings.vue.js +17 -25
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.d.ts +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.d.ts.map +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.js +115 -118
- package/dist/v2/features/{import-listener → command-palette}/helpers/generate-unique-slug.d.ts.map +1 -1
- package/dist/v2/features/command-palette/helpers/get-openapi-from-postman.d.ts +14 -4
- package/dist/v2/features/command-palette/helpers/get-openapi-from-postman.d.ts.map +1 -1
- package/dist/v2/features/command-palette/helpers/get-openapi-from-postman.js +5 -6
- package/dist/v2/features/{import-listener → command-palette}/helpers/import-document-to-workspace.d.ts.map +1 -1
- package/dist/v2/features/command-palette/helpers/load-document-from-source.d.ts +16 -0
- package/dist/v2/features/command-palette/helpers/load-document-from-source.d.ts.map +1 -0
- package/dist/v2/features/command-palette/helpers/load-document-from-source.js +34 -0
- package/dist/v2/features/command-palette/index.d.ts +4 -0
- package/dist/v2/features/command-palette/index.d.ts.map +1 -0
- package/dist/v2/features/command-palette/index.js +8 -0
- package/dist/v2/features/environments/EnvironmentsList.vue.d.ts +4 -0
- package/dist/v2/features/environments/EnvironmentsList.vue.d.ts.map +1 -1
- package/dist/v2/features/environments/EnvironmentsList.vue.js +29 -27
- package/dist/v2/features/environments/components/Environment.vue.d.ts +1 -0
- package/dist/v2/features/environments/components/Environment.vue.d.ts.map +1 -1
- package/dist/v2/features/environments/components/Environment.vue.js +37 -24
- package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
- package/dist/v2/features/modal/Modal.vue.js +1 -1
- package/dist/v2/features/modal/Modal.vue2.js +35 -36
- package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts.map +1 -1
- package/dist/v2/features/modal/helpers/create-api-client-modal.js +58 -41
- package/dist/v2/features/modal/helpers/restore-workspace-state.d.ts +18 -0
- package/dist/v2/features/modal/helpers/restore-workspace-state.d.ts.map +1 -0
- package/dist/v2/features/modal/helpers/restore-workspace-state.js +36 -0
- package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.js +35 -26
- package/dist/v2/workspace-events.d.ts.map +1 -1
- package/dist/v2/workspace-events.js +7 -0
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +20 -20
- package/dist/v2/features/import-listener/ImportListener.vue.d.ts +0 -52
- package/dist/v2/features/import-listener/ImportListener.vue.d.ts.map +0 -1
- package/dist/v2/features/import-listener/ImportListener.vue.js +0 -91
- package/dist/v2/features/import-listener/ImportListener.vue2.js +0 -4
- package/dist/v2/features/import-listener/components/DropEventListener.vue.d.ts +0 -7
- package/dist/v2/features/import-listener/components/DropEventListener.vue.d.ts.map +0 -1
- package/dist/v2/features/import-listener/components/DropEventListener.vue.js +0 -81
- package/dist/v2/features/import-listener/components/DropEventListener.vue2.js +0 -4
- package/dist/v2/features/import-listener/components/ImportModal.vue.d.ts +0 -40
- package/dist/v2/features/import-listener/components/ImportModal.vue.d.ts.map +0 -1
- package/dist/v2/features/import-listener/components/ImportModal.vue.js +0 -170
- package/dist/v2/features/import-listener/components/ImportModal.vue3.js +0 -5
- package/dist/v2/features/import-listener/components/WorkspaceSelector.vue.d.ts +0 -29
- package/dist/v2/features/import-listener/components/WorkspaceSelector.vue.d.ts.map +0 -1
- package/dist/v2/features/import-listener/components/WorkspaceSelector.vue.js +0 -83
- package/dist/v2/features/import-listener/components/WorkspaceSelector.vue2.js +0 -4
- package/dist/v2/features/import-listener/helpers/get-url-query-parameter.d.ts +0 -8
- package/dist/v2/features/import-listener/helpers/get-url-query-parameter.d.ts.map +0 -1
- package/dist/v2/features/import-listener/helpers/get-url-query-parameter.js +0 -4
- package/dist/v2/features/import-listener/helpers/load-document-from-source.d.ts +0 -15
- package/dist/v2/features/import-listener/helpers/load-document-from-source.d.ts.map +0 -1
- package/dist/v2/features/import-listener/helpers/load-document-from-source.js +0 -28
- package/dist/v2/features/import-listener/helpers/wait-for-condition.d.ts +0 -15
- package/dist/v2/features/import-listener/helpers/wait-for-condition.d.ts.map +0 -1
- package/dist/v2/features/import-listener/helpers/wait-for-condition.js +0 -16
- package/dist/v2/features/import-listener/index.d.ts +0 -2
- package/dist/v2/features/import-listener/index.d.ts.map +0 -1
- package/dist/v2/features/import-listener/index.js +0 -4
- /package/dist/v2/features/{import-listener → command-palette}/helpers/generate-unique-slug.d.ts +0 -0
- /package/dist/v2/features/{import-listener → command-palette}/helpers/generate-unique-slug.js +0 -0
- /package/dist/v2/features/{import-listener → command-palette}/helpers/import-document-to-workspace.d.ts +0 -0
- /package/dist/v2/features/{import-listener → command-palette}/helpers/import-document-to-workspace.js +0 -0
package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.js
CHANGED
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
import { objectEntries as
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"x-scalar-redirect-uri": "x-scalar-secret-redirect-uri"
|
|
19
|
-
}, l = (e) => d(u).reduce((s, [c, a]) => {
|
|
20
|
-
const r = e[c];
|
|
21
|
-
return r !== void 0 && typeof r == "string" && (s[a] = r), s;
|
|
22
|
-
}, {}), f = (e, s, c, a) => {
|
|
1
|
+
import { objectEntries as p } from "@scalar/helpers/object/object-entries";
|
|
2
|
+
const u = {
|
|
3
|
+
"x-scalar-secret-client-id": "x-scalar-client-id",
|
|
4
|
+
"x-scalar-secret-client-secret": "clientSecret",
|
|
5
|
+
"x-scalar-secret-password": "password",
|
|
6
|
+
"x-scalar-secret-redirect-uri": "x-scalar-redirect-uri",
|
|
7
|
+
"x-scalar-secret-token": "token",
|
|
8
|
+
"x-scalar-secret-username": "username"
|
|
9
|
+
}, o = (e, l, d = {}) => {
|
|
10
|
+
const i = {};
|
|
11
|
+
for (const s of e) {
|
|
12
|
+
const r = d[s], n = l[u[s]];
|
|
13
|
+
i[s] = r || n || "";
|
|
14
|
+
}
|
|
15
|
+
return i;
|
|
16
|
+
}, f = (e, l, d, i) => {
|
|
17
|
+
const s = l.getAuthSecrets(i, d);
|
|
23
18
|
if (e.type === "apiKey") {
|
|
24
|
-
const r =
|
|
19
|
+
const r = s?.type === "apiKey" ? s : void 0;
|
|
25
20
|
return {
|
|
26
21
|
...e,
|
|
27
|
-
"x-scalar-secret-token": ""
|
|
28
|
-
...l(e),
|
|
29
|
-
...r
|
|
22
|
+
"x-scalar-secret-token": r?.["x-scalar-secret-token"] || e.value || ""
|
|
30
23
|
};
|
|
31
24
|
}
|
|
32
25
|
if (e.type === "http") {
|
|
33
|
-
const r =
|
|
26
|
+
const r = s?.type === "http" ? s : void 0;
|
|
34
27
|
return {
|
|
35
28
|
...e,
|
|
36
|
-
"x-scalar-secret-
|
|
37
|
-
"x-scalar-secret-
|
|
38
|
-
"x-scalar-secret-
|
|
39
|
-
...l(e),
|
|
40
|
-
...r
|
|
29
|
+
"x-scalar-secret-token": r?.["x-scalar-secret-token"] || e.token || "",
|
|
30
|
+
"x-scalar-secret-username": r?.["x-scalar-secret-username"] || e.username || "",
|
|
31
|
+
"x-scalar-secret-password": r?.["x-scalar-secret-password"] || e.password || ""
|
|
41
32
|
};
|
|
42
33
|
}
|
|
43
34
|
if (e.type === "oauth2") {
|
|
44
|
-
const r =
|
|
35
|
+
const r = s?.type === "oauth2" ? s : void 0, n = /* @__PURE__ */ new Set();
|
|
45
36
|
return {
|
|
46
37
|
...e,
|
|
47
|
-
flows:
|
|
38
|
+
flows: p(e?.flows ?? {}).reduce((a, [c, t]) => (t && ("selectedScopes" in t && Array.isArray(t.selectedScopes) && t.selectedScopes?.forEach((x) => x && n.add(x)), c === "implicit" && (a.implicit = {
|
|
48
39
|
...t,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}),
|
|
40
|
+
...o(
|
|
41
|
+
["x-scalar-secret-client-id", "x-scalar-secret-redirect-uri", "x-scalar-secret-token"],
|
|
42
|
+
t,
|
|
43
|
+
r?.implicit
|
|
44
|
+
)
|
|
45
|
+
}), c === "password" && (a[c] = {
|
|
55
46
|
...t,
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
47
|
+
...o(
|
|
48
|
+
[
|
|
49
|
+
"x-scalar-secret-client-id",
|
|
50
|
+
"x-scalar-secret-client-secret",
|
|
51
|
+
"x-scalar-secret-username",
|
|
52
|
+
"x-scalar-secret-password",
|
|
53
|
+
"x-scalar-secret-token"
|
|
54
|
+
],
|
|
55
|
+
t,
|
|
56
|
+
r?.password
|
|
57
|
+
)
|
|
58
|
+
}), c === "clientCredentials" && (a[c] = {
|
|
64
59
|
...t,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}),
|
|
60
|
+
...o(
|
|
61
|
+
["x-scalar-secret-client-id", "x-scalar-secret-client-secret", "x-scalar-secret-token"],
|
|
62
|
+
t,
|
|
63
|
+
r?.clientCredentials
|
|
64
|
+
)
|
|
65
|
+
}), c === "authorizationCode" && (a[c] = {
|
|
71
66
|
...t,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
67
|
+
...o(
|
|
68
|
+
[
|
|
69
|
+
"x-scalar-secret-client-id",
|
|
70
|
+
"x-scalar-secret-client-secret",
|
|
71
|
+
"x-scalar-secret-redirect-uri",
|
|
72
|
+
"x-scalar-secret-token"
|
|
73
|
+
],
|
|
74
|
+
t,
|
|
75
|
+
r?.authorizationCode
|
|
76
|
+
)
|
|
77
|
+
})), a), {}),
|
|
78
|
+
"x-default-scopes": Array.from(n)
|
|
79
79
|
};
|
|
80
80
|
}
|
|
81
81
|
return e.type === "openIdConnect", e;
|
|
@@ -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(n, { emit: i }) {
|
|
13
|
+
const a = 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: n.activeWorkspace.id,
|
|
22
|
+
workspaceOptions: [{ options: n.workspaces }],
|
|
23
|
+
onCreateWorkspace: e[0] || (e[0] = (s) => a("create:workspace")),
|
|
24
|
+
"onUpdate:modelValue": e[1] || (e[1] = (s) => a("select:workspace", s))
|
|
25
25
|
}, null, 8, ["modelValue", "workspaceOptions"]),
|
|
26
26
|
r(o(M), {
|
|
27
27
|
is: o(v),
|
|
@@ -25,6 +25,11 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
25
25
|
* This slot is used to render custom actions or components within the actions section.
|
|
26
26
|
*/
|
|
27
27
|
'sidebar-menu-actions': [];
|
|
28
|
+
/**
|
|
29
|
+
* Slot for customizing the create workspace modal.
|
|
30
|
+
* This slot is used to render custom actions or components within the create workspace modal.
|
|
31
|
+
*/
|
|
32
|
+
'create-workspace'?: () => unknown;
|
|
28
33
|
}>;
|
|
29
34
|
export default _default;
|
|
30
35
|
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":"AA8PA,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,MAAM,OAAO;;AAxBpC,wBA+WC;AAOD,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,25 +1,24 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useModal as
|
|
3
|
-
import { getThemeStyles as
|
|
4
|
-
import { ScalarToasts as
|
|
5
|
-
import { extensions as
|
|
6
|
-
import { RouterView as
|
|
1
|
+
import { defineComponent as h, computed as m, createBlock as c, openBlock as i, unref as t, withCtx as d, createElementVNode as u, createVNode as n, createElementBlock as v, renderSlot as k, normalizeProps as W, guardReactiveProps as y } from "vue";
|
|
2
|
+
import { useModal as T, ScalarTeleportRoot as g } from "@scalar/components";
|
|
3
|
+
import { getThemeStyles as C } from "@scalar/themes";
|
|
4
|
+
import { ScalarToasts as x } from "@scalar/use-toasts";
|
|
5
|
+
import { extensions as B } from "@scalar/workspace-store/schemas/extensions";
|
|
6
|
+
import { RouterView as E } from "vue-router";
|
|
7
7
|
import O from "./components/CreateWorkspaceModal.vue.js";
|
|
8
8
|
import _ from "./components/SplashScreen.vue.js";
|
|
9
9
|
import { useDocumentWatcher as A } from "./hooks/use-document-watcher.js";
|
|
10
|
-
import
|
|
11
|
-
import { useColorMode as
|
|
10
|
+
import M from "../command-palette/TheCommandPalette.vue.js";
|
|
11
|
+
import { useColorMode as U } from "../../hooks/use-color-mode.js";
|
|
12
12
|
import { useGlobalHotKeys as I } from "../../hooks/use-global-hot-keys.js";
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import { mergeSecurity as
|
|
17
|
-
|
|
18
|
-
const F = ["innerHTML"], V = {
|
|
13
|
+
import D from "./components/AppSidebar.vue.js";
|
|
14
|
+
import $ from "./components/DesktopTabs.vue.js";
|
|
15
|
+
import L from "./components/WebTopNav.vue.js";
|
|
16
|
+
import { mergeSecurity as N } from "../../blocks/scalar-auth-selector-block/helpers/merge-security.js";
|
|
17
|
+
const P = ["innerHTML"], H = {
|
|
19
18
|
key: 0,
|
|
20
19
|
class: "flex flex-1 flex-col"
|
|
21
|
-
},
|
|
22
|
-
...
|
|
20
|
+
}, F = { class: "flex min-h-0 flex-1" }, V = { class: "bg-b-1 flex-1" }, R = { key: 1 }, z = {}, le = /* @__PURE__ */ h({
|
|
21
|
+
...z,
|
|
23
22
|
__name: "App",
|
|
24
23
|
props: {
|
|
25
24
|
layout: {},
|
|
@@ -27,32 +26,30 @@ const F = ["innerHTML"], V = {
|
|
|
27
26
|
getAppState: { type: Function },
|
|
28
27
|
getCommandPaletteState: { type: Function }
|
|
29
28
|
},
|
|
30
|
-
setup(
|
|
31
|
-
|
|
32
|
-
openCreateWorkspace: () =>
|
|
29
|
+
setup(s, { expose: w }) {
|
|
30
|
+
w({
|
|
31
|
+
openCreateWorkspace: () => l.show()
|
|
33
32
|
});
|
|
34
|
-
const e =
|
|
35
|
-
typeof window < "u" && (window.dataDumpWorkspace = () => e.store.value, window.dumpAppState = () => e)
|
|
36
|
-
|
|
37
|
-
I(e.eventBus, r.layout), A({
|
|
38
|
-
documentName: () => e.store.value?.workspace[E.workspace.activeDocument],
|
|
33
|
+
const e = s.getAppState(), f = s.getCommandPaletteState();
|
|
34
|
+
typeof window < "u" && (window.dataDumpWorkspace = () => e.store.value, window.dumpAppState = () => e), U({ workspaceStore: e.store }), I(e.eventBus, s.layout), A({
|
|
35
|
+
documentName: () => e.store.value?.workspace[B.workspace.activeDocument],
|
|
39
36
|
store: e.store,
|
|
40
37
|
initialTimeout: 5e3
|
|
41
38
|
});
|
|
42
|
-
const S =
|
|
39
|
+
const S = m(() => {
|
|
43
40
|
if (e.store.value === null)
|
|
44
41
|
return "";
|
|
45
|
-
const
|
|
46
|
-
return
|
|
47
|
-
}),
|
|
48
|
-
if (!
|
|
42
|
+
const o = e.store.value.workspace["x-scalar-theme"];
|
|
43
|
+
return o ? `<style>${C(o)}</style>` : "";
|
|
44
|
+
}), p = (o) => {
|
|
45
|
+
if (!o)
|
|
49
46
|
return;
|
|
50
47
|
const a = e.workspace.workspaceList.value?.find(
|
|
51
|
-
(
|
|
48
|
+
(r) => r.id === o
|
|
52
49
|
);
|
|
53
50
|
a && e.workspace.navigateToWorkspace(a.namespace, a.slug);
|
|
54
|
-
},
|
|
55
|
-
const
|
|
51
|
+
}, l = T(), b = m(() => {
|
|
52
|
+
const o = e.store.value?.auth ? N(
|
|
56
53
|
e.document.value?.components?.securitySchemes ?? {},
|
|
57
54
|
{},
|
|
58
55
|
e.store.value.auth,
|
|
@@ -64,94 +61,78 @@ const F = ["innerHTML"], V = {
|
|
|
64
61
|
environment: e.environment.value,
|
|
65
62
|
eventBus: e.eventBus,
|
|
66
63
|
exampleName: e.activeEntities.exampleName.value,
|
|
67
|
-
layout:
|
|
64
|
+
layout: s.layout,
|
|
68
65
|
method: e.activeEntities.method.value,
|
|
69
66
|
path: e.activeEntities.path.value,
|
|
70
67
|
workspaceStore: e.store.value,
|
|
71
68
|
activeWorkspace: e.workspace.activeWorkspace.value,
|
|
72
|
-
plugins:
|
|
73
|
-
securitySchemes:
|
|
69
|
+
plugins: s.plugins,
|
|
70
|
+
securitySchemes: o
|
|
74
71
|
};
|
|
75
72
|
});
|
|
76
|
-
return (
|
|
77
|
-
default:
|
|
78
|
-
|
|
79
|
-
n(t(
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
"
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
eventBus: t(e).eventBus,
|
|
114
|
-
isWorkspaceOpen: t(e).workspace.isOpen.value,
|
|
115
|
-
layout: r.layout,
|
|
116
|
-
sidebarState: t(e).sidebar.state,
|
|
117
|
-
sidebarWidth: t(e).sidebar.width.value,
|
|
118
|
-
store: t(e).store.value,
|
|
119
|
-
workspaces: t(e).workspace.workspaceList.value,
|
|
120
|
-
"onClick:workspace": t(e).workspace.navigateToWorkspace,
|
|
121
|
-
"onCreate:workspace": a[2] || (a[2] = (o) => t(c).show()),
|
|
122
|
-
"onSelect:workspace": l,
|
|
123
|
-
onSelectItem: t(e).sidebar.handleSelectItem,
|
|
124
|
-
"onUpdate:sidebarWidth": t(e).sidebar.handleSidebarWidthUpdate
|
|
125
|
-
}, {
|
|
126
|
-
sidebarMenuActions: u(() => [
|
|
127
|
-
T(s.$slots, "sidebar-menu-actions")
|
|
128
|
-
]),
|
|
129
|
-
_: 3
|
|
130
|
-
}, 8, ["isSidebarOpen", "activeWorkspace", "eventBus", "isWorkspaceOpen", "layout", "sidebarState", "sidebarWidth", "store", "workspaces", "onClick:workspace", "onSelectItem", "onUpdate:sidebarWidth"]),
|
|
131
|
-
m("div", z, [
|
|
132
|
-
n(t(M), h(y(b.value)), null, 16)
|
|
133
|
-
])
|
|
73
|
+
return (o, a) => (i(), c(t(g), null, {
|
|
74
|
+
default: d(() => [
|
|
75
|
+
u("div", { innerHTML: S.value }, null, 8, P),
|
|
76
|
+
n(t(x)),
|
|
77
|
+
t(e).store.value !== null && t(e).workspace.activeWorkspace.value !== null && !t(e).loading.value ? (i(), v("main", H, [
|
|
78
|
+
s.layout === "desktop" ? (i(), c($, {
|
|
79
|
+
key: 0,
|
|
80
|
+
activeTabIndex: t(e).tabs.activeTabIndex.value,
|
|
81
|
+
eventBus: t(e).eventBus,
|
|
82
|
+
tabs: t(e).tabs.state.value
|
|
83
|
+
}, null, 8, ["activeTabIndex", "eventBus", "tabs"])) : (i(), c(L, {
|
|
84
|
+
key: 1,
|
|
85
|
+
activeWorkspace: t(e).workspace.activeWorkspace.value,
|
|
86
|
+
workspaces: t(e).workspace.workspaceList.value,
|
|
87
|
+
"onCreate:workspace": a[0] || (a[0] = (r) => t(l).show()),
|
|
88
|
+
"onSelect:workspace": p
|
|
89
|
+
}, null, 8, ["activeWorkspace", "workspaces"])),
|
|
90
|
+
u("div", F, [
|
|
91
|
+
n(D, {
|
|
92
|
+
isSidebarOpen: t(e).sidebar.isOpen.value,
|
|
93
|
+
"onUpdate:isSidebarOpen": a[1] || (a[1] = (r) => t(e).sidebar.isOpen.value = r),
|
|
94
|
+
activeWorkspace: t(e).workspace.activeWorkspace.value,
|
|
95
|
+
eventBus: t(e).eventBus,
|
|
96
|
+
isWorkspaceOpen: t(e).workspace.isOpen.value,
|
|
97
|
+
layout: s.layout,
|
|
98
|
+
sidebarState: t(e).sidebar.state,
|
|
99
|
+
sidebarWidth: t(e).sidebar.width.value,
|
|
100
|
+
store: t(e).store.value,
|
|
101
|
+
workspaces: t(e).workspace.workspaceList.value,
|
|
102
|
+
"onClick:workspace": t(e).workspace.navigateToWorkspace,
|
|
103
|
+
"onCreate:workspace": a[2] || (a[2] = (r) => t(l).show()),
|
|
104
|
+
"onSelect:workspace": p,
|
|
105
|
+
onSelectItem: t(e).sidebar.handleSelectItem,
|
|
106
|
+
"onUpdate:sidebarWidth": t(e).sidebar.handleSidebarWidthUpdate
|
|
107
|
+
}, {
|
|
108
|
+
sidebarMenuActions: d(() => [
|
|
109
|
+
k(o.$slots, "sidebar-menu-actions")
|
|
134
110
|
]),
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
eventBus: t(e).eventBus,
|
|
141
|
-
paletteState: t(w),
|
|
142
|
-
workspaceStore: t(e).store.value
|
|
143
|
-
}, null, 8, ["eventBus", "paletteState", "workspaceStore"])
|
|
144
|
-
])) : (i(), v("main", G, [
|
|
145
|
-
n(_)
|
|
146
|
-
]))
|
|
111
|
+
_: 3
|
|
112
|
+
}, 8, ["isSidebarOpen", "activeWorkspace", "eventBus", "isWorkspaceOpen", "layout", "sidebarState", "sidebarWidth", "store", "workspaces", "onClick:workspace", "onSelectItem", "onUpdate:sidebarWidth"]),
|
|
113
|
+
u("div", V, [
|
|
114
|
+
n(t(E), W(y(b.value)), null, 16)
|
|
115
|
+
])
|
|
147
116
|
]),
|
|
148
|
-
|
|
149
|
-
|
|
117
|
+
k(o.$slots, "create-workspace", {}, () => [
|
|
118
|
+
n(O, {
|
|
119
|
+
state: t(l),
|
|
120
|
+
"onCreate:workspace": a[3] || (a[3] = (r) => t(e).workspace.create(r))
|
|
121
|
+
}, null, 8, ["state"])
|
|
122
|
+
]),
|
|
123
|
+
n(M, {
|
|
124
|
+
eventBus: t(e).eventBus,
|
|
125
|
+
paletteState: t(f),
|
|
126
|
+
workspaceStore: t(e).store.value
|
|
127
|
+
}, null, 8, ["eventBus", "paletteState", "workspaceStore"])
|
|
128
|
+
])) : (i(), v("main", R, [
|
|
129
|
+
n(_)
|
|
130
|
+
]))
|
|
150
131
|
]),
|
|
151
132
|
_: 3
|
|
152
133
|
}));
|
|
153
134
|
}
|
|
154
135
|
});
|
|
155
136
|
export {
|
|
156
|
-
|
|
137
|
+
le as default
|
|
157
138
|
};
|
|
@@ -23,7 +23,7 @@ type WorkspaceOption = ScalarListboxOption & {
|
|
|
23
23
|
declare const navigateToWorkspace: (namespace?: string, slug?: string) => Promise<void>;
|
|
24
24
|
/**
|
|
25
25
|
* Creates a new workspace with the provided name.
|
|
26
|
-
* - Generates a unique slug for the workspace (
|
|
26
|
+
* - Generates a unique slug for the workspace (uses the provided slug if it is unique, otherwise generates a unique slug).
|
|
27
27
|
* - Adds a default blank document ("drafts") to the workspace.
|
|
28
28
|
* - Persists the workspace and navigates to it.
|
|
29
29
|
*
|
|
@@ -31,12 +31,10 @@ declare const navigateToWorkspace: (namespace?: string, slug?: string) => Promis
|
|
|
31
31
|
* await createWorkspace({ name: 'My Awesome API' })
|
|
32
32
|
* // -> Navigates to /workspace/my-awesome-api (if available)
|
|
33
33
|
*/
|
|
34
|
-
declare const createWorkspace: ({
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
slug: string;
|
|
39
|
-
};
|
|
34
|
+
declare const createWorkspace: ({ teamUid, namespace, slug, name, }: {
|
|
35
|
+
teamUid?: string;
|
|
36
|
+
namespace?: string;
|
|
37
|
+
slug?: string;
|
|
40
38
|
name: string;
|
|
41
39
|
}) => Promise<{
|
|
42
40
|
name: string;
|
|
@@ -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,cAAc,EAAwB,MAAM,gCAAgC,CAAA;AAC1F,OAAO,EAEL,KAAK,iBAAiB,EAEvB,MAAM,gCAAgC,CAAA;AAKvC,OAAO,KAAK,EAAa,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AAEnF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,oEAAoE,CAAA;AAC7F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAA;AAChF,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,GAAG,EAAE,KAAK,UAAU,EAAoC,MAAM,KAAK,CAAA;AACnG,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAoExE,KAAK,eAAe,GAAG,mBAAmB,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AA8HjG;;;;;;GAMG;AACH,QAAA,MAAM,mBAAmB,GAAU,YAAY,MAAM,EAAE,OAAO,MAAM,KAAG,OAAO,CAAC,IAAI,CAKlF,CAAA;AAED;;;;;;;;;GASG;AACH,QAAA,MAAM,eAAe,GAAU,
|
|
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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