@scalar/api-reference 1.25.105 → 1.25.106

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 (64) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/browser/standalone.js +7065 -7056
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  5. package/dist/components/ApiReferenceLayout.vue.js +1 -1
  6. package/dist/components/ApiReferenceLayout.vue2.js +119 -131
  7. package/dist/components/Content/Lazy/Loading.vue.js +2 -2
  8. package/dist/components/Content/Models/Models.vue.js +2 -2
  9. package/dist/components/Content/Models/Models.vue2.js +2 -2
  10. package/dist/components/Content/Models/ModelsAccordion.vue.js +2 -2
  11. package/dist/components/Content/Models/ModelsAccordion.vue2.js +2 -2
  12. package/dist/components/Content/Tag/Endpoints.vue2.js +3 -3
  13. package/dist/components/Content/Tag/TagList.vue.js +3 -3
  14. package/dist/components/Section/CompactSection.vue2.js +4 -4
  15. package/dist/components/Section/Section.vue2.js +3 -3
  16. package/dist/components/Sidebar/Sidebar.vue2.js +3 -3
  17. package/dist/components/Sidebar/SidebarElement.vue2.js +6 -6
  18. package/dist/features/DownloadLink/DownloadLink.vue.d.ts.map +1 -1
  19. package/dist/features/DownloadLink/DownloadLink.vue.js +2 -2
  20. package/dist/features/DownloadLink/DownloadLink.vue2.js +14 -21
  21. package/dist/features/Operation/Webhooks.vue.js +3 -3
  22. package/dist/features/Operation/Webhooks.vue2.js +9 -9
  23. package/dist/features/Operation/components/OperationParameters.vue.d.ts +2 -2
  24. package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
  25. package/dist/features/Operation/components/OperationParameters.vue.js +34 -49
  26. package/dist/features/Operation/components/ParameterList.vue.d.ts +2 -2
  27. package/dist/features/Operation/components/ParameterList.vue.d.ts.map +1 -1
  28. package/dist/features/Operation/components/ParameterList.vue.js +3 -3
  29. package/dist/features/Operation/components/ParameterListItem.vue.d.ts +3 -3
  30. package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
  31. package/dist/features/Operation/components/ParameterListItem.vue.js +1 -1
  32. package/dist/features/Operation/components/ParameterListItem.vue2.js +34 -31
  33. package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
  34. package/dist/features/Operation/components/RequestBody.vue.js +1 -1
  35. package/dist/features/Operation/components/RequestBody.vue2.js +37 -33
  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 +34 -34
  39. package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
  40. package/dist/features/Operation/layouts/ModernLayout.vue2.js +12 -12
  41. package/dist/features/Search/useSearchIndex.js +11 -11
  42. package/dist/features/TestRequestButton/TestRequestButton.vue.d.ts.map +1 -1
  43. package/dist/features/TestRequestButton/TestRequestButton.vue.js +2 -2
  44. package/dist/features/TestRequestButton/TestRequestButton.vue2.js +21 -21
  45. package/dist/helpers/index.d.ts +0 -1
  46. package/dist/helpers/index.d.ts.map +1 -1
  47. package/dist/helpers/parse.d.ts.map +1 -1
  48. package/dist/helpers/parse.js +59 -60
  49. package/dist/hooks/useConfig.d.ts +6 -0
  50. package/dist/hooks/useConfig.d.ts.map +1 -0
  51. package/dist/hooks/useConfig.js +6 -0
  52. package/dist/hooks/useNavState.d.ts +8 -3
  53. package/dist/hooks/useNavState.d.ts.map +1 -1
  54. package/dist/hooks/useNavState.js +71 -59
  55. package/dist/hooks/useSidebar.d.ts.map +1 -1
  56. package/dist/hooks/useSidebar.js +149 -149
  57. package/dist/index.js +58 -63
  58. package/dist/style.css +1 -1
  59. package/package.json +9 -9
  60. package/dist/features/Operation/components/RequestBodyPropertiesChild.vue.d.ts +0 -7
  61. package/dist/features/Operation/components/RequestBodyPropertiesChild.vue.d.ts.map +0 -1
  62. package/dist/helpers/provideSymbols.d.ts +0 -7
  63. package/dist/helpers/provideSymbols.d.ts.map +0 -1
  64. package/dist/helpers/provideSymbols.js +0 -7
@@ -1,17 +1,17 @@
1
- import { defineComponent as u, inject as f, openBlock as a, createBlock as s, unref as o, createSlots as h, withCtx as r, createElementVNode as t, createVNode as i, toDisplayString as _, createCommentVNode as y, withModifiers as v } from "vue";
1
+ import { defineComponent as u, openBlock as a, createBlock as s, unref as o, createSlots as f, withCtx as r, createElementVNode as t, createVNode as i, toDisplayString as h, createCommentVNode as _, withModifiers as y } from "vue";
2
2
  import C from "../../../components/OperationPath.vue.js";
