@scalar/api-reference 1.48.8 → 1.49.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 (381) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/dist/AgentScalarChatInterface-MUbtSqMw.js +41 -0
  3. package/dist/AgentScalarChatInterface-MUbtSqMw.js.map +1 -0
  4. package/dist/ExternalDocs-phu7GxpZ.js +272 -0
  5. package/dist/ExternalDocs-phu7GxpZ.js.map +1 -0
  6. package/dist/MobileHeader-B71jYJdT.js +1373 -0
  7. package/dist/MobileHeader-B71jYJdT.js.map +1 -0
  8. package/dist/Operation-CixLVfKd.js +3827 -0
  9. package/dist/Operation-CixLVfKd.js.map +1 -0
  10. package/dist/SearchButton-xzhIpMCZ.js +621 -0
  11. package/dist/SearchButton-xzhIpMCZ.js.map +1 -0
  12. package/dist/ServerSelector-5y29y2BJ.js +852 -0
  13. package/dist/ServerSelector-5y29y2BJ.js.map +1 -0
  14. package/dist/blocks/index.js +3 -10
  15. package/dist/blocks/scalar-client-selector-block/index.d.ts +1 -1
  16. package/dist/blocks/scalar-info-block/index.d.ts +2 -2
  17. package/dist/blocks/scalar-server-selector-block/index.d.ts +1 -1
  18. package/dist/browser/standalone.js +40748 -34662
  19. package/dist/browser/webpack-stats.json +1 -1
  20. package/dist/components/AgentScalar/index.d.ts +3 -3
  21. package/dist/components/Anchor/index.d.ts +2 -2
  22. package/dist/components/ApiReference.vue.d.ts.map +1 -1
  23. package/dist/components/Badge/index.d.ts +1 -1
  24. package/dist/components/Content/Auth/index.d.ts +1 -1
  25. package/dist/components/Content/Content.vue.d.ts +2 -4
  26. package/dist/components/Content/Content.vue.d.ts.map +1 -1
  27. package/dist/components/Content/Models/ModelTag.vue.d.ts +3 -3
  28. package/dist/components/Content/Models/ModelTag.vue.d.ts.map +1 -1
  29. package/dist/components/Content/Models/index.d.ts +2 -2
  30. package/dist/components/Content/Operations/TraversedEntry.vue.d.ts.map +1 -1
  31. package/dist/components/Content/Schema/Schema.vue.d.ts +1 -1
  32. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts +2 -2
  33. package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts +1 -1
  34. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +1 -1
  35. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  36. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.d.ts.map +1 -1
  37. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
  38. package/dist/components/Content/Schema/helpers/get-compositions-to-render.d.ts +1 -1
  39. package/dist/components/Content/Schema/index.d.ts +4 -4
  40. package/dist/components/Content/Tags/components/ModernLayout.vue.d.ts +2 -2
  41. package/dist/components/Content/Tags/components/ModernLayout.vue.d.ts.map +1 -1
  42. package/dist/components/Content/Tags/index.d.ts +1 -1
  43. package/dist/components/Content/index.d.ts +2 -2
  44. package/dist/components/HttpMethod/index.d.ts +1 -1
  45. package/dist/components/Lazy/Lazy.vue.d.ts +3 -0
  46. package/dist/components/Lazy/Lazy.vue.d.ts.map +1 -1
  47. package/dist/components/LinkList/index.d.ts +1 -1
  48. package/dist/components/OperationsList/index.d.ts +1 -1
  49. package/dist/components/RenderPlugins/index.d.ts +1 -1
  50. package/dist/components/Section/index.d.ts +10 -10
  51. package/dist/components/SectionFlare/index.d.ts +1 -1
  52. package/dist/components/index.d.ts +5 -5
  53. package/dist/components/index.js +102 -42
  54. package/dist/components/index.js.map +1 -0
  55. package/dist/features/Operation/components/OperationParameters.vue.d.ts +1 -1
  56. package/dist/features/Operation/components/OperationResponses.vue.d.ts +1 -1
  57. package/dist/features/Operation/components/ParameterList.vue.d.ts +1 -1
  58. package/dist/features/Operation/components/ParameterListItem.vue.d.ts +1 -1
  59. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +1 -1
  60. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts +1 -1
  61. package/dist/features/Operation/index.d.ts +1 -1
  62. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +1 -1
  63. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +1 -1
  64. package/dist/features/Search/components/SearchResult.vue.d.ts +1 -1
  65. package/dist/features/Search/helpers/create-fuse-instance.d.ts +1 -1
  66. package/dist/features/Search/helpers/create-search-index.d.ts +1 -1
  67. package/dist/features/Search/index.d.ts +2 -2
  68. package/dist/features/Search/types.d.ts +1 -1
  69. package/dist/features/ask-agent-button/AskAgentButton.vue.d.ts.map +1 -1
  70. package/dist/features/developer-tools/index.d.ts +1 -1
  71. package/dist/features/example-responses/index.d.ts +1 -1
  72. package/dist/features/external-docs/index.d.ts +1 -1
  73. package/dist/features/index.d.ts +2 -2
  74. package/dist/features/index.js +4 -10
  75. package/dist/features/info-object/index.d.ts +3 -3
  76. package/dist/features/specification-extension/index.d.ts +2 -2
  77. package/dist/features/test-request-button/index.d.ts +1 -1
  78. package/dist/features/x-badges/index.d.ts +1 -1
  79. package/dist/helpers/download.d.ts +1 -1
  80. package/dist/helpers/download.d.ts.map +1 -1
  81. package/dist/helpers/id-routing.d.ts +4 -0
  82. package/dist/helpers/id-routing.d.ts.map +1 -1
  83. package/dist/helpers/index.d.ts +8 -8
  84. package/dist/helpers/index.js +3 -24
  85. package/dist/helpers/lazy-bus.d.ts +19 -19
  86. package/dist/helpers/lazy-bus.d.ts.map +1 -1
  87. package/dist/hooks/index.d.ts +2 -2
  88. package/dist/hooks/index.js +3 -8
  89. package/dist/index.d.ts +5 -5
  90. package/dist/index.js +7 -14
  91. package/dist/lazy-bus-CV8Ox5hD.js +333 -0
  92. package/dist/lazy-bus-CV8Ox5hD.js.map +1 -0
  93. package/dist/normalize-configurations-DcVpOEjD.js +232 -0
  94. package/dist/normalize-configurations-DcVpOEjD.js.map +1 -0
  95. package/dist/plugins/hooks/usePluginManager.d.ts +1 -1
  96. package/dist/plugins/index.d.ts +3 -3
  97. package/dist/plugins/index.js +2 -9
  98. package/dist/plugins-4EyiUD_A.js +80 -0
  99. package/dist/plugins-4EyiUD_A.js.map +1 -0
  100. package/dist/src-DqcYVBWI.js +1686 -0
  101. package/dist/src-DqcYVBWI.js.map +1 -0
  102. package/dist/ssr.d.ts +2 -2
  103. package/dist/ssr.js +7 -14
  104. package/dist/storage--3JuzjCI.js +42 -0
  105. package/dist/storage--3JuzjCI.js.map +1 -0
  106. package/dist/style.css +6840 -7397
  107. package/dist/urls-gPTXGgbj.js +17 -0
  108. package/dist/urls-gPTXGgbj.js.map +1 -0
  109. package/dist/use-agent-Bnm1de0n.js +60 -0
  110. package/dist/use-agent-Bnm1de0n.js.map +1 -0
  111. package/dist/use-intersection-8QqPi2O-.js +24 -0
  112. package/dist/use-intersection-8QqPi2O-.js.map +1 -0
  113. package/package.json +25 -27
  114. package/dist/_virtual/_plugin-vue_export-helper.js +0 -10
  115. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js +0 -7
  116. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue2.js +0 -123
  117. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.js +0 -7
  118. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue2.js +0 -142
  119. package/dist/blocks/scalar-client-selector-block/helpers/featured-clients.js +0 -24
  120. package/dist/blocks/scalar-info-block/components/DownloadLink.vue.js +0 -7
  121. package/dist/blocks/scalar-info-block/components/DownloadLink.vue2.js +0 -63
  122. package/dist/blocks/scalar-info-block/components/InfoBlock.vue.js +0 -59
  123. package/dist/blocks/scalar-info-block/components/InfoBlock.vue2.js +0 -4
  124. package/dist/blocks/scalar-info-block/components/InfoDescription.vue.js +0 -7
  125. package/dist/blocks/scalar-info-block/components/InfoDescription.vue2.js +0 -70
  126. package/dist/blocks/scalar-info-block/components/InfoLinks.vue.js +0 -38
  127. package/dist/blocks/scalar-info-block/components/InfoLinks.vue2.js +0 -4
  128. package/dist/blocks/scalar-info-block/components/InfoMarkdownSection.vue.js +0 -38
  129. package/dist/blocks/scalar-info-block/components/InfoMarkdownSection.vue2.js +0 -4
  130. package/dist/blocks/scalar-info-block/components/InfoVersion.vue.js +0 -28
  131. package/dist/blocks/scalar-info-block/components/InfoVersion.vue2.js +0 -4
  132. package/dist/blocks/scalar-info-block/components/IntroductionCard.vue.js +0 -7
  133. package/dist/blocks/scalar-info-block/components/IntroductionCard.vue2.js +0 -19
  134. package/dist/blocks/scalar-info-block/components/IntroductionCardItem.vue.js +0 -14
  135. package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.js +0 -7
  136. package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue2.js +0 -112
  137. package/dist/blocks/scalar-info-block/components/OpenApiVersion.vue.js +0 -21
  138. package/dist/blocks/scalar-info-block/components/OpenApiVersion.vue2.js +0 -4
  139. package/dist/blocks/scalar-server-selector-block/components/Selector.vue.js +0 -76
  140. package/dist/blocks/scalar-server-selector-block/components/Selector.vue2.js +0 -4
  141. package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.js +0 -72
  142. package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue2.js +0 -4
  143. package/dist/components/AgentScalar/AgentScalarButton.vue.js +0 -22
  144. package/dist/components/AgentScalar/AgentScalarButton.vue2.js +0 -4
  145. package/dist/components/AgentScalar/AgentScalarChatInterface.vue.js +0 -4
  146. package/dist/components/AgentScalar/AgentScalarChatInterface.vue2.js +0 -29
  147. package/dist/components/AgentScalar/AgentScalarDrawer.vue.js +0 -7
  148. package/dist/components/AgentScalar/AgentScalarDrawer.vue2.js +0 -78
  149. package/dist/components/AgentScalar/OpenMCPButton.vue.js +0 -7
  150. package/dist/components/AgentScalar/OpenMCPButton.vue2.js +0 -191
  151. package/dist/components/Anchor/Anchor.vue.js +0 -51
  152. package/dist/components/Anchor/Anchor.vue2.js +0 -4
  153. package/dist/components/Anchor/WithBreadcrumb.vue.js +0 -41
  154. package/dist/components/Anchor/WithBreadcrumb.vue2.js +0 -4
  155. package/dist/components/ApiReference.vue.js +0 -10
  156. package/dist/components/ApiReference.vue2.js +0 -744
  157. package/dist/components/Badge/Badge.vue.js +0 -7
  158. package/dist/components/Badge/Badge.vue2.js +0 -26
  159. package/dist/components/ClassicHeader.vue.js +0 -21
  160. package/dist/components/Content/Auth/Auth.vue.js +0 -77
  161. package/dist/components/Content/Auth/Auth.vue2.js +0 -4
  162. package/dist/components/Content/Auth/helpers/get-default-security.js +0 -55
  163. package/dist/components/Content/Content.vue.js +0 -177
  164. package/dist/components/Content/Content.vue3.js +0 -5
  165. package/dist/components/Content/Models/Model.vue.js +0 -47
  166. package/dist/components/Content/Models/Model.vue2.js +0 -4
  167. package/dist/components/Content/Models/ModelTag.vue.js +0 -82
  168. package/dist/components/Content/Models/ModelTag.vue2.js +0 -4
  169. package/dist/components/Content/Models/components/ClassicLayout.vue.js +0 -7
  170. package/dist/components/Content/Models/components/ClassicLayout.vue2.js +0 -78
  171. package/dist/components/Content/Models/components/ModernLayout.vue.js +0 -61
  172. package/dist/components/Content/Models/components/ModernLayout.vue2.js +0 -4
  173. package/dist/components/Content/Operations/TraversedEntry.vue.js +0 -145
  174. package/dist/components/Content/Operations/TraversedEntry.vue2.js +0 -4
  175. package/dist/components/Content/Schema/RenderString.vue.js +0 -27
  176. package/dist/components/Content/Schema/RenderString.vue2.js +0 -4
  177. package/dist/components/Content/Schema/Schema.vue.js +0 -7
  178. package/dist/components/Content/Schema/Schema.vue2.js +0 -193
  179. package/dist/components/Content/Schema/SchemaComposition.vue.js +0 -120
  180. package/dist/components/Content/Schema/SchemaComposition.vue2.js +0 -4
  181. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.js +0 -7
  182. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue2.js +0 -36
  183. package/dist/components/Content/Schema/SchemaEnums.vue.js +0 -7
  184. package/dist/components/Content/Schema/SchemaEnums.vue2.js +0 -112
  185. package/dist/components/Content/Schema/SchemaHeading.vue.js +0 -7
  186. package/dist/components/Content/Schema/SchemaHeading.vue2.js +0 -61
  187. package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.js +0 -66
  188. package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue2.js +0 -4
  189. package/dist/components/Content/Schema/SchemaObjectProperties.vue.js +0 -120
  190. package/dist/components/Content/Schema/SchemaObjectProperties.vue2.js +0 -4
  191. package/dist/components/Content/Schema/SchemaProperty.vue.js +0 -7
  192. package/dist/components/Content/Schema/SchemaProperty.vue2.js +0 -228
  193. package/dist/components/Content/Schema/SchemaPropertyDefault.vue.js +0 -7
  194. package/dist/components/Content/Schema/SchemaPropertyDefault.vue2.js +0 -45
  195. package/dist/components/Content/Schema/SchemaPropertyDetail.vue.js +0 -7
  196. package/dist/components/Content/Schema/SchemaPropertyDetail.vue2.js +0 -40
  197. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js +0 -7
  198. package/dist/components/Content/Schema/SchemaPropertyExamples.vue2.js +0 -80
  199. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +0 -7
  200. package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +0 -318
  201. package/dist/components/Content/Schema/helpers/format-example.js +0 -41
  202. package/dist/components/Content/Schema/helpers/format-value.js +0 -35
  203. package/dist/components/Content/Schema/helpers/get-compositions-to-render.js +0 -31
  204. package/dist/components/Content/Schema/helpers/get-enum-values.js +0 -20
  205. package/dist/components/Content/Schema/helpers/get-property-description.js +0 -34
  206. package/dist/components/Content/Schema/helpers/get-ref-name.js +0 -14
  207. package/dist/components/Content/Schema/helpers/get-schema-type.js +0 -47
  208. package/dist/components/Content/Schema/helpers/has-complex-array-items.js +0 -48
  209. package/dist/components/Content/Schema/helpers/is-empty-schema-object.js +0 -13
  210. package/dist/components/Content/Schema/helpers/is-type-object.js +0 -27
  211. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +0 -215
  212. package/dist/components/Content/Schema/helpers/optimize-value-for-display.js +0 -64
  213. package/dist/components/Content/Schema/helpers/schema-composition.js +0 -4
  214. package/dist/components/Content/Schema/helpers/schema-name.js +0 -24
  215. package/dist/components/Content/Schema/helpers/should-display-description.js +0 -12
  216. package/dist/components/Content/Schema/helpers/should-display-heading.js +0 -12
  217. package/dist/components/Content/Schema/helpers/should-render-array-item-composition.js +0 -15
  218. package/dist/components/Content/Schema/helpers/sort-property-names.js +0 -71
  219. package/dist/components/Content/Tags/Tag.vue.js +0 -46
  220. package/dist/components/Content/Tags/Tag.vue2.js +0 -4
  221. package/dist/components/Content/Tags/components/ClassicLayout.vue.js +0 -7
  222. package/dist/components/Content/Tags/components/ClassicLayout.vue2.js +0 -57
  223. package/dist/components/Content/Tags/components/ModernLayout.vue.js +0 -7
  224. package/dist/components/Content/Tags/components/ModernLayout.vue2.js +0 -64
  225. package/dist/components/Content/Tags/components/TagSection.vue.js +0 -100
  226. package/dist/components/Content/Tags/components/TagSection.vue2.js +0 -4
  227. package/dist/components/GettingStarted.vue.js +0 -7
  228. package/dist/components/GettingStarted.vue2.js +0 -82
  229. package/dist/components/HttpMethod/HttpMethod.vue.js +0 -34
  230. package/dist/components/HttpMethod/HttpMethod.vue2.js +0 -4
  231. package/dist/components/IntersectionObserver.vue.js +0 -55
  232. package/dist/components/IntersectionObserver.vue2.js +0 -4
  233. package/dist/components/Lazy/Lazy.vue.js +0 -17
  234. package/dist/components/Lazy/Lazy.vue2.js +0 -4
  235. package/dist/components/LinkList/LinkList.vue.js +0 -7
  236. package/dist/components/LinkList/LinkList.vue2.js +0 -48
  237. package/dist/components/LoadingSkeleton.vue.js +0 -7
  238. package/dist/components/LoadingSkeleton.vue2.js +0 -20
  239. package/dist/components/MobileHeader.vue.js +0 -62
  240. package/dist/components/MobileHeader.vue2.js +0 -4
  241. package/dist/components/OperationPath.vue.js +0 -7
  242. package/dist/components/OperationPath.vue2.js +0 -30
  243. package/dist/components/OperationsList/OperationsList.vue.js +0 -7
  244. package/dist/components/OperationsList/OperationsList.vue2.js +0 -61
  245. package/dist/components/OperationsList/OperationsListItem.vue.js +0 -7
  246. package/dist/components/OperationsList/OperationsListItem.vue2.js +0 -68
  247. package/dist/components/RenderPlugins/RenderPlugins.vue.js +0 -43
  248. package/dist/components/RenderPlugins/RenderPlugins.vue2.js +0 -4
  249. package/dist/components/ScreenReader.vue.js +0 -7
  250. package/dist/components/ScreenReader.vue2.js +0 -21
  251. package/dist/components/Section/CompactSection.vue.js +0 -7
  252. package/dist/components/Section/CompactSection.vue2.js +0 -60
  253. package/dist/components/Section/Section.vue.js +0 -7
  254. package/dist/components/Section/Section.vue2.js +0 -23
  255. package/dist/components/Section/SectionAccordion.vue.js +0 -7
  256. package/dist/components/Section/SectionAccordion.vue2.js +0 -76
  257. package/dist/components/Section/SectionColumn.vue.js +0 -14
  258. package/dist/components/Section/SectionColumns.vue.js +0 -14
  259. package/dist/components/Section/SectionContainer.vue.js +0 -7
  260. package/dist/components/Section/SectionContainer.vue2.js +0 -21
  261. package/dist/components/Section/SectionContainerAccordion.vue.js +0 -7
  262. package/dist/components/Section/SectionContainerAccordion.vue2.js +0 -54
  263. package/dist/components/Section/SectionContent.vue.js +0 -7
  264. package/dist/components/Section/SectionContent.vue2.js +0 -22
  265. package/dist/components/Section/SectionHeader.vue.js +0 -7
  266. package/dist/components/Section/SectionHeader.vue2.js +0 -26
  267. package/dist/components/Section/SectionHeaderTag.vue.js +0 -7
  268. package/dist/components/Section/SectionHeaderTag.vue2.js +0 -20
  269. package/dist/components/SectionFlare/SectionFlare.vue.js +0 -14
  270. package/dist/components/ShowMoreButton.vue.js +0 -7
  271. package/dist/components/ShowMoreButton.vue2.js +0 -23
  272. package/dist/consts/urls.js +0 -16
  273. package/dist/features/Operation/Operation.vue.js +0 -100
  274. package/dist/features/Operation/Operation.vue2.js +0 -4
  275. package/dist/features/Operation/components/ContentTypeSelect.vue.js +0 -88
  276. package/dist/features/Operation/components/ContentTypeSelect.vue2.js +0 -4
  277. package/dist/features/Operation/components/Header.vue.js +0 -33
  278. package/dist/features/Operation/components/Header.vue2.js +0 -4
  279. package/dist/features/Operation/components/Headers.vue.js +0 -7
  280. package/dist/features/Operation/components/Headers.vue2.js +0 -71
  281. package/dist/features/Operation/components/OperationParameters.vue.js +0 -92
  282. package/dist/features/Operation/components/OperationParameters.vue2.js +0 -4
  283. package/dist/features/Operation/components/OperationResponses.vue.js +0 -44
  284. package/dist/features/Operation/components/OperationResponses.vue2.js +0 -4
  285. package/dist/features/Operation/components/ParameterList.vue.js +0 -50
  286. package/dist/features/Operation/components/ParameterList.vue2.js +0 -4
  287. package/dist/features/Operation/components/ParameterListItem.vue.js +0 -7
  288. package/dist/features/Operation/components/ParameterListItem.vue2.js +0 -163
  289. package/dist/features/Operation/components/RequestBody.vue.js +0 -7
  290. package/dist/features/Operation/components/RequestBody.vue2.js +0 -164
  291. package/dist/features/Operation/components/callbacks/Callback.vue.js +0 -7
  292. package/dist/features/Operation/components/callbacks/Callback.vue2.js +0 -60
  293. package/dist/features/Operation/components/callbacks/Callbacks.vue.js +0 -63
  294. package/dist/features/Operation/components/callbacks/Callbacks.vue2.js +0 -4
  295. package/dist/features/Operation/helpers/filter-selected-security.js +0 -28
  296. package/dist/features/Operation/helpers/get-first-server.js +0 -25
  297. package/dist/features/Operation/layouts/ClassicLayout.vue.js +0 -7
  298. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +0 -243
  299. package/dist/features/Operation/layouts/ModernLayout.vue.js +0 -7
  300. package/dist/features/Operation/layouts/ModernLayout.vue2.js +0 -256
  301. package/dist/features/Search/components/SearchButton.vue.js +0 -88
  302. package/dist/features/Search/components/SearchButton.vue2.js +0 -4
  303. package/dist/features/Search/components/SearchModal.vue.js +0 -7
  304. package/dist/features/Search/components/SearchModal.vue2.js +0 -120
  305. package/dist/features/Search/components/SearchResult.vue.js +0 -84
  306. package/dist/features/Search/components/SearchResult.vue2.js +0 -4
  307. package/dist/features/Search/helpers/create-fuse-instance.js +0 -43
  308. package/dist/features/Search/helpers/create-search-index.js +0 -119
  309. package/dist/features/Search/hooks/useSearchIndex.js +0 -33
  310. package/dist/features/ask-agent-button/AskAgentButton.vue.js +0 -7
  311. package/dist/features/ask-agent-button/AskAgentButton.vue2.js +0 -47
  312. package/dist/features/developer-tools/DeveloperTools.vue.js +0 -60
  313. package/dist/features/developer-tools/DeveloperTools.vue2.js +0 -4
  314. package/dist/features/developer-tools/components/ApiReferenceToolbarBlurb.vue.js +0 -13
  315. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.js +0 -33
  316. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue2.js +0 -4
  317. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.js +0 -138
  318. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue2.js +0 -4
  319. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.js +0 -66
  320. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue2.js +0 -4
  321. package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.js +0 -54
  322. package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue2.js +0 -4
  323. package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.js +0 -71
  324. package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue2.js +0 -4
  325. package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.js +0 -63
  326. package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue2.js +0 -4
  327. package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.js +0 -73
  328. package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue2.js +0 -4
  329. package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.js +0 -57
  330. package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue2.js +0 -4
  331. package/dist/features/developer-tools/components/DeployApiReference.vue.js +0 -35
  332. package/dist/features/developer-tools/components/DeployApiReference.vue2.js +0 -4
  333. package/dist/features/developer-tools/components/ModifyConfiguration.vue.js +0 -103
  334. package/dist/features/developer-tools/components/ModifyConfiguration.vue2.js +0 -4
  335. package/dist/features/developer-tools/components/ShareApiReference.vue.js +0 -35
  336. package/dist/features/developer-tools/components/ShareApiReference.vue2.js +0 -4
  337. package/dist/features/example-responses/ExampleResponse.vue.js +0 -7
  338. package/dist/features/example-responses/ExampleResponse.vue2.js +0 -61
  339. package/dist/features/example-responses/ExampleResponseTab.vue.js +0 -7
  340. package/dist/features/example-responses/ExampleResponseTab.vue2.js +0 -25
  341. package/dist/features/example-responses/ExampleResponseTabList.vue.js +0 -7
  342. package/dist/features/example-responses/ExampleResponseTabList.vue2.js +0 -37
  343. package/dist/features/example-responses/ExampleResponses.vue.js +0 -7
  344. package/dist/features/example-responses/ExampleResponses.vue2.js +0 -181
  345. package/dist/features/example-responses/ExampleSchema.vue.js +0 -42
  346. package/dist/features/example-responses/ExampleSchema.vue2.js +0 -4
  347. package/dist/features/example-responses/has-response-content.js +0 -28
  348. package/dist/features/external-docs/ExternalDocs.vue.js +0 -42
  349. package/dist/features/external-docs/ExternalDocs.vue2.js +0 -4
  350. package/dist/features/info-object/Contact.vue.js +0 -46
  351. package/dist/features/info-object/Contact.vue2.js +0 -4
  352. package/dist/features/info-object/License.vue.js +0 -40
  353. package/dist/features/info-object/License.vue2.js +0 -4
  354. package/dist/features/info-object/TermsOfService.vue.js +0 -34
  355. package/dist/features/info-object/TermsOfService.vue2.js +0 -4
  356. package/dist/features/multiple-documents/DocumentSelector.vue.js +0 -54
  357. package/dist/features/multiple-documents/DocumentSelector.vue2.js +0 -4
  358. package/dist/features/specification-extension/SpecificationExtension.vue.js +0 -4
  359. package/dist/features/specification-extension/SpecificationExtension.vue2.js +0 -52
  360. package/dist/features/specification-extension/helpers.js +0 -9
  361. package/dist/features/test-request-button/TestRequestButton.vue.js +0 -7
  362. package/dist/features/test-request-button/TestRequestButton.vue2.js +0 -46
  363. package/dist/features/x-badges/XBadges.vue.js +0 -35
  364. package/dist/features/x-badges/XBadges.vue2.js +0 -4
  365. package/dist/helpers/color-mode.js +0 -9
  366. package/dist/helpers/download.js +0 -45
  367. package/dist/helpers/id-routing.js +0 -63
  368. package/dist/helpers/lazy-bus.js +0 -160
  369. package/dist/helpers/load-from-perssistance.js +0 -17
  370. package/dist/helpers/map-config-plugins.js +0 -27
  371. package/dist/helpers/map-config-to-workspace-store.js +0 -45
  372. package/dist/helpers/normalize-configurations.js +0 -69
  373. package/dist/helpers/openapi.js +0 -135
  374. package/dist/helpers/storage.js +0 -47
  375. package/dist/helpers/upload-temp-document.js +0 -24
  376. package/dist/hooks/use-agent.js +0 -42
  377. package/dist/hooks/use-intersection.js +0 -32
  378. package/dist/plugins/hooks/usePluginManager.js +0 -14
  379. package/dist/plugins/persistance-plugin.js +0 -48
  380. package/dist/plugins/plugin-manager.js +0 -39
  381. package/dist/standalone/lib/html-api.js +0 -81
