@scalar/api-reference 1.28.6 → 1.28.7
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 +16 -0
- package/dist/browser/standalone.js +5509 -5502
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReference.vue.d.ts.map +1 -1
- package/dist/components/ApiReference.vue.js +26 -15
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +2 -2
- package/dist/components/ApiReferenceLayout.vue2.js +128 -129
- package/dist/components/Sidebar/SidebarElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarElement.vue.js +2 -2
- package/dist/components/Sidebar/SidebarElement.vue2.js +38 -38
- package/dist/features/Search/useSearchIndex.d.ts.map +1 -1
- package/dist/features/Search/useSearchIndex.js +9 -9
- package/dist/hooks/index.d.ts +0 -2
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/useMultipleDocuments.d.ts +6 -2
- package/dist/hooks/useMultipleDocuments.d.ts.map +1 -1
- package/dist/hooks/useMultipleDocuments.js +43 -33
- package/dist/hooks/useNavState.d.ts +13 -4
- package/dist/hooks/useNavState.d.ts.map +1 -1
- package/dist/hooks/useNavState.js +52 -48
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types.d.ts +1 -10
- package/dist/types.d.ts.map +1 -1
- package/package.json +8 -7
- package/dist/hooks/useClientStore.d.ts +0 -2
- package/dist/hooks/useClientStore.d.ts.map +0 -1
- package/dist/hooks/useRefOnMount.d.ts +0 -6
- package/dist/hooks/useRefOnMount.d.ts.map +0 -1
|
@@ -2,14 +2,14 @@ import N from "fuse.js";
|
|
|
2
2
|
import { ref as h, watch as R, computed as V } from "vue";
|
|
3
3
|
import { extractRequestBody as A } from "../../helpers/specHelpers.js";
|
|
4
4
|
import { useOperation as B } from "../../hooks/useOperation.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { useSidebar as P } from "../../hooks/useSidebar.js";
|
|
6
|
+
import { useNavState as z } from "../../hooks/useNavState.js";
|
|
7
7
|
import { getHeadingsFromMarkdown as G } from "../../helpers/getHeadingsFromMarkdown.js";
|
|
8
8
|
import { getModels as J } from "../../helpers/getModels.js";
|
|
9
9
|
function te({
|
|
10
10
|
specification: a
|
|
11
11
|
}) {
|
|
12
|
-
const {
|
|
12
|
+
const { hideModels: T } = P(), { getHeadingId: j, getWebhookId: L, getModelId: W, getOperationId: q, getTagId: C } = z(), o = h([]), r = h([]), d = h(0), s = h(""), i = new N(o.value, {
|
|
13
13
|
keys: ["title", "description", "body"]
|
|
14
14
|
}), p = () => {
|
|
15
15
|
d.value = 0, r.value = i.search(s.value);
|
|
@@ -37,14 +37,14 @@ function te({
|
|
|
37
37
|
type: "heading",
|
|
38
38
|
title: `Info > ${e.value}`,
|
|
39
39
|
description: "",
|
|
40
|
-
href: `#${
|
|
40
|
+
href: `#${j(e)}`,
|
|
41
41
|
tag: e.slug,
|
|
42
42
|
body: ""
|
|
43
43
|
});
|
|
44
44
|
}), o.value = o.value.concat(l)), ($ = (D = a.value) == null ? void 0 : D.tags) == null || $.forEach((e) => {
|
|
45
45
|
const S = {
|
|
46
46
|
title: e["x-displayName"] ?? e.name,
|
|
47
|
-
href: `#${
|
|
47
|
+
href: `#${C(e)}`,
|
|
48
48
|
description: e.description,
|
|
49
49
|
type: "tag",
|
|
50
50
|
tag: e.name,
|
|
@@ -57,7 +57,7 @@ function te({
|
|
|
57
57
|
const O = {
|
|
58
58
|
type: "req",
|
|
59
59
|
title: t.name ?? t.path,
|
|
60
|
-
href: `#${
|
|
60
|
+
href: `#${q(t, e)}`,
|
|
61
61
|
operationId: t.operationId,
|
|
62
62
|
description: t.description ?? "",
|
|
63
63
|
httpVerb: t.httpVerb,
|
|
@@ -75,7 +75,7 @@ function te({
|
|
|
75
75
|
m.push({
|
|
76
76
|
type: "webhook",
|
|
77
77
|
title: "Webhook",
|
|
78
|
-
href: `#${
|
|
78
|
+
href: `#${L({ name: e, method: t })}`,
|
|
79
79
|
description: `${(c = n[e][t]) == null ? void 0 : c.name}`,
|
|
80
80
|
httpVerb: t,
|
|
81
81
|
tag: e,
|
|
@@ -83,12 +83,12 @@ function te({
|
|
|
83
83
|
});
|
|
84
84
|
}), o.value = o.value.concat(m);
|
|
85
85
|
});
|
|
86
|
-
const v =
|
|
86
|
+
const v = T.value ? {} : J(a.value), b = [];
|
|
87
87
|
v && (Object.keys(v).forEach((e) => {
|
|
88
88
|
b.push({
|
|
89
89
|
type: "model",
|
|
90
90
|
title: "Model",
|
|
91
|
-
href: `#${
|
|
91
|
+
href: `#${W({ name: e })}`,
|
|
92
92
|
description: v[e].title ?? e,
|
|
93
93
|
tag: e,
|
|
94
94
|
body: ""
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,mBAAmB,CAAA;AACjC,cAAc,cAAc,CAAA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { NavState } from '../hooks/useNavState.js';
|
|
1
2
|
import { type ApiReferenceConfiguration, type ApiReferenceConfigurationWithSources } from '@scalar/types/api-reference';
|
|
2
3
|
import { type Ref } from 'vue';
|
|
3
4
|
type UseMultipleDocumentsProps = {
|
|
@@ -8,8 +9,8 @@ type UseMultipleDocumentsProps = {
|
|
|
8
9
|
configuration: Ref<Partial<ApiReferenceConfiguration> | Partial<ApiReferenceConfiguration>[] | Partial<ApiReferenceConfigurationWithSources> | undefined>;
|
|
9
10
|
/** The initial index to pre-select a document, if there is no query parameter available */
|
|
10
11
|
initialIndex?: number;
|
|
11
|
-
};
|
|
12
|
-
export declare const useMultipleDocuments: ({ configuration, initialIndex }: UseMultipleDocumentsProps) => {
|
|
12
|
+
} & NavState;
|
|
13
|
+
export declare const useMultipleDocuments: ({ configuration, initialIndex, isIntersectionEnabled, hash, hashPrefix, }: UseMultipleDocumentsProps) => {
|
|
13
14
|
selectedConfiguration: import("vue").ComputedRef<{
|
|
14
15
|
hideClientButton: boolean;
|
|
15
16
|
showSidebar: boolean;
|
|
@@ -87,6 +88,9 @@ export declare const useMultipleDocuments: ({ configuration, initialIndex }: Use
|
|
|
87
88
|
slug?: string | undefined;
|
|
88
89
|
}[]>;
|
|
89
90
|
selectedDocumentIndex: Ref<number, number>;
|
|
91
|
+
isIntersectionEnabled: Ref<boolean, boolean>;
|
|
92
|
+
hash: Ref<string, string>;
|
|
93
|
+
hashPrefix: Ref<string, string>;
|
|
90
94
|
};
|
|
91
95
|
export {};
|
|
92
96
|
//# sourceMappingURL=useMultipleDocuments.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMultipleDocuments.d.ts","sourceRoot":"","sources":["../../src/hooks/useMultipleDocuments.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useMultipleDocuments.d.ts","sourceRoot":"","sources":["../../src/hooks/useMultipleDocuments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAEnD,OAAO,EACL,KAAK,yBAAyB,EAC9B,KAAK,oCAAoC,EAI1C,MAAM,6BAA6B,CAAA;AAGpC,OAAO,EAAE,KAAK,GAAG,EAAwB,MAAM,KAAK,CAAA;AAKpD,KAAK,yBAAyB,GAAG;IAC/B;;;OAGG;IACH,aAAa,EAAE,GAAG,CACd,OAAO,CAAC,yBAAyB,CAAC,GAClC,OAAO,CAAC,yBAAyB,CAAC,EAAE,GACpC,OAAO,CAAC,oCAAoC,CAAC,GAC7C,SAAS,CACZ,CAAA;IACD,2FAA2F;IAC3F,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,GAAG,QAAQ,CAAA;AAsCZ,eAAO,MAAM,oBAAoB,8EAM9B,yBAAyB;;;;;;;;;;;;;;;mDAgI63xB,GAAG;;;;eAAoJ,CAAC;mBAAqC,CAAC,mCAAmC,GAAG;iBAA0E,CAAC;gBAAkC,CAAC;;;;;;;;;;;;;;;;;;;yCAAwsC,GAAI;2CAA6E,GAAI;;;;;gBAA0J,CAAC;WAA4B,GAAI;;gBAAyF,CAAC;WAA4B,GAAI;;gBAAuF,CAAC;WAA4B,GAAI;;;;uBAAkJ,CAAC;mBAAqC,CAAC;WAA4B,GAAI;;;kBAAmH,CAAC;WAA4B,GAAI;qBAA0D,GAAG;qCAAuE,GAAI;;2DAAgK,GAAI;4EAAgH,GAAI;;;;mDA9H3q3B,GAAE;;;;;;;;CA6HxB,CAAA"}
|
|
@@ -1,57 +1,67 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
const f = "api", p = new S(), R = (e, s = 0) => {
|
|
1
|
+
import { isDefined as S } from "@scalar/oas-utils/helpers";
|
|
2
|
+
import { isConfigurationWithSources as p, apiReferenceConfigurationSchema as m } from "@scalar/types/api-reference";
|
|
3
|
+
import y from "github-slugger";
|
|
4
|
+
import { computed as v, ref as R, watch as b } from "vue";
|
|
5
|
+
const d = "api", w = new y(), A = (e, r = 0) => {
|
|
7
6
|
if (!(!(e != null && e.url) && !(e != null && e.content)))
|
|
8
|
-
return
|
|
7
|
+
return w.reset(), e.title ? {
|
|
9
8
|
...e,
|
|
10
|
-
slug: e.slug ||
|
|
9
|
+
slug: e.slug || w.slug(e.title),
|
|
11
10
|
title: e.title
|
|
12
11
|
} : e.slug ? {
|
|
13
12
|
...e,
|
|
14
13
|
title: e.slug
|
|
15
14
|
} : {
|
|
16
15
|
...e,
|
|
17
|
-
slug: `api-${
|
|
18
|
-
title: `API #${
|
|
16
|
+
slug: `api-${r + 1}`,
|
|
17
|
+
title: `API #${r + 1}`
|
|
19
18
|
};
|
|
20
|
-
},
|
|
21
|
-
|
|
19
|
+
}, N = ({
|
|
20
|
+
configuration: e,
|
|
21
|
+
initialIndex: r,
|
|
22
|
+
isIntersectionEnabled: s,
|
|
23
|
+
hash: o,
|
|
24
|
+
hashPrefix: f
|
|
25
|
+
}) => {
|
|
26
|
+
const a = v(() => {
|
|
22
27
|
var l;
|
|
23
|
-
return e.value ? (
|
|
24
|
-
}),
|
|
25
|
-
if (
|
|
28
|
+
return e.value ? (p(e.value) ? ((l = e.value) == null ? void 0 : l.sources) ?? [] : [e.value].flat().map((t) => t)).map((t, n) => t && A(t, n)).filter(S) : [];
|
|
29
|
+
}), g = (i) => {
|
|
30
|
+
if (typeof window > "u" || a.value.length === 1)
|
|
26
31
|
return;
|
|
27
|
-
const l = new URL(window.location.href), t =
|
|
28
|
-
l.searchParams.set(
|
|
29
|
-
},
|
|
30
|
-
|
|
32
|
+
const l = new URL(window.location.href), t = a.value[i], n = (t == null ? void 0 : t.slug) ?? i.toString();
|
|
33
|
+
l.searchParams.set(d, n), l.hash = "", window.history.replaceState({}, "", l.toString()), o.value = "", f.value = "", s.value = !1, typeof window < "u" && window.scrollTo({ top: 0, behavior: "instant" });
|
|
34
|
+
}, u = R((() => {
|
|
35
|
+
if (typeof window > "u")
|
|
36
|
+
return typeof r == "number" ? r : 0;
|
|
37
|
+
const l = new URL(window.location.href).searchParams.get(d) || "0", t = a.value.findIndex((h) => h.slug === l);
|
|
31
38
|
if (t !== -1)
|
|
32
39
|
return t;
|
|
33
|
-
const
|
|
34
|
-
return !isNaN(
|
|
35
|
-
})()),
|
|
40
|
+
const n = Number.parseInt(l, 10);
|
|
41
|
+
return !isNaN(n) && n >= 0 && n < a.value.length ? n : typeof r == "number" ? r : 0;
|
|
42
|
+
})()), c = v(() => {
|
|
36
43
|
var l, t;
|
|
37
|
-
if (e.value &&
|
|
44
|
+
if (e.value && p(e.value))
|
|
38
45
|
return m.parse({
|
|
39
46
|
...e.value,
|
|
40
|
-
...(t = (l = e.value) == null ? void 0 : l.sources) == null ? void 0 : t[
|
|
41
|
-
...
|
|
47
|
+
...(t = (l = e.value) == null ? void 0 : l.sources) == null ? void 0 : t[u.value],
|
|
48
|
+
...a.value[u.value]
|
|
42
49
|
});
|
|
43
|
-
const
|
|
50
|
+
const i = [e.value].flat()[u.value] ?? {};
|
|
44
51
|
return m.parse({
|
|
45
|
-
...
|
|
46
|
-
...
|
|
52
|
+
...i,
|
|
53
|
+
...a.value[u.value]
|
|
47
54
|
});
|
|
48
55
|
});
|
|
49
|
-
return b(
|
|
50
|
-
selectedConfiguration:
|
|
51
|
-
availableDocuments:
|
|
52
|
-
selectedDocumentIndex:
|
|
56
|
+
return b(u, g, { flush: "sync" }), {
|
|
57
|
+
selectedConfiguration: c,
|
|
58
|
+
availableDocuments: a,
|
|
59
|
+
selectedDocumentIndex: u,
|
|
60
|
+
isIntersectionEnabled: s,
|
|
61
|
+
hash: o,
|
|
62
|
+
hashPrefix: f
|
|
53
63
|
};
|
|
54
64
|
};
|
|
55
65
|
export {
|
|
56
|
-
|
|
66
|
+
N as useMultipleDocuments
|
|
57
67
|
};
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
import type { Heading,
|
|
1
|
+
import type { Heading, Tag, TransformedOperation } from '@scalar/types/legacy';
|
|
2
|
+
import { type InjectionKey, type Ref } from 'vue';
|
|
3
|
+
export type NavState = {
|
|
4
|
+
/** The URL hash without the #, also the "hash" pulled from pathRouting */
|
|
5
|
+
hash: Ref<string>;
|
|
6
|
+
/** The prefix for the hash, used in ORG */
|
|
7
|
+
hashPrefix: Ref<string>;
|
|
8
|
+
/** Whether the intersection observer is enabled and updating the hash as we scroll */
|
|
9
|
+
isIntersectionEnabled: Ref<boolean>;
|
|
10
|
+
};
|
|
11
|
+
export declare const NAV_STATE_SYMBOL: InjectionKey<NavState>;
|
|
2
12
|
/**
|
|
3
13
|
* Hook which provides reactive hash state from the URL
|
|
4
14
|
* Also hash is only readable by the client so keep that in mind for SSR
|
|
@@ -7,7 +17,7 @@ import type { Heading, PathRouting, Tag, TransformedOperation } from '@scalar/ty
|
|
|
7
17
|
* when clicking on sidebar links or going backwards
|
|
8
18
|
*/
|
|
9
19
|
export declare const useNavState: () => {
|
|
10
|
-
hash:
|
|
20
|
+
hash: Ref<string, string>;
|
|
11
21
|
/** Sets the prefix for the hash */
|
|
12
22
|
setHashPrefix: (prefix: string) => void;
|
|
13
23
|
/**
|
|
@@ -42,8 +52,7 @@ export declare const useNavState: () => {
|
|
|
42
52
|
getPathRoutingId: (pathName: string) => string;
|
|
43
53
|
getSectionId: (hashStr?: string) => string;
|
|
44
54
|
getTagId: (tag: Tag) => string;
|
|
45
|
-
isIntersectionEnabled:
|
|
46
|
-
pathRouting: import("vue").Ref<PathRouting | undefined, PathRouting | undefined>;
|
|
55
|
+
isIntersectionEnabled: Ref<boolean, boolean>;
|
|
47
56
|
updateHash: () => void;
|
|
48
57
|
};
|
|
49
58
|
//# sourceMappingURL=useNavState.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useNavState.d.ts","sourceRoot":"","sources":["../../src/hooks/useNavState.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"useNavState.d.ts","sourceRoot":"","sources":["../../src/hooks/useNavState.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAE9E,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,GAAG,EAAe,MAAM,KAAK,CAAA;AAE9D,MAAM,MAAM,QAAQ,GAAG;IACrB,0EAA0E;IAC1E,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACjB,2CAA2C;IAC3C,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACvB,sFAAsF;IACtF,qBAAqB,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;CACpC,CAAA;AACD,eAAO,MAAM,gBAAgB,EAAe,YAAY,CAAC,QAAQ,CAAC,CAAA;AAOlE;;;;;;GAMG;AACH,eAAO,MAAM,WAAW;;IAiIpB,mCAAmC;4BACX,MAAM;IAG9B;;;;OAIG;+BA7E4B,MAAM;IA+ErC;;;;;OAKG;oCA3FkC,MAAM;IA6F3C;;;OAGG;uCAlHqC,MAAM;IAoH9C,0DAA0D;;6BAnC5B;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE;yBA9BrC;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE;4BAXb,OAAO;gCA6BH,oBAAoB,aAAa,GAAG;iCA/FnC,MAAM;;oBAwFnB,GAAG;;;CAkE3B,CAAA"}
|
|
@@ -1,76 +1,80 @@
|
|
|
1
|
-
import { useConfig as
|
|
2
|
-
import {
|
|
3
|
-
import { slug as
|
|
4
|
-
import { ref as
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
1
|
+
import { useConfig as $ } from "./useConfig.js";
|
|
2
|
+
import { combineUrlAndPath as R } from "@scalar/oas-utils/helpers";
|
|
3
|
+
import { slug as l } from "github-slugger";
|
|
4
|
+
import { ref as i, inject as b } from "vue";
|
|
5
|
+
const y = Symbol(), U = i(!1), P = i(""), k = i(""), C = () => {
|
|
6
|
+
const { isIntersectionEnabled: h, hash: r, hashPrefix: o } = b(y, {
|
|
7
|
+
isIntersectionEnabled: U,
|
|
8
|
+
hash: P,
|
|
9
|
+
hashPrefix: k
|
|
10
|
+
}), t = $(), c = (e) => {
|
|
11
|
+
var n;
|
|
12
|
+
if (!t.value.pathRouting)
|
|
13
|
+
return "";
|
|
14
|
+
const a = new RegExp("^" + ((n = t.value.pathRouting) == null ? void 0 : n.basePath) + "/?");
|
|
15
|
+
return decodeURIComponent(e.replace(a, ""));
|
|
16
|
+
}, d = (e = r.value) => {
|
|
17
|
+
var g;
|
|
18
|
+
const a = (g = e.match(/(tag\/[^/]+)/)) == null ? void 0 : g[0], n = e.startsWith("model") ? "models" : "", u = e.startsWith("webhook") ? "webhooks" : "";
|
|
19
|
+
return a || n || u;
|
|
20
|
+
}, f = () => {
|
|
21
|
+
r.value = t.value.pathRouting ? c(window.location.pathname) : (
|
|
22
|
+
// Must remove the prefix from the hash as the internal hash value should be pure
|
|
23
|
+
decodeURIComponent(window.location.hash.replace(/^#/, "")).slice(o.value.length)
|
|
24
|
+
);
|
|
25
|
+
}, p = (e, a = window.location.href) => {
|
|
26
|
+
const n = new URL(a);
|
|
27
|
+
t.value.pathRouting ? n.pathname = R(t.value.pathRouting.basePath, e) : n.hash = o.value + e, r.value = e, window.history.replaceState({}, "", n);
|
|
28
|
+
}, m = (e, a = window.location.href, n = window.location.search) => {
|
|
29
|
+
const u = new URL(a);
|
|
30
|
+
return u.hash = o.value + e, u.search = n, u.toString();
|
|
31
|
+
}, v = (e = r.value) => `${o.value}${e}`, I = () => decodeURIComponent(window.location.hash.replace(/^#/, "").slice(o.value.length)), w = (e) => typeof t.value.generateHeadingSlug == "function" ? `${t.value.generateHeadingSlug(e)}` : e.slug ? `description/${e.slug}` : "", S = (e) => e != null && e.name ? typeof t.value.generateModelSlug == "function" ? `model/${t.value.generateModelSlug(e)}` : `model/${l(e.name)}` : "models", s = (e) => typeof t.value.generateTagSlug == "function" ? `tag/${t.value.generateTagSlug(e)}` : `tag/${l(e.name)}`;
|
|
28
32
|
return {
|
|
29
|
-
hash:
|
|
33
|
+
hash: r,
|
|
30
34
|
/** Sets the prefix for the hash */
|
|
31
35
|
setHashPrefix: (e) => {
|
|
32
|
-
|
|
36
|
+
o.value = e;
|
|
33
37
|
},
|
|
34
38
|
/**
|
|
35
39
|
* Gets the full hash with the prefix
|
|
36
40
|
* @param hashTarget The hash to target with the return
|
|
37
41
|
* @returns The full hash
|
|
38
42
|
*/
|
|
39
|
-
getFullHash:
|
|
43
|
+
getFullHash: v,
|
|
40
44
|
/**
|
|
41
45
|
* Gets the hashed url with the prefix
|
|
42
46
|
* @param replacementHash The hash to replace the current hash with
|
|
43
47
|
* @param url The url to get the hashed url from
|
|
44
48
|
* @returns The hashed url
|
|
45
49
|
*/
|
|
46
|
-
getHashedUrl:
|
|
50
|
+
getHashedUrl: m,
|
|
47
51
|
/**
|
|
48
52
|
* Replaces the URL state with the new url and hash
|
|
49
53
|
* Replacement is used so that hash changes don't trigger the url hash watcher and cause a scroll
|
|
50
54
|
*/
|
|
51
|
-
replaceUrlState:
|
|
55
|
+
replaceUrlState: p,
|
|
52
56
|
/** Gets the portion of the hash used by the references */
|
|
53
|
-
getReferenceHash:
|
|
54
|
-
getWebhookId: (e) => e != null && e.name ? typeof t.value.generateWebhookSlug == "function" ? `webhook/${t.value.generateWebhookSlug(e)}` : `webhook/${e.method}/${
|
|
55
|
-
getModelId:
|
|
56
|
-
getHeadingId:
|
|
57
|
-
getOperationId: (e,
|
|
58
|
-
var
|
|
59
|
-
return typeof t.value.generateOperationSlug == "function" ? `${
|
|
57
|
+
getReferenceHash: I,
|
|
58
|
+
getWebhookId: (e) => e != null && e.name ? typeof t.value.generateWebhookSlug == "function" ? `webhook/${t.value.generateWebhookSlug(e)}` : `webhook/${e.method}/${l(e.name)}` : "webhooks",
|
|
59
|
+
getModelId: S,
|
|
60
|
+
getHeadingId: w,
|
|
61
|
+
getOperationId: (e, a) => {
|
|
62
|
+
var n;
|
|
63
|
+
return typeof t.value.generateOperationSlug == "function" ? `${s(a)}/${t.value.generateOperationSlug({
|
|
60
64
|
path: e.path,
|
|
61
65
|
operationId: e.operationId,
|
|
62
66
|
method: e.httpVerb,
|
|
63
|
-
summary: (
|
|
64
|
-
})}` : `${
|
|
67
|
+
summary: (n = e.information) == null ? void 0 : n.summary
|
|
68
|
+
})}` : `${s(a)}/${e.httpVerb}${e.path}`;
|
|
65
69
|
},
|
|
66
|
-
getPathRoutingId:
|
|
67
|
-
getSectionId:
|
|
68
|
-
getTagId:
|
|
69
|
-
isIntersectionEnabled:
|
|
70
|
-
|
|
71
|
-
updateHash: I
|
|
70
|
+
getPathRoutingId: c,
|
|
71
|
+
getSectionId: d,
|
|
72
|
+
getTagId: s,
|
|
73
|
+
isIntersectionEnabled: h,
|
|
74
|
+
updateHash: f
|
|
72
75
|
};
|
|
73
76
|
};
|
|
74
77
|
export {
|
|
75
|
-
|
|
78
|
+
y as NAV_STATE_SYMBOL,
|
|
79
|
+
C as useNavState
|
|
76
80
|
};
|