@scalar/api-reference 1.25.71 → 1.25.74

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 (103) hide show
  1. package/CHANGELOG.md +75 -0
  2. package/dist/browser/standalone.js +12267 -12210
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/Anchor/Anchor.vue.d.ts.map +1 -1
  5. package/dist/components/Anchor/Anchor.vue.js +2 -2
  6. package/dist/components/ApiReference.vue.d.ts.map +1 -1
  7. package/dist/components/ApiReference.vue.js +56 -57
  8. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  9. package/dist/components/ApiReferenceLayout.vue.js +3 -3
  10. package/dist/components/ApiReferenceLayout.vue2.js +160 -143
  11. package/dist/components/Content/Authentication/Authentication.vue.d.ts +1 -1
  12. package/dist/components/Content/Authentication/Authentication.vue.d.ts.map +1 -1
  13. package/dist/components/Content/Authentication/Authentication.vue.js +2 -2
  14. package/dist/components/Content/Authentication/Authentication.vue2.js +20 -20
  15. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts.map +1 -1
  16. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.js +2 -2
  17. package/dist/components/Content/Content.vue.d.ts +1 -1
  18. package/dist/components/Content/Content.vue.d.ts.map +1 -1
  19. package/dist/components/Content/Content.vue.js +2 -2
  20. package/dist/components/Content/Content.vue2.js +59 -53
  21. package/dist/components/Content/Introduction/Introduction.vue.js +1 -1
  22. package/dist/components/Content/Introduction/Introduction.vue2.js +32 -32
  23. package/dist/components/Content/Models/Models.vue.d.ts.map +1 -1
  24. package/dist/components/Content/Models/Models.vue.js +2 -2
  25. package/dist/components/Content/Models/Models.vue2.js +42 -36
  26. package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
  27. package/dist/components/Content/Schema/Schema.vue.js +2 -2
  28. package/dist/components/Content/Schema/Schema.vue2.js +10 -11
  29. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  30. package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
  31. package/dist/components/Content/Schema/SchemaProperty.vue2.js +12 -12
  32. package/dist/components/Content/Tag/Endpoints.vue.js +2 -2
  33. package/dist/components/Content/Tag/Endpoints.vue2.js +19 -19
  34. package/dist/components/Content/Tag/TagAccordion.vue.d.ts.map +1 -1
  35. package/dist/components/Content/Tag/TagAccordion.vue.js +2 -2
  36. package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
  37. package/dist/components/Content/Tag/TagList.vue.js +34 -28
  38. package/dist/components/Layouts/ModernLayout.vue.d.ts.map +1 -1
  39. package/dist/components/Layouts/ModernLayout.vue.js +2 -2
  40. package/dist/components/Layouts/ModernLayout.vue2.js +30 -29
  41. package/dist/components/Section/CompactSection.vue.js +2 -2
  42. package/dist/components/Section/CompactSection.vue2.js +9 -8
  43. package/dist/components/Section/SectionColumn.vue.d.ts.map +1 -1
  44. package/dist/components/Section/SectionColumn.vue.js +4 -4
  45. package/dist/components/Section/SectionContainerAccordion.vue.d.ts.map +1 -1
  46. package/dist/components/Section/SectionContainerAccordion.vue.js +2 -2
  47. package/dist/components/Section/SectionHeader.vue.d.ts +2 -2
  48. package/dist/components/Section/SectionHeader.vue.d.ts.map +1 -1
  49. package/dist/components/Section/SectionHeader.vue.js +1 -1
  50. package/dist/components/Section/SectionHeader.vue2.js +16 -14
  51. package/dist/components/ShowMoreButton.vue.js +2 -2
  52. package/dist/components/Sidebar/SidebarElement.vue.d.ts.map +1 -1
  53. package/dist/components/Sidebar/SidebarElement.vue.js +2 -2
  54. package/dist/components/Sidebar/SidebarElement.vue2.js +3 -2
  55. package/dist/embeds/OpenApiDocument/OpenApiDocument.vue.d.ts +22 -0
  56. package/dist/embeds/OpenApiDocument/OpenApiDocument.vue.d.ts.map +1 -1
  57. package/dist/embeds/OpenApiDocument/types.d.ts +1 -1
  58. package/dist/embeds/OpenApiDocument/types.d.ts.map +1 -1
  59. package/dist/features/ApiClientModal/useApiClient.d.ts +6 -4
  60. package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
  61. package/dist/features/BaseUrl/ServerUrlSelect.vue.js +3 -3
  62. package/dist/features/BaseUrl/ServerUrlSelect.vue2.js +5 -5
  63. package/dist/features/BaseUrl/ServerVariablesSelect.vue.js +2 -2
  64. package/dist/features/BaseUrl/ServerVariablesSelect.vue2.js +3 -3
  65. package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
  66. package/dist/features/ExampleRequest/ExampleRequest.vue.js +2 -2
  67. package/dist/features/ExampleRequest/ExampleRequest.vue2.js +124 -120
  68. package/dist/features/Operation/components/ParameterHeaders.vue.js +3 -3
  69. package/dist/features/Operation/components/ParameterHeaders.vue2.js +7 -7
  70. package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
  71. package/dist/features/Operation/components/ParameterListItem.vue.js +2 -2
  72. package/dist/features/Operation/components/ParameterListItem.vue2.js +3 -4
  73. package/dist/features/Operation/components/RequestBodyPropertiesChild.vue.d.ts.map +1 -1
  74. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  75. package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
  76. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  77. package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
  78. package/dist/features/Operation/layouts/ModernLayout.vue2.js +99 -89
  79. package/dist/helpers/getExampleCode.d.ts +2 -2
  80. package/dist/helpers/getExampleCode.d.ts.map +1 -1
  81. package/dist/helpers/getExampleCode.js +11 -11
  82. package/dist/helpers/parse.d.ts +2 -2
  83. package/dist/helpers/parse.d.ts.map +1 -1
  84. package/dist/helpers/parse.js +3 -3
  85. package/dist/hooks/useDeprecationWarnings.d.ts.map +1 -1
  86. package/dist/hooks/useDeprecationWarnings.js +12 -15
  87. package/dist/hooks/useReactiveSpec.d.ts +24 -2
  88. package/dist/hooks/useReactiveSpec.d.ts.map +1 -1
  89. package/dist/hooks/useReactiveSpec.js +4 -4
  90. package/dist/index.js +1 -1
  91. package/dist/legacy/components/SecurityScheme.vue.d.ts +1 -1
  92. package/dist/legacy/components/SecurityScheme.vue.d.ts.map +1 -1
  93. package/dist/legacy/components/SecurityScheme.vue.js +2 -2
  94. package/dist/legacy/components/SecurityScheme.vue2.js +13 -13
  95. package/dist/legacy/components/SecuritySchemeSelector.vue.js +2 -2
  96. package/dist/legacy/components/SecuritySchemeSelector.vue2.js +3 -3
  97. package/dist/legacy/helpers/getUrlFromServerState.d.ts +2 -1
  98. package/dist/legacy/helpers/getUrlFromServerState.d.ts.map +1 -1
  99. package/dist/legacy/helpers/getUrlFromServerState.js +14 -14
  100. package/dist/legacy/stores/useOpenApiStore.d.ts +22 -0
  101. package/dist/legacy/stores/useOpenApiStore.d.ts.map +1 -1
  102. package/dist/style.css +1 -1
  103. package/package.json +11 -11
