@scalar/api-reference 1.35.4 → 1.35.6

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 (217) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/browser/standalone.js +18154 -18461
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/Anchor/WithBreadcrumb.vue2.js +8 -11
  5. package/dist/components/ApiReference.vue.js +1 -1
  6. package/dist/components/ApiReferenceLayout.vue.js +4 -4
  7. package/dist/components/ApiReferenceLayout.vue2.js +247 -268
  8. package/dist/components/Badge/Badge.vue.js +1 -1
  9. package/dist/components/ClassicHeader.vue.js +1 -1
  10. package/dist/components/Content/Content.vue.js +145 -169
  11. package/dist/components/Content/Content.vue3.js +1 -1
  12. package/dist/components/Content/Models/ClassicLayout.vue.js +1 -1
  13. package/dist/components/Content/Models/ClassicLayout.vue2.js +32 -35
  14. package/dist/components/Content/Models/Models.vue.js +27 -31
  15. package/dist/components/Content/Models/ModernLayout.vue.js +1 -1
  16. package/dist/components/Content/Operations/TraversedEntry.vue.js +32 -35
  17. package/dist/components/Content/Operations/TraversedEntryContainer.vue.js +26 -27
  18. package/dist/components/Content/Operations/get-current-index.js +1 -1
  19. package/dist/components/Content/Schema/Schema.vue.js +1 -1
  20. package/dist/components/Content/Schema/Schema.vue2.js +68 -74
  21. package/dist/components/Content/Schema/SchemaComposition.vue.js +42 -45
  22. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.js +1 -1
  23. package/dist/components/Content/Schema/SchemaEnumValues.vue.js +1 -1
  24. package/dist/components/Content/Schema/SchemaEnumValues.vue2.js +45 -50
  25. package/dist/components/Content/Schema/SchemaHeading.vue.js +1 -1
  26. package/dist/components/Content/Schema/SchemaObjectProperties.vue.js +30 -34
  27. package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
  28. package/dist/components/Content/Schema/SchemaProperty.vue2.js +142 -157
  29. package/dist/components/Content/Schema/SchemaPropertyDetail.vue.js +1 -1
  30. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js +1 -1
  31. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +1 -1
  32. package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +160 -164
  33. package/dist/components/Content/Schema/helpers/get-schema-type.js +15 -17
  34. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +74 -77
  35. package/dist/components/Content/Schema/helpers/optimize-value-for-display.js +10 -11
  36. package/dist/components/Content/Tags/ClassicLayout.vue.js +1 -1
  37. package/dist/components/Content/Tags/ClassicLayout.vue2.js +36 -39
  38. package/dist/components/Content/Tags/ModernLayout.vue.js +1 -1
  39. package/dist/components/Content/Tags/ModernLayout.vue2.js +31 -35
  40. package/dist/components/Content/Tags/TagSection.vue.js +86 -92
  41. package/dist/components/GettingStarted.vue.js +1 -1
  42. package/dist/components/LinkList/LinkList.vue.js +1 -1
  43. package/dist/components/LoadingSkeleton.vue.js +1 -1
  44. package/dist/components/MobileHeader.vue.d.ts.map +1 -1
  45. package/dist/components/MobileHeader.vue.js +3 -3
  46. package/dist/components/MobileHeader.vue2.js +13 -12
  47. package/dist/components/OperationPath.vue.js +1 -1
  48. package/dist/components/OperationsList/OperationsList.vue.js +1 -1
  49. package/dist/components/OperationsList/OperationsList.vue2.js +45 -51
  50. package/dist/components/OperationsList/OperationsListItem.vue.js +1 -1
  51. package/dist/components/ScreenReader.vue.js +1 -1
  52. package/dist/components/Section/CompactSection.vue.js +1 -1
  53. package/dist/components/Section/Section.vue.js +1 -1
  54. package/dist/components/Section/Section.vue2.js +13 -14
  55. package/dist/components/Section/SectionAccordion.vue.js +1 -1
  56. package/dist/components/Section/SectionAccordion.vue2.js +29 -30
  57. package/dist/components/Section/SectionColumn.vue.js +1 -1
  58. package/dist/components/Section/SectionColumns.vue.js +1 -1
  59. package/dist/components/Section/SectionContainer.vue.js +1 -1
  60. package/dist/components/Section/SectionContainerAccordion.vue.js +1 -1
  61. package/dist/components/Section/SectionContent.vue.js +1 -1
  62. package/dist/components/Section/SectionHeader.vue.js +1 -1
  63. package/dist/components/Section/SectionHeaderTag.vue.js +1 -1
  64. package/dist/components/SectionFlare/SectionFlare.vue.js +1 -1
  65. package/dist/components/ShowMoreButton.vue.js +1 -1
  66. package/dist/components/ShowMoreButton.vue2.js +12 -13
  67. package/dist/features/Operation/Operation.vue.js +31 -36
  68. package/dist/features/Operation/components/Headers.vue.js +1 -1
  69. package/dist/features/Operation/components/OperationParameters.vue.js +8 -11
  70. package/dist/features/Operation/components/ParameterList.vue.js +21 -24
  71. package/dist/features/Operation/components/ParameterListItem.vue.js +1 -1
  72. package/dist/features/Operation/components/ParameterListItem.vue2.js +36 -37
  73. package/dist/features/Operation/components/RequestBody.vue.js +1 -1
  74. package/dist/features/Operation/components/RequestBody.vue2.js +45 -52
  75. package/dist/features/Operation/components/callbacks/Callback.vue.js +1 -1
  76. package/dist/features/Operation/components/callbacks/Callback.vue2.js +32 -35
  77. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  78. package/dist/features/Operation/layouts/ClassicLayout.vue.js +4 -4
  79. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +114 -119
  80. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  81. package/dist/features/Operation/layouts/ModernLayout.vue.js +3 -3
  82. package/dist/features/Operation/layouts/ModernLayout.vue2.js +87 -89
  83. package/dist/features/Search/components/SearchButton.vue.js +23 -25
  84. package/dist/features/Search/components/SearchModal.vue.js +1 -1
  85. package/dist/features/Search/components/SearchModal.vue2.js +53 -54
  86. package/dist/features/api-client-modal/ApiClientModal.vue.js +31 -38
  87. package/dist/features/document-source/hooks/useDocumentFetcher.js +17 -18
  88. package/dist/features/document-source/hooks/useDocumentSource.js +16 -16
  89. package/dist/features/example-responses/ExampleResponse.vue.js +1 -1
  90. package/dist/features/example-responses/ExampleResponse.vue2.js +23 -26
  91. package/dist/features/example-responses/ExampleResponseTab.vue.js +1 -1
  92. package/dist/features/example-responses/ExampleResponseTabList.vue.js +1 -1
  93. package/dist/features/example-responses/ExampleResponses.vue.js +1 -1
  94. package/dist/features/example-responses/ExampleResponses.vue2.js +128 -153
  95. package/dist/features/info-object/Contact.vue.js +24 -27
  96. package/dist/features/info-object/License.vue.js +26 -29
  97. package/dist/features/multiple-documents/DocumentSelector.vue.js +22 -31
  98. package/dist/features/multiple-documents/useMultipleDocuments.js +52 -56
  99. package/dist/features/sidebar/components/Sidebar.vue.d.ts.map +1 -1
  100. package/dist/features/sidebar/components/Sidebar.vue.js +3 -3
  101. package/dist/features/sidebar/components/Sidebar.vue2.js +74 -79
  102. package/dist/features/sidebar/components/SidebarElement.vue.js +1 -1
  103. package/dist/features/sidebar/components/SidebarElement.vue2.js +52 -53
  104. package/dist/features/sidebar/components/SidebarGroup.vue.js +1 -1
  105. package/dist/features/sidebar/components/SidebarHttpBadge.vue.js +1 -1
  106. package/dist/features/specification-extension/SpecificationExtension.vue2.js +28 -31
  107. package/dist/features/test-request-button/TestRequestButton.vue.js +1 -1
  108. package/dist/features/test-request-button/TestRequestButton.vue2.js +1 -2
  109. package/dist/features/traverse-schema/helpers/traverse-description.js +13 -14
  110. package/dist/features/traverse-schema/helpers/traverse-document.js +14 -15
  111. package/dist/features/traverse-schema/helpers/traverse-paths.js +20 -23
  112. package/dist/features/traverse-schema/helpers/traverse-schemas.js +13 -15
  113. package/dist/features/traverse-schema/helpers/traverse-webhooks.js +8 -10
  114. package/dist/hooks/useFreezing.js +14 -14
  115. package/dist/hooks/useNavState.js +37 -39
  116. package/dist/index.js +2 -2
  117. package/dist/libs/openapi.js +28 -31
  118. package/dist/style.css +1 -1
  119. package/dist/v2/ApiReferenceWorkspace.vue.js +68 -75
  120. package/dist/v2/ApiReferenceWorkspace.vue3.js +1 -1
  121. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +1 -1
  122. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue2.js +116 -135
  123. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.js +40 -47
  124. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +45 -46
  125. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js +109 -125
  126. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +1 -1
  127. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +84 -84
  128. package/dist/v2/blocks/scalar-auth-selector-block/helpers/update-scheme.js +12 -13
  129. package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js +1 -1
  130. package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue2.js +1 -4
  131. package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue.js +1 -1
  132. package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue2.js +77 -82
  133. package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue.js +1 -1
  134. package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue2.js +46 -49
  135. package/dist/v2/blocks/scalar-info-block/components/InfoDescription.vue.js +1 -1
  136. package/dist/v2/blocks/scalar-info-block/components/IntroductionCard.vue.js +1 -1
  137. package/dist/v2/blocks/scalar-info-block/components/IntroductionCardItem.vue.js +1 -1
  138. package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue.js +1 -1
  139. package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue2.js +74 -89
  140. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue2.js +24 -27
  141. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.js +1 -1
  142. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue2.js +106 -119
  143. package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.js +11 -12
  144. package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.js +3 -3
  145. package/dist/v2/blocks/scalar-server-selector-block/components/Selector.vue.js +11 -14
  146. package/dist/v2/blocks/scalar-server-selector-block/components/ServerSelector.vue.js +45 -48
  147. package/dist/v2/helpers/get-document-name.js +10 -10
  148. package/dist/v2/helpers/map-configuration.js +48 -51
  149. package/dist/v2/hooks/use-legacy-store-events.js +44 -48
  150. package/dist/v2/hooks/use-workspace-store-events.js +23 -26
  151. package/package.json +19 -19
  152. package/dist/components/ApiReferenceLayout.vue3.js +0 -4
  153. package/dist/components/ApiReferenceLayout.vue4.js +0 -4
  154. package/dist/components/ApiReferenceLayout.vue5.js +0 -4
  155. package/dist/components/ApiReferenceLayout.vue6.js +0 -4
  156. package/dist/components/Badge/Badge.vue3.js +0 -4
  157. package/dist/components/ClassicHeader.vue2.js +0 -4
  158. package/dist/components/Content/Content.vue2.js +0 -4
  159. package/dist/components/Content/Models/ClassicLayout.vue3.js +0 -4
  160. package/dist/components/Content/Models/ModernLayout.vue3.js +0 -4
  161. package/dist/components/Content/Schema/Schema.vue3.js +0 -4
  162. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue3.js +0 -4
  163. package/dist/components/Content/Schema/SchemaEnumValues.vue3.js +0 -4
  164. package/dist/components/Content/Schema/SchemaHeading.vue3.js +0 -4
  165. package/dist/components/Content/Schema/SchemaProperty.vue3.js +0 -4
  166. package/dist/components/Content/Schema/SchemaPropertyDetail.vue3.js +0 -4
  167. package/dist/components/Content/Schema/SchemaPropertyExamples.vue3.js +0 -4
  168. package/dist/components/Content/Schema/SchemaPropertyHeading.vue3.js +0 -4
  169. package/dist/components/Content/Tags/ClassicLayout.vue3.js +0 -4
  170. package/dist/components/Content/Tags/ModernLayout.vue3.js +0 -4
  171. package/dist/components/GettingStarted.vue3.js +0 -4
  172. package/dist/components/LinkList/LinkList.vue3.js +0 -4
  173. package/dist/components/LoadingSkeleton.vue3.js +0 -4
  174. package/dist/components/MobileHeader.vue3.js +0 -4
  175. package/dist/components/OperationPath.vue3.js +0 -4
  176. package/dist/components/OperationsList/OperationsList.vue3.js +0 -4
  177. package/dist/components/OperationsList/OperationsListItem.vue3.js +0 -4
  178. package/dist/components/ScreenReader.vue3.js +0 -4
  179. package/dist/components/Section/CompactSection.vue3.js +0 -4
  180. package/dist/components/Section/Section.vue3.js +0 -4
  181. package/dist/components/Section/SectionAccordion.vue3.js +0 -4
  182. package/dist/components/Section/SectionColumn.vue2.js +0 -4
  183. package/dist/components/Section/SectionColumns.vue2.js +0 -4
  184. package/dist/components/Section/SectionContainer.vue3.js +0 -4
  185. package/dist/components/Section/SectionContainerAccordion.vue3.js +0 -4
  186. package/dist/components/Section/SectionContent.vue3.js +0 -4
  187. package/dist/components/Section/SectionHeader.vue3.js +0 -4
  188. package/dist/components/Section/SectionHeaderTag.vue3.js +0 -4
  189. package/dist/components/SectionFlare/SectionFlare.vue2.js +0 -4
  190. package/dist/components/ShowMoreButton.vue3.js +0 -4
  191. package/dist/features/Operation/components/Headers.vue3.js +0 -4
  192. package/dist/features/Operation/components/ParameterListItem.vue3.js +0 -4
  193. package/dist/features/Operation/components/RequestBody.vue3.js +0 -4
  194. package/dist/features/Operation/components/callbacks/Callback.vue3.js +0 -4
  195. package/dist/features/Operation/layouts/ClassicLayout.vue3.js +0 -4
  196. package/dist/features/Operation/layouts/ModernLayout.vue3.js +0 -4
  197. package/dist/features/Search/components/SearchModal.vue3.js +0 -4
  198. package/dist/features/example-responses/ExampleResponse.vue3.js +0 -4
  199. package/dist/features/example-responses/ExampleResponseTab.vue3.js +0 -4
  200. package/dist/features/example-responses/ExampleResponseTabList.vue3.js +0 -4
  201. package/dist/features/example-responses/ExampleResponses.vue3.js +0 -4
  202. package/dist/features/sidebar/components/Sidebar.vue3.js +0 -4
  203. package/dist/features/sidebar/components/SidebarElement.vue3.js +0 -4
  204. package/dist/features/sidebar/components/SidebarGroup.vue3.js +0 -4
  205. package/dist/features/sidebar/components/SidebarHttpBadge.vue3.js +0 -4
  206. package/dist/features/test-request-button/TestRequestButton.vue3.js +0 -4
  207. package/dist/v2/ApiReferenceWorkspace.vue2.js +0 -4
  208. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue3.js +0 -4
  209. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue3.js +0 -4
  210. package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue3.js +0 -4
  211. package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue3.js +0 -4
  212. package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue3.js +0 -4
  213. package/dist/v2/blocks/scalar-info-block/components/InfoDescription.vue3.js +0 -4
  214. package/dist/v2/blocks/scalar-info-block/components/IntroductionCard.vue3.js +0 -4
  215. package/dist/v2/blocks/scalar-info-block/components/IntroductionCardItem.vue2.js +0 -4
  216. package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue3.js +0 -4
  217. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue3.js +0 -4
