@scalar/api-reference 1.25.128 → 1.26.0

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 (73) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/dist/browser/standalone.js +7981 -7915
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/ApiReferenceLayout.vue.js +2 -2
  5. package/dist/components/ApiReferenceLayout.vue2.js +1 -1
  6. package/dist/components/Content/ClientLibraries/ClientSelector.vue.d.ts.map +1 -1
  7. package/dist/components/Content/ClientLibraries/ClientSelector.vue.js +2 -2
  8. package/dist/components/Content/Introduction/Introduction.vue.js +1 -1
  9. package/dist/components/Content/Introduction/Introduction.vue2.js +45 -42
  10. package/dist/components/Content/Lazy/Loading.vue.js +15 -15
  11. package/dist/components/Content/Tag/{Endpoints.vue.d.ts → OperationsList.vue.d.ts} +1 -3
  12. package/dist/components/Content/Tag/OperationsList.vue.d.ts.map +1 -0
  13. package/dist/components/Content/Tag/OperationsList.vue.js +7 -0
  14. package/dist/components/Content/Tag/OperationsList.vue2.js +62 -0
  15. package/dist/components/Content/Tag/OperationsListItem.vue.d.ts +9 -0
  16. package/dist/components/Content/Tag/OperationsListItem.vue.d.ts.map +1 -0
  17. package/dist/components/Content/Tag/OperationsListItem.vue.js +7 -0
  18. package/dist/components/Content/Tag/OperationsListItem.vue2.js +66 -0
  19. package/dist/components/Content/Tag/Tag.vue.d.ts +4 -64
  20. package/dist/components/Content/Tag/Tag.vue.d.ts.map +1 -1
  21. package/dist/components/Content/Tag/Tag.vue.js +87 -5
  22. package/dist/components/Content/Tag/Tag.vue2.js +2 -63
  23. package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
  24. package/dist/components/Content/Tag/TagList.vue.js +11 -11
  25. package/dist/components/Content/Tag/TagSection.vue.d.ts +70 -0
  26. package/dist/components/Content/Tag/TagSection.vue.d.ts.map +1 -0
  27. package/dist/components/Content/Tag/TagSection.vue.js +7 -0
  28. package/dist/components/Content/Tag/TagSection.vue2.js +65 -0
  29. package/dist/components/Content/Tag/index.d.ts +1 -2
  30. package/dist/components/Content/Tag/index.d.ts.map +1 -1
  31. package/dist/features/ApiClientModal/useApiClient.d.ts +30 -10
  32. package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
  33. package/dist/features/BaseUrl/BaseUrl.vue.js +31 -30
  34. package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
  35. package/dist/features/ExampleRequest/ExampleRequest.vue.js +2 -2
  36. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  37. package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
  38. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +54 -54
  39. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  40. package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
  41. package/dist/features/Operation/layouts/ModernLayout.vue2.js +65 -67
  42. package/dist/features/TestRequestButton/TestRequestButton.vue.js +2 -2
  43. package/dist/features/TestRequestButton/TestRequestButton.vue2.js +16 -14
  44. package/dist/helpers/get-request.d.ts +1 -0
  45. package/dist/helpers/get-request.d.ts.map +1 -1
  46. package/dist/helpers/index.d.ts +0 -1
  47. package/dist/helpers/index.d.ts.map +1 -1
  48. package/dist/hooks/useConfig.d.ts +3 -3
  49. package/dist/hooks/useConfig.d.ts.map +1 -1
  50. package/dist/hooks/useConfig.js +7 -4
  51. package/dist/hooks/useNavState.js +38 -38
  52. package/dist/hooks/useReactiveSpec.d.ts +8 -8
  53. package/dist/hooks/useSidebar.d.ts.map +1 -1
  54. package/dist/hooks/useSidebar.js +126 -116
  55. package/dist/index.js +55 -59
  56. package/dist/libs/operation.d.ts +15 -0
  57. package/dist/libs/operation.d.ts.map +1 -0
  58. package/dist/libs/operation.js +16 -0
  59. package/dist/stores/useHttpClientStore.d.ts +1 -1
  60. package/dist/stores/useHttpClientStore.d.ts.map +1 -1
  61. package/dist/style.css +1 -1
  62. package/dist/types.d.ts +1 -1
  63. package/dist/types.d.ts.map +1 -1
  64. package/package.json +13 -14
  65. package/dist/components/Content/Tag/Endpoints.vue.d.ts.map +0 -1
  66. package/dist/components/Content/Tag/Endpoints.vue.js +0 -7
  67. package/dist/components/Content/Tag/Endpoints.vue2.js +0 -161
  68. package/dist/helpers/operation.d.ts +0 -14
  69. package/dist/helpers/operation.d.ts.map +0 -1
  70. package/dist/helpers/operation.js +0 -18
  71. package/dist/standalone/lib/html-rendering.d.ts +0 -50
  72. package/dist/standalone/lib/html-rendering.d.ts.map +0 -1
  73. package/dist/standalone/lib/html-rendering.js +0 -64
