@scalar/api-reference 1.25.115 → 1.25.116

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 (57) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/browser/standalone.js +10903 -10880
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/Content/Lazy/Loading.vue.d.ts.map +1 -1
  5. package/dist/components/Content/Lazy/Loading.vue.js +58 -60
  6. package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
  7. package/dist/components/Content/Tag/TagList.vue.js +36 -38
  8. package/dist/components/Sidebar/SidebarElement.vue.d.ts.map +1 -1
  9. package/dist/components/Sidebar/SidebarElement.vue.js +1 -1
  10. package/dist/components/Sidebar/SidebarElement.vue2.js +59 -55
  11. package/dist/features/ApiClientModal/useApiClient.d.ts +18 -18
  12. package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
  13. package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts +6 -4
  14. package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
  15. package/dist/features/ExampleRequest/ExampleRequest.vue.js +2 -2
  16. package/dist/features/ExampleRequest/ExampleRequest.vue2.js +138 -119
  17. package/dist/features/ExampleRequest/helpers/filter-security-requirements.d.ts +6 -0
  18. package/dist/features/ExampleRequest/helpers/filter-security-requirements.d.ts.map +1 -0
  19. package/dist/features/ExampleRequest/helpers/filter-security-requirements.js +17 -0
  20. package/dist/features/Operation/Operation.vue.d.ts +4 -5
  21. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  22. package/dist/features/Operation/Operation.vue.js +34 -41
  23. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +6 -6
  24. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  25. package/dist/features/Operation/layouts/ClassicLayout.vue.js +4 -4
  26. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +52 -51
  27. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +6 -6
  28. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  29. package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
  30. package/dist/features/Operation/layouts/ModernLayout.vue2.js +70 -70
  31. package/dist/helpers/convert-to-har-request.d.ts +28 -0
  32. package/dist/helpers/convert-to-har-request.d.ts.map +1 -0
  33. package/dist/helpers/convert-to-har-request.js +64 -0
  34. package/dist/helpers/get-example-code.d.ts +9 -0
  35. package/dist/helpers/get-example-code.d.ts.map +1 -0
  36. package/dist/helpers/get-example-code.js +51 -0
  37. package/dist/helpers/index.d.ts +0 -3
  38. package/dist/helpers/index.d.ts.map +1 -1
  39. package/dist/hooks/useNavState.d.ts.map +1 -1
  40. package/dist/hooks/useNavState.js +26 -24
  41. package/dist/hooks/useReactiveSpec.d.ts +1 -1
  42. package/dist/index.js +66 -72
  43. package/dist/style.css +1 -1
  44. package/package.json +10 -10
  45. package/dist/features/Operation/hooks/useRequestExample.d.ts +0 -17
  46. package/dist/features/Operation/hooks/useRequestExample.d.ts.map +0 -1
  47. package/dist/features/Operation/hooks/useRequestExample.js +0 -68
  48. package/dist/helpers/convertRequestToHarRequest.d.ts +0 -7
  49. package/dist/helpers/convertRequestToHarRequest.d.ts.map +0 -1
  50. package/dist/helpers/convertRequestToHarRequest.js +0 -64
  51. package/dist/helpers/get-request.js +0 -6
  52. package/dist/helpers/getExampleCode.d.ts +0 -8
  53. package/dist/helpers/getExampleCode.d.ts.map +0 -1
  54. package/dist/helpers/getExampleCode.js +0 -16
  55. package/dist/helpers/joinWithSlash.d.ts +0 -5
  56. package/dist/helpers/joinWithSlash.d.ts.map +0 -1
  57. package/dist/helpers/joinWithSlash.js +0 -4
@@ -1,19 +1,18 @@
1
1
  import { useConfig as p } from "./useConfig.js";
2
- import { ssrState as m } from "@scalar/oas-utils/helpers";
2
+ import { ssrState as m, combineUrlAndPath as f } from "@scalar/oas-utils/helpers";
3
3
  import { slug as c } from "github-slugger";
4
4
  import { ref as l } from "vue";