@@ -0,0 +1,17 @@
1
+ //#region src/consts/urls.ts
2
+ /** Scalar registry base url */
3
+ var REGISTRY_URL = "https://registry.scalar.com";
4
+ /** Registry URL where shared documents can be accessed */
5
+ var REGISTRY_SHARE_URL = `${REGISTRY_URL}/share`;
6
+ /** Scalar proxy service */
7
+ var PROXY_URL = "https://proxy.scalar.com";
8
+ /** Scalar API base url */
9
+ var API_BASE_URL = "https://api.scalar.com";
10
+ /** API endpoint for uploading temporary documents */
11
+ var UPLOAD_TEMP_API_URL = `${API_BASE_URL}/core/share/upload/apis`;
12
+ var DASHBOARD_URL = "https://dashboard.scalar.com";
13
+ var DASHBOARD_REGISTER_URL = `${DASHBOARD_URL}/register`;
14
+ //#endregion
15
+ export { REGISTRY_SHARE_URL as a, PROXY_URL as i, DASHBOARD_REGISTER_URL as n, REGISTRY_URL as o, DASHBOARD_URL as r, UPLOAD_TEMP_API_URL as s, API_BASE_URL as t };
16
+
17
+ //# sourceMappingURL=urls-gPTXGgbj.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"urls-gPTXGgbj.js","names":[],"sources":["../src/consts/urls.ts"],"sourcesContent":["/** Scalar registry base url */\nexport const REGISTRY_URL = 'https://registry.scalar.com' as const\n\n/** Registry URL where shared documents can be accessed */\nexport const REGISTRY_SHARE_URL = `${REGISTRY_URL}/share` as const\n\n/** Scalar proxy service */\nexport const PROXY_URL = 'https://proxy.scalar.com' as const\n\n/** Scalar API base url */\nexport const API_BASE_URL = 'https://api.scalar.com'\n\n/** API endpoint for uploading temporary documents */\nexport const UPLOAD_TEMP_API_URL = `${API_BASE_URL}/core/share/upload/apis` as const\n\nexport const DASHBOARD_URL = 'https://dashboard.scalar.com' as const\nexport const DASHBOARD_REGISTER_URL = `${DASHBOARD_URL}/register` as const\n"],"mappings":";;AACA,IAAa,eAAe;;AAG5B,IAAa,qBAAqB,GAAG,aAAa;;AAGlD,IAAa,YAAY;;AAGzB,IAAa,eAAe;;AAG5B,IAAa,sBAAsB,GAAG,aAAa;AAEnD,IAAa,gBAAgB;AAC7B,IAAa,yBAAyB,GAAG,cAAc"}
@@ -0,0 +1,60 @@
1
+ import { computed, inject, ref } from "vue";
2
+ import { isLocalUrl } from "@scalar/helpers/url/is-local-url";
3
+ //#region src/hooks/use-agent.ts
4
+ var AGENT_CONTEXT_SYMBOL = Symbol();
5
+ /**
6
+ * Module-level ref so useAgentContext() can resolve context even when inject fails
7
+ * (e.g. async component boundary or mount order). Set when ApiReference calls useAgent().
8
+ */
9
+ var agentStateRef = ref(null);
10
+ /**
11
+ * Hook for agent visibility and enabled state.
12
+ * Call from the API Reference root (e.g. ApiReference.vue) with options to create the state, then provide it so descendants can inject it.
13
+ *
14
+ * Returns:
15
+ * - showAgent: whether the agent panel is visible
16
+ * - agentEnabled: whether the agent is enabled
17
+ * - openAgent, closeAgent, toggleAgent: imperative controls
18
+ */
19
+ function useAgent(options) {
20
+ const showAgent = ref(false);
21
+ const prefilledMessage = ref("");
22
+ const agentEnabled = options.agentEnabled ?? computed(() => isLocalUrl(window.location.href));
23
+ const openAgent = (message) => {
24
+ prefilledMessage.value = message ?? "";
25
+ showAgent.value = true;
26
+ };
27
+ const closeAgent = () => {
28
+ showAgent.value = false;
29
+ prefilledMessage.value = "";
30
+ };
31
+ const toggleAgent = () => {
32
+ showAgent.value = !showAgent.value;
33
+ if (!showAgent.value) prefilledMessage.value = "";
34
+ };
35
+ const state = {
36
+ showAgent,
37
+ agentEnabled,
38
+ prefilledMessage,
39
+ openAgent,
40
+ closeAgent,
41
+ toggleAgent
42
+ };
43
+ agentStateRef.value = state;
44
+ return state;
45
+ }
46
+ /**
47
+ * Inject the agent context provided by ApiReference.
48
+ * Falls back to module-level state when inject is undefined (e.g. async boundary or mount order).
49
+ * Use in descendant components (e.g. AskAgentButton) to open the agent or check if it is enabled.
50
+ *
51
+ * Returns a computed ref; use v-if="agentContext?.agentEnabled" so the button only renders when context exists and agent is enabled.
52
+ */
53
+ function useAgentContext() {
54
+ const injected = inject(AGENT_CONTEXT_SYMBOL, void 0);
55
+ return computed(() => injected ?? agentStateRef.value ?? void 0);
56
+ }
57
+ //#endregion
58
+ export { useAgent as n, useAgentContext as r, AGENT_CONTEXT_SYMBOL as t };
59
+
60
+ //# sourceMappingURL=use-agent-Bnm1de0n.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-agent-Bnm1de0n.js","names":[],"sources":["../src/hooks/use-agent.ts"],"sourcesContent":["import { isLocalUrl } from '@scalar/helpers/url/is-local-url'\nimport type { ComputedRef, Ref } from 'vue'\nimport { type InjectionKey, computed, inject, ref } from 'vue'\n\ntype UseAgentOptions = {\n /** Optional. When provided, controls whether the agent UI is enabled (e.g. from doc config). Defaults to isLocalUrl. */\n agentEnabled?: ComputedRef<boolean>\n}\n\ntype UseAgentReturn = {\n showAgent: Ref<boolean>\n agentEnabled: ComputedRef<boolean>\n /** Ref used to pass a prefill message into the agent when opening. Cleared on close. */\n prefilledMessage: Ref<string>\n openAgent: (message?: string) => void\n closeAgent: () => void\n toggleAgent: () => void\n}\n\nexport const AGENT_CONTEXT_SYMBOL = Symbol() as InjectionKey<UseAgentReturn>\n\n/**\n * Module-level ref so useAgentContext() can resolve context even when inject fails\n * (e.g. async component boundary or mount order). Set when ApiReference calls useAgent().\n */\nconst agentStateRef: Ref<UseAgentReturn | null> = ref(null)\n\n/**\n * Hook for agent visibility and enabled state.\n * Call from the API Reference root (e.g. ApiReference.vue) with options to create the state, then provide it so descendants can inject it.\n *\n * Returns:\n * - showAgent: whether the agent panel is visible\n * - agentEnabled: whether the agent is enabled\n * - openAgent, closeAgent, toggleAgent: imperative controls\n */\nexport function useAgent(options: UseAgentOptions): UseAgentReturn {\n const showAgent = ref(false)\n const prefilledMessage = ref('')\n\n const agentEnabled = options.agentEnabled ?? computed(() => isLocalUrl(window.location.href))\n\n const openAgent = (message?: string) => {\n prefilledMessage.value = message ?? ''\n showAgent.value = true\n }\n\n const closeAgent = () => {\n showAgent.value = false\n prefilledMessage.value = ''\n }\n\n const toggleAgent = () => {\n showAgent.value = !showAgent.value\n if (!showAgent.value) {\n prefilledMessage.value = ''\n }\n }\n\n const state: UseAgentReturn = {\n showAgent,\n agentEnabled,\n prefilledMessage,\n openAgent,\n closeAgent,\n toggleAgent,\n }\n agentStateRef.value = state\n return state\n}\n\n/**\n * Inject the agent context provided by ApiReference.\n * Falls back to module-level state when inject is undefined (e.g. async boundary or mount order).\n * Use in descendant components (e.g. AskAgentButton) to open the agent or check if it is enabled.\n *\n * Returns a computed ref; use v-if=\"agentContext?.agentEnabled\" so the button only renders when context exists and agent is enabled.\n */\nexport function useAgentContext(): ComputedRef<UseAgentReturn | undefined> {\n const injected = inject(AGENT_CONTEXT_SYMBOL, undefined)\n return computed((): UseAgentReturn | undefined => injected ?? agentStateRef.value ?? undefined)\n}\n"],"mappings":";;;AAmBA,IAAa,uBAAuB,QAAQ;;;;;AAM5C,IAAM,gBAA4C,IAAI,KAAK;;;;;;;;;;AAW3D,SAAgB,SAAS,SAA0C;CACjE,MAAM,YAAY,IAAI,MAAM;CAC5B,MAAM,mBAAmB,IAAI,GAAG;CAEhC,MAAM,eAAe,QAAQ,gBAAgB,eAAe,WAAW,OAAO,SAAS,KAAK,CAAC;CAE7F,MAAM,aAAa,YAAqB;AACtC,mBAAiB,QAAQ,WAAW;AACpC,YAAU,QAAQ;;CAGpB,MAAM,mBAAmB;AACvB,YAAU,QAAQ;AAClB,mBAAiB,QAAQ;;CAG3B,MAAM,oBAAoB;AACxB,YAAU,QAAQ,CAAC,UAAU;AAC7B,MAAI,CAAC,UAAU,MACb,kBAAiB,QAAQ;;CAI7B,MAAM,QAAwB;EAC5B;EACA;EACA;EACA;EACA;EACA;EACD;AACD,eAAc,QAAQ;AACtB,QAAO;;;;;;;;;AAUT,SAAgB,kBAA2D;CACzE,MAAM,WAAW,OAAO,sBAAsB,KAAA,EAAU;AACxD,QAAO,eAA2C,YAAY,cAAc,SAAS,KAAA,EAAU"}
@@ -0,0 +1,24 @@
1
+ import { onMounted } from "vue";
2
+ import { useIntersectionObserver } from "@vueuse/core";
3
+ //#region src/hooks/use-intersection.ts
4
+ var useIntersection = (el, onIntersect) => {
5
+ const calculateRootMargin = (element) => {
6
+ const height = element.offsetHeight;
7
+ return `${height / 2}px 0px ${height / 2}px 0px`;
8
+ };
9
+ const calculateThreshold = (element) => {
10
+ return element.offsetHeight < window.innerHeight ? .8 : .5;
11
+ };
12
+ onMounted(() => {
13
+ if (el.value) useIntersectionObserver(el, ([entry]) => {
14
+ if (entry?.isIntersecting) onIntersect();
15
+ }, {
16
+ rootMargin: calculateRootMargin(el.value),
17
+ threshold: calculateThreshold(el.value)
18
+ });
19
+ });
20
+ };
21
+ //#endregion
22
+ export { useIntersection as t };
23
+
24
+ //# sourceMappingURL=use-intersection-8QqPi2O-.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-intersection-8QqPi2O-.js","names":[],"sources":["../src/hooks/use-intersection.ts"],"sourcesContent":["import { useIntersectionObserver } from '@vueuse/core'\nimport { type TemplateRef, onMounted } from 'vue'\n\nexport const useIntersection = (el: TemplateRef<HTMLElement | undefined>, onIntersect: () => void) => {\n const calculateRootMargin = (element: HTMLElement) => {\n const height = element.offsetHeight\n // Use of a margin on height to ensure sooner intersection detection.\n return `${height / 2}px 0px ${height / 2}px 0px`\n }\n\n const calculateThreshold = (element: HTMLElement) => {\n const height = element.offsetHeight\n // Favor larger threshold if the element is smaller that the screen\n // to ensure that it is selected\n return height < window.innerHeight ? 0.8 : 0.5\n }\n\n onMounted(() => {\n if (el.value) {\n const options = {\n rootMargin: calculateRootMargin(el.value),\n threshold: calculateThreshold(el.value),\n }\n\n useIntersectionObserver(\n el,\n ([entry]) => {\n if (entry?.isIntersecting) {\n onIntersect()\n }\n },\n options,\n )\n }\n })\n}\n"],"mappings":";;;AAGA,IAAa,mBAAmB,IAA0C,gBAA4B;CACpG,MAAM,uBAAuB,YAAyB;EACpD,MAAM,SAAS,QAAQ;AAEvB,SAAO,GAAG,SAAS,EAAE,SAAS,SAAS,EAAE;;CAG3C,MAAM,sBAAsB,YAAyB;AAInD,SAHe,QAAQ,eAGP,OAAO,cAAc,KAAM;;AAG7C,iBAAgB;AACd,MAAI,GAAG,MAML,yBACE,KACC,CAAC,WAAW;AACX,OAAI,OAAO,eACT,cAAa;KATH;GACd,YAAY,oBAAoB,GAAG,MAAM;GACzC,WAAW,mBAAmB,GAAG,MAAM;GACxC,CAUA;GAEH"}
package/package.json CHANGED
@@ -20,7 +20,7 @@
20
20
  "vue",