@@ -1,107 +1,117 @@
1
- import { defineComponent as f, openBlock as l, createBlock as m, unref as t, withCtx as r, createVNode as o, createTextVNode as d, createCommentVNode as u, createElementVNode as n, normalizeClass as c, toDisplayString as h } from "vue";
2
- import _ from "../../../components/OperationPath.vue.js";
3
- import { ScalarMarkdown as C } from "@scalar/components";
4
- import S from "../components/OperationParameters.vue.js";
5
- import v from "../components/OperationResponses.vue.js";
6
- import k from "../../../components/Section/Section.vue.js";
1
+ import { defineComponent as c, openBlock as m, createBlock as d, unref as r, withCtx as t, createVNode as e, createTextVNode as u, createCommentVNode as _, createElementVNode as a, normalizeClass as h, toDisplayString as S } from "vue";
2
+ import C from "../../../components/OperationPath.vue.js";
3
+ import { ScalarMarkdown as v, ScalarErrorBoundary as f } from "@scalar/components";
4
+ import k from "../components/OperationParameters.vue.js";
5
+ import y from "../components/OperationResponses.vue.js";
6
+ import B from "../../../components/Section/Section.vue.js";
7
7
  import g from "../../../components/Section/SectionContent.vue.js";
8
- import y from "../../../components/Section/SectionColumns.vue.js";
9
- import s from "../../../components/Section/SectionColumn.vue.js";
10
- import B from "../../../components/Badge/Badge.vue.js";
8
+ import E from "../../../components/Badge/Badge.vue.js";
11
9
  import N from "../../../components/Section/SectionHeader.vue.js";
