@scalar/api-reference 1.31.9 → 1.31.11

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 (27) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/browser/standalone.js +1906 -1901
  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 +1 -1
  6. package/dist/components/ApiReferenceLayout.vue2.js +125 -118
  7. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts.map +1 -1
  8. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.js +2 -2
  9. package/dist/components/Content/ClientLibraries/ClientLibraries.vue2.js +38 -38
  10. package/dist/components/Content/Content.vue.d.ts.map +1 -1
  11. package/dist/components/Content/Content.vue.js +1 -1
  12. package/dist/components/Content/Content.vue2.js +27 -27
  13. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  14. package/dist/components/Content/Schema/SchemaProperty.vue.js +2 -2
  15. package/dist/components/Content/Schema/SchemaProperty.vue2.js +101 -92
  16. package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.d.ts.map +1 -1
  17. package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.js +21 -13
  18. package/dist/components/MobileHeader.vue.d.ts +4 -1
  19. package/dist/components/MobileHeader.vue.d.ts.map +1 -1
  20. package/dist/components/MobileHeader.vue.js +3 -3
  21. package/dist/components/MobileHeader.vue2.js +18 -19
  22. package/dist/features/DocumentSource/hooks/useDocumentFetcher.js +20 -20
  23. package/dist/index.js +1 -1
  24. package/dist/style.css +1 -1
  25. package/dist/types.d.ts +1 -0
  26. package/dist/types.d.ts.map +1 -1
  27. package/package.json +12 -12
@@ -1,28 +1,27 @@
1
- import { defineComponent as i, computed as l, createElementBlock as d, openBlock as m, createVNode as u, createElementVNode as n, unref as t, toDisplayString as p, renderSlot as _ } from "vue";
2
- import { ScalarIconButton as b } from "@scalar/components";
3
- import { useNavState as f } from "../hooks/useNavState.js";
4
- import { useSidebar as v } from "../features/sidebar/hooks/useSidebar.js";
5
- const S = { class: "references-mobile-header t-doc__header" }, h = { class: "references-mobile-breadcrumbs" }, C = { class: "references-mobile-header-actions" }, I = /* @__PURE__ */ i({
1
+ import { defineComponent as t, createElementBlock as a, openBlock as i, createVNode as l, createElementVNode as s, unref as o, toDisplayString as c, renderSlot as d } from "vue";
2
+ import { ScalarIconButton as m } from "@scalar/components";
3
+ import { useSidebar as u } from "../features/sidebar/hooks/useSidebar.js";
4
+ const p = { class: "references-mobile-header t-doc__header" }, b = { class: "references-mobile-breadcrumbs" }, _ = { class: "references-mobile-header-actions" }, M = /* @__PURE__ */ t({
6
5
  __name: "MobileHeader",
7
- setup(M) {
8
- const { isSidebarOpen: e, items: s } = v(), { getReferenceId: a } = f(), c = l(() => {
9
- var o;
10
- return (o = s.value) == null ? void 0 : o.titles.get(a());
11
- });
12
- return (o, r) => (m(), d("div", S, [
13
- u(t(b), {
14
- icon: t(e) ? "Close" : "Menu",
15
- label: t(e) ? "Close Menu" : "Open Menu",
6
+ props: {
7
+ breadcrumb: {}
8
+ },
9
+ setup(f) {
10
+ const { isSidebarOpen: e } = u();
11
+ return (r, n) => (i(), a("div", p, [
12
+ l(o(m), {
13
+ icon: o(e) ? "Close" : "Menu",
14
+ label: o(e) ? "Close Menu" : "Open Menu",
16
15
  size: "md",
17
- onClick: r[0] || (r[0] = (g) => e.value = !t(e))
16
+ onClick: n[0] || (n[0] = (h) => e.value = !o(e))
18
17
  }, null, 8, ["icon", "label"]),
19
- n("span", h, p(c.value), 1),
20
- n("div", C, [
21
- _(o.$slots, "actions", {}, void 0, !0)
18
+ s("span", b, c(r.breadcrumb), 1),
19
+ s("div", _, [
20
+ d(r.$slots, "actions", {}, void 0, !0)
22
21
  ])
23
22
  ]));
24
23
  }
25
24
  });
26
25
  export {
27
- I as default
26
+ M as default
28
27
  };
@@ -1,37 +1,37 @@
1
- import { measure as i } from "@scalar/helpers/testing/measure";
1
+ import { measure as c } from "@scalar/helpers/testing/measure";
2
2
  import { fetchDocument as f, prettyPrintJson as s } from "@scalar/oas-utils/helpers";
3
- import { ref as u, watch as a, toValue as c } from "vue";
3
+ import { ref as u, watch as a, toValue as i } from "vue";
4
4
  function l({
5
- configuration: r
5
+ configuration: o
6
6
  }) {
7
- const o = u("");
7
+ const t = u("");
8
8
  return a(
9
- () => c(r),
9
+ () => i(o),
10
10
  async (n) => {
11
- var e;
11
+ var r;
12
12
  if (!n)
13
13
  return;
14
- const t = await m(n, (e = c(r)) == null ? void 0 : e.proxyUrl);
15
- typeof t == "string" && (o.value = t.trim());
14
+ const e = await m(n, (r = i(o)) == null ? void 0 : r.proxyUrl);
15
+ typeof e == "string" && (t.value = e.trim());
16
16
  },
17
17
  { immediate: !0, deep: !0 }
18
18
  ), {
19
- originalDocument: o
19
+ originalDocument: t
20
20
  };
21
21
  }
22
- const m = async ({ url: r, content: o }, n) => {
23
- if (r)
22
+ const m = async ({ url: o, content: t }, n) => {
23
+ if (o && !t)
24
24
  try {
25
- const e = await i(`fetch(${r})`, async () => await f(r, n));
26
- return console.info("size:", Math.round(e.length / 1024), "kB"), e;
27
- } catch (e) {
28
- console.error("Failed to fetch OpenAPI document from URL:", e);
25
+ const r = await c(`fetch(${o})`, async () => await f(o, n));
26
+ return console.info("size:", Math.round(r.length / 1024), "kB"), r;
27
+ } catch (r) {
28
+ console.error("Failed to fetch OpenAPI document from URL:", r);
29
29
  }
30
- const t = typeof o == "function" ? o() : o;
31
- if (typeof t == "string")
32
- return t;
33
- if (typeof t == "object")
34
- return s(t);
30
+ const e = typeof t == "function" ? t() : t;
31
+ if (typeof e == "string")
32
+ return e;
33
+ if (typeof e == "object")
34
+ return s(e);
35
35
  };
36
36
  export {
37
37
  l as useDocumentFetcher