@scalar/api-reference 1.25.106 → 1.25.109

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 (45) hide show
  1. package/CHANGELOG.md +59 -0
  2. package/dist/browser/standalone.js +11355 -11274
  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 +2 -2
  6. package/dist/components/ApiReferenceLayout.vue2.js +0 -1
  7. package/dist/components/Content/Introduction/Description.vue.js +1 -1
  8. package/dist/components/Content/Introduction/Description.vue2.js +15 -13
  9. package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
  10. package/dist/components/Content/Introduction/Introduction.vue.js +2 -2
  11. package/dist/components/Content/Introduction/Introduction.vue2.js +12 -12
  12. package/dist/components/Content/Lazy/Loading.vue.d.ts.map +1 -1
  13. package/dist/components/Content/Schema/SchemaProperty.vue.js +2 -2
  14. package/dist/components/Content/Schema/SchemaProperty.vue2.js +90 -90
  15. package/dist/components/Content/Tag/Endpoints.vue.d.ts.map +1 -1
  16. package/dist/components/Content/Tag/Endpoints.vue.js +2 -2
  17. package/dist/components/Content/Tag/Endpoints.vue2.js +45 -47
  18. package/dist/components/Content/Tag/TagList.vue.d.ts +2 -2
  19. package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
  20. package/dist/components/Content/Tag/TagList.vue.js +40 -38
  21. package/dist/features/ApiClientModal/useApiClient.d.ts +198 -166
  22. package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
  23. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  24. package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
  25. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +64 -56
  26. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  27. package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
  28. package/dist/features/Operation/layouts/ModernLayout.vue2.js +103 -102
  29. package/dist/features/TestRequestButton/TestRequestButton.vue.d.ts +2 -2
  30. package/dist/features/TestRequestButton/TestRequestButton.vue.d.ts.map +1 -1
  31. package/dist/features/TestRequestButton/TestRequestButton.vue.js +2 -2
  32. package/dist/features/TestRequestButton/TestRequestButton.vue2.js +34 -38
  33. package/dist/helpers/get-request.d.ts.map +1 -1
  34. package/dist/helpers/index.d.ts +1 -0
  35. package/dist/helpers/index.d.ts.map +1 -1
  36. package/dist/helpers/operation.d.ts +14 -0
  37. package/dist/helpers/operation.d.ts.map +1 -0
  38. package/dist/helpers/operation.js +18 -0
  39. package/dist/hooks/useReactiveSpec.d.ts +5 -16
  40. package/dist/hooks/useReactiveSpec.d.ts.map +1 -1
  41. package/dist/hooks/useSidebar.d.ts.map +1 -1
  42. package/dist/hooks/useSidebar.js +81 -82
  43. package/dist/index.js +67 -63
  44. package/dist/style.css +1 -1
  45. package/package.json +11 -11
@@ -1,39 +1,40 @@
1
- import { defineComponent as y, computed as N, openBlock as n, createBlock as g, unref as e, withCtx as a, createVNode as o, createTextVNode as m, toDisplayString as p, createElementVNode as c, createElementBlock as C, Fragment as b, renderList as V, withModifiers as w, normalizeClass as B, createCommentVNode as E } from "vue";
1
+ import { defineComponent as v, computed as y, openBlock as n, createBlock as f, unref as e, withCtx as a, createVNode as o, createTextVNode as m, toDisplayString as p, createElementVNode as c, createElementBlock as g, Fragment as N, renderList as b, withModifiers as V, normalizeClass as w, createCommentVNode as B } from "vue";
2
+ import { isOperationDeprecated as E } from "../../../helpers/operation.js";
2
3
  import { ScalarMarkdown as I } from "@scalar/components";
3
4
  import $ from "../../ScreenReader.vue.js";
4
5
  import H from "../../Section/Section.vue.js";
5
- import T from "../../Section/SectionHeader.vue.js";
6
- import M from "../../Anchor/Anchor.vue.js";
7
- import O from "../../Section/SectionContent.vue.js";
8
- import z from "../../Section/SectionColumns.vue.js";
9
- import h from "../../Section/SectionColumn.vue.js";
10
- import A from "../../Card/Card.vue.js";
11
- import D from "../../Card/CardHeader.vue.js";
6
+ import O from "../../Section/SectionHeader.vue.js";
7
+ import T from "../../Anchor/Anchor.vue.js";
8
+ import D from "../../Section/SectionContent.vue.js";
9
+ import M from "../../Section/SectionColumns.vue.js";
10
+ import C from "../../Section/SectionColumn.vue.js";
11
+ import z from "../../Card/Card.vue.js";
12
+ import A from "../../Card/CardHeader.vue.js";
12
13
  import F from "../../Card/CardContent.vue.js";
