@scalar/api-reference 1.31.15 → 1.31.18

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 (32) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/dist/browser/standalone.js +15688 -15636
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  5. package/dist/components/ApiReferenceLayout.vue.js +2 -2
  6. package/dist/components/ApiReferenceLayout.vue2.js +23 -23
  7. package/dist/components/ClassicHeader.vue.d.ts.map +1 -1
  8. package/dist/components/ClassicHeader.vue.js +11 -9
  9. package/dist/components/DocumentSelector/DocumentSelector.vue.d.ts.map +1 -1
  10. package/dist/components/DocumentSelector/DocumentSelector.vue.js +19 -22
  11. package/dist/components/Sidebar/Sidebar.vue.js +2 -2
  12. package/dist/components/Sidebar/SidebarElement.vue.d.ts.map +1 -1
  13. package/dist/components/Sidebar/SidebarElement.vue.js +1 -1
  14. package/dist/components/Sidebar/SidebarGroup.vue.js +1 -1
  15. package/dist/features/DocumentSource/hooks/useDocumentSource.d.ts.map +1 -1
  16. package/dist/features/DocumentSource/hooks/useDocumentSource.js +35 -31
  17. package/dist/features/DownloadLink/DownloadLink.vue.d.ts.map +1 -1
  18. package/dist/features/DownloadLink/DownloadLink.vue.js +3 -3
  19. package/dist/features/DownloadLink/DownloadLink.vue2.js +35 -31
  20. package/dist/features/ExampleResponses/ExampleResponses.vue.js +1 -1
  21. package/dist/features/Search/SearchButton.vue.d.ts.map +1 -1
  22. package/dist/features/Search/SearchButton.vue.js +61 -5
  23. package/dist/features/Search/SearchButton.vue2.js +2 -70
  24. package/dist/helpers/parse.js +7 -7
  25. package/dist/index.js +1 -1
  26. package/dist/libs/openapi.js +15 -15
  27. package/dist/style.css +1 -1
  28. package/package.json +12 -12
  29. package/dist/legacy/fixtures/httpRequestMethods.d.ts +0 -10
  30. package/dist/legacy/fixtures/httpRequestMethods.d.ts.map +0 -1
  31. package/dist/legacy/fixtures/index.d.ts +0 -2
  32. package/dist/legacy/fixtures/index.d.ts.map +0 -1
@@ -1,72 +1,4 @@
1
- import { defineComponent as S, ref as b, watch as w, nextTick as v, onMounted as K, onBeforeUnmount as g, createElementBlock as a, openBlock as n, Fragment as r, createElementVNode as t, createVNode as p, normalizeClass as C, unref as l, createTextVNode as u, toDisplayString as M } from "vue";
2
- import { useModal as B } from "@scalar/components";
3
- import { isMacOS as m } from "@scalar/helpers/general/is-mac-os";
4
- import { ScalarIconMagnifyingGlass as E } from "@scalar/icons";
5
- import H from "./SearchModal.vue.js";
6
- import { useApiClient as L } from "../ApiClientModal/useApiClient.js";
7
- const N = { class: "sidebar-search-input" }, T = { class: "sidebar-search-shortcut" }, V = { class: "sidebar-search-key" }, G = /* @__PURE__ */ S({
8
- __name: "SearchButton",
9
- props: {
10
- spec: {},
11
- searchHotKey: { default: "k" }
12
- },
13
- setup(f) {
14
- const h = f, i = b(), s = B(), { client: y } = L(), d = (o) => {
15
- var e;
16
- (m() ? o.metaKey : o.ctrlKey) && o.key === h.searchHotKey && !((e = y.value) != null && e.modalState.open) && (o.preventDefault(), o.stopPropagation(), s.open ? s.hide() : s.show());
17
- };
18
- w(
19
- () => s.open,
20
- (o, e) => {
21
- !o && e && v(() => {
22
- var c;
23
- (c = i.value) == null || c.focus();
24
- });
25
- }
26
- ), K(() => window.addEventListener("keydown", d)), g(() => window.removeEventListener("keydown", d));
27
- function k() {
28
- s.show();
29
- }
30
- return (o, e) => (n(), a(r, null, [
31
- t("button", {
32
- ref_key: "button",
33
- ref: i,
34
- class: C(["sidebar-search", o.$attrs.class]),
35
- role: "search",
36
- type: "button",
37
- onClick: k
38
- }, [
39
- p(l(E), {
40
- class: "scalar-search-icon",
41
- weight: "bold"
42
- }),
43
- t("div", N, [
44
- e[3] || (e[3] = t("span", { class: "sr-only" }, "Open Search", -1)),
45
- e[4] || (e[4] = t("span", {
46
- "aria-hidden": "true",
47
- class: "sidebar-search-placeholder"
48
- }, " Search ", -1)),
49
- t("span", T, [
50
- e[2] || (e[2] = t("span", { class: "sr-only" }, "Keyboard Shortcut:", -1)),
51
- t("kbd", V, [
52
- l(m)() ? (n(), a(r, { key: 0 }, [
53
- u("⌘")
54
- ], 64)) : (n(), a(r, { key: 1 }, [
55
- e[0] || (e[0] = t("span", { class: "sr-only" }, "CTRL", -1)),
56
- e[1] || (e[1] = t("span", { "aria-hidden": "true" }, "⌃", -1))
57
- ], 64)),
58
- u(" " + M(o.searchHotKey), 1)
59
- ])
60
- ])
61
- ])
62
- ], 2),
63
- p(H, {
64
- modalState: l(s),
65
- parsedSpec: o.spec
66
- }, null, 8, ["modalState", "parsedSpec"])
67
- ], 64));
68
- }
69
- });
1
+ import f from "./SearchButton.vue.js";
70
2
  export {
71
- G as default
3
+ f as default
72
4
  };
