@scalar/api-client 2.23.0 → 2.23.3
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 +65 -0
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +13 -3
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.js +68 -68
- package/dist/v2/blocks/operation-block/helpers/build-request-parameters.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-parameters.js +54 -53
- package/dist/v2/blocks/operation-block/helpers/build-request-security.d.ts +5 -3
- package/dist/v2/blocks/operation-block/helpers/build-request-security.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-security.js +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request.d.ts +3 -2
- package/dist/v2/blocks/operation-block/helpers/build-request.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/index.d.ts +2 -1
- package/dist/v2/blocks/operation-block/index.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/index.js +7 -4
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts +3 -2
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js +2 -2
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts +3 -2
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts.map +1 -1
- 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 +78 -78
- package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.d.ts +2 -2
- package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts +3 -2
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.d.ts +2 -2
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts +8 -5
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.js +2 -2
- package/dist/v2/blocks/request-block/RequestBlock.vue2.js +4 -4
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.js +49 -45
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js +63 -51
- package/dist/v2/blocks/request-block/helpers/get-default-headers.js +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBody.vue.js +2 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +4 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +18 -181
- 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 +118 -107
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +3 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +30 -33
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +11 -178
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +107 -110
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/auth-options.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/auth-options.js +5 -29
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.d.ts +6 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.js +85 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.d.ts +9 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.js +15 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +3 -2
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts +23 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/index.d.ts +2 -2
- package/dist/v2/blocks/scalar-auth-selector-block/index.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/index.js +4 -6
- package/dist/v2/features/app/App.vue.d.ts.map +1 -1
- package/dist/v2/features/app/App.vue.js +51 -42
- package/dist/v2/features/app/app-state.d.ts +1 -1
- package/dist/v2/features/app/app-state.d.ts.map +1 -1
- package/dist/v2/features/app/app-state.js +40 -38
- package/dist/v2/features/app/helpers/routes.d.ts +1 -1
- package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
- 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 +14 -11
- package/dist/v2/features/import-listener/helpers/import-document-to-workspace.d.ts.map +1 -1
- package/dist/v2/features/import-listener/helpers/import-document-to-workspace.js +3 -1
- 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 +14 -12
- package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.js +44 -35
- package/dist/v2/features/operation/helpers/get-selected-security.d.ts +3 -5
- package/dist/v2/features/operation/helpers/get-selected-security.d.ts.map +1 -1
- package/dist/v2/workspace-events.d.ts.map +1 -1
- package/dist/v2/workspace-events.js +116 -109
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +17 -17
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.bench.d.ts +0 -2
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.bench.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/convert-security-scheme-secrets.d.ts +0 -8
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/convert-security-scheme-secrets.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/convert-security-scheme-secrets.js +0 -33
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-auth-config.d.ts +0 -7
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-auth-config.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-auth-config.js +0 -13
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { default as t } from "./components/AuthSelector.vue.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { mergeAuthConfig as u } from "./helpers/merge-auth-config.js";
|
|
2
|
+
import { isAuthOptional as f } from "./helpers/is-auth-optional.js";
|
|
3
|
+
import { mergeSecurity as p } from "./helpers/merge-security.js";
|
|
5
4
|
export {
|
|
6
5
|
t as AuthSelector,
|
|
7
|
-
f as
|
|
8
|
-
|
|
9
|
-
u as mergeAuthConfig
|
|
6
|
+
f as isAuthOptional,
|
|
7
|
+
p as mergeSecurity
|
|
10
8
|
};
|
|
@@ -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":"AA2QA,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,wBAkZC;AAOD,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as W, computed as d, createBlock as p, openBlock as i, unref as t, withCtx as u, createElementVNode as m, createVNode as n, createElementBlock as v, renderSlot as T, normalizeProps as
|
|
1
|
+
import { defineComponent as W, computed as d, createBlock as p, openBlock as i, unref as t, withCtx as u, createElementVNode as m, createVNode as n, createElementBlock as v, renderSlot as T, normalizeProps as h, guardReactiveProps as y } from "vue";
|
|
2
2
|
import { useModal as g, ScalarTeleportRoot as C } from "@scalar/components";
|
|
3
3
|
import { getThemeStyles as x } from "@scalar/themes";
|
|
4
4
|
import { ScalarToasts as B } from "@scalar/use-toasts";
|
|
5
|
-
import { extensions as
|
|
6
|
-
import { RouterView as
|
|
5
|
+
import { extensions as E } from "@scalar/workspace-store/schemas/extensions";
|
|
6
|
+
import { RouterView as M } 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";
|
|
@@ -13,12 +13,13 @@ import { useGlobalHotKeys as I } from "../../hooks/use-global-hot-keys.js";
|
|
|
13
13
|
import L from "./components/AppSidebar.vue.js";
|
|
14
14
|
import N from "./components/DesktopTabs.vue.js";
|
|
15
15
|
import $ from "./components/WebTopNav.vue.js";
|
|
16
|
-
import P from "
|
|
17
|
-
|
|
16
|
+
import { mergeSecurity as P } from "../../blocks/scalar-auth-selector-block/helpers/merge-security.js";
|
|
17
|
+
import H from "../import-listener/ImportListener.vue.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 = {}, ue = /* @__PURE__ */ W({
|
|
22
|
+
...K,
|
|
22
23
|
__name: "App",
|
|
23
24
|
props: {
|
|
24
25
|
layout: {},
|
|
@@ -26,49 +27,57 @@ const H = ["innerHTML"], F = {
|
|
|
26
27
|
getAppState: { type: Function },
|
|
27
28
|
getCommandPaletteState: { type: Function }
|
|
28
29
|
},
|
|
29
|
-
setup(
|
|
30
|
+
setup(r, { expose: k }) {
|
|
30
31
|
k({
|
|
31
32
|
openCreateWorkspace: () => c.show()
|
|
32
33
|
});
|
|
33
|
-
const e =
|
|
34
|
+
const e = r.getAppState(), w = r.getCommandPaletteState();
|
|
34
35
|
typeof window < "u" && (window.dataDumpWorkspace = () => e.store.value, window.dumpAppState = () => e);
|
|
35
36
|
const { isDarkMode: f } = D({ workspaceStore: e.store });
|
|
36
|
-
I(e.eventBus,
|
|
37
|
-
documentName: () => e.store.value?.workspace[
|
|
37
|
+
I(e.eventBus, r.layout), A({
|
|
38
|
+
documentName: () => e.store.value?.workspace[E.workspace.activeDocument],
|
|
38
39
|
store: e.store,
|
|
39
40
|
initialTimeout: 5e3
|
|
40
41
|
});
|
|
41
42
|
const S = d(() => {
|
|
42
43
|
if (e.store.value === null)
|
|
43
44
|
return "";
|
|
44
|
-
const
|
|
45
|
-
return
|
|
46
|
-
}), l = (
|
|
47
|
-
if (!
|
|
45
|
+
const s = e.store.value.workspace["x-scalar-theme"];
|
|
46
|
+
return s ? `<style>${x(s)}</style>` : "";
|
|
47
|
+
}), l = (s) => {
|
|
48
|
+
if (!s)
|
|
48
49
|
return;
|
|
49
50
|
const a = e.workspace.workspaceList.value?.find(
|
|
50
|
-
(o) => o.id ===
|
|
51
|
+
(o) => o.id === s
|
|
51
52
|
);
|
|
52
53
|
a && e.workspace.navigateToWorkspace(a.namespace, a.slug);
|
|
53
|
-
}, c = g(), b = d(() =>
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
54
|
+
}, c = g(), b = d(() => {
|
|
55
|
+
const s = e.store.value?.auth ? P(
|
|
56
|
+
e.document.value?.components?.securitySchemes ?? {},
|
|
57
|
+
{},
|
|
58
|
+
e.store.value.auth,
|
|
59
|
+
e.activeEntities.documentSlug.value ?? ""
|
|
60
|
+
) : {};
|
|
61
|
+
return {
|
|
62
|
+
documentSlug: e.activeEntities.documentSlug.value ?? "",
|
|
63
|
+
document: e.store.value?.workspace.activeDocument ?? null,
|
|
64
|
+
environment: e.environment.value,
|
|
65
|
+
eventBus: e.eventBus,
|
|
66
|
+
exampleName: e.activeEntities.exampleName.value,
|
|
67
|
+
layout: r.layout,
|
|
68
|
+
method: e.activeEntities.method.value,
|
|
69
|
+
path: e.activeEntities.path.value,
|
|
70
|
+
workspaceStore: e.store.value,
|
|
71
|
+
activeWorkspace: e.workspace.activeWorkspace.value,
|
|
72
|
+
plugins: r.plugins,
|
|
73
|
+
securitySchemes: s
|
|
74
|
+
};
|
|
75
|
+
});
|
|
76
|
+
return (s, a) => (i(), p(t(C), null, {
|
|
68
77
|
default: u(() => [
|
|
69
|
-
m("div", { innerHTML: S.value }, null, 8,
|
|
78
|
+
m("div", { innerHTML: S.value }, null, 8, F),
|
|
70
79
|
n(t(B)),
|
|
71
|
-
n(t(
|
|
80
|
+
n(t(H), {
|
|
72
81
|
activeWorkspace: t(e).workspace.activeWorkspace.value,
|
|
73
82
|
darkMode: t(f),
|
|
74
83
|
workspaceStore: t(e).store.value,
|
|
@@ -83,8 +92,8 @@ const H = ["innerHTML"], F = {
|
|
|
83
92
|
"onSelect:workspace": l
|
|
84
93
|
}, {
|
|
85
94
|
default: u(() => [
|
|
86
|
-
t(e).store.value !== null && t(e).workspace.activeWorkspace.value !== null && !t(e).loading.value ? (i(), v("main",
|
|
87
|
-
|
|
95
|
+
t(e).store.value !== null && t(e).workspace.activeWorkspace.value !== null && !t(e).loading.value ? (i(), v("main", V, [
|
|
96
|
+
r.layout === "desktop" ? (i(), p(N, {
|
|
88
97
|
key: 0,
|
|
89
98
|
activeTabIndex: t(e).tabs.activeTabIndex.value,
|
|
90
99
|
eventBus: t(e).eventBus,
|
|
@@ -96,14 +105,14 @@ const H = ["innerHTML"], F = {
|
|
|
96
105
|
"onCreate:workspace": a[0] || (a[0] = (o) => t(c).show()),
|
|
97
106
|
"onSelect:workspace": l
|
|
98
107
|
}, null, 8, ["activeWorkspace", "workspaces"])),
|
|
99
|
-
m("div",
|
|
108
|
+
m("div", R, [
|
|
100
109
|
n(L, {
|
|
101
110
|
isSidebarOpen: t(e).sidebar.isOpen.value,
|
|
102
111
|
"onUpdate:isSidebarOpen": a[1] || (a[1] = (o) => t(e).sidebar.isOpen.value = o),
|
|
103
112
|
activeWorkspace: t(e).workspace.activeWorkspace.value,
|
|
104
113
|
eventBus: t(e).eventBus,
|
|
105
114
|
isWorkspaceOpen: t(e).workspace.isOpen.value,
|
|
106
|
-
layout:
|
|
115
|
+
layout: r.layout,
|
|
107
116
|
sidebarState: t(e).sidebar.state,
|
|
108
117
|
sidebarWidth: t(e).sidebar.width.value,
|
|
109
118
|
store: t(e).store.value,
|
|
@@ -115,12 +124,12 @@ const H = ["innerHTML"], F = {
|
|
|
115
124
|
"onUpdate:sidebarWidth": t(e).sidebar.handleSidebarWidthUpdate
|
|
116
125
|
}, {
|
|
117
126
|
sidebarMenuActions: u(() => [
|
|
118
|
-
T(
|
|
127
|
+
T(s.$slots, "sidebar-menu-actions")
|
|
119
128
|
]),
|
|
120
129
|
_: 3
|
|
121
130
|
}, 8, ["isSidebarOpen", "activeWorkspace", "eventBus", "isWorkspaceOpen", "layout", "sidebarState", "sidebarWidth", "store", "workspaces", "onClick:workspace", "onSelectItem", "onUpdate:sidebarWidth"]),
|
|
122
|
-
m("div",
|
|
123
|
-
n(t(
|
|
131
|
+
m("div", z, [
|
|
132
|
+
n(t(M), h(y(b.value)), null, 16)
|
|
124
133
|
])
|
|
125
134
|
]),
|
|
126
135
|
n(O, {
|
|
@@ -132,7 +141,7 @@ const H = ["innerHTML"], F = {
|
|
|
132
141
|
paletteState: t(w),
|
|
133
142
|
workspaceStore: t(e).store.value
|
|
134
143
|
}, null, 8, ["eventBus", "paletteState", "workspaceStore"])
|
|
135
|
-
])) : (i(), v("main",
|
|
144
|
+
])) : (i(), v("main", G, [
|
|
136
145
|
n(_)
|
|
137
146
|
]))
|
|
138
147
|
]),
|
|
@@ -144,5 +153,5 @@ const H = ["innerHTML"], F = {
|
|
|
144
153
|
}
|
|
145
154
|
});
|
|
146
155
|
export {
|
|
147
|
-
|
|
156
|
+
ue as default
|
|
148
157
|
};
|
|
@@ -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;
|
|
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,C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,CAAA;IACD,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,MAAM,EAAE,UAAU,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;IACjC,YAAY,EAAE,GAAG,CAAC,8BAA8B,GAAG,IAAI,CAAC,CAAA;IACxD,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IACrB,cAAc,EAAE;QACd,SAAS,EAAE,GAAG,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;QAClC,aAAa,EAAE,GAAG,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;QACtC,YAAY,EAAE,GAAG,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;QACrC,IAAI,EAAE,GAAG,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;QAC7B,MAAM,EAAE,GAAG,CAAC,UAAU,GAAG,SAAS,CAAC,CAAA;QACnC,WAAW,EAAE,GAAG,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;KACrC,CAAA;IACD,WAAW,EAAE,WAAW,CAAC,kBAAkB,CAAC,CAAA;IAC5C,QAAQ,EAAE,WAAW,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAA;CAChD,CAAA;AAED,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,QAAQ,CA0CrD"}
|
|
@@ -15,9 +15,9 @@ import { getTabDetails as ae } from "../../helpers/get-tab-details.js";
|
|
|
15
15
|
import { slugify as te } from "../../helpers/slugify.js";
|
|
16
16
|
import { workspaceStorage as ne } from "../../helpers/storage.js";
|
|
17
17
|
import { initializeAppEventHandlers as re } from "./app-events.js";
|
|
18
|
-
const oe = 1e3,
|
|
18
|
+
const oe = 1e3, w = J({
|
|
19
19
|
debug: !1
|
|
20
|
-
}), v = p(void 0), k = p(void 0),
|
|
20
|
+
}), v = p(void 0), k = p(void 0), x = p(void 0), B = p(void 0), O = p(void 0), L = p(void 0), h = p(!1), l = E(null);
|
|
21
21
|
Z(l, (e) => {
|
|
22
22
|
e && e.afterEach((a) => ge(a));
|
|
23
23
|
});
|
|
@@ -27,10 +27,10 @@ function c(e, a) {
|
|
|
27
27
|
if (typeof t == "string")
|
|
28
28
|
return e === "method" ? t && Y(t) ? t : void 0 : decodeURIComponent(t);
|
|
29
29
|
}
|
|
30
|
-
const W = E(null), I = p([]), o = E(null), T = i(() => o.value?.workspace.documents[
|
|
31
|
-
I.value = await
|
|
30
|
+
const W = E(null), I = p([]), o = E(null), T = i(() => o.value?.workspace.documents[x.value ?? ""] || null), se = i(() => ee(o.value, T.value)), { workspace: g } = await G(), f = (e, a) => `${e}/${a}`;
|
|
31
|
+
I.value = await g.getAll().then(
|
|
32
32
|
(e) => e.map(({ teamUid: a, namespace: t, slug: n, name: u }) => ({
|
|
33
|
-
id:
|
|
33
|
+
id: f(t, n),
|
|
34
34
|
teamUid: a,
|
|
35
35
|
namespace: t,
|
|
36
36
|
slug: n,
|
|
@@ -38,15 +38,17 @@ I.value = await x.getAll().then(
|
|
|
38
38
|
}))
|
|
39
39
|
);
|
|
40
40
|
const ce = async ({ namespace: e, slug: a }) => C({
|
|
41
|
-
plugins: [
|
|
41
|
+
plugins: [
|
|
42
|
+
await Q({ workspaceId: f(e, a), debounceDelay: oe })
|
|
43
|
+
]
|
|
42
44
|
}), ue = async (e, a) => {
|
|
43
|
-
const t = await
|
|
45
|
+
const t = await g.getItem({ namespace: e, slug: a });
|
|
44
46
|
if (!t)
|
|
45
47
|
return {
|
|
46
48
|
success: !1
|
|
47
49
|
};
|
|
48
50
|
const n = await ce({ namespace: e, slug: a });
|
|
49
|
-
return n.loadWorkspace(t.workspace), W.value = { id:
|
|
51
|
+
return n.loadWorkspace(t.workspace), W.value = { id: f(t.namespace, t.slug), label: t.name }, o.value = n, {
|
|
50
52
|
success: !0,
|
|
51
53
|
workspace: n.workspace
|
|
52
54
|
};
|
|
@@ -74,7 +76,7 @@ const ce = async ({ namespace: e, slug: a }) => C({
|
|
|
74
76
|
"x-scalar-icon": "interface-edit-tool-pencil"
|
|
75
77
|
}
|
|
76
78
|
});
|
|
77
|
-
const s = await
|
|
79
|
+
const s = await g.setItem(
|
|
78
80
|
{ namespace: t, slug: n },
|
|
79
81
|
{
|
|
80
82
|
name: e,
|
|
@@ -83,18 +85,18 @@ const ce = async ({ namespace: e, slug: a }) => C({
|
|
|
83
85
|
}
|
|
84
86
|
);
|
|
85
87
|
return I.value.push({
|
|
86
|
-
id:
|
|
88
|
+
id: f(s.namespace, s.slug),
|
|
87
89
|
teamUid: s.teamUid,
|
|
88
90
|
namespace: s.namespace,
|
|
89
91
|
slug: s.slug,
|
|
90
92
|
label: s.name
|
|
91
93
|
}), s;
|
|
92
|
-
},
|
|
94
|
+
}, N = async (e, a) => {
|
|
93
95
|
await l.value?.push({
|
|
94
96
|
name: "workspace.environment",
|
|
95
97
|
params: { namespace: e, workspaceSlug: a }
|
|
96
98
|
});
|
|
97
|
-
},
|
|
99
|
+
}, P = async ({
|
|
98
100
|
key: e,
|
|
99
101
|
name: a
|
|
100
102
|
}) => {
|
|
@@ -102,7 +104,7 @@ const ce = async ({ namespace: e, slug: a }) => C({
|
|
|
102
104
|
const t = await M({
|
|
103
105
|
defaultValue: e?.slug ?? a,
|
|
104
106
|
// Use the provided id if it exists, otherwise use the name
|
|
105
|
-
validation: async (s) => !await
|
|
107
|
+
validation: async (s) => !await g.has({ namespace: e?.namespace ?? "local", slug: s }),
|
|
106
108
|
maxRetries: 100,
|
|
107
109
|
transformation: te
|
|
108
110
|
});
|
|
@@ -114,44 +116,44 @@ const ce = async ({ namespace: e, slug: a }) => C({
|
|
|
114
116
|
slug: t,
|
|
115
117
|
name: a
|
|
116
118
|
}, u = await le(n);
|
|
117
|
-
return await
|
|
119
|
+
return await N(u.namespace, u.slug), u;
|
|
118
120
|
}, ie = async (e, a) => {
|
|
119
|
-
o.value = null,
|
|
121
|
+
o.value = null, h.value = !0;
|
|
120
122
|
const t = await ue(e, a);
|
|
121
123
|
if (t.success) {
|
|
122
124
|
const u = t.workspace["x-scalar-active-tab"] ?? 0, s = t.workspace["x-scalar-tabs"], D = s?.[u];
|
|
123
125
|
D && await l.value?.replace({
|
|
124
126
|
path: D.path,
|
|
125
127
|
query: m.value?.query ?? {}
|
|
126
|
-
}), s && u >= s.length &&
|
|
128
|
+
}), s && u >= s.length && w.emit("tabs:update:tabs", {
|
|
127
129
|
"x-scalar-active-tab": 0
|
|
128
|
-
}), s ||
|
|
130
|
+
}), s || w.emit("tabs:update:tabs", {
|
|
129
131
|
"x-scalar-tabs": [U(m.value)],
|
|
130
132
|
"x-scalar-active-tab": 0
|
|
131
|
-
}),
|
|
133
|
+
}), h.value = !1;
|
|
132
134
|
return;
|
|
133
135
|
}
|
|
134
|
-
const n = await
|
|
136
|
+
const n = await P({
|
|
135
137
|
name: "Default Workspace",
|
|
136
138
|
key: { slug: "default" }
|
|
137
139
|
});
|
|
138
|
-
if (
|
|
140
|
+
if (h.value = !1, !n)
|
|
139
141
|
return console.error("Failed to create the default workspace, something went wrong, can not load the workspace");
|
|
140
142
|
r.reset();
|
|
141
|
-
},
|
|
143
|
+
}, _ = i(() => {
|
|
142
144
|
const e = o.value;
|
|
143
145
|
if (!e)
|
|
144
146
|
return [];
|
|
145
147
|
const a = e.workspace["x-scalar-order"] ?? Object.keys(e.workspace.documents);
|
|
146
148
|
return V(Object.keys(e.workspace.documents), a, (t) => t).map((t) => e.workspace.documents[t]?.["x-scalar-navigation"]).filter(A);
|
|
147
|
-
}), r = j(
|
|
149
|
+
}), r = j(_), y = ({
|
|
148
150
|
document: e,
|
|
149
151
|
path: a,
|
|
150
152
|
method: t,
|
|
151
153
|
example: n
|
|
152
154
|
}) => JSON.stringify([e, a, t, n].filter(A)), R = i(
|
|
153
155
|
() => z({
|
|
154
|
-
items:
|
|
156
|
+
items: _.value,
|
|
155
157
|
nestedKey: "children",
|
|
156
158
|
filter: (e) => e.type === "document" || e.type === "operation" || e.type === "example",
|
|
157
159
|
getId: (e) => {
|
|
@@ -173,7 +175,7 @@ const ce = async ({ namespace: e, slug: a }) => C({
|
|
|
173
175
|
method: e.method
|
|
174
176
|
})
|
|
175
177
|
);
|
|
176
|
-
},
|
|
178
|
+
}, $ = (e) => {
|
|
177
179
|
const a = r.getEntryById(e);
|
|
178
180
|
if (!a) {
|
|
179
181
|
console.warn(`Could not find sidebar entry with id ${e} to select`);
|
|
@@ -270,8 +272,8 @@ const ce = async ({ namespace: e, slug: a }) => C({
|
|
|
270
272
|
}
|
|
271
273
|
}, ge = (e) => {
|
|
272
274
|
const a = c("workspaceSlug", e), t = c("documentSlug", e);
|
|
273
|
-
if (v.value = c("namespace", e), k.value = a,
|
|
274
|
-
if (e.path !== "" && ne.setCurrentPath(e.path),
|
|
275
|
+
if (v.value = c("namespace", e), k.value = a, x.value = t, B.value = c("method", e), O.value = c("pathEncoded", e), L.value = c("exampleName", e), !(!v.value || !a)) {
|
|
276
|
+
if (e.path !== "" && ne.setCurrentPath(e.path), f(v.value, a) !== W.value?.id)
|
|
275
277
|
return ie(v.value, a);
|
|
276
278
|
t && t !== o.value?.workspace[X.workspace.activeDocument] && o?.value?.update("x-scalar-active-document", t), be(e), H(e);
|
|
277
279
|
}
|
|
@@ -293,17 +295,17 @@ const ce = async ({ namespace: e, slug: a }) => C({
|
|
|
293
295
|
t && (r.setSelected(t.id), r.setExpanded(t.id, !0));
|
|
294
296
|
};
|
|
295
297
|
re({
|
|
296
|
-
eventBus:
|
|
298
|
+
eventBus: w,
|
|
297
299
|
router: l,
|
|
298
300
|
store: o,
|
|
299
301
|
navigateToCurrentTab: pe,
|
|
300
302
|
rebuildSidebar: F,
|
|
301
303
|
onAfterExampleCreation: me,
|
|
302
|
-
onSelectSidebarItem:
|
|
304
|
+
onSelectSidebarItem: $,
|
|
303
305
|
onCopyTabUrl: (e) => q(e),
|
|
304
306
|
onToggleSidebar: () => S.value = !S.value
|
|
305
307
|
});
|
|
306
|
-
function
|
|
308
|
+
function _e(e) {
|
|
307
309
|
return e && (l.value = e), {
|
|
308
310
|
/** Active workspace store */
|
|
309
311
|
store: o,
|
|
@@ -311,7 +313,7 @@ function Pe(e) {
|
|
|
311
313
|
state: r,
|
|
312
314
|
width: ve,
|
|
313
315
|
isOpen: S,
|
|
314
|
-
handleSelectItem:
|
|
316
|
+
handleSelectItem: $,
|
|
315
317
|
handleSidebarWidthUpdate: fe,
|
|
316
318
|
getEntryByLocation: b
|
|
317
319
|
},
|
|
@@ -321,28 +323,28 @@ function Pe(e) {
|
|
|
321
323
|
copyTabUrl: q
|
|
322
324
|
},
|
|
323
325
|
workspace: {
|
|
324
|
-
create:
|
|
326
|
+
create: P,
|
|
325
327
|
workspaceList: I,
|
|
326
328
|
activeWorkspace: W,
|
|
327
|
-
navigateToWorkspace:
|
|
328
|
-
isOpen: i(() => !!(k.value && !
|
|
329
|
+
navigateToWorkspace: N,
|
|
330
|
+
isOpen: i(() => !!(k.value && !x.value))
|
|
329
331
|
},
|
|
330
|
-
eventBus:
|
|
332
|
+
eventBus: w,
|
|
331
333
|
router: l,
|
|
332
334
|
currentRoute: m,
|
|
333
|
-
loading:
|
|
335
|
+
loading: h,
|
|
334
336
|
activeEntities: {
|
|
335
337
|
namespace: v,
|
|
336
338
|
workspaceSlug: k,
|
|
337
|
-
documentSlug:
|
|
339
|
+
documentSlug: x,
|
|
338
340
|
path: O,
|
|
339
341
|
method: B,
|
|
340
|
-
exampleName:
|
|
342
|
+
exampleName: L
|
|
341
343
|
},
|
|
342
344
|
environment: se,
|
|
343
345
|
document: T
|
|
344
346
|
};
|
|
345
347
|
}
|
|
346
348
|
export {
|
|
347
|
-
|
|
349
|
+
_e as useAppState
|
|
348
350
|
};
|
|
@@ -3,7 +3,7 @@ import type { WorkspaceStore } from '@scalar/workspace-store/client';
|
|
|
3
3
|
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
4
4
|
import type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments';
|
|
5
5
|
import type { WorkspaceDocument } from '@scalar/workspace-store/schemas/workspace';
|
|
6
|
-
import type { MergedSecuritySchemes } from '../../../../v2/blocks/scalar-auth-selector-block/helpers/merge-
|
|
6
|
+
import type { MergedSecuritySchemes } from '../../../../v2/blocks/scalar-auth-selector-block/helpers/merge-security.js';
|
|
7
7
|
import type { ClientPlugin } from '../../../../v2/helpers/plugins.js';
|
|
8
8
|
import type { ClientLayout } from '../../../../v2/types/layout';
|
|
9
9
|
/** These props are provided at the route level */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/helpers/routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAEnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAA;AAGlF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/helpers/routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAEnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAA;AAGlF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+DAA+D,CAAA;AAU1G,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAExD,OAAO,KAAK,EA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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Authentication.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/collection/components/Authentication.vue"],"names":[],"mappings":";;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Authentication.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/collection/components/Authentication.vue"],"names":[],"mappings":";;;;;;;;;;;;;AA+OA,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./Authentication.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const c = /* @__PURE__ */ o(t, [["__scopeId", "data-v-
|
|
4
|
+
const c = /* @__PURE__ */ o(t, [["__scopeId", "data-v-1bfafc56"]]);
|
|
5
5
|
export {
|
|
6
6
|
c as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as u, computed as s, createElementBlock as m, openBlock as d, createElementVNode as n, createVNode as c, unref as
|
|
1
|
+
import { defineComponent as u, computed as s, createElementBlock as m, openBlock as d, createElementVNode as n, createVNode as c, unref as a, normalizeClass as i } from "vue";
|
|
2
2
|
import { ScalarToggle as v } from "@scalar/components";
|
|
3
3
|
import y from "../../../blocks/scalar-auth-selector-block/components/AuthSelector.vue.js";
|
|
4
|
-
const
|
|
4
|
+
const h = { class: "flex flex-col gap-4" }, f = { class: "flex flex-col gap-2" }, p = { class: "flex h-8 items-center justify-between" }, w = /* @__PURE__ */ u({
|
|
5
5
|
__name: "Authentication",
|
|
6
6
|
props: {
|
|
7
7
|
documentSlug: {},
|
|
@@ -26,11 +26,11 @@ const f = { class: "flex flex-col gap-4" }, p = { class: "flex flex-col gap-2" }
|
|
|
26
26
|
({ url: o }) => o === e.document?.["x-scalar-selected-server"]
|
|
27
27
|
) ?? null
|
|
28
28
|
);
|
|
29
|
-
return (o, t) => (d(), m("div",
|
|
30
|
-
n("div",
|
|
31
|
-
n("div",
|
|
29
|
+
return (o, t) => (d(), m("div", h, [
|
|
30
|
+
n("div", f, [
|
|
31
|
+
n("div", p, [
|
|
32
32
|
t[1] || (t[1] = n("h3", { class: "font-bold" }, "Authentication", -1)),
|
|
33
|
-
c(
|
|
33
|
+
c(a(v), {
|
|
34
34
|
class: "w-4",
|
|
35
35
|
modelValue: l.value,
|
|
36
36
|
"onUpdate:modelValue": t[0] || (t[0] = () => e.eventBus.emit("document:toggle:security"))
|
|
@@ -39,10 +39,10 @@ const f = { class: "flex flex-col gap-4" }, p = { class: "flex flex-col gap-2" }
|
|
|
39
39
|
t[2] || (t[2] = n("p", { class: "pr-6 text-sm" }, " If enabled, all selected authentication will apply to all operations in this document. You can override this by disabling the toggle and authentication will then be applied at the operation level. ", -1))
|
|
40
40
|
]),
|
|
41
41
|
n("div", {
|
|
42
|
-
class:
|
|
42
|
+
class: i(!l.value && "cursor-not-allowed")
|
|
43
43
|
}, [
|
|
44
|
-
c(
|
|
45
|
-
class:
|
|
44
|
+
c(a(y), {
|
|
45
|
+
class: i([
|
|
46
46
|
"scalar-collection-auth !border-none",
|
|
47
47
|
!l.value && "pointer-events-none opacity-50 mix-blend-luminosity"
|
|
48
48
|
]),
|
|
@@ -53,7 +53,10 @@ const f = { class: "flex flex-col gap-4" }, p = { class: "flex flex-col gap-2" }
|
|
|
53
53
|
proxyUrl: e.workspaceStore.workspace["x-scalar-active-proxy"] ?? "",
|
|
54
54
|
securityRequirements: e.document?.security ?? [],
|
|
55
55
|
securitySchemes: e.securitySchemes,
|
|
56
|
-
selectedSecurity: e.
|
|
56
|
+
selectedSecurity: e.workspaceStore.auth.getAuthSelectedSchemas({
|
|
57
|
+
type: "document",
|
|
58
|
+
documentName: e.documentSlug
|
|
59
|
+
}),
|
|
57
60
|
server: r.value,
|
|
58
61
|
title: "Authentication"
|
|
59
62
|
}, null, 8, ["class", "environment", "eventBus", "proxyUrl", "securityRequirements", "securitySchemes", "selectedSecurity", "server"])
|
|
@@ -62,5 +65,5 @@ const f = { class: "flex flex-col gap-4" }, p = { class: "flex flex-col gap-2" }
|
|
|
62
65
|
}
|
|
63
66
|
});
|
|
64
67
|
export {
|
|
65
|
-
|
|
68
|
+
w as default
|
|
66
69
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"import-document-to-workspace.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/import-listener/helpers/import-document-to-workspace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAA;AAI3F;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,yBAAyB,GAAU,2CAI7C;IACD,cAAc,EAAE,cAAc,GAAG,IAAI,CAAA;IACrC,cAAc,EAAE,iBAAiB,CAAA;IACjC,IAAI,EAAE,MAAM,CAAA;CACb,KAAG,OAAO,CAAC;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"import-document-to-workspace.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/import-listener/helpers/import-document-to-workspace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAA;AAI3F;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,yBAAyB,GAAU,2CAI7C;IACD,cAAc,EAAE,cAAc,GAAG,IAAI,CAAA;IACrC,cAAc,EAAE,iBAAiB,CAAA;IACjC,IAAI,EAAE,MAAM,CAAA;CACb,KAAG,OAAO,CAAC;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAwDpE,CAAA"}
|
|
@@ -23,7 +23,9 @@ const m = async ({
|
|
|
23
23
|
},
|
|
24
24
|
overrides: {
|
|
25
25
|
[e]: o.overrides[n] ?? {}
|
|
26
|
-
}
|
|
26
|
+
},
|
|
27
|
+
history: {},
|
|
28
|
+
auth: {}
|
|
27
29
|
}), t.buildSidebar(e), await t.saveDocument(e), { ok: !0, slug: e }) : { ok: !1, error: "Failed to generate a unique slug for the importing document" };
|
|
28
30
|
};
|
|
29
31
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/modal/Modal.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Modal.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/modal/Modal.vue"],"names":[],"mappings":"AAoZA,OAAO,EAGL,KAAK,UAAU,EAEhB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AACnE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAA;AAE/E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AAExE,OAAO,EASL,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACtB,MAAM,KAAK,CAAA;AAIZ,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,6CAA6C,CAAA;AAIxF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAKxD,MAAM,MAAM,UAAU,GAAG;IACvB,4DAA4D;IAC5D,cAAc,EAAE,cAAc,CAAA;IAC9B,qDAAqD;IACrD,QAAQ,EAAE,WAAW,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAA;IAC/C,iDAAiD;IACjD,IAAI,EAAE,WAAW,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IACrC,4CAA4C;IAC5C,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,mDAAmD;IACnD,MAAM,EAAE,WAAW,CAAC,UAAU,GAAG,SAAS,CAAC,CAAA;IAC3C,yDAAyD;IACzD,WAAW,EAAE,WAAW,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IAC5C,2CAA2C;IAC3C,UAAU,EAAE,UAAU,CAAA;IACtB,0DAA0D;IAC1D,YAAY,EAAE,qBAAqB,CAAA;IACnC,iDAAiD;IACjD,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,wDAAwD;IACxD,OAAO,EAAE,gBAAgB,CACvB,OAAO,CACL,IAAI,CACF,4BAA4B,EAC1B,gBAAgB,GAChB,eAAe,GACf,kBAAkB,GAClB,eAAe,GACf,SAAS,CACZ,CACF,CACF,CAAA;CACF,CAAA;AAED;;;;GAIG;;;;;AACH,wBA4WC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Modal.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-dbc80a57"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|