12
10
  import V from "../../../components/Anchor/Anchor.vue.js";
13
- import b from "../../ExampleRequest/ExampleRequest.vue.js";
14
- import w from "../../TestRequestButton/TestRequestButton.vue.js";
15
- import E from "../../ExampleResponses/ExampleResponses.vue.js";
16
- const R = { class: "operation-details" }, q = { class: "examples" }, Q = /* @__PURE__ */ f({
11
+ import b from "../../../components/Section/SectionColumns.vue.js";
12
+ import s from "../../../components/Section/SectionColumn.vue.js";
13
+ import w from "../../ExampleRequest/ExampleRequest.vue.js";
14
+ import R from "../../TestRequestButton/TestRequestButton.vue.js";
15
+ import q from "../../ExampleResponses/ExampleResponses.vue.js";
16
+ const D = { class: "operation-details" }, M = { class: "examples" }, W = /* @__PURE__ */ c({
17
17
  __name: "ModernLayout",
18
18
  props: {
19
19
  id: {},
20
20
  operation: {}
21
21
  },
22
- setup(D) {
23
- return (e, i) => (l(), m(t(k), {
24
- id: e.id,
25
- label: e.operation.name
22
+ setup(T) {
23
+ return (o, n) => (m(), d(r(B), {
24
+ id: o.id,
25
+ label: o.operation.name
26
26
  }, {
27
- default: r(() => [
28
- o(t(g), null, {
29
- default: r(() => [
30
- o(t(y), null, {
31
- default: r(() => [
32
- o(t(s), null, {
33
- default: r(() => {
34
- var a, p;
35
- return [
36
- (a = e.operation.information) != null && a.deprecated ? (l(), m(t(B), { key: 0 }, {
37
- default: r(() => i[0] || (i[0] = [
38
- d(" Deprecated ")
39
- ])),
40
- _: 1
41
- })) : u("", !0),
42
- n("div", {
43
- class: c((p = e.operation.information) != null && p.deprecated ? "deprecated" : "")
44
- }, [
45
- o(t(N), { level: 3 }, {
46
- default: r(() => [
47
- o(t(V), {
48
- id: e.id ?? ""
27
+ default: t(() => [
28
+ e(r(g), null, {
29
+ default: t(() => {
30
+ var i, p;
31
+ return [
32
+ (i = o.operation.information) != null && i.deprecated ? (m(), d(r(E), { key: 0 }, {
33
+ default: t(() => n[0] || (n[0] = [
34
+ u(" Deprecated ")
35
+ ])),
36
+ _: 1
37
+ })) : _("", !0),
38
+ a("div", {
39
+ class: h((p = o.operation.information) != null && p.deprecated ? "deprecated" : "")
40
+ }, [
41
+ e(r(N), { level: 3 }, {
42
+ default: t(() => [
43
+ e(r(V), {
44
+ id: o.id ?? ""
45
+ }, {
46
+ default: t(() => [
47
+ u(S(o.operation.name), 1)
48
+ ]),
49
+ _: 1
50
+ }, 8, ["id"])
51
+ ]),
52
+ _: 1
53
+ })
54
+ ], 2),
55
+ e(r(b), null, {
56
+ default: t(() => [
57
+ e(r(s), null, {
58
+ default: t(() => [
59
+ a("div", D, [
60
+ e(r(v), {
61
+ value: o.operation.description,
62
+ withImages: ""
63
+ }, null, 8, ["value"]),
64
+ e(k, { operation: o.operation }, null, 8, ["operation"]),
65
+ e(y, { operation: o.operation }, null, 8, ["operation"])
66
+ ])
67
+ ]),
68
+ _: 1
69
+ }),
70
+ e(r(s), null, {
71
+ default: t(() => [
72
+ a("div", M, [
73
+ e(r(f), null, {
74
+ default: t(() => [
75
+ e(r(w), {
76
+ fallback: "",
77
+ operation: o.operation
49
78
  }, {
50
- default: r(() => [
51
- d(h(e.operation.name), 1)
79
+ header: t(() => {
80
+ var l;
81
+ return [
82
+ e(C, {
83
+ class: "example-path",
84
+ deprecated: (l = o.operation.information) == null ? void 0 : l.deprecated,
85
+ path: o.operation.path
86
+ }, null, 8, ["deprecated", "path"])
87
+ ];
88
+ }),
89
+ footer: t(() => [
90
+ e(r(R), { operation: o.operation }, null, 8, ["operation"])
52
91
  ]),
53
92
  _: 1
54
- }, 8, ["id"])
93
+ }, 8, ["operation"])
94
+ ]),
95
+ _: 1
96
+ }),
97
+ e(r(f), null, {
98
+ default: t(() => [
99
+ e(r(q), {
100
+ operation: o.operation,
101
+ style: { "margin-top": "12px" }
102
+ }, null, 8, ["operation"])
55
103
  ]),
56
104
  _: 1
57
105
  })
58
- ], 2),
59
- n("div", R, [
60
- o(t(C), {
61
- value: e.operation.description,
62
- withImages: ""
63
- }, null, 8, ["value"]),
64
- o(S, { operation: e.operation }, null, 8, ["operation"]),
65
- o(v, { operation: e.operation }, null, 8, ["operation"])
66
106
  ])
67
- ];
68
- }),
69
- _: 1
70
- }),
71
- o(t(s), null, {
72
- default: r(() => [
73
- n("div", q, [
74
- o(t(b), {
75
- fallback: "",
76
- operation: e.operation
77
- }, {
78
- header: r(() => {
79
- var a;
80
- return [
81
- o(_, {
82
- class: "example-path",
83
- deprecated: (a = e.operation.information) == null ? void 0 : a.deprecated,
84
- path: e.operation.path
85
- }, null, 8, ["deprecated", "path"])
86
- ];
87
- }),
88
- footer: r(() => [
89
- o(t(w), { operation: e.operation }, null, 8, ["operation"])
90
- ]),
91
- _: 1
92
- }, 8, ["operation"]),
93
- o(t(E), {
94
- operation: e.operation,
95
- style: { "margin-top": "12px" }
96
- }, null, 8, ["operation"])
97
- ])
98
- ]),
99
- _: 1
100
- })
101
- ]),
102
- _: 1
103
- })
104
- ]),
107
+ ]),
108
+ _: 1
109
+ })
110
+ ]),
111
+ _: 1
112
+ })
113
+ ];
114
+ }),
105
115
  _: 1
106
116
  })
107
117
  ]),
@@ -110,5 +120,5 @@ const R = { class: "operation-details" }, q = { class: "examples" }, Q = /* @__P
110
120
  }
111
121
  });
112
122
  export {
113
- Q as default
123
+ W as default
114
124
  };
@@ -1,9 +1,9 @@
1
1
  import { type Request, type ClientId as SnippetzClientId, type TargetId as SnippetzTargetId } from '@scalar/snippetz';
2
2
  import { type ClientId as HttpSnippetLiteClientId, type TargetId as HttpSnippetLiteTargetId } from 'httpsnippet-lite';
3
3
  export type TargetId = HttpSnippetLiteTargetId | SnippetzTargetId;
4
- export type ClientId = HttpSnippetLiteClientId | SnippetzClientId;
4
+ export type ClientId<T extends SnippetzTargetId> = HttpSnippetLiteClientId | SnippetzClientId<T>;
5
5
  /**
6
6
  * Returns a code example for given HAR request
7
7
  */
8
- export declare function getExampleCode(request: Request, target: TargetId, client: ClientId): Promise<string>;
8
+ export declare function getExampleCode<T extends SnippetzTargetId>(request: Request, target: TargetId, client: ClientId<T>): Promise<string | undefined>;
9
9
  //# sourceMappingURL=getExampleCode.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getExampleCode.d.ts","sourceRoot":"","sources":["../../src/helpers/getExampleCode.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,QAAQ,IAAI,gBAAgB,EACjC,KAAK,QAAQ,IAAI,gBAAgB,EAElC,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAEL,KAAK,QAAQ,IAAI,uBAAuB,EACxC,KAAK,QAAQ,IAAI,uBAAuB,EACzC,MAAM,kBAAkB,CAAA;AAEzB,MAAM,MAAM,QAAQ,GAAG,uBAAuB,GAAG,gBAAgB,CAAA;AACjE,MAAM,MAAM,QAAQ,GAAG,uBAAuB,GAAG,gBAAgB,CAAA;AAEjE;;GAEG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,QAAQ,EAChB,MAAM,EAAE,QAAQ,mBAyCjB"}
1
+ {"version":3,"file":"getExampleCode.d.ts","sourceRoot":"","sources":["../../src/helpers/getExampleCode.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,QAAQ,IAAI,gBAAgB,EACjC,KAAK,QAAQ,IAAI,gBAAgB,EAElC,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAEL,KAAK,QAAQ,IAAI,uBAAuB,EACxC,KAAK,QAAQ,IAAI,uBAAuB,EACzC,MAAM,kBAAkB,CAAA;AAEzB,MAAM,MAAM,QAAQ,GAAG,uBAAuB,GAAG,gBAAgB,CAAA;AACjE,MAAM,MAAM,QAAQ,CAAC,CAAC,SAAS,gBAAgB,IAC3C,uBAAuB,GACvB,gBAAgB,CAAC,CAAC,CAAC,CAAA;AAEvB;;GAEG;AACH,wBAAsB,cAAc,CAAC,CAAC,SAAS,gBAAgB,EAC7D,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,QAAQ,EAChB,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,+BAyCpB"}
@@ -1,20 +1,20 @@
1
- import { snippetz as r } from "@scalar/snippetz";
1
+ import { snippetz as o } from "@scalar/snippetz";
2
2
  import { HTTPSnippet as s } from "httpsnippet-lite";
3
- async function f(e, t, p) {
4
- const o = t;
5
- if (r().hasPlugin(o, p))
6
- return r().print(
7
- t,
3
+ async function f(t, e, p) {
4
+ const r = e;
5
+ if (o().hasPlugin(r, p))
6
+ return o().print(
7
+ r,
8
8
  p,
9
- e
9
+ t
10
10
  );
11
- if (e.url.startsWith("__"))
12
- return e.url;
11
+ if (t.url.startsWith("__"))
12
+ return t.url;
13
13
  try {
14
- const n = t == null ? void 0 : t.replace(
14
+ const n = e == null ? void 0 : e.replace(
15
15
  "js",
16
16
  "javascript"
17
- ), c = p, i = await new s(e).convert(
17
+ ), c = p, i = await new s(t).convert(
18
18
  n,
19
19
  c
20
20
  );
@@ -1,5 +1,5 @@
1
1
  import type { Spec } from '@scalar/types/legacy';
2
- export declare const parse: (specification: any, { proxy, }?: {
3
- proxy?: string;
2
+ export declare const parse: (specification: any, { proxyUrl, }?: {
3
+ proxyUrl?: string;
4
4
  }) => Promise<Spec>;
5
5
  //# sourceMappingURL=parse.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../src/helpers/parse.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAMhD,eAAO,MAAM,KAAK,kBACD,GAAG,eAGf;IACD,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,KACA,OAAO,CAAC,IAAI,CAyDd,CAAA"}
1
+ {"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../src/helpers/parse.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAMhD,eAAO,MAAM,KAAK,kBACD,GAAG,kBAGf;IACD,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,KACA,OAAO,CAAC,IAAI,CA0Dd,CAAA"}
@@ -4,8 +4,8 @@ import { fetchUrls as q } from "@scalar/openapi-parser/plugins/fetch-urls";
4
4
  import { createEmptySpecification as m } from "./createEmptySpecification.js";
5
5
  import { normalizeRequestMethod as E } from "../legacy/helpers/normalizeRequestMethod.js";
6
6
  import { validRequestMethods as A } from "../legacy/fixtures/httpRequestMethods.js";
7
- const z = (p, {
8
- proxy: e
7
+ const D = (p, {
8
+ proxyUrl: e
9
9
  } = {}) => new Promise(async (a, h) => {
10
10
  var s;
11
11
  try {
@@ -113,5 +113,5 @@ const z = (p, {
113
113
  };
114
114
  };
115
115
  export {
116
- z as parse
116
+ D as parse
117
117
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useDeprecationWarnings.d.ts","sourceRoot":"","sources":["../../src/hooks/useDeprecationWarnings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAOlE;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,aAAa,EAAE,sBAAsB,QAoC3E"}
1
+ {"version":3,"file":"useDeprecationWarnings.d.ts","sourceRoot":"","sources":["../../src/hooks/useDeprecationWarnings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAOlE;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,aAAa,EAAE,sBAAsB,QAgC3E"}
@@ -1,20 +1,17 @@
1
- import { watch as s } from "vue";
2
- const t = "https://api.scalar.com/request-proxy", o = "https://proxy.scalar.com", a = "http://localhost:5051";
3
- function n(e) {
4
- s(
1
+ import { watch as t } from "vue";
2
+ const o = "https://api.scalar.com/request-proxy", r = "https://proxy.scalar.com";
3
+ function p(e) {
4
+ t(
5
5
  () => e,
6
6
  () => {
7
- var r;
8
- e.proxy === t ? (console.warn(
9
- `[DEPRECATED] Warning: configuration.proxy points to our old proxy (${t}).`
7
+ e.proxy && console.warn(
8
+ "[DEPRECATED] You’re using the deprecated 'proxy' attribute, rename it to 'proxyUrl' or update the package."
9
+ ), (e.proxyUrl || e.proxy) === o && (console.warn(
10
+ `[DEPRECATED] Warning: configuration.proxyUrl points to our old proxy (${o}).`
10
11
  ), console.warn(
11
- `[DEPRECATED] We are overwriting the value and use the new proxy URL (${o}) instead.`
12
- ), e.proxy = o, console.warn(
13
- `[DEPRECATED] Action Required: You should manually update your configuration to use the new URL (${o}). Read more: https://github.com/scalar/scalar`
14
- )) : (r = e.proxy) != null && r.length && e.proxy !== o && e.proxy !== a && (console.warn(
15
- `[DEPRECATED] Warning: configuration.proxy points to a custom proxy (${e == null ? void 0 : e.proxy}).`
16
- ), console.warn(
17
- "[DEPRECATED] Action Required: You need to use our new proxy (written in Go). Read more: https://github.com/scalar/scalar/tree/main/examples/proxy-server"
12
+ `[DEPRECATED] We are overwriting the value and use the new proxy URL (${r}) instead.`
13
+ ), delete e.proxy, e.proxyUrl = r, console.warn(
14
+ `[DEPRECATED] Action Required: You should manually update your configuration to use the new URL (${r}). Read more: https://github.com/scalar/scalar`
18
15
  ));
19
16
  },
20
17
  {
@@ -23,5 +20,5 @@ function n(e) {
23
20
  );
24
21
  }
25
22
  export {
26
- n as useDeprecationWarnings
23
+ p as useDeprecationWarnings
27
24
  };
@@ -3,9 +3,9 @@ import { type MaybeRefOrGetter } from 'vue';
3
3
  /**
4
4
  * Keep the raw spec content in a ref and update it when the configuration changes.
5
5
  */
6
- export declare function useReactiveSpec({ specConfig, proxy, }: {
6
+ export declare function useReactiveSpec({ specConfig, proxyUrl, }: {
7
7
  specConfig?: MaybeRefOrGetter<SpecConfiguration>;
8
- proxy?: MaybeRefOrGetter<string>;
8
+ proxyUrl?: MaybeRefOrGetter<string>;
9
9
  }): {
10
10
  rawSpec: import("vue").Ref<string, string>;
11
11
  parsedSpec: {
@@ -57,6 +57,17 @@ export declare function useReactiveSpec({ specConfig, proxy, }: {
57
57
  summary?: string | undefined;
58
58
  tags?: string[] | undefined;
59
59
  deprecated?: boolean | undefined;
60
+ servers?: ({
61
+ url?: string | undefined;
62
+ description?: string | undefined;
63
+ variables?: {
64
+ [variable: string]: import("@scalar/openapi-types").OpenAPIV3.ServerVariableObject;
65
+ } | undefined;
66
+ } | {
67
+ url?: string | undefined;
68
+ description?: string | undefined;
69
+ variables?: Record<string, import("@scalar/openapi-types").OpenAPIV3_1.ServerVariableObject> | undefined;
70
+ })[] | undefined;
60
71
  'x-custom-examples'?: {
61
72
  lang: string;
62
73
  label: string;
@@ -73,6 +84,17 @@ export declare function useReactiveSpec({ specConfig, proxy, }: {
73
84
  source: string;
74
85
  }[] | undefined;
75
86
  } | undefined;
87
+ servers?: ({
88
+ url?: string | undefined;
89
+ description?: string | undefined;
90
+ variables?: {
91
+ [variable: string]: import("@scalar/openapi-types").OpenAPIV3.ServerVariableObject;
92
+ } | undefined;
93
+ } | {
94
+ url?: string | undefined;
95
+ description?: string | undefined;
96
+ variables?: Record<string, import("@scalar/openapi-types").OpenAPIV3_1.ServerVariableObject> | undefined;
97
+ })[] | undefined;
76
98
  pathParameters?: {
77
99
  name: string;
78
100
  in?: string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"useReactiveSpec.d.ts","sourceRoot":"","sources":["../../src/hooks/useReactiveSpec.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAC7D,OAAO,EAAE,KAAK,gBAAgB,EAAiC,MAAM,KAAK,CAAA;AAyD1E;;GAEG;AACH,wBAAgB,eAAe,CAAC,EAC9B,UAAU,EACV,KAAK,GACN,EAAE;IACD,UAAU,CAAC,EAAE,gBAAgB,CAAC,iBAAiB,CAAC,CAAA;IAChD,KAAK,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAA;CACjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwDA"}
1
+ {"version":3,"file":"useReactiveSpec.d.ts","sourceRoot":"","sources":["../../src/hooks/useReactiveSpec.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAC7D,OAAO,EAAE,KAAK,gBAAgB,EAAiC,MAAM,KAAK,CAAA;AAyD1E;;GAEG;AACH,wBAAgB,eAAe,CAAC,EAC9B,UAAU,EACV,QAAQ,GACT,EAAE;IACD,UAAU,CAAC,EAAE,gBAAgB,CAAC,iBAAiB,CAAC,CAAA;IAChD,QAAQ,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAA;CACpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwDA"}
@@ -18,14 +18,14 @@ const y = async ({ url: e, content: r }, n) => {
18
18
  if (typeof t == "object")
19
19
  return h(t);
20
20
  };
21
- function U({
21
+ function C({
22
22
  specConfig: e,
23
- proxy: r
23
+ proxyUrl: r
24
24
  }) {
25
25
  const n = u(""), t = v(l()), s = u(null);
26
26
  function c(o) {
27
27
  return o ? g(o, {
28
- proxy: r ? a(r) : void 0
28
+ proxyUrl: r ? a(r) : void 0
29
29
  }).then((i) => {
30
30
  s.value = null, Object.assign(t, {
31
31
  servers: [],
@@ -54,5 +54,5 @@ function U({
54
54
  };
55
55
  }
56
56
  export {
57
- U as useReactiveSpec
57
+ C as useReactiveSpec
58
58
  };