13
14
  import L from "../../HttpMethod/HttpMethod.vue.js";
14
15
  import { useNavState as R } from "../../../hooks/useNavState.js";
15
16
  import { useSidebar as U } from "../../../hooks/useSidebar.js";
16
- const j = ["aria-label"], q = ["href", "onClick"], ne = /* @__PURE__ */ y({
17
+ const j = ["aria-label"], q = ["href", "onClick"], se = /* @__PURE__ */ v({
17
18
  __name: "Endpoints",
18
19
  props: {
19
20
  id: {},
20
21
  tag: {},
21
22
  isCollapsed: { type: Boolean }
22
23
  },
23
- setup(_) {
24
- const s = _, { getOperationId: i, getTagId: S } = R(), { scrollToOperation: k } = U(), d = N(() => s.tag["x-displayName"] ?? s.tag.name), v = async (t) => {
25
- const r = i(t, s.tag);
26
- k(r);
24
+ setup(h) {
25
+ const s = h, { getOperationId: i, getTagId: _ } = R(), { scrollToOperation: S } = U(), d = y(() => s.tag["x-displayName"] ?? s.tag.name), k = async (t) => {
26
+ const l = i(t, s.tag);
27
+ S(l);
27
28
  };
28
- return (t, r) => (n(), g(e(H), {
29
+ return (t, l) => (n(), f(e(H), {
29
30
  id: t.id,
30
31
  label: t.tag.name.toUpperCase()
31
32
  }, {
32
33
  default: a(() => [
33
- o(e(T), { level: 2 }, {
34
+ o(e(O), { level: 2 }, {
34
35
  default: a(() => [
35
- o(e(M), {
36
- id: e(S)(t.tag)
36
+ o(e(T), {
37
+ id: e(_)(t.tag)
37
38
  }, {
38
39
  default: a(() => [
39
40
  m(p(d.value), 1)
@@ -43,11 +44,11 @@ const j = ["aria-label"], q = ["href", "onClick"], ne = /* @__PURE__ */ y({
43
44
  ]),
44
45
  _: 1
45
46
  }),
46
- o(e(O), null, {
47
+ o(e(D), null, {
47
48
  default: a(() => [
48
- o(e(z), null, {
49
+ o(e(M), null, {
49
50
  default: a(() => [
50
- o(e(h), null, {
51
+ o(e(C), null, {
51
52
  default: a(() => [
52
53
  o(e(I), {
53
54
  clamp: t.isCollapsed ? "7" : !1,
@@ -57,16 +58,16 @@ const j = ["aria-label"], q = ["href", "onClick"], ne = /* @__PURE__ */ y({
57
58
  ]),
58
59
  _: 1
59
60
  }),
60
- o(e(h), null, {
61
+ o(e(C), null, {
61
62
  default: a(() => {
62
63
  var u;
63
64
  return [
64
- ((u = t.tag.operations) == null ? void 0 : u.length) > 0 ? (n(), g(e(A), {
65
+ ((u = t.tag.operations) == null ? void 0 : u.length) > 0 ? (n(), f(e(z), {
65
66
  key: 0,
66
67
  class: "scalar-card-sticky"
67
68
  }, {
68
69
  default: a(() => [
69
- o(e(D), { muted: "" }, {
70
+ o(e(A), { muted: "" }, {
70
71
  default: a(() => [
71
72
  o($, null, {
72
73
  default: a(() => [
@@ -74,7 +75,7 @@ const j = ["aria-label"], q = ["href", "onClick"], ne = /* @__PURE__ */ y({
74
75
  ]),
75
76
  _: 1
76
77
  }),
77
- r[0] || (r[0] = m(" Endpoints "))
78
+ l[0] || (l[0] = m(" Endpoints "))
78
79
  ]),
79
80
  _: 1
80
81
  }),
@@ -87,35 +88,32 @@ const j = ["aria-label"], q = ["href", "onClick"], ne = /* @__PURE__ */ y({
87
88
  "aria-label": `${d.value} endpoints`,
88
89
  class: "endpoints"
89
90
  }, [
90
- (n(!0), C(b, null, V(t.tag.operations, (l) => {
91
- var f;
92
- return n(), C("li", {
93
- key: e(i)(l, t.tag),
94
- class: "contents"
91
+ (n(!0), g(N, null, b(t.tag.operations, (r) => (n(), g("li", {
92
+ key: e(i)(r, t.tag),
93
+ class: "contents"
94
+ }, [
95
+ c("a", {
96
+ class: "endpoint",
97
+ href: `#${e(i)(r, t.tag)}`,
98
+ onClick: V((G) => k(r), ["prevent"])
95
99
  }, [
96
- c("a", {
97
- class: "endpoint",
98
- href: `#${e(i)(l, t.tag)}`,
99
- onClick: w((G) => v(l), ["prevent"])
100
- }, [
101
- o(e(L), {
102
- method: l.httpVerb
103
- }, null, 8, ["method"]),
104
- c("span", {
105
- class: B(["endpoint-path", {
106
- deprecated: (f = l.information) == null ? void 0 : f.deprecated
107
- }])
108
- }, p(l.path), 3)
109
- ], 8, q)
110
- ]);
111
- }), 128))
100
+ o(e(L), {
101
+ method: r.httpVerb
102
+ }, null, 8, ["method"]),
103
+ c("span", {
104
+ class: w(["endpoint-path", {
105
+ deprecated: e(E)(r)
106
+ }])
107
+ }, p(r.path), 3)
108
+ ], 8, q)
109
+ ]))), 128))
112
110
  ], 8, j)
113
111
  ]),
114
112
  _: 1
115
113
  })
116
114
  ]),
117
115
  _: 1
118
- })) : E("", !0)
116
+ })) : B("", !0)
119
117
  ];
120
118
  }),
121
119
  _: 1
@@ -132,5 +130,5 @@ const j = ["aria-label"], q = ["href", "onClick"], ne = /* @__PURE__ */ y({
132
130
  }
133
131
  });
134
132
  export {
135
- ne as default
133
+ se as default
136
134
  };
@@ -1,6 +1,6 @@
1
- import type { Spec, Tag as tagType } from '@scalar/types/legacy';
1
+ import type { Spec, Tag as TagType } from '@scalar/types/legacy';
2
2
  type __VLS_Props = {
3
- tags: tagType[];
3
+ tags: TagType[];
4
4
  spec: Spec;
5
5
  layout?: 'modern' | 'classic';
6
6
  };
@@ -1 +1 @@
1
- {"version":3,"file":"TagList.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Tag/TagList.vue"],"names":[],"mappings":"AAiEA,OAAO,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAOhE,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,OAAO,EAAE,CAAA;IACf,IAAI,EAAE,IAAI,CAAA;IACV,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;CAC9B,CAAC;;AAiHF,wBAMG"}
1
+ {"version":3,"file":"TagList.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Tag/TagList.vue"],"names":[],"mappings":"AAgFA,OAAO,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAOhE,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,OAAO,EAAE,CAAA;IACf,IAAI,EAAE,IAAI,CAAA;IACV,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;CAC9B,CAAC;;AAmIF,wBAMG"}
@@ -1,50 +1,52 @@
1
- import { defineComponent as g, computed as v, openBlock as r, createElementBlock as l, Fragment as n, renderList as p, createBlock as i, unref as e, withCtx as a, resolveDynamicComponent as B, createVNode as d } from "vue";
2
- import { useWorkspace as I } from "@scalar/api-client/store";
3
- import { ScalarErrorBoundary as T } from "@scalar/components";
4
- import $ from "./TagAccordion.vue.js";
5
- import b from "./Tag.vue.js";
6
- import f from "../Lazy/Lazy.vue2.js";
7
- import x from "../../../features/Operation/Operation.vue.js";
8
- import { useNavState as C } from "../../../hooks/useNavState.js";
9
- import { useSidebar as N } from "../../../hooks/useSidebar.js";
10
- const J = /* @__PURE__ */ g({
1
+ import { defineComponent as x, computed as d, openBlock as a, createElementBlock as f, Fragment as y, renderList as _, createBlock as c, unref as e, withCtx as u, resolveDynamicComponent as B, createVNode as h } from "vue";
2
+ import { useWorkspace as T } from "@scalar/api-client/store";
3
+ import { ScalarErrorBoundary as $ } from "@scalar/components";
4
+ import b from "./TagAccordion.vue.js";
5
+ import C from "./Tag.vue.js";
6
+ import L from "../Lazy/Lazy.vue2.js";
7
+ import N from "../../../features/Operation/Operation.vue.js";
8
+ import { useNavState as V } from "../../../hooks/useNavState.js";
9
+ import { useSidebar as W } from "../../../hooks/useSidebar.js";
10
+ const M = /* @__PURE__ */ x({
11
11
  __name: "TagList",
12
12
  props: {
13
13
  tags: {},
14
14
  spec: {},
15
15
  layout: {}
16
16
  },
17
- setup(y) {
18
- const c = y, { getOperationId: m, getTagId: o, hash: _ } = C(), { collapsedSidebarItems: h } = N(), { requests: L, requestExamples: S, securitySchemes: k } = I(), q = v(
19
- () => c.layout === "classic" ? $ : b
20
- ), z = c.layout !== "classic" && !_.value.startsWith("model");
21
- return (u, V) => (r(!0), l(n, null, p(u.tags, (t) => (r(), i(e(f), {
22
- id: e(o)(t),
23
- key: e(o)(t),
24
- isLazy: e(z) && !e(h)[e(o)(t)]
17
+ setup(S) {
18
+ const i = S, { getOperationId: l, getTagId: r, hash: k } = V(), { collapsedSidebarItems: m } = W(), { requests: q, requestExamples: z, securitySchemes: I } = T(), g = d(
19
+ () => i.layout === "classic" ? b : C
20
+ ), v = d(
21
+ () => i.tags.findIndex((s) => !m[r(s)]) + 1
22
+ ), n = (s) => i.layout !== "classic" && !k.value.startsWith("model") && s > v.value;
23
+ return (s, w) => (a(!0), f(y, null, _(s.tags, (t, p) => (a(), c(e(L), {
24
+ id: e(r)(t),
25
+ key: e(r)(t),
26
+ isLazy: n(p)
25
27
  }, {
26
- default: a(() => [
27
- (r(), i(B(q.value), {
28
- id: e(o)(t),
29
- spec: u.spec,
28
+ default: u(() => [
29
+ (a(), c(B(g.value), {
30
+ id: e(r)(t),
31
+ spec: s.spec,
30
32
  tag: t
31
33
  }, {
32
- default: a(() => [
33
- (r(!0), l(n, null, p(t.operations, (s, E) => (r(), i(e(f), {
34
- id: e(m)(s, t),
35
- key: `${s.httpVerb}-${s.operationId}`,
36
- isLazy: E > 0
34
+ default: u(() => [
35
+ (a(!0), f(y, null, _(t.operations, (o, E) => (a(), c(e(L), {
36
+ id: e(l)(o, t),
37
+ key: `${o.httpVerb}-${o.operationId}`,
38
+ isLazy: n(p) || e(m)[e(r)(t)] && E > 0
37
39
  }, {
38
- default: a(() => [
39
- d(e(T), null, {
40
- default: a(() => [
41
- d(e(x), {
42
- id: e(m)(s, t),
43
- layout: u.layout,
44
- operation: s,
45
- requestExamples: e(S),
46
- requests: e(L),
47
- securitySchemes: e(k),
40
+ default: u(() => [
41
+ h(e($), null, {
42
+ default: u(() => [
43
+ h(e(N), {
44
+ id: e(l)(o, t),
45
+ layout: s.layout,
46
+ operation: o,
47
+ requestExamples: e(z),
48
+ requests: e(q),
49
+ securitySchemes: e(I),
48
50
  tag: t
49
51
  }, null, 8, ["id", "layout", "operation", "requestExamples", "requests", "securitySchemes", "tag"])
50
52
  ]),
@@ -62,5 +64,5 @@ const J = /* @__PURE__ */ g({
62
64
  }
63
65
  });
64
66
  export {
65
- J as default
67
+ M as default
66
68
  };