@scalar/api-reference 1.49.3 → 1.49.4

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 (620) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/_virtual/_plugin-vue_export-helper.js +8 -0
  3. package/dist/blocks/index.js +4 -2
  4. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts.map +1 -1
  5. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js +9 -0
  6. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js.map +1 -0
  7. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.script.js +106 -0
  8. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.script.js.map +1 -0
  9. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.js +9 -0
  10. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.js.map +1 -0
  11. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.script.js +121 -0
  12. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.script.js.map +1 -0
  13. package/dist/blocks/scalar-client-selector-block/helpers/featured-clients.js +27 -0
  14. package/dist/blocks/scalar-client-selector-block/helpers/featured-clients.js.map +1 -0
  15. package/dist/blocks/scalar-client-selector-block/index.d.ts +1 -1
  16. package/dist/blocks/scalar-info-block/components/DownloadLink.vue.js +9 -0
  17. package/dist/blocks/scalar-info-block/components/DownloadLink.vue.js.map +1 -0
  18. package/dist/blocks/scalar-info-block/components/DownloadLink.vue.script.js +55 -0
  19. package/dist/blocks/scalar-info-block/components/DownloadLink.vue.script.js.map +1 -0
  20. package/dist/blocks/scalar-info-block/components/InfoBlock.vue.js +7 -0
  21. package/dist/blocks/scalar-info-block/components/InfoBlock.vue.js.map +1 -0
  22. package/dist/blocks/scalar-info-block/components/InfoBlock.vue.script.js +69 -0
  23. package/dist/blocks/scalar-info-block/components/InfoBlock.vue.script.js.map +1 -0
  24. package/dist/blocks/scalar-info-block/components/InfoDescription.vue.js +9 -0
  25. package/dist/blocks/scalar-info-block/components/InfoDescription.vue.js.map +1 -0
  26. package/dist/blocks/scalar-info-block/components/InfoDescription.vue.script.js +68 -0
  27. package/dist/blocks/scalar-info-block/components/InfoDescription.vue.script.js.map +1 -0
  28. package/dist/blocks/scalar-info-block/components/InfoLinks.vue.js +7 -0
  29. package/dist/blocks/scalar-info-block/components/InfoLinks.vue.js.map +1 -0
  30. package/dist/blocks/scalar-info-block/components/InfoLinks.vue.script.js +40 -0
  31. package/dist/blocks/scalar-info-block/components/InfoLinks.vue.script.js.map +1 -0
  32. package/dist/blocks/scalar-info-block/components/InfoMarkdownSection.vue.js +7 -0
  33. package/dist/blocks/scalar-info-block/components/InfoMarkdownSection.vue.js.map +1 -0
  34. package/dist/blocks/scalar-info-block/components/InfoMarkdownSection.vue.script.js +35 -0
  35. package/dist/blocks/scalar-info-block/components/InfoMarkdownSection.vue.script.js.map +1 -0
  36. package/dist/blocks/scalar-info-block/components/InfoVersion.vue.js +7 -0
  37. package/dist/blocks/scalar-info-block/components/InfoVersion.vue.js.map +1 -0
  38. package/dist/blocks/scalar-info-block/components/InfoVersion.vue.script.js +25 -0
  39. package/dist/blocks/scalar-info-block/components/InfoVersion.vue.script.js.map +1 -0
  40. package/dist/blocks/scalar-info-block/components/IntroductionCard.vue.js +9 -0
  41. package/dist/blocks/scalar-info-block/components/IntroductionCard.vue.js.map +1 -0
  42. package/dist/blocks/scalar-info-block/components/IntroductionCard.vue.script.js +15 -0
  43. package/dist/blocks/scalar-info-block/components/IntroductionCard.vue.script.js.map +1 -0
  44. package/dist/blocks/scalar-info-block/components/IntroductionCardItem.vue.js +14 -0
  45. package/dist/blocks/scalar-info-block/components/IntroductionCardItem.vue.js.map +1 -0
  46. package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.js +9 -0
  47. package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.js.map +1 -0
  48. package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.script.js +92 -0
  49. package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.script.js.map +1 -0
  50. package/dist/blocks/scalar-info-block/components/OpenApiVersion.vue.js +7 -0
  51. package/dist/blocks/scalar-info-block/components/OpenApiVersion.vue.js.map +1 -0
  52. package/dist/blocks/scalar-info-block/components/OpenApiVersion.vue.script.js +19 -0
  53. package/dist/blocks/scalar-info-block/components/OpenApiVersion.vue.script.js.map +1 -0
  54. package/dist/blocks/scalar-info-block/index.d.ts +2 -2
  55. package/dist/blocks/scalar-server-selector-block/components/Selector.vue.js +7 -0
  56. package/dist/blocks/scalar-server-selector-block/components/Selector.vue.js.map +1 -0
  57. package/dist/blocks/scalar-server-selector-block/components/Selector.vue.script.js +71 -0
  58. package/dist/blocks/scalar-server-selector-block/components/Selector.vue.script.js.map +1 -0
  59. package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.js +7 -0
  60. package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.js.map +1 -0
  61. package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.script.js +69 -0
  62. package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.script.js.map +1 -0
  63. package/dist/blocks/scalar-server-selector-block/index.d.ts +1 -1
  64. package/dist/browser/standalone.js +35377 -34973
  65. package/dist/browser/webpack-stats.json +1 -1
  66. package/dist/components/AgentScalar/AgentScalarButton.vue.js +7 -0
  67. package/dist/components/AgentScalar/AgentScalarButton.vue.js.map +1 -0
  68. package/dist/components/AgentScalar/AgentScalarButton.vue.script.js +21 -0
  69. package/dist/components/AgentScalar/AgentScalarButton.vue.script.js.map +1 -0
  70. package/dist/components/AgentScalar/AgentScalarChatInterface.vue.js +7 -0
  71. package/dist/components/AgentScalar/AgentScalarChatInterface.vue.js.map +1 -0
  72. package/dist/{AgentScalarChatInterface-MUbtSqMw.js → components/AgentScalar/AgentScalarChatInterface.vue.script.js} +5 -6
  73. package/dist/components/AgentScalar/AgentScalarChatInterface.vue.script.js.map +1 -0
  74. package/dist/components/AgentScalar/AgentScalarDrawer.vue.d.ts +0 -1
  75. package/dist/components/AgentScalar/AgentScalarDrawer.vue.d.ts.map +1 -1
  76. package/dist/components/AgentScalar/AgentScalarDrawer.vue.js +9 -0
  77. package/dist/components/AgentScalar/AgentScalarDrawer.vue.js.map +1 -0
  78. package/dist/components/AgentScalar/AgentScalarDrawer.vue.script.js +65 -0
  79. package/dist/components/AgentScalar/AgentScalarDrawer.vue.script.js.map +1 -0
  80. package/dist/components/AgentScalar/OpenMCPButton.vue.js +9 -0
  81. package/dist/components/AgentScalar/OpenMCPButton.vue.js.map +1 -0
  82. package/dist/components/AgentScalar/OpenMCPButton.vue.script.js +184 -0
  83. package/dist/components/AgentScalar/OpenMCPButton.vue.script.js.map +1 -0
  84. package/dist/components/AgentScalar/index.d.ts +3 -3
  85. package/dist/components/Anchor/Anchor.vue.js +7 -0
  86. package/dist/components/Anchor/Anchor.vue.js.map +1 -0
  87. package/dist/components/Anchor/Anchor.vue.script.js +40 -0
  88. package/dist/components/Anchor/Anchor.vue.script.js.map +1 -0
  89. package/dist/components/Anchor/WithBreadcrumb.vue.js +7 -0
  90. package/dist/components/Anchor/WithBreadcrumb.vue.js.map +1 -0
  91. package/dist/components/Anchor/WithBreadcrumb.vue.script.js +32 -0
  92. package/dist/components/Anchor/WithBreadcrumb.vue.script.js.map +1 -0
  93. package/dist/components/Anchor/index.d.ts +2 -2
  94. package/dist/components/ApiReference.vue.d.ts.map +1 -1
  95. package/dist/components/ApiReference.vue.js +12 -0
  96. package/dist/components/ApiReference.vue.js.map +1 -0
  97. package/dist/components/ApiReference.vue.script.js +662 -0
  98. package/dist/components/ApiReference.vue.script.js.map +1 -0
  99. package/dist/components/Badge/Badge.vue.js +9 -0
  100. package/dist/components/Badge/Badge.vue.js.map +1 -0
  101. package/dist/components/Badge/Badge.vue.script.js +22 -0
  102. package/dist/components/Badge/Badge.vue.script.js.map +1 -0
  103. package/dist/components/Badge/index.d.ts +1 -1
  104. package/dist/components/ClassicHeader.vue.js +16 -0
  105. package/dist/components/ClassicHeader.vue.js.map +1 -0
  106. package/dist/components/Content/Auth/Auth.vue.js +7 -0
  107. package/dist/components/Content/Auth/Auth.vue.js.map +1 -0
  108. package/dist/components/Content/Auth/Auth.vue.script.js +70 -0
  109. package/dist/components/Content/Auth/Auth.vue.script.js.map +1 -0
  110. package/dist/components/Content/Auth/helpers/get-default-security.js +64 -0
  111. package/dist/components/Content/Auth/helpers/get-default-security.js.map +1 -0
  112. package/dist/components/Content/Auth/index.d.ts +1 -1
  113. package/dist/components/Content/Content.vue.js +8 -0
  114. package/dist/components/Content/Content.vue.js.map +1 -0
  115. package/dist/components/Content/Content.vue.script.js +192 -0
  116. package/dist/components/Content/Content.vue.script.js.map +1 -0
  117. package/dist/components/Content/Models/Model.vue.js +7 -0
  118. package/dist/components/Content/Models/Model.vue.js.map +1 -0
  119. package/dist/components/Content/Models/Model.vue.script.js +61 -0
  120. package/dist/components/Content/Models/Model.vue.script.js.map +1 -0
  121. package/dist/components/Content/Models/ModelTag.vue.js +7 -0
  122. package/dist/components/Content/Models/ModelTag.vue.js.map +1 -0
  123. package/dist/components/Content/Models/ModelTag.vue.script.js +69 -0
  124. package/dist/components/Content/Models/ModelTag.vue.script.js.map +1 -0
  125. package/dist/components/Content/Models/components/ClassicLayout.vue.js +9 -0
  126. package/dist/components/Content/Models/components/ClassicLayout.vue.js.map +1 -0
  127. package/dist/components/Content/Models/components/ClassicLayout.vue.script.js +81 -0
  128. package/dist/components/Content/Models/components/ClassicLayout.vue.script.js.map +1 -0
  129. package/dist/components/Content/Models/components/ModernLayout.vue.js +7 -0
  130. package/dist/components/Content/Models/components/ModernLayout.vue.js.map +1 -0
  131. package/dist/components/Content/Models/components/ModernLayout.vue.script.js +66 -0
  132. package/dist/components/Content/Models/components/ModernLayout.vue.script.js.map +1 -0
  133. package/dist/components/Content/Models/index.d.ts +2 -2
  134. package/dist/components/Content/Operations/TraversedEntry.vue.js +7 -0
  135. package/dist/components/Content/Operations/TraversedEntry.vue.js.map +1 -0
  136. package/dist/components/Content/Operations/TraversedEntry.vue.script.js +213 -0
  137. package/dist/components/Content/Operations/TraversedEntry.vue.script.js.map +1 -0
  138. package/dist/components/Content/Schema/RenderString.vue.js +7 -0
  139. package/dist/components/Content/Schema/RenderString.vue.js.map +1 -0
  140. package/dist/components/Content/Schema/RenderString.vue.script.js +36 -0
  141. package/dist/components/Content/Schema/RenderString.vue.script.js.map +1 -0
  142. package/dist/components/Content/Schema/Schema.vue.js +9 -0
  143. package/dist/components/Content/Schema/Schema.vue.js.map +1 -0
  144. package/dist/components/Content/Schema/Schema.vue.script.js +184 -0
  145. package/dist/components/Content/Schema/Schema.vue.script.js.map +1 -0
  146. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts +1 -1
  147. package/dist/components/Content/Schema/SchemaComposition.vue.js +7 -0
  148. package/dist/components/Content/Schema/SchemaComposition.vue.js.map +1 -0
  149. package/dist/components/Content/Schema/SchemaComposition.vue.script.js +146 -0
  150. package/dist/components/Content/Schema/SchemaComposition.vue.script.js.map +1 -0
  151. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.js +9 -0
  152. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.js.map +1 -0
  153. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.script.js +29 -0
  154. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.script.js.map +1 -0
  155. package/dist/components/Content/Schema/SchemaEnums.vue.js +9 -0
  156. package/dist/components/Content/Schema/SchemaEnums.vue.js.map +1 -0
  157. package/dist/components/Content/Schema/SchemaEnums.vue.script.js +108 -0
  158. package/dist/components/Content/Schema/SchemaEnums.vue.script.js.map +1 -0
  159. package/dist/components/Content/Schema/SchemaHeading.vue.js +9 -0
  160. package/dist/components/Content/Schema/SchemaHeading.vue.js.map +1 -0
  161. package/dist/components/Content/Schema/SchemaHeading.vue.script.js +45 -0
  162. package/dist/components/Content/Schema/SchemaHeading.vue.script.js.map +1 -0
  163. package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.js +7 -0
  164. package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.js.map +1 -0
  165. package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.script.js +55 -0
  166. package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.script.js.map +1 -0
  167. package/dist/components/Content/Schema/SchemaObjectProperties.vue.js +7 -0
  168. package/dist/components/Content/Schema/SchemaObjectProperties.vue.js.map +1 -0
  169. package/dist/components/Content/Schema/SchemaObjectProperties.vue.script.js +161 -0
  170. package/dist/components/Content/Schema/SchemaObjectProperties.vue.script.js.map +1 -0
  171. package/dist/components/Content/Schema/SchemaProperty.vue.js +9 -0
  172. package/dist/components/Content/Schema/SchemaProperty.vue.js.map +1 -0
  173. package/dist/components/Content/Schema/SchemaProperty.vue.script.js +256 -0
  174. package/dist/components/Content/Schema/SchemaProperty.vue.script.js.map +1 -0
  175. package/dist/components/Content/Schema/SchemaPropertyDefault.vue.js +9 -0
  176. package/dist/components/Content/Schema/SchemaPropertyDefault.vue.js.map +1 -0
  177. package/dist/components/Content/Schema/SchemaPropertyDefault.vue.script.js +35 -0
  178. package/dist/components/Content/Schema/SchemaPropertyDefault.vue.script.js.map +1 -0
  179. package/dist/components/Content/Schema/SchemaPropertyDetail.vue.js +9 -0
  180. package/dist/components/Content/Schema/SchemaPropertyDetail.vue.js.map +1 -0
  181. package/dist/components/Content/Schema/SchemaPropertyDetail.vue.script.js +30 -0
  182. package/dist/components/Content/Schema/SchemaPropertyDetail.vue.script.js.map +1 -0
  183. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js +9 -0
  184. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js.map +1 -0
  185. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.script.js +67 -0
  186. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.script.js.map +1 -0
  187. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +9 -0
  188. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js.map +1 -0
  189. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.script.js +251 -0
  190. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.script.js.map +1 -0
  191. package/dist/components/Content/Schema/helpers/format-example.js +26 -0
  192. package/dist/components/Content/Schema/helpers/format-example.js.map +1 -0
  193. package/dist/components/Content/Schema/helpers/format-value.js +22 -0
  194. package/dist/components/Content/Schema/helpers/format-value.js.map +1 -0
  195. package/dist/components/Content/Schema/helpers/get-compositions-to-render.d.ts +1 -1
  196. package/dist/components/Content/Schema/helpers/get-compositions-to-render.js +32 -0
  197. package/dist/components/Content/Schema/helpers/get-compositions-to-render.js.map +1 -0
  198. package/dist/components/Content/Schema/helpers/get-enum-values.js +22 -0
  199. package/dist/components/Content/Schema/helpers/get-enum-values.js.map +1 -0
  200. package/dist/components/Content/Schema/helpers/get-property-description.js +36 -0
  201. package/dist/components/Content/Schema/helpers/get-property-description.js.map +1 -0
  202. package/dist/components/Content/Schema/helpers/get-ref-name.js +19 -0
  203. package/dist/components/Content/Schema/helpers/get-ref-name.js.map +1 -0
  204. package/dist/components/Content/Schema/helpers/get-schema-type.js +49 -0
  205. package/dist/components/Content/Schema/helpers/get-schema-type.js.map +1 -0
  206. package/dist/components/Content/Schema/helpers/has-complex-array-items.js +53 -0
  207. package/dist/components/Content/Schema/helpers/has-complex-array-items.js.map +1 -0
  208. package/dist/components/Content/Schema/helpers/is-empty-schema-object.js +18 -0
  209. package/dist/components/Content/Schema/helpers/is-empty-schema-object.js.map +1 -0
  210. package/dist/components/Content/Schema/helpers/is-type-object.js +18 -0
  211. package/dist/components/Content/Schema/helpers/is-type-object.js.map +1 -0
  212. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +175 -0
  213. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js.map +1 -0
  214. package/dist/components/Content/Schema/helpers/optimize-value-for-display.js +68 -0
  215. package/dist/components/Content/Schema/helpers/optimize-value-for-display.js.map +1 -0
  216. package/dist/components/Content/Schema/helpers/schema-composition.js +11 -0
  217. package/dist/components/Content/Schema/helpers/schema-composition.js.map +1 -0
  218. package/dist/components/Content/Schema/helpers/schema-name.js +23 -0
  219. package/dist/components/Content/Schema/helpers/schema-name.js.map +1 -0
  220. package/dist/components/Content/Schema/helpers/should-display-description.js +17 -0
  221. package/dist/components/Content/Schema/helpers/should-display-description.js.map +1 -0
  222. package/dist/components/Content/Schema/helpers/should-display-heading.js +18 -0
  223. package/dist/components/Content/Schema/helpers/should-display-heading.js.map +1 -0
  224. package/dist/components/Content/Schema/helpers/should-render-array-item-composition.js +20 -0
  225. package/dist/components/Content/Schema/helpers/should-render-array-item-composition.js.map +1 -0
  226. package/dist/components/Content/Schema/helpers/sort-property-names.js +45 -0
  227. package/dist/components/Content/Schema/helpers/sort-property-names.js.map +1 -0
  228. package/dist/components/Content/Schema/index.d.ts +4 -4
  229. package/dist/components/Content/Tags/Tag.vue.js +7 -0
  230. package/dist/components/Content/Tags/Tag.vue.js.map +1 -0
  231. package/dist/components/Content/Tags/Tag.vue.script.js +56 -0
  232. package/dist/components/Content/Tags/Tag.vue.script.js.map +1 -0
  233. package/dist/components/Content/Tags/components/ClassicLayout.vue.js +9 -0
  234. package/dist/components/Content/Tags/components/ClassicLayout.vue.js.map +1 -0
  235. package/dist/components/Content/Tags/components/ClassicLayout.vue.script.js +49 -0
  236. package/dist/components/Content/Tags/components/ClassicLayout.vue.script.js.map +1 -0
  237. package/dist/components/Content/Tags/components/ModernLayout.vue.js +9 -0
  238. package/dist/components/Content/Tags/components/ModernLayout.vue.js.map +1 -0
  239. package/dist/components/Content/Tags/components/ModernLayout.vue.script.js +63 -0
  240. package/dist/components/Content/Tags/components/ModernLayout.vue.script.js.map +1 -0
  241. package/dist/components/Content/Tags/components/TagSection.vue.js +7 -0
  242. package/dist/components/Content/Tags/components/TagSection.vue.js.map +1 -0
  243. package/dist/components/Content/Tags/components/TagSection.vue.script.js +78 -0
  244. package/dist/components/Content/Tags/components/TagSection.vue.script.js.map +1 -0
  245. package/dist/components/Content/Tags/index.d.ts +1 -1
  246. package/dist/components/Content/index.d.ts +2 -2
  247. package/dist/components/GettingStarted.vue.js +9 -0
  248. package/dist/components/GettingStarted.vue.js.map +1 -0
  249. package/dist/components/GettingStarted.vue.script.js +71 -0
  250. package/dist/components/GettingStarted.vue.script.js.map +1 -0
  251. package/dist/components/HttpMethod/HttpMethod.vue.js +7 -0
  252. package/dist/components/HttpMethod/HttpMethod.vue.js.map +1 -0
  253. package/dist/components/HttpMethod/HttpMethod.vue.script.js +33 -0
  254. package/dist/components/HttpMethod/HttpMethod.vue.script.js.map +1 -0
  255. package/dist/components/HttpMethod/index.d.ts +1 -1
  256. package/dist/components/IntersectionObserver.vue.js +7 -0
  257. package/dist/components/IntersectionObserver.vue.js.map +1 -0
  258. package/dist/components/IntersectionObserver.vue.script.js +45 -0
  259. package/dist/components/IntersectionObserver.vue.script.js.map +1 -0
  260. package/dist/components/Lazy/Lazy.vue.js +7 -0
  261. package/dist/components/Lazy/Lazy.vue.js.map +1 -0
  262. package/dist/components/Lazy/Lazy.vue.script.js +101 -0
  263. package/dist/components/Lazy/Lazy.vue.script.js.map +1 -0
  264. package/dist/components/LinkList/LinkList.vue.js +9 -0
  265. package/dist/components/LinkList/LinkList.vue.js.map +1 -0
  266. package/dist/components/LinkList/LinkList.vue.script.js +53 -0
  267. package/dist/components/LinkList/LinkList.vue.script.js.map +1 -0
  268. package/dist/components/LinkList/index.d.ts +1 -1
  269. package/dist/components/LoadingSkeleton.vue.js +9 -0
  270. package/dist/components/LoadingSkeleton.vue.js.map +1 -0
  271. package/dist/components/LoadingSkeleton.vue.script.js +20 -0
  272. package/dist/components/LoadingSkeleton.vue.script.js.map +1 -0
  273. package/dist/components/MobileHeader.vue.d.ts.map +1 -1
  274. package/dist/components/MobileHeader.vue.js +7 -0
  275. package/dist/components/MobileHeader.vue.js.map +1 -0
  276. package/dist/components/MobileHeader.vue.script.js +43 -0
  277. package/dist/components/MobileHeader.vue.script.js.map +1 -0
  278. package/dist/components/OperationPath.vue.js +9 -0
  279. package/dist/components/OperationPath.vue.js.map +1 -0
  280. package/dist/components/OperationPath.vue.script.js +24 -0
  281. package/dist/components/OperationPath.vue.script.js.map +1 -0
  282. package/dist/components/OperationsList/OperationsList.vue.js +9 -0
  283. package/dist/components/OperationsList/OperationsList.vue.js.map +1 -0
  284. package/dist/components/OperationsList/OperationsList.vue.script.js +49 -0
  285. package/dist/components/OperationsList/OperationsList.vue.script.js.map +1 -0
  286. package/dist/components/OperationsList/OperationsListItem.vue.js +9 -0
  287. package/dist/components/OperationsList/OperationsListItem.vue.js.map +1 -0
  288. package/dist/components/OperationsList/OperationsListItem.vue.script.js +51 -0
  289. package/dist/components/OperationsList/OperationsListItem.vue.script.js.map +1 -0
  290. package/dist/components/OperationsList/index.d.ts +1 -1
  291. package/dist/components/RenderPlugins/RenderPlugins.vue.js +7 -0
  292. package/dist/components/RenderPlugins/RenderPlugins.vue.js.map +1 -0
  293. package/dist/components/RenderPlugins/RenderPlugins.vue.script.js +44 -0
  294. package/dist/components/RenderPlugins/RenderPlugins.vue.script.js.map +1 -0
  295. package/dist/components/RenderPlugins/index.d.ts +1 -1
  296. package/dist/components/ScreenReader.vue.js +9 -0
  297. package/dist/components/ScreenReader.vue.js.map +1 -0
  298. package/dist/components/ScreenReader.vue.script.js +22 -0
  299. package/dist/components/ScreenReader.vue.script.js.map +1 -0
  300. package/dist/components/Section/CompactSection.vue.js +9 -0
  301. package/dist/components/Section/CompactSection.vue.js.map +1 -0
  302. package/dist/components/Section/CompactSection.vue.script.js +56 -0
  303. package/dist/components/Section/CompactSection.vue.script.js.map +1 -0
  304. package/dist/components/Section/Section.vue.js +9 -0
  305. package/dist/components/Section/Section.vue.js.map +1 -0
  306. package/dist/components/Section/Section.vue.script.js +23 -0
  307. package/dist/components/Section/Section.vue.script.js.map +1 -0
  308. package/dist/components/Section/SectionAccordion.vue.js +9 -0
  309. package/dist/components/Section/SectionAccordion.vue.js.map +1 -0
  310. package/dist/components/Section/SectionAccordion.vue.script.js +60 -0
  311. package/dist/components/Section/SectionAccordion.vue.script.js.map +1 -0
  312. package/dist/components/Section/SectionColumn.vue.js +14 -0
  313. package/dist/components/Section/SectionColumn.vue.js.map +1 -0
  314. package/dist/components/Section/SectionColumns.vue.js +14 -0
  315. package/dist/components/Section/SectionColumns.vue.js.map +1 -0
  316. package/dist/components/Section/SectionContainer.vue.js +9 -0
  317. package/dist/components/Section/SectionContainer.vue.js.map +1 -0
  318. package/dist/components/Section/SectionContainer.vue.script.js +19 -0
  319. package/dist/components/Section/SectionContainer.vue.script.js.map +1 -0
  320. package/dist/components/Section/SectionContainerAccordion.vue.js +9 -0
  321. package/dist/components/Section/SectionContainerAccordion.vue.js.map +1 -0
  322. package/dist/components/Section/SectionContainerAccordion.vue.script.js +40 -0
  323. package/dist/components/Section/SectionContainerAccordion.vue.script.js.map +1 -0
  324. package/dist/components/Section/SectionContent.vue.js +9 -0
  325. package/dist/components/Section/SectionContent.vue.js.map +1 -0
  326. package/dist/components/Section/SectionContent.vue.script.js +23 -0
  327. package/dist/components/Section/SectionContent.vue.script.js.map +1 -0
  328. package/dist/components/Section/SectionHeader.vue.js +9 -0
  329. package/dist/components/Section/SectionHeader.vue.js.map +1 -0
  330. package/dist/components/Section/SectionHeader.vue.script.js +23 -0
  331. package/dist/components/Section/SectionHeader.vue.script.js.map +1 -0
  332. package/dist/components/Section/SectionHeaderTag.vue.js +9 -0
  333. package/dist/components/Section/SectionHeaderTag.vue.js.map +1 -0
  334. package/dist/components/Section/SectionHeaderTag.vue.script.js +18 -0
  335. package/dist/components/Section/SectionHeaderTag.vue.script.js.map +1 -0
  336. package/dist/components/Section/index.d.ts +10 -10
  337. package/dist/components/SectionFlare/SectionFlare.vue.js +14 -0
  338. package/dist/components/SectionFlare/SectionFlare.vue.js.map +1 -0
  339. package/dist/components/SectionFlare/index.d.ts +1 -1
  340. package/dist/components/ShowMoreButton.vue.js +9 -0
  341. package/dist/components/ShowMoreButton.vue.js.map +1 -0
  342. package/dist/components/ShowMoreButton.vue.script.js +22 -0
  343. package/dist/components/ShowMoreButton.vue.script.js.map +1 -0
  344. package/dist/components/index.d.ts +5 -5
  345. package/dist/components/index.js +20 -102
  346. package/dist/{urls-gPTXGgbj.js → consts/urls.js} +2 -2
  347. package/dist/consts/urls.js.map +1 -0
  348. package/dist/features/Operation/Operation.vue.js +7 -0
  349. package/dist/features/Operation/Operation.vue.js.map +1 -0
  350. package/dist/features/Operation/Operation.vue.script.js +115 -0
  351. package/dist/features/Operation/Operation.vue.script.js.map +1 -0
  352. package/dist/features/Operation/components/ContentTypeSelect.vue.js +7 -0
  353. package/dist/features/Operation/components/ContentTypeSelect.vue.js.map +1 -0
  354. package/dist/features/Operation/components/ContentTypeSelect.vue.script.js +75 -0
  355. package/dist/features/Operation/components/ContentTypeSelect.vue.script.js.map +1 -0
  356. package/dist/features/Operation/components/Header.vue.js +7 -0
  357. package/dist/features/Operation/components/Header.vue.js.map +1 -0
  358. package/dist/features/Operation/components/Header.vue.script.js +42 -0
  359. package/dist/features/Operation/components/Header.vue.script.js.map +1 -0
  360. package/dist/features/Operation/components/Headers.vue.js +9 -0
  361. package/dist/features/Operation/components/Headers.vue.js.map +1 -0
  362. package/dist/features/Operation/components/Headers.vue.script.js +58 -0
  363. package/dist/features/Operation/components/Headers.vue.script.js.map +1 -0
  364. package/dist/features/Operation/components/OperationParameters.vue.d.ts +1 -1
  365. package/dist/features/Operation/components/OperationParameters.vue.js +7 -0
  366. package/dist/features/Operation/components/OperationParameters.vue.js.map +1 -0
  367. package/dist/features/Operation/components/OperationParameters.vue.script.js +108 -0
  368. package/dist/features/Operation/components/OperationParameters.vue.script.js.map +1 -0
  369. package/dist/features/Operation/components/OperationResponses.vue.d.ts +1 -1
  370. package/dist/features/Operation/components/OperationResponses.vue.js +7 -0
  371. package/dist/features/Operation/components/OperationResponses.vue.js.map +1 -0
  372. package/dist/features/Operation/components/OperationResponses.vue.script.js +48 -0
  373. package/dist/features/Operation/components/OperationResponses.vue.script.js.map +1 -0
  374. package/dist/features/Operation/components/ParameterList.vue.d.ts +1 -1
  375. package/dist/features/Operation/components/ParameterList.vue.js +7 -0
  376. package/dist/features/Operation/components/ParameterList.vue.js.map +1 -0
  377. package/dist/features/Operation/components/ParameterList.vue.script.js +53 -0
  378. package/dist/features/Operation/components/ParameterList.vue.script.js.map +1 -0
  379. package/dist/features/Operation/components/ParameterListItem.vue.d.ts +1 -1
  380. package/dist/features/Operation/components/ParameterListItem.vue.js +9 -0
  381. package/dist/features/Operation/components/ParameterListItem.vue.js.map +1 -0
  382. package/dist/features/Operation/components/ParameterListItem.vue.script.js +161 -0
  383. package/dist/features/Operation/components/ParameterListItem.vue.script.js.map +1 -0
  384. package/dist/features/Operation/components/RequestBody.vue.js +9 -0
  385. package/dist/features/Operation/components/RequestBody.vue.js.map +1 -0
  386. package/dist/features/Operation/components/RequestBody.vue.script.js +154 -0
  387. package/dist/features/Operation/components/RequestBody.vue.script.js.map +1 -0
  388. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +1 -1
  389. package/dist/features/Operation/components/callbacks/Callback.vue.js +9 -0
  390. package/dist/features/Operation/components/callbacks/Callback.vue.js.map +1 -0
  391. package/dist/features/Operation/components/callbacks/Callback.vue.script.js +62 -0
  392. package/dist/features/Operation/components/callbacks/Callback.vue.script.js.map +1 -0
  393. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts +1 -1
  394. package/dist/features/Operation/components/callbacks/Callbacks.vue.js +7 -0
  395. package/dist/features/Operation/components/callbacks/Callbacks.vue.js.map +1 -0
  396. package/dist/features/Operation/components/callbacks/Callbacks.vue.script.js +67 -0
  397. package/dist/features/Operation/components/callbacks/Callbacks.vue.script.js.map +1 -0
  398. package/dist/features/Operation/helpers/filter-selected-security.js +30 -0
  399. package/dist/features/Operation/helpers/filter-selected-security.js.map +1 -0
  400. package/dist/features/Operation/helpers/get-first-server.js +27 -0
  401. package/dist/features/Operation/helpers/get-first-server.js.map +1 -0
  402. package/dist/features/Operation/index.d.ts +1 -1
  403. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +1 -1
  404. package/dist/features/Operation/layouts/ClassicLayout.vue.js +9 -0
  405. package/dist/features/Operation/layouts/ClassicLayout.vue.js.map +1 -0
  406. package/dist/features/Operation/layouts/ClassicLayout.vue.script.js +243 -0
  407. package/dist/features/Operation/layouts/ClassicLayout.vue.script.js.map +1 -0
  408. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +1 -1
  409. package/dist/features/Operation/layouts/ModernLayout.vue.js +9 -0
  410. package/dist/features/Operation/layouts/ModernLayout.vue.js.map +1 -0
  411. package/dist/features/Operation/layouts/ModernLayout.vue.script.js +243 -0
  412. package/dist/features/Operation/layouts/ModernLayout.vue.script.js.map +1 -0
  413. package/dist/features/Search/components/SearchButton.vue.js +7 -0
  414. package/dist/features/Search/components/SearchButton.vue.js.map +1 -0
  415. package/dist/features/Search/components/SearchButton.vue.script.js +77 -0
  416. package/dist/features/Search/components/SearchButton.vue.script.js.map +1 -0
  417. package/dist/features/Search/components/SearchModal.vue.js +9 -0
  418. package/dist/features/Search/components/SearchModal.vue.js.map +1 -0
  419. package/dist/features/Search/components/SearchModal.vue.script.js +115 -0
  420. package/dist/features/Search/components/SearchModal.vue.script.js.map +1 -0
  421. package/dist/features/Search/components/SearchResult.vue.js +7 -0
  422. package/dist/features/Search/components/SearchResult.vue.js.map +1 -0
  423. package/dist/features/Search/components/SearchResult.vue.script.js +69 -0
  424. package/dist/features/Search/components/SearchResult.vue.script.js.map +1 -0
  425. package/dist/features/Search/helpers/create-fuse-instance.js +52 -0
  426. package/dist/features/Search/helpers/create-fuse-instance.js.map +1 -0
  427. package/dist/features/Search/helpers/create-search-index.js +127 -0
  428. package/dist/features/Search/helpers/create-search-index.js.map +1 -0
  429. package/dist/features/Search/hooks/useSearchIndex.js +31 -0
  430. package/dist/features/Search/hooks/useSearchIndex.js.map +1 -0
  431. package/dist/features/Search/index.d.ts +2 -2
  432. package/dist/features/Search/types.d.ts +1 -1
  433. package/dist/features/ask-agent-button/AskAgentButton.vue.js +9 -0
  434. package/dist/features/ask-agent-button/AskAgentButton.vue.js.map +1 -0
  435. package/dist/features/ask-agent-button/AskAgentButton.vue.script.js +49 -0
  436. package/dist/features/ask-agent-button/AskAgentButton.vue.script.js.map +1 -0
  437. package/dist/features/developer-tools/DeveloperTools.vue.js +7 -0
  438. package/dist/features/developer-tools/DeveloperTools.vue.js.map +1 -0
  439. package/dist/features/developer-tools/DeveloperTools.vue.script.js +49 -0
  440. package/dist/features/developer-tools/DeveloperTools.vue.script.js.map +1 -0
  441. package/dist/features/developer-tools/components/ApiReferenceToolbarBlurb.vue.js +13 -0
  442. package/dist/features/developer-tools/components/ApiReferenceToolbarBlurb.vue.js.map +1 -0
  443. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.js +7 -0
  444. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.js.map +1 -0
  445. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.script.js +38 -0
  446. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.script.js.map +1 -0
  447. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.js +7 -0
  448. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.js.map +1 -0
  449. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.script.js +112 -0
  450. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.script.js.map +1 -0
  451. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.js +7 -0
  452. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.js.map +1 -0
  453. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.script.js +60 -0
  454. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.script.js.map +1 -0
  455. package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.js +7 -0
  456. package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.js.map +1 -0
  457. package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.script.js +35 -0
  458. package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.script.js.map +1 -0
  459. package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.js +7 -0
  460. package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.js.map +1 -0
  461. package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.script.js +68 -0
  462. package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.script.js.map +1 -0
  463. package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.js +7 -0
  464. package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.js.map +1 -0
  465. package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.script.js +80 -0
  466. package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.script.js.map +1 -0
  467. package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.js +7 -0
  468. package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.js.map +1 -0
  469. package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.script.js +66 -0
  470. package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.script.js.map +1 -0
  471. package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.js +7 -0
  472. package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.js.map +1 -0
  473. package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.script.js +44 -0
  474. package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.script.js.map +1 -0
  475. package/dist/features/developer-tools/components/DeployApiReference.vue.js +7 -0
  476. package/dist/features/developer-tools/components/DeployApiReference.vue.js.map +1 -0
  477. package/dist/features/developer-tools/components/DeployApiReference.vue.script.js +26 -0
  478. package/dist/features/developer-tools/components/DeployApiReference.vue.script.js.map +1 -0
  479. package/dist/features/developer-tools/components/ModifyConfiguration.vue.js +7 -0
  480. package/dist/features/developer-tools/components/ModifyConfiguration.vue.js.map +1 -0
  481. package/dist/features/developer-tools/components/ModifyConfiguration.vue.script.js +86 -0
  482. package/dist/features/developer-tools/components/ModifyConfiguration.vue.script.js.map +1 -0
  483. package/dist/features/developer-tools/components/ShareApiReference.vue.js +7 -0
  484. package/dist/features/developer-tools/components/ShareApiReference.vue.js.map +1 -0
  485. package/dist/features/developer-tools/components/ShareApiReference.vue.script.js +26 -0
  486. package/dist/features/developer-tools/components/ShareApiReference.vue.script.js.map +1 -0
  487. package/dist/features/developer-tools/index.d.ts +1 -1
  488. package/dist/features/example-responses/ExampleResponse.vue.js +9 -0
  489. package/dist/features/example-responses/ExampleResponse.vue.js.map +1 -0
  490. package/dist/features/example-responses/ExampleResponse.vue.script.js +56 -0
  491. package/dist/features/example-responses/ExampleResponse.vue.script.js.map +1 -0
  492. package/dist/features/example-responses/ExampleResponseTab.vue.js +9 -0
  493. package/dist/features/example-responses/ExampleResponseTab.vue.js.map +1 -0
  494. package/dist/features/example-responses/ExampleResponseTab.vue.script.js +21 -0
  495. package/dist/features/example-responses/ExampleResponseTab.vue.script.js.map +1 -0
  496. package/dist/features/example-responses/ExampleResponseTabList.vue.js +9 -0
  497. package/dist/features/example-responses/ExampleResponseTabList.vue.js.map +1 -0
  498. package/dist/features/example-responses/ExampleResponseTabList.vue.script.js +31 -0
  499. package/dist/features/example-responses/ExampleResponseTabList.vue.script.js.map +1 -0
  500. package/dist/features/example-responses/ExampleResponses.vue.js +9 -0
  501. package/dist/features/example-responses/ExampleResponses.vue.js.map +1 -0
  502. package/dist/features/example-responses/ExampleResponses.vue.script.js +157 -0
  503. package/dist/features/example-responses/ExampleResponses.vue.script.js.map +1 -0
  504. package/dist/features/example-responses/ExampleSchema.vue.js +7 -0
  505. package/dist/features/example-responses/ExampleSchema.vue.js.map +1 -0
  506. package/dist/features/example-responses/ExampleSchema.vue.script.js +42 -0
  507. package/dist/features/example-responses/ExampleSchema.vue.script.js.map +1 -0
  508. package/dist/features/example-responses/has-response-content.js +37 -0
  509. package/dist/features/example-responses/has-response-content.js.map +1 -0
  510. package/dist/features/example-responses/index.d.ts +1 -1
  511. package/dist/features/external-docs/ExternalDocs.vue.js +7 -0
  512. package/dist/features/external-docs/ExternalDocs.vue.js.map +1 -0
  513. package/dist/features/external-docs/ExternalDocs.vue.script.js +37 -0
  514. package/dist/features/external-docs/ExternalDocs.vue.script.js.map +1 -0
  515. package/dist/features/external-docs/index.d.ts +1 -1
  516. package/dist/features/index.d.ts +2 -2
  517. package/dist/features/index.js +4 -3
  518. package/dist/features/info-object/Contact.vue.js +7 -0
  519. package/dist/features/info-object/Contact.vue.js.map +1 -0
  520. package/dist/features/info-object/Contact.vue.script.js +37 -0
  521. package/dist/features/info-object/Contact.vue.script.js.map +1 -0
  522. package/dist/features/info-object/License.vue.js +7 -0
  523. package/dist/features/info-object/License.vue.js.map +1 -0
  524. package/dist/features/info-object/License.vue.script.js +32 -0
  525. package/dist/features/info-object/License.vue.script.js.map +1 -0
  526. package/dist/features/info-object/TermsOfService.vue.js +7 -0
  527. package/dist/features/info-object/TermsOfService.vue.js.map +1 -0
  528. package/dist/features/info-object/TermsOfService.vue.script.js +29 -0
  529. package/dist/features/info-object/TermsOfService.vue.script.js.map +1 -0
  530. package/dist/features/info-object/index.d.ts +3 -3
  531. package/dist/features/multiple-documents/DocumentSelector.vue.js +7 -0
  532. package/dist/features/multiple-documents/DocumentSelector.vue.js.map +1 -0
  533. package/dist/features/multiple-documents/DocumentSelector.vue.script.js +48 -0
  534. package/dist/features/multiple-documents/DocumentSelector.vue.script.js.map +1 -0
  535. package/dist/features/specification-extension/SpecificationExtension.vue.js +7 -0
  536. package/dist/features/specification-extension/SpecificationExtension.vue.js.map +1 -0
  537. package/dist/features/specification-extension/SpecificationExtension.vue.script.js +56 -0
  538. package/dist/features/specification-extension/SpecificationExtension.vue.script.js.map +1 -0
  539. package/dist/features/specification-extension/helpers.js +15 -0
  540. package/dist/features/specification-extension/helpers.js.map +1 -0
  541. package/dist/features/specification-extension/index.d.ts +2 -2
  542. package/dist/features/test-request-button/TestRequestButton.vue.js +9 -0
  543. package/dist/features/test-request-button/TestRequestButton.vue.js.map +1 -0
  544. package/dist/features/test-request-button/TestRequestButton.vue.script.js +47 -0
  545. package/dist/features/test-request-button/TestRequestButton.vue.script.js.map +1 -0
  546. package/dist/features/test-request-button/index.d.ts +1 -1
  547. package/dist/features/x-badges/XBadges.vue.js +7 -0
  548. package/dist/features/x-badges/XBadges.vue.js.map +1 -0
  549. package/dist/features/x-badges/XBadges.vue.script.js +31 -0
  550. package/dist/features/x-badges/XBadges.vue.script.js.map +1 -0
  551. package/dist/features/x-badges/index.d.ts +1 -1
  552. package/dist/helpers/color-mode.js +15 -0
  553. package/dist/helpers/color-mode.js.map +1 -0
  554. package/dist/helpers/download.js +77 -0
  555. package/dist/helpers/download.js.map +1 -0
  556. package/dist/helpers/id-routing.js +107 -0
  557. package/dist/helpers/id-routing.js.map +1 -0
  558. package/dist/helpers/index.d.ts +8 -8
  559. package/dist/helpers/index.js +8 -2
  560. package/dist/{lazy-bus-CV8Ox5hD.js → helpers/lazy-bus.js} +3 -106
  561. package/dist/helpers/lazy-bus.js.map +1 -0
  562. package/dist/helpers/load-from-perssistance.js +23 -0
  563. package/dist/helpers/load-from-perssistance.js.map +1 -0
  564. package/dist/helpers/map-config-plugins.js +44 -0
  565. package/dist/helpers/map-config-plugins.js.map +1 -0
  566. package/dist/helpers/map-config-to-workspace-store.js +24 -0
  567. package/dist/helpers/map-config-to-workspace-store.js.map +1 -0
  568. package/dist/helpers/normalize-configurations.js +66 -0
  569. package/dist/helpers/normalize-configurations.js.map +1 -0
  570. package/dist/helpers/openapi.js +132 -0
  571. package/dist/helpers/openapi.js.map +1 -0
  572. package/dist/{storage--3JuzjCI.js → helpers/storage.js} +2 -2
  573. package/dist/helpers/storage.js.map +1 -0
  574. package/dist/helpers/upload-temp-document.js +24 -0
  575. package/dist/helpers/upload-temp-document.js.map +1 -0
  576. package/dist/hooks/index.d.ts +2 -2
  577. package/dist/hooks/index.js +2 -2
  578. package/dist/{use-agent-Bnm1de0n.js → hooks/use-agent.js} +2 -2
  579. package/dist/hooks/use-agent.js.map +1 -0
  580. package/dist/{use-intersection-8QqPi2O-.js → hooks/use-intersection.js} +2 -2
  581. package/dist/hooks/use-intersection.js.map +1 -0
  582. package/dist/index.d.ts +4 -4
  583. package/dist/index.js +6 -6
  584. package/dist/plugins/hooks/usePluginManager.d.ts +1 -1
  585. package/dist/plugins/hooks/usePluginManager.js +16 -0
  586. package/dist/plugins/hooks/usePluginManager.js.map +1 -0
  587. package/dist/plugins/index.d.ts +3 -3
  588. package/dist/plugins/index.js +3 -1
  589. package/dist/plugins/persistance-plugin.js +39 -0
  590. package/dist/plugins/persistance-plugin.js.map +1 -0
  591. package/dist/plugins/plugin-manager.js +32 -0
  592. package/dist/plugins/plugin-manager.js.map +1 -0
  593. package/dist/ssr.js +6 -6
  594. package/dist/standalone/lib/html-api.js +73 -0
  595. package/dist/standalone/lib/html-api.js.map +1 -0
  596. package/dist/style.css +7878 -6432
  597. package/package.json +11 -11
  598. package/dist/AgentScalarChatInterface-MUbtSqMw.js.map +0 -1
  599. package/dist/ExternalDocs-phu7GxpZ.js +0 -272
  600. package/dist/ExternalDocs-phu7GxpZ.js.map +0 -1
  601. package/dist/MobileHeader-DAm6yQX0.js +0 -1373
  602. package/dist/MobileHeader-DAm6yQX0.js.map +0 -1
  603. package/dist/Operation-CvpVIkc3.js +0 -3829
  604. package/dist/Operation-CvpVIkc3.js.map +0 -1
  605. package/dist/SearchButton-xzhIpMCZ.js +0 -621
  606. package/dist/SearchButton-xzhIpMCZ.js.map +0 -1
  607. package/dist/ServerSelector-5y29y2BJ.js +0 -852
  608. package/dist/ServerSelector-5y29y2BJ.js.map +0 -1
  609. package/dist/components/index.js.map +0 -1
  610. package/dist/lazy-bus-CV8Ox5hD.js.map +0 -1
  611. package/dist/normalize-configurations-DcVpOEjD.js +0 -232
  612. package/dist/normalize-configurations-DcVpOEjD.js.map +0 -1
  613. package/dist/plugins-4EyiUD_A.js +0 -80
  614. package/dist/plugins-4EyiUD_A.js.map +0 -1
  615. package/dist/src-DJwsRvMU.js +0 -1686
  616. package/dist/src-DJwsRvMU.js.map +0 -1
  617. package/dist/storage--3JuzjCI.js.map +0 -1
  618. package/dist/urls-gPTXGgbj.js.map +0 -1
  619. package/dist/use-agent-Bnm1de0n.js.map +0 -1
  620. package/dist/use-intersection-8QqPi2O-.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"ServerSelector-5y29y2BJ.js","names":["$slots"],"sources":["../src/blocks/scalar-client-selector-block/helpers/featured-clients.ts","../src/blocks/scalar-client-selector-block/components/ClientDropdown.vue","../src/blocks/scalar-client-selector-block/components/ClientDropdown.vue","../src/blocks/scalar-client-selector-block/components/ClientSelector.vue","../src/blocks/scalar-client-selector-block/components/ClientSelector.vue","../src/blocks/scalar-info-block/components/DownloadLink.vue","../src/blocks/scalar-info-block/components/DownloadLink.vue","../src/blocks/scalar-info-block/components/IntroductionCard.vue","../src/blocks/scalar-info-block/components/IntroductionCard.vue","../src/components/Section/SectionContainer.vue","../src/components/Section/SectionContainer.vue","../src/blocks/scalar-info-block/components/InfoMarkdownSection.vue","../src/blocks/scalar-info-block/components/InfoMarkdownSection.vue","../src/blocks/scalar-info-block/components/InfoDescription.vue","../src/blocks/scalar-info-block/components/InfoDescription.vue","../src/features/info-object/Contact.vue","../src/features/info-object/Contact.vue","../src/features/info-object/License.vue","../src/features/info-object/License.vue","../src/features/info-object/TermsOfService.vue","../src/features/info-object/TermsOfService.vue","../src/blocks/scalar-info-block/components/InfoLinks.vue","../src/blocks/scalar-info-block/components/InfoLinks.vue","../src/blocks/scalar-info-block/components/InfoVersion.vue","../src/blocks/scalar-info-block/components/InfoVersion.vue","../src/blocks/scalar-info-block/components/OpenApiVersion.vue","../src/blocks/scalar-info-block/components/OpenApiVersion.vue","../src/blocks/scalar-info-block/components/IntroductionLayout.vue","../src/blocks/scalar-info-block/components/IntroductionLayout.vue","../src/blocks/scalar-info-block/components/InfoBlock.vue","../src/blocks/scalar-info-block/components/InfoBlock.vue","../src/blocks/scalar-info-block/components/IntroductionCardItem.vue","../src/blocks/scalar-server-selector-block/components/Selector.vue","../src/blocks/scalar-server-selector-block/components/Selector.vue","../src/blocks/scalar-server-selector-block/components/ServerSelector.vue","../src/blocks/scalar-server-selector-block/components/ServerSelector.vue"],"sourcesContent":["import type { ClientOption, ClientOptionGroup } from '@scalar/api-client/v2/blocks/operation-code-sample'\nimport type { AvailableClients } from '@scalar/snippetz'\n\n/** Hard coded list of default featured clients */\nconst FEATURED_CLIENTS = [\n 'shell/curl',\n 'ruby/native',\n 'node/undici',\n 'php/guzzle',\n 'python/python3',\n] satisfies AvailableClients[number][]\n\n/** Whether or not a client is in the featured list */\nexport const isFeaturedClient = (\n clientId: AvailableClients[number] | undefined,\n featuredClients: AvailableClients[number][] = FEATURED_CLIENTS,\n) => Boolean(clientId && featuredClients.includes(clientId as (typeof featuredClients)[number]))\n\n/**\n * Maps featured client IDs to their corresponding ClientOption objects.\n * Returns an array of ClientOption objects that match the featured clients list,\n * maintaining the order of the featured clients.\n */\nexport const getFeaturedClients = (\n clientOptions: ClientOptionGroup[],\n featuredClients: AvailableClients[number][] = FEATURED_CLIENTS,\n): ClientOption[] => {\n // Create a map of all available client options for quick lookup\n const clientMap = new Map<string, ClientOption>()\n\n // Using the map means we only have to loop through once\n for (const group of clientOptions) {\n for (const option of group.options) {\n clientMap.set(option.id, option)\n }\n }\n\n // Map featured clients to their corresponding options, maintaining order\n return featuredClients.flatMap((clientId) => {\n const client = clientMap.get(clientId)\n return client ?? []\n })\n}\n","<script setup lang=\"ts\">\nimport { Tab } from '@headlessui/vue'\nimport {\n findClient,\n type ClientOption,\n type ClientOptionGroup,\n type CustomClientOption,\n} from '@scalar/api-client/v2/blocks/operation-code-sample'\nimport { ScalarCombobox, ScalarIcon } from '@scalar/components'\nimport { freezeElement } from '@scalar/helpers/dom/freeze-element'\nimport type { AvailableClients, TargetId } from '@scalar/types/snippetz'\nimport { type WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { computed, ref } from 'vue'\n\nimport { isFeaturedClient } from '@/blocks/scalar-client-selector-block/helpers/featured-clients'\n\nconst { clientOptions, featuredClients, eventBus, selectedClient } =\n defineProps<{\n /** Client options */\n clientOptions: ClientOptionGroup[]\n /** The currently selected Http Client */\n selectedClient?: AvailableClients[number]\n /** List of featured clients */\n featuredClients: ClientOption[]\n /** Event bus */\n eventBus: WorkspaceEventBus\n }>()\n\nconst containerRef = ref<HTMLElement>()\n\n/**\n * Icons have longer names to appear in icon searches, e.g. \"javascript-js\" instead of just \"javascript\". This function\n * maps the language key to the icon name.\n */\nconst getIconByLanguageKey = (targetKey: TargetId) =>\n `programming-language-${targetKey === 'js' ? 'javascript' : targetKey}` as const\n\n/** Set custom example, or update the selected HTTP client globally */\nconst selectClient = (option: ClientOption | CustomClientOption) => {\n if (!containerRef.value) {\n return\n }\n\n // We need to freeze the ui to prevent scrolling as the clients change\n const unfreeze = freezeElement(containerRef.value)\n setTimeout(() => {\n unfreeze()\n }, 300)\n\n // Update the store\n if (option.clientKey !== 'custom') {\n eventBus.emit('workspace:update:selected-client', option.id)\n }\n}\n\n/** Calculates the targetKey from the selected client id */\nconst selectedTargetKey = computed(\n () => selectedClient?.split('/')[0] as TargetId | undefined,\n)\n</script>\n<template>\n <div\n ref=\"containerRef\"\n class=\"client-libraries-content\">\n <Tab\n v-for=\"featuredClient in featuredClients\"\n :key=\"featuredClient.clientKey\"\n class=\"client-libraries rendered-code-sdks\"\n :class=\"{\n 'client-libraries__active': featuredClient.id === selectedClient,\n }\">\n <div :class=\"`client-libraries-icon__${featuredClient.targetKey}`\">\n <ScalarIcon\n class=\"client-libraries-icon\"\n :icon=\"getIconByLanguageKey(featuredClient.targetKey)\" />\n </div>\n <span class=\"client-libraries-text\">{{\n featuredClient.targetTitle\n }}</span>\n </Tab>\n\n <!-- Client Dropdown -->\n <ScalarCombobox\n :modelValue=\"findClient(clientOptions, selectedClient)\"\n :options=\"clientOptions\"\n placement=\"bottom-end\"\n teleport\n @update:modelValue=\"selectClient($event as ClientOption)\">\n <button\n class=\"client-libraries client-libraries__select\"\n :class=\"{\n 'client-libraries__active':\n selectedClient && !isFeaturedClient(selectedClient),\n }\"\n type=\"button\">\n <div\n aria-hidden=\"true\"\n class=\"client-libraries-icon__more\">\n <template v-if=\"selectedClient && !isFeaturedClient(selectedClient)\">\n <div :class=\"`client-libraries-icon__${selectedTargetKey}`\">\n <ScalarIcon\n v-if=\"selectedTargetKey\"\n class=\"client-libraries-icon\"\n :icon=\"getIconByLanguageKey(selectedTargetKey)\" />\n </div>\n </template>\n <template v-else>\n <svg\n class=\"client-libraries-icon\"\n height=\"50\"\n role=\"presentation\"\n viewBox=\"0 0 50 50\"\n width=\"50\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <g\n fill=\"currentColor\"\n fill-rule=\"nonzero\">\n <path\n 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\" />\n </g>\n </svg>\n </template>\n </div>\n <span\n v-if=\"clientOptions.length\"\n class=\"client-libraries-text client-libraries-text-more\">\n More\n </span>\n <span class=\"sr-only\">Select from all clients</span>\n </button>\n </ScalarCombobox>\n </div>\n</template>\n<style scoped>\n.client-libraries-content {\n container: client-libraries-content / inline-size;\n display: flex;\n justify-content: center;\n overflow: hidden;\n padding: 0 12px;\n background-color: var(--scalar-background-1);\n border-left: var(--scalar-border-width) solid var(--scalar-border-color);\n border-right: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n.client-libraries {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n position: relative;\n cursor: pointer;\n white-space: nowrap;\n padding: 8px 2px;\n gap: 6px;\n color: var(--scalar-color-3);\n border-bottom: 1px solid transparent;\n user-select: none;\n}\n\n.client-libraries:not(.client-libraries__active):hover:before {\n content: '';\n position: absolute;\n width: calc(100% - 4px);\n height: calc(100% - 4px);\n background: var(--scalar-background-2);\n left: 2px;\n top: 2px;\n z-index: 0;\n border-radius: var(--scalar-radius);\n}\n.client-libraries:active {\n color: var(--scalar-color-1);\n}\n.client-libraries:focus-visible {\n outline: none;\n box-shadow: inset 0 0 0 1px var(--scalar-color-accent);\n}\n/* remove php and c on mobile */\n@media screen and (max-width: 450px) {\n .client-libraries:nth-of-type(4),\n .client-libraries:nth-of-type(5) {\n display: none;\n }\n}\n.client-libraries-icon {\n max-width: 14px;\n max-height: 14px;\n min-width: 14px;\n width: 100%;\n aspect-ratio: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n box-sizing: border-box;\n color: currentColor;\n}\n.client-libraries-icon__more svg {\n height: initial;\n}\n@container client-libraries-content (width < 400px) {\n .client-libraries__select {\n width: fit-content;\n\n .client-libraries-icon__more + span {\n display: none;\n }\n }\n}\n@container client-libraries-content (width < 380px) {\n .client-libraries {\n width: 100%;\n }\n .client-libraries span {\n display: none;\n }\n}\n.client-libraries__active {\n color: var(--scalar-color-1);\n border-bottom: 1px solid var(--scalar-color-1);\n}\n@keyframes codeloader {\n 0% {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(1turn);\n }\n}\n.client-libraries .client-libraries-text {\n font-size: var(--scalar-small);\n position: relative;\n display: flex;\n align-items: center;\n}\n.client-libraries__active .client-libraries-text {\n color: var(--scalar-color-1);\n font-weight: var(--scalar-semibold);\n}\n@media screen and (max-width: 600px) {\n .references-classic .client-libraries {\n flex-direction: column;\n }\n}\n</style>\n","<script setup lang=\"ts\">\nimport { Tab } from '@headlessui/vue'\nimport {\n findClient,\n type ClientOption,\n type ClientOptionGroup,\n type CustomClientOption,\n} from '@scalar/api-client/v2/blocks/operation-code-sample'\nimport { ScalarCombobox, ScalarIcon } from '@scalar/components'\nimport { freezeElement } from '@scalar/helpers/dom/freeze-element'\nimport type { AvailableClients, TargetId } from '@scalar/types/snippetz'\nimport { type WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { computed, ref } from 'vue'\n\nimport { isFeaturedClient } from '@/blocks/scalar-client-selector-block/helpers/featured-clients'\n\nconst { clientOptions, featuredClients, eventBus, selectedClient } =\n defineProps<{\n /** Client options */\n clientOptions: ClientOptionGroup[]\n /** The currently selected Http Client */\n selectedClient?: AvailableClients[number]\n /** List of featured clients */\n featuredClients: ClientOption[]\n /** Event bus */\n eventBus: WorkspaceEventBus\n }>()\n\nconst containerRef = ref<HTMLElement>()\n\n/**\n * Icons have longer names to appear in icon searches, e.g. \"javascript-js\" instead of just \"javascript\". This function\n * maps the language key to the icon name.\n */\nconst getIconByLanguageKey = (targetKey: TargetId) =>\n `programming-language-${targetKey === 'js' ? 'javascript' : targetKey}` as const\n\n/** Set custom example, or update the selected HTTP client globally */\nconst selectClient = (option: ClientOption | CustomClientOption) => {\n if (!containerRef.value) {\n return\n }\n\n // We need to freeze the ui to prevent scrolling as the clients change\n const unfreeze = freezeElement(containerRef.value)\n setTimeout(() => {\n unfreeze()\n }, 300)\n\n // Update the store\n if (option.clientKey !== 'custom') {\n eventBus.emit('workspace:update:selected-client', option.id)\n }\n}\n\n/** Calculates the targetKey from the selected client id */\nconst selectedTargetKey = computed(\n () => selectedClient?.split('/')[0] as TargetId | undefined,\n)\n</script>\n<template>\n <div\n ref=\"containerRef\"\n class=\"client-libraries-content\">\n <Tab\n v-for=\"featuredClient in featuredClients\"\n :key=\"featuredClient.clientKey\"\n class=\"client-libraries rendered-code-sdks\"\n :class=\"{\n 'client-libraries__active': featuredClient.id === selectedClient,\n }\">\n <div :class=\"`client-libraries-icon__${featuredClient.targetKey}`\">\n <ScalarIcon\n class=\"client-libraries-icon\"\n :icon=\"getIconByLanguageKey(featuredClient.targetKey)\" />\n </div>\n <span class=\"client-libraries-text\">{{\n featuredClient.targetTitle\n }}</span>\n </Tab>\n\n <!-- Client Dropdown -->\n <ScalarCombobox\n :modelValue=\"findClient(clientOptions, selectedClient)\"\n :options=\"clientOptions\"\n placement=\"bottom-end\"\n teleport\n @update:modelValue=\"selectClient($event as ClientOption)\">\n <button\n class=\"client-libraries client-libraries__select\"\n :class=\"{\n 'client-libraries__active':\n selectedClient && !isFeaturedClient(selectedClient),\n }\"\n type=\"button\">\n <div\n aria-hidden=\"true\"\n class=\"client-libraries-icon__more\">\n <template v-if=\"selectedClient && !isFeaturedClient(selectedClient)\">\n <div :class=\"`client-libraries-icon__${selectedTargetKey}`\">\n <ScalarIcon\n v-if=\"selectedTargetKey\"\n class=\"client-libraries-icon\"\n :icon=\"getIconByLanguageKey(selectedTargetKey)\" />\n </div>\n </template>\n <template v-else>\n <svg\n class=\"client-libraries-icon\"\n height=\"50\"\n role=\"presentation\"\n viewBox=\"0 0 50 50\"\n width=\"50\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <g\n fill=\"currentColor\"\n fill-rule=\"nonzero\">\n <path\n 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\" />\n </g>\n </svg>\n </template>\n </div>\n <span\n v-if=\"clientOptions.length\"\n class=\"client-libraries-text client-libraries-text-more\">\n More\n </span>\n <span class=\"sr-only\">Select from all clients</span>\n </button>\n </ScalarCombobox>\n </div>\n</template>\n<style scoped>\n.client-libraries-content {\n container: client-libraries-content / inline-size;\n display: flex;\n justify-content: center;\n overflow: hidden;\n padding: 0 12px;\n background-color: var(--scalar-background-1);\n border-left: var(--scalar-border-width) solid var(--scalar-border-color);\n border-right: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n.client-libraries {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n position: relative;\n cursor: pointer;\n white-space: nowrap;\n padding: 8px 2px;\n gap: 6px;\n color: var(--scalar-color-3);\n border-bottom: 1px solid transparent;\n user-select: none;\n}\n\n.client-libraries:not(.client-libraries__active):hover:before {\n content: '';\n position: absolute;\n width: calc(100% - 4px);\n height: calc(100% - 4px);\n background: var(--scalar-background-2);\n left: 2px;\n top: 2px;\n z-index: 0;\n border-radius: var(--scalar-radius);\n}\n.client-libraries:active {\n color: var(--scalar-color-1);\n}\n.client-libraries:focus-visible {\n outline: none;\n box-shadow: inset 0 0 0 1px var(--scalar-color-accent);\n}\n/* remove php and c on mobile */\n@media screen and (max-width: 450px) {\n .client-libraries:nth-of-type(4),\n .client-libraries:nth-of-type(5) {\n display: none;\n }\n}\n.client-libraries-icon {\n max-width: 14px;\n max-height: 14px;\n min-width: 14px;\n width: 100%;\n aspect-ratio: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n box-sizing: border-box;\n color: currentColor;\n}\n.client-libraries-icon__more svg {\n height: initial;\n}\n@container client-libraries-content (width < 400px) {\n .client-libraries__select {\n width: fit-content;\n\n .client-libraries-icon__more + span {\n display: none;\n }\n }\n}\n@container client-libraries-content (width < 380px) {\n .client-libraries {\n width: 100%;\n }\n .client-libraries span {\n display: none;\n }\n}\n.client-libraries__active {\n color: var(--scalar-color-1);\n border-bottom: 1px solid var(--scalar-color-1);\n}\n@keyframes codeloader {\n 0% {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(1turn);\n }\n}\n.client-libraries .client-libraries-text {\n font-size: var(--scalar-small);\n position: relative;\n display: flex;\n align-items: center;\n}\n.client-libraries__active .client-libraries-text {\n color: var(--scalar-color-1);\n font-weight: var(--scalar-semibold);\n}\n@media screen and (max-width: 600px) {\n .references-classic .client-libraries {\n flex-direction: column;\n }\n}\n</style>\n","<script setup lang=\"ts\">\nimport { TabGroup, TabList, TabPanel, TabPanels } from '@headlessui/vue'\nimport {\n DEFAULT_CLIENT,\n type ClientOptionGroup,\n} from '@scalar/api-client/v2/blocks/operation-code-sample'\nimport { ScalarCodeBlock, ScalarMarkdown } from '@scalar/components'\nimport type { AvailableClient } from '@scalar/snippetz'\nimport { type WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type { XScalarSdkInstallation } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-sdk-installation'\nimport { computed, useId, useTemplateRef } from 'vue'\n\nimport {\n getFeaturedClients,\n isFeaturedClient,\n} from '@/blocks/scalar-client-selector-block/helpers/featured-clients'\n\nimport ClientDropdown from './ClientDropdown.vue'\n\nconst {\n clientOptions,\n xScalarSdkInstallation,\n eventBus,\n selectedClient = DEFAULT_CLIENT,\n} = defineProps<{\n /** Selected SDK installation instructions */\n xScalarSdkInstallation?: XScalarSdkInstallation['x-scalar-sdk-installation']\n /** Computed list of all available Http Client options */\n clientOptions: ClientOptionGroup[]\n /** The currently selected Http Client */\n selectedClient?: AvailableClient\n /** Event bus */\n eventBus: WorkspaceEventBus\n}>()\n\nconst headingId = useId()\nconst morePanel = useId()\n\n/** Grab the option for the currently selected Http Client */\nconst selectedClientOption = computed(\n () =>\n clientOptions.flatMap(\n (optionGroup) =>\n optionGroup.options.find((option) => option.id === selectedClient) ??\n [],\n )[0],\n)\n\n/** List of featured clients */\nconst featuredClients = computed(() => getFeaturedClients(clientOptions))\n\n/** Currently selected tab index */\nconst tabIndex = computed(() =>\n featuredClients.value.findIndex(\n (featuredClient) => selectedClient === featuredClient.id,\n ),\n)\n\nconst wrapper = useTemplateRef('wrapper-ref')\n\n/** Emit the selected client event on tab */\nconst onTabSelect = (i: number) => {\n const client = featuredClients.value[i]\n\n if (!client || !wrapper.value) {\n return\n }\n\n eventBus.emit('workspace:update:selected-client', client.id)\n}\n\nconst installationInstructions = computed(() => {\n // Check whether we have instructions at all\n if (\n !Array.isArray(xScalarSdkInstallation) ||\n !xScalarSdkInstallation?.length\n ) {\n return undefined\n }\n\n // Find the instructions for the current language\n const instruction = xScalarSdkInstallation.find((instruction) => {\n const targetKey = selectedClient?.split('/')[0]?.toLowerCase()\n return instruction.lang.toLowerCase() === targetKey\n })\n\n // Nothing found?\n if (!instruction) {\n return undefined\n }\n\n // Got it!\n return instruction\n})\n\ndefineExpose({\n selectedClientOption,\n})\n</script>\n<template>\n <div\n v-if=\"clientOptions.length\"\n ref=\"wrapper-ref\">\n <TabGroup\n manual\n :selectedIndex=\"tabIndex\"\n @change=\"onTabSelect\">\n <div\n :id=\"headingId\"\n class=\"client-libraries-heading\">\n Client Libraries\n </div>\n\n <!-- Tabs -->\n <TabList\n :aria-labelledby=\"headingId\"\n class=\"client-libraries-list\">\n <ClientDropdown\n :clientOptions\n :eventBus\n :featuredClients\n :morePanel\n :selectedClient />\n </TabList>\n\n <!-- Content -->\n <TabPanels>\n <template\n v-if=\"\n installationInstructions?.source ||\n installationInstructions?.description\n \">\n <div\n v-if=\"installationInstructions.description\"\n class=\"selected-client card-footer -outline-offset-2\"\n :class=\"installationInstructions.source && 'rounded-b-none'\"\n role=\"tabpanel\"\n tabindex=\"0\">\n <ScalarMarkdown :value=\"installationInstructions.description\" />\n </div>\n <div\n v-if=\"installationInstructions.source\"\n class=\"selected-client card-footer border-t-0 p-0\"\n role=\"tabpanel\"\n tabindex=\"1\">\n <ScalarCodeBlock\n class=\"rounded-b-lg *:first:p-3\"\n :content=\"installationInstructions.source\"\n copy=\"always\"\n lang=\"shell\" />\n </div>\n </template>\n <template v-else-if=\"isFeaturedClient(selectedClient)\">\n <TabPanel\n v-for=\"client in featuredClients\"\n :key=\"client.id\"\n class=\"selected-client card-footer -outline-offset-2\">\n {{ client.title }}\n </TabPanel>\n </template>\n <div\n v-else\n :id=\"morePanel\"\n class=\"selected-client card-footer -outline-offset-2\"\n role=\"tabpanel\"\n tabindex=\"0\">\n {{ selectedClientOption?.title }}\n </div>\n </TabPanels>\n </TabGroup>\n </div>\n</template>\n<style scoped>\n.selected-client {\n color: var(--scalar-color-1);\n font-size: var(--scalar-small);\n font-family: var(--scalar-font-code);\n padding: 9px 12px;\n border-top: none;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n background: var(--scalar-background-1);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n border-bottom-left-radius: var(--scalar-radius-xl);\n border-bottom-right-radius: var(--scalar-radius-xl);\n min-height: fit-content;\n}\n.client-libraries-heading {\n font-size: var(--scalar-small);\n font-weight: var(--scalar-font-medium);\n color: var(--scalar-color-1);\n padding: 9px 12px;\n background-color: var(--scalar-background-2);\n display: flex;\n align-items: center;\n max-height: 32px;\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n border-top-left-radius: var(--scalar-radius-xl);\n border-top-right-radius: var(--scalar-radius-xl);\n}\n:deep(.scalar-codeblock-pre .hljs) {\n margin-top: 8px;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { TabGroup, TabList, TabPanel, TabPanels } from '@headlessui/vue'\nimport {\n DEFAULT_CLIENT,\n type ClientOptionGroup,\n} from '@scalar/api-client/v2/blocks/operation-code-sample'\nimport { ScalarCodeBlock, ScalarMarkdown } from '@scalar/components'\nimport type { AvailableClient } from '@scalar/snippetz'\nimport { type WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type { XScalarSdkInstallation } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-sdk-installation'\nimport { computed, useId, useTemplateRef } from 'vue'\n\nimport {\n getFeaturedClients,\n isFeaturedClient,\n} from '@/blocks/scalar-client-selector-block/helpers/featured-clients'\n\nimport ClientDropdown from './ClientDropdown.vue'\n\nconst {\n clientOptions,\n xScalarSdkInstallation,\n eventBus,\n selectedClient = DEFAULT_CLIENT,\n} = defineProps<{\n /** Selected SDK installation instructions */\n xScalarSdkInstallation?: XScalarSdkInstallation['x-scalar-sdk-installation']\n /** Computed list of all available Http Client options */\n clientOptions: ClientOptionGroup[]\n /** The currently selected Http Client */\n selectedClient?: AvailableClient\n /** Event bus */\n eventBus: WorkspaceEventBus\n}>()\n\nconst headingId = useId()\nconst morePanel = useId()\n\n/** Grab the option for the currently selected Http Client */\nconst selectedClientOption = computed(\n () =>\n clientOptions.flatMap(\n (optionGroup) =>\n optionGroup.options.find((option) => option.id === selectedClient) ??\n [],\n )[0],\n)\n\n/** List of featured clients */\nconst featuredClients = computed(() => getFeaturedClients(clientOptions))\n\n/** Currently selected tab index */\nconst tabIndex = computed(() =>\n featuredClients.value.findIndex(\n (featuredClient) => selectedClient === featuredClient.id,\n ),\n)\n\nconst wrapper = useTemplateRef('wrapper-ref')\n\n/** Emit the selected client event on tab */\nconst onTabSelect = (i: number) => {\n const client = featuredClients.value[i]\n\n if (!client || !wrapper.value) {\n return\n }\n\n eventBus.emit('workspace:update:selected-client', client.id)\n}\n\nconst installationInstructions = computed(() => {\n // Check whether we have instructions at all\n if (\n !Array.isArray(xScalarSdkInstallation) ||\n !xScalarSdkInstallation?.length\n ) {\n return undefined\n }\n\n // Find the instructions for the current language\n const instruction = xScalarSdkInstallation.find((instruction) => {\n const targetKey = selectedClient?.split('/')[0]?.toLowerCase()\n return instruction.lang.toLowerCase() === targetKey\n })\n\n // Nothing found?\n if (!instruction) {\n return undefined\n }\n\n // Got it!\n return instruction\n})\n\ndefineExpose({\n selectedClientOption,\n})\n</script>\n<template>\n <div\n v-if=\"clientOptions.length\"\n ref=\"wrapper-ref\">\n <TabGroup\n manual\n :selectedIndex=\"tabIndex\"\n @change=\"onTabSelect\">\n <div\n :id=\"headingId\"\n class=\"client-libraries-heading\">\n Client Libraries\n </div>\n\n <!-- Tabs -->\n <TabList\n :aria-labelledby=\"headingId\"\n class=\"client-libraries-list\">\n <ClientDropdown\n :clientOptions\n :eventBus\n :featuredClients\n :morePanel\n :selectedClient />\n </TabList>\n\n <!-- Content -->\n <TabPanels>\n <template\n v-if=\"\n installationInstructions?.source ||\n installationInstructions?.description\n \">\n <div\n v-if=\"installationInstructions.description\"\n class=\"selected-client card-footer -outline-offset-2\"\n :class=\"installationInstructions.source && 'rounded-b-none'\"\n role=\"tabpanel\"\n tabindex=\"0\">\n <ScalarMarkdown :value=\"installationInstructions.description\" />\n </div>\n <div\n v-if=\"installationInstructions.source\"\n class=\"selected-client card-footer border-t-0 p-0\"\n role=\"tabpanel\"\n tabindex=\"1\">\n <ScalarCodeBlock\n class=\"rounded-b-lg *:first:p-3\"\n :content=\"installationInstructions.source\"\n copy=\"always\"\n lang=\"shell\" />\n </div>\n </template>\n <template v-else-if=\"isFeaturedClient(selectedClient)\">\n <TabPanel\n v-for=\"client in featuredClients\"\n :key=\"client.id\"\n class=\"selected-client card-footer -outline-offset-2\">\n {{ client.title }}\n </TabPanel>\n </template>\n <div\n v-else\n :id=\"morePanel\"\n class=\"selected-client card-footer -outline-offset-2\"\n role=\"tabpanel\"\n tabindex=\"0\">\n {{ selectedClientOption?.title }}\n </div>\n </TabPanels>\n </TabGroup>\n </div>\n</template>\n<style scoped>\n.selected-client {\n color: var(--scalar-color-1);\n font-size: var(--scalar-small);\n font-family: var(--scalar-font-code);\n padding: 9px 12px;\n border-top: none;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n background: var(--scalar-background-1);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n border-bottom-left-radius: var(--scalar-radius-xl);\n border-bottom-right-radius: var(--scalar-radius-xl);\n min-height: fit-content;\n}\n.client-libraries-heading {\n font-size: var(--scalar-small);\n font-weight: var(--scalar-font-medium);\n color: var(--scalar-color-1);\n padding: 9px 12px;\n background-color: var(--scalar-background-2);\n display: flex;\n align-items: center;\n max-height: 32px;\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n border-top-left-radius: var(--scalar-radius-xl);\n border-top-right-radius: var(--scalar-radius-xl);\n}\n:deep(.scalar-codeblock-pre .hljs) {\n margin-top: 8px;\n}\n</style>\n","<script lang=\"ts\" setup>\nimport type { ApiReferenceConfiguration } from '@scalar/types/api-reference'\nimport { type WorkspaceEventBus } from '@scalar/workspace-store/events'\n\nimport Badge from '@/components/Badge/Badge.vue'\n\nconst { eventBus, documentDownloadType, documentUrl } = defineProps<{\n /** The document download type. */\n documentDownloadType: ApiReferenceConfiguration['documentDownloadType']\n /** The event bus for the handling all events. */\n eventBus: WorkspaceEventBus\n /**\n * URL of the OpenAPI document. Required when documentDownloadType is 'direct'\n * so the link can point to the document.\n */\n documentUrl?: string\n}>()\n\n// The id is retrieved at the layout level.\nconst handleDownloadClick = (format: 'json' | 'yaml') => {\n eventBus.emit('ui:download:document', { format })\n}\n</script>\n<template>\n <div\n v-if=\"\n ['yaml', 'json', 'both'].includes(documentDownloadType) ||\n (documentDownloadType === 'direct' && documentUrl)\n \"\n class=\"download-container group\"\n :class=\"{\n 'download-both': documentDownloadType === 'both',\n }\">\n <!-- Direct link to the document -->\n <a\n v-if=\"documentDownloadType === 'direct' && documentUrl\"\n class=\"download-link download-button\"\n :href=\"documentUrl\">\n <span> Download OpenAPI Document </span>\n </a>\n\n <!-- JSON -->\n <button\n v-if=\"documentDownloadType === 'json' || documentDownloadType === 'both'\"\n class=\"download-button\"\n type=\"button\"\n @click.prevent=\"() => handleDownloadClick('json')\">\n <span> Download OpenAPI Document </span>\n <Badge class=\"extension hidden group-hover:flex\">json</Badge>\n </button>\n\n <!-- YAML -->\n <button\n v-if=\"documentDownloadType === 'yaml' || documentDownloadType === 'both'\"\n class=\"download-button\"\n type=\"button\"\n @click.prevent=\"() => handleDownloadClick('yaml')\">\n <span> Download OpenAPI Document </span>\n <Badge class=\"extension hidden group-hover:flex\">yaml</Badge>\n </button>\n </div>\n</template>\n\n<style scoped>\n@reference '@/style.css';\n\n.download-container {\n display: flex;\n flex-direction: column;\n gap: 16px;\n margin: 0 0.5px 8px;\n position: relative;\n width: fit-content;\n z-index: 1;\n}\n\n.download-container:has(:focus-visible)::before,\n.download-container.download-both:hover::before {\n content: '';\n width: calc(100% + 24px);\n height: 90px;\n position: absolute;\n top: -11px;\n left: -12px;\n border-radius: var(--scalar-radius-lg);\n box-shadow: var(--scalar-shadow-2);\n pointer-events: none;\n background: var(--scalar-background-1);\n}\n\n.download-button {\n color: var(--scalar-link-color);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 4px;\n height: fit-content;\n padding: 0;\n position: relative;\n white-space: nowrap !important;\n\n outline: none;\n}\n\n.download-button::before {\n border-radius: var(--scalar-radius);\n content: '';\n height: calc(100% + 16px);\n left: -9px;\n position: absolute;\n top: -8px;\n width: calc(100% + 18px);\n}\n\n.download-button:last-of-type::before {\n width: calc(100% + 15px);\n}\n\n.download-button:hover::before {\n background: var(--scalar-background-2);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n\n.download-button:focus-visible::before {\n background: var(--scalar-background-2);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n @apply outline;\n}\n\n.download-button span {\n --font-color: var(--scalar-link-color, var(--scalar-color-accent));\n --font-visited: var(--scalar-link-color-visited, var(--scalar-color-2));\n\n text-decoration: var(--scalar-text-decoration);\n color: var(--font-color);\n font-weight: var(--scalar-link-font-weight, var(--scalar-semibold));\n text-underline-offset: 0.25rem;\n text-decoration-thickness: 1px;\n text-decoration-color: color-mix(in srgb, var(--font-color) 30%, transparent);\n align-items: center;\n display: flex;\n gap: 6px;\n line-height: 1.625;\n z-index: 1;\n}\n\n.download-button:hover span {\n text-decoration-color: var(--scalar-color-1, currentColor);\n color: var(--scalar-link-color-hover, var(--scalar-color-accent));\n -webkit-text-decoration: var(--scalar-text-decoration-hover);\n text-decoration: var(--scalar-text-decoration-hover);\n}\n\n/* Second button displayed when hovering over the download container */\n.download-button:nth-of-type(2) {\n @apply sr-only;\n}\n\n.download-container:has(:focus-visible) .download-button:nth-of-type(2),\n.download-container:hover .download-button:nth-of-type(2) {\n @apply not-sr-only;\n\n position: absolute;\n top: 42px;\n}\n\n.extension {\n z-index: 1;\n background: var(--scalar-link-color, var(--scalar-color-accent));\n color: var(--scalar-background-1);\n}\n.download-container:has(:focus-visible) .extension,\n.download-container:hover .extension {\n opacity: 1;\n}\n\n.download-link {\n --font-color: var(--scalar-link-color, var(--scalar-color-accent));\n --font-visited: var(--scalar-link-color-visited, var(--scalar-color-2));\n\n text-decoration: var(--scalar-text-decoration);\n color: var(--font-color);\n font-weight: var(--scalar-link-font-weight, var(--scalar-semibold));\n text-underline-offset: 0.25rem;\n text-decoration-thickness: 1px;\n text-decoration-color: color-mix(in srgb, var(--font-color) 30%, transparent);\n}\n\n.download-link:hover {\n --font-color: var(--scalar-link-color, var(--scalar-color-accent));\n text-decoration-color: var(--font-color);\n}\n</style>\n","<script lang=\"ts\" setup>\nimport type { ApiReferenceConfiguration } from '@scalar/types/api-reference'\nimport { type WorkspaceEventBus } from '@scalar/workspace-store/events'\n\nimport Badge from '@/components/Badge/Badge.vue'\n\nconst { eventBus, documentDownloadType, documentUrl } = defineProps<{\n /** The document download type. */\n documentDownloadType: ApiReferenceConfiguration['documentDownloadType']\n /** The event bus for the handling all events. */\n eventBus: WorkspaceEventBus\n /**\n * URL of the OpenAPI document. Required when documentDownloadType is 'direct'\n * so the link can point to the document.\n */\n documentUrl?: string\n}>()\n\n// The id is retrieved at the layout level.\nconst handleDownloadClick = (format: 'json' | 'yaml') => {\n eventBus.emit('ui:download:document', { format })\n}\n</script>\n<template>\n <div\n v-if=\"\n ['yaml', 'json', 'both'].includes(documentDownloadType) ||\n (documentDownloadType === 'direct' && documentUrl)\n \"\n class=\"download-container group\"\n :class=\"{\n 'download-both': documentDownloadType === 'both',\n }\">\n <!-- Direct link to the document -->\n <a\n v-if=\"documentDownloadType === 'direct' && documentUrl\"\n class=\"download-link download-button\"\n :href=\"documentUrl\">\n <span> Download OpenAPI Document </span>\n </a>\n\n <!-- JSON -->\n <button\n v-if=\"documentDownloadType === 'json' || documentDownloadType === 'both'\"\n class=\"download-button\"\n type=\"button\"\n @click.prevent=\"() => handleDownloadClick('json')\">\n <span> Download OpenAPI Document </span>\n <Badge class=\"extension hidden group-hover:flex\">json</Badge>\n </button>\n\n <!-- YAML -->\n <button\n v-if=\"documentDownloadType === 'yaml' || documentDownloadType === 'both'\"\n class=\"download-button\"\n type=\"button\"\n @click.prevent=\"() => handleDownloadClick('yaml')\">\n <span> Download OpenAPI Document </span>\n <Badge class=\"extension hidden group-hover:flex\">yaml</Badge>\n </button>\n </div>\n</template>\n\n<style scoped>\n@reference '@/style.css';\n\n.download-container {\n display: flex;\n flex-direction: column;\n gap: 16px;\n margin: 0 0.5px 8px;\n position: relative;\n width: fit-content;\n z-index: 1;\n}\n\n.download-container:has(:focus-visible)::before,\n.download-container.download-both:hover::before {\n content: '';\n width: calc(100% + 24px);\n height: 90px;\n position: absolute;\n top: -11px;\n left: -12px;\n border-radius: var(--scalar-radius-lg);\n box-shadow: var(--scalar-shadow-2);\n pointer-events: none;\n background: var(--scalar-background-1);\n}\n\n.download-button {\n color: var(--scalar-link-color);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 4px;\n height: fit-content;\n padding: 0;\n position: relative;\n white-space: nowrap !important;\n\n outline: none;\n}\n\n.download-button::before {\n border-radius: var(--scalar-radius);\n content: '';\n height: calc(100% + 16px);\n left: -9px;\n position: absolute;\n top: -8px;\n width: calc(100% + 18px);\n}\n\n.download-button:last-of-type::before {\n width: calc(100% + 15px);\n}\n\n.download-button:hover::before {\n background: var(--scalar-background-2);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n\n.download-button:focus-visible::before {\n background: var(--scalar-background-2);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n @apply outline;\n}\n\n.download-button span {\n --font-color: var(--scalar-link-color, var(--scalar-color-accent));\n --font-visited: var(--scalar-link-color-visited, var(--scalar-color-2));\n\n text-decoration: var(--scalar-text-decoration);\n color: var(--font-color);\n font-weight: var(--scalar-link-font-weight, var(--scalar-semibold));\n text-underline-offset: 0.25rem;\n text-decoration-thickness: 1px;\n text-decoration-color: color-mix(in srgb, var(--font-color) 30%, transparent);\n align-items: center;\n display: flex;\n gap: 6px;\n line-height: 1.625;\n z-index: 1;\n}\n\n.download-button:hover span {\n text-decoration-color: var(--scalar-color-1, currentColor);\n color: var(--scalar-link-color-hover, var(--scalar-color-accent));\n -webkit-text-decoration: var(--scalar-text-decoration-hover);\n text-decoration: var(--scalar-text-decoration-hover);\n}\n\n/* Second button displayed when hovering over the download container */\n.download-button:nth-of-type(2) {\n @apply sr-only;\n}\n\n.download-container:has(:focus-visible) .download-button:nth-of-type(2),\n.download-container:hover .download-button:nth-of-type(2) {\n @apply not-sr-only;\n\n position: absolute;\n top: 42px;\n}\n\n.extension {\n z-index: 1;\n background: var(--scalar-link-color, var(--scalar-color-accent));\n color: var(--scalar-background-1);\n}\n.download-container:has(:focus-visible) .extension,\n.download-container:hover .extension {\n opacity: 1;\n}\n\n.download-link {\n --font-color: var(--scalar-link-color, var(--scalar-color-accent));\n --font-visited: var(--scalar-link-color-visited, var(--scalar-color-2));\n\n text-decoration: var(--scalar-text-decoration);\n color: var(--font-color);\n font-weight: var(--scalar-link-font-weight, var(--scalar-semibold));\n text-underline-offset: 0.25rem;\n text-decoration-thickness: 1px;\n text-decoration-color: color-mix(in srgb, var(--font-color) 30%, transparent);\n}\n\n.download-link:hover {\n --font-color: var(--scalar-link-color, var(--scalar-color-accent));\n text-decoration-color: var(--font-color);\n}\n</style>\n","<script setup lang=\"ts\">\nconst { row } = defineProps<{\n row?: boolean\n}>()\n</script>\n\n<template>\n <div\n class=\"introduction-card\"\n :class=\"{ 'introduction-card-row': row }\">\n <slot />\n </div>\n</template>\n\n<style scoped>\n/* Modern layout */\n.introduction-card {\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n.introduction-card-row {\n gap: 24px;\n}\n/* Classic layout */\n@media (min-width: 600px) {\n .introduction-card-row {\n flex-flow: row wrap;\n }\n}\n.introduction-card-row > * {\n flex: 1;\n}\n@media (min-width: 600px) {\n .introduction-card-row > * {\n min-width: min-content;\n }\n}\n@media (max-width: 600px) {\n .introduction-card-row > * {\n max-width: 100%;\n }\n}\n@container (max-width: 900px) {\n .introduction-card-row {\n flex-direction: column;\n align-items: stretch;\n gap: 0px;\n }\n}\n.introduction-card :deep(.security-scheme-label) {\n text-transform: uppercase;\n font-weight: var(--scalar-semibold);\n}\n.introduction-card-row :deep(.scalar-card:nth-of-type(2) .scalar-card-header) {\n display: none;\n}\n.introduction-card-row :deep(.scalar-card:nth-of-type(2) .scalar-card-header) {\n display: none;\n}\n.introduction-card-row\n :deep(\n .scalar-card:nth-of-type(2)\n .scalar-card-header.scalar-card--borderless\n + .scalar-card-content\n ) {\n margin-top: 0;\n}\n</style>\n","<script setup lang=\"ts\">\nconst { row } = defineProps<{\n row?: boolean\n}>()\n</script>\n\n<template>\n <div\n class=\"introduction-card\"\n :class=\"{ 'introduction-card-row': row }\">\n <slot />\n </div>\n</template>\n\n<style scoped>\n/* Modern layout */\n.introduction-card {\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n.introduction-card-row {\n gap: 24px;\n}\n/* Classic layout */\n@media (min-width: 600px) {\n .introduction-card-row {\n flex-flow: row wrap;\n }\n}\n.introduction-card-row > * {\n flex: 1;\n}\n@media (min-width: 600px) {\n .introduction-card-row > * {\n min-width: min-content;\n }\n}\n@media (max-width: 600px) {\n .introduction-card-row > * {\n max-width: 100%;\n }\n}\n@container (max-width: 900px) {\n .introduction-card-row {\n flex-direction: column;\n align-items: stretch;\n gap: 0px;\n }\n}\n.introduction-card :deep(.security-scheme-label) {\n text-transform: uppercase;\n font-weight: var(--scalar-semibold);\n}\n.introduction-card-row :deep(.scalar-card:nth-of-type(2) .scalar-card-header) {\n display: none;\n}\n.introduction-card-row :deep(.scalar-card:nth-of-type(2) .scalar-card-header) {\n display: none;\n}\n.introduction-card-row\n :deep(\n .scalar-card:nth-of-type(2)\n .scalar-card-header.scalar-card--borderless\n + .scalar-card-content\n ) {\n margin-top: 0;\n}\n</style>\n","<script setup lang=\"ts\">\ndefineProps<{\n /**\n * Skips rendering the section container div and its styles, rendering only the slot directly.\n */\n omit?: boolean\n}>()\n</script>\n\n<template>\n <slot v-if=\"omit\" />\n <div\n v-else\n class=\"section-container\">\n <slot />\n </div>\n</template>\n\n<style scoped>\n.section-container {\n position: relative;\n padding: 0 60px;\n width: 100%;\n border-top: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n.section-container:has(.introduction-section) {\n border-top: none;\n}\n@container narrow-references-container (max-width: 900px) {\n .section-container {\n padding: 0;\n }\n}\n</style>\n","<script setup lang=\"ts\">\ndefineProps<{\n /**\n * Skips rendering the section container div and its styles, rendering only the slot directly.\n */\n omit?: boolean\n}>()\n</script>\n\n<template>\n <slot v-if=\"omit\" />\n <div\n v-else\n class=\"section-container\">\n <slot />\n </div>\n</template>\n\n<style scoped>\n.section-container {\n position: relative;\n padding: 0 60px;\n width: 100%;\n border-top: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n.section-container:has(.introduction-section) {\n border-top: none;\n}\n@container narrow-references-container (max-width: 900px) {\n .section-container {\n padding: 0;\n }\n}\n</style>\n","<script setup lang=\"ts\">\nimport type { Node } from '@scalar/code-highlight'\nimport { ScalarMarkdown } from '@scalar/components'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { useTemplateRef } from 'vue'\n\nimport { useIntersection } from '@/hooks/use-intersection'\n\nconst { eventBus, id } = defineProps<{\n id?: string\n content: string\n transformHeading: (node: Node) => Node\n eventBus: WorkspaceEventBus | null\n}>()\n\nconst element = useTemplateRef<HTMLElement>('element')\n\nuseIntersection(element, () =>\n id ? eventBus?.emit('intersecting:nav-item', { id }) : undefined,\n)\n</script>\n\n<template>\n <div\n :id\n ref=\"element\"\n class=\"introduction-description-heading scroll-mt-16\">\n <ScalarMarkdown\n :transform=\"transformHeading\"\n transformType=\"heading\"\n :value=\"content\"\n withImages />\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport type { Node } from '@scalar/code-highlight'\nimport { ScalarMarkdown } from '@scalar/components'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { useTemplateRef } from 'vue'\n\nimport { useIntersection } from '@/hooks/use-intersection'\n\nconst { eventBus, id } = defineProps<{\n id?: string\n content: string\n transformHeading: (node: Node) => Node\n eventBus: WorkspaceEventBus | null\n}>()\n\nconst element = useTemplateRef<HTMLElement>('element')\n\nuseIntersection(element, () =>\n id ? eventBus?.emit('intersecting:nav-item', { id }) : undefined,\n)\n</script>\n\n<template>\n <div\n :id\n ref=\"element\"\n class=\"introduction-description-heading scroll-mt-16\">\n <ScalarMarkdown\n :transform=\"transformHeading\"\n transformType=\"heading\"\n :value=\"content\"\n withImages />\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport {\n getHeadings,\n isHeading,\n splitContent,\n textFromNode,\n type Node,\n} from '@scalar/code-highlight/markdown'\nimport type { Heading } from '@scalar/types/legacy'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport GitHubSlugger from 'github-slugger'\nimport { computed } from 'vue'\n\nimport InfoMarkdownSection from './InfoMarkdownSection.vue'\n\nconst { description, headingSlugGenerator } = defineProps<{\n eventBus: WorkspaceEventBus | null\n headingSlugGenerator: (heading: Heading) => string\n /** Markdown document */\n description?: string\n}>()\n\n/**\n * Descriptions, but split into multiple sections.\n * We need this to wrap the headings in IntersectionObserver components.\n */\nconst sections = computed(() => {\n if (!description) {\n return []\n }\n\n const slugger = new GitHubSlugger()\n\n const items = splitContent(description).map((markdown) => {\n // Get “first” (and only) heading, if available\n const headings = getHeadings(markdown)\n const heading = headings[0]\n\n // Generate an id for the heading\n const id = heading\n ? headingSlugGenerator({\n ...heading,\n slug: slugger.slug(heading.value),\n })\n : undefined\n\n return {\n id,\n content: markdown,\n }\n })\n\n return items\n})\n\n/** Add ids to all headings */\nconst transformHeading = (node: Node) => {\n if (!isHeading(node)) {\n return node\n }\n\n const slugger = new GitHubSlugger()\n\n const value = textFromNode(node)\n\n node.data = {\n hProperties: {\n id: headingSlugGenerator({\n depth: node.depth,\n value,\n slug: slugger.slug(value),\n }),\n },\n }\n\n return node\n}\n</script>\n\n<template>\n <div\n v-if=\"description\"\n class=\"introduction-description mt-6 flex flex-col\">\n <InfoMarkdownSection\n v-for=\"section in sections\"\n :id=\"section.id\"\n :key=\"section.id\"\n :content=\"section.content\"\n :eventBus=\"eventBus\"\n :transformHeading=\"transformHeading\" />\n </div>\n</template>\n\n<style scoped>\n.references-classic .introduction-description :deep(img) {\n max-width: 720px;\n}\n</style>\n","<script setup lang=\"ts\">\nimport {\n getHeadings,\n isHeading,\n splitContent,\n textFromNode,\n type Node,\n} from '@scalar/code-highlight/markdown'\nimport type { Heading } from '@scalar/types/legacy'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport GitHubSlugger from 'github-slugger'\nimport { computed } from 'vue'\n\nimport InfoMarkdownSection from './InfoMarkdownSection.vue'\n\nconst { description, headingSlugGenerator } = defineProps<{\n eventBus: WorkspaceEventBus | null\n headingSlugGenerator: (heading: Heading) => string\n /** Markdown document */\n description?: string\n}>()\n\n/**\n * Descriptions, but split into multiple sections.\n * We need this to wrap the headings in IntersectionObserver components.\n */\nconst sections = computed(() => {\n if (!description) {\n return []\n }\n\n const slugger = new GitHubSlugger()\n\n const items = splitContent(description).map((markdown) => {\n // Get “first” (and only) heading, if available\n const headings = getHeadings(markdown)\n const heading = headings[0]\n\n // Generate an id for the heading\n const id = heading\n ? headingSlugGenerator({\n ...heading,\n slug: slugger.slug(heading.value),\n })\n : undefined\n\n return {\n id,\n content: markdown,\n }\n })\n\n return items\n})\n\n/** Add ids to all headings */\nconst transformHeading = (node: Node) => {\n if (!isHeading(node)) {\n return node\n }\n\n const slugger = new GitHubSlugger()\n\n const value = textFromNode(node)\n\n node.data = {\n hProperties: {\n id: headingSlugGenerator({\n depth: node.depth,\n value,\n slug: slugger.slug(value),\n }),\n },\n }\n\n return node\n}\n</script>\n\n<template>\n <div\n v-if=\"description\"\n class=\"introduction-description mt-6 flex flex-col\">\n <InfoMarkdownSection\n v-for=\"section in sections\"\n :id=\"section.id\"\n :key=\"section.id\"\n :content=\"section.content\"\n :eventBus=\"eventBus\"\n :transformHeading=\"transformHeading\" />\n </div>\n</template>\n\n<style scoped>\n.references-classic .introduction-description :deep(img) {\n max-width: 720px;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { cva } from '@scalar/components'\nimport { ScalarIconEnvelopeSimple } from '@scalar/icons'\nimport { type OpenAPIV3_1 } from '@scalar/openapi-types'\n\nconst variants = cva({\n base: 'text-c-1 mr-2 flex min-h-7 min-w-7 items-center rounded-lg border px-2 py-1 group-last:mr-0 xl:border-none',\n variants: {\n link: {\n true: 'no-underline hover:bg-b-2',\n },\n },\n})\n\ndefineProps<{\n value?: OpenAPIV3_1.ContactObject\n}>()\n</script>\n\n<template>\n <template v-if=\"value\">\n <div\n class=\"group flex items-center last:border-r-0 xl:border-r xl:first:ml-auto\">\n <a\n v-if=\"value?.email\"\n :class=\"variants({ link: true })\"\n :href=\"`mailto:${value?.email}`\">\n <ScalarIconEnvelopeSimple\n weight=\"bold\"\n class=\"size-3 text-current\" />\n <span class=\"ml-1 empty:hidden\">{{ value.name }}</span>\n </a>\n <span\n v-else-if=\"value?.name\"\n :class=\"variants({ link: false })\">\n {{ value.name }}\n </span>\n </div>\n </template>\n</template>\n","<script setup lang=\"ts\">\nimport { cva } from '@scalar/components'\nimport { ScalarIconEnvelopeSimple } from '@scalar/icons'\nimport { type OpenAPIV3_1 } from '@scalar/openapi-types'\n\nconst variants = cva({\n base: 'text-c-1 mr-2 flex min-h-7 min-w-7 items-center rounded-lg border px-2 py-1 group-last:mr-0 xl:border-none',\n variants: {\n link: {\n true: 'no-underline hover:bg-b-2',\n },\n },\n})\n\ndefineProps<{\n value?: OpenAPIV3_1.ContactObject\n}>()\n</script>\n\n<template>\n <template v-if=\"value\">\n <div\n class=\"group flex items-center last:border-r-0 xl:border-r xl:first:ml-auto\">\n <a\n v-if=\"value?.email\"\n :class=\"variants({ link: true })\"\n :href=\"`mailto:${value?.email}`\">\n <ScalarIconEnvelopeSimple\n weight=\"bold\"\n class=\"size-3 text-current\" />\n <span class=\"ml-1 empty:hidden\">{{ value.name }}</span>\n </a>\n <span\n v-else-if=\"value?.name\"\n :class=\"variants({ link: false })\">\n {{ value.name }}\n </span>\n </div>\n </template>\n</template>\n","<script setup lang=\"ts\">\nimport { ScalarIconGavel } from '@scalar/icons'\nimport { type OpenAPIV3_1 } from '@scalar/openapi-types'\n\ndefineProps<{\n value?: OpenAPIV3_1.LicenseObject\n}>()\n</script>\n\n<template>\n <div\n class=\"group flex h-fit items-center last:border-r-0 xl:border-r xl:first:ml-auto\">\n <a\n 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\"\n v-if=\"value?.url\"\n :href=\"value.url\"\n target=\"_blank\"\n rel=\"noopener noreferrer\">\n <ScalarIconGavel\n weight=\"bold\"\n class=\"size-3 text-current\" />\n <span class=\"ml-1 empty:hidden\">{{\n value?.name || value.identifier || value.url\n }}</span>\n </a>\n <template v-else>\n <ScalarIconGavel\n weight=\"bold\"\n class=\"size-3 text-current\" />\n <span class=\"ml-1 empty:hidden\">{{ value?.name }}</span>\n </template>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { ScalarIconGavel } from '@scalar/icons'\nimport { type OpenAPIV3_1 } from '@scalar/openapi-types'\n\ndefineProps<{\n value?: OpenAPIV3_1.LicenseObject\n}>()\n</script>\n\n<template>\n <div\n class=\"group flex h-fit items-center last:border-r-0 xl:border-r xl:first:ml-auto\">\n <a\n 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\"\n v-if=\"value?.url\"\n :href=\"value.url\"\n target=\"_blank\"\n rel=\"noopener noreferrer\">\n <ScalarIconGavel\n weight=\"bold\"\n class=\"size-3 text-current\" />\n <span class=\"ml-1 empty:hidden\">{{\n value?.name || value.identifier || value.url\n }}</span>\n </a>\n <template v-else>\n <ScalarIconGavel\n weight=\"bold\"\n class=\"size-3 text-current\" />\n <span class=\"ml-1 empty:hidden\">{{ value?.name }}</span>\n </template>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { ScalarIconScroll } from '@scalar/icons'\nimport { type OpenAPIV3_1 } from '@scalar/openapi-types'\n\ndefineProps<{\n value?: OpenAPIV3_1.InfoObject['termsOfService']\n}>()\n</script>\n\n<template>\n <template v-if=\"value\">\n <div\n class=\"group flex items-center last:border-r-0 xl:border-r xl:first:ml-auto\">\n <a\n 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\"\n :href=\"value\"\n target=\"_blank\"\n rel=\"noopener noreferrer\">\n <ScalarIconScroll\n weight=\"bold\"\n class=\"size-3 text-current\" />\n <span class=\"ml-1 empty:hidden\">Terms of Service</span>\n </a>\n </div>\n </template>\n</template>\n","<script setup lang=\"ts\">\nimport { ScalarIconScroll } from '@scalar/icons'\nimport { type OpenAPIV3_1 } from '@scalar/openapi-types'\n\ndefineProps<{\n value?: OpenAPIV3_1.InfoObject['termsOfService']\n}>()\n</script>\n\n<template>\n <template v-if=\"value\">\n <div\n class=\"group flex items-center last:border-r-0 xl:border-r xl:first:ml-auto\">\n <a\n 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\"\n :href=\"value\"\n target=\"_blank\"\n rel=\"noopener noreferrer\">\n <ScalarIconScroll\n weight=\"bold\"\n class=\"size-3 text-current\" />\n <span class=\"ml-1 empty:hidden\">Terms of Service</span>\n </a>\n </div>\n </template>\n</template>\n","<script setup lang=\"ts\">\nimport type {\n ExternalDocumentationObject,\n InfoObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nimport { LinkList } from '@/components/LinkList'\nimport { ExternalDocs } from '@/features/external-docs'\nimport { Contact, License, TermsOfService } from '@/features/info-object'\n\ndefineProps<{\n info: InfoObject\n externalDocs?: ExternalDocumentationObject\n}>()\n</script>\n\n<template>\n <LinkList>\n <ExternalDocs :value=\"externalDocs\" />\n <Contact\n v-if=\"info.contact\"\n :value=\"info.contact\" />\n <License\n v-if=\"info.license\"\n :value=\"info.license\" />\n <TermsOfService\n v-if=\"info.termsOfService\"\n :value=\"info.termsOfService\" />\n </LinkList>\n</template>\n","<script setup lang=\"ts\">\nimport type {\n ExternalDocumentationObject,\n InfoObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nimport { LinkList } from '@/components/LinkList'\nimport { ExternalDocs } from '@/features/external-docs'\nimport { Contact, License, TermsOfService } from '@/features/info-object'\n\ndefineProps<{\n info: InfoObject\n externalDocs?: ExternalDocumentationObject\n}>()\n</script>\n\n<template>\n <LinkList>\n <ExternalDocs :value=\"externalDocs\" />\n <Contact\n v-if=\"info.contact\"\n :value=\"info.contact\" />\n <License\n v-if=\"info.license\"\n :value=\"info.license\" />\n <TermsOfService\n v-if=\"info.termsOfService\"\n :value=\"info.termsOfService\" />\n </LinkList>\n</template>\n","<script setup lang=\"ts\">\nimport type { InfoObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport { Badge } from '@/components/Badge'\n\nconst { version } = defineProps<{\n version: InfoObject['version']\n}>()\n\n/** Format the version number to be displayed in the badge */\nconst prefixedVersion = computed(() => {\n if (version == null) {\n return version\n }\n\n const versionString = String(version)\n\n // Prefix with \"v\" if the first character is a number\n return /^\\d/.test(versionString) ? `v${versionString}` : versionString\n})\n</script>\n<template>\n <Badge v-if=\"prefixedVersion\">{{ prefixedVersion }}</Badge>\n</template>\n","<script setup lang=\"ts\">\nimport type { InfoObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport { Badge } from '@/components/Badge'\n\nconst { version } = defineProps<{\n version: InfoObject['version']\n}>()\n\n/** Format the version number to be displayed in the badge */\nconst prefixedVersion = computed(() => {\n if (version == null) {\n return version\n }\n\n const versionString = String(version)\n\n // Prefix with \"v\" if the first character is a number\n return /^\\d/.test(versionString) ? `v${versionString}` : versionString\n})\n</script>\n<template>\n <Badge v-if=\"prefixedVersion\">{{ prefixedVersion }}</Badge>\n</template>\n","<script setup lang=\"ts\">\nimport { Badge } from '@/components/Badge'\n\ndefineProps<{\n oasVersion?: string\n}>()\n</script>\n\n<template>\n <Badge v-if=\"oasVersion\">OAS {{ oasVersion }}</Badge>\n</template>\n","<script setup lang=\"ts\">\nimport { Badge } from '@/components/Badge'\n\ndefineProps<{\n oasVersion?: string\n}>()\n</script>\n\n<template>\n <Badge v-if=\"oasVersion\">OAS {{ oasVersion }}</Badge>\n</template>\n","<script setup lang=\"ts\">\nimport type { Heading } from '@scalar/types/legacy'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type {\n ExternalDocumentationObject,\n InfoObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nimport {\n Section,\n SectionColumn,\n SectionColumns,\n SectionContainer,\n SectionContent,\n SectionHeader,\n SectionHeaderTag,\n} from '@/components/Section'\nimport { SpecificationExtension } from '@/features/specification-extension'\n\nimport InfoDescription from './InfoDescription.vue'\nimport InfoLinks from './InfoLinks.vue'\nimport InfoVersion from './InfoVersion.vue'\nimport OpenApiVersion from './OpenApiVersion.vue'\n\ndefineProps<{\n id: string | undefined\n oasVersion: string | undefined\n info: InfoObject | undefined\n externalDocs?: ExternalDocumentationObject\n documentExtensions?: Record<string, unknown>\n infoExtensions?: Record<string, unknown>\n headingSlugGenerator: (heading: Heading) => string\n eventBus: WorkspaceEventBus | null\n}>()\n</script>\n\n<template>\n <SectionContainer>\n <!-- If the #after slot is used, we need to add a gap to the section. -->\n <Section\n :id=\"id\"\n aria-label=\"Introduction\"\n class=\"introduction-section z-1 gap-12\"\n @intersecting=\"\n () => id && eventBus?.emit('intersecting:nav-item', { id })\n \">\n <SectionContent :loading=\"!info\">\n <div class=\"flex gap-1.5\">\n <InfoVersion\n v-if=\"info\"\n :version=\"info?.version\" />\n <OpenApiVersion :oasVersion=\"oasVersion\" />\n </div>\n <SectionHeader\n :loading=\"!info?.title\"\n tight>\n <SectionHeaderTag :level=\"1\">\n {{ info?.title }}\n </SectionHeaderTag>\n <template #links>\n <InfoLinks\n v-if=\"info\"\n :externalDocs=\"externalDocs\"\n :info=\"info\" />\n </template>\n </SectionHeader>\n <SectionColumns>\n <SectionColumn>\n <slot name=\"download-link\" />\n <InfoDescription\n :description=\"info?.description\"\n :eventBus=\"eventBus\"\n :headingSlugGenerator=\"headingSlugGenerator\" />\n </SectionColumn>\n <SectionColumn v-if=\"$slots.aside\">\n <div class=\"sticky-cards\">\n <slot name=\"aside\" />\n </div>\n </SectionColumn>\n </SectionColumns>\n <SpecificationExtension :value=\"documentExtensions\" />\n <SpecificationExtension :value=\"infoExtensions\" />\n </SectionContent>\n <slot name=\"after\" />\n </Section>\n </SectionContainer>\n</template>\n\n<style scoped>\n.sticky-cards {\n display: flex;\n flex-direction: column;\n position: sticky;\n top: calc(var(--refs-viewport-offset) + 24px);\n}\n</style>\n","<script setup lang=\"ts\">\nimport type { Heading } from '@scalar/types/legacy'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type {\n ExternalDocumentationObject,\n InfoObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nimport {\n Section,\n SectionColumn,\n SectionColumns,\n SectionContainer,\n SectionContent,\n SectionHeader,\n SectionHeaderTag,\n} from '@/components/Section'\nimport { SpecificationExtension } from '@/features/specification-extension'\n\nimport InfoDescription from './InfoDescription.vue'\nimport InfoLinks from './InfoLinks.vue'\nimport InfoVersion from './InfoVersion.vue'\nimport OpenApiVersion from './OpenApiVersion.vue'\n\ndefineProps<{\n id: string | undefined\n oasVersion: string | undefined\n info: InfoObject | undefined\n externalDocs?: ExternalDocumentationObject\n documentExtensions?: Record<string, unknown>\n infoExtensions?: Record<string, unknown>\n headingSlugGenerator: (heading: Heading) => string\n eventBus: WorkspaceEventBus | null\n}>()\n</script>\n\n<template>\n <SectionContainer>\n <!-- If the #after slot is used, we need to add a gap to the section. -->\n <Section\n :id=\"id\"\n aria-label=\"Introduction\"\n class=\"introduction-section z-1 gap-12\"\n @intersecting=\"\n () => id && eventBus?.emit('intersecting:nav-item', { id })\n \">\n <SectionContent :loading=\"!info\">\n <div class=\"flex gap-1.5\">\n <InfoVersion\n v-if=\"info\"\n :version=\"info?.version\" />\n <OpenApiVersion :oasVersion=\"oasVersion\" />\n </div>\n <SectionHeader\n :loading=\"!info?.title\"\n tight>\n <SectionHeaderTag :level=\"1\">\n {{ info?.title }}\n </SectionHeaderTag>\n <template #links>\n <InfoLinks\n v-if=\"info\"\n :externalDocs=\"externalDocs\"\n :info=\"info\" />\n </template>\n </SectionHeader>\n <SectionColumns>\n <SectionColumn>\n <slot name=\"download-link\" />\n <InfoDescription\n :description=\"info?.description\"\n :eventBus=\"eventBus\"\n :headingSlugGenerator=\"headingSlugGenerator\" />\n </SectionColumn>\n <SectionColumn v-if=\"$slots.aside\">\n <div class=\"sticky-cards\">\n <slot name=\"aside\" />\n </div>\n </SectionColumn>\n </SectionColumns>\n <SpecificationExtension :value=\"documentExtensions\" />\n <SpecificationExtension :value=\"infoExtensions\" />\n </SectionContent>\n <slot name=\"after\" />\n </Section>\n </SectionContainer>\n</template>\n\n<style scoped>\n.sticky-cards {\n display: flex;\n flex-direction: column;\n position: sticky;\n top: calc(var(--refs-viewport-offset) + 24px);\n}\n</style>\n","<script setup lang=\"ts\">\nimport type { ApiReferenceConfiguration } from '@scalar/types/api-reference'\nimport type { Heading } from '@scalar/types/legacy'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type {\n ExternalDocumentationObject,\n InfoObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport DownloadLink from '@/blocks/scalar-info-block/components/DownloadLink.vue'\n\nimport IntroductionCard from './IntroductionCard.vue'\nimport IntroductionLayout from './IntroductionLayout.vue'\n\nconst {\n headingSlugGenerator,\n layout,\n eventBus,\n documentDownloadType = 'both',\n documentUrl,\n} = defineProps<{\n /** Optional unique identifier for the info block. */\n id?: string\n /** Original openapi version of the input document */\n oasVersion?: string\n /** The Info object from the OpenAPI document. */\n info: InfoObject | undefined\n /** The external documentation object from the OpenAPI document, if present. */\n externalDocs?: ExternalDocumentationObject\n /** OpenAPI extension fields at the document level. */\n documentExtensions?: Record<string, unknown>\n /** OpenAPI extension fields at the info object level. */\n infoExtensions?: Record<string, unknown>\n /** The event bus for the handling all events. */\n eventBus: WorkspaceEventBus\n /** Heading id generator for Markdown headings */\n headingSlugGenerator: (heading: Heading) => string\n /** Determines the layout style for the info block ('modern' or 'classic'). */\n layout?: 'modern' | 'classic'\n /** The document download type. */\n documentDownloadType?: ApiReferenceConfiguration['documentDownloadType']\n /** URL of the OpenAPI document. Used when documentDownloadType is 'direct'. */\n documentUrl?: string\n}>()\n\n/**\n * Put the selectors in\n * - the after slot for classic layout,\n * - and the aside slot for other layouts.\n */\nconst introCardsSlot = computed(() =>\n layout === 'classic' ? 'after' : 'aside',\n)\n</script>\n\n<template>\n <IntroductionLayout\n :id\n :documentExtensions\n :eventBus=\"eventBus\"\n :externalDocs\n :headingSlugGenerator\n :info\n :infoExtensions\n :oasVersion>\n <template #[introCardsSlot]>\n <IntroductionCard :row=\"layout === 'classic'\">\n <slot name=\"selectors\" />\n </IntroductionCard>\n </template>\n <template #download-link>\n <DownloadLink\n :documentDownloadType\n :documentUrl\n :eventBus />\n </template>\n </IntroductionLayout>\n</template>\n","<script setup lang=\"ts\">\nimport type { ApiReferenceConfiguration } from '@scalar/types/api-reference'\nimport type { Heading } from '@scalar/types/legacy'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type {\n ExternalDocumentationObject,\n InfoObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport DownloadLink from '@/blocks/scalar-info-block/components/DownloadLink.vue'\n\nimport IntroductionCard from './IntroductionCard.vue'\nimport IntroductionLayout from './IntroductionLayout.vue'\n\nconst {\n headingSlugGenerator,\n layout,\n eventBus,\n documentDownloadType = 'both',\n documentUrl,\n} = defineProps<{\n /** Optional unique identifier for the info block. */\n id?: string\n /** Original openapi version of the input document */\n oasVersion?: string\n /** The Info object from the OpenAPI document. */\n info: InfoObject | undefined\n /** The external documentation object from the OpenAPI document, if present. */\n externalDocs?: ExternalDocumentationObject\n /** OpenAPI extension fields at the document level. */\n documentExtensions?: Record<string, unknown>\n /** OpenAPI extension fields at the info object level. */\n infoExtensions?: Record<string, unknown>\n /** The event bus for the handling all events. */\n eventBus: WorkspaceEventBus\n /** Heading id generator for Markdown headings */\n headingSlugGenerator: (heading: Heading) => string\n /** Determines the layout style for the info block ('modern' or 'classic'). */\n layout?: 'modern' | 'classic'\n /** The document download type. */\n documentDownloadType?: ApiReferenceConfiguration['documentDownloadType']\n /** URL of the OpenAPI document. Used when documentDownloadType is 'direct'. */\n documentUrl?: string\n}>()\n\n/**\n * Put the selectors in\n * - the after slot for classic layout,\n * - and the aside slot for other layouts.\n */\nconst introCardsSlot = computed(() =>\n layout === 'classic' ? 'after' : 'aside',\n)\n</script>\n\n<template>\n <IntroductionLayout\n :id\n :documentExtensions\n :eventBus=\"eventBus\"\n :externalDocs\n :headingSlugGenerator\n :info\n :infoExtensions\n :oasVersion>\n <template #[introCardsSlot]>\n <IntroductionCard :row=\"layout === 'classic'\">\n <slot name=\"selectors\" />\n </IntroductionCard>\n </template>\n <template #download-link>\n <DownloadLink\n :documentDownloadType\n :documentUrl\n :eventBus />\n </template>\n </IntroductionLayout>\n</template>\n","<template>\n <div class=\"introduction-card-item\">\n <slot />\n </div>\n</template>\n\n<style scoped>\n.introduction-card-item {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n}\n.introduction-card-item:empty {\n display: none;\n}\n.introduction-card-item:has(.description) :deep(.server-form-container) {\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n}\n.introduction-card-item :deep(.request-item) {\n border-bottom: 0;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { ScalarButton, ScalarListbox } from '@scalar/components'\nimport { ScalarIconCaretDown } from '@scalar/icons'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nconst { target, servers, selectedServer } = defineProps<{\n /** The selected server URL */\n selectedServer: ServerObject | null\n /** Available servers */\n servers: ServerObject[]\n /** The id of the target to use for the popover (e.g. address bar) */\n target: string\n}>()\n\nconst emit = defineEmits<{\n /** Emitted when the selected server changes */\n (e: 'update:modelValue', value: string): void\n}>()\n\nconst serverOptions = computed(() =>\n servers.map((server) => ({\n id: server.url,\n label: server.url,\n })),\n)\n\nconst serverUrlWithoutTrailingSlash = computed(\n () => selectedServer?.url?.replace(/\\/$/, '') || '',\n)\n\nconst selectedServerOption = computed(() =>\n serverOptions.value.find((opt) => opt.id === selectedServer?.url),\n)\n\n// For testing\ndefineExpose({\n servers,\n serverUrlWithoutTrailingSlash,\n serverOptions,\n selectedServer,\n})\n</script>\n<template>\n <ScalarListbox\n v-if=\"serverOptions.length > 1\"\n ref=\"elem\"\n class=\"group\"\n :modelValue=\"selectedServerOption\"\n :options=\"serverOptions\"\n placement=\"bottom-start\"\n resize\n :target=\"target\"\n @update:modelValue=\"(e) => emit('update:modelValue', e.id)\">\n <ScalarButton\n class=\"bg-b-1 text-c-1 h-auto w-full justify-start gap-1.5 overflow-x-auto rounded-t-none !rounded-b-xl px-3 py-1.5 text-base/5.25 font-normal whitespace-nowrap -outline-offset-1\"\n variant=\"ghost\">\n <span class=\"sr-only\">Server:</span>\n <span class=\"overflow-x-auto\">{{\n serverUrlWithoutTrailingSlash || 'Select a server'\n }}</span>\n <ScalarIconCaretDown\n class=\"text-c-2 ui-open:rotate-180 mt-0.25 size-3 transition-transform duration-100\"\n weight=\"bold\" />\n </ScalarButton>\n </ScalarListbox>\n <div\n v-else\n class=\"text-c-1 flex h-auto w-full items-center gap-0.75 !rounded-b-xl px-3 py-1.5 text-base leading-[20px] whitespace-nowrap\">\n <span class=\"sr-only\">Server:</span>\n <span class=\"overflow-x-auto\">{{ serverUrlWithoutTrailingSlash }}</span>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { ScalarButton, ScalarListbox } from '@scalar/components'\nimport { ScalarIconCaretDown } from '@scalar/icons'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nconst { target, servers, selectedServer } = defineProps<{\n /** The selected server URL */\n selectedServer: ServerObject | null\n /** Available servers */\n servers: ServerObject[]\n /** The id of the target to use for the popover (e.g. address bar) */\n target: string\n}>()\n\nconst emit = defineEmits<{\n /** Emitted when the selected server changes */\n (e: 'update:modelValue', value: string): void\n}>()\n\nconst serverOptions = computed(() =>\n servers.map((server) => ({\n id: server.url,\n label: server.url,\n })),\n)\n\nconst serverUrlWithoutTrailingSlash = computed(\n () => selectedServer?.url?.replace(/\\/$/, '') || '',\n)\n\nconst selectedServerOption = computed(() =>\n serverOptions.value.find((opt) => opt.id === selectedServer?.url),\n)\n\n// For testing\ndefineExpose({\n servers,\n serverUrlWithoutTrailingSlash,\n serverOptions,\n selectedServer,\n})\n</script>\n<template>\n <ScalarListbox\n v-if=\"serverOptions.length > 1\"\n ref=\"elem\"\n class=\"group\"\n :modelValue=\"selectedServerOption\"\n :options=\"serverOptions\"\n placement=\"bottom-start\"\n resize\n :target=\"target\"\n @update:modelValue=\"(e) => emit('update:modelValue', e.id)\">\n <ScalarButton\n class=\"bg-b-1 text-c-1 h-auto w-full justify-start gap-1.5 overflow-x-auto rounded-t-none !rounded-b-xl px-3 py-1.5 text-base/5.25 font-normal whitespace-nowrap -outline-offset-1\"\n variant=\"ghost\">\n <span class=\"sr-only\">Server:</span>\n <span class=\"overflow-x-auto\">{{\n serverUrlWithoutTrailingSlash || 'Select a server'\n }}</span>\n <ScalarIconCaretDown\n class=\"text-c-2 ui-open:rotate-180 mt-0.25 size-3 transition-transform duration-100\"\n weight=\"bold\" />\n </ScalarButton>\n </ScalarListbox>\n <div\n v-else\n class=\"text-c-1 flex h-auto w-full items-center gap-0.75 !rounded-b-xl px-3 py-1.5 text-base leading-[20px] whitespace-nowrap\">\n <span class=\"sr-only\">Server:</span>\n <span class=\"overflow-x-auto\">{{ serverUrlWithoutTrailingSlash }}</span>\n </div>\n</template>\n","<script lang=\"ts\">\ntype SelectorProps = {\n /** The event bus to use for emitting events */\n eventBus: WorkspaceEventBus\n /** The selected server */\n selectedServer: ServerObject | null\n /** Available servers */\n servers: ServerObject[]\n}\n\n/**\n * ServerSelector\n *\n * Core component for rendering a server selector block.\n * Handles server selection and emits a 'server:update:selected' event when the selected server changes.\n *\n * @event server:update:selected - Emitted when the selected server changes\n * @event server:update:variables - Emitted when a server variable changes\n */\nexport default {}\n</script>\n\n<script lang=\"ts\" setup>\nimport { ServerVariablesForm } from '@scalar/api-client/components/Server'\nimport { ScalarMarkdown } from '@scalar/components'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { useId } from 'vue'\n\nimport Selector from './Selector.vue'\n\nconst { eventBus, servers, selectedServer } = defineProps<SelectorProps>()\n\nconst id = useId()\n\n/** Update the selected server */\nconst updateServer = (newServer: string) => {\n eventBus.emit('server:update:selected', {\n url: selectedServer?.url === newServer ? '' : newServer,\n meta: {\n type: 'document',\n },\n })\n}\n\n/** Update the server variable */\nconst updateServerVariable = (key: string, value: string) => {\n /** Find the index of the selected server */\n const index = servers.findIndex((s) => s.url === selectedServer?.url)\n if (index === -1) {\n return\n }\n\n eventBus.emit('server:update:variables', {\n index,\n key,\n value,\n meta: {\n type: 'document',\n },\n })\n}\n</script>\n\n<template>\n <label\n class=\"bg-b-2 flex h-8 items-center rounded-t-xl border border-b-0 px-3 py-2.5 font-medium\">\n Server\n </label>\n <div\n :id=\"id\"\n class=\"border\"\n :class=\"{\n 'rounded-b-xl':\n !selectedServer?.description && !selectedServer?.variables,\n }\">\n <Selector\n v-if=\"servers.length\"\n :selectedServer\n :servers=\"servers\"\n :target=\"id\"\n @update:modelValue=\"updateServer\" />\n </div>\n <ServerVariablesForm\n layout=\"reference\"\n :variables=\"selectedServer?.variables\"\n @update:variable=\"updateServerVariable\" />\n\n <!-- Description -->\n <ScalarMarkdown\n v-if=\"selectedServer?.description\"\n class=\"text-c-3 rounded-b-xl border border-t-0 px-3 py-1.5\"\n :value=\"selectedServer.description\" />\n</template>\n","<script lang=\"ts\">\ntype SelectorProps = {\n /** The event bus to use for emitting events */\n eventBus: WorkspaceEventBus\n /** The selected server */\n selectedServer: ServerObject | null\n /** Available servers */\n servers: ServerObject[]\n}\n\n/**\n * ServerSelector\n *\n * Core component for rendering a server selector block.\n * Handles server selection and emits a 'server:update:selected' event when the selected server changes.\n *\n * @event server:update:selected - Emitted when the selected server changes\n * @event server:update:variables - Emitted when a server variable changes\n */\nexport default {}\n</script>\n\n<script lang=\"ts\" setup>\nimport { ServerVariablesForm } from '@scalar/api-client/components/Server'\nimport { ScalarMarkdown } from '@scalar/components'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { useId } from 'vue'\n\nimport Selector from './Selector.vue'\n\nconst { eventBus, servers, selectedServer } = defineProps<SelectorProps>()\n\nconst id = useId()\n\n/** Update the selected server */\nconst updateServer = (newServer: string) => {\n eventBus.emit('server:update:selected', {\n url: selectedServer?.url === newServer ? '' : newServer,\n meta: {\n type: 'document',\n },\n })\n}\n\n/** Update the server variable */\nconst updateServerVariable = (key: string, value: string) => {\n /** Find the index of the selected server */\n const index = servers.findIndex((s) => s.url === selectedServer?.url)\n if (index === -1) {\n return\n }\n\n eventBus.emit('server:update:variables', {\n index,\n key,\n value,\n meta: {\n type: 'document',\n },\n })\n}\n</script>\n\n<template>\n <label\n class=\"bg-b-2 flex h-8 items-center rounded-t-xl border border-b-0 px-3 py-2.5 font-medium\">\n Server\n </label>\n <div\n :id=\"id\"\n class=\"border\"\n :class=\"{\n 'rounded-b-xl':\n !selectedServer?.description && !selectedServer?.variables,\n }\">\n <Selector\n v-if=\"servers.length\"\n :selectedServer\n :servers=\"servers\"\n :target=\"id\"\n @update:modelValue=\"updateServer\" />\n </div>\n <ServerVariablesForm\n layout=\"reference\"\n :variables=\"selectedServer?.variables\"\n @update:variable=\"updateServerVariable\" />\n\n <!-- Description -->\n <ScalarMarkdown\n v-if=\"selectedServer?.description\"\n class=\"text-c-3 rounded-b-xl border border-t-0 px-3 py-1.5\"\n :value=\"selectedServer.description\" />\n</template>\n"],"mappings":";;;;;;;;;;;;;AAIA,IAAM,mBAAmB;CACvB;CACA;CACA;CACA;CACA;CACD;;AAGD,IAAa,oBACX,UACA,kBAA8C,qBAC3C,QAAQ,YAAY,gBAAgB,SAAS,SAA6C,CAAC;;;;;;AAOhG,IAAa,sBACX,eACA,kBAA8C,qBAC3B;CAEnB,MAAM,4BAAY,IAAI,KAA2B;AAGjD,MAAK,MAAM,SAAS,cAClB,MAAK,MAAM,UAAU,MAAM,QACzB,WAAU,IAAI,OAAO,IAAI,OAAO;AAKpC,QAAO,gBAAgB,SAAS,aAAa;AAE3C,SADe,UAAU,IAAI,SAAS,IACrB,EAAE;GACnB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EEbJ,MAAM,eAAe,KAAiB;;;;;EAMtC,MAAM,wBAAwB,cAC5B,wBAAwB,cAAc,OAAO,eAAe;;EAG9D,MAAM,gBAAgB,WAA8C;AAClE,OAAI,CAAC,aAAa,MAChB;GAIF,MAAM,WAAW,cAAc,aAAa,MAAK;AACjD,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AAO,GAAA,GAC7B,mBAAwE,QAAxE,YAAwE,gBAAvC,8BAAA,MAA6B,EAAA,EAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;EErClE,MAAM,KAAK,OAAM;;EAGjB,MAAM,gBAAgB,cAAsB;AAC1C,WAAA,SAAS,KAAK,0BAA0B;IACtC,KAAK,QAAA,gBAAgB,QAAQ,YAAY,KAAK;IAC9C,MAAM,EACJ,MAAM,YACP;IACF,CAAA;;;EAIH,MAAM,wBAAwB,KAAa,UAAkB;;GAE3D,MAAM,QAAQ,QAAA,QAAQ,WAAW,MAAM,EAAE,QAAQ,QAAA,gBAAgB,IAAG;AACpE,OAAI,UAAU,GACZ;AAGF,WAAA,SAAS,KAAK,2BAA2B;IACvC;IACA;IACA;IACA,MAAM,EACJ,MAAM,YACP;IACF,CAAA;;;;8BAKD,mBAGQ,SAAA,EAFN,OAAM,uFAAqF,EAAC,YAE9F,GAAA;IACA,mBAaM,OAAA;KAZH,IAAI,MAAA,GAAE;KACP,OAAK,eAAA,CAAC,UAAQ,EAAA,gBAAA,CAC2B,QAAA,gBAAgB,eAAW,CAAK,QAAA,gBAAgB,WAAA,CAAA,CAAA;QAKjF,QAAA,QAAQ,UAAA,WAAA,EADhB,YAKsC,kBAAA;;KAHnC,gBAAA,QAAA;KACA,SAAS,QAAA;KACT,QAAQ,MAAA,GAAE;KACV,uBAAmB;;;;;;IAExB,YAG4C,MAAA,oBAAA,EAAA;KAF1C,QAAO;KACN,WAAW,QAAA,gBAAgB;KAC3B,qBAAiB;;IAIZ,QAAA,gBAAgB,eAAA,WAAA,EADxB,YAGwC,MAAA,eAAA,EAAA;;KADtC,OAAM;KACL,OAAO,QAAA,eAAe"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/components/Content/Schema/SchemaObjectExampleCodeBlock.vue","../../src/components/Content/Schema/SchemaObjectExampleCodeBlock.vue","../../src/components/IntersectionObserver.vue","../../src/components/IntersectionObserver.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ExamplePicker } from '@scalar/api-client/v2/blocks/operation-code-sample'\nimport {\n ScalarCard,\n ScalarCardFooter,\n ScalarCardSection,\n ScalarCodeBlock,\n} from '@scalar/components'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed, ref } from 'vue'\n\nconst { schema } = defineProps<{ schema: SchemaObject }>()\n\n/** Grab the examples for the schema object */\nconst examples = computed<Record<string, string>>(() => {\n const base: Record<string, string> = {}\n\n // x-examples extension\n if (schema['x-examples']) {\n Object.entries(schema['x-examples']).forEach(([key, value]) => {\n base[key] =\n typeof value === 'object'\n ? JSON.stringify(value, null, 2)\n : String(value)\n })\n }\n\n // Regular schema examples array\n if (schema.examples) {\n schema.examples.forEach((value, index) => {\n base[`Example ${index + 1}`] =\n typeof value === 'object'\n ? JSON.stringify(value, null, 2)\n : String(value)\n })\n }\n\n return base\n})\n\n/** The currently selected example key */\nconst selectedExampleKey = ref<string>(Object.keys(examples.value)[0] ?? '')\n</script>\n<template>\n <ScalarCard\n v-if=\"Object.keys(examples).length > 0\"\n class=\"dark-mode\">\n <!-- Code snippet -->\n <ScalarCardSection>\n <div class=\"code-snippet\">\n <ScalarCodeBlock\n class=\"bg-b-2\"\n lang=\"json\"\n lineNumbers\n :prettyPrintedContent=\"\n examples[selectedExampleKey] ??\n 'There was an error loading the example'\n \" />\n </div>\n </ScalarCardSection>\n\n <!-- Example picker -->\n <ScalarCardFooter\n v-if=\"Object.keys(examples).length > 1\"\n class=\"bg-b-3\">\n <ExamplePicker\n v-model=\"selectedExampleKey\"\n :examples />\n </ScalarCardFooter>\n </ScalarCard>\n</template>\n","<script setup lang=\"ts\">\nimport { ExamplePicker } from '@scalar/api-client/v2/blocks/operation-code-sample'\nimport {\n ScalarCard,\n ScalarCardFooter,\n ScalarCardSection,\n ScalarCodeBlock,\n} from '@scalar/components'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed, ref } from 'vue'\n\nconst { schema } = defineProps<{ schema: SchemaObject }>()\n\n/** Grab the examples for the schema object */\nconst examples = computed<Record<string, string>>(() => {\n const base: Record<string, string> = {}\n\n // x-examples extension\n if (schema['x-examples']) {\n Object.entries(schema['x-examples']).forEach(([key, value]) => {\n base[key] =\n typeof value === 'object'\n ? JSON.stringify(value, null, 2)\n : String(value)\n })\n }\n\n // Regular schema examples array\n if (schema.examples) {\n schema.examples.forEach((value, index) => {\n base[`Example ${index + 1}`] =\n typeof value === 'object'\n ? JSON.stringify(value, null, 2)\n : String(value)\n })\n }\n\n return base\n})\n\n/** The currently selected example key */\nconst selectedExampleKey = ref<string>(Object.keys(examples.value)[0] ?? '')\n</script>\n<template>\n <ScalarCard\n v-if=\"Object.keys(examples).length > 0\"\n class=\"dark-mode\">\n <!-- Code snippet -->\n <ScalarCardSection>\n <div class=\"code-snippet\">\n <ScalarCodeBlock\n class=\"bg-b-2\"\n lang=\"json\"\n lineNumbers\n :prettyPrintedContent=\"\n examples[selectedExampleKey] ??\n 'There was an error loading the example'\n \" />\n </div>\n </ScalarCardSection>\n\n <!-- Example picker -->\n <ScalarCardFooter\n v-if=\"Object.keys(examples).length > 1\"\n class=\"bg-b-3\">\n <ExamplePicker\n v-model=\"selectedExampleKey\"\n :examples />\n </ScalarCardFooter>\n </ScalarCard>\n</template>\n","<script setup lang=\"ts\">\nimport { useIntersectionObserver } from '@vueuse/core'\nimport { onMounted, ref } from 'vue'\n\nconst props = defineProps<{\n id?: string\n is?: string\n}>()\n\nconst emit = defineEmits<{\n (e: 'intersecting', id: string): void\n}>()\n\nconst intersectionObserverRef = ref<HTMLElement>()\n\nconst 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\nconst 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\nonMounted(() => {\n if (intersectionObserverRef.value) {\n const options = {\n rootMargin: calculateRootMargin(intersectionObserverRef.value),\n threshold: calculateThreshold(intersectionObserverRef.value),\n }\n\n useIntersectionObserver(\n intersectionObserverRef,\n ([entry]) => {\n if (entry?.isIntersecting && props.id) {\n emit('intersecting', props.id)\n }\n },\n options,\n )\n }\n})\n</script>\n<template>\n <component\n :is=\"is ?? 'div'\"\n :id=\"id\"\n ref=\"intersectionObserverRef\">\n <slot />\n </component>\n</template>\n","<script setup lang=\"ts\">\nimport { useIntersectionObserver } from '@vueuse/core'\nimport { onMounted, ref } from 'vue'\n\nconst props = defineProps<{\n id?: string\n is?: string\n}>()\n\nconst emit = defineEmits<{\n (e: 'intersecting', id: string): void\n}>()\n\nconst intersectionObserverRef = ref<HTMLElement>()\n\nconst 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\nconst 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\nonMounted(() => {\n if (intersectionObserverRef.value) {\n const options = {\n rootMargin: calculateRootMargin(intersectionObserverRef.value),\n threshold: calculateThreshold(intersectionObserverRef.value),\n }\n\n useIntersectionObserver(\n intersectionObserverRef,\n ([entry]) => {\n if (entry?.isIntersecting && props.id) {\n emit('intersecting', props.id)\n }\n },\n options,\n )\n }\n})\n</script>\n<template>\n <component\n :is=\"is ?? 'div'\"\n :id=\"id\"\n ref=\"intersectionObserverRef\">\n <slot />\n </component>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;ECcA,MAAM,WAAW,eAAuC;GACtD,MAAM,OAA+B,EAAC;AAGtC,OAAI,QAAA,OAAO,cACT,QAAO,QAAQ,QAAA,OAAO,cAAc,CAAC,SAAS,CAAC,KAAK,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YAAY,oBAAoB,wBAAwB,MAAM;IAC9D,WAAW,mBAAmB,wBAAwB,MAAM;IAC9D,CAUA;IAEH;;uBAGC,YAKY,wBAJL,QAAA,MAAE,MAAA,EAAA;IACN,IAAI,QAAA;aACD;IAAJ,KAAI;;2BACI,CAAR,WAAQ,KAAA,QAAA,UAAA,CAAA,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"lazy-bus-CV8Ox5hD.js","names":[],"sources":["../src/helpers/id-routing.ts","../src/helpers/lazy-bus.ts"],"sourcesContent":["export const sanitizeBasePath = (basePath: string) => {\n return basePath.replace(/^\\/+|\\/+$/g, '')\n}\n\nconst isHashBasePath = (basePath: string) => basePath.startsWith('#')\n\nconst sanitizeHashBasePath = (basePath: string) => {\n return basePath.replace(/^#+/, '').replace(/\\/+$/g, '')\n}\n\nconst applySlugPrefix = (base: string, slugPrefix: string | undefined) => {\n return slugPrefix ? `${slugPrefix}${base ? '/' : ''}${base}` : base\n}\n\nconst stripBasePathPrefix = (value: string, basePath: string) => {\n if (value === basePath) {\n return ''\n }\n\n if (value.startsWith(`${basePath}/`)) {\n return value.slice(basePath.length + 1)\n }\n\n return null\n}\n\n/** Extracts an element id from the hash when using hash routing */\nexport const getIdFromHash = (location: string | URL, slugPrefix: string | undefined) => {\n const url = typeof location === 'string' ? new URL(location) : location\n\n const base = decodeURIComponent(url.hash.slice(1))\n\n return applySlugPrefix(base, slugPrefix)\n}\n/** Extracts an element id from the path when using path routing */\nexport const getIdFromPath = (location: string | URL, basePath: string, slugPrefix: string | undefined) => {\n const url = typeof location === 'string' ? new URL(location) : location\n const sanitized = sanitizeBasePath(basePath)\n\n // Construct the full basePath with leading slash and encode it for matching\n // We need to encode each segment separately to match how URLs encode pathnames\n const basePathWithSlash = sanitized\n ? `/${sanitized\n .split('/')\n .map((segment) => encodeURIComponent(segment))\n .join('/')}`\n : ''\n\n // Extract the portion after the basePath\n if (url.pathname.startsWith(basePathWithSlash)) {\n const remainder = url.pathname.slice(basePathWithSlash.length)\n const base = decodeURIComponent(remainder.startsWith('/') ? remainder.slice(1) : remainder)\n return applySlugPrefix(base, slugPrefix)\n }\n\n return slugPrefix ?? ''\n}\n\n/** Extracts an element id from a hash-prefixed basePath */\nexport const getIdFromHashBasePath = (location: string | URL, basePath: string, slugPrefix: string | undefined) => {\n const url = typeof location === 'string' ? new URL(location) : location\n const hash = decodeURIComponent(url.hash.slice(1))\n const sanitized = sanitizeHashBasePath(basePath)\n\n const remainder = stripBasePathPrefix(hash, sanitized)\n if (remainder !== null) {\n return applySlugPrefix(remainder, slugPrefix)\n }\n\n return slugPrefix ?? ''\n}\n\n/** Determines whether a URL matches the provided basePath. */\nexport const matchesBasePath = (location: string | URL, basePath: string) => {\n const url = typeof location === 'string' ? new URL(location) : location\n\n if (isHashBasePath(basePath)) {\n const hash = decodeURIComponent(url.hash)\n return hash === basePath || hash.startsWith(`${basePath}/`)\n }\n\n const sanitized = sanitizeBasePath(basePath)\n const basePathWithSlash = sanitized\n ? `/${sanitized\n .split('/')\n .map((segment) => encodeURIComponent(segment))\n .join('/')}`\n : ''\n\n return url.pathname === basePathWithSlash || url.pathname.startsWith(`${basePathWithSlash}/`)\n}\n\n/**\n * Extracts a navigation id from a URL based on the routing type\n *\n * @param url - The URL to extract the id from\n * @param basePath - The base path used in path routing\n * @param slugPrefix - If the document slug is not expected in the URL then we must prefix it\n */\nexport const getIdFromUrl = (url: string | URL, basePath: string | undefined, slugPrefix: string | undefined) => {\n if (typeof basePath !== 'string') {\n return getIdFromHash(url, slugPrefix)\n }\n\n return isHashBasePath(basePath)\n ? getIdFromHashBasePath(url, basePath, slugPrefix)\n : getIdFromPath(url, basePath, slugPrefix)\n}\n\n/**\n * Strips the first segment from an id and preserves trailing slashes\n * Used in single-document mode where the document slug is not needed in the URL\n *\n * @param id - The full id to process\n * @returns The id with the first segment removed, preserving trailing slash if present\n */\nconst stripFirstSegment = (id: string): string => {\n // For preserving trailing slash in the id\n const hasTrailingSlash = id.endsWith('/')\n const segments = id.split('/').filter(Boolean).slice(1)\n const result = segments.join('/')\n\n // Only preserve trailing slash if there's actual content\n return hasTrailingSlash && result ? `${result}/` : result\n}\n\n/**\n * Generate a new URL and applies the ID to the path or hash\n * depending on the type of routing used\n *\n * @param id - The id to apply to the URL\n * @param basePath - The base path used in path routing\n * @param isMultiDocument - Whether the document is multi-document or single-document. Single-document documents will strip the document slug from the id\n */\nexport const makeUrlFromId = (_id: string, basePath: string | undefined, isMultiDocument: boolean) => {\n if (typeof window === 'undefined') {\n return undefined\n }\n\n /** When there is only 1 document we don't need to include the document name in the URL */\n const id = isMultiDocument ? _id : stripFirstSegment(_id)\n const url = new URL(window.location.href)\n\n if (typeof basePath === 'string') {\n if (isHashBasePath(basePath)) {\n const base = sanitizeHashBasePath(basePath)\n url.hash = [base, id].filter(Boolean).join('/')\n } else {\n const base = sanitizeBasePath(basePath)\n url.pathname = `${base}/${id}`\n }\n } else {\n url.hash = id\n }\n\n return url\n}\n\n/** Extracts the schema parameters from the id if they are present */\nexport const getSchemaParamsFromId = (id: string): { rawId: string; params: string } => {\n const matcher = id.match(/(.*)(\\.body\\.|\\.path\\.|\\.query\\.|\\.header\\.)(.*)/)\n\n if (matcher && typeof matcher[1] === 'string' && typeof matcher[2] === 'string') {\n return {\n rawId: matcher[1],\n params: matcher[2].slice(1) + matcher[3],\n }\n }\n return {\n rawId: id,\n params: '',\n }\n}\n","import { watchDebounced } from '@vueuse/core'\nimport { nanoid } from 'nanoid'\nimport { computed, nextTick, onBeforeUnmount, reactive, ref } from 'vue'\n\nimport { getSchemaParamsFromId } from './id-routing'\n\n/**\n * List of items that are in the priority queue and will be rendered first (e.g. scroll target).\n */\nconst priorityQueue = reactive<Set<string>>(new Set())\n/** List of items that are pending to be loaded (in viewport overscan). */\nconst pendingQueue = reactive<Set<string>>(new Set())\n/** List of items that are already loaded and stay mounted (no eviction). */\nconst readyQueue = reactive<Set<string>>(new Set())\n/**\n * Flag to indicate if the lazy bus is currently running\n * Blocks ID changes while running\n */\nconst isRunning = ref(false)\n\n/** How long tryScroll keeps retrying to find the element (ms). */\nconst SCROLL_RETRY_MS = 3000\n\n/** Tracks when the initial load is complete. */\nexport const firstLazyLoadComplete = ref(false)\n\n/** List of unique identifiers that are blocking intersection */\nconst intersectionBlockers = reactive<Set<string>>(new Set())\n\nconst onRenderComplete = new Set<() => void>()\n\n/** Cached content heights so placeholders can match when not rendered. */\nconst lazyPlaceholderHeights = reactive<Map<string, number>>(new Map())\n\nexport const getLazyPlaceholderHeight = (id: string): number | undefined => lazyPlaceholderHeights.get(id)\n\nexport const setLazyPlaceholderHeight = (id: string, height: number): void => {\n if (!Number.isFinite(height) || height <= 0) {\n return\n }\n lazyPlaceholderHeights.set(id, Math.round(height))\n}\n\n/** Adds a one time callback to be executed when the lazy bus has finished loading */\nconst addLazyCompleteCallback = (callback: (() => void) | undefined) => {\n if (callback) {\n onRenderComplete.add(callback)\n }\n}\n\ntype UnblockFn = () => void\n\n/**\n * Blocks intersection until the returned unblock callback is run.\n * Prevents scroll jump while we render new lazy content.\n */\nexport const blockIntersection = (): UnblockFn => {\n const blockId = nanoid()\n intersectionBlockers.add(blockId)\n\n /** Unblock uses a small delay to ensure the scroll is complete before enabling intersection */\n return () => setTimeout(() => intersectionBlockers.delete(blockId), 100)\n}\n\n/** If there are any pending blocking operations we disable intersection */\nexport const intersectionEnabled = computed(() => intersectionBlockers.size === 0)\n\n/**\n * Processes the full queue: priority first, then pending. Blocks intersection while\n * rendering so the viewport does not jump. No eviction — items stay in readyQueue.\n */\nconst runLazyBus = () => {\n // We always render the lazy bus when the window is undefined (see useLazyBus)\n if (typeof window === 'undefined') {\n return\n }\n\n if (isRunning.value) {\n return\n }\n\n isRunning.value = true\n\n /**\n * Sets all the pending elements into the ready queue\n * After waiting for Vue to update the DOM we execute the callbacks and unblock intersection\n */\n const processQueue = async () => {\n const priorityIds = [...priorityQueue]\n const pendingIds = [...pendingQueue]\n\n if (priorityIds.length === 0 && pendingIds.length === 0) {\n onRenderComplete.forEach((fn) => fn())\n onRenderComplete.clear()\n isRunning.value = false\n firstLazyLoadComplete.value = true\n return\n }\n\n for (const id of priorityIds) {\n readyQueue.add(id)\n priorityQueue.delete(id)\n }\n for (const id of pendingIds) {\n readyQueue.add(id)\n pendingQueue.delete(id)\n }\n\n await nextTick()\n\n onRenderComplete.forEach((fn) => fn())\n onRenderComplete.clear()\n isRunning.value = false\n firstLazyLoadComplete.value = true\n }\n\n if (window.requestIdleCallback) {\n window.requestIdleCallback(processQueue, { timeout: 1500 })\n } else {\n // biome-ignore lint/nursery/noFloatingPromises: Expected floating promise\n nextTick(processQueue)\n }\n}\n\n/**\n * Run the lazy bus when the queue changes and is not currently running\n * Debounce so that multiple changes to the queue are batched together\n *\n * We must run when the priority queue changes because we rely on finish callbacks\n * anytime we request potentially lazy elements. If we don't run when the priority queue changes\n * we may not have a finish callback even though the element is set to load.\n */\nwatchDebounced(\n [() => pendingQueue.size, () => priorityQueue.size, () => isRunning.value],\n () => {\n if ((pendingQueue.size > 0 || priorityQueue.size > 0) && !isRunning.value) {\n runLazyBus()\n }\n },\n { debounce: 300, maxWait: 1500 },\n)\n\n/**\n * We only make elements pending if they are not already in the priority or ready queue\n */\nconst addToPendingQueue = (id: string | undefined) => {\n if (id && !readyQueue.has(id) && !priorityQueue.has(id)) {\n pendingQueue.add(id)\n }\n}\n\n/**\n * Add elements to the priority queue for immediate rendering.\n * We allow adding items already in readyQueue so that callbacks are still triggered,\n * but processQueue will skip actual re-rendering for items already ready.\n */\nexport const addToPriorityQueue = (id: string | undefined) => {\n if (id && !priorityQueue.has(id)) {\n priorityQueue.add(id)\n }\n}\n\n/**\n * Request an item to be rendered (e.g. when it re-enters the overscan zone).\n */\nexport const requestLazyRender = (id: string | undefined, priority = false): void => {\n if (!id || readyQueue.has(id)) {\n return\n }\n if (priority) {\n addToPriorityQueue(id)\n } else {\n addToPendingQueue(id)\n }\n if (!isRunning.value) {\n runLazyBus()\n }\n}\n\n/**\n * Schedules a single run of the lazy bus so that documents with no Lazy components\n * (e.g. no operations, tags, or models) still get firstLazyLoadComplete set and the\n * full-viewport placeholder can be hidden. Call from content root on mount.\n */\nexport const scheduleInitialLoadComplete = (): void => {\n if (typeof window === 'undefined') {\n return\n }\n const delay = 400\n window.setTimeout(() => runLazyBus(), delay)\n}\n\n/** When an element is unmounted we remove it from all queues */\nconst resetLazyElement = (id: string) => {\n priorityQueue.delete(id)\n pendingQueue.delete(id)\n readyQueue.delete(id)\n lazyPlaceholderHeights.delete(id)\n}\n\n// ---------------------------------------------------------------------------\n\n/**\n * Tracks the lazy loading state of an element.\n * Use isReady (or expanded) to decide whether to render the slot or show a placeholder.\n * The element is only added to the queue when it enters the viewport overscan (see Lazy.vue).\n */\nexport function useLazyBus(id: string) {\n onBeforeUnmount(() => {\n resetLazyElement(id)\n })\n\n return {\n isReady: computed(() => typeof window === 'undefined' || priorityQueue.has(id) || readyQueue.has(id)),\n }\n}\n\n/**\n * Scroll to a possibly lazy-loaded element. Expands parents and adds target (and\n * parents) to the priority queue, then scrolls after Vue has flushed.\n */\nexport const scrollToLazy = (\n id: string,\n setExpanded: (id: string, value: boolean) => void,\n getEntryById: (id: string) => { id: string; parent?: { id: string }; children?: { id: string }[] } | undefined,\n) => {\n const item = getEntryById(id)\n\n /**\n * If the element is lazy we must freeze the element so that it does not move until after the next lazy bus run\n * If the element never loads then the scroll onFailure callback will be run to unfreeze the element\n *\n * If the readyQueue does not have the item we must freeze it while it renders\n * If the item has lazy children we must freeze the item while the children are (potentially) loaded\n */\n const isLazy = !readyQueue.has(id) || item?.children?.some((child) => !readyQueue.has(child.id))\n\n const unfreeze = isLazy ? freeze(id) : undefined\n addLazyCompleteCallback(unfreeze)\n\n // Disable intersection while we scroll to the element\n const unblock = blockIntersection()\n const { rawId } = getSchemaParamsFromId(id)\n\n addToPriorityQueue(id)\n addToPriorityQueue(rawId)\n\n // When there are children we ensure the first 2 are loaded\n if (item?.children) {\n item.children.slice(0, 2).forEach((child) => addToPriorityQueue(child.id))\n }\n\n // When there are sibling items we attempt to load the next 2 to better fill the viewport\n if (item?.parent) {\n const parent = getEntryById(item.parent.id)\n const elementIdx = parent?.children?.findIndex((child) => child.id === id)\n if (elementIdx !== undefined && elementIdx >= 0) {\n parent?.children?.slice(elementIdx, elementIdx + 2).forEach((child) => addToPriorityQueue(child.id))\n }\n }\n\n setExpanded(rawId, true)\n /**\n * Recursively expand the parents and set them as a loading priority\n * This ensures all parents will be immediately loaded and open\n */\n const addParents = (currentId: string) => {\n const parent = getEntryById(currentId)?.parent\n if (parent) {\n addToPriorityQueue(parent.id)\n setExpanded(parent.id, true)\n addParents(parent.id)\n }\n }\n /** Must use the rawId as schema params are not in the navigation tree */\n addParents(rawId)\n\n void nextTick(() => {\n tryScroll(id, Date.now() + SCROLL_RETRY_MS, unblock, unfreeze)\n })\n}\n\n/**\n * Tiny wrapper around the scrollIntoView API\n * Retries up to the stopTime in case the element is not yet rendered\n *\n * @param id - The id of the element to scroll to\n * @param stopTime - The time to stop retrying in unix milliseconds\n */\nconst tryScroll = (id: string, stopTime: number, onComplete: UnblockFn, onFailure?: () => void): void => {\n const element = document.getElementById(id)\n if (element) {\n element.scrollIntoView({ block: 'start' })\n onComplete()\n } else if (Date.now() < stopTime) {\n requestAnimationFrame(() => tryScroll(id, stopTime, onComplete, onFailure))\n } else {\n // If the scroll has expired we enable intersection again\n onComplete()\n onFailure?.()\n }\n}\n\nconst freeze = (id: string): (() => void) => {\n let stop = false\n\n /**\n * Runs until the stop flag is set\n * Executes the final frame after stop changes to true\n */\n const runFrame = (stopAfterFrame: boolean) => {\n const element = document.getElementById(id)\n if (element) {\n element.scrollIntoView({ block: 'start' })\n }\n if (!stopAfterFrame) {\n requestAnimationFrame(() => runFrame(stop))\n }\n }\n\n runFrame(false)\n\n return () => {\n stop = true\n }\n}\n"],"mappings":";;;;AAAA,IAAa,oBAAoB,aAAqB;AACpD,QAAO,SAAS,QAAQ,cAAc,GAAG;;AAG3C,IA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MAAI,QAAQ;AACV,sBAAmB,OAAO,GAAG;AAC7B,eAAY,OAAO,IAAI,KAAK;AAC5B,cAAW,OAAO,GAAG;;;;AAIzB,YAAW,MAAM;AAEZ,gBAAe;AAClB,YAAU,IAAI,KAAK,KAAK,GAAG,iBAAiB,SAAS,SAAS;GAC9D;;;;;;;;;AAUJ,IAAM,aAAa,IAAY,UAAkB,YAAuB,cAAiC;CACvG,MAAM,UAAU,SAAS,eAAe,GAAG;AAC3C,KAAI,SAAS;AACX,UAAQ,eAAe,EAAE,OAAO,SAAS,CAAC;AAC1C,cAAY;YACH,KAAK,KAAK,GAAG,SACtB,6BAA4B,UAAU,IAAI,UAAU,YAAY,UAAU,CAAC;MACtE;AAEL,cAAY;AACZ,eAAa;;;AAIjB,IAAM,UAAU,OAA6B;CAC3C,IAAI,OAAO;;;;;CAMX,MAAM,YAAY,mBAA4B;EAC5C,MAAM,UAAU,SAAS,eAAe,GAAG;AAC3C,MAAI,QACF,SAAQ,eAAe,EAAE,OAAO,SAAS,CAAC;AAE5C,MAAI,CAAC,eACH,6BAA4B,SAAS,KAAK,CAAC;;AAI/C,UAAS,MAAM;AAEf,cAAa;AACX,SAAO"}
@@ -1,232 +0,0 @@
1
- import { n as clientStorage, t as authStorage } from "./storage--3JuzjCI.js";
2
- import { computed, toValue, watch } from "vue";
3
- import { apiReferenceConfigurationWithSourceSchema, isConfigurationWithSources } from "@scalar/types/api-reference";
4
- import { useFavicon } from "@vueuse/core";
5
- import { parseJsonOrYaml } from "@scalar/oas-utils/helpers";
6
- import { isClient } from "@scalar/api-client/v2/blocks/operation-code-sample";
7
- import GithubSlugger from "github-slugger";
8
- import { useSeoMeta } from "@unhead/vue";
9
- //#region src/helpers/color-mode.ts
10
- /**
11
- * Gets the system color mode preference from the browser.
12
- * Falls back to 'light' if running in a non-browser environment.
13
- *
14
- * @returns The system preference for dark or light mode.
15
- */
16
- var getSystemModePreference = () => {
17
- if (typeof window === "undefined" || typeof window?.matchMedia !== "function") return "light";
18
- return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
19
- };
20
- //#endregion
21
- //#region src/helpers/download.ts
22
- /**
23
- * Create a click event that works in both browser and test environments
24
- */
25
- function createClickEvent() {
26
- try {
27
- return new MouseEvent("click", {
28
- bubbles: true,
29
- cancelable: true,
30
- view: window
31
- });
32
- } catch {
33
- return new MouseEvent("click", {
34
- bubbles: true,
35
- cancelable: true
36
- });
37
- }
38
- }
39
- /**
40
- * Parse YAML or JSON content into a JavaScript object
41
- */
42
- async function parseContent(content) {
43
- try {
44
- return JSON.parse(content);
45
- } catch {
46
- const { parse } = await import("yaml");
47
- return parse(content, {
48
- maxAliasCount: 1e4,
49
- merge: true
50
- });
51
- }
52
- }
53
- /**
54
- * Detect if content is JSON or YAML using lightweight string heuristics
55
- * to avoid the cost of a full JSON.parse call.
56
- */
57
- function detectFormat(content) {
58
- const trimmed = content.trimStart();
59
- if (trimmed.startsWith("{") || trimmed.startsWith("[")) return "json";
60
- return "yaml";
61
- }
62
- /**
63
- * Convert content to the target format, returning the original string when
64
- * no conversion is needed so that YAML comments, custom formatting, and key
65
- * ordering are preserved.
66
- */
67
- async function formatContent(content, inputFormat, outputFormat) {
68
- if (inputFormat === outputFormat) return content;
69
- const parsed = await parseContent(content);
70
- if (outputFormat === "json") return JSON.stringify(parsed, null, 2);
71
- const { stringify } = await import("yaml");
72
- return stringify(parsed);
73
- }
74
- /**
75
- * Trigger the download of the OpenAPI document
76
- */
77
- async function downloadDocument(content, filename, format) {
78
- const inputFormat = detectFormat(content);
79
- const outputFormat = format ?? inputFormat;
80
- const contentFilename = `${filename ?? "openapi"}.${outputFormat}`;
81
- const mimeType = outputFormat === "json" ? "application/json" : "application/x-yaml";
82
- const formattedContent = await formatContent(content, inputFormat, outputFormat);
83
- const blob = new Blob([formattedContent], { type: mimeType });
84
- const data = URL.createObjectURL(blob);
85
- const link = document.createElement("a");
86
- link.href = data;
87
- link.download = contentFilename;
88
- link.dispatchEvent(createClickEvent());
89
- setTimeout(() => {
90
- window.URL.revokeObjectURL(data);
91
- link.remove();
92
- }, 100);
93
- }
94
- //#endregion
95
- //#region src/helpers/load-from-perssistance.ts
96
- /**
97
- * Loads the default HTTP client from storage and applies it to the workspace.
98
- * Only updates if no default client is already set.
99
- */
100
- var loadClientFromStorage = (store) => {
101
- const storedClient = clientStorage().get();
102
- if (isClient(storedClient) && !store.workspace["x-scalar-default-client"]) store.update("x-scalar-default-client", storedClient);
103
- };
104
- /**
105
- * Loads the authentication data from storage and applies it to the workspace.
106
- * Only updates if no authentication data is already set.
107
- */
108
- var loadAuthFromStorage = (store, slug) => {
109
- const auth = authStorage().getAuth(slug);
110
- store.auth.load({ [slug]: auth });
111
- };
112
- //#endregion
113
- //#region src/helpers/map-config-plugins.ts
114
- /**
115
- * Maps API reference configuration callbacks to client plugins.
116
- *
117
- * This function transforms the legacy onBeforeRequest and onRequestSent callbacks
118
- * into the new plugin hook system. The mapping is reactive, so changes to the
119
- * configuration will automatically update the plugin hooks.
120
- *
121
- * Note: onRequestSent is mapped to responseReceived hook. This is not a perfect
122
- * one-to-one mapping, but it maintains backward compatibility with the old API.
123
- * The old callback receives only the URL string, while the new hook receives
124
- * the full response object.
125
- *
126
- * @param config - Reactive configuration object containing optional hook callbacks
127
- * @returns Array containing a single plugin with the mapped hooks
128
- */
129
- var mapConfigPlugins = (config) => {
130
- const plugin = { hooks: {} };
131
- watch([() => config.value.onBeforeRequest, () => config.value.onRequestSent], ([onBeforeRequest, onRequestSent]) => {
132
- if (!plugin.hooks) plugin.hooks = {};
133
- plugin.hooks.beforeRequest = onBeforeRequest ? async (payload) => {
134
- const result = await onBeforeRequest(payload);
135
- /**
136
- * When the callback returns void (for side-effect only callbacks like logging),
137
- * we return the original payload to keep the request pipeline working.
138
- */
139
- if (result === void 0) return payload;
140
- return result;
141
- } : void 0;
142
- /**
143
- * Maps onRequestSent to responseReceived hook.
144
- * The old API only passed the URL string, so we extract it from the request.
145
- */
146
- plugin.hooks.responseReceived = onRequestSent ? (payload) => {
147
- onRequestSent(payload.request.url);
148
- } : void 0;
149
- }, { immediate: true });
150
- return [plugin];
151
- };
152
- //#endregion
153
- //#region src/helpers/map-config-to-workspace-store.ts
154
- var mapConfigToWorkspaceStore = ({ config, store, isDarkMode }) => {
155
- watch(() => toValue(config).defaultHttpClient, (newValue) => {
156
- if (newValue) {
157
- const { targetKey, clientKey } = newValue;
158
- const clientId = `${targetKey}/${clientKey}`;
159
- if (isClient(clientId)) store.update("x-scalar-default-client", clientId);
160
- }
161
- }, { immediate: true });
162
- /** Update the dark mode state when props change */
163
- watch(() => toValue(config).darkMode, (isDark) => store.update("x-scalar-color-mode", isDark ? "dark" : "light"));
164
- watch(() => isDarkMode.value, (newIsDark) => store.update("x-scalar-color-mode", newIsDark ? "dark" : "light"), { immediate: true });
165
- if (toValue(config).metaData) useSeoMeta(toValue(config).metaData);
166
- watch(() => toValue(config).proxyUrl, (newProxyUrl) => store.update("x-scalar-active-proxy", newProxyUrl), { immediate: true });
167
- useFavicon(computed(() => toValue(config).favicon));
168
- };
169
- //#endregion
170
- //#region src/helpers/normalize-configurations.ts
171
- /**
172
- * Take any configuration and return a flat array of configurations.
173
- */
174
- var normalizeConfigurations = (configuration) => {
175
- const slugger = new GithubSlugger();
176
- const normalized = {};
177
- if (!configuration) return normalized;
178
- (Array.isArray(configuration) ? configuration : [configuration]).flatMap((c) => {
179
- if (isConfigurationWithSources(c)) {
180
- const { sources: configSources, ...rest } = c;
181
- return configSources?.map((source) => ({
182
- ...rest,
183
- ...source
184
- })) ?? [];
185
- }
186
- return [c];
187
- }).map((source) => {
188
- /** Validation with migrate deprecated attributes to their new format */
189
- const validated = apiReferenceConfigurationWithSourceSchema.safeParse(source);
190
- return validated.success ? validated.data : null;
191
- }).filter((c) => !!c && (!!c.url || !!c.content)).map((source, index) => addSlugAndTitle(source, index, slugger)).forEach((c) => {
192
- const { url, content, ...config } = c;
193
- normalized[c.slug] = {
194
- config,
195
- title: c.title,
196
- slug: c.slug,
197
- default: !!c?.default,
198
- agent: c.agent,
199
- source: content ? { content: normalizeContent(content) ?? {} } : { url }
200
- };
201
- });
202
- return normalized;
203
- };
204
- /** Normalize content into a JS object or return null if it is falsey */
205
- var normalizeContent = (content) => {
206
- if (!content) return null;
207
- if (typeof content === "function") return normalizeContent(content());
208
- if (typeof content === "string") return parseJsonOrYaml(content);
209
- return content;
210
- };
211
- /** Process a single spec configuration so that it has a title and a slug */
212
- var addSlugAndTitle = (source, index = 0, slugger) => {
213
- if (source.title) return {
214
- ...source,
215
- slug: source.slug || slugger.slug(source.title),
216
- title: source.title
217
- };
218
- if (source.slug) return {
219
- ...source,
220
- slug: slugger.slug(source.slug),
221
- title: source.slug
222
- };
223
- return {
224
- ...source,
225
- slug: `api-${index + 1}`,
226
- title: `API #${index + 1}`
227
- };
228
- };
229
- //#endregion
230
- export { loadClientFromStorage as a, loadAuthFromStorage as i, mapConfigToWorkspaceStore as n, downloadDocument as o, mapConfigPlugins as r, getSystemModePreference as s, normalizeConfigurations as t };
231
-
232
- //# sourceMappingURL=normalize-configurations-DcVpOEjD.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"normalize-configurations-DcVpOEjD.js","names":[],"sources":["../src/helpers/color-mode.ts","../src/helpers/download.ts","../src/helpers/load-from-perssistance.ts","../src/helpers/map-config-plugins.ts","../src/helpers/map-config-to-workspace-store.ts","../src/helpers/normalize-configurations.ts"],"sourcesContent":["/**\n * Gets the system color mode preference from the browser.\n * Falls back to 'light' if running in a non-browser environment.\n *\n * @returns The system preference for dark or light mode.\n */\nexport const getSystemModePreference = (): 'dark' | 'light' => {\n if (typeof window === 'undefined' || typeof window?.matchMedia !== 'function') {\n return 'light'\n }\n\n return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'\n}\n","/**\n * Create a click event that works in both browser and test environments\n */\nfunction createClickEvent() {\n try {\n return new MouseEvent('click', {\n bubbles: true,\n cancelable: true,\n view: window,\n })\n } catch {\n // Fallback for test environment\n return new MouseEvent('click', {\n bubbles: true,\n cancelable: true,\n })\n }\n}\n\n/**\n * Parse YAML or JSON content into a JavaScript object\n */\nasync function parseContent(content: string) {\n try {\n return JSON.parse(content)\n } catch {\n const { parse } = await import('yaml')\n return parse(content, {\n maxAliasCount: 10000,\n merge: true,\n })\n }\n}\n\n/**\n * Detect if content is JSON or YAML using lightweight string heuristics\n * to avoid the cost of a full JSON.parse call.\n */\nfunction detectFormat(content: string): 'json' | 'yaml' {\n const trimmed = content.trimStart()\n if (trimmed.startsWith('{') || trimmed.startsWith('[')) {\n return 'json'\n }\n return 'yaml'\n}\n\n/**\n * Convert content to the target format, returning the original string when\n * no conversion is needed so that YAML comments, custom formatting, and key\n * ordering are preserved.\n */\nasync function formatContent(\n content: string,\n inputFormat: 'json' | 'yaml',\n outputFormat: 'json' | 'yaml',\n): Promise<string> {\n if (inputFormat === outputFormat) {\n return content\n }\n\n const parsed = await parseContent(content)\n\n if (outputFormat === 'json') {\n return JSON.stringify(parsed, null, 2)\n }\n\n const { stringify } = await import('yaml')\n return stringify(parsed)\n}\n\n/**\n * Trigger the download of the OpenAPI document\n */\nexport async function downloadDocument(content: string, filename?: string, format?: 'json' | 'yaml') {\n const inputFormat = detectFormat(content)\n const outputFormat = format ?? inputFormat\n const contentFilename = `${filename ?? 'openapi'}.${outputFormat}`\n const mimeType = outputFormat === 'json' ? 'application/json' : 'application/x-yaml'\n\n const formattedContent = await formatContent(content, inputFormat, outputFormat)\n const blob = new Blob([formattedContent], { type: mimeType })\n\n const data = URL.createObjectURL(blob)\n const link = document.createElement('a')\n\n link.href = data\n link.download = contentFilename\n\n // this is necessary as link.click() does not work on the latest firefox\n link.dispatchEvent(createClickEvent())\n\n // For Firefox it is necessary to delay revoking the ObjectURL\n setTimeout(() => {\n window.URL.revokeObjectURL(data)\n link.remove()\n }, 100)\n}\n","import { isClient } from '@scalar/api-client/v2/blocks/operation-code-sample'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\n\nimport { authStorage, clientStorage } from '@/helpers/storage'\n\n/**\n * Loads the default HTTP client from storage and applies it to the workspace.\n * Only updates if no default client is already set.\n */\nexport const loadClientFromStorage = (store: WorkspaceStore): void => {\n const storedClient = clientStorage().get()\n\n if (isClient(storedClient) && !store.workspace['x-scalar-default-client']) {\n store.update('x-scalar-default-client', storedClient)\n }\n}\n\n/**\n * Loads the authentication data from storage and applies it to the workspace.\n * Only updates if no authentication data is already set.\n */\nexport const loadAuthFromStorage = (store: WorkspaceStore, slug: string): void => {\n const authPersistence = authStorage()\n const auth = authPersistence.getAuth(slug)\n store.auth.load({ [slug]: auth })\n}\n","import type { ClientPlugin } from '@scalar/oas-utils/helpers'\nimport type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference'\nimport { type ComputedRef, watch } from 'vue'\n\n/**\n * Maps API reference configuration callbacks to client plugins.\n *\n * This function transforms the legacy onBeforeRequest and onRequestSent callbacks\n * into the new plugin hook system. The mapping is reactive, so changes to the\n * configuration will automatically update the plugin hooks.\n *\n * Note: onRequestSent is mapped to responseReceived hook. This is not a perfect\n * one-to-one mapping, but it maintains backward compatibility with the old API.\n * The old callback receives only the URL string, while the new hook receives\n * the full response object.\n *\n * @param config - Reactive configuration object containing optional hook callbacks\n * @returns Array containing a single plugin with the mapped hooks\n */\nexport const mapConfigPlugins = (config: ComputedRef<ApiReferenceConfigurationRaw>): ClientPlugin[] => {\n const plugin: ClientPlugin = { hooks: {} }\n\n watch(\n [() => config.value.onBeforeRequest, () => config.value.onRequestSent],\n ([onBeforeRequest, onRequestSent]) => {\n if (!plugin.hooks) {\n plugin.hooks = {}\n }\n\n plugin.hooks.beforeRequest = onBeforeRequest\n ? async (payload) => {\n const result = await onBeforeRequest(payload)\n\n /**\n * When the callback returns void (for side-effect only callbacks like logging),\n * we return the original payload to keep the request pipeline working.\n */\n if (result === undefined) {\n return payload\n }\n\n return result\n }\n : undefined\n\n /**\n * Maps onRequestSent to responseReceived hook.\n * The old API only passed the URL string, so we extract it from the request.\n */\n plugin.hooks.responseReceived = onRequestSent\n ? (payload) => {\n onRequestSent(payload.request.url)\n }\n : undefined\n },\n { immediate: true },\n )\n\n return [plugin]\n}\n","import { isClient } from '@scalar/api-client/v2/blocks/operation-code-sample'\nimport type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport { useSeoMeta } from '@unhead/vue'\nimport { useFavicon } from '@vueuse/core'\nimport { type MaybeRefOrGetter, type Ref, computed, toValue, watch } from 'vue'\n\nexport const mapConfigToWorkspaceStore = ({\n config,\n store,\n isDarkMode,\n}: {\n config: MaybeRefOrGetter<ApiReferenceConfigurationRaw>\n store: WorkspaceStore\n isDarkMode: Ref<boolean>\n}) => {\n // Update the workspace store if default client changes\n watch(\n () => toValue(config).defaultHttpClient,\n (newValue) => {\n if (newValue) {\n const { targetKey, clientKey } = newValue\n\n const clientId = `${targetKey}/${clientKey}`\n if (isClient(clientId)) {\n store.update('x-scalar-default-client', clientId)\n }\n }\n },\n { immediate: true },\n )\n\n /** Update the dark mode state when props change */\n watch(\n () => toValue(config).darkMode,\n (isDark) => store.update('x-scalar-color-mode', isDark ? 'dark' : 'light'),\n )\n\n // Temporary mapping of isDarkMode until we update the standalone component\n watch(\n () => isDarkMode.value,\n (newIsDark) => store.update('x-scalar-color-mode', newIsDark ? 'dark' : 'light'),\n { immediate: true },\n )\n\n if (toValue(config).metaData) {\n useSeoMeta(toValue(config).metaData)\n }\n\n // Update the active proxy when the proxyUrl changes\n watch(\n () => toValue(config).proxyUrl,\n (newProxyUrl) => store.update('x-scalar-active-proxy', newProxyUrl),\n { immediate: true },\n )\n\n const favicon = computed(() => toValue(config).favicon)\n useFavicon(favicon)\n}\n","import { parseJsonOrYaml } from '@scalar/oas-utils/helpers'\nimport {\n type AnyApiReferenceConfiguration,\n type ApiReferenceConfigurationRaw,\n type ApiReferenceConfigurationWithSource,\n apiReferenceConfigurationWithSourceSchema,\n isConfigurationWithSources,\n} from '@scalar/types/api-reference'\nimport GithubSlugger from 'github-slugger'\n\n/** Processed API Reference Configuration\n *\n * Creates the required title and slug for the API Reference.\n * Separate the source into a dedicated object\n * Returns the raw configuration to pass to components\n */\nexport type NormalizedConfiguration = {\n title: string\n slug: string\n config: ApiReferenceConfigurationRaw\n default: boolean\n agent: ApiReferenceConfigurationWithSource['agent']\n source: { url: string; content?: never } | { content: Record<string, unknown>; url?: never }\n}\n\ntype NormalizedConfigurations = Record<string, NormalizedConfiguration>\n\ntype ConfigWithRequiredSource = Omit<ApiReferenceConfigurationWithSource, 'url' | 'content'> &\n ({ url: string; content?: never } | { content: Record<string, unknown>; url?: never })\n\n/**\n * Take any configuration and return a flat array of configurations.\n */\nexport const normalizeConfigurations = (\n configuration: AnyApiReferenceConfiguration | undefined,\n): NormalizedConfigurations => {\n const slugger = new GithubSlugger()\n\n const normalized: NormalizedConfigurations = {}\n\n if (!configuration) {\n return normalized\n }\n\n const configList = Array.isArray(configuration) ? configuration : [configuration]\n\n configList\n /** Create a flat array of configurations with their document source data integrated. */\n .flatMap((c) => {\n // Check if this config has a 'sources' array property\n if (isConfigurationWithSources(c)) {\n // Destructure to separate sources array from other config properties\n const { sources: configSources, ...rest } = c\n\n // For each source in the array:\n // - Merge the source with the parent config properties\n // - Handle undefined sources by returning empty array via ?? []\n return configSources?.map((source) => ({ ...rest, ...source })) ?? []\n }\n\n // If config doesn't have sources array, treat the config itself as a source\n return [c]\n })\n .map((source) => {\n /** Validation with migrate deprecated attributes to their new format */\n const validated = apiReferenceConfigurationWithSourceSchema.safeParse(source)\n return validated.success ? validated.data : null\n })\n /** Filter out configurations that failed validation or don't have a url or content */\n .filter((c): c is ConfigWithRequiredSource => !!c && (!!c.url || !!c.content))\n /** Add required attributes to the source */\n .map((source, index) => addSlugAndTitle(source, index, slugger))\n /** Separate the configuration and sources by slug */\n .forEach((c) => {\n const { url, content, ...config } = c\n normalized[c.slug] = {\n config,\n title: c.title,\n slug: c.slug,\n default: !!c?.default,\n agent: c.agent,\n source: content ? { content: normalizeContent(content) ?? {} } : { url },\n }\n })\n\n // Process them and return normalized\n return normalized\n}\n\n/** Normalize content into a JS object or return null if it is falsey */\nexport const normalizeContent = (\n content: string | Record<string, unknown> | (() => string | Record<string, unknown>),\n): Record<string, unknown> | null => {\n if (!content) {\n return null\n }\n\n if (typeof content === 'function') {\n return normalizeContent(content())\n }\n\n if (typeof content === 'string') {\n return parseJsonOrYaml(content)\n }\n\n return content\n}\n\n/** Process a single spec configuration so that it has a title and a slug */\nconst addSlugAndTitle = (\n source: ConfigWithRequiredSource,\n index = 0,\n slugger: GithubSlugger,\n): ConfigWithRequiredSource & { slug: string; title: string } => {\n // Case 1: Title exists, generate slug from it\n if (source.title) {\n return {\n ...source,\n slug: source.slug || slugger.slug(source.title),\n title: source.title,\n }\n }\n\n // Case 2: Slug exists but no title, use slug as title\n if (source.slug) {\n return {\n ...source,\n slug: slugger.slug(source.slug),\n title: source.slug,\n }\n }\n\n // Case 3: Neither exists, use index\n return {\n ...source,\n slug: `api-${index + 1}`,\n title: `API #${index + 1}`,\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAMA,IAAa,gCAAkD;AAC7D,KAAI,OAAO,WAAW,eAAe,OAAO,QAAQ,eAAe,WACjE,QAAO;AAGT,QAAO,OAAO,WAAW,+BAA+B,CAAC,UAAU,SAAS;;;;;;;ACR9E,SAAS,mBAAmB;AAC1B,KAAI;AACF,SAAO,IAAI,WAAW,SAAS;GAC7B,SAAS;GACT,YAAY;GACZ,MAAM;GACP,CAAC;SACI;AAEN,SAAO,IAAI,WAAW,SAAS;GAC7B,SAAS;GACT,YAAY;GACb,CAAC;;;;;;AAON,eAAe,aAAa,SAAiB;AAC3C,KAAI;AACF,SAAO,KAAK,MAAM,QAAQ;SACpB;EACN,MAAM,EAAE,UAAU,MAAM,OAAO;AAC/B,SAAO,MAAM,SAAS;GACpB,eAAe;GACf,OAAO;GACR,CAAC;;;;;;;AAQN,SAAS,aAAa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