21
21
  "vue3"
22
22
  ],
23
- "version": "1.48.8",
23
+ "version": "1.49.1",
24
24
  "engines": {
25
25
  "node": ">=22"
26
26
  },
@@ -90,27 +90,27 @@
90
90
  "microdiff": "^1.5.0",
91
91
  "nanoid": "^5.1.6",
92
92
  "vue": "^3.5.26",
93
- "@scalar/agent-chat": "0.9.8",
94
- "@scalar/api-client": "2.38.0",
95
- "@scalar/code-highlight": "0.3.0",
96
- "@scalar/components": "0.20.8",
97
- "@scalar/helpers": "0.4.1",
98
- "@scalar/icons": "0.6.0",
99
- "@scalar/openapi-parser": "0.25.3",
100
- "@scalar/oas-utils": "0.10.7",
101
- "@scalar/openapi-types": "0.6.0",
102
- "@scalar/sidebar": "0.8.8",
103
- "@scalar/snippetz": "0.7.4",
104
- "@scalar/themes": "0.15.0",
105
- "@scalar/types": "0.7.3",
106
- "@scalar/use-hooks": "0.4.0",
107
- "@scalar/use-toasts": "0.10.0",
108
- "@scalar/workspace-store": "0.40.1"
93
+ "yaml": "^2.8.0",
94
+ "@scalar/api-client": "2.38.2",
95
+ "@scalar/code-highlight": "0.3.1",
96
+ "@scalar/agent-chat": "0.9.10",
97
+ "@scalar/components": "0.20.10",
98
+ "@scalar/helpers": "0.4.2",
99
+ "@scalar/oas-utils": "0.10.9",
100
+ "@scalar/snippetz": "0.7.5",
101
+ "@scalar/icons": "0.6.1",
102
+ "@scalar/openapi-types": "0.6.1",
103
+ "@scalar/themes": "0.15.1",
104
+ "@scalar/sidebar": "0.8.10",
105
+ "@scalar/use-hooks": "0.4.1",
106
+ "@scalar/types": "0.7.4",
107
+ "@scalar/use-toasts": "0.10.1",
108
+ "@scalar/workspace-store": "0.40.3"
109
109
  },
