@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
@@ -1,21 +1,22 @@
1
- import { defineComponent as N, computed as m, ref as g, watch as z, useId as D, createBlock as S, createCommentVNode as b, openBlock as f, unref as o, withCtx as c, createVNode as n, createSlots as H, createElementVNode as v, createElementBlock as q, renderSlot as h, toDisplayString as K } from "vue";
2
- import { ScalarCard as $, ScalarCardHeader as M, ScalarCombobox as W, ScalarButton as F, ScalarCardSection as E, ScalarCodeBlock as U, ScalarCardFooter as A } from "@scalar/components";
3
- import { freezeElement as G } from "@scalar/helpers/dom/freeze-element";
4
- import { ScalarIconCaretDown as J } from "@scalar/icons";
5
- import { getResolvedRef as P } from "@scalar/workspace-store/helpers/get-resolved-ref";
6
- import { getResolvedRefDeep as Q } from "../../../../features/example-responses/helpers/get-resolved-ref-deep.js";
7
- import { findClient as V } from "../helpers/find-client.js";
8
- import { generateCustomId as T } from "../helpers/generate-client-options.js";
9
- import { generateCodeSnippet as X } from "../helpers/generate-code-snippet.js";
10
- import { getSecrets as Y } from "../helpers/get-secrets.js";
11
- import Z from "./ExamplePicker.vue2.js";
12
- import B from "../../../../components/HttpMethod/HttpMethod.vue.js";
13
- import { emitCustomEvent as O } from "../../../events/definitions.js";
14
- const _ = ["innerHTML"], ee = { class: "text-base font-normal" }, te = ["id"], le = {
1
+ import { defineComponent as F, computed as i, ref as x, watch as U, useId as T, createBlock as q, createCommentVNode as C, openBlock as h, unref as a, withCtx as r, createVNode as n, createSlots as A, createElementVNode as b, createElementBlock as V, renderSlot as k, toDisplayString as G } from "vue";
2
+ import { ScalarCard as W, ScalarCardHeader as J, ScalarCombobox as P, ScalarButton as Q, ScalarCardSection as j, ScalarCodeBlock as X, ScalarCardFooter as Y } from "@scalar/components";
3
+ import { freezeElement as Z } from "@scalar/helpers/dom/freeze-element";
4
+ import { ScalarIconCaretDown as _ } from "@scalar/icons";
5
+ import { operationToHar as ee } from "@scalar/oas-utils/helpers/operation-to-har";
6
+ import { emitCustomEvent as w } from "@scalar/workspace-store/events";
7
+ import { getResolvedRef as te } from "@scalar/workspace-store/helpers/get-resolved-ref";
8
+ import { getResolvedRefDeep as E } from "../../../../features/example-responses/helpers/get-resolved-ref-deep.js";
9
+ import { findClient as L } from "../helpers/find-client.js";
10
+ import { generateCustomId as O } from "../helpers/generate-client-options.js";
11
+ import { generateCodeSnippet as le } from "../helpers/generate-code-snippet.js";
12
+ import { getSecrets as oe } from "../helpers/get-secrets.js";
13
+ import ae from "./ExamplePicker.vue2.js";
14
+ import R from "../../../../components/HttpMethod/HttpMethod.vue.js";
15
+ const se = ["innerHTML"], ne = { class: "text-base font-normal" }, re = ["id"], ue = {
15
16
  key: 0,
16
17
  class: "request-card-footer-addon"
17
- }, ae = { class: "request-header" }, oe = {}, ye = /* @__PURE__ */ N({
18
- ...oe,
18
+ }, ie = { class: "request-header" }, ce = {}, $e = /* @__PURE__ */ F({
19
+ ...ce,
19
20
  __name: "RequestExample",
20
21
  props: {
21
22
  clientOptions: {},
@@ -28,122 +29,139 @@ const _ = ["innerHTML"], ee = { class: "text-base font-normal" }, te = ["id"], l
28
29
  path: {},
29
30
  operation: {},
30
31
  fallback: { type: Boolean },
31
- generateLabel: { type: Function }
32
+ generateLabel: { type: Function },
33
+ isWebhook: { type: Boolean }
32
34
  },
33
- setup(a) {
34
- const u = m(() => {
35
- var s, r;
36
- const t = ((s = P(a.operation.requestBody)) == null ? void 0 : s.content) ?? {}, e = a.selectedContentType || Object.keys(t)[0];
37
- return ((r = t[e]) == null ? void 0 : r.examples) ?? {};
38
- }), C = g(
39
- a.selectedExample ?? Object.keys(u.value)[0]
40
- ), y = m(() => [
35
+ setup(l) {
36
+ const c = i(() => {
37
+ var s, f;
38
+ const e = ((s = te(l.operation.requestBody)) == null ? void 0 : s.content) ?? {}, t = l.selectedContentType || Object.keys(e)[0];
39
+ return ((f = e[t]) == null ? void 0 : f.examples) ?? {};
40
+ }), v = x(
41
+ l.selectedExample ?? Object.keys(c.value)[0]
42
+ ), g = i(() => [
41
43
  "x-custom-examples",
42
44
  "x-codeSamples",
43
45
  "x-code-samples"
44
- ].flatMap((e) => a.operation[e] ?? [])), p = m(() => y.value.length ? [
46
+ ].flatMap((t) => l.operation[t] ?? [])), p = i(() => g.value.length ? [
45
47
  {
46
48
  label: "Code Examples",
47
- options: y.value.map((e) => {
48
- const l = T(e), s = e.label || e.lang || l;
49
+ options: g.value.map((t) => {
50
+ const o = O(t), s = t.label || t.lang || o;
49
51
  return {
50
- id: l,
51
- lang: e.lang || "plaintext",
52
+ id: o,
53
+ lang: t.lang || "plaintext",
52
54
  title: s,
53
55
  label: s
54
56
  };
55
57
  })
56
58
  },
57
- ...a.clientOptions
58
- ] : a.clientOptions), d = g(
59
- V(p.value, a.selectedClient) ?? null
59
+ ...l.clientOptions
60
+ ] : l.clientOptions), u = x(
61
+ L(p.value, l.selectedClient) ?? null
60
62
  );
61
- z(
62
- () => a.selectedClient,
63
- (t) => {
64
- const e = V(p.value, t);
65
- e && (d.value = e);
63
+ U(
64
+ () => l.selectedClient,
65
+ (e) => {
66
+ const t = L(p.value, e);
67
+ t && (u.value = t);
66
68
  }
67
69
  );
68
- const k = m(() => {
69
- var t, e, l;
70
+ const y = i(() => {
71
+ if (!l.isWebhook) return null;
70
72
  try {
71
- if ((t = d.value) != null && t.id.startsWith("custom"))
72
- return ((e = y.value.find(
73
- (I) => {
74
- var x;
75
- return T(I) === ((x = d.value) == null ? void 0 : x.id);
73
+ const e = c.value[v.value || ""], t = E(e), o = (t == null ? void 0 : t.value) ?? (t == null ? void 0 : t.summary);
74
+ return ee({ operation: l.operation, method: l.method, path: l.path, example: o });
75
+ } catch (e) {
76
+ return console.error("[webhookHar]", e), null;
77
+ }
78
+ }), $ = i(() => {
79
+ var e, t, o, s, f;
80
+ try {
81
+ if ((e = u.value) != null && e.id.startsWith("custom"))
82
+ return ((t = g.value.find(
83
+ (M) => {
84
+ var B;
85
+ return O(M) === ((B = u.value) == null ? void 0 : B.id);
76
86
  }
77
- )) == null ? void 0 : e.source) ?? "Custom example not found";
78
- const s = u.value[C.value || ""], r = Q(s), j = (r == null ? void 0 : r.value) ?? (r == null ? void 0 : r.summary);
79
- return X({
80
- clientId: (l = d.value) == null ? void 0 : l.id,
81
- operation: a.operation,
82
- method: a.method,
83
- server: a.selectedServer,
84
- securitySchemes: a.securitySchemes,
85
- contentType: a.selectedContentType,
86
- path: a.path,
87
- example: j
87
+ )) == null ? void 0 : t.source) ?? "Custom example not found";
88
+ const S = c.value[v.value || ""], d = E(S), K = (d == null ? void 0 : d.value) ?? (d == null ? void 0 : d.summary);
89
+ return l.isWebhook ? ((s = (o = y.value) == null ? void 0 : o.postData) == null ? void 0 : s.text) ?? "" : le({
90
+ clientId: (f = u.value) == null ? void 0 : f.id,
91
+ operation: l.operation,
92
+ method: l.method,
93
+ server: l.selectedServer,
94
+ securitySchemes: l.securitySchemes,
95
+ contentType: l.selectedContentType,
96
+ path: l.path,
97
+ example: K
88
98
  });
89
- } catch (s) {
90
- return console.error("[generateSnippet]", s), "";
99
+ } catch (S) {
100
+ return console.error("[generateSnippet]", S), "";
91
101
  }
92
- }), R = m(() => Y(a.securitySchemes)), i = g(null), w = (t) => {
102
+ }), D = i(() => {
93
103
  var e;
94
- if (i.value) {
95
- const l = G(i.value.$el);
104
+ return l.isWebhook ? H.value : (e = u.value) == null ? void 0 : e.lang;
105
+ }), H = i(() => {
106
+ var t;
107
+ if (!((t = y.value) != null && t.postData)) return "json";
108
+ const e = y.value.postData.mimeType;
109
+ return e != null && e.includes("json") ? "json" : e != null && e.includes("xml") ? "xml" : e != null && e.includes("yaml") || e != null && e.includes("yml") ? "yaml" : e != null && e.includes("text/plain") ? "text" : "json";
110
+ }), I = i(() => oe(l.securitySchemes)), m = x(null), N = (e) => {
111
+ var t;
112
+ if (m.value) {
113
+ const o = Z(m.value.$el);
96
114
  setTimeout(() => {
97
- l();
115
+ o();
98
116
  }, 300);
99
117
  }
100
- d.value = t, t.id.startsWith("custom") || O((e = i.value) == null ? void 0 : e.$el, "scalar-update-selected-client", t.id);
101
- }, L = D();
102
- return (t, e) => k.value ? (f(), S(o($), {
118
+ u.value = e, e.id.startsWith("custom") || w((t = m.value) == null ? void 0 : t.$el, "scalar-update-selected-client", e.id);
119
+ }, z = T();
120
+ return (e, t) => $.value ? (h(), q(a(W), {
103
121
  key: 0,
104
- class: "request-card dark-mode",
105
122
  ref_key: "elem",
106
- ref: i
123
+ ref: m,
124
+ class: "request-card dark-mode"
107
125
  }, {
108
- default: c(() => [
109
- n(o(M), { class: "pr-2.5" }, H({
110
- default: c(() => [
111
- e[3] || (e[3] = v("span", { class: "sr-only" }, "Request Example for", -1)),
112
- n(o(B), {
126
+ default: r(() => [
127
+ n(a(J), { class: "pr-2.5" }, A({
128
+ default: r(() => [
129
+ t[3] || (t[3] = b("span", { class: "sr-only" }, "Request Example for", -1)),
130
+ n(a(R), {
113
131
  as: "span",
114
132
  class: "request-method",
115
- method: t.method
133
+ method: e.method
116
134
  }, null, 8, ["method"]),
117
- t.generateLabel ? (f(), q("span", {
135
+ e.generateLabel ? (h(), V("span", {
118
136
  key: 0,
119
- innerHTML: t.generateLabel()
120
- }, null, 8, _)) : h(t.$slots, "header", { key: 1 }, void 0, !0)
137
+ innerHTML: e.generateLabel()
138
+ }, null, 8, se)) : e.isWebhook ? C("", !0) : k(e.$slots, "header", { key: 1 }, void 0, !0)
121
139
  ]),
122
140
  _: 2
123
141
  }, [
124
- p.value.length ? {
142
+ !e.isWebhook && p.value.length ? {
125
143
  name: "actions",
126
- fn: c(() => [
127
- n(o(W), {
144
+ fn: r(() => [
145
+ n(a(P), {
128
146
  class: "max-h-80",
129
- modelValue: d.value,
147
+ modelValue: u.value,
130
148
  options: p.value,
131
- teleport: "",
132
149
  placement: "bottom-end",
133
- "onUpdate:modelValue": e[0] || (e[0] = (l) => w(l))
150
+ teleport: "",
151
+ "onUpdate:modelValue": t[0] || (t[0] = (o) => N(o))
134
152
  }, {
135
- default: c(() => [
136
- n(o(F), {
137
- "data-testid": "client-picker",
153
+ default: r(() => [
154
+ n(a(Q), {
138
155
  class: "text-c-2 hover:text-c-1 flex h-full w-fit gap-1.5 px-0.5",
156
+ "data-testid": "client-picker",
139
157
  fullWidth: "",
140
158
  variant: "ghost"
141
159
  }, {
142
- default: c(() => [
143
- v("span", ee, K(d.value.title), 1),
144
- n(o(J), {
145
- weight: "bold",
146
- class: "ui-open:rotate-180 mt-0.25 size-3 transition-transform duration-100"
160
+ default: r(() => [
161
+ b("span", ne, G(u.value.title), 1),
162
+ n(a(_), {
163
+ class: "ui-open:rotate-180 mt-0.25 size-3 transition-transform duration-100",
164
+ weight: "bold"
147
165
  })
148
166
  ]),
149
167
  _: 1
@@ -155,74 +173,71 @@ const _ = ["innerHTML"], ee = { class: "text-base font-normal" }, te = ["id"], l
155
173
  key: "0"
156
174
  } : void 0
157
175
  ]), 1024),
158
- n(o(E), { class: "request-editor-section custom-scroll p-0" }, {
159
- default: c(() => {
160
- var l;
161
- return [
162
- v("div", {
163
- id: `${o(L)}-example`,
164
- class: "code-snippet"
165
- }, [
166
- n(o(U), {
167
- class: "bg-b-2 !min-h-full -outline-offset-2",
168
- content: k.value,
169
- hideCredentials: R.value,
170
- lang: (l = d.value) == null ? void 0 : l.lang,
171
- lineNumbers: ""
172
- }, null, 8, ["content", "hideCredentials", "lang"])
173
- ], 8, te)
174
- ];
175
- }),
176
+ n(a(j), { class: "request-editor-section custom-scroll p-0" }, {
177
+ default: r(() => [
178
+ b("div", {
179
+ id: `${a(z)}-example`,
180
+ class: "code-snippet"
181
+ }, [
182
+ n(a(X), {
183
+ class: "bg-b-2 !min-h-full -outline-offset-2",
184
+ content: $.value,
185
+ hideCredentials: I.value,
186
+ lang: D.value,
187
+ lineNumbers: ""
188
+ }, null, 8, ["content", "hideCredentials", "lang"])
189
+ ], 8, re)
190
+ ]),
176
191
  _: 1
177
192
  }),
178
- Object.keys(u.value).length || t.$slots.footer ? (f(), S(o(A), {
193
+ Object.keys(c.value).length || e.$slots.footer ? (h(), q(a(Y), {
179
194
  key: 0,
180
195
  class: "request-card-footer bg-b-3"
181
196
  }, {
182
- default: c(() => [
183
- Object.keys(u.value).length ? (f(), q("div", le, [
184
- n(Z, {
185
- examples: u.value,
186
- modelValue: C.value,
197
+ default: r(() => [
198
+ Object.keys(c.value).length ? (h(), V("div", ue, [
199
+ n(ae, {
200
+ modelValue: v.value,
187
201
  "onUpdate:modelValue": [
188
- e[1] || (e[1] = (l) => C.value = l),
189
- e[2] || (e[2] = (l) => {
202
+ t[1] || (t[1] = (o) => v.value = o),
203
+ t[2] || (t[2] = (o) => {
190
204
  var s;
191
- return o(O)((s = i.value) == null ? void 0 : s.$el, "scalar-update-selected-example", l);
205
+ return a(w)((s = m.value) == null ? void 0 : s.$el, "scalar-update-selected-example", o);
192
206
  })
193
- ]
194
- }, null, 8, ["examples", "modelValue"])
195
- ])) : b("", !0),
196
- h(t.$slots, "footer", {}, void 0, !0)
207
+ ],
208
+ examples: c.value
209
+ }, null, 8, ["modelValue", "examples"])
210
+ ])) : C("", !0),
211
+ k(e.$slots, "footer", {}, void 0, !0)
197
212
  ]),
198
213
  _: 3
199
- })) : b("", !0)
214
+ })) : C("", !0)
200
215
  ]),
201
216
  _: 3
202
- }, 512)) : t.fallback ? (f(), S(o($), {
217
+ }, 512)) : e.fallback ? (h(), q(a(W), {
203
218
  key: 1,
204
219
  class: "request-card dark-mode"
205
220
  }, {
206
- default: c(() => [
207
- n(o(E), { class: "request-card-simple" }, {
208
- default: c(() => [
209
- v("div", ae, [
210
- n(o(B), {
221
+ default: r(() => [
222
+ n(a(j), { class: "request-card-simple" }, {
223
+ default: r(() => [
224
+ b("div", ie, [
225
+ n(a(R), {
211
226
  as: "span",
212
227
  class: "request-method",
213
- method: t.method
228
+ method: e.method
214
229
  }, null, 8, ["method"]),
215
- h(t.$slots, "header", {}, void 0, !0)
230
+ k(e.$slots, "header", {}, void 0, !0)
216
231
  ]),
217
- h(t.$slots, "footer", {}, void 0, !0)
232
+ k(e.$slots, "footer", {}, void 0, !0)
218
233
  ]),
219
234
  _: 3
220
235
  })
221
236
  ]),
222
237
  _: 3
223
- })) : b("", !0);
238
+ })) : C("", !0);
224
239
  }
225
240
  });
226
241
  export {
227
- ye as default
242
+ $e as default
228
243
  };
@@ -1 +1 @@
1
- {"version":3,"file":"find-client.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-request-example-block/helpers/find-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAA;AACrG,OAAO,EAAqB,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAE3E,eAAO,MAAM,cAAc,eAAe,CAAA;AAE1C,2DAA2D;AAC3D,eAAO,MAAM,QAAQ,OAAQ,GAAG,KAAG,EAAE,IAAI,gBAAgB,CAAC,MAAM,CAAmC,CAAA;AAEnG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,UAAU,iBACP,iBAAiB,EAAE,aACtB,gBAAgB,CAAC,MAAM,CAAC,GAAG,SAAS,KAC9C,YAwBF,CAAA"}
1
+ {"version":3,"file":"find-client.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-request-example-block/helpers/find-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAA;AACrG,OAAO,EAAqB,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAE3E,eAAO,MAAM,cAAc,eAAe,CAAA;AAE1C,2DAA2D;AAC3D,eAAO,MAAM,QAAQ,GAAI,IAAI,GAAG,KAAG,EAAE,IAAI,gBAAgB,CAAC,MAAM,CAAmC,CAAA;AAEnG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,UAAU,GACrB,cAAc,iBAAiB,EAAE,EACjC,WAAW,gBAAgB,CAAC,MAAM,CAAC,GAAG,SAAS,KAC9C,YAwBF,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"generate-client-options.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-request-example-block/helpers/generate-client-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAA;AACvF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAA;AAE3E,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAG5E,uDAAuD;AACvD,eAAO,MAAM,gBAAgB,YAAa,WAAW,WAA6B,CAAA;AAElF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,qBAAqB,kBACjB,yBAAyB,CAAC,eAAe,CAAC,KACxD,iBAAiB,EAwDnB,CAAA"}
1
+ {"version":3,"file":"generate-client-options.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-request-example-block/helpers/generate-client-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAA;AACvF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAA;AAE3E,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAG5E,uDAAuD;AACvD,eAAO,MAAM,gBAAgB,GAAI,SAAS,WAAW,WAA6B,CAAA;AAElF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,qBAAqB,GAChC,eAAe,yBAAyB,CAAC,eAAe,CAAC,KACxD,iBAAiB,EAwDnB,CAAA"}
@@ -1,8 +1,6 @@
1
1
  import type { AvailableClients } from '@scalar/snippetz';
2
- import type { OperationObject } from '@scalar/workspace-store/schemas/v3.1/strict/path-operations';
3
- import type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/server';
4
- import type { SecuritySchemeObject } from '@scalar/workspace-store/schemas/v3.1/strict/security-scheme';
5
2
  import type { HttpMethod } from '@scalar/helpers/http/http-methods';
3
+ import type { ServerObject, OperationObject, SecuritySchemeObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
6
4
  type Props = {
7
5
  clientId: AvailableClients[number];
8
6
  operation: OperationObject;
@@ -1 +1 @@
1
- {"version":3,"file":"generate-code-snippet.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAsB,MAAM,kBAAkB,CAAA;AAE5E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6DAA6D,CAAA;AAClG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oDAAoD,CAAA;AAEtF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6DAA6D,CAAA;AACvG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAEnE,KAAK,KAAK,GAAG;IACX,QAAQ,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAA;IAClC,SAAS,EAAE,eAAe,CAAA;IAC1B,OAAO,EAAE,OAAO,CAAA;IAChB,MAAM,EAAE,UAAU,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAChC,MAAM,CAAC,EAAE,YAAY,GAAG,SAAS,CAAA;IACjC,eAAe,CAAC,EAAE,oBAAoB,EAAE,GAAG,SAAS,CAAA;CACrD,CAAA;AAED,sEAAsE;AACtE,eAAO,MAAM,mBAAmB,0FAS7B,KAAK,KAAG,MAmBV,CAAA"}
1
+ {"version":3,"file":"generate-code-snippet.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAsB,MAAM,kBAAkB,CAAA;AAG5E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AACnE,OAAO,KAAK,EACV,YAAY,EACZ,eAAe,EACf,oBAAoB,EACrB,MAAM,8DAA8D,CAAA;AAErE,KAAK,KAAK,GAAG;IACX,QAAQ,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAA;IAClC,SAAS,EAAE,eAAe,CAAA;IAC1B,OAAO,EAAE,OAAO,CAAA;IAChB,MAAM,EAAE,UAAU,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAChC,MAAM,CAAC,EAAE,YAAY,GAAG,SAAS,CAAA;IACjC,eAAe,CAAC,EAAE,oBAAoB,EAAE,GAAG,SAAS,CAAA;CACrD,CAAA;AAED,sEAAsE;AACtE,eAAO,MAAM,mBAAmB,GAAI,uFASjC,KAAK,KAAG,MAmBV,CAAA"}
@@ -1,4 +1,4 @@
1
- import type { SecuritySchemeObject } from '@scalar/workspace-store/schemas/v3.1/strict/security-scheme';
1
+ import type { SecuritySchemeObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
2
2
  /** Extract secrets from security schemes */
3
3
  export declare const getSecrets: (securitySchemes: SecuritySchemeObject[]) => string[];
4
4
  //# sourceMappingURL=get-secrets.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-secrets.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-request-example-block/helpers/get-secrets.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6DAA6D,CAAA;AAEvG,4CAA4C;AAC5C,eAAO,MAAM,UAAU,oBAAqB,oBAAoB,EAAE,KAAG,MAAM,EAqBrD,CAAA"}
1
+ {"version":3,"file":"get-secrets.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-request-example-block/helpers/get-secrets.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8DAA8D,CAAA;AAGxG,4CAA4C;AAC5C,eAAO,MAAM,UAAU,GAAI,iBAAiB,oBAAoB,EAAE,KAAG,MAAM,EAqBrD,CAAA"}
@@ -1,10 +1,11 @@
1
1
  import { isDefined as o } from "@scalar/helpers/array/is-defined";
2
- const e = (t) => t.flatMap((r) => r.type === "apiKey" ? r["x-scalar-secret-token"] : (r == null ? void 0 : r.type) === "http" ? [
2
+ import { encode as s } from "js-base64";
3
+ const p = (t) => t.flatMap((r) => r.type === "apiKey" ? r["x-scalar-secret-token"] : (r == null ? void 0 : r.type) === "http" ? [
3
4
  r["x-scalar-secret-token"],
4
5
  r["x-scalar-secret-username"],
5
6
  r["x-scalar-secret-password"],
6
- btoa(`${r["x-scalar-secret-username"]}:${r["x-scalar-secret-password"]}`)
7
+ s(`${r["x-scalar-secret-username"]}:${r["x-scalar-secret-password"]}`)
7
8
  ] : r.type === "oauth2" ? Object.values(r.flows).map((a) => a["x-scalar-secret-token"]) : []).filter(o);
8
9
  export {
9
- e as getSecrets
10
+ p as getSecrets
10
11
  };
@@ -0,0 +1,51 @@
1
+ import type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
2
+ type __VLS_Props = {
3
+ /** The selected server URL */
4
+ xSelectedServer?: string;
5
+ /** Available servers */
6
+ servers: ServerObject[];
7
+ /** The id of the target to use for the popover (e.g. address bar) */
8
+ target: string;
9
+ };
10
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {
11
+ server: import("vue").ComputedRef<{
12
+ description?: string | undefined;
13
+ variables?: {
14
+ [x: string]: {
15
+ default?: string | undefined;
16
+ description?: string | undefined;
17
+ enum?: string[] | undefined;
18
+ };
19
+ } | undefined;
20
+ url: string;
21
+ } | undefined>;
22
+ servers: {
23
+ description?: string | undefined;
24
+ variables?: {
25
+ [x: string]: {
26
+ default?: string | undefined;
27
+ description?: string | undefined;
28
+ enum?: string[] | undefined;
29
+ };
30
+ } | undefined;
31
+ url: string;
32
+ }[];
33
+ serverUrlWithoutTrailingSlash: import("vue").ComputedRef<string>;
34
+ serverOptions: import("vue").ComputedRef<{
35
+ id: string;
36
+ label: string;
37
+ }[]>;
38
+ selectedServer: import("vue").WritableComputedRef<{
39
+ id: string;
40
+ label: string;
41
+ } | undefined, {
42
+ id: string;
43
+ label: string;
44
+ } | undefined>;
45
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
46
+ "update:modelValue": (value: string) => any;
47
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
48
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
49
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
50
+ export default _default;
51
+ //# sourceMappingURL=Selector.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Selector.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-server-selector-block/components/Selector.vue"],"names":[],"mappings":"AAuFA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAGhG,KAAK,WAAW,GAAG;IACjB,8BAA8B;IAC9B,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,wBAAwB;IACxB,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,qEAAqE;IACrE,MAAM,EAAE,MAAM,CAAA;CACf,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgMF,wBAQG"}
@@ -0,0 +1,78 @@
1
+ import { defineComponent as S, computed as l, createBlock as w, createElementBlock as b, openBlock as d, unref as u, withCtx as c, createVNode as v, createElementVNode as o, toDisplayString as m } from "vue";
2
+ import { ScalarListbox as h, ScalarButton as y } from "@scalar/components";
3
+ import { ScalarIconCaretDown as V } from "@scalar/icons";
4
+ const k = { class: "overflow-x-auto" }, B = {
5
+ key: 1,
6
+ class: "text-c-1 flex h-auto w-full items-center gap-0.75 rounded-b-lg px-3 py-1.5 text-base leading-[20px] whitespace-nowrap"
7
+ }, C = { class: "overflow-x-auto" }, N = /* @__PURE__ */ S({
8
+ __name: "Selector",
9
+ props: {
10
+ xSelectedServer: {},
11
+ servers: {},
12
+ target: {}
13
+ },
14
+ emits: ["update:modelValue"],
15
+ setup(r, { expose: p, emit: f }) {
16
+ const x = f, a = l(
17
+ () => r.servers.map((e) => ({
18
+ id: e.url,
19
+ label: e.url
20
+ }))
21
+ ), i = l(() => r.servers.find((e) => e.url === r.xSelectedServer)), s = l(
22
+ () => {
23
+ var e, t;
24
+ return ((t = (e = i.value) == null ? void 0 : e.url) == null ? void 0 : t.replace(/\/$/, "")) || "";
25
+ }
26
+ ), n = l({
27
+ get: () => {
28
+ if (r.xSelectedServer && a.value.length > 0)
29
+ return a.value.find((e) => e.id === r.xSelectedServer);
30
+ },
31
+ set: (e) => {
32
+ e && x("update:modelValue", e.id);
33
+ }
34
+ });
35
+ return p({
36
+ server: i,
37
+ servers: r.servers,
38
+ serverUrlWithoutTrailingSlash: s,
39
+ serverOptions: a,
40
+ selectedServer: n
41
+ }), (e, t) => a.value.length > 1 ? (d(), w(u(h), {
42
+ key: 0,
43
+ ref: "elem",
44
+ modelValue: n.value,
45
+ "onUpdate:modelValue": t[0] || (t[0] = (g) => n.value = g),
46
+ class: "group",
47
+ options: a.value,
48
+ placement: "bottom-start",
49
+ resize: "",
50
+ target: e.target
51
+ }, {
52
+ default: c(() => [
53
+ v(u(y), {
54
+ class: "bg-b-1 text-c-1 h-auto w-full justify-start gap-1.5 overflow-x-auto rounded-t-none rounded-b-lg px-3 py-1.5 text-base font-normal whitespace-nowrap -outline-offset-1",
55
+ variant: "ghost"
56
+ }, {
57
+ default: c(() => [
58
+ t[1] || (t[1] = o("span", { class: "sr-only" }, "Server:", -1)),
59
+ o("span", k, m(s.value), 1),
60
+ v(u(V), {
61
+ class: "text-c-2 ui-open:rotate-180 mt-0.25 size-3 transition-transform duration-100",
62
+ weight: "bold"
63
+ })
64
+ ]),
65
+ _: 1,
66
+ __: [1]
67
+ })
68
+ ]),
69
+ _: 1
70
+ }, 8, ["modelValue", "options", "target"])) : (d(), b("div", B, [
71
+ t[2] || (t[2] = o("span", { class: "sr-only" }, "Server:", -1)),
72
+ o("span", C, m(s.value), 1)
73
+ ]));
74
+ }
75
+ });
76
+ export {
77
+ N as default
78
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./Selector.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,18 @@
1
+ import type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
2
+ export type SelectorProps = {
3
+ /** The selected server URL */
4
+ xSelectedServer?: string;
5
+ /** Available servers */
6
+ servers: ServerObject[];
7
+ };
8
+ /**
9
+ * ServerSelector
10
+ *
11
+ * Core component for rendering a server selector block.
12
+ * Handles server selection and emits a 'scalar-update-selected-server' event when the selected server changes.
13
+ *
14
+ * @event scalar-update-selected-server - Emitted when the selected server changes
15
+ */
16
+ declare const _default: import("vue").DefineComponent<SelectorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SelectorProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
+ export default _default;
18
+ //# sourceMappingURL=ServerSelector.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ServerSelector.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-server-selector-block/components/ServerSelector.vue"],"names":[],"mappings":"AAgHA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAOhG,MAAM,MAAM,aAAa,GAAG;IAC1B,8BAA8B;IAC9B,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,wBAAwB;IACxB,OAAO,EAAE,YAAY,EAAE,CAAA;CACxB,CAAA;AAED;;;;;;;GAOG;;AACH,wBA+KC"}