5
- import { joinWithSlash as f } from "../helpers/joinWithSlash.js";
6
- const s = l(""), u = l(m.hash ?? ""), a = l(), w = l(!1), d = (e) => {
5
+ const s = l(""), u = l(m.hash ?? ""), o = l(), w = l(!1), h = (e) => {
7
6
  var n;
8
- if (!a.value) return "";
9
- const r = new RegExp("^" + ((n = a.value) == null ? void 0 : n.basePath) + "/?");
7
+ if (!o.value) return "";
8
+ const r = new RegExp("^" + ((n = o.value) == null ? void 0 : n.basePath) + "/?");
10
9
  return decodeURIComponent(e.replace(r, ""));
11
10
  }, I = (e = u.value) => {
12
11
  var i;
13
- const r = (i = e.match(/(tag\/[^/]+)/)) == null ? void 0 : i[0], n = e.startsWith("model") ? "models" : "", o = e.startsWith("webhook") ? "webhooks" : "";
14
- return r || n || o;
12
+ const r = (i = e.match(/(tag\/[^/]+)/)) == null ? void 0 : i[0], n = e.startsWith("model") ? "models" : "", a = e.startsWith("webhook") ? "webhooks" : "";
13
+ return r || n || a;
15
14
  }, v = () => {
16
- u.value = a.value ? d(window.location.pathname) : (
15
+ u.value = o.value ? h(window.location.pathname) : (
17
16
  // Must remove the prefix from the hash as the internal hash value should be pure
18
17
  decodeURIComponent(window.location.hash.replace(/^#/, "")).slice(
19
18
  s.value.length
@@ -21,14 +20,17 @@ const s = l(""), u = l(m.hash ?? ""), a = l(), w = l(!1), d = (e) => {
21
20
  );
22
21
  }, $ = (e, r = window.location.href) => {
23
22
  const n = new URL(r);
24
- a.value ? n.pathname = f(a.value.basePath, e) : n.hash = s.value + e, u.value = e, window.history.replaceState({}, "", n);
23
+ o.value ? n.pathname = f(
24
+ o.value.basePath,
25
+ e
26
+ ) : n.hash = s.value + e, u.value = e, window.history.replaceState({}, "", n);
25
27
  }, S = (e, r = window.location.href, n = window.location.search) => {
26
- const o = new URL(r);
27
- return o.hash = s.value + e, o.search = n, o.toString();
28
- }, y = (e = u.value) => `${s.value}${e}`, R = () => decodeURIComponent(
28
+ const a = new URL(r);
29
+ return a.hash = s.value + e, a.search = n, a.toString();
30
+ }, U = (e = u.value) => `${s.value}${e}`, b = () => decodeURIComponent(
29
31
  window.location.hash.replace(/^#/, "").slice(s.value.length)
30
- ), C = () => {
31
- const e = p(), r = (t) => typeof (e == null ? void 0 : e.generateHeadingSlug) == "function" ? `${e.generateHeadingSlug(t)}` : t.slug ? `description/${t.slug}` : "", n = (t) => t != null && t.name ? typeof (e == null ? void 0 : e.generateModelSlug) == "function" ? `model/${e.generateModelSlug(t)}` : `model/${c(t.name)}` : "models", o = (t) => typeof (e == null ? void 0 : e.generateTagSlug) == "function" ? `tag/${e.generateTagSlug(t)}` : `tag/${c(t.name)}`;
32
+ ), x = () => {
33
+ const e = p(), r = (t) => typeof (e == null ? void 0 : e.generateHeadingSlug) == "function" ? `${e.generateHeadingSlug(t)}` : t.slug ? `description/${t.slug}` : "", n = (t) => t != null && t.name ? typeof (e == null ? void 0 : e.generateModelSlug) == "function" ? `model/${e.generateModelSlug(t)}` : `model/${c(t.name)}` : "models", a = (t) => typeof (e == null ? void 0 : e.generateTagSlug) == "function" ? `tag/${e.generateTagSlug(t)}` : `tag/${c(t.name)}`;
32
34
  return {
33
35
  hash: u,
34
36
  /** Sets the prefix for the hash */
@@ -40,7 +42,7 @@ const s = l(""), u = l(m.hash ?? ""), a = l(), w = l(!1), d = (e) => {
40
42
  * @param hashTarget The hash to target with the return
41
43
  * @returns The full hash
42
44
  */
43
- getFullHash: y,
45
+ getFullHash: U,
44
46
  /**
45
47
  * Gets the hashed url with the prefix
46
48
  * @param replacementHash The hash to replace the current hash with
@@ -54,27 +56,27 @@ const s = l(""), u = l(m.hash ?? ""), a = l(), w = l(!1), d = (e) => {
54
56
  */
55
57
  replaceUrlState: $,
56
58
  /** Gets the portion of the hash used by the references */
57
- getReferenceHash: R,
59
+ getReferenceHash: b,
58
60
  getWebhookId: (t) => t != null && t.name ? typeof (e == null ? void 0 : e.generateWebhookSlug) == "function" ? `webhook/${e.generateWebhookSlug(t)}` : `webhook/${t.method}/${c(t.name)}` : "webhooks",
59
61
  getModelId: n,
60
62
  getHeadingId: r,
61
63
  getOperationId: (t, g) => {
62
- var h;
63
- return typeof (e == null ? void 0 : e.generateOperationSlug) == "function" ? `${o(g)}/${e.generateOperationSlug({
64
+ var d;
65
+ return typeof (e == null ? void 0 : e.generateOperationSlug) == "function" ? `${a(g)}/${e.generateOperationSlug({
64
66
  path: t.path,
65
67
  operationId: t.operationId,
66
68
  method: t.httpVerb,
67
- summary: (h = t.information) == null ? void 0 : h.summary
68
- })}` : `${o(g)}/${t.httpVerb}${t.path}`;
69
+ summary: (d = t.information) == null ? void 0 : d.summary
70
+ })}` : `${a(g)}/${t.httpVerb}${t.path}`;
69
71
  },
70
- getPathRoutingId: d,
72
+ getPathRoutingId: h,
71
73
  getSectionId: I,
72
- getTagId: o,
74
+ getTagId: a,
73
75
  isIntersectionEnabled: w,
74
- pathRouting: a,
76
+ pathRouting: o,
75
77
  updateHash: v
76
78
  };
77
79
  };
78
80
  export {
79
- C as useNavState
81
+ x as useNavState
80
82
  };
@@ -153,8 +153,8 @@ export declare function useReactiveSpec({ specConfig, proxyUrl, }: {
153
153
  version?: string | undefined;
154
154
  summary?: string | undefined;
155
155
  license?: {
156
- url?: string | undefined;
157
156
  name?: string | undefined;
157
+ url?: string | undefined;
158
158
  identifier?: string | undefined;
159
159
  } | undefined;
160
160
  } | undefined;