@scalar/api-reference 1.35.5 → 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 +21 -0
  2. package/dist/browser/standalone.js +18150 -18465
  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 +41 -48
  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 +22 -22
  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,4 +1,4 @@
1
- import { defineComponent as $, ref as c, toRef as R, provide as N, useTemplateRef as w, onBeforeMount as I, watch as i, computed as L, createElementBlock as V, openBlock as k, createBlock as A, createCommentVNode as B, createVNode as C, unref as s, resolveDynamicComponent as P, withCtx as l, createTextVNode as U, toDisplayString as _, renderSlot as u, isRef as K } from "vue";
1
+ import { defineComponent as $, ref as d, toRef as R, provide as N, useTemplateRef as w, onBeforeMount as I, watch as l, computed as L, createElementBlock as V, openBlock as k, createBlock as A, createCommentVNode as B, createVNode as C, unref as n, resolveDynamicComponent as P, withCtx as s, createTextVNode as U, toDisplayString as _, renderSlot as i, isRef as K } from "vue";
2
2
  import { safeLocalStorage as F, REFERENCE_LS_KEYS as O } from "@scalar/helpers/object/local-storage";
3
3
  import { makeUrlAbsolute as W } from "@scalar/helpers/url/make-url-absolute";
4
4
  import { redirectToProxy as Y } from "@scalar/oas-utils/helpers";