@@ -1,21 +1,21 @@
1
- import { defineComponent as O, useId as h, openBlock as l, createBlock as p, unref as e, withCtx as a, createVNode as r, normalizeClass as s, createTextVNode as m, toDisplayString as d, createCommentVNode as S, createElementVNode as t } from "vue";
2
- import { ScalarMarkdown as b, ScalarErrorBoundary as f } from "@scalar/components";
3
- import v from "../../../components/OperationPath.vue.js";
4
- import { getOperationStability as u, getOperationStabilityColor as y, isOperationDeprecated as _ } from "../../../helpers/operation.js";
5
- import C from "../components/OperationParameters.vue.js";
6
- import g from "../components/OperationResponses.vue.js";
7
- import k from "../../../components/Section/Section.vue.js";
8
- import B from "../../../components/Section/SectionContent.vue.js";
9
- import E from "../../../components/Badge/Badge.vue.js";
10
- import N from "../../../components/Section/SectionHeader.vue.js";
11
- import V from "../../../components/Anchor/Anchor.vue.js";
12
- import w from "../../../components/Section/SectionHeaderTag.vue.js";
13
- import I from "../../../components/Section/SectionColumns.vue.js";
14
- import c from "../../../components/Section/SectionColumn.vue.js";
15
- import R from "../../ExampleRequest/ExampleRequest.vue.js";
16
- import T from "../../TestRequestButton/TestRequestButton.vue.js";
17
- import q from "../../ExampleResponses/ExampleResponses.vue.js";
18
- const D = { class: "operation-details" }, H = { class: "examples" }, oe = /* @__PURE__ */ O({
1
+ import { defineComponent as O, useId as S, computed as b, openBlock as m, createBlock as s, unref as e, withCtx as t, createVNode as r, normalizeClass as d, createTextVNode as f, toDisplayString as u, createCommentVNode as y, createElementVNode as a } from "vue";
2
+ import { ScalarMarkdown as C, ScalarErrorBoundary as c } from "@scalar/components";
3
+ import g from "../../../components/OperationPath.vue.js";
4
+ import { getOperationStability as h, getOperationStabilityColor as _, isOperationDeprecated as k } from "../../../libs/operation.js";
5
+ import B from "../components/OperationParameters.vue.js";
6
+ import E from "../components/OperationResponses.vue.js";
7
+ import N from "../../../components/Section/Section.vue.js";
8
+ import V from "../../../components/Section/SectionContent.vue.js";
9
+ import w from "../../../components/Badge/Badge.vue.js";
10
+ import I from "../../../components/Section/SectionHeader.vue.js";
11
+ import R from "../../../components/Anchor/Anchor.vue.js";
12
+ import T from "../../../components/Section/SectionHeaderTag.vue.js";
13
+ import q from "../../../components/Section/SectionColumns.vue.js";
14
+ import v from "../../../components/Section/SectionColumn.vue.js";
15
+ import D from "../../ExampleRequest/ExampleRequest.vue.js";
16
+ import H from "../../TestRequestButton/TestRequestButton.vue.js";
17
+ import M from "../../ExampleResponses/ExampleResponses.vue.js";
18
+ const $ = { class: "operation-details" }, z = { class: "examples" }, te = /* @__PURE__ */ O({
19
19
  __name: "ModernLayout",
20
20
  props: {
21
21
  id: {},
@@ -24,42 +24,40 @@ const D = { class: "operation-details" }, H = { class: "examples" }, oe = /* @__
24
24
  operation: {},
25
25
  transformedOperation: {}
26
26
  },
27
- setup(M) {
28
- const n = h();
29
- return (o, $) => (l(), p(e(k), {
27
+ setup(n) {
28
+ const i = S(), l = b(() => n.operation.summary || n.operation.path);
29
+ return (o, A) => (m(), s(e(N), {
30
30
  id: o.id,
31
- "aria-labelledby": e(n),
32
- label: o.transformedOperation.name
31
+ "aria-labelledby": e(i),
32
+ label: l.value
33
33
  }, {
34
- default: a(() => [
35
- r(e(B), null, {
36
- default: a(() => [
37
- e(u)(o.transformedOperation) ? (l(), p(e(E), {
34
+ default: t(() => [
35
+ r(e(V), null, {
36
+ default: t(() => [
37
+ e(h)(o.operation) ? (m(), s(e(w), {
38
38
  key: 0,
39
- class: s(e(y)(o.transformedOperation))
39
+ class: d(e(_)(o.operation))
40
40
  }, {
41
- default: a(() => [
42
- m(d(e(u)(o.transformedOperation)), 1)
41
+ default: t(() => [
42
+ f(u(e(h)(o.operation)), 1)
43
43
  ]),
44
44
  _: 1
45
- }, 8, ["class"])) : S("", !0),
46
- t("div", {
47
- class: s(
48
- e(_)(o.transformedOperation) ? "deprecated" : ""
49
- )
45
+ }, 8, ["class"])) : y("", !0),
46
+ a("div", {
47
+ class: d(e(k)(o.operation) ? "deprecated" : "")
50
48
  }, [
51
- r(e(N), null, {
52
- default: a(() => [
53
- r(e(V), {
49
+ r(e(I), null, {
50
+ default: t(() => [
51
+ r(e(R), {
54
52
  id: o.id ?? ""
55
53
  }, {
56
- default: a(() => [
57
- r(e(w), {
58
- id: e(n),
54
+ default: t(() => [
55
+ r(e(T), {
56
+ id: e(i),
59
57
  level: 3
60
58
  }, {
61
- default: a(() => [
62
- m(d(o.transformedOperation.name), 1)
59
+ default: t(() => [
60
+ f(u(l.value), 1)
63
61
  ]),
64
62
  _: 1
65
63
  }, 8, ["id"])
@@ -70,54 +68,54 @@ const D = { class: "operation-details" }, H = { class: "examples" }, oe = /* @__
70
68
  _: 1
71
69
  })
72
70
  ], 2),
73
- r(e(I), null, {
74
- default: a(() => [
75
- r(e(c), null, {
76
- default: a(() => [
77
- t("div", D, [
78
- r(e(b), {
71
+ r(e(q), null, {
72
+ default: t(() => [
73
+ r(e(v), null, {
74
+ default: t(() => [
75
+ a("div", $, [
76
+ r(e(C), {
79
77
  value: o.operation.description,
80
78
  withImages: ""
81
79
  }, null, 8, ["value"]),
82
- r(C, { operation: o.operation }, null, 8, ["operation"]),
83
- r(g, { operation: o.transformedOperation }, null, 8, ["operation"])
80
+ r(B, { operation: o.operation }, null, 8, ["operation"]),
81
+ r(E, { operation: o.transformedOperation }, null, 8, ["operation"])
84
82
  ])
85
83
  ]),
86
84
  _: 1
87
85
  }),
88
- r(e(c), null, {
89
- default: a(() => [
90
- t("div", H, [
91
- r(e(f), null, {
92
- default: a(() => [
93
- r(e(R), {
86
+ r(e(v), null, {
87
+ default: t(() => [
88
+ a("div", z, [
89
+ r(e(c), null, {
90
+ default: t(() => [
91
+ r(e(D), {
94
92
  collection: o.collection,
95
93
  fallback: "",
96
94
  operation: o.operation,
97
95
  server: o.server,
98
96
  transformedOperation: o.transformedOperation
99
97
  }, {
100
- header: a(() => {
101
- var i;
98
+ header: t(() => {
99
+ var p;
102
100
  return [
103
- r(v, {
101
+ r(g, {
104
102
  class: "example-path",
105
- deprecated: (i = o.transformedOperation.information) == null ? void 0 : i.deprecated,
103
+ deprecated: (p = o.transformedOperation.information) == null ? void 0 : p.deprecated,
106
104
  path: o.transformedOperation.path
107
105
  }, null, 8, ["deprecated", "path"])
108
106
  ];
109
107
  }),
110
- footer: a(() => [
111
- r(e(T), { operation: o.operation }, null, 8, ["operation"])
108
+ footer: t(() => [
109
+ r(e(H), { operation: o.operation }, null, 8, ["operation"])
112
110
  ]),
113
111
  _: 1
114
112
  }, 8, ["collection", "operation", "server", "transformedOperation"])
115
113
  ]),
116
114
  _: 1
117
115
  }),
118
- r(e(f), null, {
119
- default: a(() => [
120
- r(e(q), {
116
+ r(e(c), null, {
117
+ default: t(() => [
118
+ r(e(M), {
121
119
  responses: o.operation.responses,
122
120
  style: { "margin-top": "12px" }
123
121
  }, null, 8, ["responses"])
@@ -140,5 +138,5 @@ const D = { class: "operation-details" }, H = { class: "examples" }, oe = /* @__
140
138
  }
141
139
  });
142
140
  export {
143
- oe as default
141
+ te as default
144
142
  };
@@ -1,7 +1,7 @@
1
1
  import t from "./TestRequestButton.vue2.js";
2
2
  /* empty css */
3
3
  import o from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-e1499c8d"]]);
4
+ const a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-4263a1c2"]]);
5
5
  export {
6
- m as default
6
+ a as default
7
7
  };
@@ -1,21 +1,23 @@
1
- import { defineComponent as d, computed as c, openBlock as i, createElementBlock as s, withModifiers as f, createVNode as a, unref as h, createElementVNode as k, withCtx as C, createTextVNode as u, toDisplayString as p, Fragment as y } from "vue";
1
+ import { defineComponent as d, computed as c, openBlock as i, createElementBlock as r, withModifiers as f, createVNode as a, unref as h, createElementVNode as k, withCtx as C, createTextVNode as s, toDisplayString as u, Fragment as y } from "vue";
2
2
  import { ScalarIcon as B } from "@scalar/components";
3
3
  import b from "../../components/ScreenReader.vue.js";
4
- import { useConfig as q } from "../../hooks/useConfig.js";
5
- import { useApiClient as R } from "../ApiClientModal/useApiClient.js";
6
- const T = ["method"], g = /* @__PURE__ */ d({
4
+ import { useConfig as g } from "../../hooks/useConfig.js";
5
+ import { useApiClient as q } from "../ApiClientModal/useApiClient.js";
6
+ const v = ["method"], S = /* @__PURE__ */ d({
7
7
  __name: "TestRequestButton",
8
8
  props: {
9
9
  operation: {}
10
10
  },
11
- setup(n) {
12
- const { client: t } = R(), o = q(), l = c(() => (o == null ? void 0 : o.hideTestRequestButton) !== !0), m = () => {
11
+ setup(o) {
12
+ const { client: t } = q(), p = g(), l = c(
13
+ () => p.value.hideTestRequestButton !== !0
14
+ ), m = () => {
13
15
  var e;
14
- n.operation && ((e = t == null ? void 0 : t.value) != null && e.open) && t.value.open({
15
- requestUid: n.operation.uid
16
+ o.operation && ((e = t == null ? void 0 : t.value) != null && e.open) && t.value.open({
17
+ requestUid: o.operation.uid
16
18
  });
17
19
  };
18
- return (e, r) => e.operation && l.value ? (i(), s("button", {
20
+ return (e, n) => e.operation && l.value ? (i(), r("button", {
19
21
  key: 0,
20
22
  class: "show-api-client-button",
21
23
  method: e.operation.method,
@@ -26,18 +28,18 @@ const T = ["method"], g = /* @__PURE__ */ d({
26
28
  icon: "Play",
27
29
  size: "sm"
28
30
  }),
29
- r[0] || (r[0] = k("span", null, "Test Request", -1)),
31
+ n[0] || (n[0] = k("span", null, "Test Request", -1)),
30
32
  a(b, null, {
31
33
  default: C(() => [
32
- u("(" + p(e.operation.method) + " " + p(e.operation.path) + ")", 1)
34
+ s("(" + u(e.operation.method) + " " + u(e.operation.path) + ")", 1)
33
35
  ]),
34
36
  _: 1
35
37
  })
36
- ], 8, T)) : (i(), s(y, { key: 1 }, [
37
- u(" ")
38
+ ], 8, v)) : (i(), r(y, { key: 1 }, [
39
+ s(" ")
38
40
  ], 64));
39
41
  }
40
42
  });
41
43
  export {
42
- g as default
44
+ S as default
43
45
  };
@@ -38,5 +38,6 @@ export declare const getRequest: (requests: WorkspaceStore["requests"], path: st
38
38
  }[] | undefined;
39
39
  requestBody?: any;
40
40
  responses?: Record<string, any> | undefined;
41
+ 'x-scalar-stability'?: import("@scalar/types").XScalarStability | undefined;
41
42
  } | undefined;
42
43
  //# sourceMappingURL=get-request.d.ts.map
@@ -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,aAAc,cAAc,CAAC,UAAU,CAAC,QAAQ,MAAM,UAAU,MAAM;;;yBAEoyT,KAAK;kDAA4E,KAAK,8CAA8C,KAAK;wCAA6E,KAAK;8BAA6D,KAAK;+BAAyD,KAAK;;;;;;mBAAwR,CAAC;;;;;;;;;;;;;eAA0f,CAAC;mBAAkC,CAAC;cAAwC,CAAC;eAA8B,CAAC;aAA4B,CAAC;gBAA8H,CAAC;iBAAoD,CAAC;mBAAkC,CAAC;;;;;aADtuW,CAAA"}
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,aAAc,cAAc,CAAC,UAAU,CAAC,QAAQ,MAAM,UAAU,MAAM;;;yBAEoyT,KAAK;kDAA4E,KAAK,8CAA8C,KAAK;wCAA6E,KAAK;8BAA6D,KAAK;+BAAyD,KAAK;;;;;;mBAAwR,CAAC;;;;;;;;;;;;;eAA0f,CAAC;mBAAkC,CAAC;cAAwC,CAAC;eAA8B,CAAC;aAA4B,CAAC;gBAA8H,CAAC;iBAAoD,CAAC;mBAAkC,CAAC;;;;;kCAAiM,eAAe;aADt7W,CAAA"}
@@ -1,6 +1,5 @@
1
1
  export * from './createEmptySpecification.js';
2
2
  export * from './deepMerge.js';
3
- export * from './operation.js';
4
3
  export * from './getHeadingsFromMarkdown.js';
5
4
  export * from './getLowestHeadingLevel.js';
6
5
  export * from './getModels.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,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"}
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,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"}
@@ -1,6 +1,6 @@
1
1
  import { type ApiReferenceConfiguration } from '@scalar/types/api-reference';
2
- import { type InjectionKey } from 'vue';
3
- export declare const CONFIGURATION_SYMBOL: InjectionKey<ApiReferenceConfiguration>;
2
+ import { type ComputedRef, type InjectionKey } from 'vue';
3
+ export declare const CONFIGURATION_SYMBOL: InjectionKey<ComputedRef<ApiReferenceConfiguration>>;
4
4
  /** Hook for easy access to the reference configuration */
5
- export declare const useConfig: () => ApiReferenceConfiguration;
5
+ export declare const useConfig: () => ComputedRef<ApiReferenceConfiguration>;
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,EAAmC,KAAK,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAC7G,OAAO,EAAE,KAAK,YAAY,EAAU,MAAM,KAAK,CAAA;AAE/C,eAAO,MAAM,oBAAoB,EAAe,YAAY,CAAC,yBAAyB,CAAC,CAAA;AAEvF,0DAA0D;AAC1D,eAAO,MAAM,SAAS,iCAGrB,CAAA"}
1
+ {"version":3,"file":"useConfig.d.ts","sourceRoot":"","sources":["../../src/hooks/useConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmC,KAAK,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAC7G,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY,EAAoB,MAAM,KAAK,CAAA;AAE3E,eAAO,MAAM,oBAAoB,EAAe,YAAY,CAAC,WAAW,CAAC,yBAAyB,CAAC,CAAC,CAAA;AAEpG,0DAA0D;AAC1D,eAAO,MAAM,SAAS,8CAMrB,CAAA"}
@@ -1,7 +1,10 @@
1
1
  import { apiReferenceConfigurationSchema as o } from "@scalar/types/api-reference";
2
- import { inject as n } from "vue";
3
- const e = Symbol(), c = () => n(e, o.parse({}));
2
+ import { inject as e, computed as n } from "vue";
3
+ const r = Symbol(), f = () => e(
4
+ r,
5
+ n(() => o.parse({}))
6
+ );
4
7
  export {
5
- e as CONFIGURATION_SYMBOL,
6
- c as useConfig
8
+ r as CONFIGURATION_SYMBOL,
9
+ f as useConfig
7
10
  };
@@ -1,34 +1,34 @@
1
- import { useConfig as p } from "./useConfig.js";
2
- import { ssrState as m, combineUrlAndPath as f } from "@scalar/oas-utils/helpers";
1
+ import { useConfig as f } from "./useConfig.js";
2
+ import { ssrState as p, combineUrlAndPath as v } from "@scalar/oas-utils/helpers";
3
3
  import { slug as c } from "github-slugger";
4
- import { ref as l } from "vue";
5
- const s = l(""), u = l(m.hash ?? ""), o = l(), w = l(!1), h = (e) => {
4
+ import { ref as s } from "vue";
5
+ const u = s(""), l = s(p.hash ?? ""), r = s(), m = s(!1), h = (t) => {
6
6
  var n;
7
- if (!o.value) return "";
8
- const r = new RegExp("^" + ((n = o.value) == null ? void 0 : n.basePath) + "/?");
9
- return decodeURIComponent(e.replace(r, ""));
10
- }, I = (e = u.value) => {
7
+ if (!r.value) return "";
8
+ const a = new RegExp("^" + ((n = r.value) == null ? void 0 : n.basePath) + "/?");
9
+ return decodeURIComponent(t.replace(a, ""));
10
+ }, w = (t = l.value) => {
11
11
  var i;
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;
14
- }, v = () => {
15
- u.value = o.value ? h(window.location.pathname) : (
12
+ const a = (i = t.match(/(tag\/[^/]+)/)) == null ? void 0 : i[0], n = t.startsWith("model") ? "models" : "", o = t.startsWith("webhook") ? "webhooks" : "";
13
+ return a || n || o;
14
+ }, I = () => {
15
+ l.value = r.value ? h(window.location.pathname) : (
16
16
  // Must remove the prefix from the hash as the internal hash value should be pure
17
- decodeURIComponent(window.location.hash.replace(/^#/, "")).slice(s.value.length)
17
+ decodeURIComponent(window.location.hash.replace(/^#/, "")).slice(u.value.length)
18
18
  );
19
- }, $ = (e, r = window.location.href) => {
20
- const n = new URL(r);
21
- o.value ? n.pathname = f(o.value.basePath, e) : n.hash = s.value + e, u.value = e, window.history.replaceState({}, "", n);
22
- }, S = (e, r = window.location.href, n = window.location.search) => {
23
- const a = new URL(r);
24
- return a.hash = s.value + e, a.search = n, a.toString();
25
- }, U = (e = u.value) => `${s.value}${e}`, b = () => decodeURIComponent(window.location.hash.replace(/^#/, "").slice(s.value.length)), x = () => {
26
- 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)}`;
19
+ }, $ = (t, a = window.location.href) => {
20
+ const n = new URL(a);
21
+ r.value ? n.pathname = v(r.value.basePath, t) : n.hash = u.value + t, l.value = t, window.history.replaceState({}, "", n);
22
+ }, S = (t, a = window.location.href, n = window.location.search) => {
23
+ const o = new URL(a);
24
+ return o.hash = u.value + t, o.search = n, o.toString();
25
+ }, U = (t = l.value) => `${u.value}${t}`, b = () => decodeURIComponent(window.location.hash.replace(/^#/, "").slice(u.value.length)), x = () => {
26
+ const t = f(), a = (e) => typeof t.value.generateHeadingSlug == "function" ? `${t.value.generateHeadingSlug(e)}` : e.slug ? `description/${e.slug}` : "", n = (e) => e != null && e.name ? typeof t.value.generateModelSlug == "function" ? `model/${t.value.generateModelSlug(e)}` : `model/${c(e.name)}` : "models", o = (e) => typeof t.value.generateTagSlug == "function" ? `tag/${t.value.generateTagSlug(e)}` : `tag/${c(e.name)}`;
27
27
  return {
28
- hash: u,
28
+ hash: l,
29
29
  /** Sets the prefix for the hash */
30
- setHashPrefix: (t) => {
31
- s.value = t;
30
+ setHashPrefix: (e) => {
31
+ u.value = e;
32
32
  },
33
33
  /**
34
34
  * Gets the full hash with the prefix
@@ -50,24 +50,24 @@ const s = l(""), u = l(m.hash ?? ""), o = l(), w = l(!1), h = (e) => {
50
50
  replaceUrlState: $,
51
51
  /** Gets the portion of the hash used by the references */
52
52
  getReferenceHash: b,
53
- 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",
53
+ getWebhookId: (e) => e != null && e.name ? typeof t.value.generateWebhookSlug == "function" ? `webhook/${t.value.generateWebhookSlug(e)}` : `webhook/${e.method}/${c(e.name)}` : "webhooks",
54
54
  getModelId: n,
55
- getHeadingId: r,
56
- getOperationId: (t, g) => {
55
+ getHeadingId: a,
56
+ getOperationId: (e, g) => {
57
57
  var d;
58
- return typeof (e == null ? void 0 : e.generateOperationSlug) == "function" ? `${a(g)}/${e.generateOperationSlug({
59
- path: t.path,
60
- operationId: t.operationId,
61
- method: t.httpVerb,
62
- summary: (d = t.information) == null ? void 0 : d.summary
63
- })}` : `${a(g)}/${t.httpVerb}${t.path}`;
58
+ return typeof t.value.generateOperationSlug == "function" ? `${o(g)}/${t.value.generateOperationSlug({
59
+ path: e.path,
60
+ operationId: e.operationId,
61
+ method: e.httpVerb,
62
+ summary: (d = e.information) == null ? void 0 : d.summary
63
+ })}` : `${o(g)}/${e.httpVerb}${e.path}`;
64
64
  },
65
65
  getPathRoutingId: h,
66
- getSectionId: I,
67
- getTagId: a,
68
- isIntersectionEnabled: w,
69
- pathRouting: o,
70
- updateHash: v
66
+ getSectionId: w,
67
+ getTagId: o,
68
+ isIntersectionEnabled: m,
69
+ pathRouting: r,
70
+ updateHash: I
71
71
  };
72
72
  };
73
73
  export {
@@ -38,11 +38,11 @@ export declare function useReactiveSpec({ specConfig, proxyUrl, }: {
38
38
  default?: any;
39
39
  format?: string | undefined;
40
40
  description?: string | undefined;
41
- properties?: Record<string, import("@scalar/types/legacy").Schema> | undefined;
41
+ properties?: Record<string, import("@scalar/types").Schema> | undefined;
42
42
  } | undefined;
43
43
  example?: any;
44
44
  examples?: (Map<string, any> & Omit<Map<string, any>, keyof Map<any, any>>) | undefined;
45
- content?: import("@scalar/types/legacy").RequestBodyMimeTypes | undefined;
45
+ content?: import("@scalar/types").RequestBodyMimeTypes | undefined;
46
46
  headers?: {
47
47
  [key: string]: import("@scalar/openapi-types").OpenAPI.HeaderObject;
48
48
  } | undefined;
@@ -52,7 +52,7 @@ export declare function useReactiveSpec({ specConfig, proxyUrl, }: {
52
52
  requestBody?: {
53
53
  description?: string | undefined;
54
54
  required?: boolean | undefined;
55
- content?: import("@scalar/types/legacy").RequestBodyMimeTypes | undefined;
55
+ content?: import("@scalar/types").RequestBodyMimeTypes | undefined;
56
56
  } | undefined;
57
57
  summary?: string | undefined;
58
58
  tags?: string[] | undefined;
@@ -67,7 +67,7 @@ export declare function useReactiveSpec({ specConfig, proxyUrl, }: {
67
67
  label: string;
68
68
  source: string;
69
69
  }[] | undefined;
70
- 'x-scalar-stability'?: import("@scalar/types/legacy").XScalarStability | undefined;
70
+ 'x-scalar-stability'?: import("@scalar/types").XScalarStability | undefined;
71
71
  'x-codeSamples'?: {
72
72
  lang: string;
73
73
  label: string;
@@ -101,11 +101,11 @@ export declare function useReactiveSpec({ specConfig, proxyUrl, }: {
101
101
  default?: any;
102
102
  format?: string | undefined;
103
103
  description?: string | undefined;
104
- properties?: Record<string, import("@scalar/types/legacy").Schema> | undefined;
104
+ properties?: Record<string, import("@scalar/types").Schema> | undefined;
105
105
  } | undefined;
106
106
  example?: any;
107
107
  examples?: (Map<string, any> & Omit<Map<string, any>, keyof Map<any, any>>) | undefined;
108
- content?: import("@scalar/types/legacy").RequestBodyMimeTypes | undefined;
108
+ content?: import("@scalar/types").RequestBodyMimeTypes | undefined;
109
109
  headers?: {
110
110
  [key: string]: import("@scalar/openapi-types").OpenAPI.HeaderObject;
111
111
  } | undefined;
@@ -216,8 +216,8 @@ export declare function useReactiveSpec({ specConfig, proxyUrl, }: {
216
216
  callbacks?: Record<string, import("@scalar/openapi-types").OpenAPIV3_1.ReferenceObject | import("@scalar/openapi-types").OpenAPIV3_1.CallbackObject> | undefined;
217
217
  pathItems?: Record<string, import("@scalar/openapi-types").OpenAPIV3_1.ReferenceObject | import("@scalar/openapi-types").OpenAPIV3_1.PathItemObject> | undefined;
218
218
  } | undefined;
219
- webhooks?: import("@scalar/types/legacy").Webhooks | undefined;
220
- definitions?: import("@scalar/types/legacy").Definitions | undefined;
219
+ webhooks?: import("@scalar/types").Webhooks | undefined;
220
+ definitions?: import("@scalar/types").Definitions | undefined;
221
221
  swagger?: import("@scalar/openapi-types").OpenAPIV2.Document["swagger"];
222
222
  openapi?: import("@scalar/openapi-types").OpenAPIV3.Document["openapi"] | import("@scalar/openapi-types").OpenAPIV3_1.Document["openapi"];
223
223
  'x-tagGroups'?: {
@@ -1 +1 @@
1
- {"version":3,"file":"useSidebar.d.ts","sourceRoot":"","sources":["../../src/hooks/useSidebar.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAc3E,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAA;IACzB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,I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