@scalar/api-reference 1.34.6 → 1.35.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 (394) hide show
  1. package/CHANGELOG.md +68 -0
  2. package/dist/browser/standalone.js +30773 -30680
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/Anchor/Anchor.vue.d.ts +6 -11
  5. package/dist/components/Anchor/Anchor.vue.d.ts.map +1 -1
  6. package/dist/components/Anchor/WithBreadcrumb.vue.d.ts +11 -13
  7. package/dist/components/Anchor/WithBreadcrumb.vue.d.ts.map +1 -1
  8. package/dist/components/ApiReference.vue.d.ts +14 -1
  9. package/dist/components/ApiReference.vue.d.ts.map +1 -1
  10. package/dist/components/ApiReference.vue.js +24 -10
  11. package/dist/components/ApiReferenceLayout.vue.d.ts +7 -31
  12. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  13. package/dist/components/ApiReferenceLayout.vue.js +2 -2
  14. package/dist/components/ApiReferenceLayout.vue2.js +179 -191
  15. package/dist/components/Badge/Badge.vue.d.ts +6 -11
  16. package/dist/components/Badge/Badge.vue.d.ts.map +1 -1
  17. package/dist/components/ClassicHeader.vue.d.ts +8 -12
  18. package/dist/components/ClassicHeader.vue.d.ts.map +1 -1
  19. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts +1 -3
  20. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts.map +1 -1
  21. package/dist/components/Content/ClientLibraries/ClientSelector.vue.d.ts +1 -1
  22. package/dist/components/Content/ClientLibraries/ClientSelector.vue.d.ts.map +1 -1
  23. package/dist/components/Content/ClientLibraries/featured-clients.d.ts.map +1 -1
  24. package/dist/components/Content/ClientLibraries/index.d.ts +1 -1
  25. package/dist/components/Content/Content.vue.d.ts +9 -12
  26. package/dist/components/Content/Content.vue.d.ts.map +1 -1
  27. package/dist/components/Content/Content.vue.js +180 -36
  28. package/dist/components/Content/IntroductionSection.vue.d.ts +18 -0
  29. package/dist/components/Content/IntroductionSection.vue.d.ts.map +1 -0
  30. package/dist/components/Content/IntroductionSection.vue.js +26 -0
  31. package/dist/components/Content/IntroductionSection.vue2.js +4 -0
  32. package/dist/components/Content/Models/ClassicLayout.vue.d.ts.map +1 -1
  33. package/dist/components/Content/Models/Models.vue.d.ts.map +1 -1
  34. package/dist/components/Content/Models/ModernLayout.vue.d.ts.map +1 -1
  35. package/dist/components/Content/Models/ModernLayout.vue.js +1 -1
  36. package/dist/components/Content/Models/ModernLayout.vue2.js +6 -6
  37. package/dist/components/Content/Operations/TraversedEntry.vue.d.ts.map +1 -1
  38. package/dist/components/Content/Operations/TraversedEntryContainer.vue.d.ts +1 -5
  39. package/dist/components/Content/Operations/TraversedEntryContainer.vue.d.ts.map +1 -1
  40. package/dist/components/Content/Operations/TraversedEntryContainer.vue.js +28 -35
  41. package/dist/components/Content/Operations/get-current-index.d.ts.map +1 -1
  42. package/dist/components/Content/Schema/RenderString.vue.d.ts.map +1 -1
  43. package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
  44. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts +1 -1
  45. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
  46. package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts.map +1 -1
  47. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.d.ts +1 -1
  48. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.d.ts.map +1 -1
  49. package/dist/components/Content/Schema/SchemaEnumValues.vue.d.ts.map +1 -1
  50. package/dist/components/Content/Schema/SchemaHeading.vue.d.ts.map +1 -1
  51. package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts.map +1 -1
  52. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  53. package/dist/components/Content/Schema/SchemaProperty.vue2.js +1 -1
  54. package/dist/components/Content/Schema/SchemaPropertyDescription.vue.d.ts +6 -11
  55. package/dist/components/Content/Schema/SchemaPropertyDescription.vue.d.ts.map +1 -1
  56. package/dist/components/Content/Schema/SchemaPropertyDetail.vue.d.ts +10 -13
  57. package/dist/components/Content/Schema/SchemaPropertyDetail.vue.d.ts.map +1 -1
  58. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.d.ts.map +1 -1
  59. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts +6 -11
  60. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
  61. package/dist/components/Content/Schema/helpers/get-schema-type.d.ts.map +1 -1
  62. package/dist/components/Content/Schema/helpers/is-type-object.d.ts.map +1 -1
  63. package/dist/components/Content/Tags/ClassicLayout.vue.d.ts +6 -11
  64. package/dist/components/Content/Tags/ClassicLayout.vue.d.ts.map +1 -1
  65. package/dist/components/Content/Tags/ModernLayout.vue.d.ts +5 -63
  66. package/dist/components/Content/Tags/ModernLayout.vue.d.ts.map +1 -1
  67. package/dist/components/Content/Tags/Tag.vue.d.ts +7 -11
  68. package/dist/components/Content/Tags/Tag.vue.d.ts.map +1 -1
  69. package/dist/components/Content/Tags/TagSection.vue.d.ts.map +1 -1
  70. package/dist/components/Content/Tags/TagSection.vue.js +1 -1
  71. package/dist/components/GettingStarted.vue.d.ts +1 -1
  72. package/dist/components/GettingStarted.vue.d.ts.map +1 -1
  73. package/dist/components/HttpMethod/HttpMethod.vue.d.ts +5 -10
  74. package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
  75. package/dist/components/IntersectionObserver.vue.d.ts +5 -12
  76. package/dist/components/IntersectionObserver.vue.d.ts.map +1 -1
  77. package/dist/components/Lazy/Lazy.vue.d.ts +5 -10
  78. package/dist/components/Lazy/Lazy.vue.d.ts.map +1 -1
  79. package/dist/components/LinkList/LinkList.vue.d.ts +6 -13
  80. package/dist/components/LinkList/LinkList.vue.d.ts.map +1 -1
  81. package/dist/components/LoadingSkeleton.vue.d.ts.map +1 -1
  82. package/dist/components/MobileHeader.vue.d.ts +6 -11
  83. package/dist/components/MobileHeader.vue.d.ts.map +1 -1
  84. package/dist/components/OperationPath.vue.d.ts +1 -1
  85. package/dist/components/OperationPath.vue.d.ts.map +1 -1
  86. package/dist/components/OperationsList/OperationsList.vue.d.ts.map +1 -1
  87. package/dist/components/OperationsList/OperationsListItem.vue.d.ts +1 -1
  88. package/dist/components/OperationsList/OperationsListItem.vue.d.ts.map +1 -1
  89. package/dist/components/ScreenReader.vue.d.ts +7 -11
  90. package/dist/components/ScreenReader.vue.d.ts.map +1 -1
  91. package/dist/components/Section/CompactSection.vue.d.ts +8 -12
  92. package/dist/components/Section/CompactSection.vue.d.ts.map +1 -1
  93. package/dist/components/Section/Section.vue.d.ts +5 -10
  94. package/dist/components/Section/Section.vue.d.ts.map +1 -1
  95. package/dist/components/Section/SectionAccordion.vue.d.ts +13 -66
  96. package/dist/components/Section/SectionAccordion.vue.d.ts.map +1 -1
  97. package/dist/components/Section/SectionColumn.vue.d.ts +6 -11
  98. package/dist/components/Section/SectionColumn.vue.d.ts.map +1 -1
  99. package/dist/components/Section/SectionColumns.vue.d.ts +6 -11
  100. package/dist/components/Section/SectionColumns.vue.d.ts.map +1 -1
  101. package/dist/components/Section/SectionContainer.vue.d.ts +7 -11
  102. package/dist/components/Section/SectionContainer.vue.d.ts.map +1 -1
  103. package/dist/components/Section/SectionContainerAccordion.vue.d.ts +8 -12
  104. package/dist/components/Section/SectionContainerAccordion.vue.d.ts.map +1 -1
  105. package/dist/components/Section/SectionContent.vue.d.ts +6 -11
  106. package/dist/components/Section/SectionContent.vue.d.ts.map +1 -1
  107. package/dist/components/Section/SectionHeader.vue.d.ts +8 -12
  108. package/dist/components/Section/SectionHeader.vue.d.ts.map +1 -1
  109. package/dist/components/Section/SectionHeaderTag.vue.d.ts +5 -10
  110. package/dist/components/Section/SectionHeaderTag.vue.d.ts.map +1 -1
  111. package/dist/components/SectionFlare/SectionFlare.vue.d.ts.map +1 -1
  112. package/dist/components/ShowMoreButton.vue.d.ts +1 -1
  113. package/dist/components/ShowMoreButton.vue.d.ts.map +1 -1
  114. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  115. package/dist/features/Operation/components/ContentTypeSelect.vue.d.ts.map +1 -1
  116. package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
  117. package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
  118. package/dist/features/Operation/components/ParameterHeaders.vue.d.ts.map +1 -1
  119. package/dist/features/Operation/components/ParameterList.vue.d.ts +5 -10
  120. package/dist/features/Operation/components/ParameterList.vue.d.ts.map +1 -1
  121. package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
  122. package/dist/features/Operation/components/RequestBody.vue.d.ts +5 -10
  123. package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
  124. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +2 -2
  125. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
  126. package/dist/features/Operation/components/callbacks/Callback.vue.js +2 -2
  127. package/dist/features/Operation/components/callbacks/Callback.vue2.js +2 -2
  128. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts +2 -2
  129. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -1
  130. package/dist/features/Operation/components/callbacks/Callbacks.vue.js +2 -2
  131. package/dist/features/Operation/helpers/combine-params.d.ts +1 -2
  132. package/dist/features/Operation/helpers/combine-params.d.ts.map +1 -1
  133. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +1 -3
  134. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  135. package/dist/features/Operation/layouts/ClassicLayout.vue.js +1 -1
  136. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +35 -34
  137. package/dist/features/Operation/layouts/ClassicLayout.vue3.js +2 -2
  138. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +1 -3
  139. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  140. package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
  141. package/dist/features/Operation/layouts/ModernLayout.vue2.js +28 -27
  142. package/dist/features/Search/components/SearchButton.vue.d.ts.map +1 -1
  143. package/dist/features/Search/components/SearchModal.vue.d.ts.map +1 -1
  144. package/dist/features/api-client-modal/ApiClientModal.vue.d.ts +1 -1
  145. package/dist/features/api-client-modal/ApiClientModal.vue.d.ts.map +1 -1
  146. package/dist/features/api-client-modal/ApiClientModal.vue.js +50 -53
  147. package/dist/features/api-client-modal/useApiClient.d.ts +556 -556
  148. package/dist/features/api-client-modal/useApiClient.d.ts.map +1 -1
  149. package/dist/features/document-source/hooks/useDocumentFetcher.d.ts +1 -1
  150. package/dist/features/document-source/hooks/useDocumentFetcher.d.ts.map +1 -1
  151. package/dist/features/document-source/hooks/useDocumentFetcher.js +13 -13
  152. package/dist/features/example-responses/ExampleResponse.vue.d.ts +1 -2
  153. package/dist/features/example-responses/ExampleResponse.vue.d.ts.map +1 -1
  154. package/dist/features/example-responses/ExampleResponse.vue.js +2 -2
  155. package/dist/features/example-responses/ExampleResponseTab.vue.d.ts +5 -10
  156. package/dist/features/example-responses/ExampleResponseTab.vue.d.ts.map +1 -1
  157. package/dist/features/example-responses/ExampleResponseTabList.vue.d.ts +7 -11
  158. package/dist/features/example-responses/ExampleResponseTabList.vue.d.ts.map +1 -1
  159. package/dist/features/example-responses/ExampleResponses.vue.d.ts +1 -1
  160. package/dist/features/example-responses/ExampleResponses.vue.d.ts.map +1 -1
  161. package/dist/features/example-responses/ExampleResponses.vue.js +2 -2
  162. package/dist/features/example-responses/ExampleResponses.vue2.js +9 -9
  163. package/dist/features/example-responses/helpers/get-resolved-ref-deep.d.ts.map +1 -1
  164. package/dist/features/external-docs/ExternalDocs.vue.d.ts.map +1 -1
  165. package/dist/features/info-object/Contact.vue.d.ts.map +1 -1
  166. package/dist/features/info-object/License.vue.d.ts +1 -1
  167. package/dist/features/info-object/License.vue.d.ts.map +1 -1
  168. package/dist/features/info-object/TermsOfService.vue.d.ts.map +1 -1
  169. package/dist/features/multiple-documents/DocumentSelector.vue.d.ts.map +1 -1
  170. package/dist/features/multiple-documents/useMultipleDocuments.d.ts.map +1 -1
  171. package/dist/features/sidebar/components/Sidebar.vue.d.ts +8 -14
  172. package/dist/features/sidebar/components/Sidebar.vue.d.ts.map +1 -1
  173. package/dist/features/sidebar/components/SidebarElement.vue.d.ts +8 -12
  174. package/dist/features/sidebar/components/SidebarElement.vue.d.ts.map +1 -1
  175. package/dist/features/sidebar/components/SidebarElement.vue.js +1 -1
  176. package/dist/features/sidebar/components/SidebarElement.vue2.js +60 -55
  177. package/dist/features/sidebar/components/SidebarGroup.vue.d.ts +6 -11
  178. package/dist/features/sidebar/components/SidebarGroup.vue.d.ts.map +1 -1
  179. package/dist/features/sidebar/components/SidebarHttpBadge.vue.d.ts +5 -10
  180. package/dist/features/sidebar/components/SidebarHttpBadge.vue.d.ts.map +1 -1
  181. package/dist/features/sidebar/helpers/create-sidebar.d.ts.map +1 -1
  182. package/dist/features/specification-extension/SpecificationExtension.vue.d.ts.map +1 -1
  183. package/dist/features/specification-extension/SpecificationExtension.vue.js +2 -47
  184. package/dist/features/specification-extension/SpecificationExtension.vue2.js +47 -2
  185. package/dist/features/specification-extension/helpers.d.ts +10 -0
  186. package/dist/features/specification-extension/helpers.d.ts.map +1 -0
  187. package/dist/features/specification-extension/helpers.js +4 -0
  188. package/dist/features/specification-extension/index.d.ts +1 -0
  189. package/dist/features/specification-extension/index.d.ts.map +1 -1
  190. package/dist/features/test-request-button/TestRequestButton.vue.d.ts.map +1 -1
  191. package/dist/features/traverse-schema/helpers/get-tag.d.ts.map +1 -1
  192. package/dist/features/traverse-schema/helpers/traverse-description.d.ts +3 -1
  193. package/dist/features/traverse-schema/helpers/traverse-description.d.ts.map +1 -1
  194. package/dist/features/traverse-schema/helpers/traverse-document.d.ts.map +1 -1
  195. package/dist/features/traverse-schema/helpers/traverse-paths.d.ts +7 -3
  196. package/dist/features/traverse-schema/helpers/traverse-paths.d.ts.map +1 -1
  197. package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts +3 -1
  198. package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts.map +1 -1
  199. package/dist/features/traverse-schema/helpers/traverse-tags.d.ts +3 -1
  200. package/dist/features/traverse-schema/helpers/traverse-tags.d.ts.map +1 -1
  201. package/dist/features/traverse-schema/helpers/traverse-webhooks.d.ts +5 -1
  202. package/dist/features/traverse-schema/helpers/traverse-webhooks.d.ts.map +1 -1
  203. package/dist/features/traverse-schema/types.d.ts +1 -3
  204. package/dist/features/traverse-schema/types.d.ts.map +1 -1
  205. package/dist/features/x-badges/XBadges.vue.d.ts.map +1 -1
  206. package/dist/helpers/convert-security-scheme.d.ts +1 -1
  207. package/dist/helpers/convert-security-scheme.d.ts.map +1 -1
  208. package/dist/helpers/test-utils.d.ts.map +1 -1
  209. package/dist/hooks/useFreezing.d.ts +6 -0
  210. package/dist/hooks/useFreezing.d.ts.map +1 -0
  211. package/dist/hooks/useFreezing.js +29 -0
  212. package/dist/hooks/useNavState.d.ts +1 -2
  213. package/dist/hooks/useNavState.d.ts.map +1 -1
  214. package/dist/index.d.ts +1 -0
  215. package/dist/index.d.ts.map +1 -1
  216. package/dist/index.js +18 -16
  217. package/dist/libs/download.d.ts +0 -5
  218. package/dist/libs/download.d.ts.map +1 -1
  219. package/dist/libs/download.js +10 -13
  220. package/dist/libs/markdown.d.ts.map +1 -1
  221. package/dist/libs/openapi.d.ts +2 -4
  222. package/dist/libs/openapi.d.ts.map +1 -1
  223. package/dist/plugins/plugin-manager.d.ts.map +1 -1
  224. package/dist/standalone/lib/html-api.d.ts.map +1 -1
  225. package/dist/style.css +1 -1
  226. package/dist/v2/ApiReferenceWorkspace.vue.d.ts +11 -14
  227. package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
  228. package/dist/v2/ApiReferenceWorkspace.vue.js +92 -95
  229. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +20 -0
  230. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -0
  231. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +7 -0
  232. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue2.js +223 -0
  233. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.d.ts +21 -0
  234. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.d.ts.map +1 -0
  235. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.js +64 -0
  236. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue2.js +4 -0
  237. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +17 -0
  238. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -0
  239. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +267 -0
  240. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue2.js +4 -0
  241. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts +9 -0
  242. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts.map +1 -0
  243. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js +151 -0
  244. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue2.js +4 -0
  245. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +20 -0
  246. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +1 -0
  247. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +7 -0
  248. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue2.js +96 -0
  249. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts +50 -0
  250. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts.map +1 -0
  251. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.js +50 -0
  252. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue2.js +4 -0
  253. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +17 -0
  254. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -0
  255. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +253 -0
  256. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue2.js +4 -0
  257. package/dist/v2/blocks/scalar-auth-selector-block/helpers/filter-security-requirements.d.ts +6 -0
  258. package/dist/v2/blocks/scalar-auth-selector-block/helpers/filter-security-requirements.d.ts.map +1 -0
  259. package/dist/v2/blocks/scalar-auth-selector-block/helpers/update-scheme.d.ts +8 -0
  260. package/dist/v2/blocks/scalar-auth-selector-block/helpers/update-scheme.d.ts.map +1 -0
  261. package/dist/v2/blocks/scalar-auth-selector-block/helpers/update-scheme.js +22 -0
  262. package/dist/v2/blocks/scalar-auth-selector-block/index.d.ts +2 -0
  263. package/dist/v2/blocks/scalar-auth-selector-block/index.d.ts.map +1 -0
  264. package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts +15 -0
  265. package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts.map +1 -0
  266. package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js +7 -0
  267. package/dist/{components/Content/ClientLibraries/ClientSelector.vue2.js → v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue2.js} +33 -33
  268. package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue.d.ts +16 -0
  269. package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue.d.ts.map +1 -0
  270. package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue.js +7 -0
  271. package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue2.js +124 -0
  272. package/dist/v2/blocks/scalar-client-selector-block/helpers/featured-clients.d.ts +11 -0
  273. package/dist/v2/blocks/scalar-client-selector-block/helpers/featured-clients.d.ts.map +1 -0
  274. package/dist/v2/blocks/scalar-client-selector-block/index.d.ts +2 -0
  275. package/dist/v2/blocks/scalar-client-selector-block/index.d.ts.map +1 -0
  276. package/dist/{features/base-url/BaseUrl.vue.d.ts → v2/blocks/scalar-info-block/components/DownloadLink.vue.d.ts} +3 -4
  277. package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue.d.ts.map +1 -0
  278. package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue.js +7 -0
  279. package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue2.js +62 -0
  280. package/dist/v2/blocks/scalar-info-block/components/InfoBlock.vue.d.ts +36 -0
  281. package/dist/v2/blocks/scalar-info-block/components/InfoBlock.vue.d.ts.map +1 -0
  282. package/dist/v2/blocks/scalar-info-block/components/InfoBlock.vue.js +49 -0
  283. package/dist/v2/blocks/scalar-info-block/components/InfoBlock.vue2.js +4 -0
  284. package/dist/{components/Content/Introduction/Description.vue.d.ts → v2/blocks/scalar-info-block/components/InfoDescription.vue.d.ts} +2 -2
  285. package/dist/v2/blocks/scalar-info-block/components/InfoDescription.vue.d.ts.map +1 -0
  286. package/dist/v2/blocks/scalar-info-block/components/InfoDescription.vue.js +7 -0
  287. package/dist/v2/blocks/scalar-info-block/components/InfoDescription.vue2.js +72 -0
  288. package/dist/v2/blocks/scalar-info-block/components/InfoLinks.vue.d.ts +8 -0
  289. package/dist/v2/blocks/scalar-info-block/components/InfoLinks.vue.d.ts.map +1 -0
  290. package/dist/v2/blocks/scalar-info-block/components/InfoLinks.vue.js +36 -0
  291. package/dist/v2/blocks/scalar-info-block/components/InfoLinks.vue2.js +4 -0
  292. package/dist/v2/blocks/scalar-info-block/components/InfoVersion.vue.d.ts +7 -0
  293. package/dist/v2/blocks/scalar-info-block/components/InfoVersion.vue.d.ts.map +1 -0
  294. package/dist/v2/blocks/scalar-info-block/components/InfoVersion.vue.js +25 -0
  295. package/dist/v2/blocks/scalar-info-block/components/InfoVersion.vue2.js +4 -0
  296. package/dist/v2/blocks/scalar-info-block/components/IntroductionCard.vue.d.ts +16 -0
  297. package/dist/v2/blocks/scalar-info-block/components/IntroductionCard.vue.d.ts.map +1 -0
  298. package/dist/v2/blocks/scalar-info-block/components/IntroductionCard.vue.js +7 -0
  299. package/dist/v2/blocks/scalar-info-block/components/IntroductionCard.vue2.js +17 -0
  300. package/dist/v2/blocks/scalar-info-block/components/IntroductionCard.vue3.js +4 -0
  301. package/dist/v2/blocks/scalar-info-block/components/IntroductionCardItem.vue.d.ts +13 -0
  302. package/dist/v2/blocks/scalar-info-block/components/IntroductionCardItem.vue.d.ts.map +1 -0
  303. package/dist/v2/blocks/scalar-info-block/components/IntroductionCardItem.vue.js +13 -0
  304. package/dist/v2/blocks/scalar-info-block/components/IntroductionCardItem.vue2.js +4 -0
  305. package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue.d.ts +27 -0
  306. package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue.d.ts.map +1 -0
  307. package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue.js +7 -0
  308. package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue2.js +122 -0
  309. package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue3.js +4 -0
  310. package/dist/{features/download-link/DownloadLink.vue.d.ts → v2/blocks/scalar-info-block/components/OpenApiVersion.vue.d.ts} +2 -2
  311. package/dist/v2/blocks/scalar-info-block/components/OpenApiVersion.vue.d.ts.map +1 -0
  312. package/dist/v2/blocks/scalar-info-block/components/OpenApiVersion.vue.js +19 -0
  313. package/dist/v2/blocks/scalar-info-block/components/OpenApiVersion.vue2.js +4 -0
  314. package/dist/v2/blocks/scalar-info-block/index.d.ts +3 -0
  315. package/dist/v2/blocks/scalar-info-block/index.d.ts.map +1 -0
  316. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.d.ts +5 -8
  317. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.d.ts.map +1 -1
  318. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue2.js +38 -52
  319. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts +7 -8
  320. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts.map +1 -1
  321. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.js +1 -1
  322. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue2.js +148 -133
  323. package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.d.ts.map +1 -1
  324. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-client-options.d.ts.map +1 -1
  325. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.d.ts +1 -3
  326. package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.d.ts.map +1 -1
  327. package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.d.ts +1 -1
  328. package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.d.ts.map +1 -1
  329. package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.js +4 -3
  330. package/dist/v2/blocks/scalar-server-selector-block/components/Selector.vue.d.ts +51 -0
  331. package/dist/v2/blocks/scalar-server-selector-block/components/Selector.vue.d.ts.map +1 -0
  332. package/dist/v2/blocks/scalar-server-selector-block/components/Selector.vue.js +78 -0
  333. package/dist/v2/blocks/scalar-server-selector-block/components/Selector.vue2.js +4 -0
  334. package/dist/v2/blocks/scalar-server-selector-block/components/ServerSelector.vue.d.ts +18 -0
  335. package/dist/v2/blocks/scalar-server-selector-block/components/ServerSelector.vue.d.ts.map +1 -0
  336. package/dist/v2/blocks/scalar-server-selector-block/components/ServerSelector.vue.js +72 -0
  337. package/dist/v2/blocks/scalar-server-selector-block/components/ServerSelector.vue2.js +4 -0
  338. package/dist/v2/blocks/scalar-server-selector-block/index.d.ts +2 -0
  339. package/dist/v2/blocks/scalar-server-selector-block/index.d.ts.map +1 -0
  340. package/dist/v2/helpers/get-document-name.d.ts.map +1 -1
  341. package/dist/v2/helpers/map-configuration.d.ts +1 -1
  342. package/dist/v2/helpers/map-configuration.d.ts.map +1 -1
  343. package/dist/v2/helpers/normalize-content.d.ts.map +1 -1
  344. package/dist/v2/hooks/use-legacy-store-events.d.ts +14 -0
  345. package/dist/v2/hooks/use-legacy-store-events.d.ts.map +1 -0
  346. package/dist/v2/hooks/use-legacy-store-events.js +65 -0
  347. package/dist/v2/hooks/use-workspace-store-events.d.ts +4 -0
  348. package/dist/v2/hooks/use-workspace-store-events.d.ts.map +1 -0
  349. package/dist/v2/hooks/use-workspace-store-events.js +43 -0
  350. package/package.json +19 -17
  351. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.js +0 -7
  352. package/dist/components/Content/ClientLibraries/ClientLibraries.vue2.js +0 -122
  353. package/dist/components/Content/ClientLibraries/ClientSelector.vue.js +0 -7
  354. package/dist/components/Content/Introduction/Description.vue.d.ts.map +0 -1
  355. package/dist/components/Content/Introduction/Description.vue.js +0 -7
  356. package/dist/components/Content/Introduction/Description.vue2.js +0 -72
  357. package/dist/components/Content/Introduction/Introduction.vue.d.ts +0 -13
  358. package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +0 -1
  359. package/dist/components/Content/Introduction/Introduction.vue.js +0 -7
  360. package/dist/components/Content/Introduction/Introduction.vue2.js +0 -113
  361. package/dist/components/Content/Introduction/IntroductionSection.vue.d.ts +0 -25
  362. package/dist/components/Content/Introduction/IntroductionSection.vue.d.ts.map +0 -1
  363. package/dist/components/Content/Introduction/IntroductionSection.vue.js +0 -7
  364. package/dist/components/Content/Introduction/IntroductionSection.vue2.js +0 -159
  365. package/dist/components/Content/Introduction/index.d.ts +0 -2
  366. package/dist/components/Content/Introduction/index.d.ts.map +0 -1
  367. package/dist/features/base-url/BaseUrl.vue.d.ts.map +0 -1
  368. package/dist/features/base-url/BaseUrl.vue.js +0 -56
  369. package/dist/features/base-url/BaseUrl.vue2.js +0 -4
  370. package/dist/features/base-url/index.d.ts +0 -2
  371. package/dist/features/base-url/index.d.ts.map +0 -1
  372. package/dist/features/download-link/DownloadLink.vue.d.ts.map +0 -1
  373. package/dist/features/download-link/DownloadLink.vue.js +0 -7
  374. package/dist/features/download-link/DownloadLink.vue2.js +0 -61
  375. package/dist/features/download-link/index.d.ts +0 -3
  376. package/dist/features/download-link/index.d.ts.map +0 -1
  377. package/dist/features/download-link/openapi-version-symbol.d.ts +0 -2
  378. package/dist/features/download-link/openapi-version-symbol.d.ts.map +0 -1
  379. package/dist/features/download-link/openapi-version-symbol.js +0 -4
  380. package/dist/v2/events/definitions.d.ts +0 -44
  381. package/dist/v2/events/definitions.d.ts.map +0 -1
  382. package/dist/v2/events/definitions.js +0 -7
  383. package/dist/v2/events/index.d.ts +0 -3
  384. package/dist/v2/events/index.d.ts.map +0 -1
  385. package/dist/v2/events/listeners.d.ts +0 -8
  386. package/dist/v2/events/listeners.d.ts.map +0 -1
  387. package/dist/v2/events/listeners.js +0 -15
  388. /package/dist/{components/Content/ClientLibraries/ClientLibraries.vue3.js → v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue3.js} +0 -0
  389. /package/dist/{components/Content/ClientLibraries/ClientSelector.vue3.js → v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue3.js} +0 -0
  390. /package/dist/{components/Content/Introduction/Description.vue3.js → v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue3.js} +0 -0
  391. /package/dist/{components/Content/Introduction/Introduction.vue3.js → v2/blocks/scalar-client-selector-block/components/ClientSelector.vue3.js} +0 -0
  392. /package/dist/{components/Content/ClientLibraries → v2/blocks/scalar-client-selector-block/helpers}/featured-clients.js +0 -0
  393. /package/dist/{features/download-link → v2/blocks/scalar-info-block/components}/DownloadLink.vue3.js +0 -0
  394. /package/dist/{components/Content/Introduction/IntroductionSection.vue3.js → v2/blocks/scalar-info-block/components/InfoDescription.vue3.js} +0 -0
