@scalar/agent-chat 0.9.9 → 0.9.10
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/dist/App.vue.d.ts +6 -6
- package/dist/api.d.ts +8 -8
- package/dist/client-tools/execute-request.d.ts +7 -7
- package/dist/components/ErrorMessage.vue.d.ts +1 -1
- package/dist/components/RequestPreview.vue.d.ts +1 -1
- package/dist/components/ResponseBody/ResponseBody.vue.d.ts +1 -1
- package/dist/components/ResponseBody/ResponseBodyPreview.vue.d.ts +1 -1
- package/dist/components/UploadSection.vue.d.ts +1 -1
- package/dist/entities/error/helpers.d.ts +1 -1
- package/dist/entities/index.d.ts +9 -9
- package/dist/entities/index.js +2 -23
- package/dist/entities/tools/execute-request.d.ts +1 -1
- package/dist/entities-NWeuOkBB.js +28 -0
- package/dist/entities-NWeuOkBB.js.map +1 -0
- package/dist/hooks/use-chat-approvals.d.ts +1 -1
- package/dist/hooks/use-search.d.ts +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2064 -3
- package/dist/index.js.map +1 -0
- package/dist/package.json +3 -5
- package/dist/registry/add-documents-to-store.d.ts +5 -5
- package/dist/state/state.d.ts +7 -7
- package/dist/style.css +2 -1
- package/dist/views/Chat/Messages/AskForAuthentication.vue.d.ts +2 -2
- package/dist/views/Chat/Messages/ExecuteRequestTool.vue.d.ts +2 -2
- package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue.d.ts +2 -2
- package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue.d.ts +2 -2
- package/package.json +15 -17
- package/dist/App.vue.js +0 -43
- package/dist/App.vue2.js +0 -4
- package/dist/Chat.vue.js +0 -55
- package/dist/Chat.vue2.js +0 -4
- package/dist/_virtual/_plugin-vue_export-helper.js +0 -9
- package/dist/api.js +0 -99
- package/dist/client-tools/execute-request.js +0 -98
- package/dist/components/ActionsDropdown.vue.js +0 -7
- package/dist/components/ActionsDropdown.vue2.js +0 -50
- package/dist/components/ApprovalSection.vue.js +0 -7
- package/dist/components/ApprovalSection.vue2.js +0 -33
- package/dist/components/AuthenticationProvided.vue.js +0 -13
- package/dist/components/AuthenticationRequired.vue.js +0 -13
- package/dist/components/AutosendPaused.vue.js +0 -13
- package/dist/components/BuildingRequest.vue.js +0 -24
- package/dist/components/ContextItem.vue.js +0 -7
- package/dist/components/ContextItem.vue2.js +0 -19
- package/dist/components/ErrorMessage.vue.js +0 -7
- package/dist/components/ErrorMessage.vue2.js +0 -25
- package/dist/components/FreeMessagesInfoSection.vue.js +0 -7
- package/dist/components/FreeMessagesInfoSection.vue2.js +0 -51
- package/dist/components/LoadingMiniOpenAPIDoc.vue.js +0 -14
- package/dist/components/LoadingOpenAPISpecsSummary.vue.js +0 -14
- package/dist/components/Logo.vue.js +0 -23
- package/dist/components/PaymentSection.vue.js +0 -7
- package/dist/components/PaymentSection.vue2.js +0 -30
- package/dist/components/RequestApproved.vue.js +0 -13
- package/dist/components/RequestFailed.vue.js +0 -24
- package/dist/components/RequestPreview.vue.js +0 -7
- package/dist/components/RequestPreview.vue2.js +0 -129
- package/dist/components/RequestRejected.vue.js +0 -22
- package/dist/components/RequestSuccess.vue.js +0 -13
- package/dist/components/ResponseBody/ResponseBody.vue.js +0 -41
- package/dist/components/ResponseBody/ResponseBody.vue2.js +0 -4
- package/dist/components/ResponseBody/ResponseBodyInfo.vue.js +0 -14
- package/dist/components/ResponseBody/ResponseBodyPreview.vue.js +0 -7
- package/dist/components/ResponseBody/ResponseBodyPreview.vue2.js +0 -65
- package/dist/components/ResponseBody/ResponseBodyRaw.vue.js +0 -20
- package/dist/components/ResponseBody/ResponseBodyRaw.vue2.js +0 -4
- package/dist/components/ResponseBody/ResponseBodyToggle.vue.js +0 -26
- package/dist/components/ResponseBody/ResponseBodyToggle.vue2.js +0 -4
- package/dist/components/ResponseBody/helpers/media-types.js +0 -129
- package/dist/components/ResponseBody/helpers/process-response-body.js +0 -33
- package/dist/components/SearchPopover.vue.js +0 -7
- package/dist/components/SearchPopover.vue2.js +0 -67
- package/dist/components/Selector.vue.js +0 -67
- package/dist/components/Selector.vue2.js +0 -4
- package/dist/components/SendingRequest.vue.js +0 -24
- package/dist/components/ServerSelector.vue.js +0 -63
- package/dist/components/ServerSelector.vue2.js +0 -4
- package/dist/components/UploadSection.vue.js +0 -7
- package/dist/components/UploadSection.vue2.js +0 -61
- package/dist/consts/urls.js +0 -10
- package/dist/entities/error/constants.js +0 -6
- package/dist/entities/error/helpers.js +0 -9
- package/dist/entities/prompt/constants.js +0 -4
- package/dist/entities/registry/document.js +0 -12
- package/dist/entities/tools/ask-for-authentication.js +0 -8
- package/dist/entities/tools/constants.js +0 -4
- package/dist/entities/tools/execute-request.js +0 -12
- package/dist/entities/tools/get-mini-openapi-spec.js +0 -8
- package/dist/entities/tools/get-openapi-spec-summary.js +0 -4
- package/dist/helpers.js +0 -67
- package/dist/hooks/use-agent-key-documents.js +0 -21
- package/dist/hooks/use-chat-approvals.js +0 -35
- package/dist/hooks/use-chat-error.js +0 -23
- package/dist/hooks/use-chat-pending-client-tool-parts.js +0 -12
- package/dist/hooks/use-chat-scroll.js +0 -16
- package/dist/hooks/use-curated-documents.js +0 -12
- package/dist/hooks/use-search.js +0 -21
- package/dist/hooks/use-signup-link.js +0 -12
- package/dist/hooks/use-term-and-conditions.js +0 -15
- package/dist/hooks/use-upload-tmp-document.js +0 -94
- package/dist/plugins/persistance.js +0 -23
- package/dist/registry/add-documents-to-store.js +0 -44
- package/dist/registry/create-document-name.js +0 -6
- package/dist/state/state.js +0 -200
- package/dist/views/Catalog/Catalog.vue.js +0 -8
- package/dist/views/Catalog/Catalog.vue2.js +0 -70
- package/dist/views/Chat/Chat.vue.js +0 -7
- package/dist/views/Chat/Chat.vue2.js +0 -78
- package/dist/views/Chat/Messages/AskForAuthentication.vue.js +0 -7
- package/dist/views/Chat/Messages/AskForAuthentication.vue2.js +0 -91
- package/dist/views/Chat/Messages/ExecuteRequestTool.vue.js +0 -7
- package/dist/views/Chat/Messages/ExecuteRequestTool.vue2.js +0 -24
- package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue.js +0 -7
- package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue2.js +0 -56
- package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue.js +0 -26
- package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue2.js +0 -4
- package/dist/views/Chat/Messages/Text.vue.js +0 -16
- package/dist/views/Chat/Messages/Text.vue2.js +0 -4
- package/dist/views/Layout.vue.js +0 -7
- package/dist/views/Layout.vue2.js +0 -25
- package/dist/views/PromptForm.vue.js +0 -7
- package/dist/views/PromptForm.vue2.js +0 -254
- package/dist/views/Settings/Auth.vue.js +0 -67
- package/dist/views/Settings/Auth.vue2.js +0 -4
- package/dist/views/Settings/DocSettings.vue.js +0 -7
- package/dist/views/Settings/DocSettings.vue2.js +0 -49
- package/dist/views/Settings/Settings.vue.js +0 -8
- package/dist/views/Settings/Settings.vue2.js +0 -79
- package/dist/views/Start.vue.js +0 -7
- package/dist/views/Start.vue2.js +0 -43
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { defineComponent as d, watch as l, createElementBlock as m, openBlock as a, Fragment as r, createBlock as n, createCommentVNode as i, withCtx as f, createTextVNode as g } from "vue";
|
|
2
|
-
import y from "./ResponseBodyInfo.vue.js";
|
|
3
|
-
import c from "./ResponseBodyPreview.vue.js";
|
|
4
|
-
import s from "./ResponseBodyRaw.vue.js";
|
|
5
|
-
const k = /* @__PURE__ */ d({
|
|
6
|
-
__name: "ResponseBody",
|
|
7
|
-
props: {
|
|
8
|
-
data: {},
|
|
9
|
-
responseBody: {},
|
|
10
|
-
mediaConfig: {},
|
|
11
|
-
display: {}
|
|
12
|
-
},
|
|
13
|
-
setup(e) {
|
|
14
|
-
return l(
|
|
15
|
-
() => e.display,
|
|
16
|
-
(o) => console.log(o)
|
|
17
|
-
), (o, t) => (a(), m(r, null, [
|
|
18
|
-
e.mediaConfig?.raw && e.display === "raw" && e.mediaConfig.language ? (a(), n(s, {
|
|
19
|
-
key: e.responseBody.dataUrl,
|
|
20
|
-
content: e.data,
|
|
21
|
-
language: e.mediaConfig.language
|
|
22
|
-
}, null, 8, ["content", "language"])) : i("", !0),
|
|
23
|
-
e.mediaConfig?.preview && e.display === "preview" ? (a(), n(c, {
|
|
24
|
-
key: e.responseBody.dataUrl,
|
|
25
|
-
alpha: e.mediaConfig.alpha,
|
|
26
|
-
mode: e.mediaConfig.preview,
|
|
27
|
-
src: e.responseBody.dataUrl,
|
|
28
|
-
type: e.responseBody.mimeType?.essence ?? ""
|
|
29
|
-
}, null, 8, ["alpha", "mode", "src", "type"])) : i("", !0),
|
|
30
|
-
!e.mediaConfig?.raw && !e.mediaConfig?.preview ? (a(), n(y, { key: 2 }, {
|
|
31
|
-
default: f(() => [...t[0] || (t[0] = [
|
|
32
|
-
g(" Binary file ", -1)
|
|
33
|
-
])]),
|
|
34
|
-
_: 1
|
|
35
|
-
})) : i("", !0)
|
|
36
|
-
], 64));
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
export {
|
|
40
|
-
k as default
|
|
41
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { createElementBlock as t, openBlock as o, createElementVNode as s, renderSlot as c } from "vue";
|
|
2
|
-
import n from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
const r = {}, d = { class: "flex justify-center px-2 py-3" }, f = { class: "text-c-3 p-2 text-sm" };
|
|
4
|
-
function l(e, _) {
|
|
5
|
-
return o(), t("div", d, [
|
|
6
|
-
s("div", f, [
|
|
7
|
-
c(e.$slots, "default")
|
|
8
|
-
])
|
|
9
|
-
]);
|
|
10
|
-
}
|
|
11
|
-
const p = /* @__PURE__ */ n(r, [["render", l]]);
|
|
12
|
-
export {
|
|
13
|
-
p as default
|
|
14
|
-
};
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { defineComponent as u, ref as d, watch as i, createElementBlock as r, createBlock as c, openBlock as l, normalizeClass as n, createElementVNode as s, withCtx as y, createTextVNode as f } from "vue";
|
|
2
|
-
import m from "./ResponseBodyInfo.vue.js";
|
|
3
|
-
const v = ["src"], k = ["src", "type"], w = ["src", "type"], x = ["data", "type"], $ = /* @__PURE__ */ u({
|
|
4
|
-
__name: "ResponseBodyPreview",
|
|
5
|
-
props: {
|
|
6
|
-
src: {},
|
|
7
|
-
type: {},
|
|
8
|
-
mode: {},
|
|
9
|
-
alpha: { type: Boolean, default: !1 }
|
|
10
|
-
},
|
|
11
|
-
setup(e) {
|
|
12
|
-
const o = d(!1);
|
|
13
|
-
return i(
|
|
14
|
-
() => e.src,
|
|
15
|
-
() => {
|
|
16
|
-
o.value = !1;
|
|
17
|
-
}
|
|
18
|
-
), (B, t) => !o.value && e.src ? (l(), r("div", {
|
|
19
|
-
key: 0,
|
|
20
|
-
class: n(["flex justify-center overflow-auto rounded-b", { "bg-preview p-2": e.alpha }])
|
|
21
|
-
}, [
|
|
22
|
-
e.mode === "image" ? (l(), r("img", {
|
|
23
|
-
key: 0,
|
|
24
|
-
class: n(["h-full max-w-full", { rounded: e.alpha }]),
|
|
25
|
-
src: e.src,
|
|
26
|
-
onError: t[0] || (t[0] = (a) => o.value = !0)
|
|
27
|
-
}, null, 42, v)) : e.mode === "video" ? (l(), r("video", {
|
|
28
|
-
key: 1,
|
|
29
|
-
autoplay: "",
|
|
30
|
-
controls: "",
|
|
31
|
-
width: "100%",
|
|
32
|
-
onError: t[1] || (t[1] = (a) => o.value = !0)
|
|
33
|
-
}, [
|
|
34
|
-
s("source", {
|
|
35
|
-
src: e.src,
|
|
36
|
-
type: e.type
|
|
37
|
-
}, null, 8, k)
|
|
38
|
-
], 32)) : e.mode === "audio" ? (l(), r("audio", {
|
|
39
|
-
key: 2,
|
|
40
|
-
class: "my-12",
|
|
41
|
-
controls: "",
|
|
42
|
-
onError: t[2] || (t[2] = (a) => o.value = !0)
|
|
43
|
-
}, [
|
|
44
|
-
s("source", {
|
|
45
|
-
src: e.src,
|
|
46
|
-
type: e.type
|
|
47
|
-
}, null, 8, w)
|
|
48
|
-
], 32)) : (l(), r("object", {
|
|
49
|
-
key: 3,
|
|
50
|
-
class: "aspect-[4/3] w-full",
|
|
51
|
-
data: e.src,
|
|
52
|
-
type: e.type,
|
|
53
|
-
onError: t[3] || (t[3] = (a) => o.value = !0)
|
|
54
|
-
}, null, 40, x))
|
|
55
|
-
], 2)) : (l(), c(m, { key: 1 }, {
|
|
56
|
-
default: y(() => [...t[4] || (t[4] = [
|
|
57
|
-
f("Preview unavailable", -1)
|
|
58
|
-
])]),
|
|
59
|
-
_: 1
|
|
60
|
-
}));
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
export {
|
|
64
|
-
$ as default
|
|
65
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { defineComponent as o, createBlock as t, openBlock as c, unref as a } from "vue";
|
|
2
|
-
import { ScalarCodeBlock as l } from "@scalar/components";
|
|
3
|
-
const m = /* @__PURE__ */ o({
|
|
4
|
-
__name: "ResponseBodyRaw",
|
|
5
|
-
props: {
|
|
6
|
-
content: {},
|
|
7
|
-
language: {}
|
|
8
|
-
},
|
|
9
|
-
setup(n) {
|
|
10
|
-
const e = n;
|
|
11
|
-
return (r, s) => (c(), t(a(l), {
|
|
12
|
-
class: "codeBlock",
|
|
13
|
-
content: e.content,
|
|
14
|
-
lang: n.language
|
|
15
|
-
}, null, 8, ["content", "lang"]));
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
export {
|
|
19
|
-
m as default
|
|
20
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { defineComponent as d, createElementBlock as i, openBlock as a, createElementVNode as n, withModifiers as r, normalizeClass as l } from "vue";
|
|
2
|
-
const p = { class: "text-c-3 text-xxs -my-1 flex justify-center gap-0.5 rounded p-0.5" }, g = /* @__PURE__ */ d({
|
|
3
|
-
__name: "ResponseBodyToggle",
|
|
4
|
-
props: {
|
|
5
|
-
modelValue: {}
|
|
6
|
-
},
|
|
7
|
-
emits: ["toggle"],
|
|
8
|
-
setup(t, { emit: s }) {
|
|
9
|
-
const o = s;
|
|
10
|
-
return (m, e) => (a(), i("div", p, [
|
|
11
|
-
n("button", {
|
|
12
|
-
class: l(["hover:bg-b-3 rounded px-1", { "bg-b-3 text-c-1 cursor-default": t.modelValue === "preview" }]),
|
|
13
|
-
type: "button",
|
|
14
|
-
onClick: e[0] || (e[0] = r((u) => o("toggle", "preview"), ["stop"]))
|
|
15
|
-
}, " Preview ", 2),
|
|
16
|
-
n("button", {
|
|
17
|
-
class: l(["hover:bg-b-3 rounded px-1", { "bg-b-3 text-c-1 cursor-default": t.modelValue === "raw" }]),
|
|
18
|
-
type: "button",
|
|
19
|
-
onClick: e[1] || (e[1] = r((u) => o("toggle", "raw"), ["stop"]))
|
|
20
|
-
}, " Raw ", 2)
|
|
21
|
-
]));
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
export {
|
|
25
|
-
g as default
|
|
26
|
-
};
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
const i = {
|
|
2
|
-
"application/epub+zip": { extension: ".epub" },
|
|
3
|
-
"application/gzip": { extension: ".gz" },
|
|
4
|
-
"application/java-archive": { extension: ".jar" },
|
|
5
|
-
"application/javascript": { extension: ".js", raw: !0 },
|
|
6
|
-
"application/json": { extension: ".json", raw: !0, language: "json" },
|
|
7
|
-
"application/ld+json": { extension: ".jsonld", raw: !0, language: "json" },
|
|
8
|
-
"application/problem+json": {
|
|
9
|
-
extension: ".json",
|
|
10
|
-
raw: !0,
|
|
11
|
-
language: "json"
|
|
12
|
-
},
|
|
13
|
-
"application/vnd.api+json": {
|
|
14
|
-
extension: ".json",
|
|
15
|
-
raw: !0,
|
|
16
|
-
language: "json"
|
|
17
|
-
},
|
|
18
|
-
"application/dns-json": { extension: ".json", raw: !0, language: "json" },
|
|
19
|
-
"application/msword": { extension: ".doc" },
|
|
20
|
-
"application/octet-stream": { extension: ".bin" },
|
|
21
|
-
"application/ogg": { extension: ".ogx" },
|
|
22
|
-
"application/pdf": { extension: ".pdf", preview: "object" },
|
|
23
|
-
"application/rtf": { extension: ".rtf", raw: !0 },
|
|
24
|
-
"application/vnd.amazon.ebook": { extension: ".azw" },
|
|
25
|
-
"application/vnd.apple.installer+xml": {
|
|
26
|
-
extension: ".mpkg",
|
|
27
|
-
raw: !0,
|
|
28
|
-
language: "xml"
|
|
29
|
-
},
|
|
30
|
-
"application/vnd.mozilla.xul+xml": {
|
|
31
|
-
extension: ".xul",
|
|
32
|
-
raw: !0,
|
|
33
|
-
language: "xml"
|
|
34
|
-
},
|
|
35
|
-
"application/vnd.ms-excel": { extension: ".xls" },
|
|
36
|
-
"application/vnd.ms-fontobject": { extension: ".eot" },
|
|
37
|
-
"application/vnd.ms-powerpoint": { extension: ".ppt" },
|
|
38
|
-
"application/vnd.oasis.opendocument.presentation": { extension: ".odp" },
|
|
39
|
-
"application/vnd.oasis.opendocument.spreadsheet": { extension: ".ods" },
|
|
40
|
-
"application/vnd.oasis.opendocument.text": { extension: ".odt" },
|
|
41
|
-
"application/vnd.openxmlformats-officedocument.presentationml.presentation": {
|
|
42
|
-
extension: ".pptx"
|
|
43
|
-
},
|
|
44
|
-
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
|
|
45
|
-
extension: ".xlsx"
|
|
46
|
-
},
|
|
47
|
-
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": {
|
|
48
|
-
extension: ".docx"
|
|
49
|
-
},
|
|
50
|
-
"application/vnd.rar": { extension: ".rar" },
|
|
51
|
-
"application/vnd.visio": { extension: ".vsd" },
|
|
52
|
-
"application/x-7z-compressed": { extension: ".7z" },
|
|
53
|
-
"application/x-abiword": { extension: ".abw" },
|
|
54
|
-
"application/x-bzip": { extension: ".bz" },
|
|
55
|
-
"application/x-bzip2": { extension: ".bz2" },
|
|
56
|
-
"application/x-cdf": { extension: ".cda" },
|
|
57
|
-
"application/x-csh": { extension: ".csh" },
|
|
58
|
-
"application/x-freearc": { extension: ".arc" },
|
|
59
|
-
"application/x-httpd-php": { extension: ".php", raw: !0 },
|
|
60
|
-
"application/x-sh": { extension: ".sh", raw: !0 },
|
|
61
|
-
"application/x-tar": { extension: ".tar" },
|
|
62
|
-
"application/xhtml+xml": { extension: ".xhtml", raw: !0, language: "html" },
|
|
63
|
-
"application/xml": { extension: ".xml", raw: !0, language: "xml" },
|
|
64
|
-
"application/yaml": { extension: ".yaml", raw: !0, language: "yaml" },
|
|
65
|
-
"application/zip": { extension: ".zip" },
|
|
66
|
-
"audio/aac": { extension: ".aac" },
|
|
67
|
-
"audio/midi": { extension: ".midi" },
|
|
68
|
-
"audio/mpeg": { extension: ".mp3", preview: "audio" },
|
|
69
|
-
"audio/ogg": { extension: ".oga" },
|
|
70
|
-
"audio/wav": { extension: ".wav" },
|
|
71
|
-
"audio/webm": { extension: ".weba" },
|
|
72
|
-
"font/otf": { extension: ".otf" },
|
|
73
|
-
"font/ttf": { extension: ".ttf" },
|
|
74
|
-
"font/woff": { extension: ".woff" },
|
|
75
|
-
"font/woff2": { extension: ".woff2" },
|
|
76
|
-
"image/apng": { extension: ".apng", preview: "image", alpha: !0 },
|
|
77
|
-
"image/avif": { extension: ".avif", preview: "image" },
|
|
78
|
-
"image/bmp": { extension: ".bmp", preview: "image" },
|
|
79
|
-
"image/gif": { extension: ".gif", preview: "image", alpha: !0 },
|
|
80
|
-
"image/jpeg": { extension: ".jpg", preview: "image" },
|
|
81
|
-
"image/png": { extension: ".png", preview: "image", alpha: !0 },
|
|
82
|
-
"image/svg+xml": {
|
|
83
|
-
extension: ".svg",
|
|
84
|
-
raw: !0,
|
|
85
|
-
language: "xml",
|
|
86
|
-
preview: "image",
|
|
87
|
-
alpha: !0
|
|
88
|
-
},
|
|
89
|
-
"image/tiff": { extension: ".tiff" },
|
|
90
|
-
"image/vnd.microsoft.icon": { extension: ".ico", preview: "image" },
|
|
91
|
-
"image/webp": { extension: ".webp", preview: "image", alpha: !0 },
|
|
92
|
-
"text/calendar": { extension: ".ics", raw: !0 },
|
|
93
|
-
"text/css": { extension: ".css", raw: !0, language: "css" },
|
|
94
|
-
"text/csv": { extension: ".csv", raw: !0 },
|
|
95
|
-
"text/html": {
|
|
96
|
-
extension: ".html",
|
|
97
|
-
raw: !0,
|
|
98
|
-
language: "html",
|
|
99
|
-
preview: "object"
|
|
100
|
-
},
|
|
101
|
-
"text/javascript": { extension: ".js", raw: !0 },
|
|
102
|
-
"text/plain": { extension: ".txt", raw: !0 },
|
|
103
|
-
"text/xml": { extension: ".xml", raw: !0, language: "xml" },
|
|
104
|
-
"text/yaml": { extension: ".yaml", raw: !0, language: "yaml" },
|
|
105
|
-
"video/3gpp": { extension: ".3gp" },
|
|
106
|
-
"audio/3gpp": { extension: ".3gp" },
|
|
107
|
-
"video/3gpp2": { extension: ".3g2" },
|
|
108
|
-
"audio/3gpp2": { extension: ".3g2" },
|
|
109
|
-
"video/mp2t": { extension: ".ts" },
|
|
110
|
-
"video/mp4": { extension: ".mp4", preview: "video" },
|
|
111
|
-
"video/mpeg": { extension: ".mpeg" },
|
|
112
|
-
"video/ogg": { extension: ".ogv" },
|
|
113
|
-
"video/webm": { extension: ".webm", preview: "video" },
|
|
114
|
-
"video/x-msvideo": { extension: ".avi" }
|
|
115
|
-
};
|
|
116
|
-
function t(e) {
|
|
117
|
-
const n = i[e];
|
|
118
|
-
if (n)
|
|
119
|
-
return n;
|
|
120
|
-
if (e.endsWith("+json"))
|
|
121
|
-
return {
|
|
122
|
-
extension: ".json",
|
|
123
|
-
raw: !0,
|
|
124
|
-
language: "json"
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
export {
|
|
128
|
-
t as getMediaTypeConfig
|
|
129
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import m from "whatwg-mimetype";
|
|
2
|
-
const a = (e) => {
|
|
3
|
-
try {
|
|
4
|
-
return decodeURIComponent(e);
|
|
5
|
-
} catch {
|
|
6
|
-
return e;
|
|
7
|
-
}
|
|
8
|
-
};
|
|
9
|
-
function f(e) {
|
|
10
|
-
let t = "";
|
|
11
|
-
if (e) {
|
|
12
|
-
const n = e.match(/filename\*=UTF-8''([^;]+)/)?.[1] ?? e.match(/filename\s*=\s*"?([^";]+)"?/)?.[1];
|
|
13
|
-
n && (t = a(n.trim()));
|
|
14
|
-
}
|
|
15
|
-
return t;
|
|
16
|
-
}
|
|
17
|
-
const l = (e) => e instanceof Blob, p = (e) => e ? Object.keys(e).map((t) => ({
|
|
18
|
-
name: t,
|
|
19
|
-
value: e[t] ?? ""
|
|
20
|
-
})) : [];
|
|
21
|
-
function y({ data: e, headers: t }) {
|
|
22
|
-
const n = p(t), c = n.find((r) => r.name.toLowerCase() === "content-type"), o = c?.value ? new m(c.value) : void 0, i = f(
|
|
23
|
-
n.find((r) => r.name.toLowerCase() === "content-disposition")?.value ?? ""
|
|
24
|
-
), s = l(e) ? URL.createObjectURL(e) : typeof e == "string" ? URL.createObjectURL(new Blob([e], { type: o ? o.toString() : void 0 })) : e instanceof Object && Object.keys(e).length ? URL.createObjectURL(
|
|
25
|
-
new Blob([JSON.stringify(e)], {
|
|
26
|
-
type: o ? o.toString() : void 0
|
|
27
|
-
})
|
|
28
|
-
) : "";
|
|
29
|
-
return { mimeType: o, attachmentFilename: i, dataUrl: s };
|
|
30
|
-
}
|
|
31
|
-
export {
|
|
32
|
-
y as processResponseBody
|
|
33
|
-
};
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { defineComponent as d, computed as i, createBlock as f, openBlock as s, unref as o, withCtx as c, renderSlot as h, createVNode as m, createElementBlock as r, Fragment as _, renderList as g, createCommentVNode as y, createElementVNode as v, toDisplayString as k } from "vue";
|
|
2
|
-
import { ScalarPopover as I, ScalarTextInput as S } from "@scalar/components";
|
|
3
|
-
import { ScalarIconMagnifyingGlass as V } from "@scalar/icons";
|
|
4
|
-
import { useSearch as x } from "../hooks/use-search.js";
|
|
5
|
-
import { useState as C } from "../state/state.js";
|
|
6
|
-
const N = ["onClick"], P = ["src"], b = {
|
|
7
|
-
key: 1,
|
|
8
|
-
class: "searchResultsEmpty"
|
|
9
|
-
}, w = /* @__PURE__ */ d({
|
|
10
|
-
__name: "SearchPopover",
|
|
11
|
-
setup(A) {
|
|
12
|
-
const n = C(), l = x(), u = i(
|
|
13
|
-
() => l.results.value.filter(
|
|
14
|
-
(e) => !n.registryDocuments.value.some(
|
|
15
|
-
(a) => a.namespace === e.namespace && a.slug === e.slug
|
|
16
|
-
)
|
|
17
|
-
).map((e) => ({
|
|
18
|
-
...e,
|
|
19
|
-
label: e.title,
|
|
20
|
-
id: e.id
|
|
21
|
-
}))
|
|
22
|
-
);
|
|
23
|
-
return (e, a) => (s(), f(o(I), {
|
|
24
|
-
offset: 0,
|
|
25
|
-
placement: "top-start",
|
|
26
|
-
resize: "",
|
|
27
|
-
style: { width: "220px" }
|
|
28
|
-
}, {
|
|
29
|
-
popover: c(({ close: p }) => [
|
|
30
|
-
m(o(S), {
|
|
31
|
-
autofocus: "",
|
|
32
|
-
class: "searchInput",
|
|
33
|
-
modelValue: o(l).query.value,
|
|
34
|
-
placeholder: "Add an API",
|
|
35
|
-
"onUpdate:modelValue": a[0] || (a[0] = (t) => o(l).query.value = t ?? "")
|
|
36
|
-
}, {
|
|
37
|
-
prefix: c(() => [
|
|
38
|
-
m(o(V), { class: "searchIcon" })
|
|
39
|
-
]),
|
|
40
|
-
_: 1
|
|
41
|
-
}, 8, ["modelValue"]),
|
|
42
|
-
u.value.length ? (s(!0), r(_, { key: 0 }, g(u.value, (t) => (s(), r("button", {
|
|
43
|
-
key: t.id,
|
|
44
|
-
class: "searchItem",
|
|
45
|
-
type: "button",
|
|
46
|
-
onClick: () => {
|
|
47
|
-
o(n).addDocument(t), p();
|
|
48
|
-
}
|
|
49
|
-
}, [
|
|
50
|
-
t.logoUrl ? (s(), r("img", {
|
|
51
|
-
key: 0,
|
|
52
|
-
class: "searchItemLogo",
|
|
53
|
-
src: t.logoUrl
|
|
54
|
-
}, null, 8, P)) : y("", !0),
|
|
55
|
-
v("span", null, k(t.title), 1)
|
|
56
|
-
], 8, N))), 128)) : (s(), r("span", b, " No APIs found "))
|
|
57
|
-
]),
|
|
58
|
-
default: c(() => [
|
|
59
|
-
h(e.$slots, "default", {}, void 0, !0)
|
|
60
|
-
]),
|
|
61
|
-
_: 3
|
|
62
|
-
}));
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
export {
|
|
66
|
-
w as default
|
|
67
|
-
};
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { defineComponent as g, computed as s, createBlock as S, createElementBlock as w, openBlock as u, unref as n, withCtx as i, createVNode as d, createElementVNode as a, toDisplayString as c } from "vue";
|
|
2
|
-
import { ScalarListbox as b, ScalarButton as h } from "@scalar/components";
|
|
3
|
-
import { ScalarIconCaretDown as y } from "@scalar/icons";
|
|
4
|
-
const V = { class: "overflow-x-auto" }, k = {
|
|
5
|
-
key: 1,
|
|
6
|
-
class: "text-c-1 flex h-auto w-full items-center gap-0.75 rounded-b-lg px-3 py-1.5 text-base leading-[20px] whitespace-nowrap"
|
|
7
|
-
}, B = { class: "overflow-x-auto" }, E = /* @__PURE__ */ g({
|
|
8
|
-
__name: "Selector",
|
|
9
|
-
props: {
|
|
10
|
-
selectedServer: {},
|
|
11
|
-
servers: {},
|
|
12
|
-
target: {}
|
|
13
|
-
},
|
|
14
|
-
emits: ["update:modelValue"],
|
|
15
|
-
setup(e, { expose: p, emit: m }) {
|
|
16
|
-
const v = m, o = s(
|
|
17
|
-
() => e.servers.map((r) => ({
|
|
18
|
-
id: r.url,
|
|
19
|
-
label: r.url
|
|
20
|
-
}))
|
|
21
|
-
), l = s(
|
|
22
|
-
() => e.selectedServer?.url?.replace(/\/$/, "") || ""
|
|
23
|
-
), f = s(
|
|
24
|
-
() => o.value.find((r) => r.id === e.selectedServer?.url)
|
|
25
|
-
);
|
|
26
|
-
return p({
|
|
27
|
-
servers: e.servers,
|
|
28
|
-
serverUrlWithoutTrailingSlash: l,
|
|
29
|
-
serverOptions: o,
|
|
30
|
-
selectedServer: e.selectedServer
|
|
31
|
-
}), (r, t) => o.value.length > 1 ? (u(), S(n(b), {
|
|
32
|
-
key: 0,
|
|
33
|
-
ref: "elem",
|
|
34
|
-
class: "group",
|
|
35
|
-
modelValue: f.value,
|
|
36
|
-
options: o.value,
|
|
37
|
-
placement: "bottom-start",
|
|
38
|
-
resize: "",
|
|
39
|
-
target: e.target,
|
|
40
|
-
"onUpdate:modelValue": t[0] || (t[0] = (x) => v("update:modelValue", x.id))
|
|
41
|
-
}, {
|
|
42
|
-
default: i(() => [
|
|
43
|
-
d(n(h), {
|
|
44
|
-
class: "bg-b-1 text-c-1 h-auto w-full justify-start gap-1.5 overflow-x-auto rounded-t-none rounded-b-xl px-3 py-1.5 text-base font-normal whitespace-nowrap -outline-offset-1",
|
|
45
|
-
variant: "ghost"
|
|
46
|
-
}, {
|
|
47
|
-
default: i(() => [
|
|
48
|
-
t[1] || (t[1] = a("span", { class: "sr-only" }, "Server:", -1)),
|
|
49
|
-
a("span", V, c(l.value || "Select a server"), 1),
|
|
50
|
-
d(n(y), {
|
|
51
|
-
class: "text-c-2 ui-open:rotate-180 mt-0.25 size-3 transition-transform duration-100",
|
|
52
|
-
weight: "bold"
|
|
53
|
-
})
|
|
54
|
-
]),
|
|
55
|
-
_: 1
|
|
56
|
-
})
|
|
57
|
-
]),
|
|
58
|
-
_: 1
|
|
59
|
-
}, 8, ["modelValue", "options", "target"])) : (u(), w("div", k, [
|
|
60
|
-
t[2] || (t[2] = a("span", { class: "sr-only" }, "Server:", -1)),
|
|
61
|
-
a("span", B, c(l.value), 1)
|
|
62
|
-
]));
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
export {
|
|
66
|
-
E as default
|
|
67
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { createElementBlock as o, openBlock as n, createElementVNode as e, createTextVNode as r } from "vue";
|
|
2
|
-
/* empty css */
|
|
3
|
-
import s from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const d = {}, c = { class: "sendingRequest" };
|
|
5
|
-
function i(a, t) {
|
|
6
|
-
return n(), o("div", c, [...t[0] || (t[0] = [
|
|
7
|
-
e("div", { class: "playIcon" }, [
|
|
8
|
-
e("svg", {
|
|
9
|
-
fill: "currentColor",
|
|
10
|
-
height: "32",
|
|
11
|
-
viewBox: "0 0 256 256",
|
|
12
|
-
width: "32",
|
|
13
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
14
|
-
}, [
|
|
15
|
-
e("path", { d: "M240,128a15.74,15.74,0,0,1-7.6,13.51L88.32,229.65a16,16,0,0,1-16.2.3A15.86,15.86,0,0,1,64,216.13V39.87a15.86,15.86,0,0,1,8.12-13.82,16,16,0,0,1,16.2.3L232.4,114.49A15.74,15.74,0,0,1,240,128Z" })
|
|
16
|
-
])
|
|
17
|
-
], -1),
|
|
18
|
-
r(" Sending Request to Endpoint ", -1)
|
|
19
|
-
])]);
|
|
20
|
-
}
|
|
21
|
-
const f = /* @__PURE__ */ s(d, [["render", i], ["__scopeId", "data-v-65dc6dfb"]]);
|
|
22
|
-
export {
|
|
23
|
-
f as default
|
|
24
|
-
};
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { defineComponent as m, useId as b, createElementBlock as S, openBlock as d, Fragment as f, createElementVNode as n, createVNode as x, createBlock as c, createCommentVNode as o, normalizeClass as y, unref as l } from "vue";
|
|
2
|
-
import { ServerVariablesForm as k } from "@scalar/api-client/components/Server";
|
|
3
|
-
import { ScalarMarkdown as B } from "@scalar/components";
|
|
4
|
-
import V from "./Selector.vue.js";
|
|
5
|
-
const g = ["id"], C = {}, I = /* @__PURE__ */ m({
|
|
6
|
-
...C,
|
|
7
|
-
__name: "ServerSelector",
|
|
8
|
-
props: {
|
|
9
|
-
eventBus: {},
|
|
10
|
-
selectedServer: {},
|
|
11
|
-
servers: {}
|
|
12
|
-
},
|
|
13
|
-
setup(e) {
|
|
14
|
-
const a = b(), u = (r) => {
|
|
15
|
-
e.eventBus.emit("server:update:selected", {
|
|
16
|
-
url: e.selectedServer?.url === r ? "" : r,
|
|
17
|
-
meta: {
|
|
18
|
-
type: "document"
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
}, v = (r, t) => {
|
|
22
|
-
const s = e.servers.findIndex((i) => i.url === e.selectedServer?.url);
|
|
23
|
-
s !== -1 && e.eventBus.emit("server:update:variables", {
|
|
24
|
-
index: s,
|
|
25
|
-
key: r,
|
|
26
|
-
value: t,
|
|
27
|
-
meta: {
|
|
28
|
-
type: "document"
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
};
|
|
32
|
-
return (r, t) => (d(), S(f, null, [
|
|
33
|
-
t[0] || (t[0] = n("label", { class: "bg-b-2 flex h-8 items-center rounded-t-xl border border-b-0 px-3 py-2.5 font-medium" }, " Server ", -1)),
|
|
34
|
-
n("div", {
|
|
35
|
-
id: l(a),
|
|
36
|
-
class: y(["border", {
|
|
37
|
-
"rounded-b-xl": !e.selectedServer?.description && !e.selectedServer?.variables
|
|
38
|
-
}])
|
|
39
|
-
}, [
|
|
40
|
-
e.servers.length ? (d(), c(V, {
|
|
41
|
-
key: 0,
|
|
42
|
-
selectedServer: e.selectedServer,
|
|
43
|
-
servers: e.servers,
|
|
44
|
-
target: l(a),
|
|
45
|
-
"onUpdate:modelValue": u
|
|
46
|
-
}, null, 8, ["selectedServer", "servers", "target"])) : o("", !0)
|
|
47
|
-
], 10, g),
|
|
48
|
-
x(l(k), {
|
|
49
|
-
layout: "reference",
|
|
50
|
-
variables: e.selectedServer?.variables,
|
|
51
|
-
"onUpdate:variable": v
|
|
52
|
-
}, null, 8, ["variables"]),
|
|
53
|
-
e.selectedServer?.description ? (d(), c(l(B), {
|
|
54
|
-
key: 0,
|
|
55
|
-
class: "text-c-3 rounded-b-xl border border-t-0 px-3 py-1.5",
|
|
56
|
-
value: e.selectedServer.description
|
|
57
|
-
}, null, 8, ["value"])) : o("", !0)
|
|
58
|
-
], 64));
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
export {
|
|
62
|
-
I as default
|
|
63
|
-
};
|