@scalar/api-reference 1.30.0 → 1.31.1

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 (167) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/dist/browser/standalone.js +6690 -6569
  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 +164 -181
  7. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts.map +1 -1
  8. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.js +2 -2
  9. package/dist/components/Content/ClientLibraries/ClientLibraries.vue2.js +56 -51
  10. package/dist/components/Content/Content.vue.d.ts.map +1 -1
  11. package/dist/components/Content/Content.vue.js +1 -1
  12. package/dist/components/Content/Content.vue2.js +5 -5
  13. package/dist/components/Content/Introduction/Introduction.vue.d.ts +2 -2
  14. package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
  15. package/dist/components/Content/Introduction/Introduction.vue.js +2 -2
  16. package/dist/components/Content/Introduction/Introduction.vue2.js +57 -63
  17. package/dist/components/Content/Lazy/Loading.vue.d.ts.map +1 -1
  18. package/dist/components/Content/Lazy/Loading.vue.js +46 -46
  19. package/dist/components/Content/Models/Models.vue.d.ts +2 -2
  20. package/dist/components/Content/Models/Models.vue.d.ts.map +1 -1
  21. package/dist/components/Content/Models/Models.vue.js +2 -2
  22. package/dist/components/Content/Models/Models.vue2.js +9 -7
  23. package/dist/components/Content/Models/ModelsAccordion.vue.d.ts +2 -2
  24. package/dist/components/Content/Models/ModelsAccordion.vue.d.ts.map +1 -1
  25. package/dist/components/Content/Models/ModelsAccordion.vue.js +2 -2
  26. package/dist/components/Content/Schema/Schema.preview.d.ts +294 -84
  27. package/dist/components/Content/Schema/Schema.preview.d.ts.map +1 -1
  28. package/dist/components/Content/Schema/Schema.vue.d.ts +21 -4
  29. package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
  30. package/dist/components/Content/Schema/Schema.vue.js +2 -2
  31. package/dist/components/Content/Schema/Schema.vue2.js +158 -131
  32. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts +2 -2
  33. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
  34. package/dist/components/Content/Schema/SchemaComposition.vue.js +57 -53
  35. package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts +2 -3
  36. package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts.map +1 -1
  37. package/dist/components/Content/Schema/SchemaDiscriminator.vue.js +29 -29
  38. package/dist/components/Content/Schema/SchemaHeading.vue.d.ts +2 -2
  39. package/dist/components/Content/Schema/SchemaHeading.vue.d.ts.map +1 -1
  40. package/dist/components/Content/Schema/SchemaHeading.vue.js +1 -1
  41. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +12 -3
  42. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  43. package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
  44. package/dist/components/Content/Schema/SchemaProperty.vue2.js +133 -103
  45. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts +3 -2
  46. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
  47. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +2 -2
  48. package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +133 -126
  49. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts +2 -2
  50. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts.map +1 -1
  51. package/dist/components/Content/Tag/TagList.vue.d.ts +2 -2
  52. package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
  53. package/dist/components/DocumentSelector/DocumentSelector.vue.js +3 -3
  54. package/dist/components/Layouts/ClassicLayout.vue.d.ts.map +1 -1
  55. package/dist/components/Layouts/ClassicLayout.vue.js +19 -17
  56. package/dist/components/Layouts/Layouts.vue.js +11 -9
  57. package/dist/components/Layouts/ModernLayout.vue2.js +22 -20
  58. package/dist/components/Section/SectionAccordion.vue.d.ts.map +1 -1
  59. package/dist/components/Section/SectionAccordion.vue.js +2 -2
  60. package/dist/components/Section/SectionAccordion.vue2.js +1 -1
  61. package/dist/components/Section/SectionContainerAccordion.vue.d.ts.map +1 -1
  62. package/dist/components/Section/SectionContainerAccordion.vue.js +2 -2
  63. package/dist/components/Section/SectionContainerAccordion.vue2.js +4 -4
  64. package/dist/components/Section/SectionHeader.vue.d.ts.map +1 -1
  65. package/dist/components/Section/SectionHeader.vue.js +2 -2
  66. package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
  67. package/dist/components/Sidebar/Sidebar.vue.js +2 -2
  68. package/dist/components/Sidebar/Sidebar.vue2.js +56 -56
  69. package/dist/components/SingleApiReference.vue.d.ts.map +1 -1
  70. package/dist/components/SingleApiReference.vue.js +27 -33
  71. package/dist/esm.d.ts.map +1 -1
  72. package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts +2 -2
  73. package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts.map +1 -1
  74. package/dist/features/ApiClientModal/ApiClientModal.vue.js +49 -50
  75. package/dist/features/ApiClientModal/useApiClient.d.ts +196 -196
  76. package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
  77. package/dist/features/DocumentSource/hooks/useDocumentFetcher.d.ts +11 -0
  78. package/dist/features/DocumentSource/hooks/useDocumentFetcher.d.ts.map +1 -0
  79. package/dist/features/DocumentSource/hooks/useDocumentFetcher.js +38 -0
  80. package/dist/features/DocumentSource/hooks/useDocumentSource.d.ts +21 -0
  81. package/dist/features/DocumentSource/hooks/useDocumentSource.d.ts.map +1 -0
  82. package/dist/features/DocumentSource/hooks/useDocumentSource.js +94 -0
  83. package/dist/features/DocumentSource/index.d.ts +2 -0
  84. package/dist/features/DocumentSource/index.d.ts.map +1 -0
  85. package/dist/features/DownloadLink/DownloadLink.vue.d.ts +1 -1
  86. package/dist/features/DownloadLink/DownloadLink.vue.d.ts.map +1 -1
  87. package/dist/features/DownloadLink/DownloadLink.vue.js +1 -1
  88. package/dist/features/DownloadLink/DownloadLink.vue2.js +18 -17
  89. package/dist/features/DownloadLink/index.d.ts +1 -0
  90. package/dist/features/DownloadLink/index.d.ts.map +1 -1
  91. package/dist/features/DownloadLink/openapi-version-symbol.d.ts +2 -0
  92. package/dist/features/DownloadLink/openapi-version-symbol.d.ts.map +1 -0
  93. package/dist/features/DownloadLink/openapi-version-symbol.js +4 -0
  94. package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts +2 -0
  95. package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
  96. package/dist/features/ExampleRequest/ExampleRequest.vue.js +2 -2
  97. package/dist/features/ExampleRequest/ExampleRequest.vue2.js +178 -127
  98. package/dist/features/Operation/Operation.vue.d.ts +2 -2
  99. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  100. package/dist/features/Operation/Operation.vue.js +29 -23
  101. package/dist/features/Operation/components/OperationParameters.vue.d.ts +7 -3
  102. package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
  103. package/dist/features/Operation/components/OperationParameters.vue.js +28 -24
  104. package/dist/features/Operation/components/OperationResponses.vue.d.ts +2 -2
  105. package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
  106. package/dist/features/Operation/components/ParameterHeaders.vue.d.ts +2 -2
  107. package/dist/features/Operation/components/ParameterHeaders.vue.d.ts.map +1 -1
  108. package/dist/features/Operation/components/ParameterHeaders.vue.js +2 -2
  109. package/dist/features/Operation/components/ParameterList.vue.d.ts +2 -2
  110. package/dist/features/Operation/components/ParameterList.vue.d.ts.map +1 -1
  111. package/dist/features/Operation/components/ParameterList.vue.js +2 -2
  112. package/dist/features/Operation/components/ParameterListItem.vue.d.ts +2 -2
  113. package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
  114. package/dist/features/Operation/components/ParameterListItem.vue.js +3 -3
  115. package/dist/features/Operation/components/ParameterListItem.vue2.js +6 -6
  116. package/dist/features/Operation/components/RequestBody.vue.d.ts +7 -3
  117. package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
  118. package/dist/features/Operation/components/RequestBody.vue.js +2 -2
  119. package/dist/features/Operation/components/RequestBody.vue2.js +41 -36
  120. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +7 -3
  121. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  122. package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
  123. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +84 -79
  124. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +5 -1
  125. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  126. package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
  127. package/dist/features/Operation/layouts/ModernLayout.vue2.js +66 -57
  128. package/dist/features/Operation/types/schemas.d.ts +2 -2
  129. package/dist/features/Operation/types/schemas.d.ts.map +1 -1
  130. package/dist/features/Search/SearchButton.vue.js +2 -2
  131. package/dist/helpers/local-storage.d.ts +8 -0
  132. package/dist/helpers/local-storage.d.ts.map +1 -0
  133. package/dist/helpers/local-storage.js +6 -0
  134. package/dist/helpers/measure.d.ts +21 -0
  135. package/dist/helpers/measure.d.ts.map +1 -0
  136. package/dist/helpers/measure.js +7 -0
  137. package/dist/helpers/parse.d.ts +3 -5
  138. package/dist/helpers/parse.d.ts.map +1 -1
  139. package/dist/helpers/parse.js +64 -86
  140. package/dist/helpers/scroll-to-id.d.ts.map +1 -1
  141. package/dist/helpers/scroll-to-id.js +18 -4
  142. package/dist/hooks/useDiscriminator.d.ts +53 -0
  143. package/dist/hooks/useDiscriminator.d.ts.map +1 -0
  144. package/dist/hooks/useDiscriminator.js +149 -0
  145. package/dist/hooks/useOperationDiscriminator.d.ts +8 -0
  146. package/dist/hooks/useOperationDiscriminator.d.ts.map +1 -0
  147. package/dist/hooks/useOperationDiscriminator.js +57 -0
  148. package/dist/index.d.ts +0 -1
  149. package/dist/index.d.ts.map +1 -1
  150. package/dist/index.js +33 -35
  151. package/dist/libs/openapi.d.ts +3 -3
  152. package/dist/libs/openapi.d.ts.map +1 -1
  153. package/dist/libs/openapi.js +35 -42
  154. package/dist/standalone/lib/html-api.d.ts.map +1 -1
  155. package/dist/standalone/lib/html-api.js +15 -15
  156. package/dist/stores/useHttpClientStore.d.ts.map +1 -1
  157. package/dist/stores/useHttpClientStore.js +19 -18
  158. package/dist/style.css +1 -1
  159. package/dist/types.d.ts +27 -3
  160. package/dist/types.d.ts.map +1 -1
  161. package/package.json +15 -16
  162. package/dist/components/Content/Schema/helpers/schema-discriminator.d.ts +0 -12
  163. package/dist/components/Content/Schema/helpers/schema-discriminator.d.ts.map +0 -1
  164. package/dist/components/Content/Schema/helpers/schema-discriminator.js +0 -45
  165. package/dist/hooks/useReactiveSpec.d.ts +0 -448
  166. package/dist/hooks/useReactiveSpec.d.ts.map +0 -1
  167. package/dist/hooks/useReactiveSpec.js +0 -59