@@ -1,178 +1,153 @@
1
- import { defineComponent as C, useId as M, computed as d, ref as h, toValue as E, createBlock as u, createCommentVNode as m, openBlock as o, unref as l, withCtx as c, createVNode as x, createElementBlock as k, Fragment as N, renderList as D, createTextVNode as R, toDisplayString as F, withDirectives as I, createElementVNode as _, vModelCheckbox as K } from "vue";
2
- import { ScalarCard as A, ScalarIcon as L, ScalarCardSection as U, ScalarCodeBlock as $, ScalarCardFooter as q, ScalarMarkdown as G } from "@scalar/components";
3
- import { normalizeMimeTypeObject as H, getObjectKeys as J } from "@scalar/oas-utils/helpers";
4
- import { useClipboard as P } from "@scalar/use-hooks/useClipboard";
5
- import { getResolvedRef as Q } from "@scalar/workspace-store/helpers/get-resolved-ref";
6
- import W from "../../components/ScreenReader.vue.js";
7
- import X from "./ExampleResponse.vue.js";
8
- import Y from "./ExampleResponseTab.vue.js";
9
- import Z from "./ExampleResponseTabList.vue.js";
10
- import { getResolvedRefDeep as z } from "./helpers/get-resolved-ref-deep.js";
11
- import ee from "../../v2/blocks/scalar-request-example-block/components/ExamplePicker.vue2.js";
12
- const se = {
1
+ import { defineComponent as _, useId as w, computed as u, ref as y, toValue as b, createBlock as n, createCommentVNode as c, openBlock as o, unref as t, withCtx as r, createVNode as m, createElementBlock as x, Fragment as O, renderList as T, createTextVNode as C, toDisplayString as B, withDirectives as M, createElementVNode as E, vModelCheckbox as N } from "vue";
2
+ import { ScalarCard as D, ScalarIcon as F, ScalarCardSection as I, ScalarCodeBlock as K, ScalarCardFooter as z, ScalarMarkdown as A } from "@scalar/components";
3
+ import { normalizeMimeTypeObject as L, getObjectKeys as U } from "@scalar/oas-utils/helpers";
4
+ import { useClipboard as $ } from "@scalar/use-hooks/useClipboard";
5
+ import { getResolvedRef as q } from "@scalar/workspace-store/helpers/get-resolved-ref";
6
+ import G from "../../components/ScreenReader.vue.js";
7
+ import H from "./ExampleResponse.vue.js";
8
+ import J from "./ExampleResponseTab.vue.js";
9
+ import P from "./ExampleResponseTabList.vue.js";
10
+ import { getResolvedRefDeep as Q } from "./helpers/get-resolved-ref-deep.js";
11
+ import W from "../../v2/blocks/scalar-request-example-block/components/ExamplePicker.vue2.js";
12
+ const X = {
13
13
  key: 1,
14
14
  class: "scalar-card-checkbox"
15
- }, ae = ["aria-controls"], le = {
15
+ }, Y = ["aria-controls"], Z = {
16
16
  key: 0,
17
17
  class: "response-description"
18
- }, ve = /* @__PURE__ */ C({
18
+ }, me = /* @__PURE__ */ _({
19
19
  __name: "ExampleResponses",
20
20
  props: {
21
21
  responses: {}
22
22
  },
23
- setup(g) {
24
- var j;
25
- const v = M(), { copyToClipboard: w } = P(), y = d(
26
- () => Object.keys(g.responses ?? {}).sort()
27
- ), V = h(0), f = d(() => {
28
- var s;
29
- const e = E(y)[E(V)];
30
- return Q((s = g.responses) == null ? void 0 : s[e]);
31
- }), t = d(() => {
32
- var p;
33
- const e = H(
34
- (p = f.value) == null ? void 0 : p.content
35
- ), s = J(e ?? {});
23
+ setup(S) {
24
+ const i = w(), { copyToClipboard: R } = $(), v = u(
25
+ () => Object.keys(S.responses ?? {}).sort()
26
+ ), h = y(0), d = u(() => {
27
+ const e = b(v)[b(h)];
28
+ return q(S.responses?.[e]);
29
+ }), l = u(() => {
30
+ const e = L(
31
+ d.value?.content
32
+ ), a = U(e ?? {});
36
33
  return (
37
34
  // OpenAPI 3.x
38
- (e == null ? void 0 : e["application/json"]) ?? (e == null ? void 0 : e["application/xml"]) ?? (e == null ? void 0 : e["text/plain"]) ?? (e == null ? void 0 : e["text/html"]) ?? (e == null ? void 0 : e["*/*"]) ?? // Take the first key - in the future we may want to use the selected content type
39
- (e == null ? void 0 : e[s[0]]) ?? void 0
35
+ e?.["application/json"] ?? e?.["application/xml"] ?? e?.["text/plain"] ?? e?.["text/html"] ?? e?.["*/*"] ?? // Take the first key - in the future we may want to use the selected content type
36
+ e?.[a[0]] ?? void 0
40
37
  );
41
- }), b = d(
42
- () => {
43
- var e, s;
44
- return !!((e = t.value) != null && e.examples) && Object.keys(((s = t.value) == null ? void 0 : s.examples) ?? {}).length > 1;
45
- }
46
- ), i = h(
47
- Object.keys(((j = t.value) == null ? void 0 : j.examples) ?? {})[0] ?? ""
48
- ), O = () => {
49
- var a;
50
- const e = E(t);
38
+ }), f = u(
39
+ () => !!l.value?.examples && Object.keys(l.value?.examples ?? {}).length > 1
40
+ ), p = y(
41
+ Object.keys(l.value?.examples ?? {})[0] ?? ""
42
+ ), g = () => {
43
+ const e = b(l);
51
44
  if (!e)
52
45
  return;
53
46
  if (Array.isArray(e.examples))
54
47
  return e.examples[0];
55
- const s = Object.keys(e.examples ?? {})[0];
56
- return (a = e.examples) == null ? void 0 : a[s];
57
- }, T = d(
58
- () => {
59
- var e, s;
60
- return b.value && i.value ? (s = (e = t.value) == null ? void 0 : e.examples) == null ? void 0 : s[i.value] : O();
61
- }
62
- ), B = (e) => {
63
- V.value = e, i.value = "";
64
- }, S = h(!1);
65
- return (e, s) => y.value.length ? (o(), u(l(A), {
48
+ const a = Object.keys(e.examples ?? {})[0];
49
+ return e.examples?.[a];
50
+ }, V = u(
51
+ () => f.value && p.value ? l.value?.examples?.[p.value] : g()
52
+ ), j = (e) => {
53
+ h.value = e, p.value = "";
54
+ }, k = y(!1);
55
+ return (e, a) => v.value.length ? (o(), n(t(D), {
66
56
  key: 0,
67
57
  "aria-label": "Example Responses",
68
58
  class: "response-card",
69
59
  role: "region"
70
60
  }, {
71
- default: c(() => {
72
- var p;
73
- return [
74
- x(Z, { onChange: B }, {
75
- actions: c(() => {
76
- var a, r;
77
- return [
78
- (a = t.value) != null && a.example ? (o(), k("button", {
79
- key: 0,
80
- class: "code-copy",
81
- type: "button",
82
- onClick: s[0] || (s[0] = () => {
83
- var n;
84
- return l(w)((n = t.value) == null ? void 0 : n.example);
85
- })
86
- }, [
87
- x(l(L), {
88
- icon: "Clipboard",
89
- width: "12px"
90
- })
91
- ])) : m("", !0),
92
- (r = t.value) != null && r.schema ? (o(), k("label", se, [
93
- s[4] || (s[4] = R(" Show Schema ")),
94
- I(_("input", {
95
- "onUpdate:modelValue": s[1] || (s[1] = (n) => S.value = n),
96
- "aria-controls": l(v),
97
- class: "scalar-card-checkbox-input",
98
- type: "checkbox"
99
- }, null, 8, ae), [
100
- [K, S.value]
101
- ]),
102
- s[5] || (s[5] = _("span", { class: "scalar-card-checkbox-checkmark" }, null, -1))
103
- ])) : m("", !0)
104
- ];
105
- }),
106
- default: c(() => [
107
- (o(!0), k(N, null, D(y.value, (a) => (o(), u(Y, {
108
- key: a,
109
- "aria-controls": l(v)
110
- }, {
111
- default: c(() => [
112
- x(W, null, {
113
- default: c(() => s[3] || (s[3] = [
114
- R("Status:")
115
- ])),
116
- _: 1,
117
- __: [3]
118
- }),
119
- R(" " + F(a), 1)
120
- ]),
121
- _: 2
122
- }, 1032, ["aria-controls"]))), 128))
123
- ]),
124
- _: 1
125
- }),
126
- x(l(U), { class: "grid flex-1" }, {
127
- default: c(() => {
128
- var a, r;
129
- return [
130
- S.value && ((a = t.value) != null && a.schema) ? (o(), u(l($), {
131
- key: 0,
132
- id: l(v),
133
- class: "-outline-offset-2",
134
- content: l(z)((r = t.value) == null ? void 0 : r.schema),
135
- lang: "json"
136
- }, null, 8, ["id", "content"])) : (o(), u(X, {
137
- key: 1,
138
- id: l(v),
139
- example: T.value,
140
- response: t.value
141
- }, null, 8, ["id", "example", "response"]))
142
- ];
143
- }),
144
- _: 1
145
- }),
146
- (p = f.value) != null && p.description || b.value ? (o(), u(l(q), {
147
- key: 0,
148
- class: "response-card-footer"
149
- }, {
150
- default: c(() => {
151
- var a, r;
152
- return [
153
- (a = f.value) != null && a.description ? (o(), k("div", le, [
154
- x(l(G), {
155
- class: "markdown",
156
- value: f.value.description
157
- }, null, 8, ["value"])
158
- ])) : m("", !0),
159
- b.value ? (o(), u(l(ee), {
160
- key: 1,
161
- modelValue: i.value,
162
- "onUpdate:modelValue": s[2] || (s[2] = (n) => i.value = n),
163
- class: "response-example-selector",
164
- examples: (r = t.value) == null ? void 0 : r.examples
165
- }, null, 8, ["modelValue", "examples"])) : m("", !0)
166
- ];
167
- }),
168
- _: 1
169
- })) : m("", !0)
170
- ];
171
- }),
61
+ default: r(() => [
62
+ m(P, { onChange: j }, {
63
+ actions: r(() => [
64
+ l.value?.example ? (o(), x("button", {
65
+ key: 0,
66
+ class: "code-copy",
67
+ type: "button",
68
+ onClick: a[0] || (a[0] = () => t(R)(l.value?.example))
69
+ }, [
70
+ m(t(F), {
71
+ icon: "Clipboard",
72
+ width: "12px"
73
+ })
74
+ ])) : c("", !0),
75
+ l.value?.schema ? (o(), x("label", X, [
76
+ a[4] || (a[4] = C(" Show Schema ")),
77
+ M(E("input", {
78
+ "onUpdate:modelValue": a[1] || (a[1] = (s) => k.value = s),
79
+ "aria-controls": t(i),
80
+ class: "scalar-card-checkbox-input",
81
+ type: "checkbox"
82
+ }, null, 8, Y), [
83
+ [N, k.value]
84
+ ]),
85
+ a[5] || (a[5] = E("span", { class: "scalar-card-checkbox-checkmark" }, null, -1))
86
+ ])) : c("", !0)
87
+ ]),
88
+ default: r(() => [
89
+ (o(!0), x(O, null, T(v.value, (s) => (o(), n(J, {
90
+ key: s,
91
+ "aria-controls": t(i)
92
+ }, {
93
+ default: r(() => [
94
+ m(G, null, {
95
+ default: r(() => a[3] || (a[3] = [
96
+ C("Status:")
97
+ ])),
98
+ _: 1,
99
+ __: [3]
100
+ }),
101
+ C(" " + B(s), 1)
102
+ ]),
103
+ _: 2
104
+ }, 1032, ["aria-controls"]))), 128))
105
+ ]),
106
+ _: 1
107
+ }),
108
+ m(t(I), { class: "grid flex-1" }, {
109
+ default: r(() => [
110
+ k.value && l.value?.schema ? (o(), n(t(K), {
111
+ key: 0,
112
+ id: t(i),
113
+ class: "-outline-offset-2",
114
+ content: t(Q)(l.value?.schema),
115
+ lang: "json"
116
+ }, null, 8, ["id", "content"])) : (o(), n(H, {
117
+ key: 1,
118
+ id: t(i),
119
+ example: V.value,
120
+ response: l.value
121
+ }, null, 8, ["id", "example", "response"]))
122
+ ]),
123
+ _: 1
124
+ }),
125
+ d.value?.description || f.value ? (o(), n(t(z), {
126
+ key: 0,
127
+ class: "response-card-footer"
128
+ }, {
129
+ default: r(() => [
130
+ d.value?.description ? (o(), x("div", Z, [
131
+ m(t(A), {
132
+ class: "markdown",
133
+ value: d.value.description
134
+ }, null, 8, ["value"])
135
+ ])) : c("", !0),
136
+ f.value ? (o(), n(t(W), {
137
+ key: 1,
138
+ modelValue: p.value,
139
+ "onUpdate:modelValue": a[2] || (a[2] = (s) => p.value = s),
140
+ class: "response-example-selector",
141
+ examples: l.value?.examples
142
+ }, null, 8, ["modelValue", "examples"])) : c("", !0)
143
+ ]),
144
+ _: 1
145
+ })) : c("", !0)
146
+ ]),
172
147
  _: 1
173
- })) : m("", !0);
148
+ })) : c("", !0);
174
149
  }
175
150
  });
176
151
  export {
177
- ve as default
152
+ me as default
178
153
  };
@@ -1,16 +1,16 @@
1
- import { defineComponent as u, createElementBlock as r, createCommentVNode as i, openBlock as a, normalizeClass as m, unref as t, createVNode as p, createElementVNode as d, toDisplayString as c } from "vue";
2
- import { cva as f } from "@scalar/components";
3
- import { ScalarIconEnvelopeSimple as v } from "@scalar/icons";
4
- const h = {
1
+ import { defineComponent as i, createElementBlock as r, createCommentVNode as o, openBlock as a, normalizeClass as l, unref as t, createVNode as m, createElementVNode as c, toDisplayString as s } from "vue";
2
+ import { cva as u } from "@scalar/components";
3
+ import { ScalarIconEnvelopeSimple as p } from "@scalar/icons";
4
+ const d = {
5
5
  key: 0,
6
6
  class: "group flex items-center last:border-r-0 xl:border-r xl:first:ml-auto"
7
- }, b = ["href"], k = { class: "ml-1 empty:hidden" }, E = /* @__PURE__ */ u({
7
+ }, f = ["href"], v = { class: "ml-1 empty:hidden" }, y = /* @__PURE__ */ i({
8
8
  __name: "Contact",
9
9
  props: {
10
10
  value: {}
11
11
  },
12
- setup(_) {
13
- const n = f({
12
+ setup(h) {
13
+ const n = u({
14
14
  base: "text-c-1 mr-2 flex min-h-7 min-w-7 items-center rounded-lg border px-2 py-1 group-last:mr-0 xl:border-none",
15
15
  variants: {
16
16
  link: {
@@ -18,27 +18,24 @@ const h = {
18
18
  }
19
19
  }
20
20
  });
21
- return (e, g) => {
22
- var o, l, s;
23
- return e.value ? (a(), r("div", h, [
24
- (o = e.value) != null && o.email ? (a(), r("a", {
25
- key: 0,
26
- class: m(t(n)({ link: !0 })),
27
- href: `mailto:${(l = e.value) == null ? void 0 : l.email}`
28
- }, [
29
- p(t(v), {
30
- weight: "bold",
31
- class: "size-3 text-current"
32
- }),
33
- d("span", k, c(e.value.name), 1)
34
- ], 10, b)) : (s = e.value) != null && s.name ? (a(), r("span", {
35
- key: 1,
36
- class: m(t(n)({ link: !1 }))
37
- }, c(e.value.name), 3)) : i("", !0)
38
- ])) : i("", !0);
39
- };
21
+ return (e, b) => e.value ? (a(), r("div", d, [
22
+ e.value?.email ? (a(), r("a", {
23
+ key: 0,
24
+ class: l(t(n)({ link: !0 })),
25
+ href: `mailto:${e.value?.email}`
26
+ }, [
27
+ m(t(p), {
28
+ weight: "bold",
29
+ class: "size-3 text-current"
30
+ }),
31
+ c("span", v, s(e.value.name), 1)
32
+ ], 10, f)) : e.value?.name ? (a(), r("span", {
33
+ key: 1,
34
+ class: l(t(n)({ link: !1 }))
35
+ }, s(e.value.name), 3)) : o("", !0)
36
+ ])) : o("", !0);
40
37
  }
41
38
  });
42
39
  export {
43
- E as default
40
+ y as default
44
41
  };
@@ -1,37 +1,34 @@
1
- import { defineComponent as c, createElementBlock as r, openBlock as t, createVNode as s, createElementVNode as a, unref as i, toDisplayString as d, Fragment as u } from "vue";
2
- import { ScalarIconGavel as m } from "@scalar/icons";
3
- const p = { class: "group flex h-fit items-center last:border-r-0 xl:border-r xl:first:ml-auto" }, f = ["href"], h = { class: "ml-1 empty:hidden" }, _ = { class: "ml-1 empty:hidden" }, k = /* @__PURE__ */ c({
1
+ import { defineComponent as i, createElementBlock as r, openBlock as t, createVNode as n, createElementVNode as o, unref as l, toDisplayString as s, Fragment as d } from "vue";
2
+ import { ScalarIconGavel as a } from "@scalar/icons";
3
+ const m = { class: "group flex h-fit items-center last:border-r-0 xl:border-r xl:first:ml-auto" }, c = ["href"], u = { class: "ml-1 empty:hidden" }, p = { class: "ml-1 empty:hidden" }, b = /* @__PURE__ */ i({
4
4
  __name: "License",
5
5
  props: {
6
6
  value: {}
7
7
  },
8
- setup(v) {
9
- return (e, b) => {
10
- var n, o, l;
11
- return t(), r("div", p, [
12
- (n = e.value) != null && n.url ? (t(), r("a", {
13
- key: 0,
14
- class: "text-c-1 hover:bg-b-2 mr-2 flex min-h-7 min-w-7 items-center rounded-lg border px-2 py-1 no-underline group-last:mr-0 xl:border-none",
15
- href: e.value.url,
16
- target: "_blank",
17
- rel: "noopener noreferrer"
18
- }, [
19
- s(i(m), {
20
- weight: "bold",
21
- class: "size-3 text-current"
22
- }),
23
- a("span", h, d(((o = e.value) == null ? void 0 : o.name) || e.value.identifier || e.value.url), 1)
24
- ], 8, f)) : (t(), r(u, { key: 1 }, [
25
- s(i(m), {
26
- weight: "bold",
27
- class: "size-3 text-current"
28
- }),
29
- a("span", _, d((l = e.value) == null ? void 0 : l.name), 1)
30
- ], 64))
31
- ]);
32
- };
8
+ setup(f) {
9
+ return (e, h) => (t(), r("div", m, [
10
+ e.value?.url ? (t(), r("a", {
11
+ key: 0,
12
+ class: "text-c-1 hover:bg-b-2 mr-2 flex min-h-7 min-w-7 items-center rounded-lg border px-2 py-1 no-underline group-last:mr-0 xl:border-none",
13
+ href: e.value.url,
14
+ target: "_blank",
15
+ rel: "noopener noreferrer"
16
+ }, [
17
+ n(l(a), {
18
+ weight: "bold",
19
+ class: "size-3 text-current"
20
+ }),
21
+ o("span", u, s(e.value?.name || e.value.identifier || e.value.url), 1)
22
+ ], 8, c)) : (t(), r(d, { key: 1 }, [
23
+ n(l(a), {
24
+ weight: "bold",
25
+ class: "size-3 text-current"
26
+ }),
27
+ o("span", p, s(e.value?.name), 1)
28
+ ], 64))
29
+ ]));
33
30
  }
34
31
  });
35
32
  export {
36
- k as default
33
+ b as default
37
34
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as p, computed as s, createElementBlock as b, createCommentVNode as f, openBlock as x, createVNode as r, unref as i, withCtx as V, createElementVNode as c, toDisplayString as v } from "vue";
1
+ import { defineComponent as p, computed as n, createElementBlock as b, createCommentVNode as f, openBlock as x, createVNode as a, unref as r, withCtx as V, createElementVNode as i, toDisplayString as v } from "vue";
2
2
  import { ScalarListbox as g } from "@scalar/components";
3
3
  import { ScalarIconCaretUpDown as h } from "@scalar/icons";
4
4
  const S = {
@@ -14,39 +14,30 @@ const S = {
14
14
  modelValue: {}
15
15
  },
16
16
  emits: ["update:modelValue"],
17
- setup(l, { emit: u }) {
18
- const d = u, m = s(() => {
19
- var e;
20
- return l.options && ((e = l.options) == null ? void 0 : e.length) > 1;
21
- }), a = s(
22
- () => {
23
- var e;
24
- return ((e = l.options) == null ? void 0 : e.map((o, t) => ({
25
- id: String(t),
26
- // Get the display text for the selected option
27
- label: o.title || o.slug || `API #${t + 1}`
28
- }))) || [];
29
- }
30
- ), n = s({
31
- get: () => a.value.find(({ id: e }) => e === String(l.modelValue)),
32
- set: (e) => d("update:modelValue", Number(e.id))
17
+ setup(o, { emit: c }) {
18
+ const u = c, d = n(() => o.options && o.options?.length > 1), s = n(
19
+ () => o.options?.map((e, t) => ({
20
+ id: String(t),
21
+ // Get the display text for the selected option
22
+ label: e.title || e.slug || `API #${t + 1}`
23
+ })) || []
24
+ ), l = n({
25
+ get: () => s.value.find(({ id: e }) => e === String(o.modelValue)),
26
+ set: (e) => u("update:modelValue", Number(e.id))
33
27
  });
34
- return (e, o) => m.value ? (x(), b("div", S, [
35
- r(i(g), {
36
- modelValue: n.value,
37
- "onUpdate:modelValue": o[0] || (o[0] = (t) => n.value = t),
38
- options: a.value,
28
+ return (e, t) => d.value ? (x(), b("div", S, [
29
+ a(r(g), {
30
+ modelValue: l.value,
31
+ "onUpdate:modelValue": t[0] || (t[0] = (m) => l.value = m),
32
+ options: s.value,
39
33
  resize: ""
40
34
  }, {
41
- default: V(() => {
42
- var t;
43
- return [
44
- c("button", w, [
45
- r(i(h), { class: "mr-1 size-4 text-current" }),
46
- c("span", _, v(((t = n.value) == null ? void 0 : t.label) || "Select API"), 1)
47
- ])
48
- ];
49
- }),
35
+ default: V(() => [
36
+ i("button", w, [
37
+ a(r(h), { class: "mr-1 size-4 text-current" }),
38
+ i("span", _, v(l.value?.label || "Select API"), 1)
39
+ ])
40
+ ]),
50
41
  _: 1
51
42
  }, 8, ["modelValue", "options"])
52
43
  ])) : f("", !0);