@scalar/api-client 2.22.1 → 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.
Files changed (56) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/dist/hooks/useClientConfig.d.ts +6 -3
  3. package/dist/hooks/useClientConfig.d.ts.map +1 -1
  4. package/dist/style.css +1 -1
  5. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts.map +1 -1
  6. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js +2 -2
  7. package/dist/v2/blocks/request-block/helpers/get-default-headers.js +1 -1
  8. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
  9. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +2 -2
  10. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +23 -29
  11. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts.map +1 -1
  12. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js +45 -43
  13. package/dist/v2/components/code-input/CodeInput.vue.d.ts +0 -6
  14. package/dist/v2/components/code-input/CodeInput.vue.d.ts.map +1 -1
  15. package/dist/v2/components/code-input/CodeInput.vue.js +1 -1
  16. package/dist/v2/components/code-input/CodeInput.vue2.js +50 -63
  17. package/dist/v2/components/sidebar/Sidebar.vue.d.ts +0 -3
  18. package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
  19. package/dist/v2/components/sidebar/Sidebar.vue.js +55 -53
  20. package/dist/v2/features/app/app-state.d.ts.map +1 -1
  21. package/dist/v2/features/app/app-state.js +33 -28
  22. package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
  23. package/dist/v2/features/app/components/AppSidebar.vue.js +1 -1
  24. package/dist/v2/features/app/components/AppSidebar.vue2.js +137 -127
  25. package/dist/v2/features/command-palette/TheCommandPalette.vue.d.ts.map +1 -1
  26. package/dist/v2/features/command-palette/TheCommandPalette.vue.js +1 -1
  27. package/dist/v2/features/command-palette/TheCommandPalette.vue2.js +6 -6
  28. package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts +2 -2
  29. package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts.map +1 -1
  30. package/dist/v2/features/command-palette/hooks/use-command-palette-state.js +60 -56
  31. package/dist/v2/features/operation/Operation.vue.js +1 -1
  32. package/dist/v2/features/search/hooks/use-search-index.d.ts +3 -7
  33. package/dist/v2/features/search/hooks/use-search-index.d.ts.map +1 -1
  34. package/dist/v2/features/search/hooks/use-search-index.js +12 -18
  35. package/dist/v2/features/search/index.d.ts +1 -2
  36. package/dist/v2/features/search/index.d.ts.map +1 -1
  37. package/dist/v2/features/search/index.js +2 -4
  38. package/dist/v2/features/search/types.d.ts +1 -1
  39. package/dist/v2/features/search/types.d.ts.map +1 -1
  40. package/dist/v2/helpers/handle-hotkeys.js +1 -1
  41. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  42. package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
  43. package/dist/views/Request/libs/oauth2.js +54 -52
  44. package/package.json +17 -17
  45. package/dist/v2/features/search/components/SearchButton.vue.d.ts +0 -12
  46. package/dist/v2/features/search/components/SearchButton.vue.d.ts.map +0 -1
  47. package/dist/v2/features/search/components/SearchButton.vue.js +0 -71
  48. package/dist/v2/features/search/components/SearchButton.vue2.js +0 -4
  49. package/dist/v2/features/search/components/SearchModal.vue.d.ts +0 -11
  50. package/dist/v2/features/search/components/SearchModal.vue.d.ts.map +0 -1
  51. package/dist/v2/features/search/components/SearchModal.vue.js +0 -7
  52. package/dist/v2/features/search/components/SearchModal.vue2.js +0 -102
  53. package/dist/v2/features/search/components/SearchResult.vue.d.ts +0 -10
  54. package/dist/v2/features/search/components/SearchResult.vue.d.ts.map +0 -1
  55. package/dist/v2/features/search/components/SearchResult.vue.js +0 -80
  56. package/dist/v2/features/search/components/SearchResult.vue2.js +0 -4
@@ -1,4 +0,0 @@
1
- import f from "./SearchButton.vue.js";
2
- export {
3
- f as default
4
- };
@@ -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,7 +0,0 @@
1
- import o from "./SearchModal.vue2.js";
2
- /* empty css */
3
- import a from "../../../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ a(o, [["__scopeId", "data-v-0c30b37a"]]);
5
- export {
6
- m as default
7
- };
@@ -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
- };
@@ -1,4 +0,0 @@
1
- import f from "./SearchResult.vue.js";
2
- export {
3
- f as default
4
- };