@@ -22,24 +22,24 @@ const Ce = /* @__PURE__ */ $({
22
22
  },
23
23
  emits: ["updateContent"],
24
24
  setup(E) {
25
- const f = E, {
26
- availableDocuments: p,
25
+ const c = E, {
26
+ availableDocuments: f,
27
27
  selectedConfiguration: o,
28
- selectedDocumentIndex: m,
29
- isIntersectionEnabled: d,
28
+ selectedDocumentIndex: u,
29
+ isIntersectionEnabled: m,
30
30
  hash: M,
31
31
  hashPrefix: x
32
32
  } = Z({
33
- configuration: R(f, "configuration"),
34
- isIntersectionEnabled: c(!1),
35
- hash: c(""),
36
- hashPrefix: c("")
33
+ configuration: R(c, "configuration"),
34
+ isIntersectionEnabled: d(!1),
35
+ hash: d(""),
36
+ hashPrefix: d("")
37
37
  }), y = (e, t) => fetch(
38
38
  Y(o.value.proxyUrl, e.toString()),
39
39
  t
40
40
  );
41
- N(G, { isIntersectionEnabled: d, hash: M, hashPrefix: x });
42
- const v = w("root"), r = f.store;
41
+ N(G, { isIntersectionEnabled: m, hash: M, hashPrefix: x });
42
+ const p = w("root"), r = c.store;
43
43
  I(() => {
44
44
  const e = F().getItem(
45
45
  O.SELECTED_CLIENT
@@ -47,15 +47,14 @@ const Ce = /* @__PURE__ */ $({
47
47
  D(e) && !r.workspace["x-scalar-default-client"] && r.update("x-scalar-default-client", e);
48
48
  });
49
49
  const S = async (e) => {
50
- var n;
51
50
  const t = Q(e.content), a = J({
52
51
  name: e.slug || e.title,
53
52
  url: e.url,
54
53
  document: t
55
54
  });
56
55
  if (r.workspace.documents[a]) {
57
- t && (d.value = !1, r.replaceDocument(a, t), r.update("x-scalar-active-document", a), setTimeout(() => {
58
- d.value = !0;
56
+ t && (m.value = !1, r.replaceDocument(a, t), r.update("x-scalar-active-document", a), setTimeout(() => {
57
+ m.value = !0;
59
58
  }, 300));
60
59
  return;
61
60
  }
@@ -69,13 +68,13 @@ const Ce = /* @__PURE__ */ $({
69
68
  return await r.addDocument({
70
69
  name: e.slug ?? "default",
71
70
  url: W(e.url, {
72
- basePath: (n = o.value.pathRouting) == null ? void 0 : n.basePath
71
+ basePath: o.value.pathRouting?.basePath
73
72
  }),
74
73
  fetch: e.fetch ?? y,
75
74
  config: g(e)
76
75
  });
77
76
  };
78
- i(
77
+ l(
79
78
  [
80
79
  () => o.value.slug,
81
80
  () => o.value.url,
@@ -85,12 +84,12 @@ const Ce = /* @__PURE__ */ $({
85
84
  (e || t || a) && S(o.value);
86
85
  },
87
86
  { immediate: !0 }
88
- ), X(r, v), i(
87
+ ), X(r, p), l(
89
88
  () => o.value.defaultHttpClient,
90
89
  (e) => {
91
90
  if (e) {
92
- const { targetKey: t, clientKey: a } = e, n = `${t}/${a}`;
93
- D(n) && r.update("x-scalar-default-client", n);
91
+ const { targetKey: t, clientKey: a } = e, v = `${t}/${a}`;
92
+ D(v) && r.update("x-scalar-default-client", v);
94
93
  }
95
94
  },
96
95
  { immediate: !0 }
@@ -99,70 +98,64 @@ const Ce = /* @__PURE__ */ $({
99
98
  initialColorMode: o.value.darkMode ? "dark" : void 0,
100
99
  overrideColorMode: o.value.forceDarkModeState
101
100
  });
102
- i(
101
+ l(
103
102
  () => o.value.darkMode,
104
103
  (e) => r.update("x-scalar-dark-mode", !!e)
105
- ), i(
104
+ ), l(
106
105
  () => b.value,
107
106
  (e) => r.update("x-scalar-dark-mode", e),
108
107
  { immediate: !0 }
109
- ), i(
110
- () => m.value,
111
- (e) => {
112
- var t;
113
- return r.update(
114
- "x-scalar-active-document",
115
- (t = p.value[e]) == null ? void 0 : t.slug
116
- );
117
- },
108
+ ), l(
109
+ () => u.value,
110
+ (e) => r.update(
111
+ "x-scalar-active-document",
112
+ f.value[e]?.slug
113
+ ),
118
114
  { immediate: !0 }
119
115
  ), o.value.metaData && H(o.value.metaData);
120
116
  const T = L(() => o.value.favicon);
121
- return j(T), (e, t) => {
122
- var a;
123
- return k(), V("div", {
124
- ref_key: "root",
125
- ref: v
126
- }, [
127
- (a = s(o)) != null && a.customCss ? (k(), A(P("style"), { key: 0 }, {
128
- default: l(() => [
129
- U(_(s(o).customCss), 1)
130
- ]),
131
- _: 1
132
- })) : B("", !0),
133
- C(q, {
134
- configuration: s(o),
135
- isDark: !!s(r).workspace["x-scalar-dark-mode"],
136
- store: s(r),
137
- onToggleDarkMode: t[1] || (t[1] = () => s(h)()),
138
- onUpdateContent: t[2] || (t[2] = (n) => e.$emit("updateContent", n))
139
- }, {
140
- "document-selector": l(() => [
141
- C(s(ee), {
142
- modelValue: s(m),
143
- "onUpdate:modelValue": t[0] || (t[0] = (n) => K(m) ? m.value = n : null),
144
- options: s(p)
145
- }, null, 8, ["modelValue", "options"])
146
- ]),
147
- "content-start": l(() => [
148
- u(e.$slots, "content-start")
149
- ]),
150
- "content-end": l(() => [
151
- u(e.$slots, "content-end")
152
- ]),
153
- "sidebar-start": l(() => [
154
- u(e.$slots, "sidebar-start")
155
- ]),
156
- "sidebar-end": l(() => [
157
- u(e.$slots, "sidebar-end")
158
- ]),
159
- footer: l(() => [
160
- u(e.$slots, "footer")
161
- ]),
162
- _: 3
163
- }, 8, ["configuration", "isDark", "store"])
164
- ], 512);
165
- };
117
+ return j(T), (e, t) => (k(), V("div", {
118
+ ref_key: "root",
119
+ ref: p
120
+ }, [
121
+ n(o)?.customCss ? (k(), A(P("style"), { key: 0 }, {
122
+ default: s(() => [
123
+ U(_(n(o).customCss), 1)
124
+ ]),
125
+ _: 1
126
+ })) : B("", !0),
127
+ C(q, {
128
+ configuration: n(o),
129
+ isDark: !!n(r).workspace["x-scalar-dark-mode"],
130
+ store: n(r),
131
+ onToggleDarkMode: t[1] || (t[1] = () => n(h)()),
132
+ onUpdateContent: t[2] || (t[2] = (a) => e.$emit("updateContent", a))
133
+ }, {
134
+ "document-selector": s(() => [
135
+ C(n(ee), {
136
+ modelValue: n(u),
137
+ "onUpdate:modelValue": t[0] || (t[0] = (a) => K(u) ? u.value = a : null),
138
+ options: n(f)
139
+ }, null, 8, ["modelValue", "options"])
140
+ ]),
141
+ "content-start": s(() => [
142
+ i(e.$slots, "content-start")
143
+ ]),
144
+ "content-end": s(() => [
145
+ i(e.$slots, "content-end")
146
+ ]),
147
+ "sidebar-start": s(() => [
148
+ i(e.$slots, "sidebar-start")
149
+ ]),
150
+ "sidebar-end": s(() => [
151
+ i(e.$slots, "sidebar-end")
152
+ ]),
153
+ footer: s(() => [
154
+ i(e.$slots, "footer")
155
+ ]),
156
+ _: 3
157
+ }, 8, ["configuration", "isDark", "store"])
158
+ ], 512));
166
159
  }
167
160
  });
168
161
  export {
@@ -1,5 +1,5 @@
1
1
  import o from "./ApiReferenceWorkspace.vue.js";
2
- import "./ApiReferenceWorkspace.vue2.js";
2
+ /* empty css */
3
3
  export {
4
4
  o as default
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import o from "./AuthSelector.vue2.js";
2
- import "./AuthSelector.vue3.js";
2
+ /* empty css */
3
3
  import t from "../../../../_virtual/_plugin-vue_export-helper.js";
4
4
  const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-6b2a41a3"]]);
5
5
  export {
@@ -1,16 +1,16 @@
1
- import { defineComponent as z, useId as j, ref as C, computed as v, useTemplateRef as W, createBlock as $, openBlock as c, unref as n, withCtx as m, createVNode as p, createElementVNode as i, createElementBlock as S, Fragment as A, createTextVNode as R, toDisplayString as b, createCommentVNode as I, withModifiers as Y, normalizeClass as F } from "vue";
2
- import { ViewLayoutCollapse as H } from "@scalar/api-client/components/ViewLayout";
3
- import { useLayout as J } from "@scalar/api-client/hooks";
4
- import { useWorkspace as P } from "@scalar/api-client/store";
5
- import { getSecurityRequirements as G, formatComplexScheme as Q, formatScheme as X, getSchemeOptions as Z } from "@scalar/api-client/views/Request/libs";
6
- import { useModal as _, ScalarComboboxMultiselect as ee, ScalarButton as te, ScalarListboxCheckbox as oe, ScalarIconButton as le } from "@scalar/components";
7
- import { safeLocalStorage as re, CLIENT_LS_KEYS as ne } from "@scalar/helpers/object/local-storage";
8
- import { ScalarIconCaretDown as ae, ScalarIconTrash as se } from "@scalar/icons";
9
- import { isDefined as ie } from "@scalar/oas-utils/helpers";
10
- import { emitCustomEvent as w } from "@scalar/workspace-store/events";
11
- import ue from "./DeleteRequestAuthModal.vue.js";
12
- import ce from "./RequestAuthDataTable.vue.js";
13
- const me = ["id"], pe = { class: "flex flex-1" }, de = { class: "min-w-0 flex-1 truncate" }, we = /* @__PURE__ */ z({
1
+ import { defineComponent as N, useId as M, ref as x, computed as y, useTemplateRef as K, createBlock as D, openBlock as u, unref as n, withCtx as c, createVNode as m, createElementVNode as a, createElementBlock as h, Fragment as k, createTextVNode as C, toDisplayString as v, createCommentVNode as L, withModifiers as z, normalizeClass as j } from "vue";
2
+ import { ViewLayoutCollapse as W } from "@scalar/api-client/components/ViewLayout";
3
+ import { useLayout as Y } from "@scalar/api-client/hooks";
4
+ import { useWorkspace as F } from "@scalar/api-client/store";
5
+ import { getSecurityRequirements as H, formatComplexScheme as J, formatScheme as P, getSchemeOptions as G } from "@scalar/api-client/views/Request/libs";
6
+ import { useModal as Q, ScalarComboboxMultiselect as X, ScalarButton as Z, ScalarListboxCheckbox as _, ScalarIconButton as ee } from "@scalar/components";
7
+ import { safeLocalStorage as te, CLIENT_LS_KEYS as oe } from "@scalar/helpers/object/local-storage";
8
+ import { ScalarIconCaretDown as le, ScalarIconTrash as ne } from "@scalar/icons";
9
+ import { isDefined as re } from "@scalar/oas-utils/helpers";
10
+ import { emitCustomEvent as A } from "@scalar/workspace-store/events";
11
+ import ae from "./DeleteRequestAuthModal.vue.js";
12
+ import se from "./RequestAuthDataTable.vue.js";
13
+ const ie = ["id"], ue = { class: "flex flex-1" }, ce = { class: "min-w-0 flex-1 truncate" }, Ae = /* @__PURE__ */ N({
14
14
  __name: "AuthSelector",
15
15
  props: {
16
16
  collection: {},
@@ -24,168 +24,152 @@ const me = ["id"], pe = { class: "flex flex-1" }, de = { class: "min-w-0 flex-1
24
24
  title: {},
25
25
  workspace: {}
26
26
  },
27
- setup(a) {
28
- const { layout: V } = J(), { securitySchemes: d } = P(), q = j(), g = C(null), f = _(), x = C(
27
+ setup(r) {
28
+ const { layout: w } = Y(), { securitySchemes: p } = F(), R = M(), S = x(null), d = Q(), b = x(
29
29
  null
30
- ), E = C(!1), D = v(() => {
31
- const t = G(a.operation, a.collection);
30
+ ), V = x(!1), q = y(() => {
31
+ const t = H(r.operation, r.collection);
32
32
  return { filteredRequirements: t.filter((o) => Object.keys(o).length), requirements: t };
33
- }), k = v(() => {
34
- const { filteredRequirements: t, requirements: e } = D.value;
33
+ }), g = y(() => {
34
+ const { filteredRequirements: t, requirements: e } = q.value;
35
35
  if (!e.length)
36
36
  return null;
37
37
  const l = !e.some(
38
- (h) => Object.keys(h).length > 1
38
+ (U) => Object.keys(U).length > 1
39
39
  ) && t.length < e.length;
40
40
  return { icon: l ? "Unlock" : "Lock", text: l ? "Optional" : "Required" };
41
- }), u = v(
42
- () => a.selectedSecuritySchemeUids.map((t) => {
41
+ }), s = y(
42
+ () => r.selectedSecuritySchemeUids.map((t) => {
43
43
  if (Array.isArray(t))
44
- return Q(t, d);
45
- const e = d[t ?? ""];
44
+ return J(t, p);
45
+ const e = p[t ?? ""];
46
46
  if (e)
47
- return X(e);
48
- }).filter(ie)
47
+ return P(e);
48
+ }).filter(re)
49
49
  );
50
- function B(t) {
51
- var l;
52
- const e = t.find((r) => r.payload), o = t.filter((r) => !r.payload).map(({ id: r }) => {
53
- const s = r.split(",");
54
- return s.length > 1 ? s : r;
50
+ function T(t) {
51
+ const e = t.find((l) => l.payload), o = t.filter((l) => !l.payload).map(({ id: l }) => {
52
+ const i = l.split(",");
53
+ return i.length > 1 ? i : l;
55
54
  });
56
- e != null && e.payload && (w((l = y.value) == null ? void 0 : l.$el, "scalar-add-auth-option", {
55
+ e?.payload && (A(f.value?.$el, "scalar-add-auth-option", {
57
56
  payload: e.payload
58
- }), e.payload.uid && o.push(e.payload.uid)), L(o);
57
+ }), e.payload.uid && o.push(e.payload.uid)), O(o);
59
58
  }
60
- const L = (t) => {
61
- var e, o, l;
62
- if (a.collection.useCollectionSecurity) {
63
- if (w((e = y.value) == null ? void 0 : e.$el, "scalar-select-security-schemes", {
59
+ const O = (t) => {
60
+ if (r.collection.useCollectionSecurity) {
61
+ if (A(f.value?.$el, "scalar-select-security-schemes", {
64
62
  uids: t
65
- }), !a.persistAuth)
63
+ }), !r.persistAuth)
66
64
  return;
67
- const r = t.map((s) => {
68
- var h;
69
- return Array.isArray(s) ? s.map((K) => {
70
- var T;
71
- return (T = d[K]) == null ? void 0 : T.nameKey;
72
- }) : (h = d[s]) == null ? void 0 : h.nameKey;
73
- });
74
- re().setItem(
75
- ne.SELECTED_SECURITY_SCHEMES,
76
- JSON.stringify(r)
65
+ const e = t.map((o) => Array.isArray(o) ? o.map((l) => p[l]?.nameKey) : p[o]?.nameKey);
66
+ te().setItem(
67
+ oe.SELECTED_SECURITY_SCHEMES,
68
+ JSON.stringify(e)
77
69
  );
78
- } else (o = a.operation) != null && o.uid && w(
79
- (l = y.value) == null ? void 0 : l.$el,
70
+ } else r.operation?.uid && A(
71
+ f.value?.$el,
80
72
  "scalar-select-operation-security-schemes",
81
73
  {
82
- operationUid: a.operation.uid,
74
+ operationUid: r.operation.uid,
83
75
  uids: t
84
76
  }
85
77
  );
86
78
  };
87
- function O({ id: t, label: e }) {
88
- x.value = { id: t, label: e }, f.show();
79
+ function E({ id: t, label: e }) {
80
+ b.value = { id: t, label: e }, d.show();
89
81
  }
90
- const U = (t) => {
91
- var o;
82
+ const $ = (t) => {
92
83
  if (!t)
93
84
  return;
94
- const e = a.selectedSecuritySchemeUids.filter((l) => {
95
- const r = t.split(",");
96
- return r.length > 1 && Array.isArray(l) && r.length === l.length ? l.every((s) => !r.includes(s)) : l !== t;
85
+ const e = r.selectedSecuritySchemeUids.filter((o) => {
86
+ const l = t.split(",");
87
+ return l.length > 1 && Array.isArray(o) && l.length === o.length ? o.every((i) => !l.includes(i)) : o !== t;
97
88
  });
98
- L(e), (o = g.value) == null || o.$el.focus(), f.hide();
99
- }, M = v(
100
- () => {
101
- var t;
102
- return Z(
103
- D.value.filteredRequirements,
104
- ((t = a.collection) == null ? void 0 : t.securitySchemes) ?? [],
105
- d,
106
- V === "modal" || a.layout === "reference"
107
- );
108
- }
109
- ), N = (t) => {
110
- var e;
111
- E.value && t.stopPropagation(), (e = g.value) == null || e.$el.click();
112
- }, y = W("wrapperRef");
113
- return (t, e) => (c(), $(n(H), {
89
+ O(e), S.value?.$el.focus(), d.hide();
90
+ }, I = y(
91
+ () => G(
92
+ q.value.filteredRequirements,
93
+ r.collection?.securitySchemes ?? [],
94
+ p,
95
+ w === "modal" || r.layout === "reference"
96
+ )
97
+ ), B = (t) => {
98
+ V.value && t.stopPropagation(), S.value?.$el.click();
99
+ }, f = K("wrapperRef");
100
+ return (t, e) => (u(), D(n(W), {
114
101
  ref_key: "wrapperRef",
115
- ref: y,
102
+ ref: f,
116
103
  class: "group/params relative",
117
- itemCount: u.value.length,
104
+ itemCount: s.value.length,
118
105
  layout: t.layout,
119
- "onUpdate:modelValue": e[2] || (e[2] = (o) => E.value = o)
106
+ "onUpdate:modelValue": e[2] || (e[2] = (o) => V.value = o)
120
107
  }, {
121
- title: m(() => [
122
- i("div", {
123
- id: n(q),
108
+ title: c(() => [
109
+ a("div", {
110
+ id: n(R),
124
111
  class: "inline-flex items-center gap-0.5 leading-[20px]"
125
112
  }, [
126
- i("span", null, b(t.title), 1),
127
- k.value ? (c(), S("span", {
113
+ a("span", null, v(t.title), 1),
114
+ g.value ? (u(), h("span", {
128
115
  key: 0,
129
- class: F(["text-c-3 hover:bg-b-3 hover:text-c-1 -mr-1 cursor-pointer rounded px-1 py-0.5 text-xs leading-[normal]", { "text-c-1": k.value.text === "Required" }]),
130
- onClick: N
131
- }, b(k.value.text), 3)) : I("", !0)
132
- ], 8, me)
116
+ class: j(["text-c-3 hover:bg-b-3 hover:text-c-1 -mr-1 cursor-pointer rounded px-1 py-0.5 text-xs leading-[normal]", { "text-c-1": g.value.text === "Required" }]),
117
+ onClick: B
118
+ }, v(g.value.text), 3)) : L("", !0)
119
+ ], 8, ie)
133
120
  ]),
134
- actions: m(() => [
135
- i("div", pe, [
136
- p(n(ee), {
121
+ actions: c(() => [
122
+ a("div", ue, [
123
+ m(n(X), {
137
124
  class: "w-72 text-xs",
138
- modelValue: u.value,
125
+ modelValue: s.value,
139
126
  multiple: "",
140
- options: M.value,
127
+ options: I.value,
141
128
  placement: "bottom-end",
142
129
  teleport: "",
143
- onDelete: O,
144
- "onUpdate:modelValue": B
130
+ onDelete: E,
131
+ "onUpdate:modelValue": T
145
132
  }, {
146
- option: m(({ option: o, selected: l }) => [
147
- p(n(oe), {
133
+ option: c(({ option: o, selected: l }) => [
134
+ m(n(_), {
148
135
  multiselect: "",
149
136
  selected: l
150
137
  }, null, 8, ["selected"]),
151
- i("div", de, b(o.label), 1),
152
- o.isDeletable ?? (n(V) !== "modal" && t.layout !== "reference") ? (c(), $(n(le), {
138
+ a("div", ce, v(o.label), 1),
139
+ o.isDeletable ?? (n(w) !== "modal" && t.layout !== "reference") ? (u(), D(n(ee), {
153
140
  key: 0,
154
141
  class: "-m-0.5 shrink-0 p-0.5 opacity-0 group-hover/item:opacity-100",
155
- icon: n(se),
142
+ icon: n(ne),
156
143
  label: `Delete ${o.label}`,
157
144
  size: "xs",
158
- onClick: Y((r) => O(o), ["stop"])
159
- }, null, 8, ["icon", "label", "onClick"])) : I("", !0)
145
+ onClick: z((i) => E(o), ["stop"])
146
+ }, null, 8, ["icon", "label", "onClick"])) : L("", !0)
160
147
  ]),
161
- default: m(() => [
162
- p(n(te), {
148
+ default: c(() => [
149
+ m(n(Z), {
163
150
  ref_key: "comboboxButtonRef",
164
- ref: g,
165
- "aria-describedby": n(q),
151
+ ref: S,
152
+ "aria-describedby": n(R),
166
153
  class: "group/combobox-button hover:text-c-1 text-c-2 flex h-fit items-center gap-1 px-0.75 py-0.25 text-base font-normal transition-transform",
167
154
  fullWidth: "",
168
155
  variant: "ghost"
169
156
  }, {
170
- default: m(() => {
171
- var o;
172
- return [
173
- u.value.length === 1 ? (c(), S(A, { key: 0 }, [
174
- e[3] || (e[3] = i("span", { class: "sr-only" }, "Selected Auth Type:", -1)),
175
- R(" " + b((o = u.value[0]) == null ? void 0 : o.label), 1)
176
- ], 64)) : u.value.length > 1 ? (c(), S(A, { key: 1 }, [
177
- e[4] || (e[4] = R(" Multiple ")),
178
- e[5] || (e[5] = i("span", { class: "sr-only" }, "Auth Types Selected", -1))
179
- ], 64)) : (c(), S(A, { key: 2 }, [
180
- e[6] || (e[6] = i("span", { class: "sr-only" }, "Select", -1)),
181
- e[7] || (e[7] = R(" Auth Type "))
182
- ], 64)),
183
- p(n(ae), {
184
- class: "size-3 shrink-0 transition-transform duration-100 group-aria-expanded/combobox-button:rotate-180",
185
- weight: "bold"
186
- })
187
- ];
188
- }),
157
+ default: c(() => [
158
+ s.value.length === 1 ? (u(), h(k, { key: 0 }, [
159
+ e[3] || (e[3] = a("span", { class: "sr-only" }, "Selected Auth Type:", -1)),
160
+ C(" " + v(s.value[0]?.label), 1)
161
+ ], 64)) : s.value.length > 1 ? (u(), h(k, { key: 1 }, [
162
+ e[4] || (e[4] = C(" Multiple ")),
163
+ e[5] || (e[5] = a("span", { class: "sr-only" }, "Auth Types Selected", -1))
164
+ ], 64)) : (u(), h(k, { key: 2 }, [
165
+ e[6] || (e[6] = a("span", { class: "sr-only" }, "Select", -1)),
166
+ e[7] || (e[7] = C(" Auth Type "))
167
+ ], 64)),
168
+ m(n(le), {
169
+ class: "size-3 shrink-0 transition-transform duration-100 group-aria-expanded/combobox-button:rotate-180",
170
+ weight: "bold"
171
+ })
172
+ ]),
189
173
  _: 1
190
174
  }, 8, ["aria-describedby"])
191
175
  ]),
@@ -193,25 +177,22 @@ const me = ["id"], pe = { class: "flex flex-1" }, de = { class: "min-w-0 flex-1
193
177
  }, 8, ["modelValue", "options"])
194
178
  ])
195
179
  ]),
196
- default: m(() => [
197
- p(ce, {
180
+ default: c(() => [
181
+ m(se, {
198
182
  collection: t.collection,
199
183
  envVariables: t.envVariables,
200
184
  environment: t.environment,
201
185
  layout: t.layout,
202
186
  persistAuth: t.persistAuth,
203
- selectedSchemeOptions: u.value,
187
+ selectedSchemeOptions: s.value,
204
188
  server: t.server,
205
189
  workspace: t.workspace
206
190
  }, null, 8, ["collection", "envVariables", "environment", "layout", "persistAuth", "selectedSchemeOptions", "server", "workspace"]),
207
- p(ue, {
208
- scheme: x.value,
209
- state: n(f),
210
- onClose: e[0] || (e[0] = (o) => n(f).hide()),
211
- onDelete: e[1] || (e[1] = (o) => {
212
- var l;
213
- return U((l = x.value) == null ? void 0 : l.id);
214
- })
191
+ m(ae, {
192
+ scheme: b.value,
193
+ state: n(d),
194
+ onClose: e[0] || (e[0] = (o) => n(d).hide()),
195
+ onDelete: e[1] || (e[1] = (o) => $(b.value?.id))
215
196
  }, null, 8, ["scheme", "state"])
216
197
  ]),
217
198
  _: 1
@@ -219,5 +200,5 @@ const me = ["id"], pe = { class: "flex flex-1" }, de = { class: "min-w-0 flex-1
219
200
  }
220
201
  });
221
202
  export {
222
- we as default
203
+ Ae as default
223
204
  };