@scalar/api-client 2.36.1 → 2.36.2
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 +36 -0
- package/dist/monacoeditorwork/editor.worker.bundle.js +14463 -0
- package/dist/monacoeditorwork/json.worker.bundle.js +22211 -0
- package/dist/monacoeditorwork/yaml.worker.bundle.js +46771 -0
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.js +12 -11
- package/dist/v2/blocks/request-block/helpers/get-default-headers.js +1 -1
- package/dist/v2/components/resize/index.d.ts +1 -0
- package/dist/v2/components/resize/index.d.ts.map +1 -1
- package/dist/v2/components/resize/index.js +4 -2
- package/dist/v2/components/resize/use-split-resize.d.ts +27 -0
- package/dist/v2/components/resize/use-split-resize.d.ts.map +1 -0
- package/dist/v2/components/resize/use-split-resize.js +57 -0
- 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 +71 -63
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts +7 -1
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts.map +1 -1
- package/dist/v2/features/app/helpers/create-api-client-app.js +15 -10
- package/dist/v2/features/app/helpers/routes.d.ts +6 -0
- package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
- package/dist/v2/features/app/helpers/routes.js +3 -2
- package/dist/v2/features/app/hooks/use-document-watcher.js +13 -13
- package/dist/v2/features/collection/DocumentCollection.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/DocumentCollection.vue.js +292 -100
- package/dist/v2/features/collection/DocumentCollection.vue3.js +5 -0
- package/dist/v2/features/collection/OperationCollection.vue.js +20 -19
- package/dist/v2/features/collection/WorkspaceCollection.vue.js +6 -5
- package/dist/v2/features/collection/components/Authentication.vue2.js +16 -15
- package/dist/v2/features/collection/components/Cookies.vue.js +7 -6
- package/dist/v2/features/collection/components/Editor/Editor.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Editor/Editor.vue.js +3 -3
- package/dist/v2/features/collection/components/Editor/Editor.vue2.js +182 -171
- package/dist/v2/features/collection/components/Editor/hooks/use-editor-state.d.ts +2 -1
- package/dist/v2/features/collection/components/Editor/hooks/use-editor-state.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Environment.vue.js +13 -12
- package/dist/v2/features/collection/components/Overview.vue2.js +7 -6
- package/dist/v2/features/collection/components/Servers.vue.js +64 -63
- package/dist/v2/features/collection/components/Settings.vue.js +8 -7
- package/dist/v2/features/collection/components/SyncConflictResolutionEditor.vue.d.ts +18 -0
- package/dist/v2/features/collection/components/SyncConflictResolutionEditor.vue.d.ts.map +1 -0
- package/dist/v2/features/collection/components/SyncConflictResolutionEditor.vue.js +7 -0
- package/dist/v2/features/collection/components/SyncConflictResolutionEditor.vue2.js +136 -0
- package/dist/v2/features/editor/config.d.ts +16 -0
- package/dist/v2/features/editor/config.d.ts.map +1 -0
- package/dist/v2/features/editor/config.js +16 -0
- package/dist/v2/features/editor/helpers/configure-language-support.d.ts +13 -0
- package/dist/v2/features/editor/helpers/configure-language-support.d.ts.map +1 -0
- package/dist/v2/features/{collection/components/Editor → editor}/helpers/configure-language-support.js +6 -7
- package/dist/v2/features/editor/helpers/ensure-monaco-environment.d.ts.map +1 -0
- package/dist/v2/features/{collection/components/Editor → editor}/helpers/ensure-monaco-environment.js +9 -12
- package/dist/v2/features/editor/helpers/json/create-json-model.d.ts +12 -0
- package/dist/v2/features/editor/helpers/json/create-json-model.d.ts.map +1 -0
- package/dist/v2/features/editor/helpers/json/create-json-model.js +19 -0
- package/dist/v2/features/editor/helpers/json/get-json-ast-node-from-path.d.ts.map +1 -0
- package/dist/v2/features/editor/helpers/json/json-ast.d.ts.map +1 -0
- package/dist/v2/features/editor/helpers/json/json-pointer-links.d.ts.map +1 -0
- package/dist/v2/features/editor/helpers/json/json-pointer-path.d.ts.map +1 -0
- package/dist/v2/features/editor/helpers/json/json-pointer-path.js +21 -0
- package/dist/v2/features/editor/helpers/model.d.ts +9 -0
- package/dist/v2/features/editor/helpers/model.d.ts.map +1 -0
- package/dist/v2/features/editor/helpers/range-to-whole-line.d.ts +14 -0
- package/dist/v2/features/editor/helpers/range-to-whole-line.d.ts.map +1 -0
- package/dist/v2/features/editor/helpers/range-to-whole-line.js +8 -0
- package/dist/v2/features/editor/helpers/theme/apply-scalar-theme.d.ts.map +1 -0
- package/dist/v2/features/editor/helpers/theme/load-css-variables.d.ts.map +1 -0
- package/dist/v2/features/editor/helpers/yaml/create-yaml-model.d.ts +13 -0
- package/dist/v2/features/editor/helpers/yaml/create-yaml-model.d.ts.map +1 -0
- package/dist/v2/features/editor/helpers/yaml/create-yaml-model.js +19 -0
- package/dist/v2/features/{collection/components/Editor/helpers → editor/helpers/yaml}/get-yaml-node-range-from-path.d.ts +2 -2
- package/dist/v2/features/editor/helpers/yaml/get-yaml-node-range-from-path.d.ts.map +1 -0
- package/dist/v2/features/editor/hooks/use-editor-markers.d.ts.map +1 -0
- package/dist/v2/features/editor/hooks/use-editor.d.ts +39 -0
- package/dist/v2/features/editor/hooks/use-editor.d.ts.map +1 -0
- package/dist/v2/features/editor/hooks/use-editor.js +107 -0
- package/dist/v2/features/editor/hooks/use-json-pointer-link-support.d.ts +16 -0
- package/dist/v2/features/editor/hooks/use-json-pointer-link-support.d.ts.map +1 -0
- package/dist/v2/features/editor/hooks/use-json-pointer-link-support.js +27 -0
- package/dist/v2/features/editor/hooks/use-three-way-merge-editor.d.ts +77 -0
- package/dist/v2/features/editor/hooks/use-three-way-merge-editor.d.ts.map +1 -0
- package/dist/v2/features/editor/hooks/use-three-way-merge-editor.js +316 -0
- package/dist/v2/features/editor/index.d.ts +5 -0
- package/dist/v2/features/editor/index.d.ts.map +1 -0
- package/dist/v2/features/editor/index.js +10 -0
- package/dist/v2/features/operation/Operation.vue.js +18 -17
- package/dist/v2/types/configuration.d.ts +11 -0
- package/dist/v2/types/configuration.d.ts.map +1 -0
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +24 -18
- package/dist/assets/yaml.worker-CcQnAKCg.js +0 -490
- package/dist/v2/features/collection/DocumentCollection.vue2.js +0 -4
- package/dist/v2/features/collection/components/Editor/helpers/apply-scalar-theme.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Editor/helpers/configure-language-support.d.ts +0 -7
- package/dist/v2/features/collection/components/Editor/helpers/configure-language-support.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Editor/helpers/ensure-monaco-environment.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Editor/helpers/get-json-ast-node-from-path.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Editor/helpers/get-yaml-node-range-from-path.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Editor/helpers/json-ast.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Editor/helpers/json-pointer-links.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Editor/helpers/json-pointer-path.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Editor/helpers/json-pointer-path.js +0 -20
- package/dist/v2/features/collection/components/Editor/helpers/load-css-variables.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Editor/helpers/yaml.worker.d.ts +0 -2
- package/dist/v2/features/collection/components/Editor/helpers/yaml.worker.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Editor/helpers/yaml.worker.js +0 -11
- package/dist/v2/features/collection/components/Editor/hooks/use-editor-markers.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Editor/hooks/use-editor.d.ts +0 -39
- package/dist/v2/features/collection/components/Editor/hooks/use-editor.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Editor/hooks/use-editor.js +0 -153
- /package/dist/v2/features/{collection/components/Editor → editor}/helpers/ensure-monaco-environment.d.ts +0 -0
- /package/dist/v2/features/{collection/components/Editor/helpers → editor/helpers/json}/get-json-ast-node-from-path.d.ts +0 -0
- /package/dist/v2/features/{collection/components/Editor/helpers → editor/helpers/json}/get-json-ast-node-from-path.js +0 -0
- /package/dist/v2/features/{collection/components/Editor/helpers → editor/helpers/json}/json-ast.d.ts +0 -0
- /package/dist/v2/features/{collection/components/Editor/helpers → editor/helpers/json}/json-ast.js +0 -0
- /package/dist/v2/features/{collection/components/Editor/helpers → editor/helpers/json}/json-pointer-links.d.ts +0 -0
- /package/dist/v2/features/{collection/components/Editor/helpers → editor/helpers/json}/json-pointer-links.js +0 -0
- /package/dist/v2/features/{collection/components/Editor/helpers → editor/helpers/json}/json-pointer-path.d.ts +0 -0
- /package/dist/v2/features/{collection/components/Editor/helpers → editor/helpers/theme}/apply-scalar-theme.d.ts +0 -0
- /package/dist/v2/features/{collection/components/Editor/helpers → editor/helpers/theme}/apply-scalar-theme.js +0 -0
- /package/dist/v2/features/{collection/components/Editor/helpers → editor/helpers/theme}/load-css-variables.d.ts +0 -0
- /package/dist/v2/features/{collection/components/Editor/helpers → editor/helpers/theme}/load-css-variables.js +0 -0
- /package/dist/v2/features/{collection/components/Editor/helpers → editor/helpers/yaml}/get-yaml-node-range-from-path.js +0 -0
- /package/dist/v2/features/{collection/components/Editor → editor}/hooks/use-editor-markers.d.ts +0 -0
- /package/dist/v2/features/{collection/components/Editor → editor}/hooks/use-editor-markers.js +0 -0
- /package/dist/v2/features/{collection/components/Editor → editor}/schemas/openapi-3.1-schema.json.js +0 -0
|
@@ -4,8 +4,8 @@ import { isHttpMethod as B } from "@scalar/helpers/http/is-http-method";
|
|
|
4
4
|
import { ScalarIconPencil as C } from "@scalar/icons";
|
|
5
5
|
import E from "../../../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
|
|
6
6
|
import y from "../../settings/components/Section.vue.js";
|
|
7
|
-
import
|
|
8
|
-
const
|
|
7
|
+
import F from "../../../components/code-input/CodeInput.vue.js";
|
|
8
|
+
const H = { class: "flex flex-col gap-8" }, L = { class: "has-focus-visible:bg-b-1 group rounded-lg" }, W = {
|
|
9
9
|
key: 1,
|
|
10
10
|
class: "text-c-3 flex items-center justify-center rounded-lg border p-4"
|
|
11
11
|
}, P = { class: "flex items-center justify-between gap-4 rounded-lg p-4" }, Z = { class: "min-w-0 flex-1" }, q = { class: "bg-b-2 flex items-center justify-between gap-4 rounded-lg border border-(--scalar-background-3) p-4 text-sm" }, _ = /* @__PURE__ */ V({
|
|
@@ -26,6 +26,7 @@ const L = { class: "flex flex-col gap-8" }, W = { class: "has-focus-visible:bg-b
|
|
|
26
26
|
customThemes: {},
|
|
27
27
|
currentTheme: {},
|
|
28
28
|
isDarkMode: { type: Boolean },
|
|
29
|
+
fetchRegistryDocument: { type: Function },
|
|
29
30
|
collectionType: {}
|
|
30
31
|
},
|
|
31
32
|
setup(e) {
|
|
@@ -59,7 +60,7 @@ const L = { class: "flex flex-col gap-8" }, W = { class: "has-focus-visible:bg-b
|
|
|
59
60
|
}), u.hide());
|
|
60
61
|
};
|
|
61
62
|
return (i, t) => (r(), d(m, null, [
|
|
62
|
-
o("div",
|
|
63
|
+
o("div", H, [
|
|
63
64
|
a(y, null, {
|
|
64
65
|
title: l(() => [...t[5] || (t[5] = [
|
|
65
66
|
f("Description", -1)
|
|
@@ -84,7 +85,7 @@ const L = { class: "flex flex-col gap-8" }, W = { class: "has-focus-visible:bg-b
|
|
|
84
85
|
})) : w("", !0)
|
|
85
86
|
]),
|
|
86
87
|
default: l(() => [
|
|
87
|
-
o("div",
|
|
88
|
+
o("div", L, [
|
|
88
89
|
g.value === "preview" ? (r(), d(m, { key: 0 }, [
|
|
89
90
|
h.value.trim().length ? (r(), d(m, { key: 0 }, [
|
|
90
91
|
a(n(R), {
|
|
@@ -94,7 +95,7 @@ const L = { class: "flex flex-col gap-8" }, W = { class: "has-focus-visible:bg-b
|
|
|
94
95
|
onDblclick: t[1] || (t[1] = (c) => s("edit"))
|
|
95
96
|
}, null, 8, ["value"]),
|
|
96
97
|
t[7] || (t[7] = o("div", { class: "brightness-lifted bg-b-1 absolute inset-0 -z-1 hidden rounded group-hover:block group-has-focus-visible:hidden" }, null, -1))
|
|
97
|
-
], 64)) : (r(), d("div",
|
|
98
|
+
], 64)) : (r(), d("div", W, [
|
|
98
99
|
a(n(p), {
|
|
99
100
|
class: "hover:bg-b-2 hover:text-c-1 text-c-2 flex items-center gap-2",
|
|
100
101
|
size: "sm",
|
|
@@ -111,7 +112,7 @@ const L = { class: "flex flex-col gap-8" }, W = { class: "has-focus-visible:bg-b
|
|
|
111
112
|
_: 1
|
|
112
113
|
})
|
|
113
114
|
]))
|
|
114
|
-
], 64)) : (r(), T(n(
|
|
115
|
+
], 64)) : (r(), T(n(F), {
|
|
115
116
|
key: 1,
|
|
116
117
|
ref_key: "codeInputRef",
|
|
117
118
|
ref: k,
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { defineComponent as L, ref as T, computed as h, watchEffect as E, createElementBlock as v, openBlock as i, Fragment as b, createVNode as
|
|
1
|
+
import { defineComponent as L, ref as T, computed as h, watchEffect as E, createElementBlock as v, openBlock as i, Fragment as b, createVNode as n, createSlots as F, withCtx as u, createElementVNode as r, normalizeClass as U, renderList as j, createBlock as M, unref as s, toDisplayString as W, createCommentVNode as H, createTextVNode as d } from "vue";
|
|
2
2
|
import { useModal as q, ScalarMarkdown as G, ScalarButton as O, ScalarToggle as J, ScalarModal as K } from "@scalar/components";
|
|
3
3
|
import { debounce as Q } from "@scalar/helpers/general/debounce";
|
|
4
|
-
import { isHttpMethod as
|
|
4
|
+
import { isHttpMethod as D } from "@scalar/helpers/http/is-http-method";
|
|
5
5
|
import { ScalarIconTrash as X, ScalarIconPlus as Y } from "@scalar/icons";
|
|
6
6
|
import { getResolvedRef as Z } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
7
7
|
import _ from "../../../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
|
|
8
8
|
import ee from "../../settings/components/Section.vue.js";
|
|
9
9
|
import te from "./Form.vue.js";
|
|
10
|
-
import
|
|
11
|
-
const
|
|
10
|
+
import re from "../../../../components/Server/ServerVariablesForm.vue.js";
|
|
11
|
+
const le = { class: "flex h-8 items-center" }, oe = { class: "flex flex-col gap-4" }, ae = { class: "bg-b-2 flex items-center justify-between rounded-t-lg px-3 py-1 text-sm" }, ne = {
|
|
12
12
|
key: 1,
|
|
13
13
|
class: "self-center"
|
|
14
|
-
},
|
|
14
|
+
}, se = { class: "divide-0 flex w-full flex-col divide-y rounded-b-lg text-sm" }, ie = { class: "text-c-3 flex h-full items-center justify-center rounded-lg border p-4" }, ge = /* @__PURE__ */ L({
|
|
15
15
|
__name: "Servers",
|
|
16
16
|
props: {
|
|
17
17
|
documentSlug: {},
|
|
@@ -29,14 +29,15 @@ const re = { class: "flex h-8 items-center" }, ae = { class: "flex flex-col gap-
|
|
|
29
29
|
customThemes: {},
|
|
30
30
|
currentTheme: {},
|
|
31
31
|
isDarkMode: { type: Boolean },
|
|
32
|
+
fetchRegistryDocument: { type: Function },
|
|
32
33
|
collectionType: {}
|
|
33
34
|
},
|
|
34
35
|
setup(t) {
|
|
35
|
-
const g = q(), c = T(-1), m = h(() => t.collectionType === "operation"), S = h(() => !m.value || !t.path || !
|
|
36
|
+
const g = q(), c = T(-1), m = h(() => t.collectionType === "operation"), S = h(() => !m.value || !t.path || !D(t.method) ? null : Z(t.document?.paths?.[t.path]?.[t.method])), f = T(!1);
|
|
36
37
|
E(() => {
|
|
37
38
|
f.value = S.value?.servers !== void 0;
|
|
38
39
|
});
|
|
39
|
-
const k = h(() => t.collectionType === "operation" && S.value ? S.value.servers ?? [] : t.document?.servers ?? []),
|
|
40
|
+
const k = h(() => t.collectionType === "operation" && S.value ? S.value.servers ?? [] : t.document?.servers ?? []), C = h(() => k.value[c.value]), a = h(() => t.collectionType === "operation" && t.path && D(t.method) ? { type: "operation", path: t.path, method: t.method } : { type: "document" }), N = [
|
|
40
41
|
{
|
|
41
42
|
label: "URL",
|
|
42
43
|
key: "url",
|
|
@@ -47,121 +48,121 @@ const re = { class: "flex h-8 items-center" }, ae = { class: "flex flex-col gap-
|
|
|
47
48
|
key: "description",
|
|
48
49
|
placeholder: "Production"
|
|
49
50
|
}
|
|
50
|
-
],
|
|
51
|
-
c.value =
|
|
51
|
+
], R = (l) => {
|
|
52
|
+
c.value = l, g.show();
|
|
52
53
|
}, w = () => {
|
|
53
54
|
g.hide(), c.value = -1;
|
|
54
|
-
},
|
|
55
|
+
}, V = () => {
|
|
55
56
|
c.value < 0 || (t.eventBus.emit("server:delete:server", {
|
|
56
57
|
index: c.value,
|
|
57
|
-
meta:
|
|
58
|
+
meta: a.value
|
|
58
59
|
}), w());
|
|
59
|
-
}, { execute: $ } = Q({ delay: 328, maxWait: 1e3 }), A = (
|
|
60
|
-
`${
|
|
60
|
+
}, { execute: $ } = Q({ delay: 328, maxWait: 1e3 }), A = (l, e, o) => $(
|
|
61
|
+
`${l}-${e}-${a.value.type}`,
|
|
61
62
|
() => t.eventBus.emit("server:update:server", {
|
|
62
|
-
index:
|
|
63
|
-
server: { [e]:
|
|
64
|
-
meta:
|
|
63
|
+
index: l,
|
|
64
|
+
server: { [e]: o },
|
|
65
|
+
meta: a.value
|
|
65
66
|
})
|
|
66
|
-
), I = (
|
|
67
|
-
`${
|
|
67
|
+
), I = (l, e, o) => $(
|
|
68
|
+
`${l}-${e}-${a.value.type}`,
|
|
68
69
|
() => t.eventBus.emit("server:update:variables", {
|
|
69
|
-
index:
|
|
70
|
+
index: l,
|
|
70
71
|
key: e,
|
|
71
|
-
value:
|
|
72
|
-
meta:
|
|
72
|
+
value: o,
|
|
73
|
+
meta: a.value
|
|
73
74
|
})
|
|
74
|
-
), z = () => t.eventBus.emit("server:add:server", { meta:
|
|
75
|
-
if (
|
|
76
|
-
return f.value =
|
|
77
|
-
meta:
|
|
78
|
-
}) : t.eventBus.emit("server:clear:servers", { meta:
|
|
75
|
+
), z = () => t.eventBus.emit("server:add:server", { meta: a.value }), B = (l, e = 0) => l?.description || `Server ${e + 1}`, P = (l) => {
|
|
76
|
+
if (a.value.type === "operation")
|
|
77
|
+
return f.value = l, l ? t.eventBus.emit("server:initialize:servers", {
|
|
78
|
+
meta: a.value
|
|
79
|
+
}) : t.eventBus.emit("server:clear:servers", { meta: a.value });
|
|
79
80
|
};
|
|
80
|
-
return (
|
|
81
|
-
|
|
81
|
+
return (l, e) => (i(), v(b, null, [
|
|
82
|
+
n(ee, null, F({
|
|
82
83
|
title: u(() => [
|
|
83
84
|
e[0] || (e[0] = d("Servers", -1))
|
|
84
85
|
]),
|
|
85
86
|
description: u(() => [
|
|
86
87
|
m.value ? (i(), v(b, { key: 0 }, [
|
|
87
|
-
e[1] || (e[1] =
|
|
88
|
-
e[2] || (e[2] =
|
|
89
|
-
|
|
88
|
+
e[1] || (e[1] = r("span", { class: "block" }, " Override servers for this operation with the toggle. ", -1)),
|
|
89
|
+
e[2] || (e[2] = r("span", { class: "mt-1 block" }, [
|
|
90
|
+
r("strong", null, "On"),
|
|
90
91
|
d(" — Servers below apply only to this operation. ")
|
|
91
92
|
], -1)),
|
|
92
|
-
e[3] || (e[3] =
|
|
93
|
-
|
|
93
|
+
e[3] || (e[3] = r("span", { class: "mt-1 block" }, [
|
|
94
|
+
r("strong", null, "Off"),
|
|
94
95
|
d(" — Removes operation servers; this operation uses document or path servers from the OpenAPI spec. ")
|
|
95
96
|
], -1)),
|
|
96
|
-
e[4] || (e[4] =
|
|
97
|
+
e[4] || (e[4] = r("span", { class: "text-c-3 mt-1 block" }, [
|
|
97
98
|
d(" Use "),
|
|
98
|
-
|
|
99
|
+
r("code", { class: "font-code text-c-2" }, "{variables}"),
|
|
99
100
|
d(" for dynamic URL parts. ")
|
|
100
101
|
], -1))
|
|
101
102
|
], 64)) : (i(), v(b, { key: 1 }, [
|
|
102
103
|
e[5] || (e[5] = d(" Add different base URLs for your API. Use ", -1)),
|
|
103
|
-
e[6] || (e[6] =
|
|
104
|
+
e[6] || (e[6] = r("code", { class: "font-code text-c-2" }, "{variables}", -1)),
|
|
104
105
|
e[7] || (e[7] = d(" for dynamic parts. ", -1))
|
|
105
106
|
], 64))
|
|
106
107
|
]),
|
|
107
108
|
default: u(() => [
|
|
108
|
-
|
|
109
|
+
r("div", {
|
|
109
110
|
class: U(m.value && !f.value && "cursor-not-allowed")
|
|
110
111
|
}, [
|
|
111
|
-
|
|
112
|
+
r("div", {
|
|
112
113
|
class: U([
|
|
113
114
|
"flex flex-col gap-4",
|
|
114
115
|
m.value && !f.value && "pointer-events-none cursor-not-allowed opacity-50 mix-blend-luminosity"
|
|
115
116
|
])
|
|
116
117
|
}, [
|
|
117
|
-
|
|
118
|
-
(i(!0), v(b, null,
|
|
118
|
+
r("div", oe, [
|
|
119
|
+
(i(!0), v(b, null, j(k.value, (o, p) => (i(), v("div", {
|
|
119
120
|
key: p,
|
|
120
121
|
class: "rounded-lg border"
|
|
121
122
|
}, [
|
|
122
|
-
|
|
123
|
-
|
|
123
|
+
r("div", ae, [
|
|
124
|
+
o.description ? (i(), M(s(G), {
|
|
124
125
|
key: 0,
|
|
125
126
|
class: "self-center",
|
|
126
|
-
value:
|
|
127
|
-
}, null, 8, ["value"])) : (i(), v("span",
|
|
128
|
-
s(
|
|
127
|
+
value: o.description
|
|
128
|
+
}, null, 8, ["value"])) : (i(), v("span", ne, W(B(o, p)), 1)),
|
|
129
|
+
n(s(O), {
|
|
129
130
|
class: "hover:bg-b-3 hover:text-c-1 h-fit p-1.25",
|
|
130
131
|
"data-testid": "delete-server-button",
|
|
131
132
|
variant: "ghost",
|
|
132
|
-
onClick: (y) =>
|
|
133
|
+
onClick: (y) => R(p)
|
|
133
134
|
}, {
|
|
134
135
|
default: u(() => [
|
|
135
|
-
s(
|
|
136
|
+
n(s(X), { class: "size-3.5" })
|
|
136
137
|
]),
|
|
137
138
|
_: 1
|
|
138
139
|
}, 8, ["onClick"])
|
|
139
140
|
]),
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
data:
|
|
141
|
+
r("div", se, [
|
|
142
|
+
n(te, {
|
|
143
|
+
data: o,
|
|
143
144
|
environment: t.environment,
|
|
144
145
|
onUpdate: (y, x) => A(p, y, x),
|
|
145
146
|
options: N
|
|
146
147
|
}, null, 8, ["data", "environment", "onUpdate"]),
|
|
147
|
-
|
|
148
|
+
o.variables ? (i(), M(s(re), {
|
|
148
149
|
key: 0,
|
|
149
|
-
variables:
|
|
150
|
+
variables: o.variables,
|
|
150
151
|
"onUpdate:variable": (y, x) => I(p, y, x)
|
|
151
152
|
}, null, 8, ["variables", "onUpdate:variable"])) : H("", !0)
|
|
152
153
|
])
|
|
153
154
|
]))), 128))
|
|
154
155
|
]),
|
|
155
|
-
|
|
156
|
-
s(
|
|
156
|
+
r("div", ie, [
|
|
157
|
+
n(s(O), {
|
|
157
158
|
class: "hover:bg-b-2 hover:text-c-1 flex items-center gap-2",
|
|
158
159
|
size: "sm",
|
|
159
160
|
variant: "ghost",
|
|
160
161
|
onClick: z
|
|
161
162
|
}, {
|
|
162
163
|
default: u(() => [
|
|
163
|
-
s(
|
|
164
|
-
e[8] || (e[8] =
|
|
164
|
+
n(s(Y)),
|
|
165
|
+
e[8] || (e[8] = r("span", null, "Add Server", -1))
|
|
165
166
|
]),
|
|
166
167
|
_: 1
|
|
167
168
|
})
|
|
@@ -174,8 +175,8 @@ const re = { class: "flex h-8 items-center" }, ae = { class: "flex flex-col gap-
|
|
|
174
175
|
m.value ? {
|
|
175
176
|
name: "actions",
|
|
176
177
|
fn: u(() => [
|
|
177
|
-
|
|
178
|
-
s(
|
|
178
|
+
r("div", le, [
|
|
179
|
+
n(s(J), {
|
|
179
180
|
class: "w-4",
|
|
180
181
|
modelValue: f.value,
|
|
181
182
|
"onUpdate:modelValue": P
|
|
@@ -185,17 +186,17 @@ const re = { class: "flex h-8 items-center" }, ae = { class: "flex flex-col gap-
|
|
|
185
186
|
key: "0"
|
|
186
187
|
} : void 0
|
|
187
188
|
]), 1024),
|
|
188
|
-
s(
|
|
189
|
+
n(s(K), {
|
|
189
190
|
size: "xxs",
|
|
190
|
-
state:
|
|
191
|
-
title: `Delete ${B(
|
|
191
|
+
state: s(g),
|
|
192
|
+
title: `Delete ${B(C.value, c.value)}`
|
|
192
193
|
}, {
|
|
193
194
|
default: u(() => [
|
|
194
|
-
|
|
195
|
+
n(_, {
|
|
195
196
|
variableName: "Server",
|
|
196
197
|
warningMessage: "Are you sure you want to delete this server? This action cannot be undone.",
|
|
197
198
|
onClose: w,
|
|
198
|
-
onDelete:
|
|
199
|
+
onDelete: V
|
|
199
200
|
})
|
|
200
201
|
]),
|
|
201
202
|
_: 1
|
|
@@ -2,7 +2,7 @@ import { defineComponent as d, createBlock as a, openBlock as n, unref as o } fr
|
|
|
2
2
|
import { getActiveProxyUrl as i } from "../../../helpers/get-active-proxy-url.js";
|
|
3
3
|
import s from "../../settings/DocumentSettings.vue.js";
|
|
4
4
|
import h from "../../settings/CollectionSettings.vue.js";
|
|
5
|
-
const
|
|
5
|
+
const x = /* @__PURE__ */ d({
|
|
6
6
|
__name: "Settings",
|
|
7
7
|
props: {
|
|
8
8
|
documentSlug: {},
|
|
@@ -20,16 +20,17 @@ const f = /* @__PURE__ */ d({
|
|
|
20
20
|
customThemes: {},
|
|
21
21
|
currentTheme: {},
|
|
22
22
|
isDarkMode: { type: Boolean },
|
|
23
|
+
fetchRegistryDocument: { type: Function },
|
|
23
24
|
collectionType: {}
|
|
24
25
|
},
|
|
25
26
|
setup(e) {
|
|
26
27
|
const m = (t) => {
|
|
27
28
|
e.eventBus.emit("document:update:watch-mode", t);
|
|
28
|
-
},
|
|
29
|
+
}, u = (t) => {
|
|
29
30
|
e.eventBus.emit("workspace:update:theme", t);
|
|
30
31
|
}, r = (t) => {
|
|
31
32
|
e.eventBus.emit("workspace:update:active-proxy", t);
|
|
32
|
-
},
|
|
33
|
+
}, l = (t) => {
|
|
33
34
|
e.eventBus.emit("workspace:update:color-mode", t);
|
|
34
35
|
};
|
|
35
36
|
return (t, c) => e.collectionType === "document" ? (n(), a(o(s), {
|
|
@@ -38,7 +39,7 @@ const f = /* @__PURE__ */ d({
|
|
|
38
39
|
isDraftDocument: e.documentSlug === "drafts",
|
|
39
40
|
title: e.document?.info.title ?? "",
|
|
40
41
|
watchMode: e.document?.["x-scalar-watch-mode"],
|
|
41
|
-
"onDelete:document": c[0] || (c[0] = (
|
|
42
|
+
"onDelete:document": c[0] || (c[0] = (y) => e.eventBus.emit("document:delete:document", { name: e.documentSlug })),
|
|
42
43
|
"onUpdate:watchMode": m
|
|
43
44
|
}, null, 8, ["documentUrl", "isDraftDocument", "title", "watchMode"])) : (n(), a(o(h), {
|
|
44
45
|
key: 1,
|
|
@@ -49,12 +50,12 @@ const f = /* @__PURE__ */ d({
|
|
|
49
50
|
activeThemeSlug: e.workspaceStore.workspace["x-scalar-theme"] ?? "none",
|
|
50
51
|
colorMode: e.workspaceStore.workspace["x-scalar-color-mode"] ?? "system",
|
|
51
52
|
customThemes: e.customThemes,
|
|
52
|
-
"onUpdate:colorMode":
|
|
53
|
+
"onUpdate:colorMode": l,
|
|
53
54
|
"onUpdate:proxyUrl": r,
|
|
54
|
-
"onUpdate:themeSlug":
|
|
55
|
+
"onUpdate:themeSlug": u
|
|
55
56
|
}, null, 8, ["activeProxyUrl", "activeThemeSlug", "colorMode", "customThemes"]));
|
|
56
57
|
}
|
|
57
58
|
});
|
|
58
59
|
export {
|
|
59
|
-
|
|
60
|
+
x as default
|
|
60
61
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type merge } from '@scalar/json-magic/diff';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
conflicts: ReturnType<typeof merge>['conflicts'];
|
|
4
|
+
baseDocument: Record<string, unknown>;
|
|
5
|
+
resolvedDocument: Record<string, unknown>;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
|
+
applyChanges: (payload: {
|
|
9
|
+
resolvedDocument: Record<string, unknown>;
|
|
10
|
+
}) => any;
|
|
11
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
12
|
+
onApplyChanges?: ((payload: {
|
|
13
|
+
resolvedDocument: Record<string, unknown>;
|
|
14
|
+
}) => any) | undefined;
|
|
15
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const _default: typeof __VLS_export;
|
|
17
|
+
export default _default;
|
|
18
|
+
//# sourceMappingURL=SyncConflictResolutionEditor.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SyncConflictResolutionEditor.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/collection/components/SyncConflictResolutionEditor.vue"],"names":[],"mappings":"AA0UA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,yBAAyB,CAAA;AAOpD,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,UAAU,CAAC,OAAO,KAAK,CAAC,CAAC,WAAW,CAAC,CAAA;IAChD,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACrC,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAC1C,CAAC;AA+UF,QAAA,MAAM,YAAY;;0BAxUM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;0BAAvB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;kFA2U7C,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { defineComponent as T, ref as l, computed as a, onMounted as V, onUnmounted as A, createElementBlock as B, openBlock as _, Fragment as $, createElementVNode as t, normalizeStyle as f, unref as o, createVNode as R, toDisplayString as C, withCtx as g, createTextVNode as z } from "vue";
|
|
2
|
+
import { ScalarButton as E } from "@scalar/components";
|
|
3
|
+
import { useToasts as j } from "@scalar/use-toasts";
|
|
4
|
+
import { useThreeWayMergeEditor as L } from "../../editor/hooks/use-three-way-merge-editor.js";
|
|
5
|
+
import { useSplitResize as U } from "../../../components/resize/use-split-resize.js";
|
|
6
|
+
const F = { class: "sync-editor-pane border-c-3 mx-1 mb-1 flex min-h-0 flex-1 flex-col overflow-hidden rounded-lg border" }, H = { class: "sync-pane-title text-c-2 border-c-3 flex shrink-0 items-center justify-between border-b px-2 py-1 text-[11px]" }, W = { class: "flex items-center gap-2" }, q = { class: "text-c-2 text-[11px] normal-case" }, G = { class: "flex shrink-0 items-center justify-end gap-2" }, X = /* @__PURE__ */ T({
|
|
7
|
+
__name: "SyncConflictResolutionEditor",
|
|
8
|
+
props: {
|
|
9
|
+
conflicts: {},
|
|
10
|
+
baseDocument: {},
|
|
11
|
+
resolvedDocument: {}
|
|
12
|
+
},
|
|
13
|
+
emits: ["applyChanges"],
|
|
14
|
+
setup(d, { emit: k }) {
|
|
15
|
+
const w = k, { toast: S } = j(), u = l(), p = l(), m = l(50), c = l(50), { onHorizontalResizeStart: x, onVerticalResizeStart: v, stopActiveResize: D } = U({
|
|
16
|
+
horizontalContainerRef: p,
|
|
17
|
+
verticalContainerRef: u,
|
|
18
|
+
leftPaneSize: c,
|
|
19
|
+
topPaneSize: m,
|
|
20
|
+
horizontalMin: 20,
|
|
21
|
+
horizontalMax: 80,
|
|
22
|
+
verticalMin: 25,
|
|
23
|
+
verticalMax: 75
|
|
24
|
+
}), i = L({
|
|
25
|
+
baseDocument: d.baseDocument,
|
|
26
|
+
resolvedDocument: d.resolvedDocument,
|
|
27
|
+
conflicts: d.conflicts,
|
|
28
|
+
onApplyChanges: (n) => w("applyChanges", { resolvedDocument: n }),
|
|
29
|
+
onError: (n) => S(n, "error")
|
|
30
|
+
}), r = a(() => i.conflictsLeft.value), P = a(() => ({ height: `${m.value}%` })), M = a(() => ({ width: `${c.value}%` })), N = a(() => ({
|
|
31
|
+
width: `${100 - c.value}%`
|
|
32
|
+
})), y = l(), b = l(), h = l();
|
|
33
|
+
return V(() => {
|
|
34
|
+
const n = y.value, e = b.value, s = h.value;
|
|
35
|
+
n && e && s && i.init({
|
|
36
|
+
local: n,
|
|
37
|
+
remote: e,
|
|
38
|
+
result: s
|
|
39
|
+
});
|
|
40
|
+
}), A(() => {
|
|
41
|
+
D(), i.dispose();
|
|
42
|
+
}), (n, e) => (_(), B($, null, [
|
|
43
|
+
e[7] || (e[7] = t("p", { class: "text-c-2 text-xs" }, " Resolve conflicts inline in the full document editor. Use the buttons inside the editor for each conflict. ", -1)),
|
|
44
|
+
t("div", {
|
|
45
|
+
ref_key: "splitContainerRef",
|
|
46
|
+
ref: u,
|
|
47
|
+
class: "flex min-h-0 flex-1 flex-col overflow-hidden"
|
|
48
|
+
}, [
|
|
49
|
+
t("div", {
|
|
50
|
+
ref_key: "topEditorsRowRef",
|
|
51
|
+
ref: p,
|
|
52
|
+
class: "flex min-h-0 gap-1 p-1",
|
|
53
|
+
style: f(P.value)
|
|
54
|
+
}, [
|
|
55
|
+
t("div", {
|
|
56
|
+
class: "sync-editor-pane border-c-3 flex min-h-0 flex-col overflow-hidden rounded-lg border",
|
|
57
|
+
style: f(M.value)
|
|
58
|
+
}, [
|
|
59
|
+
e[2] || (e[2] = t("div", { class: "sync-pane-title text-c-2 border-c-3 shrink-0 border-b px-2 py-1 text-[11px]" }, " Current ", -1)),
|
|
60
|
+
t("div", {
|
|
61
|
+
ref_key: "localChangesEditorRef",
|
|
62
|
+
ref: y,
|
|
63
|
+
class: "min-h-0 flex-1"
|
|
64
|
+
}, null, 512)
|
|
65
|
+
], 4),
|
|
66
|
+
t("button", {
|
|
67
|
+
"aria-label": "Resize current and remote editors",
|
|
68
|
+
class: "resize-handle resize-handle-col",
|
|
69
|
+
type: "button",
|
|
70
|
+
onPointerdown: e[0] || (e[0] = //@ts-ignore
|
|
71
|
+
(...s) => o(x) && o(x)(...s))
|
|
72
|
+
}, null, 32),
|
|
73
|
+
t("div", {
|
|
74
|
+
class: "sync-editor-pane border-c-3 flex min-h-0 flex-col overflow-hidden rounded-lg border",
|
|
75
|
+
style: f(N.value)
|
|
76
|
+
}, [
|
|
77
|
+
e[3] || (e[3] = t("div", { class: "sync-pane-title text-c-2 border-c-3 shrink-0 border-b px-2 py-1 text-[11px]" }, " Remote ", -1)),
|
|
78
|
+
t("div", {
|
|
79
|
+
ref_key: "remoteChangesEditorRef",
|
|
80
|
+
ref: b,
|
|
81
|
+
class: "min-h-0 flex-1"
|
|
82
|
+
}, null, 512)
|
|
83
|
+
], 4)
|
|
84
|
+
], 4),
|
|
85
|
+
t("button", {
|
|
86
|
+
"aria-label": "Resize top and result editors",
|
|
87
|
+
class: "resize-handle resize-handle-row",
|
|
88
|
+
type: "button",
|
|
89
|
+
onPointerdown: e[1] || (e[1] = //@ts-ignore
|
|
90
|
+
(...s) => o(v) && o(v)(...s))
|
|
91
|
+
}, null, 32),
|
|
92
|
+
t("div", F, [
|
|
93
|
+
t("div", H, [
|
|
94
|
+
e[5] || (e[5] = t("span", null, " Result ", -1)),
|
|
95
|
+
t("div", W, [
|
|
96
|
+
t("span", q, C(r.value) + " conflict" + C(r.value === 1 ? "" : "s") + " left ", 1),
|
|
97
|
+
R(o(E), {
|
|
98
|
+
disabled: r.value === 0,
|
|
99
|
+
size: "xs",
|
|
100
|
+
type: "button",
|
|
101
|
+
variant: "outlined",
|
|
102
|
+
onClick: o(i).goToNextConflict
|
|
103
|
+
}, {
|
|
104
|
+
default: g(() => [...e[4] || (e[4] = [
|
|
105
|
+
z(" Next Conflict ", -1)
|
|
106
|
+
])]),
|
|
107
|
+
_: 1
|
|
108
|
+
}, 8, ["disabled", "onClick"])
|
|
109
|
+
])
|
|
110
|
+
]),
|
|
111
|
+
t("div", {
|
|
112
|
+
ref_key: "resultEditorRef",
|
|
113
|
+
ref: h,
|
|
114
|
+
class: "min-h-0 flex-1"
|
|
115
|
+
}, null, 512)
|
|
116
|
+
]),
|
|
117
|
+
t("div", G, [
|
|
118
|
+
R(o(E), {
|
|
119
|
+
disabled: r.value > 0,
|
|
120
|
+
size: "xs",
|
|
121
|
+
type: "button",
|
|
122
|
+
onClick: o(i).applyResolvedConflicts
|
|
123
|
+
}, {
|
|
124
|
+
default: g(() => [...e[6] || (e[6] = [
|
|
125
|
+
z(" Apply changes ", -1)
|
|
126
|
+
])]),
|
|
127
|
+
_: 1
|
|
128
|
+
}, 8, ["disabled", "onClick"])
|
|
129
|
+
])
|
|
130
|
+
], 512)
|
|
131
|
+
], 64));
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
export {
|
|
135
|
+
X as default
|
|
136
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type MaybeRefOrGetter } from 'vue';
|
|
2
|
+
import 'monaco-editor/esm/vs/language/json/monaco.contribution';
|
|
3
|
+
import 'monaco-editor/esm/vs/basic-languages/yaml/yaml.contribution';
|
|
4
|
+
import 'monaco-editor/esm/vs/editor/contrib/folding/browser/folding';
|
|
5
|
+
import 'monaco-editor/esm/vs/editor/contrib/folding/browser/folding.css';
|
|
6
|
+
import 'monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon.css';
|
|
7
|
+
/**
|
|
8
|
+
* Configures the Monaco editor with custom Scala theme settings.
|
|
9
|
+
* Applies the theme whenever the theme or dark mode value changes.
|
|
10
|
+
* In development mode, ensures Monaco environment is configured (worker setup handled by Vite config).
|
|
11
|
+
*/
|
|
12
|
+
export declare const useMonacoEditorConfiguration: ({ theme, darkMode, }: {
|
|
13
|
+
theme: MaybeRefOrGetter<string>;
|
|
14
|
+
darkMode: MaybeRefOrGetter<boolean>;
|
|
15
|
+
}) => void;
|
|
16
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/editor/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,gBAAgB,EAAkB,MAAM,KAAK,CAAA;AAK3D,OAAO,wDAAwD,CAAA;AAC/D,OAAO,6DAA6D,CAAA;AACpE,OAAO,6DAA6D,CAAA;AACpE,OAAO,iEAAiE,CAAA;AACxE,OAAO,mEAAmE,CAAA;AAE1E;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,GAAI,sBAG1C;IACD,KAAK,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAA;IAC/B,QAAQ,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAA;CACpC,KAAG,IAUH,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { watch as i, toValue as o } from "vue";
|
|
2
|
+
import { ensureMonacoEnvironment as a } from "./helpers/ensure-monaco-environment.js";
|
|
3
|
+
import { applyScalarTheme as n } from "./helpers/theme/apply-scalar-theme.js";
|
|
4
|
+
import "monaco-editor/esm/vs/editor/contrib/folding/browser/folding.css";
|
|
5
|
+
import "monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon.css";
|
|
6
|
+
const s = ({
|
|
7
|
+
theme: r,
|
|
8
|
+
darkMode: t
|
|
9
|
+
}) => {
|
|
10
|
+
a(), i([() => o(r), () => o(t)], ([m, e]) => n(m, e), {
|
|
11
|
+
immediate: !0
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
s as useMonacoEditorConfiguration
|
|
16
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configures JSON language support for the given model URI
|
|
3
|
+
*
|
|
4
|
+
* @param globPattern - The glob pattern to match the files to configure language support for
|
|
5
|
+
*/
|
|
6
|
+
export declare const configureJson: (globPattern: string) => void;
|
|
7
|
+
/**
|
|
8
|
+
* Configures YAML language support for the given model URI
|
|
9
|
+
*
|
|
10
|
+
* @param globPattern - The glob pattern to match the files to configure language support for
|
|
11
|
+
*/
|
|
12
|
+
export declare const configureYaml: (globPattern: string) => void;
|
|
13
|
+
//# sourceMappingURL=configure-language-support.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configure-language-support.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/editor/helpers/configure-language-support.ts"],"names":[],"mappings":"AAOA;;;;GAIG;AACH,eAAO,MAAM,aAAa,GAAI,aAAa,MAAM,KAAG,IAoBnD,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,aAAa,GAAI,aAAa,MAAM,KAAG,IAgBnD,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as t from "monaco-editor/esm/vs/editor/editor.api.js";
|
|
2
|
-
import { configureMonacoYaml as
|
|
2
|
+
import { configureMonacoYaml as m } from "monaco-yaml";
|
|
3
3
|
import n from "../schemas/openapi-3.1-schema.json.js";
|
|
4
|
-
const s = "inmemory://model/scalar/openapi-json-schema",
|
|
4
|
+
const s = "inmemory://model/scalar/openapi-json-schema", f = (e) => {
|
|
5
5
|
const o = t.languages.json.jsonDefaults, a = o.diagnosticsOptions, c = [
|
|
6
6
|
...(a.schemas ?? []).filter((i) => i.uri !== s),
|
|
7
7
|
{
|
|
@@ -16,8 +16,8 @@ const s = "inmemory://model/scalar/openapi-json-schema", m = (e) => {
|
|
|
16
16
|
enableSchemaRequest: !1,
|
|
17
17
|
schemas: c
|
|
18
18
|
});
|
|
19
|
-
},
|
|
20
|
-
|
|
19
|
+
}, h = (e) => {
|
|
20
|
+
m(t, {
|
|
21
21
|
enableSchemaRequest: !1,
|
|
22
22
|
validate: !0,
|
|
23
23
|
format: !0,
|
|
@@ -32,9 +32,8 @@ const s = "inmemory://model/scalar/openapi-json-schema", m = (e) => {
|
|
|
32
32
|
}
|
|
33
33
|
]
|
|
34
34
|
});
|
|
35
|
-
}, p = (e) => {
|
|
36
|
-
m(e), u(e);
|
|
37
35
|
};
|
|
38
36
|
export {
|
|
39
|
-
|
|
37
|
+
f as configureJson,
|
|
38
|
+
h as configureYaml
|
|
40
39
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ensure-monaco-environment.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/editor/helpers/ensure-monaco-environment.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,eAAO,MAAM,uBAAuB,QAAO,IAc1C,CAAA"}
|