110
110
  "devDependencies": {
111
111
  "@hono/node-server": "^1.19.7",
112
112
  "@playwright/test": "1.56.0",
113
- "@tailwindcss/vite": "^4.1.18",
113
+ "@tailwindcss/vite": "^4.2.0",
114
114
  "@vitejs/plugin-vue": "^6.0.3",
115
115
  "@vue/server-renderer": "^3.5.26",
116
116
  "@vue/test-utils": "2.4.6",
@@ -119,17 +119,16 @@
119
119
  "react": "^19.2.3",
120
120
  "rollup-plugin-webpack-stats": "^0.2.5",
121
121
  "tailwindcss": "^4.1.18",
122
- "vite": "^7.3.1",
122
+ "vite": "8.0.0",
123
123
  "vite-plugin-banner": "^0.8.1",
124
124
  "vite-plugin-css-injected-by-js": "^3.5.2",
125
- "vitest": "4.0.16",
126
- "@scalar/build-tooling": "0.5.0",
127
- "@scalar/core": "0.4.3",
128
- "@scalar/galaxy": "0.6.0",
129
- "@scalar/react-renderer": "0.4.0"
125
+ "vitest": "4.1.0",
126
+ "@scalar/react-renderer": "0.4.1",
127
+ "@scalar/galaxy": "0.6.1",
128
+ "@scalar/core": "0.4.4"
130
129
  },
