@scalar/api-client 2.22.0 → 2.22.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 +56 -0
- package/dist/hooks/useClientConfig.d.ts +6 -3
- package/dist/hooks/useClientConfig.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js +2 -2
- package/dist/v2/blocks/request-block/helpers/get-default-headers.js +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +2 -2
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +23 -29
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js +45 -43
- package/dist/v2/components/code-input/CodeInput.vue.d.ts +0 -6
- package/dist/v2/components/code-input/CodeInput.vue.d.ts.map +1 -1
- package/dist/v2/components/code-input/CodeInput.vue.js +1 -1
- package/dist/v2/components/code-input/CodeInput.vue2.js +50 -63
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts +0 -3
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.js +55 -53
- package/dist/v2/features/app/App.vue.d.ts +3 -1
- package/dist/v2/features/app/App.vue.d.ts.map +1 -1
- package/dist/v2/features/app/App.vue.js +46 -43
- package/dist/v2/features/app/app-state.d.ts.map +1 -1
- package/dist/v2/features/app/app-state.js +33 -28
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue.js +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue2.js +137 -127
- package/dist/v2/features/app/index.d.ts +3 -0
- package/dist/v2/features/app/index.d.ts.map +1 -1
- package/dist/v2/features/app/index.js +17 -11
- package/dist/v2/features/command-palette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/v2/features/command-palette/TheCommandPalette.vue.js +1 -1
- package/dist/v2/features/command-palette/TheCommandPalette.vue2.js +6 -6
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts +2 -2
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts.map +1 -1
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.js +60 -56
- package/dist/v2/features/operation/Operation.vue.js +1 -1
- package/dist/v2/features/search/hooks/use-search-index.d.ts +3 -7
- package/dist/v2/features/search/hooks/use-search-index.d.ts.map +1 -1
- package/dist/v2/features/search/hooks/use-search-index.js +12 -18
- package/dist/v2/features/search/index.d.ts +1 -2
- package/dist/v2/features/search/index.d.ts.map +1 -1
- package/dist/v2/features/search/index.js +2 -4
- package/dist/v2/features/search/types.d.ts +1 -1
- package/dist/v2/features/search/types.d.ts.map +1 -1
- package/dist/v2/helpers/handle-hotkeys.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
- package/dist/views/Request/libs/oauth2.js +54 -52
- package/package.json +19 -19
- package/dist/v2/features/search/components/SearchButton.vue.d.ts +0 -12
- package/dist/v2/features/search/components/SearchButton.vue.d.ts.map +0 -1
- package/dist/v2/features/search/components/SearchButton.vue.js +0 -71
- package/dist/v2/features/search/components/SearchButton.vue2.js +0 -4
- package/dist/v2/features/search/components/SearchModal.vue.d.ts +0 -11
- package/dist/v2/features/search/components/SearchModal.vue.d.ts.map +0 -1
- package/dist/v2/features/search/components/SearchModal.vue.js +0 -7
- package/dist/v2/features/search/components/SearchModal.vue2.js +0 -102
- package/dist/v2/features/search/components/SearchResult.vue.d.ts +0 -10
- package/dist/v2/features/search/components/SearchResult.vue.d.ts.map +0 -1
- package/dist/v2/features/search/components/SearchResult.vue.js +0 -80
- package/dist/v2/features/search/components/SearchResult.vue2.js +0 -4
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"rest",
|
|
19
19
|
"testing"
|
|
20
20
|
],
|
|
21
|
-
"version": "2.22.
|
|
21
|
+
"version": "2.22.2",
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=20"
|
|
24
24
|
},
|
|
@@ -321,26 +321,26 @@
|
|
|
321
321
|
"whatwg-mimetype": "4.0.0",
|
|
322
322
|
"yaml": "^2.8.0",
|
|
323
323
|
"zod": "^4.3.5",
|
|
324
|
-
"@scalar/draggable": "0.3.0",
|
|
325
324
|
"@scalar/analytics-client": "1.0.1",
|
|
326
|
-
"@scalar/components": "0.17.
|
|
327
|
-
"@scalar/helpers": "0.2.
|
|
325
|
+
"@scalar/components": "0.17.1",
|
|
326
|
+
"@scalar/helpers": "0.2.10",
|
|
327
|
+
"@scalar/draggable": "0.3.0",
|
|
328
328
|
"@scalar/icons": "0.5.2",
|
|
329
|
-
"@scalar/import": "0.4.
|
|
330
|
-
"@scalar/
|
|
331
|
-
"@scalar/
|
|
332
|
-
"@scalar/
|
|
329
|
+
"@scalar/import": "0.4.47",
|
|
330
|
+
"@scalar/object-utils": "1.2.24",
|
|
331
|
+
"@scalar/json-magic": "0.9.5",
|
|
332
|
+
"@scalar/oas-utils": "0.6.31",
|
|
333
|
+
"@scalar/openapi-parser": "0.24.6",
|
|
333
334
|
"@scalar/openapi-types": "0.5.3",
|
|
334
|
-
"@scalar/postman-to-openapi": "0.4.
|
|
335
|
-
"@scalar/
|
|
336
|
-
"@scalar/
|
|
337
|
-
"@scalar/types": "0.6.0",
|
|
338
|
-
"@scalar/snippetz": "0.6.9",
|
|
339
|
-
"@scalar/use-toasts": "0.9.1",
|
|
335
|
+
"@scalar/postman-to-openapi": "0.4.2",
|
|
336
|
+
"@scalar/sidebar": "0.7.24",
|
|
337
|
+
"@scalar/snippetz": "0.6.10",
|
|
340
338
|
"@scalar/themes": "0.14.0",
|
|
341
|
-
"@scalar/
|
|
342
|
-
"@scalar/
|
|
343
|
-
"@scalar/use-
|
|
339
|
+
"@scalar/types": "0.6.1",
|
|
340
|
+
"@scalar/use-codemirror": "0.13.28",
|
|
341
|
+
"@scalar/use-toasts": "0.9.1",
|
|
342
|
+
"@scalar/use-hooks": "0.3.7",
|
|
343
|
+
"@scalar/workspace-store": "0.28.0"
|
|
344
344
|
},
|
|
345
345
|
"devDependencies": {
|
|
346
346
|
"@tailwindcss/vite": "^4.1.18",
|
|
@@ -355,8 +355,8 @@
|
|
|
355
355
|
"vite": "^7.3.1",
|
|
356
356
|
"vite-svg-loader": "5.1.0",
|
|
357
357
|
"vitest": "4.0.16",
|
|
358
|
-
"@scalar/
|
|
359
|
-
"@scalar/
|
|
358
|
+
"@scalar/build-tooling": "0.4.1",
|
|
359
|
+
"@scalar/galaxy": "0.5.12"
|
|
360
360
|
},
|
|
361
361
|
"scripts": {
|
|
362
362
|
"build": "scalar-build-vite",
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
2
|
-
import type { WorkspaceDocument } from '@scalar/workspace-store/schemas';
|
|
3
|
-
type __VLS_Props = {
|
|
4
|
-
forceIcon?: boolean;
|
|
5
|
-
searchHotKey?: string;
|
|
6
|
-
hideModels?: boolean;
|
|
7
|
-
documents: WorkspaceDocument[];
|
|
8
|
-
eventBus: WorkspaceEventBus;
|
|
9
|
-
};
|
|
10
|
-
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
-
export default _default;
|
|
12
|
-
//# sourceMappingURL=SearchButton.vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SearchButton.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/search/components/SearchButton.vue"],"names":[],"mappings":"AAwGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AAKxE,KAAK,WAAW,GAAG;IACjB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,SAAS,EAAE,iBAAiB,EAAE,CAAA;IAC9B,QAAQ,EAAE,iBAAiB,CAAA;CAC5B,CAAC;;AAyKF,wBAMG"}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { defineComponent as p, ref as k, watch as h, nextTick as S, onMounted as B, onBeforeUnmount as w, createElementBlock as r, openBlock as s, Fragment as d, createBlock as m, createVNode as v, unref as l, normalizeClass as M, withCtx as f, createElementVNode as a, createTextVNode as C, toDisplayString as K } from "vue";
|
|
2
|
-
import { useModal as b, ScalarIconButton as g, ScalarSidebarSearchButton as x } from "@scalar/components";
|
|
3
|
-
import { isMacOS as y } from "@scalar/helpers/general/is-mac-os";
|
|
4
|
-
import { ScalarIconMagnifyingGlass as E } from "@scalar/icons";
|
|
5
|
-
import H from "./SearchModal.vue.js";
|
|
6
|
-
const D = /* @__PURE__ */ p({
|
|
7
|
-
__name: "SearchButton",
|
|
8
|
-
props: {
|
|
9
|
-
forceIcon: { type: Boolean },
|
|
10
|
-
searchHotKey: { default: "k" },
|
|
11
|
-
hideModels: { type: Boolean, default: !1 },
|
|
12
|
-
documents: {},
|
|
13
|
-
eventBus: {}
|
|
14
|
-
},
|
|
15
|
-
setup(n) {
|
|
16
|
-
const i = k(), o = b(), u = (t) => {
|
|
17
|
-
(y() ? t.metaKey : t.ctrlKey) && t.key === n.searchHotKey && (t.preventDefault(), t.stopPropagation(), o.open ? o.hide() : o.show());
|
|
18
|
-
};
|
|
19
|
-
h(
|
|
20
|
-
() => o.open,
|
|
21
|
-
async (t, e) => {
|
|
22
|
-
!t && e && (await S(), i.value?.$el.focus());
|
|
23
|
-
}
|
|
24
|
-
), B(() => window.addEventListener("keydown", u)), w(() => window.removeEventListener("keydown", u));
|
|
25
|
-
function c() {
|
|
26
|
-
o.show();
|
|
27
|
-
}
|
|
28
|
-
return (t, e) => (s(), r(d, null, [
|
|
29
|
-
n.forceIcon ? (s(), m(l(g), {
|
|
30
|
-
key: 0,
|
|
31
|
-
icon: l(E),
|
|
32
|
-
label: "Search",
|
|
33
|
-
onClick: c
|
|
34
|
-
}, null, 8, ["icon"])) : (s(), m(l(x), {
|
|
35
|
-
key: 1,
|
|
36
|
-
ref_key: "button",
|
|
37
|
-
ref: i,
|
|
38
|
-
class: M(["w-full", t.$attrs.class]),
|
|
39
|
-
onClick: c
|
|
40
|
-
}, {
|
|
41
|
-
shortcut: f(() => [
|
|
42
|
-
l(y)() ? (s(), r(d, { key: 0 }, [
|
|
43
|
-
e[0] || (e[0] = a("span", { class: "sr-only" }, "Command", -1)),
|
|
44
|
-
e[1] || (e[1] = a("span", { "aria-hidden": "true" }, "⌘", -1))
|
|
45
|
-
], 64)) : (s(), r(d, { key: 1 }, [
|
|
46
|
-
e[2] || (e[2] = a("span", { class: "sr-only" }, "CTRL", -1)),
|
|
47
|
-
e[3] || (e[3] = a("span", { "aria-hidden": "true" }, "⌃", -1))
|
|
48
|
-
], 64)),
|
|
49
|
-
C(" " + K(n.searchHotKey), 1)
|
|
50
|
-
]),
|
|
51
|
-
default: f(() => [
|
|
52
|
-
e[4] || (e[4] = a("span", { class: "sr-only" }, "Open Search", -1)),
|
|
53
|
-
e[5] || (e[5] = a("span", {
|
|
54
|
-
"aria-hidden": "true",
|
|
55
|
-
class: "sidebar-search-placeholder"
|
|
56
|
-
}, " Search ", -1))
|
|
57
|
-
]),
|
|
58
|
-
_: 1
|
|
59
|
-
}, 8, ["class"])),
|
|
60
|
-
v(H, {
|
|
61
|
-
documents: n.documents,
|
|
62
|
-
eventBus: n.eventBus,
|
|
63
|
-
hideModels: n.hideModels,
|
|
64
|
-
modalState: l(o)
|
|
65
|
-
}, null, 8, ["documents", "eventBus", "hideModels", "modalState"])
|
|
66
|
-
], 64));
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
export {
|
|
70
|
-
D as default
|
|
71
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { type ModalState } from '@scalar/components';
|
|
2
|
-
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
3
|
-
import type { WorkspaceDocument } from '@scalar/workspace-store/schemas';
|
|
4
|
-
type __VLS_Props = {
|
|
5
|
-
modalState: ModalState;
|
|
6
|
-
documents: WorkspaceDocument[];
|
|
7
|
-
eventBus: WorkspaceEventBus;
|
|
8
|
-
};
|
|
9
|
-
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
-
export default _default;
|
|
11
|
-
//# sourceMappingURL=SearchModal.vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SearchModal.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/search/components/SearchModal.vue"],"names":[],"mappings":"AAkJA,OAAO,EAIL,KAAK,UAAU,EAChB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AAQxE,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,SAAS,EAAE,iBAAiB,EAAE,CAAA;IAC9B,QAAQ,EAAE,iBAAiB,CAAA;CAC5B,CAAC;;AAoPF,wBAMG"}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { defineComponent as $, ref as g, watch as x, computed as I, createBlock as w, openBlock as c, unref as l, withKeys as d, withModifiers as u, withCtx as m, createElementVNode as r, createVNode as b, isRef as k, createElementBlock as B, Fragment as V, renderList as C, createTextVNode as N, toDisplayString as K } from "vue";
|
|
2
|
-
import { ScalarModal as M, ScalarSearchInput as q, ScalarSearchResultList as D } from "@scalar/components";
|
|
3
|
-
import { nanoid as E } from "nanoid";
|
|
4
|
-
import { useSearchIndex as L } from "../hooks/use-search-index.js";
|
|
5
|
-
import F from "./SearchResult.vue.js";
|
|
6
|
-
const P = {
|
|
7
|
-
class: "mb-0 flex flex-col",
|
|
8
|
-
role: "search"
|
|
9
|
-
}, G = /* @__PURE__ */ $({
|
|
10
|
-
__name: "SearchModal",
|
|
11
|
-
props: {
|
|
12
|
-
modalState: {},
|
|
13
|
-
documents: {},
|
|
14
|
-
eventBus: {}
|
|
15
|
-
},
|
|
16
|
-
setup(o) {
|
|
17
|
-
const v = E(), f = `${v}-search-result`, p = `${v}-search-instructions`, { query: i, results: s } = L(() => o.documents), a = g(void 0);
|
|
18
|
-
x(
|
|
19
|
-
() => o.modalState.open,
|
|
20
|
-
(n) => {
|
|
21
|
-
n && (i.value = "");
|
|
22
|
-
}
|
|
23
|
-
);
|
|
24
|
-
const S = (n) => {
|
|
25
|
-
const e = n === "up" ? -1 : 1, t = s.value.length;
|
|
26
|
-
typeof a.value == "number" ? a.value = (a.value + e + t) % t : a.value = e === -1 ? t - 1 : 0;
|
|
27
|
-
};
|
|
28
|
-
function h(n) {
|
|
29
|
-
if (typeof n != "number" || !s.value[n])
|
|
30
|
-
return;
|
|
31
|
-
const e = s.value[n];
|
|
32
|
-
o.modalState.hide(), o.eventBus.emit("scroll-to:nav-item", { id: e.item.id });
|
|
33
|
-
}
|
|
34
|
-
const R = I(() => {
|
|
35
|
-
const n = s.value[a.value ?? -1];
|
|
36
|
-
return n ? `search-result-${n.item.id}` : void 0;
|
|
37
|
-
});
|
|
38
|
-
return (n, e) => (c(), w(l(M), {
|
|
39
|
-
"aria-label": "Reference Search",
|
|
40
|
-
state: o.modalState,
|
|
41
|
-
variant: "search",
|
|
42
|
-
onKeydown: e[5] || (e[5] = d(u((t) => o.modalState.hide(), ["stop"]), ["esc"]))
|
|
43
|
-
}, {
|
|
44
|
-
default: m(() => [
|
|
45
|
-
r("div", P, [
|
|
46
|
-
b(l(q), {
|
|
47
|
-
modelValue: l(i),
|
|
48
|
-
"onUpdate:modelValue": e[0] || (e[0] = (t) => k(i) ? i.value = t : null),
|
|
49
|
-
"aria-activedescendant": R.value,
|
|
50
|
-
"aria-autocomplete": "list",
|
|
51
|
-
"aria-controls": f,
|
|
52
|
-
"aria-describedby": p,
|
|
53
|
-
role: "combobox",
|
|
54
|
-
onBlur: e[1] || (e[1] = (t) => a.value = void 0),
|
|
55
|
-
onKeydown: [
|
|
56
|
-
e[2] || (e[2] = d(u((t) => S("down"), ["stop", "prevent"]), ["down"])),
|
|
57
|
-
e[3] || (e[3] = d(u(() => h(a.value), ["stop", "prevent"]), ["enter"])),
|
|
58
|
-
e[4] || (e[4] = d(u((t) => S("up"), ["stop", "prevent"]), ["up"]))
|
|
59
|
-
]
|
|
60
|
-
}, null, 8, ["modelValue", "aria-activedescendant"])
|
|
61
|
-
]),
|
|
62
|
-
b(l(D), {
|
|
63
|
-
id: f,
|
|
64
|
-
"aria-label": "Reference Search Results",
|
|
65
|
-
class: "custom-scroll p-1 pt-0",
|
|
66
|
-
noResults: !l(s).length
|
|
67
|
-
}, {
|
|
68
|
-
query: m(() => [
|
|
69
|
-
N(K(l(i)), 1)
|
|
70
|
-
]),
|
|
71
|
-
default: m(() => [
|
|
72
|
-
(c(!0), B(V, null, C(l(s), (t, y) => (c(), w(F, {
|
|
73
|
-
id: `search-result-${t.item.id}`,
|
|
74
|
-
key: t.refIndex,
|
|
75
|
-
isSelected: a.value === y,
|
|
76
|
-
result: t,
|
|
77
|
-
onClick: u(() => h(y), ["prevent"])
|
|
78
|
-
}, null, 8, ["id", "isSelected", "result", "onClick"]))), 128))
|
|
79
|
-
]),
|
|
80
|
-
_: 1
|
|
81
|
-
}, 8, ["noResults"]),
|
|
82
|
-
r("div", {
|
|
83
|
-
id: p,
|
|
84
|
-
class: "ref-search-meta"
|
|
85
|
-
}, [...e[6] || (e[6] = [
|
|
86
|
-
r("span", {
|
|
87
|
-
"aria-hidden": "true",
|
|
88
|
-
class: "contents"
|
|
89
|
-
}, [
|
|
90
|
-
r("span", null, "↑↓ Navigate"),
|
|
91
|
-
r("span", null, "⏎ Select")
|
|
92
|
-
], -1),
|
|
93
|
-
r("span", { class: "sr-only" }, " Press up arrow / down arrow to navigate, enter to select, type to filter results ", -1)
|
|
94
|
-
])])
|
|
95
|
-
]),
|
|
96
|
-
_: 1
|
|
97
|
-
}, 8, ["state"]));
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
export {
|
|
101
|
-
G as default
|
|
102
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { FuseResult } from 'fuse.js';
|
|
2
|
-
import type { FuseData } from '../../../../v2/features/search/types';
|
|
3
|
-
type __VLS_Props = {
|
|
4
|
-
id: string;
|
|
5
|
-
isSelected: boolean;
|
|
6
|
-
result: FuseResult<FuseData>;
|
|
7
|
-
};
|
|
8
|
-
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
-
export default _default;
|
|
10
|
-
//# sourceMappingURL=SearchResult.vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SearchResult.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/search/components/SearchResult.vue"],"names":[],"mappings":"AA4GA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEzC,OAAO,KAAK,EAAa,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AAErE,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAA;IACV,UAAU,EAAE,OAAO,CAAA;IACnB,MAAM,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAA;CAC7B,CAAC;;AA+IF,wBAMG"}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { defineComponent as y, createBlock as f, openBlock as s, unref as c, createSlots as g, withCtx as l, createElementVNode as t, createElementBlock as o, createCommentVNode as r, toDisplayString as i, normalizeClass as h, createTextVNode as a, Fragment as m, createVNode as x } from "vue";
|
|
2
|
-
import { ScalarSearchResultItem as S } from "@scalar/components";
|
|
3
|
-
import { ScalarIconTag as p, ScalarIconTerminalWindow as N, ScalarIconTextAlignLeft as T } from "@scalar/icons";
|
|
4
|
-
import { HttpMethod as k } from "@scalar/sidebar";
|
|
5
|
-
const B = { class: "flex min-w-0 flex-col gap-0.5" }, C = {
|
|
6
|
-
key: 0,
|
|
7
|
-
class: "text-c-3 truncate text-xs font-medium"
|
|
8
|
-
}, D = { class: "sr-only" }, E = { class: "inline-flex items-center gap-1" }, I = { class: "sr-only" }, v = /* @__PURE__ */ y({
|
|
9
|
-
__name: "SearchResult",
|
|
10
|
-
props: {
|
|
11
|
-
id: {},
|
|
12
|
-
isSelected: { type: Boolean },
|
|
13
|
-
result: {}
|
|
14
|
-
},
|
|
15
|
-
setup(e) {
|
|
16
|
-
const d = {
|
|
17
|
-
heading: T,
|
|
18
|
-
operation: N,
|
|
19
|
-
tag: p
|
|
20
|
-
}, u = {
|
|
21
|
-
heading: "Heading",
|
|
22
|
-
operation: "Operation",
|
|
23
|
-
tag: "Tag"
|
|
24
|
-
};
|
|
25
|
-
return (R, n) => (s(), f(c(S), {
|
|
26
|
-
id: e.id,
|
|
27
|
-
icon: d[e.result.item.type],
|
|
28
|
-
selected: e.isSelected
|
|
29
|
-
}, g({
|
|
30
|
-
default: l(() => [
|
|
31
|
-
t("div", B, [
|
|
32
|
-
e.result.item.documentName ? (s(), o("span", C, i(e.result.item.documentName), 1)) : r("", !0),
|
|
33
|
-
t("span", {
|
|
34
|
-
class: h({
|
|
35
|
-
"text-decoration-line": e.result.item.entry.type === "operation" && e.result.item.entry.isDeprecated
|
|
36
|
-
})
|
|
37
|
-
}, [
|
|
38
|
-
t("span", D, [
|
|
39
|
-
a(i(u[e.result.item.type]) + ": ", 1),
|
|
40
|
-
e.result.item.entry.type === "operation" && e.result.item.entry.isDeprecated ? (s(), o(m, { key: 0 }, [
|
|
41
|
-
a(" (Deprecated) ")
|
|
42
|
-
], 64)) : r("", !0)
|
|
43
|
-
]),
|
|
44
|
-
a(" " + i(e.result.item.title) + " ", 1),
|
|
45
|
-
n[0] || (n[0] = t("span", { class: "sr-only" }, ",", -1))
|
|
46
|
-
], 2)
|
|
47
|
-
])
|
|
48
|
-
]),
|
|
49
|
-
_: 2
|
|
50
|
-
}, [
|
|
51
|
-
e.result.item.type === "operation" ? {
|
|
52
|
-
name: "description",
|
|
53
|
-
fn: l(() => [
|
|
54
|
-
t("span", E, [
|
|
55
|
-
e.result.item.type === "operation" ? (s(), o(m, { key: 0 }, [
|
|
56
|
-
x(c(k), {
|
|
57
|
-
"aria-hidden": "true",
|
|
58
|
-
method: e.result.item.method ?? "get"
|
|
59
|
-
}, null, 8, ["method"]),
|
|
60
|
-
t("span", I, " HTTP Method: " + i(e.result.item.method ?? "get"), 1)
|
|
61
|
-
], 64)) : r("", !0),
|
|
62
|
-
n[1] || (n[1] = t("span", { class: "sr-only" }, "Path: ", -1)),
|
|
63
|
-
a(" " + i(e.result.item.path), 1)
|
|
64
|
-
])
|
|
65
|
-
]),
|
|
66
|
-
key: "0"
|
|
67
|
-
} : e.result.item.description ? {
|
|
68
|
-
name: "description",
|
|
69
|
-
fn: l(() => [
|
|
70
|
-
n[2] || (n[2] = t("span", { class: "sr-only" }, "Description: ", -1)),
|
|
71
|
-
a(" " + i(e.result.item.description), 1)
|
|
72
|
-
]),
|
|
73
|
-
key: "1"
|
|
74
|
-
} : void 0
|
|
75
|
-
]), 1032, ["id", "icon", "selected"]));
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
export {
|
|
79
|
-
v as default
|
|
80
|
-
};
|