3
- import { ScalarIcon as q, ScalarIconButton as E, ScalarMarkdown as b } from "@scalar/components";
4
- import { useClipboard as S } from "@scalar/use-hooks/useClipboard";
5
- import k from "../components/OperationParameters.vue.js";
6
- import T from "../components/OperationResponses.vue.js";
3
+ import { useConfig as v } from "../../../hooks/useConfig.js";
4
+ import { ScalarIcon as q, ScalarIconButton as b, ScalarMarkdown as k } from "@scalar/components";
5
+ import { useClipboard as E } from "@scalar/use-hooks/useClipboard";
6
+ import S from "../components/OperationParameters.vue.js";
7
+ import g from "../components/OperationResponses.vue.js";
7
8
  import B from "../../../components/Section/SectionAccordion.vue.js";
8
9
  import R from "../../../components/HttpMethod/HttpMethod.vue.js";
9
- import I from "../../../components/Anchor/Anchor.vue.js";
10
- import g from "../../TestRequestButton/TestRequestButton.vue.js";
11
- import w from "../../ExampleResponses/ExampleResponses.vue.js";
12
- import N from "../../ExampleRequest/ExampleRequest.vue.js";
13
- import { HIDE_TEST_REQUEST_BUTTON_SYMBOL as V } from "../../../helpers/provideSymbols.js";
14
- const $ = { class: "operation-title" }, L = { class: "operation-details" }, M = { class: "endpoint-label" }, O = { class: "endpoint-label-path" }, U = { class: "endpoint-label-name" }, A = { class: "endpoint-content" }, D = { class: "operation-details-card" }, H = { class: "operation-details-card-item" }, P = { class: "operation-details-card-item" }, ie = /* @__PURE__ */ u({
10
+ import w from "../../../components/Anchor/Anchor.vue.js";
11
+ import I from "../../TestRequestButton/TestRequestButton.vue.js";
12
+ import V from "../../ExampleResponses/ExampleResponses.vue.js";
13
+ import $ from "../../ExampleRequest/ExampleRequest.vue.js";
14
+ const N = { class: "operation-title" }, T = { class: "operation-details" }, A = { class: "endpoint-label" }, L = { class: "endpoint-label-path" }, M = { class: "endpoint-label-name" }, P = { class: "endpoint-content" }, z = { class: "operation-details-card" }, D = { class: "operation-details-card-item" }, O = { class: "operation-details-card-item" }, te = /* @__PURE__ */ u({
15
15
  __name: "ClassicLayout",
16
16
  props: {
17
17
  id: {},
@@ -20,38 +20,38 @@ const $ = { class: "operation-title" }, L = { class: "operation-details" }, M =
20
20
  request: {},
21
21
  secretCredentials: {}
22
22
  },
23
- setup(j) {
24
- const { copyToClipboard: c } = S(), m = f(V);
23
+ setup(U) {
24
+ const { copyToClipboard: c } = E(), m = v();
25
25
  return (e, p) => {
26
26
  var l;
27
27
  return a(), s(o(B), {
28
28
  id: e.id,
29
29
  class: "reference-endpoint",
30
30
  transparent: ""
31
- }, h({
31
+ }, f({
32
32
  title: r(() => [
33
- t("h3", $, [
34
- t("div", L, [
33
+ t("h3", N, [
34
+ t("div", T, [
35
35
  i(o(R), {
36
36
  class: "endpoint-type",
37
37
  method: e.operation.httpVerb,
38
38
  short: ""
39
39
  }, null, 8, ["method"]),
40
- i(o(I), {
40
+ i(o(w), {
41
41
  id: e.id ?? "",
42
42
  class: "endpoint-anchor"
43
43
  }, {
44
44
  default: r(() => {
45
45
  var n;
46
46
  return [
47
- t("div", M, [
48
- t("div", O, [
47
+ t("div", A, [
48
+ t("div", L, [
49
49
  i(C, {
50
50
  deprecated: (n = e.operation.information) == null ? void 0 : n.deprecated,
51
51
  path: e.operation.path
52
52
  }, null, 8, ["deprecated", "path"])
53
53
  ]),
54
- t("div", U, _(e.operation.name), 1)
54
+ t("div", M, h(e.operation.name), 1)
55
55
  ])
56
56
  ];
57
57
  }),
@@ -63,40 +63,40 @@ const $ = { class: "operation-title" }, L = { class: "operation-details" }, M =
63
63
  actions: r(({ active: n }) => {
64
64
  var d;
65
65
  return [
66
- n ? (a(), s(o(g), {
66
+ n ? (a(), s(o(I), {
67
67
  key: 0,
68
68
  operation: e.operation
69
- }, null, 8, ["operation"])) : (d = o(m)) != null && d() ? y("", !0) : (a(), s(o(q), {
69
+ }, null, 8, ["operation"])) : (d = o(m)) != null && d.hideTestRequestButton ? _("", !0) : (a(), s(o(q), {
70
70
  key: 1,
71
71
  class: "endpoint-try-hint",
72
72
  icon: "Play",
73
73
  thickness: "1.75px"
74
74
  })),
75
- i(o(E), {
75
+ i(o(b), {
76
76
  class: "endpoint-copy",
77
77
  icon: "Clipboard",
78
78
  label: "Copy endpoint URL",
79
79
  size: "xs",
80
80
  variant: "ghost",
81
- onClick: p[0] || (p[0] = v((z) => o(c)(e.operation.path), ["stop"]))
81
+ onClick: p[0] || (p[0] = y((j) => o(c)(e.operation.path), ["stop"]))
82
82
  })
83
83
  ];
84
84
  }),
85
85
  default: r(() => [
86
- t("div", A, [
87
- t("div", D, [
88
- t("div", H, [
89
- i(k, { operation: e.operation }, null, 8, ["operation"])
86
+ t("div", P, [
87
+ t("div", z, [
88
+ t("div", D, [
89
+ i(S, { operation: e.requestEntity }, null, 8, ["operation"])
90
90
  ]),
91
- t("div", P, [
92
- i(T, {
91
+ t("div", O, [
92
+ i(g, {
93
93
  collapsableItems: !1,
94
94
  operation: e.operation
95
95
  }, null, 8, ["operation"])
96
96
  ])
97
97
  ]),
98
- i(o(w), { operation: e.operation }, null, 8, ["operation"]),
99
- i(o(N), {
98
+ i(o(V), { operation: e.operation }, null, 8, ["operation"]),
99
+ i(o($), {
100
100
  operation: e.operation,
101
101
  request: e.request,
102
102
  secretCredentials: e.secretCredentials
@@ -110,7 +110,7 @@ const $ = { class: "operation-title" }, L = { class: "operation-details" }, M =
110
110
  fn: r(() => {
111
111
  var n;
112
112
  return [
113
- i(o(b), {
113
+ i(o(k), {
114
114
  value: (n = e.requestEntity) == null ? void 0 : n.description,
115
115
  withImages: ""
116
116
  }, null, 8, ["value"])
@@ -123,5 +123,5 @@ const $ = { class: "operation-title" }, L = { class: "operation-details" }, M =
123
123
  }
124
124
  });
125
125
  export {
126
- ie as default
126
+ te as default
127
127
  };
@@ -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 m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-b2b61fd3"]]);
4
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-00148270"]]);
5
5
  export {
6
- m as default
6
+ p as default
7
7
  };
@@ -1,9 +1,9 @@
1
- import { defineComponent as c, openBlock as d, createBlock as m, unref as t, withCtx as r, createVNode as o, createTextVNode as s, createCommentVNode as C, createElementVNode as n, normalizeClass as h, toDisplayString as _ } from "vue";
2
- import q from "../../../components/OperationPath.vue.js";
3
- import { ScalarMarkdown as S, ScalarErrorBoundary as u } from "@scalar/components";
4
- import y from "../components/OperationParameters.vue.js";
5
- import v from "../components/OperationResponses.vue.js";
6
- import E from "../../../components/Section/Section.vue.js";
1
+ import { defineComponent as c, openBlock as d, createBlock as m, unref as t, withCtx as r, createVNode as o, createTextVNode as s, createCommentVNode as C, createElementVNode as n, normalizeClass as h, toDisplayString as q } from "vue";
2
+ import _ from "../../../components/OperationPath.vue.js";
3
+ import { ScalarMarkdown as y, ScalarErrorBoundary as u } from "@scalar/components";
4
+ import S from "../components/OperationParameters.vue.js";
5
+ import E from "../components/OperationResponses.vue.js";
6
+ import v from "../../../components/Section/Section.vue.js";
7
7
  import k from "../../../components/Section/SectionContent.vue.js";
8
8
  import B from "../../../components/Badge/Badge.vue.js";
9
9
  import g from "../../../components/Section/SectionHeader.vue.js";
@@ -23,7 +23,7 @@ const D = { class: "operation-details" }, M = { class: "examples" }, W = /* @__P
23
23
  secretCredentials: {}
24
24
  },
25
25
  setup(T) {
26
- return (e, i) => (d(), m(t(E), {
26
+ return (e, i) => (d(), m(t(v), {
27
27
  id: e.id,
28
28
  label: e.operation.name
29
29
  }, {
@@ -47,7 +47,7 @@ const D = { class: "operation-details" }, M = { class: "examples" }, W = /* @__P
47
47
  id: e.id ?? ""
48
48
  }, {
49
49
  default: r(() => [
50
- s(_(e.operation.name), 1)
50
+ s(q(e.operation.name), 1)
51
51
  ]),
52
52
  _: 1
53
53
  }, 8, ["id"])
@@ -62,12 +62,12 @@ const D = { class: "operation-details" }, M = { class: "examples" }, W = /* @__P
62
62
  var a;
63
63
  return [
64
64
  n("div", D, [
65
- o(t(S), {
65
+ o(t(y), {
66
66
  value: (a = e.requestEntity) == null ? void 0 : a.description,
67
67
  withImages: ""
68
68
  }, null, 8, ["value"]),
69
- o(y, { operation: e.operation }, null, 8, ["operation"]),
70
- o(v, { operation: e.operation }, null, 8, ["operation"])
69
+ o(S, { operation: e.requestEntity }, null, 8, ["operation"]),
70
+ o(E, { operation: e.operation }, null, 8, ["operation"])
71
71
  ])
72
72
  ];
73
73
  }),
@@ -87,7 +87,7 @@ const D = { class: "operation-details" }, M = { class: "examples" }, W = /* @__P
87
87
  header: r(() => {
88
88
  var a;
89
89
  return [
90
- o(q, {
90
+ o(_, {
91
91
  class: "example-path",
92
92
  deprecated: (a = e.operation.information) == null ? void 0 : a.deprecated,
93
93
  path: e.operation.path
@@ -1,15 +1,15 @@
1
1
  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
- import { useSidebar as B } from "../../hooks/useSidebar.js";
5
- import { getHeadingsFromMarkdown as P } from "../../helpers/getHeadingsFromMarkdown.js";
6
- import { useOperation as z } from "../../hooks/useOperation.js";
7
- import { getModels as G } from "../../helpers/getModels.js";
8
- import { useNavState as J } from "../../hooks/useNavState.js";
4
+ import { useOperation as B } from "../../hooks/useOperation.js";
5
+ import { useNavState as P } from "../../hooks/useNavState.js";
6
+ import { useSidebar as z } from "../../hooks/useSidebar.js";
7
+ import { getHeadingsFromMarkdown as G } from "../../helpers/getHeadingsFromMarkdown.js";
8
+ import { getModels as J } from "../../helpers/getModels.js";
9
9
  function te({
10
10
  specification: a
11
11
  }) {
12
- const { getHeadingId: T, getWebhookId: j, getModelId: L, getOperationId: W, getTagId: q } = J(), { hideModels: C } = B(), o = h([]), r = h([]), d = h(0), s = h(""), i = new N(o.value, {
12
+ const { getHeadingId: T, getWebhookId: j, getModelId: L, getOperationId: W, getTagId: q } = P(), { hideModels: 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);
@@ -33,7 +33,7 @@ function te({
33
33
  i.setCollection([]);
34
34
  return;
35
35
  }
36
- const l = [], u = P(
36
+ const l = [], u = G(
37
37
  ((w = (M = a.value) == null ? void 0 : M.info) == null ? void 0 : w.description) ?? ""
38
38
  );
39
39
  u.length && (u.forEach((e) => {
@@ -55,7 +55,7 @@ function te({
55
55
  body: ""
56
56
  };
57
57
  o.value.push(S), e.operations && e.operations.forEach((t) => {
58
- const { parameterMap: n } = z(t), x = A(t) || n.value;
58
+ const { parameterMap: n } = B(t), x = A(t) || n.value;
59
59
  let f = null;
60
60
  typeof x != "boolean" && (f = x);
61
61
  const O = {
@@ -81,7 +81,7 @@ function te({
81
81
  m.push({
82
82
  type: "webhook",
83
83
  title: `Webhook: ${(n = c[e][t]) == null ? void 0 : n.name}`,
84
- href: `#${j(e, t)}`,
84
+ href: `#${j({ name: e, method: t })}`,
85
85
  description: e,
86
86
  httpVerb: t,
87
87
  tag: e,
@@ -89,12 +89,12 @@ function te({
89
89
  });
90
90
  }), o.value = o.value.concat(m);
91
91
  });
92
- const v = C.value ? {} : G(a.value), b = [];
92
+ const v = C.value ? {} : J(a.value), b = [];
93
93
  v && (Object.keys(v).forEach((e) => {
94
94
  b.push({
95
95
  type: "model",
96
96
  title: "Model",
97
- href: `#${L(e)}`,
97
+ href: `#${L({ name: e })}`,
98
98
  description: v[e].title ?? e,
99
99
  tag: e,
100
100
  body: ""
@@ -1 +1 @@
1
- {"version":3,"file":"TestRequestButton.vue.d.ts","sourceRoot":"","sources":["../../../src/features/TestRequestButton/TestRequestButton.vue"],"names":[],"mappings":"AA4EA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAKhE,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,oBAAoB,CAAA;CAChC,CAAC;;AAiGF,wBAMG"}
1
+ {"version":3,"file":"TestRequestButton.vue.d.ts","sourceRoot":"","sources":["../../../src/features/TestRequestButton/TestRequestButton.vue"],"names":[],"mappings":"AA2EA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAIhE,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,oBAAoB,CAAA;CAChC,CAAC;;AAiGF,wBAMG"}
@@ -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 f = /* @__PURE__ */ o(t, [["__scopeId", "data-v-77256f36"]]);
4
+ const m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-7497300b"]]);
5
5
  export {
6
- f as default
6
+ m as default
7
7
  };
@@ -1,47 +1,47 @@
1
- import { defineComponent as d, inject as f, unref as o, openBlock as p, createElementBlock as i, withModifiers as c, createVNode as s, createElementVNode as h, withCtx as T, createTextVNode as a, toDisplayString as m, Fragment as b } from "vue";
2
- import B from "../../components/ScreenReader.vue.js";
3
- import { ScalarIcon as E } from "@scalar/components";
4
- import { HIDE_TEST_REQUEST_BUTTON_SYMBOL as S } from "../../helpers/provideSymbols.js";
5
- import { useApiClient as V } from "../ApiClientModal/useApiClient.js";
6
- const _ = ["method"], w = /* @__PURE__ */ d({
1
+ import { defineComponent as d, unref as o, openBlock as p, createElementBlock as i, withModifiers as f, createVNode as s, createElementVNode as h, withCtx as c, createTextVNode as a, toDisplayString as m, Fragment as b } from "vue";
2
+ import V from "../../components/ScreenReader.vue.js";
3
+ import { useConfig as k } from "../../hooks/useConfig.js";
4
+ import { ScalarIcon as y } from "@scalar/components";
5
+ import { useApiClient as C } from "../ApiClientModal/useApiClient.js";
6
+ const g = ["method"], E = /* @__PURE__ */ d({
7
7
  __name: "TestRequestButton",
8
8
  props: {
9
9
  operation: {}
10
10
  },
11
- setup(k) {
12
- const l = f(S), { client: u } = V();
13
- return (t, e) => {
11
+ setup(B) {
12
+ const { client: u } = C(), l = k();
13
+ return (e, t) => {
14
14
  var n;
15
- return ((n = o(l)) == null ? void 0 : n()) !== !0 ? (p(), i("button", {
15
+ return ((n = o(l)) == null ? void 0 : n.hideTestRequestButton) !== !0 ? (p(), i("button", {
16
16
  key: 0,
17
17
  class: "show-api-client-button",
18
- method: t.operation.httpVerb,
18
+ method: e.operation.httpVerb,
19
19
  type: "button",
20
- onClick: e[0] || (e[0] = c((y) => {
20
+ onClick: t[0] || (t[0] = f((R) => {
21
21
  var r;
22
22
  return (r = o(u)) == null ? void 0 : r.open({
23
- path: t.operation.path,
24
- method: t.operation.httpVerb
23
+ path: e.operation.path,
24
+ method: e.operation.httpVerb
25
25
  });
26
26
  }, ["stop"]))
27
27
  }, [
28
- s(o(E), {
28
+ s(o(y), {
29
29
  icon: "Play",
30
30
  size: "sm"
31
31
  }),
32
- e[1] || (e[1] = h("span", null, "Test Request", -1)),
33
- s(B, null, {
34
- default: T(() => [
35
- a("(" + m(t.operation.httpVerb) + " " + m(t.operation.path) + ")", 1)
32
+ t[1] || (t[1] = h("span", null, "Test Request", -1)),
33
+ s(V, null, {
34
+ default: c(() => [
35
+ a("(" + m(e.operation.httpVerb) + " " + m(e.operation.path) + ")", 1)
36
36
  ]),
37
37
  _: 1
38
38
  })
39
- ], 8, _)) : (p(), i(b, { key: 1 }, [
39
+ ], 8, g)) : (p(), i(b, { key: 1 }, [
40
40
  a(" ")
41
41
  ], 64));
42
42
  };
43
43
  }
44
44
  });
45
45
  export {
46
- w as default
46
+ E as default
47
47
  };
@@ -14,7 +14,6 @@ export * from './joinWithSlash.js';
14
14
  export * from './mapFromObject.js';
15
15
  export * from './mergeAllObjects.js';
16
16
  export * from './parse.js';
17
- export * from './provideSymbols.js';
18
17
  export * from './scrollToId.js';
19
18
  export * from './sleep.js';
20
19
  export * from './specDownloads.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,kBAAkB,CAAA;AAChC,cAAc,8BAA8B,CAAA;AAC5C,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,iBAAiB,CAAA;AAC/B,cAAc,mBAAmB,CAAA;AACjC,cAAc,SAAS,CAAA;AACvB,cAAc,kBAAkB,CAAA;AAChC,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,kBAAkB,CAAA;AAChC,cAAc,8BAA8B,CAAA;AAC5C,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,iBAAiB,CAAA;AAC/B,cAAc,mBAAmB,CAAA;AACjC,cAAc,SAAS,CAAA;AACvB,cAAc,cAAc,CAAA;AAC5B,cAAc,SAAS,CAAA;AACvB,cAAc,iBAAiB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../src/helpers/parse.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,sBAAsB,CAAA;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAMxD;;;;GAIG;AACH,eAAO,MAAM,KAAK,kBACD,aAAa,GAAG,MAAM,GAAG,SAAS,kBAG9C;IACD,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,KACA,OAAO,CAAC,IAAI,CA0Dd,CAAA"}
1
+ {"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../src/helpers/parse.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAMxD;;;;GAIG;AACH,eAAO,MAAM,KAAK,kBACD,aAAa,GAAG,MAAM,GAAG,SAAS,kBAG9C;IACD,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,KACA,OAAO,CAAC,IAAI,CA0Dd,CAAA"}
@@ -5,7 +5,7 @@ import { createEmptySpecification as O } from "./createEmptySpecification.js";
5
5
  import { normalizeRequestMethod as k } from "../legacy/helpers/normalizeRequestMethod.js";
6
6
  import { validRequestMethods as F } from "../legacy/fixtures/httpRequestMethods.js";
7
7
  const H = (m, {
8
- proxyUrl: e
8
+ proxyUrl: t
9
9
  } = {}) => new Promise(async (o, E) => {
10
10
  var h;
11
11
  try {
@@ -13,51 +13,51 @@ const H = (m, {
13
13
  return o(
14
14
  I(O())
15
15
  );
16
- const s = performance.now(), { filesystem: i } = await M(m, {
16
+ const f = performance.now(), { filesystem: s } = await M(m, {
17
17
  plugins: [
18
18
  C({
19
- fetch: (c) => fetch(e ? R(e, c) : c)
19
+ fetch: (n) => fetch(t ? R(t, n) : n)
20
20
  })
21
21
  ]
22
- }), { schema: r, errors: t } = await q(i), n = performance.now();
23
- return console.log(`dereference: ${Math.round(n - s)} ms`), t != null && t.length && console.warn(
22
+ }), { schema: a, errors: r } = await q(s), e = performance.now();
23
+ return console.log(`dereference: ${Math.round(e - f)} ms`), r != null && r.length && console.warn(
24
24
  `Please open an issue on https://github.com/scalar/scalar
25
25
  `,
26
26
  `Scalar OpenAPI Parser Warning:
27
27
  `,
28
- t
29
- ), r === void 0 ? (E(((h = t == null ? void 0 : t[0]) == null ? void 0 : h.message) ?? "Failed to parse the OpenAPI file."), o(
28
+ r
29
+ ), a === void 0 ? (E(((h = r == null ? void 0 : r[0]) == null ? void 0 : h.message) ?? "Failed to parse the OpenAPI file."), o(
30
30
  I(O())
31
- )) : o(I(r));
32
- } catch (s) {
31
+ )) : o(I(a));
32
+ } catch (f) {
33
33
  console.error(
34
34
  "[@scalar/api-reference]",
35
35
  "Failed to parse the OpenAPI document. It might be invalid?"
36
- ), console.error(s), E(s);
36
+ ), console.error(f), E(f);
37
37
  }
38
38
  return o(
39
39
  I(O())
40
40
  );
41
41
  }), I = (m) => {
42
- var h;
43
- let e = {};
44
- m && typeof m == "object" ? e = structuredClone(m) : e = O(), e.tags || (e.tags = []), e.paths || (e.paths = {});
42
+ var h, f;
43
+ let t = {};
44
+ m && typeof m == "object" ? t = structuredClone(m) : t = O(), t.tags || (t.tags = []), t.paths || (t.paths = {});
45
45
  const o = {};
46
- return Object.keys(e.webhooks ?? {}).forEach((s) => {
47
- var i;
48
- Object.keys(((i = e.webhooks) == null ? void 0 : i[s]) ?? {}).forEach((r) => {
49
- var n, c, l, g;
50
- const t = (n = e.webhooks) == null ? void 0 : n[s][r];
51
- if (!(!t || u(t))) {
52
- if (Array.isArray(t.tags)) {
53
- const a = (c = t.tags) == null ? void 0 : c.map((f) => {
54
- var y;
55
- return (y = e.tags) == null ? void 0 : y.find((w) => w.name === f);
46
+ return Object.keys(t.webhooks ?? {}).forEach((s) => {
47
+ var a;
48
+ Object.keys(((a = t.webhooks) == null ? void 0 : a[s]) ?? {}).forEach((r) => {
49
+ var n, l, g, y;
50
+ const e = (n = t.webhooks) == null ? void 0 : n[s][r];
51
+ if (!(!e || u(e))) {
52
+ if (Array.isArray(e.tags)) {
53
+ const i = (l = e.tags) == null ? void 0 : l.map((c) => {
54
+ var w;
55
+ return (w = t.tags) == null ? void 0 : w.find((p) => p.name === c);
56
56
  });
57
- if (t.tags = a == null ? void 0 : a.filter(
58
- (f) => !u(f)
59
- ), a != null && a.some(
60
- (f) => u(f)
57
+ if (e.tags = i == null ? void 0 : i.filter(
58
+ (c) => !u(c)
59
+ ), i != null && i.some(
60
+ (c) => u(c)
61
61
  ))
62
62
  return;
63
63
  }
@@ -65,70 +65,69 @@ const H = (m, {
65
65
  // Transformed data
66
66
  httpVerb: k(r),
67
67
  path: s,
68
- operationId: (t == null ? void 0 : t.operationId) || s,
69
- name: (t == null ? void 0 : t.summary) || s || "",
70
- description: (t == null ? void 0 : t.description) || "",
71
- pathParameters: (g = (l = e.paths) == null ? void 0 : l[s]) == null ? void 0 : g.parameters,
68
+ operationId: (e == null ? void 0 : e.operationId) || s,
69
+ name: (e == null ? void 0 : e.summary) || s || "",
70
+ description: (e == null ? void 0 : e.description) || "",
71
+ pathParameters: (y = (g = t.paths) == null ? void 0 : g[s]) == null ? void 0 : y.parameters,
72
72
  // Original webhook
73
73
  information: {
74
- ...t
74
+ ...e
75
75
  }
76
76
  };
77
77
  }
78
78
  });
79
- }), Object.keys(((h = e.components) == null ? void 0 : h.schemas) ?? {}).forEach((s) => {
80
- var i, r, t, n;
81
- u((r = (i = e.components) == null ? void 0 : i.schemas) == null ? void 0 : r[s]) && ((n = (t = e.components) == null ? void 0 : t.schemas) == null || delete n[s]);
82
- }), Object.keys(e.paths).forEach((s) => {
83
- Object.keys(e.paths[s]).filter(
79
+ }), Object.keys(((h = t.components) == null ? void 0 : h.schemas) ?? {}).forEach((s) => {
80
+ var a, r, e, n;
81
+ u((r = (a = t.components) == null ? void 0 : a.schemas) == null ? void 0 : r[s]) && ((n = (e = t.components) == null ? void 0 : e.schemas) == null || delete n[s]);
82
+ }), Object.keys(t.paths).forEach((s) => {
83
+ Object.keys(t.paths[s]).filter(
84
84
  (r) => F.includes(r.toUpperCase())
85
85
  ).forEach((r) => {
86
- var c, l, g, a, f, y, w;
87
- const t = e.paths[s][r];
88
- if (t === void 0 || u(t))
86
+ var l, g, y, i, c, w;
87
+ const e = t.paths[s][r];
88
+ if (e === void 0 || u(e))
89
89
  return;
90
90
  const n = {
91
91
  httpVerb: k(r),
92
92
  path: s,
93
- operationId: t.operationId || s,
94
- name: t.summary || s || "",
95
- description: t.description || "",
93
+ operationId: e.operationId || s,
94
+ name: e.summary || s || "",
95
+ description: e.description || "",
96
96
  information: {
97
- ...t
97
+ ...e
98
98
  },
99
- pathParameters: (l = (c = e.paths) == null ? void 0 : c[s]) == null ? void 0 : l.parameters
99
+ pathParameters: (g = (l = t.paths) == null ? void 0 : l[s]) == null ? void 0 : g.parameters
100
100
  };
101
- if (!t.tags || t.tags.length === 0) {
102
- (g = e.tags) != null && g.find(
101
+ if (!e.tags || e.tags.length === 0) {
102
+ (y = t.tags) != null && y.find(
103
103
  (d) => d.name === "default"
104
- ) || (a = e.tags) == null || a.push({
104
+ ) || (i = t.tags) == null || i.push({
105
105
  name: "default",
106
106
  description: "",
107
107
  operations: []
108
108
  });
109
- const p = (f = e.tags) == null ? void 0 : f.findIndex(
109
+ const p = (c = t.tags) == null ? void 0 : c.findIndex(
110
110
  (d) => d.name === "default"
111
111
  );
112
- p >= 0 && ((y = e.tags[p]) == null || y.operations.push(n));
112
+ p >= 0 && ((w = t.tags[p]) == null || w.operations.push(n));
113
113
  } else
114
- t.tags.forEach((p) => {
114
+ e.tags.forEach((p) => {
115
115
  var b, x, j;
116
- const d = (b = e.tags) == null ? void 0 : b.findIndex(
116
+ const d = (b = t.tags) == null ? void 0 : b.findIndex(
117
117
  (A) => A.name === p
118
118
  );
119
- d === -1 && ((x = e.tags) == null || x.push({
119
+ d === -1 && ((x = t.tags) == null || x.push({
120
120
  name: p,
121
121
  description: ""
122
122
  }));
123
- const P = d !== -1 ? d : e.tags.length - 1;
124
- typeof ((j = e.tags[P]) == null ? void 0 : j.operations) > "u" && (e.tags[P].operations = []), e.tags[P].operations.push(n);
123
+ const P = d !== -1 ? d : t.tags.length - 1;
124
+ typeof ((j = t.tags[P]) == null ? void 0 : j.operations) > "u" && (t.tags[P].operations = []), t.tags[P].operations.push(n);
125
125
  });
126
- e.tags = (w = e.tags) == null ? void 0 : w.filter(
127
- (p) => !u(p)
128
- );
129
126
  });
130
- }), {
131
- ...e,
127
+ }), t.tags = (f = t.tags) == null ? void 0 : f.filter(
128
+ (s) => !u(s)
129
+ ), {
130
+ ...t,
132
131
  webhooks: o
133
132
  };
134
133
  };
@@ -0,0 +1,6 @@
1
+ import type { ReferenceConfiguration } from '../types';
2
+ import { type InjectionKey } from 'vue';
3
+ export declare const CONFIGURATION_SYMBOL: InjectionKey<ReferenceConfiguration>;
4
+ /** Hook for easy access to the reference configuration */
5
+ export declare const useConfig: () => ReferenceConfiguration | undefined;
6
+ //# sourceMappingURL=useConfig.d.ts.map
@@ -0,0 +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,0CAGrB,CAAA"}
@@ -0,0 +1,6 @@
1
+ import { inject as o } from "vue";
2
+ const n = Symbol(), i = () => o(n, void 0);
3
+ export {
4
+ n as CONFIGURATION_SYMBOL,
5
+ i as useConfig
6
+ };
@@ -31,13 +31,18 @@ export declare const useNavState: () => {
31
31
  replaceUrlState: (replacementHash: string, url?: string) => void;
32
32
  /** Gets the portion of the hash used by the references */
33
33
  getReferenceHash: () => string;
34
- getWebhookId: (name?: string, httpVerb?: string) => string;
35
- getModelId: (name?: string) => string;
34
+ getWebhookId: (webhook?: {
35
+ name: string;
36
+ method?: string;
37
+ }) => string;
38
+ getModelId: (model?: {
39
+ name: string;
40
+ }) => string;
36
41
  getHeadingId: (heading: Heading) => string;
37
42
  getOperationId: (operation: TransformedOperation, parentTag: Tag) => string;
38
43
  getPathRoutingId: (pathName: string) => string;
39
44
  getSectionId: (hashStr?: string) => string;
40
- getTagId: ({ name }: Tag) => string;
45
+ getTagId: (tag: Tag) => string;
41
46
  isIntersectionEnabled: import("vue").Ref<boolean, boolean>;
42
47
  pathRouting: import("vue").Ref<PathRouting | undefined, PathRouting | undefined>;
43
48
  updateHash: () => void;
@@ -1 +1 @@
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;AAwH3C;;;;;;GAMG;AACH,eAAO,MAAM,WAAW;;IAEtB,mCAAmC;4BACX,MAAM;IAG9B;;;;OAIG;+BAhC4B,MAAM;IAkCrC;;;;;OAKG;oCAjDc,MAAM;IAmDvB;;;OAGG;uCA3Ec,MAAM;IA6EvB,0DAA0D;;0BAxH/B,MAAM,aAAa,MAAM;wBAQ3B,MAAM;4BAvBF,OAAO;gCA+BH,oBAAoB,aAAa,GAAG;iCAvBnC,MAAM;;yBA0Bd,GAAG;;;;CAiH7B,CAAA"}
1
+ {"version":3,"file":"useNavState.d.ts","sourceRoot":"","sources":["../../src/hooks/useNavState.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAI9E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAqF3C;;;;;;GAMG;AACH,eAAO,MAAM,WAAW;;IAsDpB,mCAAmC;4BACX,MAAM;IAG9B;;;;OAIG;+BAnF0B,MAAM;IAqFnC;;;;;OAKG;oCApGY,MAAM;IAsGrB;;;OAGG;uCA9HY,MAAM;IAgIrB,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;iCA9GrC,MAAM;;oBAuGjB,GAAG;;;;CAiE3B,CAAA"}