@scalar/api-client 2.17.3 → 2.17.4
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 +40 -0
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +15 -10
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.js +70 -55
- 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 +12 -8
- package/dist/v2/blocks/operation-block/helpers/build-request-security.d.ts +3 -5
- 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 +31 -31
- package/dist/v2/blocks/operation-block/helpers/build-request.d.ts +4 -6
- package/dist/v2/blocks/operation-block/helpers/build-request.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request.js +20 -21
- package/dist/v2/blocks/operation-block/helpers/get-example.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/get-example.js +22 -16
- package/dist/v2/blocks/operation-block/helpers/send-request.js +26 -26
- package/dist/v2/blocks/operation-block/index.d.ts +1 -0
- package/dist/v2/blocks/operation-block/index.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/index.js +4 -2
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts +9 -4
- 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 +1 -1
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue2.js +81 -88
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts +4 -4
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts +1 -1
- 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/operation-to-har.js +1 -1
- package/dist/v2/blocks/operation-code-sample/index.d.ts +1 -0
- package/dist/v2/blocks/operation-code-sample/index.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/index.js +11 -9
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts +3 -2
- 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 +59 -63
- package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBody.vue.js +2 -2
- package/dist/v2/blocks/request-block/components/RequestBody.vue2.js +78 -74
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.js +3 -3
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js +43 -42
- 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 +96 -86
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/convert-security-scheme-secrets.d.ts +8 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/convert-security-scheme-secrets.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/convert-security-scheme-secrets.js +33 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-auth-config.d.ts +7 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-auth-config.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-auth-config.js +13 -0
- package/dist/v2/blocks/scalar-auth-selector-block/index.d.ts +3 -0
- package/dist/v2/blocks/scalar-auth-selector-block/index.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/index.js +8 -2
- package/dist/v2/components/data-table/DataTableInput.vue.d.ts.map +1 -1
- package/dist/v2/components/data-table/DataTableInput.vue.js +2 -2
- package/dist/v2/components/data-table/DataTableInput.vue2.js +25 -24
- package/dist/v2/features/app/App.vue.d.ts.map +1 -1
- package/dist/v2/features/app/App.vue.js +34 -33
- package/dist/v2/features/app/helpers/routes.d.ts +2 -0
- package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
- package/dist/v2/features/app/hooks/use-workspace-client-app-events.d.ts.map +1 -1
- package/dist/v2/features/app/hooks/use-workspace-client-app-events.js +29 -29
- package/dist/v2/features/collection/DocumentCollection.vue.js +4 -3
- package/dist/v2/features/collection/WorkspaceCollection.vue.js +8 -7
- 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 +7 -6
- package/dist/v2/features/collection/components/Cookies.vue.js +1 -0
- package/dist/v2/features/collection/components/Environment.vue.js +1 -0
- package/dist/v2/features/collection/components/Overview.vue2.js +8 -7
- package/dist/v2/features/collection/components/Servers.vue.js +25 -24
- package/dist/v2/features/collection/components/Settings.vue.js +8 -7
- package/dist/v2/features/modal/Modal.vue.d.ts +6 -0
- package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
- package/dist/v2/features/modal/Modal.vue.js +2 -2
- package/dist/v2/features/modal/Modal.vue2.js +66 -62
- package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts +16 -16
- 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 +36 -29
- package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.d.ts.map +1 -1
- package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.js +25 -12
- package/dist/v2/features/modal/index.d.ts +2 -1
- package/dist/v2/features/modal/index.d.ts.map +1 -1
- package/dist/v2/features/modal/index.js +3 -1
- package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.js +54 -62
- package/dist/v2/features/operation/helpers/get-security-requirements.d.ts +1 -1
- package/dist/v2/features/operation/helpers/get-security-requirements.d.ts.map +1 -1
- package/dist/v2/features/operation/helpers/get-security-requirements.js +2 -2
- package/dist/v2/features/operation/helpers/get-selected-security.d.ts +5 -2
- package/dist/v2/features/operation/helpers/get-selected-security.d.ts.map +1 -1
- package/dist/v2/features/operation/helpers/get-selected-security.js +11 -11
- package/dist/v2/features/operation/helpers/get-selected-server.d.ts +10 -0
- package/dist/v2/features/operation/helpers/get-selected-server.d.ts.map +1 -0
- package/dist/v2/features/operation/helpers/get-selected-server.js +4 -0
- package/dist/v2/features/operation/index.d.ts +3 -0
- package/dist/v2/features/operation/index.d.ts.map +1 -1
- package/dist/v2/features/operation/index.js +8 -2
- package/dist/v2/helpers/index.d.ts +3 -0
- package/dist/v2/helpers/index.d.ts.map +1 -0
- package/dist/v2/helpers/index.js +4 -0
- package/dist/v2/helpers/plugins.d.ts +7 -1
- package/dist/v2/helpers/plugins.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +22 -17
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTableInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/data-table/DataTableInput.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DataTableInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/data-table/DataTableInput.vue"],"names":[],"mappings":"AA+LA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AAGnH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAM/C,KAAK,WAAW,GAAG;IACf,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,sEAAsE;IACtE,cAAc,CAAC,EAAE,YAAY,GAAG,SAAS,CAAA;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,EAAE,MAAM,GAAG,MAAM,CAAA;IAC3B,0EAA0E;IAC1E,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,kBAAkB,CAAA;IAC/B,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAChC,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,CAAC;AAqSJ,QAAA,IAAI,OAAO,IAAU,EAAuB,QAAQ,IAAW,EAAE,QAAQ,IAAY,CAAE;AACvF,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAC5C;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC7C;IAAE,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAmC7C,QAAA,MAAM,eAAe;;;;;;;;;;;cAvVN,OAAO;cAIP,OAAO;kBAMH,OAAO;2BAPE,OAAO;6EA4VjC,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAa1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./DataTableInput.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-8d3686b2"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as B, ref as u, computed as C, createBlock as
|
|
1
|
+
import { defineComponent as B, ref as u, computed as C, createBlock as r, openBlock as n, normalizeClass as b, withCtx as $, createElementBlock as d, createCommentVNode as p, createElementVNode as I, renderSlot as m, createTextVNode as O, Fragment as h, mergeProps as c, unref as i } from "vue";
|
|
2
2
|
import { ScalarIconButton as E } from "@scalar/components";
|
|
3
3
|
import { ScalarIconEye as S, ScalarIconEyeSlash as A } from "@scalar/icons";
|
|
4
4
|
import W from "./DataTableCell.vue.js";
|
|
@@ -26,17 +26,17 @@ const T = ["for"], N = { class: "relative flex min-w-0 flex-1" }, P = ["readOnly
|
|
|
26
26
|
lineWrapping: { type: Boolean, default: !1 }
|
|
27
27
|
},
|
|
28
28
|
emits: ["update:modelValue", "inputFocus", "inputBlur", "selectVariable"],
|
|
29
|
-
setup(v, { emit:
|
|
30
|
-
const
|
|
31
|
-
() =>
|
|
29
|
+
setup(v, { emit: w }) {
|
|
30
|
+
const a = v, o = w, s = u(!0), V = u(!1), f = u(null), k = () => !V.value && o("inputBlur"), y = C(
|
|
31
|
+
() => a.type === "password" ? "text" : a.type ?? "text"
|
|
32
32
|
), g = () => {
|
|
33
|
-
!
|
|
33
|
+
!a.enum?.length && !a.readOnly && f.value?.focus();
|
|
34
34
|
};
|
|
35
|
-
return (e, l) => (
|
|
35
|
+
return (e, l) => (n(), r(W, {
|
|
36
36
|
class: b(["relative flex", e.containerClass])
|
|
37
37
|
}, {
|
|
38
38
|
default: $(() => [
|
|
39
|
-
e.$slots.default ? (
|
|
39
|
+
e.$slots.default ? (n(), d("div", {
|
|
40
40
|
key: 0,
|
|
41
41
|
class: "text-c-1 flex items-center pr-0 pl-3",
|
|
42
42
|
for: e.id ?? "",
|
|
@@ -46,14 +46,14 @@ const T = ["for"], N = { class: "relative flex min-w-0 flex-1" }, P = ["readOnly
|
|
|
46
46
|
l[5] || (l[5] = O(": ", -1))
|
|
47
47
|
], 8, T)) : p("", !0),
|
|
48
48
|
I("div", N, [
|
|
49
|
-
|
|
49
|
+
a.enum && a.enum.length ? (n(), r(q, {
|
|
50
50
|
key: 0,
|
|
51
|
-
canAddCustomValue:
|
|
52
|
-
modelValue:
|
|
53
|
-
value:
|
|
54
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
55
|
-
}, null, 8, ["canAddCustomValue", "modelValue", "value"])) : (
|
|
56
|
-
|
|
51
|
+
canAddCustomValue: a.canAddCustomEnumValue,
|
|
52
|
+
modelValue: a.modelValue,
|
|
53
|
+
value: a.enum,
|
|
54
|
+
"onUpdate:modelValue": l[0] || (l[0] = (t) => o("update:modelValue", t))
|
|
55
|
+
}, null, 8, ["canAddCustomValue", "modelValue", "value"])) : (n(), d(h, { key: 1 }, [
|
|
56
|
+
s.value && e.type === "password" ? (n(), d("input", c({ key: 0 }, e.id ? { ...e.$attrs, id: e.id } : e.$attrs, {
|
|
57
57
|
autocomplete: "off",
|
|
58
58
|
class: ["text-c-1 disabled:text-c-2 peer w-full min-w-0 border-none px-2 py-1.25 -outline-offset-1", { "scalar-password-input": e.type === "password" }],
|
|
59
59
|
"data-1p-ignore": "",
|
|
@@ -61,11 +61,11 @@ const T = ["for"], N = { class: "relative flex min-w-0 flex-1" }, P = ["readOnly
|
|
|
61
61
|
spellcheck: "false",
|
|
62
62
|
type: y.value,
|
|
63
63
|
value: e.modelValue,
|
|
64
|
-
onInput: l[1] || (l[1] = (
|
|
64
|
+
onInput: l[1] || (l[1] = (t) => o(
|
|
65
65
|
"update:modelValue",
|
|
66
|
-
|
|
66
|
+
t.target.value ?? ""
|
|
67
67
|
))
|
|
68
|
-
}), null, 16, P)) : (
|
|
68
|
+
}), null, 16, P)) : (n(), r(i(F), c({ key: 1 }, e.$attrs, {
|
|
69
69
|
id: e.id,
|
|
70
70
|
ref_key: "codeInput",
|
|
71
71
|
ref: f,
|
|
@@ -87,21 +87,22 @@ const T = ["for"], N = { class: "relative flex min-w-0 flex-1" }, P = ["readOnly
|
|
|
87
87
|
spellcheck: "false",
|
|
88
88
|
type: y.value,
|
|
89
89
|
onBlur: k,
|
|
90
|
-
onFocus: l[2] || (l[2] = (
|
|
91
|
-
"onUpdate:modelValue": l[3] || (l[3] = (
|
|
90
|
+
onFocus: l[2] || (l[2] = (t) => o("inputFocus")),
|
|
91
|
+
"onUpdate:modelValue": l[3] || (l[3] = (t) => o("update:modelValue", t))
|
|
92
92
|
}), null, 16, ["id", "class", "description", "environment", "lineWrapping", "max", "min", "modelValue", "readOnly", "required", "type"]))
|
|
93
93
|
], 64))
|
|
94
94
|
]),
|
|
95
|
-
e.$slots.warning ? (
|
|
95
|
+
e.$slots.warning ? (n(), d("div", D, [
|
|
96
96
|
m(e.$slots, "warning", {}, void 0, !0)
|
|
97
97
|
])) : p("", !0),
|
|
98
98
|
m(e.$slots, "icon", {}, void 0, !0),
|
|
99
|
-
e.type === "password" ? (
|
|
99
|
+
e.type === "password" ? (n(), r(i(E), {
|
|
100
100
|
key: 2,
|
|
101
101
|
class: "-ml-.5 mr-1.25 h-6 w-6 self-center p-1.25",
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
102
|
+
"data-testid": "data-table-password-toggle",
|
|
103
|
+
icon: s.value ? i(S) : i(A),
|
|
104
|
+
label: s.value ? "Show Password" : "Hide Password",
|
|
105
|
+
onClick: l[4] || (l[4] = (t) => s.value = !s.value)
|
|
105
106
|
}, null, 8, ["icon", "label"])) : p("", !0)
|
|
106
107
|
]),
|
|
107
108
|
_: 3
|
|
@@ -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":"AA+UA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAGxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AASrD;;;;GAIG;;YAGO,OAAO,CAAC,YAAY,EAAE,OAAO,CAAC;cAC5B,YAAY,EAAE;;YADhB,OAAO,CAAC,YAAY,EAAE,OAAO,CAAC;cAC5B,YAAY,EAAE;;AAH1B,wBA+aC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as $, ref as F, computed as r, createElementBlock as V, createBlock as
|
|
1
|
+
import { defineComponent as $, ref as F, computed as r, createElementBlock as V, createBlock as y, unref as e, openBlock as d, Fragment as z, createElementVNode as W, createVNode as l, withCtx as G, normalizeProps as K, guardReactiveProps as j } from "vue";
|
|
2
2
|
import { useModal as q, ScalarTeleportRoot as J } from "@scalar/components";
|
|
3
3
|
import { isHttpMethod as Q } from "@scalar/helpers/http/is-http-method";
|
|
4
4
|
import { getThemeStyles as X } from "@scalar/themes";
|
|
@@ -21,29 +21,29 @@ import ke from "./components/DesktopTabs.vue.js";
|
|
|
21
21
|
import Se from "./components/WebTopNav.vue.js";
|
|
22
22
|
import { useTabs as fe } from "./hooks/use-tabs.js";
|
|
23
23
|
import { useWorkspaceClientAppEvents as we } from "./hooks/use-workspace-client-app-events.js";
|
|
24
|
-
const he = ["innerHTML"],
|
|
24
|
+
const he = ["innerHTML"], ye = { class: "flex min-h-0 flex-1" }, We = { class: "bg-b-1 flex-1" }, be = {}, je = /* @__PURE__ */ $({
|
|
25
25
|
...be,
|
|
26
26
|
__name: "App",
|
|
27
27
|
props: {
|
|
28
28
|
layout: {},
|
|
29
29
|
plugins: { default: () => [] }
|
|
30
30
|
},
|
|
31
|
-
setup(
|
|
31
|
+
setup(v) {
|
|
32
32
|
typeof window < "u" && (window.dataDumpWorkspace = () => o.value);
|
|
33
33
|
const s = Z({
|
|
34
34
|
debug: !1
|
|
35
|
-
}),
|
|
35
|
+
}), k = F(!0), B = ee(), A = te(), c = (t) => {
|
|
36
36
|
const a = B.params[t];
|
|
37
37
|
return typeof a == "string" ? a : void 0;
|
|
38
|
-
},
|
|
38
|
+
}, S = r(() => c("workspaceSlug")), n = r(() => c("documentSlug")), p = r(() => !n.value || o.value === null ? null : o.value.workspace.documents[n.value] ?? null), f = r(() => {
|
|
39
39
|
const t = c("pathEncoded");
|
|
40
40
|
return t ? decodeURIComponent(t) : void 0;
|
|
41
41
|
}), w = r(() => {
|
|
42
42
|
const t = c("method");
|
|
43
43
|
return t && Q(t) ? t : void 0;
|
|
44
|
-
}), b = r(() => c("exampleName")), g = ce(), { store: o, workspaces: T, activeWorkspace:
|
|
44
|
+
}), b = r(() => c("exampleName")), g = ce(), { store: o, workspaces: T, activeWorkspace: i, setWorkspaceId: O, createWorkspace: U } = g;
|
|
45
45
|
me({ workspaceStore: o });
|
|
46
|
-
const
|
|
46
|
+
const m = se({
|
|
47
47
|
workspaceStore: o,
|
|
48
48
|
documentSlug: n,
|
|
49
49
|
path: f,
|
|
@@ -51,8 +51,8 @@ const he = ["innerHTML"], We = { class: "flex min-h-0 flex-1" }, ye = { class: "
|
|
|
51
51
|
exampleName: b
|
|
52
52
|
}), E = fe({
|
|
53
53
|
workspaceStore: o,
|
|
54
|
-
getEntryByLocation:
|
|
55
|
-
workspaceSlug:
|
|
54
|
+
getEntryByLocation: m.getEntryByLocation,
|
|
55
|
+
workspaceSlug: S,
|
|
56
56
|
documentSlug: n,
|
|
57
57
|
path: f,
|
|
58
58
|
method: w
|
|
@@ -63,18 +63,18 @@ const he = ["innerHTML"], We = { class: "flex min-h-0 flex-1" }, ye = { class: "
|
|
|
63
63
|
}), _ = pe();
|
|
64
64
|
we({
|
|
65
65
|
eventBus: s,
|
|
66
|
-
document:
|
|
66
|
+
document: p,
|
|
67
67
|
workspaceStore: o,
|
|
68
|
-
isSidebarOpen:
|
|
68
|
+
isSidebarOpen: k,
|
|
69
69
|
commandPaletteState: _,
|
|
70
|
-
sidebarState:
|
|
71
|
-
}), de(s,
|
|
70
|
+
sidebarState: m
|
|
71
|
+
}), de(s, v.layout), ne({
|
|
72
72
|
documentName: n,
|
|
73
73
|
store: o,
|
|
74
74
|
initialTimeout: 5e3
|
|
75
75
|
});
|
|
76
76
|
const I = r(
|
|
77
|
-
() => ie(o.value,
|
|
77
|
+
() => ie(o.value, p.value)
|
|
78
78
|
), M = r(() => {
|
|
79
79
|
if (o.value === null)
|
|
80
80
|
return "";
|
|
@@ -83,59 +83,60 @@ const he = ["innerHTML"], We = { class: "flex min-h-0 flex-1" }, ye = { class: "
|
|
|
83
83
|
}), P = 288, D = r(
|
|
84
84
|
() => o.value?.workspace?.["x-scalar-sidebar-width"] ?? P
|
|
85
85
|
), L = r(
|
|
86
|
-
() => !!(
|
|
86
|
+
() => !!(S.value && !n.value)
|
|
87
87
|
), N = (t) => o.value?.update("x-scalar-sidebar-width", t), R = () => A.push({
|
|
88
88
|
name: "workspace.environment",
|
|
89
|
-
params: { workspaceSlug:
|
|
89
|
+
params: { workspaceSlug: S.value }
|
|
90
90
|
}), C = (t) => {
|
|
91
91
|
t && O(t);
|
|
92
92
|
}, H = r(
|
|
93
93
|
() => ({
|
|
94
94
|
documentSlug: n.value ?? "",
|
|
95
|
-
document:
|
|
95
|
+
document: p.value,
|
|
96
96
|
environment: I.value,
|
|
97
97
|
eventBus: s,
|
|
98
98
|
exampleName: b.value,
|
|
99
|
-
layout:
|
|
99
|
+
layout: v.layout,
|
|
100
100
|
method: w.value,
|
|
101
101
|
path: f.value,
|
|
102
102
|
workspaceStore: o.value,
|
|
103
|
-
activeWorkspace:
|
|
104
|
-
plugins:
|
|
103
|
+
activeWorkspace: i.value,
|
|
104
|
+
plugins: v.plugins,
|
|
105
|
+
securitySchemes: p.value?.components?.securitySchemes ?? {}
|
|
105
106
|
})
|
|
106
107
|
), h = q();
|
|
107
|
-
return (t, a) => e(o) !== null && e(
|
|
108
|
-
|
|
108
|
+
return (t, a) => e(o) !== null && e(i) !== null && !e(x) ? (d(), V(z, { key: 0 }, [
|
|
109
|
+
W("div", { innerHTML: M.value }, null, 8, he),
|
|
109
110
|
l(e(J), null, {
|
|
110
111
|
default: G(() => [
|
|
111
112
|
l(e(Y)),
|
|
112
|
-
t.layout === "desktop" ? (
|
|
113
|
+
t.layout === "desktop" ? (d(), y(ke, {
|
|
113
114
|
key: 0,
|
|
114
115
|
eventBus: e(s),
|
|
115
116
|
tabsState: e(E)
|
|
116
|
-
}, null, 8, ["eventBus", "tabsState"])) : (
|
|
117
|
+
}, null, 8, ["eventBus", "tabsState"])) : (d(), y(Se, {
|
|
117
118
|
key: 1,
|
|
118
|
-
activeWorkspace: e(
|
|
119
|
+
activeWorkspace: e(i),
|
|
119
120
|
workspaces: e(T),
|
|
120
121
|
"onCreate:workspace": a[0] || (a[0] = (u) => e(h).show()),
|
|
121
122
|
"onSelect:workspace": C
|
|
122
123
|
}, null, 8, ["activeWorkspace", "workspaces"])),
|
|
123
|
-
|
|
124
|
+
W("main", ye, [
|
|
124
125
|
l(ve, {
|
|
125
|
-
isSidebarOpen:
|
|
126
|
-
"onUpdate:isSidebarOpen": a[1] || (a[1] = (u) =>
|
|
127
|
-
activeWorkspace: e(
|
|
126
|
+
isSidebarOpen: k.value,
|
|
127
|
+
"onUpdate:isSidebarOpen": a[1] || (a[1] = (u) => k.value = u),
|
|
128
|
+
activeWorkspace: e(i),
|
|
128
129
|
eventBus: e(s),
|
|
129
130
|
isWorkspaceOpen: L.value,
|
|
130
131
|
layout: t.layout,
|
|
131
|
-
sidebarState: e(
|
|
132
|
+
sidebarState: e(m).state,
|
|
132
133
|
sidebarWidth: D.value,
|
|
133
134
|
store: e(o),
|
|
134
135
|
workspaces: e(T),
|
|
135
136
|
"onClick:workspace": R,
|
|
136
137
|
"onCreate:workspace": a[2] || (a[2] = (u) => e(h).show()),
|
|
137
138
|
"onSelect:workspace": C,
|
|
138
|
-
onSelectItem: e(
|
|
139
|
+
onSelectItem: e(m).handleSelectItem,
|
|
139
140
|
"onUpdate:sidebarWidth": N
|
|
140
141
|
}, null, 8, ["isSidebarOpen", "activeWorkspace", "eventBus", "isWorkspaceOpen", "layout", "sidebarState", "sidebarWidth", "store", "workspaces", "onSelectItem"]),
|
|
141
142
|
l(ae, {
|
|
@@ -147,14 +148,14 @@ const he = ["innerHTML"], We = { class: "flex min-h-0 flex-1" }, ye = { class: "
|
|
|
147
148
|
paletteState: e(_),
|
|
148
149
|
workspaceStore: e(o)
|
|
149
150
|
}, null, 8, ["eventBus", "paletteState", "workspaceStore"]),
|
|
150
|
-
|
|
151
|
+
W("div", We, [
|
|
151
152
|
l(e(oe), K(j(H.value)), null, 16)
|
|
152
153
|
])
|
|
153
154
|
])
|
|
154
155
|
]),
|
|
155
156
|
_: 1
|
|
156
157
|
})
|
|
157
|
-
], 64)) : (
|
|
158
|
+
], 64)) : (d(), y(re, { key: 1 }));
|
|
158
159
|
}
|
|
159
160
|
});
|
|
160
161
|
export {
|
|
@@ -3,6 +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-auth-config.js';
|
|
6
7
|
import type { Workspace } from '../../../../v2/features/app/hooks/use-workspace-selector.js';
|
|
7
8
|
import type { ClientPlugin } from '../../../../v2/helpers/plugins.js';
|
|
8
9
|
import type { ClientLayout } from '../../../../v2/types/layout';
|
|
@@ -16,6 +17,7 @@ export type RouteProps = {
|
|
|
16
17
|
method?: HttpMethod;
|
|
17
18
|
exampleName?: string;
|
|
18
19
|
environment: XScalarEnvironment;
|
|
20
|
+
securitySchemes: MergedSecuritySchemes;
|
|
19
21
|
workspaceStore: WorkspaceStore;
|
|
20
22
|
activeWorkspace: Workspace;
|
|
21
23
|
plugins: ClientPlugin[];
|
|
@@ -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;AACnE,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,SAAS,EAAE,MAAM,gDAAgD,CAAA;AAU/E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAExD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,kDAAkD;AAClD,MAAM,MAAM,UAAU,GAAG;IACvB,YAAY,EAAE,MAAM,CAAA;IACpB,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,MAAM,EAAE,YAAY,CAAA;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,UAAU,CAAA;IACnB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,EAAE,kBAAkB,CAAA;IAC/B,cAAc,EAAE,cAAc,CAAA;IAC9B,eAAe,EAAE,SAAS,CAAA;IAC1B,OAAO,EAAE,YAAY,EAAE,CAAA;CAGxB,CAAA;AAED,oCAAoC;AACpC,MAAM,MAAM,eAAe,GAAG,UAAU,GACtC,CACI;IACE,cAAc,EAAE,UAAU,CAAA;IAC1B,QAAQ,EAAE,iBAAiB,CAAA;CAC5B,GACD;IACE,cAAc,EAAE,WAAW,CAAA;IAC3B,QAAQ,EAAE,IAAI,CAAA;CACf,CACJ,CAAA;AAEH,kFAAkF;AAClF,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;oCAVK,UAAU;8BAChB,iBAAiB;;oCAGX,WAAW;8BACjB,IAAI;;oCALE,UAAU;8BAChB,iBAAiB;;oCAGX,WAAW;8BACjB,IAAI;;;;;;;;;;;;;;;gCALE,UAAU;0BAChB,iBAAiB;;gCAGX,WAAW;0BACjB,IAAI;;gCALE,UAAU;0BAChB,iBAAiB;;gCAGX,WAAW;0BACjB,IAAI;;;;;;;;;IAwGM,CAAA"}
|
|
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;AACnE,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,kEAAkE,CAAA;AAC7G,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gDAAgD,CAAA;AAU/E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAExD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,kDAAkD;AAClD,MAAM,MAAM,UAAU,GAAG;IACvB,YAAY,EAAE,MAAM,CAAA;IACpB,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,MAAM,EAAE,YAAY,CAAA;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,UAAU,CAAA;IACnB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,EAAE,kBAAkB,CAAA;IAC/B,eAAe,EAAE,qBAAqB,CAAA;IACtC,cAAc,EAAE,cAAc,CAAA;IAC9B,eAAe,EAAE,SAAS,CAAA;IAC1B,OAAO,EAAE,YAAY,EAAE,CAAA;CAGxB,CAAA;AAED,oCAAoC;AACpC,MAAM,MAAM,eAAe,GAAG,UAAU,GACtC,CACI;IACE,cAAc,EAAE,UAAU,CAAA;IAC1B,QAAQ,EAAE,iBAAiB,CAAA;CAC5B,GACD;IACE,cAAc,EAAE,WAAW,CAAA;IAC3B,QAAQ,EAAE,IAAI,CAAA;CACf,CACJ,CAAA;AAEH,kFAAkF;AAClF,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;oCAVK,UAAU;8BAChB,iBAAiB;;oCAGX,WAAW;8BACjB,IAAI;;oCALE,UAAU;8BAChB,iBAAiB;;oCAGX,WAAW;8BACjB,IAAI;;;;;;;;;;;;;;;gCALE,UAAU;0BAChB,iBAAiB;;gCAGX,WAAW;0BACjB,IAAI;;gCALE,UAAU;0BAChB,iBAAiB;;gCAGX,WAAW;0BACjB,IAAI;;;;;;;;;IAwGM,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-workspace-client-app-events.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/hooks/use-workspace-client-app-events.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAwC,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAoD7G,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAA;AAClF,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,GAAG,EAAW,MAAM,KAAK,CAAA;AAGzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAA;AAClF,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,+DAA+D,CAAA;AAEjH;;GAEG;AACH,eAAO,MAAM,2BAA2B,GAAI,2FAOzC;IACD,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,QAAQ,EAAE,WAAW,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAA;IAC/C,cAAc,EAAE,GAAG,CAAC,cAAc,GAAG,IAAI,CAAC,CAAA;IAC1C,aAAa,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IAC3B,mBAAmB,EAAE,4BAA4B,CAAA;IACjD,YAAY,EAAE,mBAAmB,CAAA;CAClC,
|
|
1
|
+
{"version":3,"file":"use-workspace-client-app-events.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/hooks/use-workspace-client-app-events.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAwC,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAoD7G,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAA;AAClF,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,GAAG,EAAW,MAAM,KAAK,CAAA;AAGzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAA;AAClF,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,+DAA+D,CAAA;AAEjH;;GAEG;AACH,eAAO,MAAM,2BAA2B,GAAI,2FAOzC;IACD,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,QAAQ,EAAE,WAAW,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAA;IAC/C,cAAc,EAAE,GAAG,CAAC,cAAc,GAAG,IAAI,CAAC,CAAA;IAC1C,aAAa,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IAC3B,mBAAmB,EAAE,4BAA4B,CAAA;IACjD,YAAY,EAAE,mBAAmB,CAAA;CAClC,SAyWA,CAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { mergeObjects as
|
|
2
|
-
import { updateActiveProxy as
|
|
1
|
+
import { mergeObjects as g } from "@scalar/workspace-store/helpers/merge-object";
|
|
2
|
+
import { updateActiveProxy as x, updateColorMode as y, updateTheme as T, updateSelectedClient as w, updateDocumentIcon as R, toggleSecurity as O, updateWatchMode as N, createEmptyDocument as C, deleteDocument as E, upsertEnvironment as q, upsertEnvironmentVariable as P, upsertCookie as I, deleteCookie as k, deleteSecurityScheme as A, updateSelectedAuthTab as M, updateSecurityScheme as D, updateSelectedScopes as F, updateSelectedSecuritySchemes as U, addServer as V, updateServer as K, deleteServer as L, updateServerVariables as W, updateSelectedServer as j, createOperation as z, updateOperationPathMethod as G, updateOperationSummary as H, deleteOperation as J, deleteOperationExample as Q, addOperationParameter as S, updateOperationParameter as X, deleteOperationParameter as Y, deleteAllOperationParameters as Z, updateOperationRequestBodyContentType as _, updateOperationRequestBodyExample as $, addOperationRequestBodyFormRow as B, updateOperationRequestBodyFormRow as ee, deleteOperationRequestBodyFormRow as ae, createTag as te, deleteTag as oe, addTab as re, closeTab as ne, closeOtherTabs as le, focusTab as ie, focusLastTab as ue, navigatePreviousTab as pe, navigateNextTab as ce, updateTabs as me } from "@scalar/workspace-store/mutators";
|
|
3
3
|
import { toValue as f } from "vue";
|
|
4
4
|
import { useRouter as de, useRoute as se } from "vue-router";
|
|
5
|
-
const
|
|
5
|
+
const ge = ({
|
|
6
6
|
eventBus: a,
|
|
7
7
|
document: t,
|
|
8
8
|
workspaceStore: o,
|
|
@@ -10,7 +10,7 @@ const xe = ({
|
|
|
10
10
|
commandPaletteState: s,
|
|
11
11
|
sidebarState: v
|
|
12
12
|
}) => {
|
|
13
|
-
const
|
|
13
|
+
const i = de(), u = se(), c = (e, r) => {
|
|
14
14
|
const n = f(o);
|
|
15
15
|
return n ? r === "document" ? e.value : n.workspace : null;
|
|
16
16
|
}, l = async () => {
|
|
@@ -18,8 +18,8 @@ const xe = ({
|
|
|
18
18
|
if (!e)
|
|
19
19
|
return;
|
|
20
20
|
const r = e.workspace["x-scalar-active-tab"] ?? 0, n = e.workspace["x-scalar-tabs"]?.[r];
|
|
21
|
-
n && await
|
|
22
|
-
},
|
|
21
|
+
n && await i.replace(n.path);
|
|
22
|
+
}, p = (e) => {
|
|
23
23
|
e && o.value?.buildSidebar(e);
|
|
24
24
|
}, m = (e) => {
|
|
25
25
|
const r = t.value?.["x-scalar-navigation"]?.name;
|
|
@@ -31,42 +31,42 @@ const xe = ({
|
|
|
31
31
|
method: e.method,
|
|
32
32
|
example: e.exampleKey
|
|
33
33
|
});
|
|
34
|
-
(!n || n.type !== "example") &&
|
|
34
|
+
(!n || n.type !== "example") && p(r);
|
|
35
35
|
}, h = ({
|
|
36
36
|
documentName: e,
|
|
37
37
|
path: r,
|
|
38
38
|
method: n,
|
|
39
39
|
exampleName: b
|
|
40
|
-
}) => !(e !== void 0 && e !==
|
|
40
|
+
}) => !(e !== void 0 && e !== u.params.documentSlug || r !== void 0 && encodeURIComponent(r) !== u.params.pathEncoded || n !== void 0 && n !== u.params.method || b !== void 0 && b !== u.params.exampleName);
|
|
41
41
|
a.on("scroll-to:nav-item", ({ id: e }) => v.handleSelectItem(e)), a.on(
|
|
42
42
|
"workspace:update:active-proxy",
|
|
43
|
-
(e) =>
|
|
43
|
+
(e) => x(o.value?.workspace ?? null, e)
|
|
44
44
|
), a.on(
|
|
45
45
|
"workspace:update:color-mode",
|
|
46
46
|
(e) => y(o.value?.workspace ?? null, e)
|
|
47
47
|
), a.on("workspace:update:theme", (e) => T(o.value?.workspace ?? null, e)), a.on(
|
|
48
48
|
"workspace:update:selected-client",
|
|
49
49
|
(e) => w(o.value?.workspace, e)
|
|
50
|
-
), a.on("document:update:icon", (e) => R(t.value, e)), a.on("document:update:info", (e) => t.value &&
|
|
51
|
-
E(o.value, e),
|
|
50
|
+
), a.on("document:update:icon", (e) => R(t.value, e)), a.on("document:update:info", (e) => t.value && g(t.value.info, e)), a.on("document:toggle:security", () => O(t.value)), a.on("document:update:watch-mode", (e) => N(t.value, e)), a.on("document:create:empty-document", (e) => C(o.value, e)), a.on("document:delete:document", async (e) => {
|
|
51
|
+
E(o.value, e), u.params.documentSlug === e.name && await i.push({
|
|
52
52
|
name: "workspace.environment"
|
|
53
53
|
});
|
|
54
54
|
}), a.on("environment:upsert:environment", (e) => {
|
|
55
55
|
o.value && q(t.value, o.value.workspace, e);
|
|
56
56
|
}), a.on(
|
|
57
57
|
"environment:delete:environment",
|
|
58
|
-
({ environmentName: e, collectionType: r }) => delete
|
|
58
|
+
({ environmentName: e, collectionType: r }) => delete c(t, r)?.["x-scalar-environments"]?.[e]
|
|
59
59
|
), a.on("environment:upsert:environment-variable", (e) => {
|
|
60
|
-
const r =
|
|
60
|
+
const r = c(t, e.collectionType);
|
|
61
61
|
P(r, e);
|
|
62
62
|
}), a.on(
|
|
63
63
|
"environment:delete:environment-variable",
|
|
64
|
-
({ environmentName: e, index: r, collectionType: n }) =>
|
|
64
|
+
({ environmentName: e, index: r, collectionType: n }) => c(t, n)?.["x-scalar-environments"]?.[e]?.variables?.splice(r, 1)
|
|
65
65
|
), a.on("cookie:upsert:cookie", (e) => {
|
|
66
|
-
const r =
|
|
66
|
+
const r = c(t, e.collectionType);
|
|
67
67
|
I(r, e);
|
|
68
68
|
}), a.on("cookie:delete:cookie", (e) => {
|
|
69
|
-
const r =
|
|
69
|
+
const r = c(t, e.collectionType);
|
|
70
70
|
k(r, e);
|
|
71
71
|
}), a.on("auth:delete:security-scheme", (e) => A(t.value, e)), a.on("auth:update:active-index", (e) => M(t.value, e)), a.on("auth:update:security-scheme", (e) => D(t.value, e)), a.on("auth:update:selected-scopes", (e) => F(t.value, e)), a.on(
|
|
72
72
|
"auth:update:selected-security-schemes",
|
|
@@ -74,33 +74,33 @@ const xe = ({
|
|
|
74
74
|
), a.on("server:add:server", () => V(t.value)), a.on("server:update:server", (e) => K(t.value, e)), a.on("server:delete:server", (e) => L(t.value, e)), a.on("server:update:variables", (e) => W(t.value, e)), a.on("server:update:selected", (e) => j(t.value, e)), a.on("operation:create:operation", (e) => z(o.value, e)), a.on(
|
|
75
75
|
"operation:update:pathMethod",
|
|
76
76
|
(e) => G(t.value, o.value, e, async (r) => {
|
|
77
|
-
r === "success" && (await
|
|
77
|
+
r === "success" && (await i.replace({
|
|
78
78
|
name: "example",
|
|
79
79
|
params: {
|
|
80
80
|
method: e.payload.method,
|
|
81
81
|
pathEncoded: encodeURIComponent(e.payload.path),
|
|
82
|
-
exampleName:
|
|
82
|
+
exampleName: u.params.exampleName
|
|
83
83
|
}
|
|
84
|
-
}),
|
|
84
|
+
}), p(t.value?.["x-scalar-navigation"]?.name)), e.callback(r);
|
|
85
85
|
})
|
|
86
86
|
), a.on("operation:update:summary", (e) => H(t.value, e)), a.on("operation:delete:operation", async (e) => {
|
|
87
|
-
J(o.value, e),
|
|
87
|
+
J(o.value, e), p(e.documentName), h({
|
|
88
88
|
documentName: e.documentName,
|
|
89
89
|
path: e.meta.path,
|
|
90
90
|
method: e.meta.method
|
|
91
|
-
}) && await
|
|
91
|
+
}) && await i.replace({
|
|
92
92
|
name: "document.overview",
|
|
93
93
|
params: {
|
|
94
94
|
documentSlug: e.documentName
|
|
95
95
|
}
|
|
96
96
|
});
|
|
97
97
|
}), a.on("operation:delete:example", async (e) => {
|
|
98
|
-
Q(o.value, e),
|
|
98
|
+
Q(o.value, e), p(e.documentName), h({
|
|
99
99
|
documentName: e.documentName,
|
|
100
100
|
path: e.meta.path,
|
|
101
101
|
method: e.meta.method,
|
|
102
102
|
exampleName: e.meta.exampleKey
|
|
103
|
-
}) && await
|
|
103
|
+
}) && await i.replace({
|
|
104
104
|
name: "example",
|
|
105
105
|
params: {
|
|
106
106
|
pathEncoded: encodeURIComponent(e.meta.path),
|
|
@@ -127,15 +127,15 @@ const xe = ({
|
|
|
127
127
|
"operation:delete:requestBody:formRow",
|
|
128
128
|
(e) => ae(t.value, e)
|
|
129
129
|
), a.on("tag:create:tag", (e) => {
|
|
130
|
-
te(o.value, e),
|
|
130
|
+
te(o.value, e), p(e.documentName);
|
|
131
131
|
}), a.on("tag:delete:tag", (e) => {
|
|
132
|
-
oe(o.value, e),
|
|
132
|
+
oe(o.value, e), p(e.documentName);
|
|
133
133
|
}), a.on("ui:toggle:sidebar", () => d.value = !d.value), a.on(
|
|
134
134
|
"ui:open:command-palette",
|
|
135
135
|
(e) => {
|
|
136
136
|
e ? s.open(e.action, e.payload) : s.open();
|
|
137
137
|
}
|
|
138
|
-
), a.on("tabs:add:tab", async (e) => {
|
|
138
|
+
), a.on("ui:route:page", ({ name: e }) => i.push({ name: e })), a.on("tabs:add:tab", async (e) => {
|
|
139
139
|
re(o.value?.workspace ?? null, e), await l();
|
|
140
140
|
}), a.on("tabs:close:tab", async (e) => {
|
|
141
141
|
ne(o.value?.workspace ?? null, e), await l();
|
|
@@ -144,13 +144,13 @@ const xe = ({
|
|
|
144
144
|
}), a.on("tabs:focus:tab-last", async (e) => {
|
|
145
145
|
ue(o.value?.workspace ?? null, e), await l();
|
|
146
146
|
}), a.on("tabs:navigate:previous", async (e) => {
|
|
147
|
-
ce(o.value?.workspace ?? null, e), await l();
|
|
148
|
-
}), a.on("tabs:navigate:next", async (e) => {
|
|
149
147
|
pe(o.value?.workspace ?? null, e), await l();
|
|
148
|
+
}), a.on("tabs:navigate:next", async (e) => {
|
|
149
|
+
ce(o.value?.workspace ?? null, e), await l();
|
|
150
150
|
}), a.on("tabs:update:tabs", async (e) => {
|
|
151
151
|
me(o.value?.workspace ?? null, e), await l();
|
|
152
152
|
});
|
|
153
153
|
};
|
|
154
154
|
export {
|
|
155
|
-
|
|
155
|
+
ge as useWorkspaceClientAppEvents
|
|
156
156
|
};
|
|
@@ -8,7 +8,7 @@ import k from "./components/Tabs.vue.js";
|
|
|
8
8
|
const V = { class: "custom-scroll h-full" }, B = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "w-full md:mx-auto md:max-w-[720px]"
|
|
11
|
-
}, C = ["aria-label"], D = { class: "flex flex-row items-center gap-2" }, N = { class: "group relative ml-1.25" },
|
|
11
|
+
}, C = ["aria-label"], D = { class: "flex flex-row items-center gap-2" }, N = { class: "group relative ml-1.25" }, S = { class: "px-1.5 py-8" }, I = {
|
|
12
12
|
key: 1,
|
|
13
13
|
class: "flex w-full flex-1 items-center justify-center"
|
|
14
14
|
}, U = {
|
|
@@ -24,6 +24,7 @@ const V = { class: "custom-scroll h-full" }, B = {
|
|
|
24
24
|
method: {},
|
|
25
25
|
exampleName: {},
|
|
26
26
|
environment: {},
|
|
27
|
+
securitySchemes: {},
|
|
27
28
|
workspaceStore: {},
|
|
28
29
|
activeWorkspace: {},
|
|
29
30
|
plugins: {}
|
|
@@ -72,7 +73,7 @@ const V = { class: "custom-scroll h-full" }, B = {
|
|
|
72
73
|
])
|
|
73
74
|
], 8, C),
|
|
74
75
|
o(k, { type: "document" }),
|
|
75
|
-
e("div",
|
|
76
|
+
e("div", S, [
|
|
76
77
|
o(m(y), null, {
|
|
77
78
|
default: c(({ Component: l }) => [
|
|
78
79
|
(n(), x(v(l), _(s, { collectionType: "document" }), null, 16))
|
|
@@ -80,7 +81,7 @@ const V = { class: "custom-scroll h-full" }, B = {
|
|
|
80
81
|
_: 1
|
|
81
82
|
})
|
|
82
83
|
])
|
|
83
|
-
])) : (n(), r("div",
|
|
84
|
+
])) : (n(), r("div", I, [...t[2] || (t[2] = [
|
|
84
85
|
e("div", { class: "flex h-full flex-col items-center justify-center" }, [
|
|
85
86
|
e("h1", { class: "text-2xl font-bold" }, "Document not found"),
|
|
86
87
|
e("p", { class: "text-gray-500" }, " The document you are looking for does not exist. ")
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as l, createElementBlock as r, openBlock as n, createElementVNode as e, createVNode as
|
|
1
|
+
import { defineComponent as l, createElementBlock as r, openBlock as n, createElementVNode as e, createVNode as t, unref as s, toDisplayString as i, mergeProps as m } from "vue";
|
|
2
2
|
import { ScalarIconGlobe as p } from "@scalar/icons";
|
|
3
3
|
import { RouterView as d } from "vue-router";
|
|
4
4
|
import u from "./components/Tabs.vue.js";
|
|
@@ -14,26 +14,27 @@ const _ = { class: "custom-scroll h-full" }, f = { class: "w-full md:mx-auto md:
|
|
|
14
14
|
method: {},
|
|
15
15
|
exampleName: {},
|
|
16
16
|
environment: {},
|
|
17
|
+
securitySchemes: {},
|
|
17
18
|
workspaceStore: {},
|
|
18
19
|
activeWorkspace: {},
|
|
19
20
|
plugins: {}
|
|
20
21
|
},
|
|
21
22
|
setup(a) {
|
|
22
23
|
const c = a;
|
|
23
|
-
return (
|
|
24
|
+
return (o, g) => (n(), r("div", _, [
|
|
24
25
|
e("div", f, [
|
|
25
26
|
e("div", {
|
|
26
|
-
"aria-label": `title: ${
|
|
27
|
+
"aria-label": `title: ${o.activeWorkspace.name}`,
|
|
27
28
|
class: "mx-auto flex h-fit w-full flex-col gap-2 pt-6 pb-3 md:mx-auto md:max-w-[720px]"
|
|
28
29
|
}, [
|
|
29
|
-
|
|
30
|
+
t(s(p), { class: "text-c-2 size-6" }),
|
|
30
31
|
e("div", h, [
|
|
31
|
-
e("span", v, i(
|
|
32
|
+
e("span", v, i(o.activeWorkspace.name), 1)
|
|
32
33
|
])
|
|
33
34
|
], 8, x),
|
|
34
|
-
|
|
35
|
+
t(u, { type: "workspace" }),
|
|
35
36
|
e("div", k, [
|
|
36
|
-
|
|
37
|
+
t(s(d), m(c, { collectionType: "workspace" }), null, 16)
|
|
37
38
|
])
|
|
38
39
|
])
|
|
39
40
|
]));
|
|
@@ -1 +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":";;;;;;;;;;;;;AAgOA,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-dc159f6f"]]);
|
|
5
5
|
export {
|
|
6
6
|
c as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as u, computed as l, createElementBlock as m, openBlock as d, createElementVNode as n, createVNode as r, unref as
|
|
1
|
+
import { defineComponent as u, computed as l, createElementBlock as m, openBlock as d, createElementVNode as n, createVNode as r, unref as i, normalizeClass as a } from "vue";
|
|
2
2
|
import { ScalarToggle as p } from "@scalar/components";
|
|
3
3
|
import v from "../../../blocks/scalar-auth-selector-block/components/AuthSelector.vue.js";
|
|
4
4
|
const y = { class: "flex flex-col gap-4" }, f = { class: "flex flex-col gap-2" }, h = { class: "flex h-8 items-center justify-between" }, b = /* @__PURE__ */ u({
|
|
@@ -12,6 +12,7 @@ const y = { class: "flex flex-col gap-4" }, f = { class: "flex flex-col gap-2" }
|
|
|
12
12
|
method: {},
|
|
13
13
|
exampleName: {},
|
|
14
14
|
environment: {},
|
|
15
|
+
securitySchemes: {},
|
|
15
16
|
workspaceStore: {},
|
|
16
17
|
activeWorkspace: {},
|
|
17
18
|
plugins: {},
|
|
@@ -29,7 +30,7 @@ const y = { class: "flex flex-col gap-4" }, f = { class: "flex flex-col gap-2" }
|
|
|
29
30
|
n("div", f, [
|
|
30
31
|
n("div", h, [
|
|
31
32
|
t[1] || (t[1] = n("h3", { class: "font-bold" }, "Authentication", -1)),
|
|
32
|
-
r(
|
|
33
|
+
r(i(p), {
|
|
33
34
|
class: "w-4",
|
|
34
35
|
modelValue: s.value,
|
|
35
36
|
"onUpdate:modelValue": t[0] || (t[0] = () => e.eventBus.emit("document:toggle:security"))
|
|
@@ -38,10 +39,10 @@ const y = { class: "flex flex-col gap-4" }, f = { class: "flex flex-col gap-2" }
|
|
|
38
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))
|
|
39
40
|
]),
|
|
40
41
|
n("div", {
|
|
41
|
-
class:
|
|
42
|
+
class: a(!s.value && "cursor-not-allowed")
|
|
42
43
|
}, [
|
|
43
|
-
r(
|
|
44
|
-
class:
|
|
44
|
+
r(i(v), {
|
|
45
|
+
class: a([
|
|
45
46
|
"scalar-collection-auth !border-none",
|
|
46
47
|
!s.value && "pointer-events-none opacity-50 mix-blend-luminosity"
|
|
47
48
|
]),
|
|
@@ -51,7 +52,7 @@ const y = { class: "flex flex-col gap-4" }, f = { class: "flex flex-col gap-2" }
|
|
|
51
52
|
meta: { type: "document" },
|
|
52
53
|
proxyUrl: e.workspaceStore.workspace["x-scalar-active-proxy"] ?? "",
|
|
53
54
|
securityRequirements: e.document?.security ?? [],
|
|
54
|
-
securitySchemes: e.
|
|
55
|
+
securitySchemes: e.securitySchemes,
|
|
55
56
|
selectedSecurity: e.document?.["x-scalar-selected-security"],
|
|
56
57
|
server: c.value,
|
|
57
58
|
title: "Authentication"
|