@@ -4,23 +4,20 @@ type __VLS_Props = {
4
4
  configuration?: AnyApiReferenceConfiguration;
5
5
  store: WorkspaceStore;
6
6
  };
7
- declare function __VLS_template(): {
8
- attrs: Partial<{}>;
9
- slots: {
10
- footer?(_: {}): any;
11
- footer?(_: {}): any;
12
- "sidebar-start"?(_: {}): any;
13
- };
14
- refs: {
15
- root: HTMLDivElement;
16
- };
17
- rootEl: any;
7
+ declare var __VLS_13: {}, __VLS_15: {}, __VLS_21: {}, __VLS_23: {};
8
+ type __VLS_Slots = {} & {
9
+ footer?: (props: typeof __VLS_13) => any;
10
+ } & {
11
+ footer?: (props: typeof __VLS_15) => any;
12
+ } & {
13
+ 'sidebar-start'?: (props: typeof __VLS_21) => any;
14
+ } & {
15
+ 'sidebar-end'?: (props: typeof __VLS_23) => any;
18
16
  };
19
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
20
17
  declare const __VLS_component: 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>;
21
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
18
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
22
19
  export default _default;
23
- type __VLS_WithTemplateSlots<T, S> = T & {
20
+ type __VLS_WithSlots<T, S> = T & {
24
21
  new (): {
25
22
  $slots: S;
26
23
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ApiReferenceWorkspace.vue.d.ts","sourceRoot":"","sources":["../../src/v2/ApiReferenceWorkspace.vue"],"names":[],"mappings":"AAgVA,OAAO,KAAK,EACV,4BAA4B,EAE7B,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,gCAAgC,CAAA;AA2BpE,KAAK,WAAW,GAAG;IACjB,aAAa,CAAC,EAAE,4BAA4B,CAAA;IAC5C,KAAK,EAAE,cAAc,CAAA;CACtB,CAAC;AA4NF,iBAAS,cAAc;WA8GT,OAAO,IAA6B;;wBAXrB,GAAG;wBACH,GAAG;iCACM,GAAG;;;;;;EAcxC;AAgBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"ApiReferenceWorkspace.vue.d.ts","sourceRoot":"","sources":["../../src/v2/ApiReferenceWorkspace.vue"],"names":[],"mappings":"AAsUA,OAAO,KAAK,EACV,4BAA4B,EAE7B,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAyBpE,KAAK,WAAW,GAAG;IACjB,aAAa,CAAC,EAAE,4BAA4B,CAAA;IAC5C,KAAK,EAAE,cAAc,CAAA;CACtB,CAAC;AAiSF,QAAA,IAAI,QAAQ,IAAW,EAAE,QAAQ,IAAW,EAAE,QAAQ,IAAW,EAAE,QAAQ,IAAY,CAAE;AACzF,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC5C;IAAE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC5C;IAAE,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GACrD;IAAE,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AA2BtD,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,162 +1,159 @@
1
- import { defineComponent as R, ref as c, toRef as _, provide as $, useTemplateRef as w, onBeforeMount as V, watch as u, computed as A, createElementBlock as B, openBlock as k, createBlock as P, createCommentVNode as U, createVNode as D, unref as n, resolveDynamicComponent as K, withCtx as i, createTextVNode as F, toDisplayString as O, renderSlot as f, isRef as Y } from "vue";
2
- import { safeLocalStorage as E, REFERENCE_LS_KEYS as x } from "@scalar/helpers/object/local-storage";
3
- import { makeUrlAbsolute as z } from "@scalar/helpers/url/make-url-absolute";
4
- import { redirectToProxy as H } from "@scalar/oas-utils/helpers";
5
- import { useColorMode as W } from "@scalar/use-hooks/useColorMode";
6
- import { useSeoMeta as j } from "@unhead/vue";
7
- import { useFavicon as q } from "@vueuse/core";
8
- import G from "../components/ApiReferenceLayout.vue.js";
9
- import { NAV_STATE_SYMBOL as J } from "../hooks/useNavState.js";
10
- import { isClient as g } from "./blocks/scalar-request-example-block/helpers/find-client.js";
11
- import { getDocumentName as Q } from "./helpers/get-document-name.js";
12
- import { mapConfiguration as M } from "./helpers/map-configuration.js";
13
- import { normalizeContent as X } from "./helpers/normalize-content.js";
1
+ import { defineComponent as R, ref as c, toRef as $, 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 m, isRef as K } from "vue";
2
+ import { safeLocalStorage as F, REFERENCE_LS_KEYS as O } from "@scalar/helpers/object/local-storage";
3
+ import { makeUrlAbsolute as W } from "@scalar/helpers/url/make-url-absolute";
4
+ import { redirectToProxy as Y } from "@scalar/oas-utils/helpers";
5
+ import { useColorMode as z } from "@scalar/use-hooks/useColorMode";
6
+ import { useSeoMeta as H } from "@unhead/vue";
7
+ import { useFavicon as j } from "@vueuse/core";
8
+ import q from "../components/ApiReferenceLayout.vue.js";
9
+ import { NAV_STATE_SYMBOL as G } from "../hooks/useNavState.js";
10
+ import { isClient as D } from "./blocks/scalar-request-example-block/helpers/find-client.js";
11
+ import { getDocumentName as J } from "./helpers/get-document-name.js";
12
+ import { mapConfiguration as g } from "./helpers/map-configuration.js";
13
+ import { normalizeContent as Q } from "./helpers/normalize-content.js";
14
+ import { useWorkspaceStoreEvents as X } from "./hooks/use-workspace-store-events.js";
14
15
  import { useMultipleDocuments as Z } from "../features/multiple-documents/useMultipleDocuments.js";
15
- import { onCustomEvent as p } from "./events/listeners.js";
16
16
  import ee from "../features/multiple-documents/DocumentSelector.vue.js";
17
- const ke = /* @__PURE__ */ R({
17
+ const Ce = /* @__PURE__ */ R({
18
18
  __name: "ApiReferenceWorkspace",
19
19
  props: {
20
20
  configuration: {},
21
21
  store: {}
22
22
  },
23
- setup(y) {
24
- const v = y, {
25
- availableDocuments: C,
23
+ setup(E) {
24
+ const f = E, {
25
+ availableDocuments: p,
26
26
  selectedConfiguration: o,
27
- selectedDocumentIndex: s,
28
- isIntersectionEnabled: m,
29
- hash: S,
30
- hashPrefix: T
27
+ selectedDocumentIndex: u,
28
+ isIntersectionEnabled: d,
29
+ hash: x,
30
+ hashPrefix: M
31
31
  } = Z({
32
- configuration: _(v, "configuration"),
32
+ configuration: $(f, "configuration"),
33
33
  isIntersectionEnabled: c(!1),
34
34
  hash: c(""),
35
35
  hashPrefix: c("")
36
- }), h = (e, t) => fetch(
37
- H(o.value.proxyUrl, e.toString()),
36
+ }), y = (e, t) => fetch(
37
+ Y(o.value.proxyUrl, e.toString()),
38
38
  t
39
39
  );
40
- $(J, { isIntersectionEnabled: m, hash: S, hashPrefix: T });
41
- const d = w("root"), a = v.store;
42
- V(() => {
43
- const e = E().getItem(
44
- x.SELECTED_CLIENT
40
+ N(G, { isIntersectionEnabled: d, hash: x, hashPrefix: M });
41
+ const v = w("root"), r = f.store;
42
+ I(() => {
43
+ const e = F().getItem(
44
+ O.SELECTED_CLIENT
45
45
  );
46
- g(e) && !a.workspace["x-scalar-default-client"] && a.update("x-scalar-default-client", e);
46
+ D(e) && !r.workspace["x-scalar-default-client"] && r.update("x-scalar-default-client", e);
47
47
  });
48
- const b = async (e) => {
49
- var l;
50
- const t = X(e.content), r = Q({
48
+ const S = async (e) => {
49
+ var n;
50
+ const t = Q(e.content), a = J({
51
51
  name: e.slug || e.title,
52
52
  url: e.url,
53
53
  document: t
54
54
  });
55
- if (a.workspace.documents[r]) {
56
- t && (m.value = !1, a.replaceDocument(r, t), a.update("x-scalar-active-document", r), setTimeout(() => {
57
- m.value = !0;
55
+ if (r.workspace.documents[a]) {
56
+ t && (d.value = !1, r.replaceDocument(a, t), r.update("x-scalar-active-document", a), setTimeout(() => {
57
+ d.value = !0;
58
58
  }, 300));
59
59
  return;
60
60
  }
61
61
  if (t)
62
- return await a.addDocument({
63
- name: r,
62
+ return await r.addDocument({
63
+ name: a,
64
64
  document: t,
65
- config: M(e)
65
+ config: g(e)
66
66
  });
67
67
  if (e.url)
68
- return await a.addDocument({
68
+ return await r.addDocument({
69
69
  name: e.slug ?? "default",
70
- url: z(e.url, {
71
- basePath: (l = o.value.pathRouting) == null ? void 0 : l.basePath
70
+ url: W(e.url, {
71
+ basePath: (n = o.value.pathRouting) == null ? void 0 : n.basePath
72
72
  }),
73
- fetch: h,
74
- config: M(e)
73
+ fetch: e.fetch ?? y,
74
+ config: g(e)
75
75
  });
76
76
  };
77
- u(
77
+ i(
78
78
  [
79
79
  () => o.value.slug,
80
80
  () => o.value.url,
81
81
  () => o.value.content
82
82
  ],
83
- ([e, t, r]) => {
84
- (e || t || r) && b(o.value);
83
+ ([e, t, a]) => {
84
+ (e || t || a) && S(o.value);
85
85
  },
86
86
  { immediate: !0 }
87
- ), p(d, "scalar-update-dark-mode", (e) => {
88
- a.update("x-scalar-dark-mode", e.detail.value);
89
- }), p(d, "scalar-update-active-document", (e) => {
90
- a.update("x-scalar-active-document", e.detail.value);
91
- }), p(d, "scalar-update-selected-client", (e) => {
92
- a.update("x-scalar-default-client", e.detail), E().setItem(x.SELECTED_CLIENT, e.detail);
93
- }), u(
87
+ ), X(r, v), i(
94
88
  () => o.value.defaultHttpClient,
95
89
  (e) => {
96
90
  if (e) {
97
- const { targetKey: t, clientKey: r } = e, l = `${t}/${r}`;
98
- g(l) && a.update("x-scalar-default-client", l);
91
+ const { targetKey: t, clientKey: a } = e, n = `${t}/${a}`;
92
+ D(n) && r.update("x-scalar-default-client", n);
99
93
  }
100
94
  },
101
95
  { immediate: !0 }
102
96
  );
103
- const { toggleColorMode: I, isDarkMode: L } = W({
97
+ const { toggleColorMode: h, isDarkMode: b } = z({
104
98
  initialColorMode: o.value.darkMode ? "dark" : void 0,
105
99
  overrideColorMode: o.value.forceDarkModeState
106
100
  });
107
- u(
101
+ i(
108
102
  () => o.value.darkMode,
109
- (e) => a.update("x-scalar-dark-mode", !!e)
110
- ), u(
111
- () => L.value,
112
- (e) => a.update("x-scalar-dark-mode", e),
103
+ (e) => r.update("x-scalar-dark-mode", !!e)
104
+ ), i(
105
+ () => b.value,
106
+ (e) => r.update("x-scalar-dark-mode", e),
113
107
  { immediate: !0 }
114
- ), u(
115
- () => s.value,
108
+ ), i(
109
+ () => u.value,
116
110
  (e) => {
117
111
  var t;
118
- return a.update(
112
+ return r.update(
119
113
  "x-scalar-active-document",
120
- (t = C.value[e]) == null ? void 0 : t.slug
114
+ (t = p.value[e]) == null ? void 0 : t.slug
121
115
  );
122
116
  },
123
117
  { immediate: !0 }
124
- ), o.value.metaData && j(o.value.metaData);
125
- const N = A(() => o.value.favicon);
126
- return q(N), (e, t) => {
127
- var r;
128
- return k(), B("div", {
118
+ ), o.value.metaData && H(o.value.metaData);
119
+ const T = L(() => o.value.favicon);
120
+ return j(T), (e, t) => {
121
+ var a;
122
+ return k(), V("div", {
129
123
  ref_key: "root",
130
- ref: d
124
+ ref: v
131
125
  }, [
132
- (r = n(o)) != null && r.customCss ? (k(), P(K("style"), { key: 0 }, {
133
- default: i(() => [
134
- F(O(n(o).customCss), 1)
126
+ (a = s(o)) != null && a.customCss ? (k(), A(P("style"), { key: 0 }, {
127
+ default: l(() => [
128
+ U(_(s(o).customCss), 1)
135
129
  ]),
136
130
  _: 1
137
- })) : U("", !0),
138
- D(G, {
139
- configuration: n(o),
140
- isDark: !!n(a).workspace["x-scalar-dark-mode"],
141
- store: n(a),
142
- onToggleDarkMode: t[1] || (t[1] = () => n(I)()),
143
- onUpdateContent: t[2] || (t[2] = (l) => e.$emit("updateContent", l))
131
+ })) : B("", !0),
132
+ C(q, {
133
+ configuration: s(o),
134
+ isDark: !!s(r).workspace["x-scalar-dark-mode"],
135
+ store: s(r),
136
+ onToggleDarkMode: t[1] || (t[1] = () => s(h)()),
137
+ onUpdateContent: t[2] || (t[2] = (n) => e.$emit("updateContent", n))
144
138
  }, {
145
- footer: i(() => [
146
- f(e.$slots, "footer")
139
+ footer: l(() => [
140
+ m(e.$slots, "footer")
147
141
  ]),
148
- "content-end": i(() => [
149
- f(e.$slots, "footer")
142
+ "content-end": l(() => [
143
+ m(e.$slots, "footer")
150
144
  ]),
151
- "document-selector": i(() => [
152
- D(n(ee), {
153
- modelValue: n(s),
154
- "onUpdate:modelValue": t[0] || (t[0] = (l) => Y(s) ? s.value = l : null),
155
- options: n(C)
145
+ "document-selector": l(() => [
146
+ C(s(ee), {
147
+ modelValue: s(u),
148
+ "onUpdate:modelValue": t[0] || (t[0] = (n) => K(u) ? u.value = n : null),
149
+ options: s(p)
156
150
  }, null, 8, ["modelValue", "options"])
157
151
  ]),
158
- "sidebar-start": i(() => [
159
- f(e.$slots, "sidebar-start")
152
+ "sidebar-start": l(() => [
153
+ m(e.$slots, "sidebar-start")
154
+ ]),
155
+ "sidebar-end": l(() => [
156
+ m(e.$slots, "sidebar-end")
160
157
  ]),
161
158
  _: 3
162
159
  }, 8, ["configuration", "isDark", "store"])
@@ -165,5 +162,5 @@ const ke = /* @__PURE__ */ R({
165
162
  }
166
163
  });
167
164
  export {
168
- ke as default
165
+ Ce as default
169
166
  };
@@ -0,0 +1,20 @@
1
+ import { type EnvVariable } from '@scalar/api-client/store';
2
+ import type { Environment } from '@scalar/oas-utils/entities/environment';
3
+ import type { SelectedSecuritySchemeUids } from '@scalar/oas-utils/entities/shared';
4
+ import type { Collection, Operation, Server } from '@scalar/oas-utils/entities/spec';
5
+ import type { Workspace } from '@scalar/oas-utils/entities/workspace';
6
+ type __VLS_Props = {
7
+ collection: Collection;
8
+ environment: Environment;
9
+ envVariables: EnvVariable[];
10
+ layout: 'client' | 'reference';
11
+ operation?: Operation | undefined;
12
+ persistAuth?: boolean;
13
+ selectedSecuritySchemeUids: SelectedSecuritySchemeUids;
14
+ server: Server | undefined;
15
+ title: string;
16
+ workspace: Workspace;
17
+ };
18
+ 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>;
19
+ export default _default;
20
+ //# sourceMappingURL=AuthSelector.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuthSelector.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue"],"names":[],"mappings":"AA4YA,OAAO,EAAgB,KAAK,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAsBzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAA;AACnF,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EAET,MAAM,EACP,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAQrE,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,MAAM,EAAE,QAAQ,GAAG,WAAW,CAAA;IAC9B,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;IACjC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,0BAA0B,EAAE,0BAA0B,CAAA;IACtD,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;;AAwhBF,wBAMG"}
@@ -0,0 +1,7 @@
1
+ import o from "./AuthSelector.vue2.js";
2
+ import "./AuthSelector.vue3.js";
3
+ import t from "../../../../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-6b2a41a3"]]);
5
+ export {
6
+ m as default
7
+ };
@@ -0,0 +1,223 @@
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({
14
+ __name: "AuthSelector",
15
+ props: {
16
+ collection: {},
17
+ environment: {},
18
+ envVariables: {},
19
+ layout: {},
20
+ operation: {},
21
+ persistAuth: { type: Boolean, default: !1 },
22
+ selectedSecuritySchemeUids: {},
23
+ server: {},
24
+ title: {},
25
+ workspace: {}
26
+ },
27
+ setup(a) {
28
+ const { layout: V } = J(), { securitySchemes: d } = P(), q = j(), g = C(null), f = _(), x = C(
29
+ null
30
+ ), E = C(!1), D = v(() => {
31
+ const t = G(a.operation, a.collection);
32
+ return { filteredRequirements: t.filter((o) => Object.keys(o).length), requirements: t };
33
+ }), k = v(() => {
34
+ const { filteredRequirements: t, requirements: e } = D.value;
35
+ if (!e.length)
36
+ return null;
37
+ const l = !e.some(
38
+ (h) => Object.keys(h).length > 1
39
+ ) && t.length < e.length;
40
+ return { icon: l ? "Unlock" : "Lock", text: l ? "Optional" : "Required" };
41
+ }), u = v(
42
+ () => a.selectedSecuritySchemeUids.map((t) => {
43
+ if (Array.isArray(t))
44
+ return Q(t, d);
45
+ const e = d[t ?? ""];
46
+ if (e)
47
+ return X(e);
48
+ }).filter(ie)
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;
55
+ });
56
+ e != null && e.payload && (w((l = y.value) == null ? void 0 : l.$el, "scalar-add-auth-option", {
57
+ payload: e.payload
58
+ }), e.payload.uid && o.push(e.payload.uid)), L(o);
59
+ }
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", {
64
+ uids: t
65
+ }), !a.persistAuth)
66
+ 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)
77
+ );
78
+ } else (o = a.operation) != null && o.uid && w(
79
+ (l = y.value) == null ? void 0 : l.$el,
80
+ "scalar-select-operation-security-schemes",
81
+ {
82
+ operationUid: a.operation.uid,
83
+ uids: t
84
+ }
85
+ );
86
+ };
87
+ function O({ id: t, label: e }) {
88
+ x.value = { id: t, label: e }, f.show();
89
+ }
90
+ const U = (t) => {
91
+ var o;
92
+ if (!t)
93
+ 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;
97
+ });
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), {
114
+ ref_key: "wrapperRef",
115
+ ref: y,
116
+ class: "group/params relative",
117
+ itemCount: u.value.length,
118
+ layout: t.layout,
119
+ "onUpdate:modelValue": e[2] || (e[2] = (o) => E.value = o)
120
+ }, {
121
+ title: m(() => [
122
+ i("div", {
123
+ id: n(q),
124
+ class: "inline-flex items-center gap-0.5 leading-[20px]"
125
+ }, [
126
+ i("span", null, b(t.title), 1),
127
+ k.value ? (c(), S("span", {
128
+ 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)
133
+ ]),
134
+ actions: m(() => [
135
+ i("div", pe, [
136
+ p(n(ee), {
137
+ class: "w-72 text-xs",
138
+ modelValue: u.value,
139
+ multiple: "",
140
+ options: M.value,
141
+ placement: "bottom-end",
142
+ teleport: "",
143
+ onDelete: O,
144
+ "onUpdate:modelValue": B
145
+ }, {
146
+ option: m(({ option: o, selected: l }) => [
147
+ p(n(oe), {
148
+ multiselect: "",
149
+ selected: l
150
+ }, null, 8, ["selected"]),
151
+ i("div", de, b(o.label), 1),
152
+ o.isDeletable ?? (n(V) !== "modal" && t.layout !== "reference") ? (c(), $(n(le), {
153
+ key: 0,
154
+ class: "-m-0.5 shrink-0 p-0.5 opacity-0 group-hover/item:opacity-100",
155
+ icon: n(se),
156
+ label: `Delete ${o.label}`,
157
+ size: "xs",
158
+ onClick: Y((r) => O(o), ["stop"])
159
+ }, null, 8, ["icon", "label", "onClick"])) : I("", !0)
160
+ ]),
161
+ default: m(() => [
162
+ p(n(te), {
163
+ ref_key: "comboboxButtonRef",
164
+ ref: g,
165
+ "aria-describedby": n(q),
166
+ 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
+ fullWidth: "",
168
+ variant: "ghost"
169
+ }, {
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
+ }),
189
+ _: 1
190
+ }, 8, ["aria-describedby"])
191
+ ]),
192
+ _: 1
193
+ }, 8, ["modelValue", "options"])
194
+ ])
195
+ ]),
196
+ default: m(() => [
197
+ p(ce, {
198
+ collection: t.collection,
199
+ envVariables: t.envVariables,
200
+ environment: t.environment,
201
+ layout: t.layout,
202
+ persistAuth: t.persistAuth,
203
+ selectedSchemeOptions: u.value,
204
+ server: t.server,
205
+ workspace: t.workspace
206
+ }, 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
+ })
215
+ }, null, 8, ["scheme", "state"])
216
+ ]),
217
+ _: 1
218
+ }, 8, ["itemCount", "layout"]));
219
+ }
220
+ });
221
+ export {
222
+ we as default
223
+ };
@@ -0,0 +1,21 @@
1
+ import type { SecurityScheme } from '@scalar/oas-utils/entities/spec';
2
+ type __VLS_Props = {
3
+ state: {
4
+ open: boolean;
5
+ show: () => void;
6
+ hide: () => void;
7
+ };
8
+ scheme: {
9
+ id: SecurityScheme['uid'];
10
+ label: string;
11
+ } | null;
12
+ };
13
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
14
+ delete: () => any;
15
+ close: () => any;
16
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
17
+ onDelete?: (() => any) | undefined;
18
+ onClose?: (() => any) | undefined;
19
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
20
+ export default _default;
21
+ //# sourceMappingURL=DeleteRequestAuthModal.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeleteRequestAuthModal.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue"],"names":[],"mappings":"AAyDA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAIrE,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE;QAAE,IAAI,EAAE,OAAO,CAAC;QAAC,IAAI,EAAE,MAAM,IAAI,CAAC;QAAC,IAAI,EAAE,MAAM,IAAI,CAAA;KAAE,CAAA;IAC5D,MAAM,EAAE;QAAE,EAAE,EAAE,cAAc,CAAC,KAAK,CAAC,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;CAC5D,CAAC;;;;;;;;AAqJF,wBAOG"}
@@ -0,0 +1,64 @@
1
+ import { defineComponent as _, useTemplateRef as b, createBlock as y, openBlock as w, unref as s, withCtx as n, createElementVNode as i, toDisplayString as m, createVNode as u, createTextVNode as p } from "vue";
2
+ import { ScalarModal as C, ScalarButton as d } from "@scalar/components";
3
+ import { emitCustomEvent as S } from "@scalar/workspace-store/events";
4
+ const g = { class: "text-c-2 mb-4 text-sm leading-normal" }, k = { class: "flex justify-between gap-2" }, B = /* @__PURE__ */ _({
5
+ __name: "DeleteRequestAuthModal",
6
+ props: {
7
+ state: {},
8
+ scheme: {}
9
+ },
10
+ emits: ["close", "delete"],
11
+ setup(f, { emit: h }) {
12
+ const l = f, r = h, x = () => {
13
+ var t, e;
14
+ (t = l.scheme) != null && t.id && S((e = a.value) == null ? void 0 : e.$el, "scalar-delete-security-scheme", {
15
+ uid: l.scheme.id
16
+ }), r("delete");
17
+ }, a = b("wrapperRef");
18
+ return (t, e) => (w(), y(s(C), {
19
+ ref_key: "wrapperRef",
20
+ ref: a,
21
+ size: "xxs",
22
+ state: t.state,
23
+ title: "Delete Security Scheme"
24
+ }, {
25
+ default: n(() => {
26
+ var c;
27
+ return [
28
+ i("p", g, " This cannot be undone. You're about to delete the " + m((c = t.scheme) == null ? void 0 : c.label) + " security scheme from the collection. ", 1),
29
+ i("div", k, [
30
+ u(s(d), {
31
+ class: "flex h-8 cursor-pointer items-center gap-1.5 px-3 shadow-none focus:outline-none",
32
+ type: "button",
33
+ variant: "outlined",
34
+ onClick: e[0] || (e[0] = (o) => r("close"))
35
+ }, {
36
+ default: n(() => e[1] || (e[1] = [
37
+ p(" Cancel ")
38
+ ])),
39
+ _: 1,
40
+ __: [1]
41
+ }),
42
+ u(s(d), {
43
+ class: "flex h-8 cursor-pointer items-center gap-1.5 px-3 shadow-none focus:outline-none",
44
+ type: "submit",
45
+ onClick: x
46
+ }, {
47
+ default: n(() => {
48
+ var o;
49
+ return [
50
+ p(" Delete " + m((o = t.scheme) == null ? void 0 : o.label), 1)
51
+ ];
52
+ }),
53
+ _: 1
54
+ })
55
+ ])
56
+ ];
57
+ }),
58
+ _: 1
59
+ }, 8, ["state"]));
60
+ }
61
+ });
62
+ export {
63
+ B as default
64
+ };