@@ -1,19 +1,19 @@
1
- import { defineComponent as C, computed as b, createBlock as r, openBlock as s, unref as e, createSlots as k, withCtx as a, createElementVNode as t, createVNode as i, createCommentVNode as m, withModifiers as O, toDisplayString as f, normalizeClass as g, createTextVNode as S } from "vue";
2
- import { ScalarIcon as _, ScalarIconButton as B, ScalarMarkdown as R } from "@scalar/components";
3
- import { useClipboard as w } from "@scalar/use-hooks/useClipboard";
4
- import I from "../../../components/OperationPath.vue.js";
5
- import { useConfig as N } from "../../../hooks/useConfig.js";
6
- import { isOperationDeprecated as T, getOperationStability as h, getOperationStabilityColor as V } from "../../../libs/openapi.js";
7
- import $ from "../components/OperationParameters.vue.js";
8
- import q from "../components/OperationResponses.vue.js";
9
- import E from "../../../components/Section/SectionAccordion.vue.js";
10
- import z from "../../ExampleResponses/ExampleResponses.vue.js";
11
- import A from "../../ExampleRequest/ExampleRequest.vue.js";
12
- import D from "../../TestRequestButton/TestRequestButton.vue.js";
13
- import L from "../../../components/HttpMethod/HttpMethod.vue.js";
14
- import M from "../../../components/Anchor/Anchor.vue.js";
15
- import P from "../../../components/Badge/Badge.vue.js";
16
- const U = { class: "operation-title" }, j = { class: "operation-details" }, F = { class: "endpoint-label" }, G = { class: "endpoint-label-path" }, H = { class: "endpoint-label-name" }, J = { class: "endpoint-content" }, K = { class: "operation-details-card" }, Q = { class: "operation-details-card-item" }, W = { class: "operation-details-card-item" }, fo = /* @__PURE__ */ C({
1
+ import { defineComponent as k, computed as O, createBlock as n, openBlock as r, unref as o, createSlots as S, withCtx as i, createElementVNode as t, createVNode as a, createCommentVNode as c, withModifiers as V, toDisplayString as h, normalizeClass as _, createTextVNode as B } from "vue";
2
+ import { ScalarIcon as w, ScalarIconButton as R, ScalarMarkdown as T } from "@scalar/components";
3
+ import { useClipboard as I } from "@scalar/use-hooks/useClipboard";
4
+ import N from "../../../components/OperationPath.vue.js";
5
+ import { useConfig as P } from "../../../hooks/useConfig.js";
6
+ import { isOperationDeprecated as $, getOperationStability as f, getOperationStabilityColor as q } from "../../../libs/openapi.js";
7
+ import z from "../components/OperationParameters.vue.js";
8
+ import A from "../components/OperationResponses.vue.js";
9
+ import D from "../../../components/Section/SectionAccordion.vue.js";
10
+ import E from "../../ExampleResponses/ExampleResponses.vue.js";
11
+ import U from "../../ExampleRequest/ExampleRequest.vue.js";
12
+ import L from "../../TestRequestButton/TestRequestButton.vue.js";
13
+ import M from "../../../components/HttpMethod/HttpMethod.vue.js";
14
+ import j from "../../../components/Anchor/Anchor.vue.js";
15
+ import F from "../../../components/Badge/Badge.vue.js";
16
+ const G = { class: "operation-title" }, H = { class: "operation-details" }, J = { class: "endpoint-label" }, K = { class: "endpoint-label-path" }, Q = { class: "endpoint-label-name" }, W = { class: "endpoint-content" }, X = { class: "operation-details-card" }, Y = { class: "operation-details-card-item" }, Z = { class: "operation-details-card-item" }, ue = /* @__PURE__ */ k({
17
17
  __name: "ClassicLayout",
18
18
  props: {
19
19
  id: {},
@@ -23,45 +23,48 @@ const U = { class: "operation-title" }, j = { class: "operation-details" }, F =
23
23
  transformedOperation: {},
24
24
  schemas: {}
25
25
  },
26
- setup(p) {
27
- const { copyToClipboard: u } = w(), v = N(), y = b(() => p.operation.summary || p.operation.path);
28
- return (o, l) => {
26
+ emits: ["update:modelValue"],
27
+ setup(s, { emit: u }) {
28
+ const { copyToClipboard: v } = I(), y = P(), C = O(() => s.operation.summary || s.operation.path), b = u, p = (e) => {
29
+ b("update:modelValue", e);
30
+ };
31
+ return (e, l) => {
29
32
  var d;
30
- return s(), r(e(E), {
31
- id: o.id,
33
+ return r(), n(o(D), {
34
+ id: e.id,
32
35
  class: "reference-endpoint",
33
36
  transparent: ""
34
- }, k({
35
- title: a(() => [
36
- t("div", U, [
37
- t("div", j, [
38
- i(e(L), {
37
+ }, S({
38
+ title: i(() => [
39
+ t("div", G, [
40
+ t("div", H, [
41
+ a(o(M), {
39
42
  class: "endpoint-type",
40
- method: o.operation.method,
43
+ method: e.operation.method,
41
44
  short: ""
42
45
  }, null, 8, ["method"]),
43
- i(e(M), {
44
- id: o.id ?? "",
46
+ a(o(j), {
47
+ id: e.id ?? "",
45
48
  class: "endpoint-anchor"
46
49
  }, {
47
- default: a(() => [
48
- t("h3", F, [
49
- t("div", G, [
50
- i(I, {
51
- deprecated: e(T)(o.operation),
52
- path: o.operation.path
50
+ default: i(() => [
51
+ t("h3", J, [
52
+ t("div", K, [
53
+ a(N, {
54
+ deprecated: o($)(e.operation),
55
+ path: e.operation.path
53
56
  }, null, 8, ["deprecated", "path"])
54
57
  ]),
55
- t("div", H, f(y.value), 1),
56
- e(h)(o.operation) ? (s(), r(e(P), {
58
+ t("div", Q, h(C.value), 1),
59
+ o(f)(e.operation) ? (r(), n(o(F), {
57
60
  key: 0,
58
- class: g(e(V)(o.operation))
61
+ class: _(o(q)(e.operation))
59
62
  }, {
60
- default: a(() => [
61
- S(f(e(h)(o.operation)), 1)
63
+ default: i(() => [
64
+ B(h(o(f)(e.operation)), 1)
62
65
  ]),
63
66
  _: 1
64
- }, 8, ["class"])) : m("", !0)
67
+ }, 8, ["class"])) : c("", !0)
65
68
  ])
66
69
  ]),
67
70
  _: 1
@@ -69,69 +72,71 @@ const U = { class: "operation-title" }, j = { class: "operation-details" }, F =
69
72
  ])
70
73
  ])
71
74
  ]),
72
- actions: a(({ active: n }) => {
73
- var c;
75
+ actions: i(({ active: g }) => {
76
+ var m;
74
77
  return [
75
- n ? (s(), r(e(D), {
78
+ g ? (r(), n(o(L), {
76
79
  key: 0,
77
- operation: o.operation
78
- }, null, 8, ["operation"])) : (c = e(v)) != null && c.hideTestRequestButton ? m("", !0) : (s(), r(e(_), {
80
+ operation: e.operation
81
+ }, null, 8, ["operation"])) : (m = o(y)) != null && m.hideTestRequestButton ? c("", !0) : (r(), n(o(w), {
79
82
  key: 1,
80
- class: "endpoint-try-hint",
83
+ class: "endpoint-try-hint size-6",
81
84
  icon: "Play",
82
85
  thickness: "1.75px"
83
86
  })),
84
- i(e(B), {
85
- class: "endpoint-copy",
87
+ a(o(R), {
88
+ class: "endpoint-copy p-0.5",
86
89
  icon: "Clipboard",
87
90
  label: "Copy endpoint URL",
88
91
  size: "xs",
89
92
  variant: "ghost",
90
- onClick: l[0] || (l[0] = O((X) => e(u)(o.operation.path), ["stop"]))
93
+ onClick: l[0] || (l[0] = V((x) => o(v)(e.operation.path), ["stop"]))
91
94
  })
92
95
  ];
93
96
  }),
94
- default: a(() => [
95
- t("div", J, [
96
- t("div", K, [
97
- t("div", Q, [
98
- i($, {
99
- operation: o.operation,
100
- schemas: o.schemas
97
+ default: i(() => [
98
+ t("div", W, [
99
+ t("div", X, [
100
+ t("div", Y, [
101
+ a(z, {
102
+ operation: e.operation,
103
+ schemas: e.schemas,
104
+ "onUpdate:modelValue": p
101
105
  }, null, 8, ["operation", "schemas"])
102
106
  ]),
103
- t("div", W, [
104
- i(q, {
107
+ t("div", Z, [
108
+ a(A, {
105
109
  collapsableItems: !1,
106
- operation: o.transformedOperation,
107
- schemas: o.schemas
110
+ operation: e.transformedOperation,
111
+ schemas: e.schemas
108
112
  }, null, 8, ["operation", "schemas"])
109
113
  ])
110
114
  ]),
111
- i(e(z), {
112
- responses: o.operation.responses
115
+ a(o(E), {
116
+ responses: e.operation.responses
113
117
  }, null, 8, ["responses"]),
114
- i(e(A), {
115
- collection: o.collection,
116
- operation: o.operation,
117
- server: o.server,
118
- transformedOperation: o.transformedOperation
118
+ a(o(U), {
119
+ collection: e.collection,
120
+ operation: e.operation,
121
+ server: e.server,
122
+ transformedOperation: e.transformedOperation,
123
+ "onUpdate:modelValue": p
119
124
  }, null, 8, ["collection", "operation", "server", "transformedOperation"])
120
125
  ])
121
126
  ]),
122
127
  _: 2
123
128
  }, [
124
- (d = o.operation) != null && d.description ? {
129
+ (d = e.operation) != null && d.description ? {
125
130
  name: "description",
126
- fn: a(() => {
127
- var n;
128
- return [
129
- i(e(R), {
130
- value: (n = o.operation) == null ? void 0 : n.description,
131
- withImages: ""
132
- }, null, 8, ["value"])
133
- ];
134
- }),
131
+ fn: i(() => [
132
+ a(o(T), {
133
+ value: e.operation.description,
134
+ withImages: "",
135
+ withAnchors: "",
136
+ transformType: "heading",
137
+ anchorPrefix: e.id
138
+ }, null, 8, ["value", "anchorPrefix"])
139
+ ]),
135
140
  key: "0"
136
141
  } : void 0
137
142
  ]), 1032, ["id"]);
@@ -139,5 +144,5 @@ const U = { class: "operation-title" }, j = { class: "operation-details" }, F =
139
144
  }
140
145
  });
141
146
  export {
142
- fo as default
147
+ ue as default
143
148
  };
@@ -10,6 +10,10 @@ type __VLS_Props = {
10
10
  transformedOperation: TransformedOperation;
11
11
  schemas?: Schemas;
12
12
  };
13
- declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
14
+ "update:modelValue": (value: string) => any;
15
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
16
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
17
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
18
  export default _default;
15
19
  //# sourceMappingURL=ModernLayout.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ModernLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/layouts/ModernLayout.vue"],"names":[],"mappings":"AAuJA,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EACT,MAAM,EACP,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAgBhE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAA;AAejE,KAAK,WAAW,GAAG;IACjB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,UAAU,EAAE,UAAU,CAAA;IACtB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,SAAS,EAAE,SAAS,CAAA;IACpB,0CAA0C;IAC1C,oBAAoB,EAAE,oBAAoB,CAAA;IAC1C,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAC;;AA2PF,wBAOG"}
1
+ {"version":3,"file":"ModernLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/layouts/ModernLayout.vue"],"names":[],"mappings":"AAuKA,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EACT,MAAM,EACP,MAAM,iCAAiC,CAAA;AAExC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAgBhE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAA;AAejE,KAAK,WAAW,GAAG;IACjB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,UAAU,EAAE,UAAU,CAAA;IACtB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,SAAS,EAAE,SAAS,CAAA;IACpB,0CAA0C;IAC1C,oBAAoB,EAAE,oBAAoB,CAAA;IAC1C,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAC;;;;;;AAoSF,wBAQG"}
@@ -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-af49b015"]]);
4
+ const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-8ef8ef87"]]);
5
5
  export {
6
- m as default
6
+ a as default
7
7
  };
@@ -1,23 +1,23 @@
1
- import { defineComponent as y, useId as O, computed as S, createBlock as t, openBlock as n, unref as o, withCtx as r, createVNode as a, createCommentVNode as c, createElementVNode as i, normalizeClass as f, createTextVNode as u, toDisplayString as h } from "vue";
2
- import { ScalarMarkdown as k, ScalarErrorBoundary as l } from "@scalar/components";
3
- import C from "../../../components/OperationPath.vue.js";
4
- import { useConfig as B } from "../../../hooks/useConfig.js";
5
- import { getOperationStability as b, getOperationStabilityColor as E, isOperationDeprecated as N } from "../../../libs/openapi.js";
6
- import V from "../components/callbacks/Callbacks.vue.js";
7
- import _ from "../components/OperationParameters.vue.js";
8
- import w from "../components/OperationResponses.vue.js";
9
- import I from "../../../components/Section/Section.vue.js";
10
- import R from "../../../components/Section/SectionContent.vue.js";
11
- import T from "../../../components/Badge/Badge.vue.js";
12
- import $ from "../../../components/Section/SectionHeader.vue.js";
13
- import q from "../../../components/Anchor/Anchor.vue.js";
14
- import D from "../../../components/Section/SectionHeaderTag.vue.js";
15
- import H from "../../../components/Section/SectionColumns.vue.js";
16
- import g from "../../../components/Section/SectionColumn.vue.js";
17
- import L from "../../ExampleRequest/ExampleRequest.vue.js";
18
- import M from "../../TestRequestButton/TestRequestButton.vue.js";
1
+ import { defineComponent as k, useId as C, computed as V, createBlock as t, openBlock as n, unref as o, withCtx as r, createVNode as a, createCommentVNode as u, createElementVNode as i, normalizeClass as f, createTextVNode as h, toDisplayString as b } from "vue";
2
+ import { ScalarMarkdown as B, ScalarErrorBoundary as l } from "@scalar/components";
3
+ import w from "../../../components/OperationPath.vue.js";
4
+ import { useConfig as E } from "../../../hooks/useConfig.js";
5
+ import { getOperationStability as g, getOperationStabilityColor as N, isOperationDeprecated as T } from "../../../libs/openapi.js";
6
+ import D from "../components/callbacks/Callbacks.vue.js";
7
+ import I from "../components/OperationParameters.vue.js";
8
+ import P from "../components/OperationResponses.vue.js";
9
+ import R from "../../../components/Section/Section.vue.js";
10
+ import $ from "../../../components/Section/SectionContent.vue.js";
11
+ import q from "../../../components/Badge/Badge.vue.js";
12
+ import A from "../../../components/Section/SectionHeader.vue.js";
13
+ import H from "../../../components/Anchor/Anchor.vue.js";
14
+ import L from "../../../components/Section/SectionHeaderTag.vue.js";
15
+ import M from "../../../components/Section/SectionColumns.vue.js";
16
+ import v from "../../../components/Section/SectionColumn.vue.js";
17
+ import U from "../../ExampleRequest/ExampleRequest.vue.js";
18
+ import _ from "../../TestRequestButton/TestRequestButton.vue.js";
19
19
  import z from "../../ExampleResponses/ExampleResponses.vue.js";
20
- const A = { class: "operation-details" }, P = { class: "examples" }, se = /* @__PURE__ */ y({
20
+ const j = { class: "operation-details" }, F = { class: "examples" }, de = /* @__PURE__ */ k({
21
21
  __name: "ModernLayout",
22
22
  props: {
23
23
  id: {},
@@ -27,43 +27,46 @@ const A = { class: "operation-details" }, P = { class: "examples" }, se = /* @__
27
27
  transformedOperation: {},
28
28
  schemas: {}
29
29
  },
30
- setup(s) {
31
- const p = O(), v = B(), m = S(() => s.operation.summary || s.operation.path);
32
- return (e, j) => (n(), t(o(I), {
30
+ emits: ["update:modelValue"],
31
+ setup(s, { emit: y }) {
32
+ const O = y, m = C(), S = E(), p = V(() => s.operation.summary || s.operation.path), d = (e) => {
33
+ O("update:modelValue", e);
34
+ };
35
+ return (e, G) => (n(), t(o(R), {
33
36
  id: e.id,
34
- "aria-labelledby": o(p),
35
- label: m.value,
37
+ "aria-labelledby": o(m),
38
+ label: p.value,
36
39
  tabindex: "-1"
37
40
  }, {
38
41
  default: r(() => [
39
- a(o(R), {
40
- loading: o(v).isLoading
42
+ a(o($), {
43
+ loading: o(S).isLoading
41
44
  }, {
42
45
  default: r(() => [
43
- o(b)(e.operation) ? (n(), t(o(T), {
46
+ o(g)(e.operation) ? (n(), t(o(q), {
44
47
  key: 0,
45
- class: f(o(E)(e.operation))
48
+ class: f(o(N)(e.operation))
46
49
  }, {
47
50
  default: r(() => [
48
- u(h(o(b)(e.operation)), 1)
51
+ h(b(o(g)(e.operation)), 1)
49
52
  ]),
50
53
  _: 1
51
- }, 8, ["class"])) : c("", !0),
54
+ }, 8, ["class"])) : u("", !0),
52
55
  i("div", {
53
- class: f(o(N)(e.operation) ? "deprecated" : "")
56
+ class: f(o(T)(e.operation) ? "deprecated" : "")
54
57
  }, [
55
- a(o($), null, {
58
+ a(o(A), null, {
56
59
  default: r(() => [
57
- a(o(q), {
60
+ a(o(H), {
58
61
  id: e.id ?? ""
59
62
  }, {
60
63
  default: r(() => [
61
- a(o(D), {
62
- id: o(p),
64
+ a(o(L), {
65
+ id: o(m),
63
66
  level: 3
64
67
  }, {
65
68
  default: r(() => [
66
- u(h(m.value), 1)
69
+ h(b(p.value), 1)
67
70
  ]),
68
71
  _: 1
69
72
  }, 8, ["id"])
@@ -74,31 +77,35 @@ const A = { class: "operation-details" }, P = { class: "examples" }, se = /* @__
74
77
  _: 1
75
78
  })
76
79
  ], 2),
77
- a(o(H), null, {
80
+ a(o(M), null, {
78
81
  default: r(() => [
79
- a(o(g), null, {
82
+ a(o(v), null, {
80
83
  default: r(() => [
81
- i("div", A, [
82
- a(o(k), {
84
+ i("div", j, [
85
+ a(o(B), {
83
86
  value: e.operation.description,
84
- withImages: ""
85
- }, null, 8, ["value"]),
86
- a(_, {
87
+ withImages: "",
88
+ withAnchors: "",
89
+ transformType: "heading",
90
+ anchorPrefix: e.id
91
+ }, null, 8, ["value", "anchorPrefix"]),
92
+ a(I, {
87
93
  operation: e.operation,
88
- schemas: e.schemas
94
+ schemas: e.schemas,
95
+ "onUpdate:modelValue": d
89
96
  }, null, 8, ["operation", "schemas"]),
90
- a(w, {
97
+ a(P, {
91
98
  operation: e.transformedOperation,
92
99
  schemas: e.schemas
93
100
  }, null, 8, ["operation", "schemas"]),
94
101
  a(o(l), null, {
95
102
  default: r(() => [
96
- e.operation.callbacks ? (n(), t(V, {
103
+ e.operation.callbacks ? (n(), t(D, {
97
104
  key: 0,
98
105
  callbacks: e.operation.callbacks,
99
106
  collection: e.collection,
100
107
  schemas: e.schemas
101
- }, null, 8, ["callbacks", "collection", "schemas"])) : c("", !0)
108
+ }, null, 8, ["callbacks", "collection", "schemas"])) : u("", !0)
102
109
  ]),
103
110
  _: 1
104
111
  })
@@ -106,33 +113,35 @@ const A = { class: "operation-details" }, P = { class: "examples" }, se = /* @__
106
113
  ]),
107
114
  _: 1
108
115
  }),
109
- a(o(g), null, {
116
+ a(o(v), null, {
110
117
  default: r(() => [
111
- i("div", P, [
118
+ i("div", F, [
112
119
  a(o(l), null, {
113
120
  default: r(() => [
114
- a(o(L), {
121
+ a(o(U), {
115
122
  collection: e.collection,
116
123
  fallback: "",
117
124
  operation: e.operation,
118
125
  server: e.server,
119
- transformedOperation: e.transformedOperation
126
+ transformedOperation: e.transformedOperation,
127
+ schemas: e.schemas,
128
+ "onUpdate:modelValue": d
120
129
  }, {
121
130
  header: r(() => {
122
- var d;
131
+ var c;
123
132
  return [
124
- a(C, {
133
+ a(w, {
125
134
  class: "example-path",
126
- deprecated: (d = e.transformedOperation.information) == null ? void 0 : d.deprecated,
135
+ deprecated: (c = e.transformedOperation.information) == null ? void 0 : c.deprecated,
127
136
  path: e.transformedOperation.path
128
137
  }, null, 8, ["deprecated", "path"])
129
138
  ];
130
139
  }),
131
140
  footer: r(() => [
132
- a(o(M), { operation: e.operation }, null, 8, ["operation"])
141
+ a(o(_), { operation: e.operation }, null, 8, ["operation"])
133
142
  ]),
134
143
  _: 1
135
- }, 8, ["collection", "operation", "server", "transformedOperation"])
144
+ }, 8, ["collection", "operation", "server", "transformedOperation", "schemas"])
136
145
  ]),
137
146
  _: 1
138
147
  }),
@@ -161,5 +170,5 @@ const A = { class: "operation-details" }, P = { class: "examples" }, se = /* @__
161
170
  }
162
171
  });
163
172
  export {
164
- se as default
173
+ de as default
165
174
  };
@@ -1,3 +1,3 @@
1
- import type { OpenAPIV2, OpenAPIV3, OpenAPIV3_1 } from '@scalar/openapi-types';
2
- export type Schemas = OpenAPIV2.DefinitionsObject | Record<string, OpenAPIV3.SchemaObject> | Record<string, OpenAPIV3_1.SchemaObject> | unknown;
1
+ import type { OpenAPIV3_1 } from '@scalar/openapi-types';
2
+ export type Schemas = Record<string, OpenAPIV3_1.SchemaObject> | unknown;
3
3
  //# sourceMappingURL=schemas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/types/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAE9E,MAAM,MAAM,OAAO,GACf,SAAS,CAAC,iBAAiB,GAC3B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,YAAY,CAAC,GACtC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,GACxC,OAAO,CAAA"}
1
+ {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/types/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,GAAG,OAAO,CAAA"}
@@ -1,7 +1,7 @@
1
1
  import o from "./SearchButton.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-d21ab44f"]]);
4
+ const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-ec9c0928"]]);
5
5
  export {
6
- m as default
6
+ e as default
7
7
  };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * localStorage keys for all reference resources
3
+ * to ensure we do not have any conflicts
4
+ */
5
+ export declare const REFERENCE_LS_KEYS: {
6
+ readonly SELECTED_CLIENT: "scalar-reference-selected-client";
7
+ };
8
+ //# sourceMappingURL=local-storage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local-storage.d.ts","sourceRoot":"","sources":["../../src/helpers/local-storage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,iBAAiB;;CAEpB,CAAA"}
@@ -0,0 +1,6 @@
1
+ const e = {
2
+ SELECTED_CLIENT: "scalar-reference-selected-client"
3
+ };
4
+ export {
5
+ e as REFERENCE_LS_KEYS
6
+ };
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Measures the execution time of a function and logs it.
3
+ * Works with both async and sync functions.
4
+ * Returns the result of the measured function.
5
+ *
6
+ * @example
7
+ * ```ts
8
+ * // Async function
9
+ * const result = await measure('api-call', async () => {
10
+ * return await fetchData()
11
+ * })
12
+ *
13
+ * // Sync function
14
+ * const result = measure('computation', () => {
15
+ * return heavyComputation()
16
+ * })
17
+ * ```
18
+ */
19
+ export declare function measure<T>(name: string, fn: () => Promise<T>): Promise<T>;
20
+ export declare function measure<T>(name: string, fn: () => T): T;
21
+ //# sourceMappingURL=measure.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"measure.d.ts","sourceRoot":"","sources":["../../src/helpers/measure.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;AAC1E,wBAAgB,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC,CAAA"}
@@ -0,0 +1,7 @@
1
+ function c(n, o) {
2
+ const r = performance.now(), t = o(), e = performance.now(), s = Math.round(e - r);
3
+ return console.info(`${n}: ${s} ms`), t;
4
+ }
5
+ export {
6
+ c as measure
7
+ };
@@ -1,11 +1,9 @@
1
+ import type { OpenAPIV3_1 } from '@scalar/openapi-types';
1
2
  import type { Spec } from '@scalar/types/legacy';
2
- import type { UnknownObject } from '@scalar/types/utils';
3
3
  /**
4
- * Parse the given specification and return a super custom transformed specification.
4
+ * Parse the given dereferencedDocument and return a super custom transformed dereferencedDocument.
5
5
  *
6
6
  * @deprecated Try to use a store instead.
7
7
  */
8
- export declare const parse: (specification: UnknownObject | string | undefined, { proxyUrl, }?: {
9
- proxyUrl?: string;
10
- }) => Promise<Spec>;
8
+ export declare const parse: (dereferencedDocument: OpenAPIV3_1.Document) => Promise<Spec>;
11
9
  //# sourceMappingURL=parse.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../src/helpers/parse.ts"],"names":[],"mappings":"AAUA,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,CAgDd,CAAA"}
1
+ {"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../src/helpers/parse.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAOhD;;;;GAIG;AACH,eAAO,MAAM,KAAK,yBAA0B,WAAW,CAAC,QAAQ,KAAG,OAAO,CAAC,IAAI,CAmB9E,CAAA"}