131
130
  "scripts": {
132
- "build": "pnpm build:default && pnpm build:standalone && pnpm types:build",
131
+ "build": "pnpm build:default && pnpm build:standalone && vue-tsc -p tsconfig.build.json",
133
132
  "build:default": "vite build",
134
133
  "build:standalone": "vite build -c vite.standalone.config.ts",
135
134
  "dev": "vite",
@@ -147,7 +146,6 @@
147
146
  "test:e2e:cdn:ci": "TEST_MODE=CDN playwright test",
148
147
  "test:e2e:ci": "playwright test",
149
148
  "test:e2e:update-snapshots": "pnpm test:e2e --update-snapshots",
150
- "types:build": "scalar-types-build-vue",
151
- "types:check": "scalar-types-check-vue"
149
+ "types:check": "vue-tsc --noEmit"
152
150
  }
153
151
  }
@@ -1,10 +0,0 @@
1
- const _export_sfc = (sfc, props) => {
2
- const target = sfc.__vccOpts || sfc;
3
- for (const [key, val] of props) {
4
- target[key] = val;
5
- }
6
- return target;
7
- };
8
- export {
9
- _export_sfc as default
10
- };
@@ -1,7 +0,0 @@
1
- import _sfc_main from "./ClientDropdown.vue2.js";
2
- /* empty css */
3
- import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const ClientDropdown = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-6a49c111"]]);
5
- export {
6
- ClientDropdown as default
7
- };
@@ -1,123 +0,0 @@
1
- import { defineComponent, ref, computed, createElementBlock, openBlock, createVNode, Fragment, renderList, createBlock, unref, normalizeClass, withCtx, createElementVNode, toDisplayString, createCommentVNode } from "vue";
2
- import { Tab } from "@headlessui/vue";
3
- import { findClient } from "@scalar/api-client/v2/blocks/operation-code-sample";
4
- import { ScalarIcon, ScalarCombobox } from "@scalar/components";
5
- import { freezeElement } from "@scalar/helpers/dom/freeze-element";
6
- import { isFeaturedClient } from "../helpers/featured-clients.js";
7
- const _hoisted_1 = { class: "client-libraries-text" };
8
- const _hoisted_2 = {
9
- "aria-hidden": "true",
10
- class: "client-libraries-icon__more"
11
- };
12
- const _hoisted_3 = {
13
- key: 1,
14
- class: "client-libraries-icon",
15
- height: "50",
16
- role: "presentation",
17
- viewBox: "0 0 50 50",
18
- width: "50",
19
- xmlns: "http://www.w3.org/2000/svg"
20
- };
21
- const _hoisted_4 = {
22
- key: 0,
23
- class: "client-libraries-text client-libraries-text-more"
24
- };
25
- const _sfc_main = /* @__PURE__ */ defineComponent({
26
- __name: "ClientDropdown",
27
- props: {
28
- clientOptions: {},
29
- selectedClient: {},
30
- featuredClients: {},
31
- eventBus: {}
32
- },
33
- setup(__props) {
34
- const containerRef = ref();
35
- const getIconByLanguageKey = (targetKey) => `programming-language-${targetKey === "js" ? "javascript" : targetKey}`;
36
- const selectClient = (option) => {
37
- if (!containerRef.value) {
38
- return;
39
- }
40
- const unfreeze = freezeElement(containerRef.value);
41
- setTimeout(() => {
42
- unfreeze();
43
- }, 300);
44
- if (option.clientKey !== "custom") {
45
- __props.eventBus.emit("workspace:update:selected-client", option.id);
46
- }
47
- };
48
- const selectedTargetKey = computed(
49
- () => __props.selectedClient?.split("/")[0]
50
- );
51
- return (_ctx, _cache) => {
52
- return openBlock(), createElementBlock("div", {
53
- ref_key: "containerRef",
54
- ref: containerRef,
55
- class: "client-libraries-content"
56
- }, [
57
- (openBlock(true), createElementBlock(Fragment, null, renderList(__props.featuredClients, (featuredClient) => {
58
- return openBlock(), createBlock(unref(Tab), {
59
- key: featuredClient.clientKey,
60
- class: normalizeClass(["client-libraries rendered-code-sdks", {
61
- "client-libraries__active": featuredClient.id === __props.selectedClient
62
- }])
63
- }, {
64
- default: withCtx(() => [
65
- createElementVNode("div", {
66
- class: normalizeClass(`client-libraries-icon__${featuredClient.targetKey}`)
67
- }, [
68
- createVNode(unref(ScalarIcon), {
69
- class: "client-libraries-icon",
70
- icon: getIconByLanguageKey(featuredClient.targetKey)
71
- }, null, 8, ["icon"])
72
- ], 2),
73
- createElementVNode("span", _hoisted_1, toDisplayString(featuredClient.targetTitle), 1)
74
- ]),
75
- _: 2
76
- }, 1032, ["class"]);
77
- }), 128)),
78
- createVNode(unref(ScalarCombobox), {
79
- modelValue: unref(findClient)(__props.clientOptions, __props.selectedClient),
80
- options: __props.clientOptions,
81
- placement: "bottom-end",
82
- teleport: "",
83
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectClient($event))
84
- }, {
85
- default: withCtx(() => [
86
- createElementVNode("button", {
87
- class: normalizeClass(["client-libraries client-libraries__select", {
88
- "client-libraries__active": __props.selectedClient && !unref(isFeaturedClient)(__props.selectedClient)
89
- }]),
90
- type: "button"
91
- }, [
92
- createElementVNode("div", _hoisted_2, [
93
- __props.selectedClient && !unref(isFeaturedClient)(__props.selectedClient) ? (openBlock(), createElementBlock("div", {
94
- key: 0,
95
- class: normalizeClass(`client-libraries-icon__${selectedTargetKey.value}`)
96
- }, [
97
- selectedTargetKey.value ? (openBlock(), createBlock(unref(ScalarIcon), {
98
- key: 0,
99
- class: "client-libraries-icon",
100
- icon: getIconByLanguageKey(selectedTargetKey.value)
101
- }, null, 8, ["icon"])) : createCommentVNode("", true)
102
- ], 2)) : (openBlock(), createElementBlock("svg", _hoisted_3, [..._cache[1] || (_cache[1] = [
103
- createElementVNode("g", {
104
- fill: "currentColor",
105
- "fill-rule": "nonzero"
106
- }, [
107
- createElementVNode("path", { d: "M10.71 25.3a3.87 3.87 0 1 0 7.74 0 3.87 3.87 0 0 0-7.74 0M21.13 25.3a3.87 3.87 0 1 0 7.74 0 3.87 3.87 0 0 0-7.74 0M31.55 25.3a3.87 3.87 0 1 0 7.74 0 3.87 3.87 0 0 0-7.74 0" })
108
- ], -1)
109
- ])]))
110
- ]),
111
- __props.clientOptions.length ? (openBlock(), createElementBlock("span", _hoisted_4, " More ")) : createCommentVNode("", true),
112
- _cache[2] || (_cache[2] = createElementVNode("span", { class: "sr-only" }, "Select from all clients", -1))
113
- ], 2)
114
- ]),
115
- _: 1
116
- }, 8, ["modelValue", "options"])
117
- ], 512);
118
- };
119
- }
120
- });
121
- export {
122
- _sfc_main as default
123
- };
@@ -1,7 +0,0 @@
1
- import _sfc_main from "./ClientSelector.vue2.js";
2
- /* empty css */
3
- import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const ClientSelector = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-dd2e9b07"]]);
5
- export {
6
- ClientSelector as default
7
- };
@@ -1,142 +0,0 @@
1
- import { defineComponent, useId, computed, useTemplateRef, createElementBlock, createCommentVNode, openBlock, createVNode, unref, withCtx, createElementVNode, Fragment, normalizeClass, renderList, createBlock, createTextVNode, toDisplayString } from "vue";
2
- import { TabGroup, TabList, TabPanels, TabPanel } from "@headlessui/vue";
3
- import { DEFAULT_CLIENT } from "@scalar/api-client/v2/blocks/operation-code-sample";
4
- import { ScalarMarkdown, ScalarCodeBlock } from "@scalar/components";
5
- import { getFeaturedClients, isFeaturedClient } from "../helpers/featured-clients.js";
6
- import ClientDropdown from "./ClientDropdown.vue.js";
7
- const _hoisted_1 = {
8
- key: 0,
9
- ref: "wrapper-ref"
10
- };
11
- const _hoisted_2 = ["id"];
12
- const _hoisted_3 = {
13
- key: 1,
14
- class: "selected-client card-footer border-t-0 p-0",
15
- role: "tabpanel",
16
- tabindex: "1"
17
- };
18
- const _hoisted_4 = ["id"];
19
- const _sfc_main = /* @__PURE__ */ defineComponent({
20
- __name: "ClientSelector",
21
- props: {
22
- xScalarSdkInstallation: {},
23
- clientOptions: {},
24
- selectedClient: { default: () => DEFAULT_CLIENT },
25
- eventBus: {}
26
- },
27
- setup(__props, { expose: __expose }) {
28
- const headingId = useId();
29
- const morePanel = useId();
30
- const selectedClientOption = computed(
31
- () => __props.clientOptions.flatMap(
32
- (optionGroup) => optionGroup.options.find((option) => option.id === __props.selectedClient) ?? []
33
- )[0]
34
- );
35
- const featuredClients = computed(() => getFeaturedClients(__props.clientOptions));
36
- const tabIndex = computed(
37
- () => featuredClients.value.findIndex(
38
- (featuredClient) => __props.selectedClient === featuredClient.id
39
- )
40
- );
41
- const wrapper = useTemplateRef("wrapper-ref");
42
- const onTabSelect = (i) => {
43
- const client = featuredClients.value[i];
44
- if (!client || !wrapper.value) {
45
- return;
46
- }
47
- __props.eventBus.emit("workspace:update:selected-client", client.id);
48
- };
49
- const installationInstructions = computed(() => {
50
- if (!Array.isArray(__props.xScalarSdkInstallation) || !__props.xScalarSdkInstallation?.length) {
51
- return void 0;
52
- }
53
- const instruction = __props.xScalarSdkInstallation.find((instruction2) => {
54
- const targetKey = __props.selectedClient?.split("/")[0]?.toLowerCase();
55
- return instruction2.lang.toLowerCase() === targetKey;
56
- });
57
- if (!instruction) {
58
- return void 0;
59
- }
60
- return instruction;
61
- });
62
- __expose({
63
- selectedClientOption
64
- });
65
- return (_ctx, _cache) => {
66
- return __props.clientOptions.length ? (openBlock(), createElementBlock("div", _hoisted_1, [
67
- createVNode(unref(TabGroup), {
68
- manual: "",
69
- selectedIndex: tabIndex.value,
70
- onChange: onTabSelect
71
- }, {
72
- default: withCtx(() => [
73
- createElementVNode("div", {
74
- id: unref(headingId),
75
- class: "client-libraries-heading"
76
- }, " Client Libraries ", 8, _hoisted_2),
77
- createVNode(unref(TabList), {
78
- "aria-labelledby": unref(headingId),
79
- class: "client-libraries-list"
80
- }, {
81
- default: withCtx(() => [
82
- createVNode(ClientDropdown, {
83
- clientOptions: __props.clientOptions,
84
- eventBus: __props.eventBus,
85
- featuredClients: featuredClients.value,
86
- morePanel: unref(morePanel),
87
- selectedClient: __props.selectedClient
88
- }, null, 8, ["clientOptions", "eventBus", "featuredClients", "morePanel", "selectedClient"])
89
- ]),
90
- _: 1
91
- }, 8, ["aria-labelledby"]),
92
- createVNode(unref(TabPanels), null, {
93
- default: withCtx(() => [
94
- installationInstructions.value?.source || installationInstructions.value?.description ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
95
- installationInstructions.value.description ? (openBlock(), createElementBlock("div", {
96
- key: 0,
97
- class: normalizeClass(["selected-client card-footer -outline-offset-2", installationInstructions.value.source && "rounded-b-none"]),
98
- role: "tabpanel",
99
- tabindex: "0"
100
- }, [
101
- createVNode(unref(ScalarMarkdown), {
102
- value: installationInstructions.value.description
103
- }, null, 8, ["value"])
104
- ], 2)) : createCommentVNode("", true),
105
- installationInstructions.value.source ? (openBlock(), createElementBlock("div", _hoisted_3, [
106
- createVNode(unref(ScalarCodeBlock), {
107
- class: "rounded-b-lg *:first:p-3",
108
- content: installationInstructions.value.source,
109
- copy: "always",
110
- lang: "shell"
111
- }, null, 8, ["content"])
112
- ])) : createCommentVNode("", true)
113
- ], 64)) : unref(isFeaturedClient)(__props.selectedClient) ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(featuredClients.value, (client) => {
114
- return openBlock(), createBlock(unref(TabPanel), {
115
- key: client.id,
116
- class: "selected-client card-footer -outline-offset-2"
117
- }, {
118
- default: withCtx(() => [
119
- createTextVNode(toDisplayString(client.title), 1)
120
- ]),
121
- _: 2
122
- }, 1024);
123
- }), 128)) : (openBlock(), createElementBlock("div", {
124
- key: 2,
125
- id: unref(morePanel),
126
- class: "selected-client card-footer -outline-offset-2",
127
- role: "tabpanel",
128
- tabindex: "0"
129
- }, toDisplayString(selectedClientOption.value?.title), 9, _hoisted_4))
130
- ]),
131
- _: 1
132
- })
133
- ]),
134
- _: 1
135
- }, 8, ["selectedIndex"])
136
- ], 512)) : createCommentVNode("", true);
137
- };
138
- }
139
- });
140
- export {
141
- _sfc_main as default
142
- };
@@ -1,24 +0,0 @@
1
- const FEATURED_CLIENTS = [
2
- "shell/curl",
3
- "ruby/native",
4
- "node/undici",
5
- "php/guzzle",
6
- "python/python3"
7
- ];
8
- const isFeaturedClient = (clientId, featuredClients = FEATURED_CLIENTS) => Boolean(clientId && featuredClients.includes(clientId));
9
- const getFeaturedClients = (clientOptions, featuredClients = FEATURED_CLIENTS) => {
10
- const clientMap = /* @__PURE__ */ new Map();
11
- for (const group of clientOptions) {
12
- for (const option of group.options) {
13
- clientMap.set(option.id, option);
14
- }
15
- }
16
- return featuredClients.flatMap((clientId) => {
17
- const client = clientMap.get(clientId);
18
- return client ?? [];
19
- });
20
- };
21
- export {
22
- getFeaturedClients,
23
- isFeaturedClient
24
- };
@@ -1,7 +0,0 @@
1
- import _sfc_main from "./DownloadLink.vue2.js";
2
- /* empty css */
3
- import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const DownloadLink = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-95e980e1"]]);
5
- export {
6
- DownloadLink as default
7
- };
@@ -1,63 +0,0 @@
1
- import { defineComponent, createElementBlock, createCommentVNode, openBlock, normalizeClass, createElementVNode, withModifiers, createVNode, withCtx, createTextVNode } from "vue";
2
- import Badge from "../../../components/Badge/Badge.vue.js";
3
- const _hoisted_1 = ["href"];
4
- const _sfc_main = /* @__PURE__ */ defineComponent({
5
- __name: "DownloadLink",
6
- props: {
7
- documentDownloadType: {},
8
- eventBus: {},
9
- documentUrl: {}
10
- },
11
- setup(__props) {
12
- const handleDownloadClick = (format) => {
13
- __props.eventBus.emit("ui:download:document", { format });
14
- };
15
- return (_ctx, _cache) => {
16
- return ["yaml", "json", "both"].includes(__props.documentDownloadType) || __props.documentDownloadType === "direct" && __props.documentUrl ? (openBlock(), createElementBlock("div", {
17
- key: 0,
18
- class: normalizeClass(["download-container group", {
19
- "download-both": __props.documentDownloadType === "both"
20
- }])
21
- }, [
22
- __props.documentDownloadType === "direct" && __props.documentUrl ? (openBlock(), createElementBlock("a", {
23
- key: 0,
24
- class: "download-link download-button",
25
- href: __props.documentUrl
26
- }, [..._cache[2] || (_cache[2] = [
27
- createElementVNode("span", null, " Download OpenAPI Document ", -1)
28
- ])], 8, _hoisted_1)) : createCommentVNode("", true),
29
- __props.documentDownloadType === "json" || __props.documentDownloadType === "both" ? (openBlock(), createElementBlock("button", {
30
- key: 1,
31
- class: "download-button",
32
- type: "button",
33
- onClick: _cache[0] || (_cache[0] = withModifiers(() => handleDownloadClick("json"), ["prevent"]))
34
- }, [
35
- _cache[4] || (_cache[4] = createElementVNode("span", null, " Download OpenAPI Document ", -1)),
36
- createVNode(Badge, { class: "extension hidden group-hover:flex" }, {
37
- default: withCtx(() => [..._cache[3] || (_cache[3] = [
38
- createTextVNode("json", -1)
39
- ])]),
40
- _: 1
41
- })
42
- ])) : createCommentVNode("", true),
43
- __props.documentDownloadType === "yaml" || __props.documentDownloadType === "both" ? (openBlock(), createElementBlock("button", {
44
- key: 2,
45
- class: "download-button",
46
- type: "button",
47
- onClick: _cache[1] || (_cache[1] = withModifiers(() => handleDownloadClick("yaml"), ["prevent"]))
48
- }, [
49
- _cache[6] || (_cache[6] = createElementVNode("span", null, " Download OpenAPI Document ", -1)),
50
- createVNode(Badge, { class: "extension hidden group-hover:flex" }, {
51
- default: withCtx(() => [..._cache[5] || (_cache[5] = [
52
- createTextVNode("yaml", -1)
53
- ])]),
54
- _: 1
55
- })
56
- ])) : createCommentVNode("", true)
57
- ], 2)) : createCommentVNode("", true);
58
- };
59
- }
60
- });
61
- export {
62
- _sfc_main as default
63
- };