@scalar/api-reference 1.25.115 → 1.25.118
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 +76 -0
- package/dist/browser/standalone.js +15973 -15829
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +2 -2
- package/dist/components/ApiReferenceLayout.vue2.js +1 -1
- package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
- package/dist/components/Content/Introduction/Introduction.vue.js +1 -1
- package/dist/components/Content/Introduction/Introduction.vue2.js +39 -38
- 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/Schema/SchemaProperty.vue.d.ts +6 -0
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.js +2 -2
- package/dist/components/Content/Schema/SchemaProperty.vue2.js +124 -120
- package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.d.ts +1 -3
- package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.d.ts.map +1 -1
- 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 +208 -128
- 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 +1 -1
- package/dist/features/ExampleRequest/ExampleRequest.vue2.js +130 -119
- package/dist/features/ExampleResponses/ExampleResponses.vue.d.ts +2 -2
- package/dist/features/ExampleResponses/ExampleResponses.vue.d.ts.map +1 -1
- package/dist/features/ExampleResponses/ExampleResponses.vue.js +3 -3
- package/dist/features/ExampleResponses/ExampleResponses.vue2.js +86 -91
- 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 +2 -2
- package/dist/features/Operation/layouts/ClassicLayout.vue2.js +54 -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 +71 -71
- package/dist/helpers/get-request.d.ts.map +1 -1
- package/dist/helpers/index.d.ts +0 -3
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/hooks/useConfig.d.ts +1 -1
- package/dist/hooks/useConfig.d.ts.map +1 -1
- package/dist/hooks/useConfig.js +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 +12 -12
- 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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModernLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/layouts/ModernLayout.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ModernLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/layouts/ModernLayout.vue"],"names":[],"mappings":"AA4IA,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EACT,MAAM,EACP,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAQhE,KAAK,WAAW,GAAG;IACjB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,UAAU,EAAE,UAAU,CAAA;IACtB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,SAAS,EAAE,SAAS,CAAA;IACpB,0CAA0C;IAC1C,oBAAoB,EAAE,oBAAoB,CAAA;CAC3C,CAAC;;AA0NF,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ModernLayout.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-0916dd9f"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -1,55 +1,57 @@
|
|
|
1
|
-
import { defineComponent as c, openBlock as
|
|
2
|
-
import
|
|
3
|
-
import { getOperationStability as d, getOperationStabilityColor as
|
|
4
|
-
import { ScalarMarkdown as
|
|
1
|
+
import { defineComponent as c, openBlock as i, createBlock as l, unref as o, withCtx as t, createVNode as r, normalizeClass as p, createTextVNode as s, toDisplayString as m, createCommentVNode as O, createElementVNode as a } from "vue";
|
|
2
|
+
import h from "../../../components/OperationPath.vue.js";
|
|
3
|
+
import { getOperationStability as d, getOperationStabilityColor as v, isOperationDeprecated as S } from "../../../helpers/operation.js";
|
|
4
|
+
import { ScalarMarkdown as C, ScalarErrorBoundary as f } from "@scalar/components";
|
|
5
5
|
import _ from "../components/OperationParameters.vue.js";
|
|
6
|
-
import
|
|
6
|
+
import y from "../components/OperationResponses.vue.js";
|
|
7
7
|
import g from "../../../components/Section/Section.vue.js";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
8
|
+
import b from "../../../components/Section/SectionContent.vue.js";
|
|
9
|
+
import k from "../../../components/Badge/Badge.vue.js";
|
|
10
|
+
import B from "../../../components/Section/SectionHeader.vue.js";
|
|
11
|
+
import E from "../../../components/Anchor/Anchor.vue.js";
|
|
12
12
|
import N from "../../../components/Section/SectionColumns.vue.js";
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
const
|
|
13
|
+
import u from "../../../components/Section/SectionColumn.vue.js";
|
|
14
|
+
import V from "../../ExampleRequest/ExampleRequest.vue.js";
|
|
15
|
+
import w from "../../TestRequestButton/TestRequestButton.vue.js";
|
|
16
|
+
import R from "../../ExampleResponses/ExampleResponses.vue.js";
|
|
17
|
+
const q = { class: "operation-details" }, D = { class: "examples" }, Y = /* @__PURE__ */ c({
|
|
18
18
|
__name: "ModernLayout",
|
|
19
19
|
props: {
|
|
20
20
|
id: {},
|
|
21
|
+
collection: {},
|
|
22
|
+
server: {},
|
|
21
23
|
operation: {},
|
|
22
|
-
|
|
23
|
-
request: {},
|
|
24
|
-
secretCredentials: {}
|
|
24
|
+
transformedOperation: {}
|
|
25
25
|
},
|
|
26
26
|
setup(M) {
|
|
27
|
-
return (e, T) => (
|
|
27
|
+
return (e, T) => (i(), l(o(g), {
|
|
28
28
|
id: e.id,
|
|
29
|
-
label: e.
|
|
29
|
+
label: e.transformedOperation.name
|
|
30
30
|
}, {
|
|
31
|
-
default:
|
|
32
|
-
|
|
33
|
-
default:
|
|
34
|
-
o(d)(e.
|
|
31
|
+
default: t(() => [
|
|
32
|
+
r(o(b), null, {
|
|
33
|
+
default: t(() => [
|
|
34
|
+
o(d)(e.transformedOperation) ? (i(), l(o(k), {
|
|
35
35
|
key: 0,
|
|
36
|
-
class: p(o(
|
|
36
|
+
class: p(o(v)(e.transformedOperation))
|
|
37
37
|
}, {
|
|
38
|
-
default:
|
|
39
|
-
s(m(o(d)(e.
|
|
38
|
+
default: t(() => [
|
|
39
|
+
s(m(o(d)(e.transformedOperation)), 1)
|
|
40
40
|
]),
|
|
41
41
|
_: 1
|
|
42
|
-
}, 8, ["class"])) :
|
|
43
|
-
|
|
44
|
-
class: p(
|
|
42
|
+
}, 8, ["class"])) : O("", !0),
|
|
43
|
+
a("div", {
|
|
44
|
+
class: p(
|
|
45
|
+
o(S)(e.transformedOperation) ? "deprecated" : ""
|
|
46
|
+
)
|
|
45
47
|
}, [
|
|
46
|
-
|
|
47
|
-
default:
|
|
48
|
-
|
|
48
|
+
r(o(B), { level: 3 }, {
|
|
49
|
+
default: t(() => [
|
|
50
|
+
r(o(E), {
|
|
49
51
|
id: e.id ?? ""
|
|
50
52
|
}, {
|
|
51
|
-
default:
|
|
52
|
-
s(m(e.
|
|
53
|
+
default: t(() => [
|
|
54
|
+
s(m(e.transformedOperation.name), 1)
|
|
53
55
|
]),
|
|
54
56
|
_: 1
|
|
55
57
|
}, 8, ["id"])
|
|
@@ -57,59 +59,57 @@ const R = { class: "operation-details" }, D = { class: "examples" }, Y = /* @__P
|
|
|
57
59
|
_: 1
|
|
58
60
|
})
|
|
59
61
|
], 2),
|
|
60
|
-
|
|
61
|
-
default:
|
|
62
|
-
|
|
63
|
-
default:
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
])
|
|
74
|
-
];
|
|
75
|
-
}),
|
|
62
|
+
r(o(N), null, {
|
|
63
|
+
default: t(() => [
|
|
64
|
+
r(o(u), null, {
|
|
65
|
+
default: t(() => [
|
|
66
|
+
a("div", q, [
|
|
67
|
+
r(o(C), {
|
|
68
|
+
value: e.operation.description,
|
|
69
|
+
withImages: ""
|
|
70
|
+
}, null, 8, ["value"]),
|
|
71
|
+
r(_, { operation: e.operation }, null, 8, ["operation"]),
|
|
72
|
+
r(y, { operation: e.transformedOperation }, null, 8, ["operation"])
|
|
73
|
+
])
|
|
74
|
+
]),
|
|
76
75
|
_: 1
|
|
77
76
|
}),
|
|
78
|
-
|
|
79
|
-
default:
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
default:
|
|
83
|
-
|
|
77
|
+
r(o(u), null, {
|
|
78
|
+
default: t(() => [
|
|
79
|
+
a("div", D, [
|
|
80
|
+
r(o(f), null, {
|
|
81
|
+
default: t(() => [
|
|
82
|
+
r(o(V), {
|
|
83
|
+
collection: e.collection,
|
|
84
84
|
fallback: "",
|
|
85
85
|
operation: e.operation,
|
|
86
|
-
|
|
87
|
-
|
|
86
|
+
server: e.server,
|
|
87
|
+
transformedOperation: e.transformedOperation
|
|
88
88
|
}, {
|
|
89
|
-
header:
|
|
90
|
-
var
|
|
89
|
+
header: t(() => {
|
|
90
|
+
var n;
|
|
91
91
|
return [
|
|
92
|
-
|
|
92
|
+
r(h, {
|
|
93
93
|
class: "example-path",
|
|
94
|
-
deprecated: (
|
|
95
|
-
path: e.
|
|
94
|
+
deprecated: (n = e.transformedOperation.information) == null ? void 0 : n.deprecated,
|
|
95
|
+
path: e.transformedOperation.path
|
|
96
96
|
}, null, 8, ["deprecated", "path"])
|
|
97
97
|
];
|
|
98
98
|
}),
|
|
99
|
-
footer:
|
|
100
|
-
|
|
99
|
+
footer: t(() => [
|
|
100
|
+
r(o(w), { operation: e.operation }, null, 8, ["operation"])
|
|
101
101
|
]),
|
|
102
102
|
_: 1
|
|
103
|
-
}, 8, ["operation", "
|
|
103
|
+
}, 8, ["collection", "operation", "server", "transformedOperation"])
|
|
104
104
|
]),
|
|
105
105
|
_: 1
|
|
106
106
|
}),
|
|
107
|
-
|
|
108
|
-
default:
|
|
109
|
-
|
|
110
|
-
|
|
107
|
+
r(o(f), null, {
|
|
108
|
+
default: t(() => [
|
|
109
|
+
r(o(R), {
|
|
110
|
+
responses: e.operation.responses,
|
|
111
111
|
style: { "margin-top": "12px" }
|
|
112
|
-
}, null, 8, ["
|
|
112
|
+
}, null, 8, ["responses"])
|
|
113
113
|
]),
|
|
114
114
|
_: 1
|
|
115
115
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-request.d.ts","sourceRoot":"","sources":["../../src/helpers/get-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAE9D,6CAA6C;AAC7C,eAAO,MAAM,UAAU,aACX,cAAc,CAAC,UAAU,CAAC,QAC9B,MAAM,UACJ,MAAM;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"get-request.d.ts","sourceRoot":"","sources":["../../src/helpers/get-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAE9D,6CAA6C;AAC7C,eAAO,MAAM,UAAU,aACX,cAAc,CAAC,UAAU,CAAC,QAC9B,MAAM,UACJ,MAAM;;;;;;;;;;;;;mBAK+uT,CAAC;;;;;;;;;;;;;mBAA8f,CAAC;eAAyC,CAAC;cAA6B,CAAC;eAA8B,CAAC;aAA4B,CAAC;gBAA8H,CAAC;iBAAwC,CAAC;mBAAkC,CAAC;;;;;aAD3kV,CAAA"}
|
package/dist/helpers/index.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
export * from './createEmptySpecification.js';
|
|
2
2
|
export * from './deepMerge.js';
|
|
3
3
|
export * from './operation.js';
|
|
4
|
-
export * from './getExampleCode.js';
|
|
5
|
-
export * from './convertRequestToHarRequest.js';
|
|
6
4
|
export * from './getHeadingsFromMarkdown.js';
|
|
7
5
|
export * from './getLowestHeadingLevel.js';
|
|
8
6
|
export * from './getModels.js';
|
|
@@ -11,7 +9,6 @@ export * from './hasModels.js';
|
|
|
11
9
|
export * from './hasSecuritySchemes.js';
|
|
12
10
|
export * from './hasWebhooks.js';
|
|
13
11
|
export * from './isMacOs.js';
|
|
14
|
-
export * from './joinWithSlash.js';
|
|
15
12
|
export * from './mapFromObject.js';
|
|
16
13
|
export * from './mergeAllObjects.js';
|
|
17
14
|
export * from './parse.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAA;AAC1C,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAA;AAC1C,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,2BAA2B,CAAA;AACzC,cAAc,yBAAyB,CAAA;AACvC,cAAc,aAAa,CAAA;AAC3B,cAAc,oBAAoB,CAAA;AAClC,cAAc,aAAa,CAAA;AAC3B,cAAc,sBAAsB,CAAA;AACpC,cAAc,eAAe,CAAA;AAC7B,cAAc,WAAW,CAAA;AACzB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,mBAAmB,CAAA;AACjC,cAAc,SAAS,CAAA;AACvB,cAAc,cAAc,CAAA;AAC5B,cAAc,SAAS,CAAA;AACvB,cAAc,iBAAiB,CAAA"}
|
|
@@ -2,5 +2,5 @@ import type { ReferenceConfiguration } from '../types';
|
|
|
2
2
|
import { type InjectionKey } from 'vue';
|
|
3
3
|
export declare const CONFIGURATION_SYMBOL: InjectionKey<ReferenceConfiguration>;
|
|
4
4
|
/** Hook for easy access to the reference configuration */
|
|
5
|
-
export declare const useConfig: () => ReferenceConfiguration
|
|
5
|
+
export declare const useConfig: () => ReferenceConfiguration;
|
|
6
6
|
//# sourceMappingURL=useConfig.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useConfig.d.ts","sourceRoot":"","sources":["../../src/hooks/useConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AACrD,OAAO,EAAE,KAAK,YAAY,EAAU,MAAM,KAAK,CAAA;AAE/C,eAAO,MAAM,oBAAoB,EACnB,YAAY,CAAC,sBAAsB,CAAC,CAAA;AAElD,0DAA0D;AAC1D,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"useConfig.d.ts","sourceRoot":"","sources":["../../src/hooks/useConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AACrD,OAAO,EAAE,KAAK,YAAY,EAAU,MAAM,KAAK,CAAA;AAE/C,eAAO,MAAM,oBAAoB,EACnB,YAAY,CAAC,sBAAsB,CAAC,CAAA;AAElD,0DAA0D;AAC1D,eAAO,MAAM,SAAS,8BAGrB,CAAA"}
|
package/dist/hooks/useConfig.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useNavState.d.ts","sourceRoot":"","sources":["../../src/hooks/useNavState.ts"],"names":[],"mappings":"
|
|
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;AAI9E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAwF3C;;;;;;GAMG;AACH,eAAO,MAAM,WAAW;;IAsDpB,mCAAmC;4BACX,MAAM;IAG9B;;;;OAIG;+BAnF0B,MAAM;IAqFnC;;;;;OAKG;oCApGY,MAAM;IAsGrB;;;OAGG;uCAjIY,MAAM;IAmIrB,0DAA0D;;6BAjC5B;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE;yBA5BrC;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE;4BATb,OAAO;gCAyBH,oBAAoB,aAAa,GAAG;iCAjHrC,MAAM;;oBA0GjB,GAAG;;;;CAiE3B,CAAA"}
|
|
@@ -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;
|