@scalar/api-reference 1.28.10 → 1.28.12

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 (46) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/dist/browser/standalone.js +6057 -5999
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/ApiReferenceLayout.vue.js +1 -1
  5. package/dist/components/ApiReferenceLayout.vue2.js +12 -12
  6. package/dist/components/Content/Schema/Schema.preview.d.ts +232 -0
  7. package/dist/components/Content/Schema/Schema.preview.d.ts.map +1 -0
  8. package/dist/components/Content/Schema/Schema.vue.d.ts +2 -0
  9. package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
  10. package/dist/components/Content/Schema/Schema.vue.js +2 -2
  11. package/dist/components/Content/Schema/Schema.vue2.js +82 -57
  12. package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts.map +1 -1
  13. package/dist/components/Content/Schema/SchemaDiscriminator.vue.js +2 -2
  14. package/dist/components/Content/Schema/SchemaDiscriminator.vue2.js +9 -7
  15. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  16. package/dist/components/Content/Schema/SchemaProperty.vue.js +2 -2
  17. package/dist/components/Content/Schema/SchemaProperty.vue2.js +55 -51
  18. package/dist/components/ShowMoreButton.vue.d.ts.map +1 -1
  19. package/dist/components/ShowMoreButton.vue.js +2 -2
  20. package/dist/components/ShowMoreButton.vue2.js +15 -11
  21. package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
  22. package/dist/components/Sidebar/Sidebar.vue.js +2 -2
  23. package/dist/components/Sidebar/Sidebar.vue2.js +55 -55
  24. package/dist/components/Sidebar/SidebarElement.vue.d.ts.map +1 -1
  25. package/dist/components/Sidebar/SidebarElement.vue.js +2 -2
  26. package/dist/components/Sidebar/SidebarElement.vue2.js +53 -53
  27. package/dist/features/ApiClientModal/useApiClient.d.ts +36 -320
  28. package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
  29. package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
  30. package/dist/features/ExampleRequest/ExampleRequest.vue.js +4 -4
  31. package/dist/features/ExampleRequest/ExampleRequest.vue2.js +76 -76
  32. package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
  33. package/dist/features/Operation/components/RequestBody.vue.js +2 -2
  34. package/dist/features/Operation/components/RequestBody.vue2.js +65 -28
  35. package/dist/features/Search/useSearchIndex.js +72 -72
  36. package/dist/hooks/useMultipleDocuments.d.ts +8 -2
  37. package/dist/hooks/useMultipleDocuments.d.ts.map +1 -1
  38. package/dist/hooks/useMultipleDocuments.js +49 -48
  39. package/dist/hooks/useNavState.d.ts +6 -4
  40. package/dist/hooks/useNavState.d.ts.map +1 -1
  41. package/dist/hooks/useNavState.js +34 -37
  42. package/dist/hooks/useReactiveSpec.d.ts.map +1 -1
  43. package/dist/hooks/useReactiveSpec.js +36 -36
  44. package/dist/index.js +1 -1
  45. package/dist/style.css +1 -1
  46. package/package.json +14 -13
@@ -1 +1 @@
1
- {"version":3,"file":"useReactiveSpec.d.ts","sourceRoot":"","sources":["../../src/hooks/useReactiveSpec.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;AACpE,OAAO,EAAE,KAAK,gBAAgB,EAAuB,MAAM,KAAK,CAAA;AAoDhE;;GAEG;AACH,wBAAgB,eAAe,CAAC,EAC9B,UAAU,EACV,QAAQ,GACT,EAAE;IACD,UAAU,CAAC,EAAE,gBAAgB,CAAC,iBAAiB,CAAC,CAAA;IAChD,QAAQ,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAA;CACpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwDA"}
@@ -1,59 +1,59 @@
1
- import { isValidUrl as d, fetchSpecFromUrl as u, prettyPrintJson as h } from "@scalar/oas-utils/helpers";
2
- import { ref as s, watch as m, toValue as p } from "vue";
3
- import { parse as v } from "../helpers/parse.js";
4
- import { createEmptySpecification as l } from "../helpers/createEmptySpecification.js";
5
- const y = async ({ url: e, content: o }, n) => {
6
- if (e) {
1
+ import { fetchDocument as l, prettyPrintJson as d } from "@scalar/oas-utils/helpers";
2
+ import { ref as s, watch as u, toValue as f } from "vue";
3
+ import { parse as h } from "../helpers/parse.js";
4
+ import { createEmptySpecification as m } from "../helpers/createEmptySpecification.js";
5
+ const v = async ({ url: a, content: e }, r) => {
6
+ if (a) {
7
7
  const i = performance.now();
8
8
  try {
9
- const c = d(e) ? await u(e, n) : await u(e), r = performance.now();
10
- return console.log(`fetch: ${Math.round(r - i)} ms (${e})`), console.log("size:", Math.round(c.length / 1024), "kB"), c;
11
- } catch (c) {
12
- console.error("Failed to fetch spec from URL:", c);
9
+ const n = await l(a, r), o = performance.now();
10
+ return console.log(`fetch: ${Math.round(o - i)} ms (${a})`), console.log("size:", Math.round(n.length / 1024), "kB"), n;
11
+ } catch (n) {
12
+ console.error("Failed to fetch OpenAPI document from URL:", n);
13
13
  }
14
14
  }
15
- const t = typeof o == "function" ? o() : o;
15
+ const t = typeof e == "function" ? e() : e;
16
16
  if (typeof t == "string")
17
17
  return t;
18
18
  if (typeof t == "object")
19
- return h(t);
19
+ return d(t);
20
20
  };
21
- function E({
22
- specConfig: e,
23
- proxyUrl: o
21
+ function C({
22
+ specConfig: a,
23
+ proxyUrl: e
24
24
  }) {
25
- const n = s(""), t = s(l()), i = s(null);
26
- function c(r) {
27
- if (!r) {
28
- t.value = l();
25
+ const r = s(""), t = s(m()), i = s(null);
26
+ function n(o) {
27
+ if (!o) {
28
+ t.value = m();
29
29
  return;
30
30
  }
31
- v(r, {
32
- proxyUrl: o ? p(o) : void 0
33
- }).then((a) => {
34
- i.value = null, t.value = a;
35
- }).catch((a) => {
36
- i.value = a.toString();
31
+ h(o, {
32
+ proxyUrl: e ? f(e) : void 0
33
+ }).then((c) => {
34
+ i.value = null, t.value = c;
35
+ }).catch((c) => {
36
+ i.value = c.toString();
37
37
  });
38
38
  }
39
- return m(
40
- () => p(e),
41
- async (r) => {
42
- var a;
43
- if (r) {
44
- const f = (a = await y(r, p(o))) == null ? void 0 : a.trim();
45
- typeof f == "string" && (n.value = f);
39
+ return u(
40
+ () => f(a),
41
+ async (o) => {
42
+ var c;
43
+ if (o) {
44
+ const p = (c = await v(o, f(e))) == null ? void 0 : c.trim();
45
+ typeof p == "string" && (r.value = p);
46
46
  }
47
47
  },
48
48
  { immediate: !0, deep: !0 }
49
- ), m(n, () => {
50
- c(n.value);
49
+ ), u(r, () => {
50
+ n(r.value);
51
51
  }), {
52
- rawSpec: n,
52
+ rawSpec: r,
53
53
  parsedSpec: t,
54
54
  specErrors: i
55
55
  };
56
56
  }
57
57
  export {
58
- E as useReactiveSpec
58
+ C as useReactiveSpec
59
59
  };