@@ -1,6 +1,6 @@
1
1
  import { createEmptySpecification as w } from "../libs/openapi.js";
2
2
  import { normalizeHttpMethod as m } from "@scalar/helpers/http/normalize-http-method";
3
- const I = (s, i) => new Promise((e, b) => {
3
+ const P = (s, i) => new Promise((e, b) => {
4
4
  try {
5
5
  return e(s ? k(s, i) : k(w()));
6
6
  } catch (p) {
@@ -13,12 +13,12 @@ const I = (s, i) => new Promise((e, b) => {
13
13
  const b = [], p = (o) => {
14
14
  var h;
15
15
  !("children" in o) || !((h = o.children) != null && h.length) || o.children.forEach((a) => {
16
- var f, u, t, n, g;
17
- let r = (f = e.tags) == null ? void 0 : f.findIndex((d) => "tag" in o && d.name === o.tag.name);
16
+ var f, u, t, n, g, d;
17
+ let r = (f = e.tags) == null ? void 0 : f.findIndex((y) => "tag" in o && y.name === o.tag.name);
18
18
  r === -1 && "tag" in o && (e.tags.push({
19
19
  name: o.tag.name,
20
20
  operations: []
21
- }), r = e.tags.length - 1), e.tags[r].operations ||= [], "tag" in a ? p(a) : "operation" in a ? e.tags[r].operations.push({
21
+ }), r = e.tags.length - 1), (u = e.tags[r]).operations || (u.operations = []), "tag" in a ? p(a) : "operation" in a ? e.tags[r].operations.push({
22
22
  id: a.id,
23
23
  httpVerb: m(a.method),
24
24
  path: a.path,
@@ -26,7 +26,7 @@ const I = (s, i) => new Promise((e, b) => {
26
26
  description: a.operation.description || "",
27
27
  isWebhook: !1,
28
28
  information: a.operation,
29
- pathParameters: (t = (u = e.paths) == null ? void 0 : u[a.path ?? ""]) == null ? void 0 : t.parameters
29
+ pathParameters: (n = (t = e.paths) == null ? void 0 : t[a.path ?? ""]) == null ? void 0 : n.parameters
30
30
  }) : "webhook" in a && e.tags[r].operations.push({
31
31
  id: a.id,
32
32
  httpVerb: m(a.method),
@@ -35,7 +35,7 @@ const I = (s, i) => new Promise((e, b) => {
35
35
  description: a.webhook.description || "",
36
36
  isWebhook: !0,
37
37
  information: a.webhook,
38
- pathParameters: (g = (n = e.webhooks) == null ? void 0 : n[a.name ?? ""]) == null ? void 0 : g.parameters
38
+ pathParameters: (d = (g = e.webhooks) == null ? void 0 : g[a.name ?? ""]) == null ? void 0 : d.parameters
39
39
  });
40
40
  });
41
41
  };
@@ -77,5 +77,5 @@ const I = (s, i) => new Promise((e, b) => {
77
77
  };
78
78
  };
79
79
  export {
80
- I as parse
80
+ P as parse
81
81
  };