@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
@@ -1,4 +0,0 @@
1
- import _sfc_main from "./Contact.vue.js";
2
- export {
3
- _sfc_main as default
4
- };
@@ -1,40 +0,0 @@
1
- import { defineComponent, createElementBlock, openBlock, createVNode, createElementVNode, unref, toDisplayString, Fragment } from "vue";
2
- import { ScalarIconGavel } from "@scalar/icons";
3
- const _hoisted_1 = { class: "group flex h-fit items-center last:border-r-0 xl:border-r xl:first:ml-auto" };
4
- const _hoisted_2 = ["href"];
5
- const _hoisted_3 = { class: "ml-1 empty:hidden" };
6
- const _hoisted_4 = { class: "ml-1 empty:hidden" };
7
- const _sfc_main = /* @__PURE__ */ defineComponent({
8
- __name: "License",
9
- props: {
10
- value: {}
11
- },
12
- setup(__props) {
13
- return (_ctx, _cache) => {
14
- return openBlock(), createElementBlock("div", _hoisted_1, [
15
- __props.value?.url ? (openBlock(), createElementBlock("a", {
16
- key: 0,
17
- class: "text-c-1 hover:bg-b-2 mr-2 flex min-h-7 min-w-7 items-center rounded-lg border px-2 py-1 no-underline group-last:mr-0 xl:border-none",
18
- href: __props.value.url,
19
- target: "_blank",
20
- rel: "noopener noreferrer"
21
- }, [
22
- createVNode(unref(ScalarIconGavel), {
23
- weight: "bold",
24
- class: "size-3 text-current"
25
- }),
26
- createElementVNode("span", _hoisted_3, toDisplayString(__props.value?.name || __props.value.identifier || __props.value.url), 1)
27
- ], 8, _hoisted_2)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
28
- createVNode(unref(ScalarIconGavel), {
29
- weight: "bold",
30
- class: "size-3 text-current"
31
- }),
32
- createElementVNode("span", _hoisted_4, toDisplayString(__props.value?.name), 1)
33
- ], 64))
34
- ]);
35
- };
36
- }
37
- });
38
- export {
39
- _sfc_main as default
40
- };
@@ -1,4 +0,0 @@
1
- import _sfc_main from "./License.vue.js";
2
- export {
3
- _sfc_main as default
4
- };
@@ -1,34 +0,0 @@
1
- import { defineComponent, createElementBlock, createCommentVNode, openBlock, createElementVNode, createVNode, unref } from "vue";
2
- import { ScalarIconScroll } from "@scalar/icons";
3
- const _hoisted_1 = {
4
- key: 0,
5
- class: "group flex items-center last:border-r-0 xl:border-r xl:first:ml-auto"
6
- };
7
- const _hoisted_2 = ["href"];
8
- const _sfc_main = /* @__PURE__ */ defineComponent({
9
- __name: "TermsOfService",
10
- props: {
11
- value: {}
12
- },
13
- setup(__props) {
14
- return (_ctx, _cache) => {
15
- return __props.value ? (openBlock(), createElementBlock("div", _hoisted_1, [
16
- createElementVNode("a", {
17
- class: "text-c-1 hover:bg-b-2 mr-2 flex min-h-7 min-w-7 items-center rounded-lg border px-2 py-1 no-underline group-last:mr-0 xl:border-none",
18
- href: __props.value,
19
- target: "_blank",
20
- rel: "noopener noreferrer"
21
- }, [
22
- createVNode(unref(ScalarIconScroll), {
23
- weight: "bold",
24
- class: "size-3 text-current"
25
- }),
26
- _cache[0] || (_cache[0] = createElementVNode("span", { class: "ml-1 empty:hidden" }, "Terms of Service", -1))
27
- ], 8, _hoisted_2)
28
- ])) : createCommentVNode("", true);
29
- };
30
- }
31
- });
32
- export {
33
- _sfc_main as default
34
- };
@@ -1,4 +0,0 @@
1
- import _sfc_main from "./TermsOfService.vue.js";
2
- export {
3
- _sfc_main as default
4
- };
@@ -1,54 +0,0 @@
1
- import { defineComponent, computed, createElementBlock, createCommentVNode, openBlock, createVNode, unref, withCtx, createElementVNode, toDisplayString, normalizeClass } from "vue";
2
- import { ScalarListbox } from "@scalar/components";
3
- import { ScalarIconCaretDown } from "@scalar/icons";
4
- const _hoisted_1 = {
5
- key: 0,
6
- class: "document-selector p-3 pb-0"
7
- };
8
- const _hoisted_2 = {
9
- class: "group/dropdown-label text-c-2 hover:text-c-1 flex w-full cursor-pointer items-center gap-1 font-medium",
10
- type: "button"
11
- };
12
- const _hoisted_3 = { class: "overflow-hidden text-base text-ellipsis" };
13
- const _sfc_main = /* @__PURE__ */ defineComponent({
14
- __name: "DocumentSelector",
15
- props: {
16
- options: {},
17
- modelValue: {}
18
- },
19
- emits: ["update:modelValue"],
20
- setup(__props, { emit: __emit }) {
21
- const props = __props;
22
- const emit = __emit;
23
- const formattedOptions = computed(
24
- () => props.options.map((o) => ({ id: o.id, label: o.label }))
25
- );
26
- const selected = computed(
27
- () => formattedOptions.value.find((o) => o.id === props.modelValue)
28
- );
29
- return (_ctx, _cache) => {
30
- return __props.options.length > 1 ? (openBlock(), createElementBlock("div", _hoisted_1, [
31
- createVNode(unref(ScalarListbox), {
32
- modelValue: selected.value,
33
- options: formattedOptions.value,
34
- resize: "",
35
- "onUpdate:modelValue": _cache[0] || (_cache[0] = (e) => emit("update:modelValue", e.id))
36
- }, {
37
- default: withCtx(({ open }) => [
38
- createElementVNode("button", _hoisted_2, [
39
- createElementVNode("span", _hoisted_3, toDisplayString(selected.value?.label || "Select API"), 1),
40
- createVNode(unref(ScalarIconCaretDown), {
41
- class: normalizeClass(["size-3 text-current transition-transform", { "rotate-180": open }]),
42
- weight: "bold"
43
- }, null, 8, ["class"])
44
- ])
45
- ]),
46
- _: 1
47
- }, 8, ["modelValue", "options"])
48
- ])) : createCommentVNode("", true);
49
- };
50
- }
51
- });
52
- export {
53
- _sfc_main as default
54
- };
@@ -1,4 +0,0 @@
1
- import _sfc_main from "./DocumentSelector.vue.js";
2
- export {
3
- _sfc_main as default
4
- };
@@ -1,4 +0,0 @@
1
- import _sfc_main from "./SpecificationExtension.vue2.js";
2
- export {
3
- _sfc_main as default
4
- };
@@ -1,52 +0,0 @@
1
- import { defineComponent, computed, createElementBlock, createCommentVNode, openBlock, Fragment, renderList, createBlock, unref, withCtx, resolveDynamicComponent, mergeProps } from "vue";
2
- import { ScalarErrorBoundary } from "@scalar/components";
3
- import { usePluginManager } from "../../plugins/hooks/usePluginManager.js";
4
- const _hoisted_1 = {
5
- key: 0,
6
- class: "text-base"
7
- };
8
- const _sfc_main = /* @__PURE__ */ defineComponent({
9
- __name: "SpecificationExtension",
10
- props: {
11
- value: {}
12
- },
13
- setup(__props) {
14
- const { getSpecificationExtensions } = usePluginManager();
15
- function getCustomExtensionNames(value) {
16
- return Object.keys(value ?? {}).filter(
17
- (item) => item.startsWith("x-")
18
- );
19
- }
20
- function getCustomOpenApiExtensionComponents(extensionNames) {
21
- return extensionNames.flatMap((name) => getSpecificationExtensions(name)).filter((extension) => extension.component);
22
- }
23
- const customExtensionNames = computed(() => getCustomExtensionNames(__props.value));
24
- const customExtensions = computed(
25
- () => getCustomOpenApiExtensionComponents(customExtensionNames.value)
26
- );
27
- return (_ctx, _cache) => {
28
- return typeof __props.value === "object" && customExtensions.value.length ? (openBlock(), createElementBlock("div", _hoisted_1, [
29
- (openBlock(true), createElementBlock(Fragment, null, renderList(customExtensions.value, (extension) => {
30
- return openBlock(), createBlock(unref(ScalarErrorBoundary), null, {
31
- default: withCtx(() => [
32
- extension.renderer ? (openBlock(), createBlock(resolveDynamicComponent(extension.renderer), mergeProps({
33
- key: 0,
34
- ref_for: true
35
- }, {
36
- [extension.name]: __props.value?.[extension.name],
37
- component: extension.component
38
- }), null, 16)) : (openBlock(), createBlock(resolveDynamicComponent(extension.component), mergeProps({
39
- key: 1,
40
- ref_for: true
41
- }, { [extension.name]: __props.value?.[extension.name] }), null, 16))
42
- ]),
43
- _: 2
44
- }, 1024);
45
- }), 256))
46
- ])) : createCommentVNode("", true);
47
- };
48
- }
49
- });
50
- export {
51
- _sfc_main as default
52
- };
@@ -1,9 +0,0 @@
1
- const getXKeysFromObject = (object) => {
2
- if (!object) {
3
- return {};
4
- }
5
- return Object.fromEntries(Object.entries(object).filter(([key]) => key.startsWith("x-")));
6
- };
7
- export {
8
- getXKeysFromObject
9
- };
@@ -1,7 +0,0 @@
1
- import _sfc_main from "./TestRequestButton.vue2.js";
2
- /* empty css */
3
- import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
4
- const TestRequestButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-342ba62a"]]);
5
- export {
6
- TestRequestButton as default
7
- };
@@ -1,46 +0,0 @@
1
- import { defineComponent, createElementBlock, openBlock, withModifiers, createVNode, createElementVNode, unref, withCtx, createTextVNode, toDisplayString } from "vue";
2
- import { ScalarIconPlay } from "@scalar/icons";
3
- import ScreenReader from "../../components/ScreenReader.vue.js";
4
- const _hoisted_1 = ["method"];
5
- const _sfc_main = /* @__PURE__ */ defineComponent({
6
- __name: "TestRequestButton",
7
- props: {
8
- id: {},
9
- method: {},
10
- path: {},
11
- eventBus: {},
12
- exampleName: {}
13
- },
14
- setup(__props) {
15
- const handleClick = () => {
16
- const payload = {
17
- id: __props.id,
18
- ...__props.exampleName && { exampleName: __props.exampleName }
19
- };
20
- __props.eventBus.emit("ui:open:client-modal", payload);
21
- };
22
- return (_ctx, _cache) => {
23
- return openBlock(), createElementBlock("button", {
24
- class: "show-api-client-button",
25
- method: __props.method,
26
- type: "button",
27
- onClick: withModifiers(handleClick, ["stop"])
28
- }, [
29
- createVNode(unref(ScalarIconPlay), {
30
- class: "size-3",
31
- weight: "fill"
32
- }),
33
- _cache[0] || (_cache[0] = createElementVNode("span", null, "Test Request", -1)),
34
- createVNode(ScreenReader, null, {
35
- default: withCtx(() => [
36
- createTextVNode("(" + toDisplayString(__props.method) + " " + toDisplayString(__props.path) + ")", 1)
37
- ]),
38
- _: 1
39
- })
40
- ], 8, _hoisted_1);
41
- };
42
- }
43
- });
44
- export {
45
- _sfc_main as default
46
- };
@@ -1,35 +0,0 @@
1
- import { defineComponent, computed, createElementBlock, createCommentVNode, openBlock, Fragment, renderList, createBlock, unref, withCtx, createTextVNode, toDisplayString } from "vue";
2
- import Badge from "../../components/Badge/Badge.vue.js";
3
- const _sfc_main = /* @__PURE__ */ defineComponent({
4
- __name: "XBadges",
5
- props: {
6
- position: {},
7
- badges: {}
8
- },
9
- setup(__props) {
10
- const filteredBadges = computed(() => {
11
- if (Array.isArray(__props.badges)) {
12
- return __props.badges.filter(
13
- (badge) => badge.position === __props.position || __props.position === "after" && !badge.position
14
- );
15
- }
16
- return [];
17
- });
18
- return (_ctx, _cache) => {
19
- return filteredBadges.value.length ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(filteredBadges.value, (badge) => {
20
- return openBlock(), createBlock(unref(Badge), {
21
- key: badge.name,
22
- color: badge.color
23
- }, {
24
- default: withCtx(() => [
25
- createTextVNode(toDisplayString(badge.name), 1)
26
- ]),
27
- _: 2
28
- }, 1032, ["color"]);
29
- }), 128)) : createCommentVNode("", true);
30
- };
31
- }
32
- });
33
- export {
34
- _sfc_main as default
35
- };
@@ -1,4 +0,0 @@
1
- import _sfc_main from "./XBadges.vue.js";
2
- export {
3
- _sfc_main as default
4
- };
@@ -1,9 +0,0 @@
1
- const getSystemModePreference = () => {
2
- if (typeof window === "undefined" || typeof window?.matchMedia !== "function") {
3
- return "light";
4
- }
5
- return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
6
- };
7
- export {
8
- getSystemModePreference
9
- };
@@ -1,45 +0,0 @@
1
- import { isDefined, isJsonString } from "@scalar/oas-utils/helpers";
2
- import { toJson, normalize, toYaml } from "@scalar/openapi-parser";
3
- function formatContent(content, isJson) {
4
- if (isJson && !isJsonString(content)) {
5
- return toJson(normalize(content));
6
- }
7
- if (!isJson && isJsonString(content)) {
8
- return toYaml(normalize(content));
9
- }
10
- return content;
11
- }
12
- function createClickEvent() {
13
- try {
14
- return new MouseEvent("click", {
15
- bubbles: true,
16
- cancelable: true,
17
- view: window
18
- });
19
- } catch {
20
- return new MouseEvent("click", {
21
- bubbles: true,
22
- cancelable: true
23
- });
24
- }
25
- }
26
- function downloadDocument(content, filename, format) {
27
- const isJson = format === "json" || !isDefined(format) && isJsonString(content);
28
- const formattedContent = formatContent(content, isJson);
29
- const extension = isJson ? ".json" : ".yaml";
30
- const mimeType = isJson ? "application/json" : "application/x-yaml";
31
- const contentFilename = filename ? filename + extension : "openapi" + extension;
32
- const blob = new Blob([formattedContent], { type: mimeType });
33
- const data = URL.createObjectURL(blob);
34
- const link = document.createElement("a");
35
- link.href = data;
36
- link.download = contentFilename;
37
- link.dispatchEvent(createClickEvent());
38
- setTimeout(() => {
39
- window.URL.revokeObjectURL(data);
40
- link.remove();
41
- }, 100);
42
- }
43
- export {
44
- downloadDocument
45
- };
@@ -1,63 +0,0 @@
1
- const sanitizeBasePath = (basePath) => {
2
- return basePath.replace(/^\/+|\/+$/g, "");
3
- };
4
- const getIdFromHash = (location, slugPrefix) => {
5
- const url = typeof location === "string" ? new URL(location) : location;
6
- const base = decodeURIComponent(url.hash.slice(1));
7
- return slugPrefix ? `${slugPrefix}${base ? "/" : ""}${base}` : base;
8
- };
9
- const getIdFromPath = (location, basePath, slugPrefix) => {
10
- const url = typeof location === "string" ? new URL(location) : location;
11
- const sanitized = sanitizeBasePath(basePath);
12
- const basePathWithSlash = sanitized ? `/${sanitized.split("/").map((segment) => encodeURIComponent(segment)).join("/")}` : "";
13
- if (url.pathname.startsWith(basePathWithSlash)) {
14
- const remainder = url.pathname.slice(basePathWithSlash.length);
15
- const base = decodeURIComponent(remainder.startsWith("/") ? remainder.slice(1) : remainder);
16
- return slugPrefix ? `${slugPrefix}${base ? "/" : ""}${base}` : base;
17
- }
18
- return slugPrefix ?? "";
19
- };
20
- const getIdFromUrl = (url, basePath, slugPrefix) => {
21
- return typeof basePath === "string" ? getIdFromPath(url, basePath, slugPrefix) : getIdFromHash(url, slugPrefix);
22
- };
23
- const stripFirstSegment = (id) => {
24
- const hasTrailingSlash = id.endsWith("/");
25
- const segments = id.split("/").filter(Boolean).slice(1);
26
- const result = segments.join("/");
27
- return hasTrailingSlash && result ? `${result}/` : result;
28
- };
29
- const makeUrlFromId = (_id, basePath, isMultiDocument) => {
30
- if (typeof window === "undefined") {
31
- return void 0;
32
- }
33
- const id = isMultiDocument ? _id : stripFirstSegment(_id);
34
- const url = new URL(window.location.href);
35
- if (typeof basePath === "string") {
36
- const base = sanitizeBasePath(basePath);
37
- url.pathname = `${base}/${id}`;
38
- } else {
39
- url.hash = id;
40
- }
41
- return url;
42
- };
43
- const getSchemaParamsFromId = (id) => {
44
- const matcher = id.match(/(.*)(\.body\.|\.path\.|\.query\.|\.header\.)(.*)/);
45
- if (matcher && typeof matcher[1] === "string" && typeof matcher[2] === "string") {
46
- return {
47
- rawId: matcher[1],
48
- params: matcher[2].slice(1) + matcher[3]
49
- };
50
- }
51
- return {
52
- rawId: id,
53
- params: ""
54
- };
55
- };
56
- export {
57
- getIdFromHash,
58
- getIdFromPath,
59
- getIdFromUrl,
60
- getSchemaParamsFromId,
61
- makeUrlFromId,
62
- sanitizeBasePath
63
- };
@@ -1,160 +0,0 @@
1
- import { watchDebounced } from "@vueuse/core";
2
- import { nanoid } from "nanoid";
3
- import { computed, ref, reactive, onBeforeUnmount, nextTick } from "vue";
4
- import { getSchemaParamsFromId } from "./id-routing.js";
5
- const priorityQueue = reactive(/* @__PURE__ */ new Set());
6
- const pendingQueue = reactive(/* @__PURE__ */ new Set());
7
- const readyQueue = reactive(/* @__PURE__ */ new Set());
8
- const isRunning = ref(false);
9
- const SCROLL_RETRY_MS = 3e3;
10
- const firstLazyLoadComplete = ref(false);
11
- const intersectionBlockers = reactive(/* @__PURE__ */ new Set());
12
- const onRenderComplete = /* @__PURE__ */ new Set();
13
- const addLazyCompleteCallback = (callback) => {
14
- if (callback) {
15
- onRenderComplete.add(callback);
16
- }
17
- };
18
- const blockIntersection = () => {
19
- const blockId = nanoid();
20
- intersectionBlockers.add(blockId);
21
- return () => setTimeout(() => intersectionBlockers.delete(blockId), 100);
22
- };
23
- const intersectionEnabled = computed(() => intersectionBlockers.size === 0);
24
- const runLazyBus = () => {
25
- if (typeof window === "undefined") {
26
- return;
27
- }
28
- const unblock = blockIntersection();
29
- const processQueue = async () => {
30
- if (pendingQueue.size > 0 || priorityQueue.size > 0) {
31
- isRunning.value = true;
32
- for (const id of [...pendingQueue, ...priorityQueue]) {
33
- if (!readyQueue.has(id)) {
34
- readyQueue.add(id);
35
- }
36
- pendingQueue.delete(id);
37
- priorityQueue.delete(id);
38
- }
39
- }
40
- await nextTick();
41
- onRenderComplete.forEach((fn) => fn());
42
- onRenderComplete.clear();
43
- unblock();
44
- isRunning.value = false;
45
- firstLazyLoadComplete.value = true;
46
- };
47
- if (window.requestIdleCallback) {
48
- window.requestIdleCallback(processQueue, { timeout: 1500 });
49
- } else {
50
- nextTick(processQueue);
51
- }
52
- };
53
- watchDebounced(
54
- [() => pendingQueue.size, () => priorityQueue.size, () => isRunning.value],
55
- () => {
56
- if ((pendingQueue.size > 0 || priorityQueue.size > 0) && !isRunning.value) {
57
- runLazyBus();
58
- }
59
- },
60
- { debounce: 300, maxWait: 1500 }
61
- );
62
- const addToPendingQueue = (id) => {
63
- if (!!id && !readyQueue.has(id) && !priorityQueue.has(id)) {
64
- pendingQueue.add(id);
65
- }
66
- };
67
- const addToPriorityQueue = (id) => {
68
- if (id && !priorityQueue.has(id)) {
69
- priorityQueue.add(id);
70
- }
71
- };
72
- const resetLazyElement = (id) => {
73
- priorityQueue.delete(id);
74
- pendingQueue.delete(id);
75
- readyQueue.delete(id);
76
- };
77
- function useLazyBus(id) {
78
- addToPendingQueue(id);
79
- onBeforeUnmount(() => {
80
- resetLazyElement(id);
81
- });
82
- return {
83
- isReady: computed(() => typeof window === "undefined" || priorityQueue.has(id) || readyQueue.has(id))
84
- };
85
- }
86
- const scrollToLazy = (id, setExpanded, getEntryById) => {
87
- const item = getEntryById(id);
88
- const isLazy = !readyQueue.has(id) || item?.children?.some((child) => !readyQueue.has(child.id));
89
- const unfreeze = isLazy ? freeze(id) : void 0;
90
- addLazyCompleteCallback(unfreeze);
91
- const unblock = blockIntersection();
92
- const { rawId } = getSchemaParamsFromId(id);
93
- addToPriorityQueue(id);
94
- addToPriorityQueue(rawId);
95
- if (item?.children) {
96
- item.children.slice(0, 2).forEach((child) => {
97
- addToPriorityQueue(child.id);
98
- });
99
- }
100
- if (item?.parent) {
101
- const parent = getEntryById(item.parent.id);
102
- const elementIdx = parent?.children?.findIndex((child) => child.id === id);
103
- if (elementIdx !== void 0 && elementIdx >= 0) {
104
- parent?.children?.slice(elementIdx, elementIdx + 2).forEach((child) => {
105
- addToPriorityQueue(child.id);
106
- });
107
- }
108
- }
109
- tryScroll(id, Date.now() + SCROLL_RETRY_MS, unblock, unfreeze);
110
- setExpanded(rawId, true);
111
- const addParents = (currentId) => {
112
- const parent = getEntryById(currentId)?.parent;
113
- if (parent) {
114
- addToPriorityQueue(parent.id);
115
- setExpanded(parent.id, true);
116
- addParents(parent.id);
117
- }
118
- };
119
- addParents(rawId);
120
- };
121
- const tryScroll = (id, stopTime, onComplete, onFailure) => {
122
- const element = document.getElementById(id);
123
- if (element) {
124
- element.scrollIntoView({
125
- block: "start"
126
- });
127
- onComplete();
128
- } else if (Date.now() < stopTime) {
129
- requestAnimationFrame(() => tryScroll(id, stopTime, onComplete));
130
- } else {
131
- onComplete();
132
- onFailure?.();
133
- }
134
- };
135
- const freeze = (id) => {
136
- let stop = false;
137
- const runFrame = (stopAfterFrame) => {
138
- const element = document.getElementById(id);
139
- if (element) {
140
- element.scrollIntoView({
141
- block: "start"
142
- });
143
- }
144
- if (!stopAfterFrame) {
145
- requestAnimationFrame(() => runFrame(stop));
146
- }
147
- };
148
- runFrame(false);
149
- return () => {
150
- stop = true;
151
- };
152
- };
153
- export {
154
- addToPriorityQueue,
155
- blockIntersection,
156
- firstLazyLoadComplete,
157
- intersectionEnabled,
158
- scrollToLazy,
159
- useLazyBus
160
- };
@@ -1,17 +0,0 @@
1
- import { isClient } from "@scalar/api-client/v2/blocks/operation-code-sample";
2
- import { clientStorage, authStorage } from "./storage.js";
3
- const loadClientFromStorage = (store) => {
4
- const storedClient = clientStorage().get();
5
- if (isClient(storedClient) && !store.workspace["x-scalar-default-client"]) {
6
- store.update("x-scalar-default-client", storedClient);
7
- }
8
- };
9
- const loadAuthFromStorage = (store, slug) => {
10
- const authPersistence = authStorage();
11
- const auth = authPersistence.getAuth(slug);
12
- store.auth.load({ [slug]: auth });
13
- };
14
- export {
15
- loadAuthFromStorage,
16
- loadClientFromStorage
17
- };
@@ -1,27 +0,0 @@
1
- import { watch } from "vue";
2
- const mapConfigPlugins = (config) => {
3
- const plugin = { hooks: {} };
4
- watch(
5
- [() => config.value.onBeforeRequest, () => config.value.onRequestSent],
6
- ([onBeforeRequest, onRequestSent]) => {
7
- if (!plugin.hooks) {
8
- plugin.hooks = {};
9
- }
10
- plugin.hooks.beforeRequest = onBeforeRequest ? async (payload) => {
11
- const result = await onBeforeRequest(payload);
12
- if (result === void 0) {
13
- return payload;
14
- }
15
- return result;
16
- } : void 0;
17
- plugin.hooks.responseReceived = onRequestSent ? (payload) => {
18
- onRequestSent(payload.request.url);
19
- } : void 0;
20
- },
21
- { immediate: true }
22
- );
23
- return [plugin];
24
- };
25
- export {
26
- mapConfigPlugins
27
- };