@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.
- package/CHANGELOG.md +24 -0
- package/dist/browser/standalone.js +10903 -10880
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/Content/Lazy/Loading.vue.d.ts.map +1 -1
- package/dist/components/Content/Lazy/Loading.vue.js +58 -60
- package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/TagList.vue.js +36 -38
- package/dist/components/Sidebar/SidebarElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarElement.vue.js +1 -1
- package/dist/components/Sidebar/SidebarElement.vue2.js +59 -55
- package/dist/features/ApiClientModal/useApiClient.d.ts +18 -18
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
- package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts +6 -4
- package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
- package/dist/features/ExampleRequest/ExampleRequest.vue.js +2 -2
- package/dist/features/ExampleRequest/ExampleRequest.vue2.js +138 -119
- package/dist/features/ExampleRequest/helpers/filter-security-requirements.d.ts +6 -0
- package/dist/features/ExampleRequest/helpers/filter-security-requirements.d.ts.map +1 -0
- package/dist/features/ExampleRequest/helpers/filter-security-requirements.js +17 -0
- package/dist/features/Operation/Operation.vue.d.ts +4 -5
- package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
- package/dist/features/Operation/Operation.vue.js +34 -41
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +6 -6
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.js +4 -4
- package/dist/features/Operation/layouts/ClassicLayout.vue2.js +52 -51
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +6 -6
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
- package/dist/features/Operation/layouts/ModernLayout.vue2.js +70 -70
- package/dist/helpers/convert-to-har-request.d.ts +28 -0
- package/dist/helpers/convert-to-har-request.d.ts.map +1 -0
- package/dist/helpers/convert-to-har-request.js +64 -0
- package/dist/helpers/get-example-code.d.ts +9 -0
- package/dist/helpers/get-example-code.d.ts.map +1 -0
- package/dist/helpers/get-example-code.js +51 -0
- package/dist/helpers/index.d.ts +0 -3
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/hooks/useNavState.d.ts.map +1 -1
- package/dist/hooks/useNavState.js +26 -24
- package/dist/hooks/useReactiveSpec.d.ts +1 -1
- package/dist/index.js +66 -72
- package/dist/style.css +1 -1
- package/package.json +10 -10
- package/dist/features/Operation/hooks/useRequestExample.d.ts +0 -17
- package/dist/features/Operation/hooks/useRequestExample.d.ts.map +0 -1
- package/dist/features/Operation/hooks/useRequestExample.js +0 -68
- package/dist/helpers/convertRequestToHarRequest.d.ts +0 -7
- package/dist/helpers/convertRequestToHarRequest.d.ts.map +0 -1
- package/dist/helpers/convertRequestToHarRequest.js +0 -64
- package/dist/helpers/get-request.js +0 -6
- package/dist/helpers/getExampleCode.d.ts +0 -8
- package/dist/helpers/getExampleCode.d.ts.map +0 -1
- package/dist/helpers/getExampleCode.js +0 -16
- package/dist/helpers/joinWithSlash.d.ts +0 -5
- package/dist/helpers/joinWithSlash.d.ts.map +0 -1
- 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
|
-
|
|
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 (!
|
|
9
|
-
const r = new RegExp("^" + ((n =
|
|
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" : "",
|
|
14
|
-
return r || n ||
|
|
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 =
|
|
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
|
-
|
|
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
|
|
27
|
-
return
|
|
28
|
-
},
|
|
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
|
-
),
|
|
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",
|
|
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:
|
|
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:
|
|
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
|
|
63
|
-
return typeof (e == null ? void 0 : e.generateOperationSlug) == "function" ? `${
|
|
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: (
|
|
68
|
-
})}` : `${
|
|
69
|
+
summary: (d = t.information) == null ? void 0 : d.summary
|
|
70
|
+
})}` : `${a(g)}/${t.httpVerb}${t.path}`;
|
|
69
71
|
},
|
|
70
|
-
getPathRoutingId:
|
|
72
|
+
getPathRoutingId: h,
|
|
71
73
|
getSectionId: I,
|
|
72
|
-
getTagId:
|
|
74
|
+
getTagId: a,
|
|
73
75
|
isIntersectionEnabled: w,
|
|
74
|
-
pathRouting:
|
|
76
|
+
pathRouting: o,
|
|
75
77
|
updateHash: v
|
|
76
78
|
};
|
|
77
79
|
};
|
|
78
80
|
export {
|
|
79
|
-
|
|
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;
|