@scalar/api-reference 1.57.5 → 1.59.0

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 (385) hide show
  1. package/CHANGELOG.md +112 -0
  2. package/dist/blocks/index.d.ts +1 -0
  3. package/dist/blocks/index.d.ts.map +1 -1
  4. package/dist/blocks/index.js +2 -1
  5. package/dist/blocks/scalar-asyncapi-server-selector-block/components/AsyncApiServerSelector.vue.d.ts +24 -0
  6. package/dist/blocks/scalar-asyncapi-server-selector-block/components/AsyncApiServerSelector.vue.d.ts.map +1 -0
  7. package/dist/blocks/scalar-asyncapi-server-selector-block/components/AsyncApiServerSelector.vue.js +7 -0
  8. package/dist/blocks/scalar-asyncapi-server-selector-block/components/AsyncApiServerSelector.vue.js.map +1 -0
  9. package/dist/blocks/scalar-asyncapi-server-selector-block/components/AsyncApiServerSelector.vue.script.js +80 -0
  10. package/dist/blocks/scalar-asyncapi-server-selector-block/components/AsyncApiServerSelector.vue.script.js.map +1 -0
  11. package/dist/blocks/scalar-asyncapi-server-selector-block/components/Selector.vue.d.ts +25 -0
  12. package/dist/blocks/scalar-asyncapi-server-selector-block/components/Selector.vue.d.ts.map +1 -0
  13. package/dist/blocks/scalar-asyncapi-server-selector-block/components/Selector.vue.js +7 -0
  14. package/dist/blocks/scalar-asyncapi-server-selector-block/components/Selector.vue.js.map +1 -0
  15. package/dist/blocks/scalar-asyncapi-server-selector-block/components/Selector.vue.script.js +76 -0
  16. package/dist/blocks/scalar-asyncapi-server-selector-block/components/Selector.vue.script.js.map +1 -0
  17. package/dist/blocks/scalar-asyncapi-server-selector-block/index.d.ts +2 -0
  18. package/dist/blocks/scalar-asyncapi-server-selector-block/index.d.ts.map +1 -0
  19. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts +2 -3
  20. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts.map +1 -1
  21. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js +1 -1
  22. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js.map +1 -1
  23. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.script.js.map +1 -1
  24. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.d.ts +2 -6
  25. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.d.ts.map +1 -1
  26. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.js +1 -1
  27. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.js.map +1 -1
  28. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.script.js +26 -36
  29. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.script.js.map +1 -1
  30. package/dist/blocks/scalar-client-selector-block/helpers/featured-clients.d.ts +1 -1
  31. package/dist/blocks/scalar-client-selector-block/helpers/featured-clients.d.ts.map +1 -1
  32. package/dist/blocks/scalar-client-selector-block/helpers/featured-clients.js.map +1 -1
  33. package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.d.ts +9 -0
  34. package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.d.ts.map +1 -0
  35. package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.js +9 -0
  36. package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.js.map +1 -0
  37. package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.script.js +225 -0
  38. package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.script.js.map +1 -0
  39. package/dist/blocks/scalar-sdk-installation-instructions/helpers/language-icon.d.ts +4 -0
  40. package/dist/blocks/scalar-sdk-installation-instructions/helpers/language-icon.d.ts.map +1 -0
  41. package/dist/blocks/scalar-sdk-installation-instructions/helpers/language-icon.js +59 -0
  42. package/dist/blocks/scalar-sdk-installation-instructions/helpers/language-icon.js.map +1 -0
  43. package/dist/blocks/scalar-sdk-installation-instructions/helpers/renderable-sdks.d.ts +19 -0
  44. package/dist/blocks/scalar-sdk-installation-instructions/helpers/renderable-sdks.d.ts.map +1 -0
  45. package/dist/blocks/scalar-sdk-installation-instructions/helpers/renderable-sdks.js +19 -0
  46. package/dist/blocks/scalar-sdk-installation-instructions/helpers/renderable-sdks.js.map +1 -0
  47. package/dist/blocks/scalar-sdk-installation-instructions/helpers/visible-tab-count.d.ts +16 -0
  48. package/dist/blocks/scalar-sdk-installation-instructions/helpers/visible-tab-count.d.ts.map +1 -0
  49. package/dist/blocks/scalar-sdk-installation-instructions/helpers/visible-tab-count.js +29 -0
  50. package/dist/blocks/scalar-sdk-installation-instructions/helpers/visible-tab-count.js.map +1 -0
  51. package/dist/blocks/scalar-sdk-installation-instructions/index.d.ts +3 -0
  52. package/dist/blocks/scalar-sdk-installation-instructions/index.d.ts.map +1 -0
  53. package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.script.js +1 -1
  54. package/dist/browser/chunks/AgentScalarChatInterface-BXB1nZKJ.js +27 -0
  55. package/dist/browser/chunks/ScalarTextInput.vue-XkIzhvc0.js +27 -0
  56. package/dist/browser/chunks/basic-shape-diamond.svg-BTEOT1FL.js +15 -0
  57. package/dist/browser/chunks/basic-shape-hexagon.svg-BSPzaCgF.js +15 -0
  58. package/dist/browser/chunks/basic-shape-primary-circle-ellipse-round.svg-DKmZ8UUU.js +15 -0
  59. package/dist/browser/chunks/basic-shape-primary-square-rectangle.svg-n2YRykHD.js +15 -0
  60. package/dist/browser/chunks/basic-shape-shield.svg-Bec9cJDA.js +15 -0
  61. package/dist/browser/chunks/browser-67K6wmG9.js +129 -0
  62. package/dist/browser/chunks/computer-device-desktop-monitor.svg-m6j893Hb.js +15 -0
  63. package/dist/browser/chunks/computer-device-desktop.svg-Dk1VVO7k.js +15 -0
  64. package/dist/browser/chunks/computer-device-laptop.svg-BNGVUCYS.js +15 -0
  65. package/dist/browser/chunks/computer-device-mobile-phone-android-samsung-back.svg-CC4UUTFw.js +15 -0
  66. package/dist/browser/chunks/computer-device-mobile-phone-android-samsung.svg-D8ExpMpL.js +15 -0
  67. package/dist/browser/chunks/computer-device-mobile-phone-iphone-x-back.svg-CLm7sgMM.js +15 -0
  68. package/dist/browser/chunks/computer-device-mobile-phone-iphone-x.svg-Xrttg6_7.js +15 -0
  69. package/dist/browser/chunks/computer-device-mobile-tablet-touch.svg-DQ2oTvOG.js +15 -0
  70. package/dist/browser/chunks/computer-device-mobile-tablet.svg-DCr0XlRc.js +15 -0
  71. package/dist/browser/chunks/computer-device-network-ethernet-cat6.svg-AK9l0iOl.js +15 -0
  72. package/dist/browser/chunks/computer-device-network-lan-www.svg-gUIdFBlE.js +15 -0
  73. package/dist/browser/chunks/computer-device-network-wifi-connection.svg-Be-EMm4e.js +15 -0
  74. package/dist/browser/chunks/computer-device-network-wifi-router.svg-Dc2VzyqK.js +15 -0
  75. package/dist/browser/chunks/ecology-science-erlenmeyer-flask.svg-DHgy7Jfd.js +15 -0
  76. package/dist/browser/chunks/image-flash-lightning.svg-EETR_y1q.js +15 -0
  77. package/dist/browser/chunks/image-picture-flower.svg-DN1AYzJU.js +15 -0
  78. package/dist/browser/chunks/interface-alert-exclamation-diamond.svg-C5NozMV_.js +15 -0
  79. package/dist/browser/chunks/interface-alert-exclamation-triangle-warning.svg-DaAg2fF5.js +15 -0
  80. package/dist/browser/chunks/interface-alert-information-circle.svg-ckkkt9Mv.js +15 -0
  81. package/dist/browser/chunks/interface-award-crown.svg-pjvn9hY-.js +15 -0
  82. package/dist/browser/chunks/interface-bookmark-tag.svg-r2r-lQq4.js +15 -0
  83. package/dist/browser/chunks/interface-bookmark.svg-BK9HKQBT.js +15 -0
  84. package/dist/browser/chunks/interface-calendar-date-one.svg-DNnF0M1I.js +15 -0
  85. package/dist/browser/chunks/interface-content-book-open-pages.svg-CQj_w9Vp.js +15 -0
  86. package/dist/browser/chunks/interface-content-book-page.svg-DppoeJRe.js +15 -0
  87. package/dist/browser/chunks/interface-content-file.svg-CvcD7OiY.js +15 -0
  88. package/dist/browser/chunks/interface-content-folder.svg-BmtS5I9A.js +15 -0
  89. package/dist/browser/chunks/interface-copy-clipboard.svg-Be6EI50X.js +15 -0
  90. package/dist/browser/chunks/interface-edit-attachment.svg-G5TKzpWX.js +15 -0
  91. package/dist/browser/chunks/interface-edit-binocular.svg-jzL-DvGB.js +15 -0
  92. package/dist/browser/chunks/interface-edit-magic-wand.svg-BOTlymvp.js +15 -0
  93. package/dist/browser/chunks/interface-edit-tool-paint-roller.svg-s9dwryx7.js +15 -0
  94. package/dist/browser/chunks/interface-edit-tool-pencil.svg-C7v0dbB3.js +15 -0
  95. package/dist/browser/chunks/interface-favorite-award.svg-CYHUgUG0.js +15 -0
  96. package/dist/browser/chunks/interface-favorite-flag.svg-C10zlKOb.js +15 -0
  97. package/dist/browser/chunks/interface-favorite-heart.svg-eoduXxlz.js +15 -0
  98. package/dist/browser/chunks/interface-favorite-star.svg-BSmxJetr.js +15 -0
  99. package/dist/browser/chunks/interface-favorite-stars-sparkles.svg-JTFLj3Ls.js +15 -0
  100. package/dist/browser/chunks/interface-hierarchy-flowchart.svg-Cg_Wy0kN.js +15 -0
  101. package/dist/browser/chunks/interface-home-house.svg-DytoGRnv.js +15 -0
  102. package/dist/browser/chunks/interface-hyperlink.svg-CuEfmmQI.js +15 -0
  103. package/dist/browser/chunks/interface-lighting-brightness.svg-DSK0h_Pa.js +15 -0
  104. package/dist/browser/chunks/interface-lock-closed.svg-Cn6TaLYv.js +15 -0
  105. package/dist/browser/chunks/interface-lock-open-unlock.svg-CVkG5-9W.js +15 -0
  106. package/dist/browser/chunks/interface-login-key.svg-y-cwwXjN.js +15 -0
  107. package/dist/browser/chunks/interface-search.svg-S-puVFJB.js +15 -0
  108. package/dist/browser/chunks/interface-setting-cog.svg-CTH4_lLg.js +15 -0
  109. package/dist/browser/chunks/interface-share-megaphone-bullhorn.svg-Pbp39MyC.js +15 -0
  110. package/dist/browser/chunks/interface-share-rocket.svg-BgCsIRZO.js +15 -0
  111. package/dist/browser/chunks/interface-share-satellite.svg-DAMN9d5G.js +15 -0
  112. package/dist/browser/chunks/interface-share-space-ship.svg-Dt-Mejxk.js +15 -0
  113. package/dist/browser/chunks/interface-share.svg-vFYTXSti.js +15 -0
  114. package/dist/browser/chunks/interface-signal-square.svg-DNG4LpAe.js +15 -0
  115. package/dist/browser/chunks/interface-time-clock-circle.svg-Bpz-nLxo.js +15 -0
  116. package/dist/browser/chunks/interface-time-hour-glass.svg-D7agfKsH.js +15 -0
  117. package/dist/browser/chunks/interface-users-multiple.svg-CkPJBBnG.js +15 -0
  118. package/dist/browser/chunks/interface-weather-moon.svg-CaTZFMPO.js +15 -0
  119. package/dist/browser/chunks/mail-chat-bubble-square.svg-DC8RIihp.js +15 -0
  120. package/dist/browser/chunks/mail-send-email-paper-airplane.svg-D8OLs9jz.js +15 -0
  121. package/dist/browser/chunks/mail-send-envelope.svg-CV33h5Sx.js +15 -0
  122. package/dist/browser/chunks/modal-Bp9V4D2s.js +66 -0
  123. package/dist/browser/chunks/modal-CtAiwzwH.js +15 -0
  124. package/dist/browser/chunks/money-cashier-receipt.svg-CJL8C2gs.js +15 -0
  125. package/dist/browser/chunks/money-currency-dollar-pay.svg-VdBplCTx.js +15 -0
  126. package/dist/browser/chunks/money-graph-arrow-increase.svg-DcRov3zk.js +15 -0
  127. package/dist/browser/chunks/money-graph-bar-chart-increase.svg-Cc7KxjX-.js +15 -0
  128. package/dist/browser/chunks/nature-ecology-leaf.svg-DR3cTZxt.js +15 -0
  129. package/dist/browser/chunks/phone-telephone.svg-DyY0gUlk.js +15 -0
  130. package/dist/browser/chunks/programming-bug.svg-BHLT-Qhp.js +15 -0
  131. package/dist/browser/chunks/programming-cloud.svg-B6YW33ba.js +15 -0
  132. package/dist/browser/chunks/programming-computer-database-server.svg-B6o5Sdn-.js +15 -0
  133. package/dist/browser/chunks/programming-computer-database.svg-Cl7OVtpJ.js +15 -0
  134. package/dist/browser/chunks/programming-module-four-layout.svg-BQrerL1x.js +15 -0
  135. package/dist/browser/chunks/programming-module-three.svg-B2KTQzBM.js +15 -0
  136. package/dist/browser/chunks/programming-module.svg-CiID7kPm.js +15 -0
  137. package/dist/browser/chunks/programming-script-code.svg-D1M5rtkN.js +15 -0
  138. package/dist/browser/chunks/runtime-core.esm-bundler-Byrbbu5Q.js +17 -0
  139. package/dist/browser/chunks/shopping-cart.svg-BEegiIR9.js +15 -0
  140. package/dist/browser/chunks/shopping-gift-present.svg-BUHwuLix.js +15 -0
  141. package/dist/browser/chunks/shopping-shipping-box-parcel-package.svg-D6fxWdYx.js +15 -0
  142. package/dist/browser/chunks/tag-new-circle.svg-jsg1bGs0.js +15 -0
  143. package/dist/browser/chunks/travel-map-earth-globe.svg-ClbMiU-f.js +15 -0
  144. package/dist/browser/chunks/vendor-nugWm4eq.js +337 -0
  145. package/dist/browser/standalone.esm.js +1853 -0
  146. package/dist/browser/standalone.js +258 -255
  147. package/dist/components/ApiReference.vue.d.ts.map +1 -1
  148. package/dist/components/ApiReference.vue.js +1 -1
  149. package/dist/components/ApiReference.vue.js.map +1 -1
  150. package/dist/components/ApiReference.vue.script.js +79 -28
  151. package/dist/components/ApiReference.vue.script.js.map +1 -1
  152. package/dist/components/Content/AsyncApi/AsyncApiTraversedEntry.vue.d.ts +16 -0
  153. package/dist/components/Content/AsyncApi/AsyncApiTraversedEntry.vue.d.ts.map +1 -0
  154. package/dist/components/Content/AsyncApi/AsyncApiTraversedEntry.vue.js +7 -0
  155. package/dist/components/Content/AsyncApi/AsyncApiTraversedEntry.vue.js.map +1 -0
  156. package/dist/components/Content/AsyncApi/AsyncApiTraversedEntry.vue.script.js +166 -0
  157. package/dist/components/Content/AsyncApi/AsyncApiTraversedEntry.vue.script.js.map +1 -0
  158. package/dist/components/Content/AsyncApi/Channel.vue.d.ts +18 -0
  159. package/dist/components/Content/AsyncApi/Channel.vue.d.ts.map +1 -0
  160. package/dist/components/Content/AsyncApi/Channel.vue.js +9 -0
  161. package/dist/components/Content/AsyncApi/Channel.vue.js.map +1 -0
  162. package/dist/components/Content/AsyncApi/Channel.vue.script.js +148 -0
  163. package/dist/components/Content/AsyncApi/Channel.vue.script.js.map +1 -0
  164. package/dist/components/Content/AsyncApi/helpers/adapt-async-api-parameters.d.ts +14 -0
  165. package/dist/components/Content/AsyncApi/helpers/adapt-async-api-parameters.d.ts.map +1 -0
  166. package/dist/components/Content/AsyncApi/helpers/adapt-async-api-parameters.js +34 -0
  167. package/dist/components/Content/AsyncApi/helpers/adapt-async-api-parameters.js.map +1 -0
  168. package/dist/components/Content/AsyncApi/index.d.ts +2 -0
  169. package/dist/components/Content/AsyncApi/index.d.ts.map +1 -0
  170. package/dist/components/Content/Auth/Auth.vue.d.ts +1 -1
  171. package/dist/components/Content/Auth/Auth.vue.d.ts.map +1 -1
  172. package/dist/components/Content/Auth/Auth.vue.js.map +1 -1
  173. package/dist/components/Content/Auth/Auth.vue.script.js +2 -0
  174. package/dist/components/Content/Auth/Auth.vue.script.js.map +1 -1
  175. package/dist/components/Content/Content.vue.d.ts +3 -3
  176. package/dist/components/Content/Content.vue.d.ts.map +1 -1
  177. package/dist/components/Content/Content.vue.js.map +1 -1
  178. package/dist/components/Content/Content.vue.script.js +69 -9
  179. package/dist/components/Content/Content.vue.script.js.map +1 -1
  180. package/dist/components/Content/Models/Model.vue.d.ts +4 -2
  181. package/dist/components/Content/Models/Model.vue.d.ts.map +1 -1
  182. package/dist/components/Content/Models/Model.vue.js.map +1 -1
  183. package/dist/components/Content/Models/Model.vue.script.js +6 -1
  184. package/dist/components/Content/Models/Model.vue.script.js.map +1 -1
  185. package/dist/components/Content/Models/ModelTag.vue.d.ts +2 -0
  186. package/dist/components/Content/Models/ModelTag.vue.d.ts.map +1 -1
  187. package/dist/components/Content/Models/ModelTag.vue.js.map +1 -1
  188. package/dist/components/Content/Models/ModelTag.vue.script.js +11 -12
  189. package/dist/components/Content/Models/ModelTag.vue.script.js.map +1 -1
  190. package/dist/components/Content/Models/components/ClassicLayout.vue.d.ts +4 -2
  191. package/dist/components/Content/Models/components/ClassicLayout.vue.d.ts.map +1 -1
  192. package/dist/components/Content/Models/components/ClassicLayout.vue.js +1 -1
  193. package/dist/components/Content/Models/components/ClassicLayout.vue.js.map +1 -1
  194. package/dist/components/Content/Models/components/ClassicLayout.vue.script.js +9 -2
  195. package/dist/components/Content/Models/components/ClassicLayout.vue.script.js.map +1 -1
  196. package/dist/components/Content/Models/components/ModernLayout.vue.d.ts +4 -1
  197. package/dist/components/Content/Models/components/ModernLayout.vue.d.ts.map +1 -1
  198. package/dist/components/Content/Models/components/ModernLayout.vue.js.map +1 -1
  199. package/dist/components/Content/Models/components/ModernLayout.vue.script.js +5 -1
  200. package/dist/components/Content/Models/components/ModernLayout.vue.script.js.map +1 -1
  201. package/dist/components/Content/Operations/TraversedEntry.vue.d.ts +1 -1
  202. package/dist/components/Content/Operations/TraversedEntry.vue.d.ts.map +1 -1
  203. package/dist/components/Content/Operations/TraversedEntry.vue.js.map +1 -1
  204. package/dist/components/Content/Operations/TraversedEntry.vue.script.js +11 -4
  205. package/dist/components/Content/Operations/TraversedEntry.vue.script.js.map +1 -1
  206. package/dist/components/Content/Schema/Schema.vue.d.ts +6 -0
  207. package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
  208. package/dist/components/Content/Schema/Schema.vue.js +1 -1
  209. package/dist/components/Content/Schema/Schema.vue.js.map +1 -1
  210. package/dist/components/Content/Schema/Schema.vue.script.js +32 -7
  211. package/dist/components/Content/Schema/Schema.vue.script.js.map +1 -1
  212. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
  213. package/dist/components/Content/Schema/SchemaComposition.vue.js.map +1 -1
  214. package/dist/components/Content/Schema/SchemaComposition.vue.script.js +16 -3
  215. package/dist/components/Content/Schema/SchemaComposition.vue.script.js.map +1 -1
  216. package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.script.js +1 -1
  217. package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts.map +1 -1
  218. package/dist/components/Content/Schema/SchemaObjectProperties.vue.js.map +1 -1
  219. package/dist/components/Content/Schema/SchemaObjectProperties.vue.script.js +11 -6
  220. package/dist/components/Content/Schema/SchemaObjectProperties.vue.script.js.map +1 -1
  221. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +2 -0
  222. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  223. package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
  224. package/dist/components/Content/Schema/SchemaProperty.vue.js.map +1 -1
  225. package/dist/components/Content/Schema/SchemaProperty.vue.script.js +17 -2
  226. package/dist/components/Content/Schema/SchemaProperty.vue.script.js.map +1 -1
  227. package/dist/components/Content/Schema/helpers/get-compositions-to-render.d.ts +3 -2
  228. package/dist/components/Content/Schema/helpers/get-compositions-to-render.d.ts.map +1 -1
  229. package/dist/components/Content/Schema/helpers/get-compositions-to-render.js +26 -1
  230. package/dist/components/Content/Schema/helpers/get-compositions-to-render.js.map +1 -1
  231. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts +2 -1
  232. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts.map +1 -1
  233. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +40 -25
  234. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js.map +1 -1
  235. package/dist/components/Content/Schema/helpers/schema-cycle.d.ts +31 -0
  236. package/dist/components/Content/Schema/helpers/schema-cycle.d.ts.map +1 -0
  237. package/dist/components/Content/Schema/helpers/schema-cycle.js +39 -0
  238. package/dist/components/Content/Schema/helpers/schema-cycle.js.map +1 -0
  239. package/dist/components/Content/Schema/types.d.ts +10 -0
  240. package/dist/components/Content/Schema/types.d.ts.map +1 -1
  241. package/dist/components/index.js +1 -1
  242. package/dist/features/Operation/Operation.vue.d.ts +1 -1
  243. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  244. package/dist/features/Operation/Operation.vue.js.map +1 -1
  245. package/dist/features/Operation/Operation.vue.script.js +4 -0
  246. package/dist/features/Operation/Operation.vue.script.js.map +1 -1
  247. package/dist/features/Operation/components/ContentTypeSelect.vue.script.js +1 -1
  248. package/dist/features/Operation/components/Header.vue.d.ts +4 -1
  249. package/dist/features/Operation/components/Header.vue.d.ts.map +1 -1
  250. package/dist/features/Operation/components/Header.vue.js.map +1 -1
  251. package/dist/features/Operation/components/Header.vue.script.js +6 -2
  252. package/dist/features/Operation/components/Header.vue.script.js.map +1 -1
  253. package/dist/features/Operation/components/Headers.vue.d.ts +4 -1
  254. package/dist/features/Operation/components/Headers.vue.d.ts.map +1 -1
  255. package/dist/features/Operation/components/Headers.vue.js +1 -1
  256. package/dist/features/Operation/components/Headers.vue.js.map +1 -1
  257. package/dist/features/Operation/components/Headers.vue.script.js +10 -4
  258. package/dist/features/Operation/components/Headers.vue.script.js.map +1 -1
  259. package/dist/features/Operation/components/OperationParameters.vue.d.ts +4 -2
  260. package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
  261. package/dist/features/Operation/components/OperationParameters.vue.js.map +1 -1
  262. package/dist/features/Operation/components/OperationParameters.vue.script.js +12 -1
  263. package/dist/features/Operation/components/OperationParameters.vue.script.js.map +1 -1
  264. package/dist/features/Operation/components/OperationResponses.vue.d.ts +4 -2
  265. package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
  266. package/dist/features/Operation/components/OperationResponses.vue.js.map +1 -1
  267. package/dist/features/Operation/components/OperationResponses.vue.script.js +3 -0
  268. package/dist/features/Operation/components/OperationResponses.vue.script.js.map +1 -1
  269. package/dist/features/Operation/components/ParameterList.vue.d.ts +4 -2
  270. package/dist/features/Operation/components/ParameterList.vue.d.ts.map +1 -1
  271. package/dist/features/Operation/components/ParameterList.vue.js.map +1 -1
  272. package/dist/features/Operation/components/ParameterList.vue.script.js +3 -0
  273. package/dist/features/Operation/components/ParameterList.vue.script.js.map +1 -1
  274. package/dist/features/Operation/components/ParameterListItem.vue.d.ts +4 -2
  275. package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
  276. package/dist/features/Operation/components/ParameterListItem.vue.js +1 -1
  277. package/dist/features/Operation/components/ParameterListItem.vue.js.map +1 -1
  278. package/dist/features/Operation/components/ParameterListItem.vue.script.js +8 -1
  279. package/dist/features/Operation/components/ParameterListItem.vue.script.js.map +1 -1
  280. package/dist/features/Operation/components/RequestBody.vue.d.ts +4 -1
  281. package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
  282. package/dist/features/Operation/components/RequestBody.vue.js +1 -1
  283. package/dist/features/Operation/components/RequestBody.vue.js.map +1 -1
  284. package/dist/features/Operation/components/RequestBody.vue.script.js +10 -3
  285. package/dist/features/Operation/components/RequestBody.vue.script.js.map +1 -1
  286. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +4 -2
  287. package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
  288. package/dist/features/Operation/components/callbacks/Callback.vue.js +1 -1
  289. package/dist/features/Operation/components/callbacks/Callback.vue.js.map +1 -1
  290. package/dist/features/Operation/components/callbacks/Callback.vue.script.js +5 -0
  291. package/dist/features/Operation/components/callbacks/Callback.vue.script.js.map +1 -1
  292. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts +4 -2
  293. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -1
  294. package/dist/features/Operation/components/callbacks/Callbacks.vue.js.map +1 -1
  295. package/dist/features/Operation/components/callbacks/Callbacks.vue.script.js +3 -0
  296. package/dist/features/Operation/components/callbacks/Callbacks.vue.script.js.map +1 -1
  297. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +3 -1
  298. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  299. package/dist/features/Operation/layouts/ClassicLayout.vue.js +1 -1
  300. package/dist/features/Operation/layouts/ClassicLayout.vue.js.map +1 -1
  301. package/dist/features/Operation/layouts/ClassicLayout.vue.script.js +8 -1
  302. package/dist/features/Operation/layouts/ClassicLayout.vue.script.js.map +1 -1
  303. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +3 -1
  304. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  305. package/dist/features/Operation/layouts/ModernLayout.vue.js +1 -1
  306. package/dist/features/Operation/layouts/ModernLayout.vue.js.map +1 -1
  307. package/dist/features/Operation/layouts/ModernLayout.vue.script.js +170 -176
  308. package/dist/features/Operation/layouts/ModernLayout.vue.script.js.map +1 -1
  309. package/dist/features/Search/components/SearchButton.vue.d.ts +4 -1
  310. package/dist/features/Search/components/SearchButton.vue.d.ts.map +1 -1
  311. package/dist/features/Search/components/SearchButton.vue.js.map +1 -1
  312. package/dist/features/Search/components/SearchButton.vue.script.js +20 -9
  313. package/dist/features/Search/components/SearchButton.vue.script.js.map +1 -1
  314. package/dist/features/Search/components/SearchModal.vue.d.ts +4 -1
  315. package/dist/features/Search/components/SearchModal.vue.d.ts.map +1 -1
  316. package/dist/features/Search/components/SearchModal.vue.js +1 -1
  317. package/dist/features/Search/components/SearchModal.vue.js.map +1 -1
  318. package/dist/features/Search/components/SearchModal.vue.script.js +7 -5
  319. package/dist/features/Search/components/SearchModal.vue.script.js.map +1 -1
  320. package/dist/features/Search/components/SearchResult.vue.d.ts +2 -0
  321. package/dist/features/Search/components/SearchResult.vue.d.ts.map +1 -1
  322. package/dist/features/Search/components/SearchResult.vue.js.map +1 -1
  323. package/dist/features/Search/components/SearchResult.vue.script.js +8 -6
  324. package/dist/features/Search/components/SearchResult.vue.script.js.map +1 -1
  325. package/dist/features/Search/helpers/create-search-index.d.ts +9 -1
  326. package/dist/features/Search/helpers/create-search-index.d.ts.map +1 -1
  327. package/dist/features/Search/helpers/create-search-index.js +27 -8
  328. package/dist/features/Search/helpers/create-search-index.js.map +1 -1
  329. package/dist/features/Search/hooks/useSearchIndex.d.ts +4 -2
  330. package/dist/features/Search/hooks/useSearchIndex.d.ts.map +1 -1
  331. package/dist/features/Search/hooks/useSearchIndex.js +4 -3
  332. package/dist/features/Search/hooks/useSearchIndex.js.map +1 -1
  333. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.d.ts +1 -1
  334. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.d.ts.map +1 -1
  335. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.js.map +1 -1
  336. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.script.js +11 -9
  337. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.script.js.map +1 -1
  338. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.script.js +1 -1
  339. package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.d.ts.map +1 -1
  340. package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.js.map +1 -1
  341. package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.script.js +9 -1
  342. package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.script.js.map +1 -1
  343. package/dist/features/example-responses/ExampleResponse.vue.d.ts.map +1 -1
  344. package/dist/features/example-responses/ExampleResponse.vue.js +1 -1
  345. package/dist/features/example-responses/ExampleResponse.vue.js.map +1 -1
  346. package/dist/features/example-responses/ExampleResponse.vue.script.js +6 -7
  347. package/dist/features/example-responses/ExampleResponse.vue.script.js.map +1 -1
  348. package/dist/features/example-responses/ExampleResponses.vue.script.js +1 -1
  349. package/dist/features/example-responses/ExampleSchema.vue.d.ts.map +1 -1
  350. package/dist/features/example-responses/ExampleSchema.vue.js.map +1 -1
  351. package/dist/features/example-responses/ExampleSchema.vue.script.js +6 -7
  352. package/dist/features/example-responses/ExampleSchema.vue.script.js.map +1 -1
  353. package/dist/features/info-object/Contact.vue.d.ts.map +1 -1
  354. package/dist/features/info-object/Contact.vue.js.map +1 -1
  355. package/dist/features/info-object/Contact.vue.script.js +15 -4
  356. package/dist/features/info-object/Contact.vue.script.js.map +1 -1
  357. package/dist/helpers/get-async-api-model-schema.d.ts +15 -0
  358. package/dist/helpers/get-async-api-model-schema.d.ts.map +1 -0
  359. package/dist/helpers/get-async-api-model-schema.js +32 -0
  360. package/dist/helpers/get-async-api-model-schema.js.map +1 -0
  361. package/dist/helpers/id-routing.d.ts +18 -0
  362. package/dist/helpers/id-routing.d.ts.map +1 -1
  363. package/dist/helpers/id-routing.js +41 -1
  364. package/dist/helpers/id-routing.js.map +1 -1
  365. package/dist/helpers/load-from-perssistance.d.ts +2 -1
  366. package/dist/helpers/load-from-perssistance.d.ts.map +1 -1
  367. package/dist/helpers/load-from-perssistance.js +4 -3
  368. package/dist/helpers/load-from-perssistance.js.map +1 -1
  369. package/dist/plugins/index.d.ts +1 -1
  370. package/dist/plugins/index.js +1 -1
  371. package/dist/plugins/{persistance-plugin.d.ts → persistence-plugin.d.ts} +2 -8
  372. package/dist/plugins/persistence-plugin.d.ts.map +1 -0
  373. package/dist/plugins/{persistance-plugin.js → persistence-plugin.js} +4 -13
  374. package/dist/plugins/persistence-plugin.js.map +1 -0
  375. package/dist/standalone/lib/html-api.d.ts.map +1 -1
  376. package/dist/standalone/lib/html-api.js +60 -2
  377. package/dist/standalone/lib/html-api.js.map +1 -1
  378. package/dist/standalone.esm.d.ts +4 -0
  379. package/dist/standalone.esm.d.ts.map +1 -0
  380. package/dist/style.css +665 -470
  381. package/dist/vue-styles.css +661 -463
  382. package/package.json +21 -19
  383. package/dist/browser/webpack-stats.json +0 -1
  384. package/dist/plugins/persistance-plugin.d.ts.map +0 -1
  385. package/dist/plugins/persistance-plugin.js.map +0 -1
@@ -0,0 +1,148 @@
1
+ import Section_default from "../../Section/Section.vue.js";
2
+ import SectionContainer_default from "../../Section/SectionContainer.vue.js";
3
+ import SectionContainerAccordion_default from "../../Section/SectionContainerAccordion.vue.js";
4
+ import SectionContent_default from "../../Section/SectionContent.vue.js";
5
+ import SectionHeader_default from "../../Section/SectionHeader.vue.js";
6
+ import SectionHeaderTag_default from "../../Section/SectionHeaderTag.vue.js";
7
+ import Anchor_default from "../../Anchor/Anchor.vue.js";
8
+ import ParameterList_default from "../../../features/Operation/components/ParameterList.vue.js";
9
+ import { adaptAsyncApiParameters } from "./helpers/adapt-async-api-parameters.js";
10
+ import { computed, createBlock, createCommentVNode, createTextVNode, createVNode, defineComponent, openBlock, toDisplayString, unref, useId, withCtx } from "vue";
11
+ import { ScalarMarkdown } from "@scalar/components/markdown";
12
+ import { getResolvedRef, mergeSiblingReferences } from "@scalar/workspace-store/helpers/get-resolved-ref";
13
+ //#region src/components/Content/AsyncApi/Channel.vue?vue&type=script&setup=true&lang.ts
14
+ var Channel_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
15
+ __name: "Channel",
16
+ props: {
17
+ channel: {},
18
+ document: {},
19
+ layout: {},
20
+ isCollapsed: { type: Boolean },
21
+ eventBus: {},
22
+ options: {}
23
+ },
24
+ setup(__props) {
25
+ const headerId = useId();
26
+ /**
27
+ * Resolve the channel from the document so we can read its description.
28
+ * The navigation entry only carries the address and identifying keys.
29
+ */
30
+ const resolvedChannel = computed(() => {
31
+ const node = __props.document.channels?.[__props.channel.channelName];
32
+ return node ? getResolvedRef(node, mergeSiblingReferences) : void 0;
33
+ });
34
+ const description = computed(() => resolvedChannel.value?.description ?? "");
35
+ /**
36
+ * Heading shown above each channel section.
37
+ *
38
+ * Prefers the human-friendly `channel.title` when it is set, then falls back
39
+ * to `channel.address`, and finally to the channel map key.
40
+ * `channel.channelAddress` already encodes the address-or-key fallback during
41
+ * navigation traversal, so we only need to overlay `title` on top of it.
42
+ */
43
+ const headingText = computed(() => {
44
+ return resolvedChannel.value?.title?.trim() || __props.channel.channelAddress;
45
+ });
46
+ /**
47
+ * Channel address parameters mapped into the OpenAPI parameter shape so we can reuse the shared
48
+ * `ParameterList` component instead of building a dedicated AsyncAPI renderer.
49
+ */
50
+ const parameters = computed(() => adaptAsyncApiParameters(resolvedChannel.value?.parameters));
51
+ /** Fill in defaults so the shared renderer always receives a complete options object. */
52
+ const parameterListOptions = computed(() => ({
53
+ hideModels: __props.options?.hideModels ?? false,
54
+ orderRequiredPropertiesFirst: __props.options?.orderRequiredPropertiesFirst ?? false,
55
+ orderSchemaPropertiesBy: __props.options?.orderSchemaPropertiesBy ?? "preserve",
56
+ expandAllSchemaProperties: __props.options?.expandAllSchemaProperties ?? false
57
+ }));
58
+ return (_ctx, _cache) => {
59
+ return __props.layout === "classic" ? (openBlock(), createBlock(unref(SectionContainerAccordion_default), {
60
+ key: 0,
61
+ "aria-label": headingText.value,
62
+ class: "channel-section",
63
+ modelValue: !__props.isCollapsed,
64
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = (value) => __props.eventBus?.emit("toggle:nav-item", {
65
+ id: __props.channel.id,
66
+ open: value
67
+ }))
68
+ }, {
69
+ title: withCtx(() => [createVNode(unref(SectionHeader_default), { class: "channel-name" }, {
70
+ default: withCtx(() => [createVNode(unref(Anchor_default), { onCopyAnchorUrl: _cache[0] || (_cache[0] = () => __props.eventBus?.emit("copy-url:nav-item", { id: __props.channel.id })) }, {
71
+ default: withCtx(() => [createVNode(unref(SectionHeaderTag_default), { level: 2 }, {
72
+ default: withCtx(() => [createTextVNode(toDisplayString(headingText.value), 1)]),
73
+ _: 1
74
+ })]),
75
+ _: 1
76
+ })]),
77
+ _: 1
78
+ }), createVNode(unref(ScalarMarkdown), {
79
+ class: "channel-description",
80
+ value: description.value,
81
+ withImages: ""
82
+ }, null, 8, ["value"])]),
83
+ default: withCtx(() => [parameters.value.length ? (openBlock(), createBlock(ParameterList_default, {
84
+ key: 0,
85
+ eventBus: __props.eventBus,
86
+ options: parameterListOptions.value,
87
+ parameters: parameters.value
88
+ }, {
89
+ title: withCtx(() => [..._cache[4] || (_cache[4] = [createTextVNode("Parameters", -1)])]),
90
+ _: 1
91
+ }, 8, [
92
+ "eventBus",
93
+ "options",
94
+ "parameters"
95
+ ])) : createCommentVNode("", true)]),
96
+ _: 1
97
+ }, 8, ["aria-label", "modelValue"])) : (openBlock(), createBlock(unref(SectionContainer_default), {
98
+ key: 1,
99
+ "aria-labelledby": unref(headerId),
100
+ role: "region"
101
+ }, {
102
+ default: withCtx(() => [createVNode(unref(Section_default), {
103
+ id: __props.channel.id,
104
+ role: "none",
105
+ onIntersecting: _cache[3] || (_cache[3] = () => __props.eventBus?.emit("intersecting:nav-item", { id: __props.channel.id }))
106
+ }, {
107
+ default: withCtx(() => [createVNode(unref(SectionHeader_default), null, {
108
+ default: withCtx(() => [createVNode(unref(Anchor_default), { onCopyAnchorUrl: _cache[2] || (_cache[2] = () => __props.eventBus?.emit("copy-url:nav-item", { id: __props.channel.id })) }, {
109
+ default: withCtx(() => [createVNode(unref(SectionHeaderTag_default), {
110
+ id: unref(headerId),
111
+ level: 2
112
+ }, {
113
+ default: withCtx(() => [createTextVNode(toDisplayString(headingText.value), 1)]),
114
+ _: 1
115
+ }, 8, ["id"])]),
116
+ _: 1
117
+ })]),
118
+ _: 1
119
+ }), createVNode(unref(SectionContent_default), null, {
120
+ default: withCtx(() => [createVNode(unref(ScalarMarkdown), {
121
+ value: description.value,
122
+ withImages: ""
123
+ }, null, 8, ["value"]), parameters.value.length ? (openBlock(), createBlock(ParameterList_default, {
124
+ key: 0,
125
+ eventBus: __props.eventBus,
126
+ options: parameterListOptions.value,
127
+ parameters: parameters.value
128
+ }, {
129
+ title: withCtx(() => [..._cache[5] || (_cache[5] = [createTextVNode("Parameters", -1)])]),
130
+ _: 1
131
+ }, 8, [
132
+ "eventBus",
133
+ "options",
134
+ "parameters"
135
+ ])) : createCommentVNode("", true)]),
136
+ _: 1
137
+ })]),
138
+ _: 1
139
+ }, 8, ["id"])]),
140
+ _: 1
141
+ }, 8, ["aria-labelledby"]));
142
+ };
143
+ }
144
+ });
145
+ //#endregion
146
+ export { Channel_vue_vue_type_script_setup_true_lang_default as default };
147
+
148
+ //# sourceMappingURL=Channel.vue.script.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Channel.vue.script.js","names":[],"sources":["../../../../src/components/Content/AsyncApi/Channel.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference'\nimport type {\n AsyncApiChannelObject,\n AsyncApiDocument,\n} from '@scalar/types/asyncapi/3.1'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport {\n getResolvedRef,\n mergeSiblingReferences,\n} from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type { TraversedAsyncApiChannel } from '@scalar/workspace-store/schemas/navigation'\nimport { computed, useId } from 'vue'\n\nimport { Anchor } from '@/components/Anchor'\nimport {\n Section,\n SectionContainer,\n SectionContainerAccordion,\n SectionContent,\n SectionHeader,\n SectionHeaderTag,\n} from '@/components/Section'\nimport ParameterList from '@/features/Operation/components/ParameterList.vue'\n\nimport { adaptAsyncApiParameters } from './helpers/adapt-async-api-parameters'\n\n/** Subset of the configuration the shared `ParameterList` renderer needs. */\ntype ParameterListOptions = Pick<\n ApiReferenceConfigurationRaw,\n | 'hideModels'\n | 'orderRequiredPropertiesFirst'\n | 'orderSchemaPropertiesBy'\n | 'expandAllSchemaProperties'\n>\n\nconst { channel, document, layout, isCollapsed, eventBus, options } =\n defineProps<{\n channel: TraversedAsyncApiChannel\n document: AsyncApiDocument\n layout: 'classic' | 'modern'\n isCollapsed: boolean\n eventBus: WorkspaceEventBus | null\n options?: Partial<ParameterListOptions>\n }>()\n\nconst headerId = useId()\n\n/**\n * Resolve the channel from the document so we can read its description.\n * The navigation entry only carries the address and identifying keys.\n */\nconst resolvedChannel = computed<AsyncApiChannelObject | undefined>(() => {\n const node = document.channels?.[channel.channelName]\n return node ? getResolvedRef(node, mergeSiblingReferences) : undefined\n})\n\nconst description = computed(() => resolvedChannel.value?.description ?? '')\n\n/**\n * Heading shown above each channel section.\n *\n * Prefers the human-friendly `channel.title` when it is set, then falls back\n * to `channel.address`, and finally to the channel map key.\n * `channel.channelAddress` already encodes the address-or-key fallback during\n * navigation traversal, so we only need to overlay `title` on top of it.\n */\nconst headingText = computed(() => {\n const title = resolvedChannel.value?.title?.trim()\n return title || channel.channelAddress\n})\n\n/**\n * Channel address parameters mapped into the OpenAPI parameter shape so we can reuse the shared\n * `ParameterList` component instead of building a dedicated AsyncAPI renderer.\n */\nconst parameters = computed(() =>\n adaptAsyncApiParameters(resolvedChannel.value?.parameters),\n)\n\n/** Fill in defaults so the shared renderer always receives a complete options object. */\nconst parameterListOptions = computed<ParameterListOptions>(() => ({\n hideModels: options?.hideModels ?? false,\n orderRequiredPropertiesFirst: options?.orderRequiredPropertiesFirst ?? false,\n orderSchemaPropertiesBy: options?.orderSchemaPropertiesBy ?? 'preserve',\n expandAllSchemaProperties: options?.expandAllSchemaProperties ?? false,\n}))\n</script>\n\n<template>\n <SectionContainerAccordion\n v-if=\"layout === 'classic'\"\n :aria-label=\"headingText\"\n class=\"channel-section\"\n :modelValue=\"!isCollapsed\"\n @update:modelValue=\"\n (value) =>\n eventBus?.emit('toggle:nav-item', { id: channel.id, open: value })\n \">\n <template #title>\n <SectionHeader class=\"channel-name\">\n <Anchor\n @copyAnchorUrl=\"\n () => eventBus?.emit('copy-url:nav-item', { id: channel.id })\n \">\n <SectionHeaderTag :level=\"2\">\n {{ headingText }}\n </SectionHeaderTag>\n </Anchor>\n </SectionHeader>\n <ScalarMarkdown\n class=\"channel-description\"\n :value=\"description\"\n withImages />\n </template>\n <ParameterList\n v-if=\"parameters.length\"\n :eventBus=\"eventBus\"\n :options=\"parameterListOptions\"\n :parameters=\"parameters\">\n <template #title>Parameters</template>\n </ParameterList>\n </SectionContainerAccordion>\n\n <SectionContainer\n v-else\n :aria-labelledby=\"headerId\"\n role=\"region\">\n <Section\n :id=\"channel.id\"\n role=\"none\"\n @intersecting=\"\n () => eventBus?.emit('intersecting:nav-item', { id: channel.id })\n \">\n <SectionHeader>\n <Anchor\n @copyAnchorUrl=\"\n () => eventBus?.emit('copy-url:nav-item', { id: channel.id })\n \">\n <SectionHeaderTag\n :id=\"headerId\"\n :level=\"2\">\n {{ headingText }}\n </SectionHeaderTag>\n </Anchor>\n </SectionHeader>\n <SectionContent>\n <ScalarMarkdown\n :value=\"description\"\n withImages />\n <ParameterList\n v-if=\"parameters.length\"\n :eventBus=\"eventBus\"\n :options=\"parameterListOptions\"\n :parameters=\"parameters\">\n <template #title>Parameters</template>\n </ParameterList>\n </SectionContent>\n </Section>\n </SectionContainer>\n</template>\n\n<style scoped>\n.channel-section {\n margin-bottom: 48px;\n}\n.channel-description {\n padding-bottom: 4px;\n text-align: left;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;EA+CA,MAAM,WAAW,OAAM;;;;;EAMvB,MAAM,kBAAkB,eAAkD;GACxE,MAAM,OAAO,QAAA,SAAS,WAAW,QAAA,QAAQ;AACzC,UAAO,OAAO,eAAe,MAAM,uBAAuB,GAAG,KAAA;IAC9D;EAED,MAAM,cAAc,eAAe,gBAAgB,OAAO,eAAe,GAAE;;;;;;;;;EAU3E,MAAM,cAAc,eAAe;AAEjC,UADc,gBAAgB,OAAO,OAAO,MAAK,IACjC,QAAA,QAAQ;IACzB;;;;;EAMD,MAAM,aAAa,eACjB,wBAAwB,gBAAgB,OAAO,WAAW,CAC5D;;EAGA,MAAM,uBAAuB,gBAAsC;GACjE,YAAY,QAAA,SAAS,cAAc;GACnC,8BAA8B,QAAA,SAAS,gCAAgC;GACvE,yBAAyB,QAAA,SAAS,2BAA2B;GAC7D,2BAA2B,QAAA,SAAS,6BAA6B;GAClE,EAAC;;UAKQ,QAAA,WAAM,aAAA,WAAA,EADd,YAgC4B,MAAA,kCAAA,EAAA;;IA9BzB,cAAY,YAAA;IACb,OAAM;IACL,YAAU,CAAG,QAAA;IACb,uBAAiB,OAAA,OAAA,OAAA,MAAU,UAAkB,QAAA,UAAU,KAAI,mBAAA;KAAA,IAA0B,QAAA,QAAQ;KAAE,MAAQ;KAAK,CAAA;;IAIlG,OAAK,cAUE,CAThB,YASgB,MAAA,sBAAA,EAAA,EATD,OAAM,gBAAc,EAAA;4BAQxB,CAPT,YAOS,MAAA,eAAA,EAAA,EANN,iBAAa,OAAA,OAAA,OAAA,WAAqB,QAAA,UAAU,KAAI,qBAAA,EAAA,IAA4B,QAAA,QAAQ,IAAE,CAAA,GAAA,EAAA;6BAKpE,CAFnB,YAEmB,MAAA,yBAAA,EAAA,EAFA,OAAO,GAAC,EAAA;8BACR,CAAA,gBAAA,gBAAd,YAAA,MAAW,EAAA,EAAA,CAAA,CAAA;;;;;;QAIpB,YAGe,MAAA,eAAA,EAAA;KAFb,OAAM;KACL,OAAO,YAAA;KACR,YAAA;;2BAQY,CALR,WAAA,MAAW,UAAA,WAAA,EADnB,YAMgB,uBAAA;;KAJb,UAAU,QAAA;KACV,SAAS,qBAAA;KACT,YAAY,WAAA;;KACF,OAAK,cAAW,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAAV,cAAU,GAAA,CAAA,EAAA,CAAA;;;;;;;;wDAI/B,YAmCmB,MAAA,yBAAA,EAAA;;IAjChB,mBAAiB,MAAA,SAAQ;IAC1B,MAAK;;2BA+BK,CA9BV,YA8BU,MAAA,gBAAA,EAAA;KA7BP,IAAI,QAAA,QAAQ;KACb,MAAK;KACJ,gBAAY,OAAA,OAAA,OAAA,WAAiB,QAAA,UAAU,KAAI,yBAAA,EAAA,IAAgC,QAAA,QAAQ,IAAE,CAAA;;4BActE,CAXhB,YAWgB,MAAA,sBAAA,EAAA,MAAA;6BADL,CATT,YASS,MAAA,eAAA,EAAA,EARN,iBAAa,OAAA,OAAA,OAAA,WAAqB,QAAA,UAAU,KAAI,qBAAA,EAAA,IAA4B,QAAA,QAAQ,IAAE,CAAA,GAAA,EAAA;8BAOpE,CAJnB,YAImB,MAAA,yBAAA,EAAA;QAHhB,IAAI,MAAA,SAAQ;QACZ,OAAO;;+BACS,CAAA,gBAAA,gBAAd,YAAA,MAAW,EAAA,EAAA,CAAA,CAAA;;;;;;SAIpB,YAWiB,MAAA,uBAAA,EAAA,MAAA;6BARA,CAFf,YAEe,MAAA,eAAA,EAAA;OADZ,OAAO,YAAA;OACR,YAAA;8BAEM,WAAA,MAAW,UAAA,WAAA,EADnB,YAMgB,uBAAA;;OAJb,UAAU,QAAA;OACV,SAAS,qBAAA;OACT,YAAY,WAAA;;OACF,OAAK,cAAW,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAAV,cAAU,GAAA,CAAA,EAAA,CAAA"}
@@ -0,0 +1,14 @@
1
+ import type { AsyncApiChannelObject } from '@scalar/types/asyncapi/3.1';
2
+ import type { ParameterObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
3
+ /**
4
+ * Adapt AsyncAPI channel parameters into the OpenAPI `ParameterObject` shape so we can reuse the
5
+ * existing `ParameterList` rendering instead of building a separate component.
6
+ *
7
+ * AsyncAPI parameters are address placeholders (the `{param}` expressions in a channel address).
8
+ * They are string-only and, because every placeholder in the address must be supplied, always
9
+ * required. We therefore map them to `path` parameters (the closest OpenAPI analog) and fold the
10
+ * `enum`, `default`, and `examples` fields onto a synthetic string schema so the schema renderer
11
+ * can display them. The `location` runtime expression has no display equivalent and is dropped.
12
+ */
13
+ export declare const adaptAsyncApiParameters: (parameters: AsyncApiChannelObject["parameters"]) => ParameterObject[];
14
+ //# sourceMappingURL=adapt-async-api-parameters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adapt-async-api-parameters.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/AsyncApi/helpers/adapt-async-api-parameters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAA;AAEvE,OAAO,KAAK,EAAE,eAAe,EAAgB,MAAM,8DAA8D,CAAA;AAEjH;;;;;;;;;GASG;AACH,eAAO,MAAM,uBAAuB,GAAI,YAAY,qBAAqB,CAAC,YAAY,CAAC,KAAG,eAAe,EAgCxG,CAAA"}
@@ -0,0 +1,34 @@
1
+ import { getResolvedRef } from "@scalar/workspace-store/helpers/get-resolved-ref";
2
+ //#region src/components/Content/AsyncApi/helpers/adapt-async-api-parameters.ts
3
+ /**
4
+ * Adapt AsyncAPI channel parameters into the OpenAPI `ParameterObject` shape so we can reuse the
5
+ * existing `ParameterList` rendering instead of building a separate component.
6
+ *
7
+ * AsyncAPI parameters are address placeholders (the `{param}` expressions in a channel address).
8
+ * They are string-only and, because every placeholder in the address must be supplied, always
9
+ * required. We therefore map them to `path` parameters (the closest OpenAPI analog) and fold the
10
+ * `enum`, `default`, and `examples` fields onto a synthetic string schema so the schema renderer
11
+ * can display them. The `location` runtime expression has no display equivalent and is dropped.
12
+ */
13
+ var adaptAsyncApiParameters = (parameters) => {
14
+ if (!parameters) return [];
15
+ return Object.entries(parameters).map(([name, value]) => {
16
+ const parameter = getResolvedRef(value) ?? {};
17
+ const schema = { type: "string" };
18
+ if (parameter.enum) schema.enum = parameter.enum;
19
+ if (parameter.default !== void 0) schema.default = parameter.default;
20
+ if (parameter.examples) schema.examples = parameter.examples;
21
+ const result = {
22
+ name,
23
+ in: "path",
24
+ required: true,
25
+ schema
26
+ };
27
+ if (parameter.description) result.description = parameter.description;
28
+ return result;
29
+ });
30
+ };
31
+ //#endregion
32
+ export { adaptAsyncApiParameters };
33
+
34
+ //# sourceMappingURL=adapt-async-api-parameters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adapt-async-api-parameters.js","names":[],"sources":["../../../../../src/components/Content/AsyncApi/helpers/adapt-async-api-parameters.ts"],"sourcesContent":["import type { AsyncApiChannelObject } from '@scalar/types/asyncapi/3.1'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type { ParameterObject, SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\n/**\n * Adapt AsyncAPI channel parameters into the OpenAPI `ParameterObject` shape so we can reuse the\n * existing `ParameterList` rendering instead of building a separate component.\n *\n * AsyncAPI parameters are address placeholders (the `{param}` expressions in a channel address).\n * They are string-only and, because every placeholder in the address must be supplied, always\n * required. We therefore map them to `path` parameters (the closest OpenAPI analog) and fold the\n * `enum`, `default`, and `examples` fields onto a synthetic string schema so the schema renderer\n * can display them. The `location` runtime expression has no display equivalent and is dropped.\n */\nexport const adaptAsyncApiParameters = (parameters: AsyncApiChannelObject['parameters']): ParameterObject[] => {\n if (!parameters) {\n return []\n }\n\n return Object.entries(parameters).map(([name, value]) => {\n // Fall back to an empty object so an unresolved `$ref` still renders the parameter name.\n const parameter = getResolvedRef(value) ?? {}\n\n const schema: SchemaObject = { type: 'string' }\n if (parameter.enum) {\n schema.enum = parameter.enum\n }\n if (parameter.default !== undefined) {\n schema.default = parameter.default\n }\n if (parameter.examples) {\n schema.examples = parameter.examples\n }\n\n const result: ParameterObject = {\n name,\n in: 'path',\n required: true,\n schema,\n }\n if (parameter.description) {\n result.description = parameter.description\n }\n\n return result\n })\n}\n"],"mappings":";;;;;;;;;;;;AAcA,IAAa,2BAA2B,eAAuE;AAC7G,KAAI,CAAC,WACH,QAAO,EAAE;AAGX,QAAO,OAAO,QAAQ,WAAW,CAAC,KAAK,CAAC,MAAM,WAAW;EAEvD,MAAM,YAAY,eAAe,MAAM,IAAI,EAAE;EAE7C,MAAM,SAAuB,EAAE,MAAM,UAAU;AAC/C,MAAI,UAAU,KACZ,QAAO,OAAO,UAAU;AAE1B,MAAI,UAAU,YAAY,KAAA,EACxB,QAAO,UAAU,UAAU;AAE7B,MAAI,UAAU,SACZ,QAAO,WAAW,UAAU;EAG9B,MAAM,SAA0B;GAC9B;GACA,IAAI;GACJ,UAAU;GACV;GACD;AACD,MAAI,UAAU,YACZ,QAAO,cAAc,UAAU;AAGjC,SAAO;GACP"}
@@ -0,0 +1,2 @@
1
+ export { default as AsyncApiTraversedEntry } from './AsyncApiTraversedEntry.vue.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/AsyncApi/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,8BAA8B,CAAA"}
@@ -6,7 +6,7 @@ import type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensi
6
6
  import type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
7
7
  import type { WorkspaceDocument } from '@scalar/workspace-store/schemas/workspace';
8
8
  type __VLS_Props = {
9
- options: Pick<ApiReferenceConfigurationRaw, 'authentication' | 'persistAuth' | 'proxyUrl'>;
9
+ options: Pick<ApiReferenceConfigurationRaw, 'authentication' | 'oauth2RedirectUri' | 'persistAuth' | 'proxyUrl'>;
10
10
  authStore: AuthStore;
11
11
  document: WorkspaceDocument | undefined;
12
12
  eventBus: WorkspaceEventBus;
@@ -1 +1 @@
1
- {"version":3,"file":"Auth.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Auth/Auth.vue"],"names":[],"mappings":"AAiFA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAA;AAC/E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAA;AACtE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,EAGL,KAAK,qBAAqB,EAC3B,MAAM,yCAAyC,CAAA;AAChD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AAEnH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAChG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAA;AAGlF,KAAK,WAAW,GAAG;IACf,OAAO,EAAE,IAAI,CACX,4BAA4B,EAC5B,gBAAgB,GAAG,aAAa,GAAG,UAAU,CAC9C,CAAA;IACD,SAAS,EAAE,SAAS,CAAA;IACpB,QAAQ,EAAE,iBAAiB,GAAG,SAAS,CAAA;IACvC,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,eAAe,EAAE,qBAAqB,CAAA;IACtC,cAAc,EAAE,YAAY,GAAG,IAAI,CAAA;IACnC,WAAW,EAAE,kBAAkB,CAAA;CAChC,CAAC;AAkGJ,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"Auth.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Auth/Auth.vue"],"names":[],"mappings":"AAkFA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAA;AAC/E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAA;AACtE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,EAGL,KAAK,qBAAqB,EAC3B,MAAM,yCAAyC,CAAA;AAChD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AAEnH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAChG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAA;AAGlF,KAAK,WAAW,GAAG;IACf,OAAO,EAAE,IAAI,CACX,4BAA4B,EAC5B,gBAAgB,GAAG,mBAAmB,GAAG,aAAa,GAAG,UAAU,CACpE,CAAA;IACD,SAAS,EAAE,SAAS,CAAA;IACpB,QAAQ,EAAE,iBAAiB,GAAG,SAAS,CAAA;IACvC,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,eAAe,EAAE,qBAAqB,CAAA;IACtC,cAAc,EAAE,YAAY,GAAG,IAAI,CAAA;IACnC,WAAW,EAAE,kBAAkB,CAAA;CAChC,CAAC;AAoGJ,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Auth.vue.js","names":[],"sources":["../../../../src/components/Content/Auth/Auth.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { AuthSelector } from '@scalar/api-client/blocks/scalar-auth-selector-block'\nimport type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference'\nimport type { AuthStore } from '@scalar/workspace-store/entities/auth'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport {\n getSecurityRequirements,\n getSelectedSecurity,\n type MergedSecuritySchemes,\n} from '@scalar/workspace-store/request-example'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport { isOpenApiDocument } from '@scalar/workspace-store/schemas/type-guards'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport type { WorkspaceDocument } from '@scalar/workspace-store/schemas/workspace'\nimport { computed } from 'vue'\n\nconst { document, environment, eventBus, options, securitySchemes, authStore } =\n defineProps<{\n options: Pick<\n ApiReferenceConfigurationRaw,\n 'authentication' | 'persistAuth' | 'proxyUrl'\n >\n authStore: AuthStore\n document: WorkspaceDocument | undefined\n eventBus: WorkspaceEventBus\n securitySchemes: MergedSecuritySchemes\n selectedServer: ServerObject | null\n environment: XScalarEnvironment\n }>()\n\n/** Compute what the security requirements should be for the document */\nconst securityRequirements = computed(() =>\n getSecurityRequirements(\n isOpenApiDocument(document) ? document.security : undefined,\n ),\n)\n\n/** Grab the selected security for the document from the auth store */\nconst documentSelectedSecurity = computed(() =>\n authStore.getAuthSelectedSchemas({\n type: 'document',\n documentName: isOpenApiDocument(document)\n ? (document['x-scalar-navigation']?.name ?? '')\n : '',\n }),\n)\n\n/** The selected security keys for the document */\nconst selectedSecurity = computed(() =>\n getSelectedSecurity(\n documentSelectedSecurity.value,\n undefined,\n securityRequirements.value,\n securitySchemes,\n options.authentication?.preferredSecurityScheme,\n ),\n)\n</script>\n<template>\n <AuthSelector\n v-if=\"Object.keys(securitySchemes).length\"\n :createAnySecurityScheme=\"\n options.authentication?.createAnySecurityScheme ?? false\n \"\n :environment\n :eventBus\n isStatic\n layout=\"reference\"\n :meta=\"{ type: 'document' }\"\n :persistAuth=\"options.persistAuth\"\n :proxyUrl=\"options.proxyUrl ?? ''\"\n :securityRequirements\n :securitySchemes\n :selectedSecurity\n :server=\"selectedServer\"\n title=\"Authentication\" />\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"Auth.vue.js","names":[],"sources":["../../../../src/components/Content/Auth/Auth.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { AuthSelector } from '@scalar/api-client/blocks/scalar-auth-selector-block'\nimport type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference'\nimport type { AuthStore } from '@scalar/workspace-store/entities/auth'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport {\n getSecurityRequirements,\n getSelectedSecurity,\n type MergedSecuritySchemes,\n} from '@scalar/workspace-store/request-example'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport { isOpenApiDocument } from '@scalar/workspace-store/schemas/type-guards'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport type { WorkspaceDocument } from '@scalar/workspace-store/schemas/workspace'\nimport { computed } from 'vue'\n\nconst { document, environment, eventBus, options, securitySchemes, authStore } =\n defineProps<{\n options: Pick<\n ApiReferenceConfigurationRaw,\n 'authentication' | 'oauth2RedirectUri' | 'persistAuth' | 'proxyUrl'\n >\n authStore: AuthStore\n document: WorkspaceDocument | undefined\n eventBus: WorkspaceEventBus\n securitySchemes: MergedSecuritySchemes\n selectedServer: ServerObject | null\n environment: XScalarEnvironment\n }>()\n\n/** Compute what the security requirements should be for the document */\nconst securityRequirements = computed(() =>\n getSecurityRequirements(\n isOpenApiDocument(document) ? document.security : undefined,\n ),\n)\n\n/** Grab the selected security for the document from the auth store */\nconst documentSelectedSecurity = computed(() =>\n authStore.getAuthSelectedSchemas({\n type: 'document',\n documentName: isOpenApiDocument(document)\n ? (document['x-scalar-navigation']?.name ?? '')\n : '',\n }),\n)\n\n/** The selected security keys for the document */\nconst selectedSecurity = computed(() =>\n getSelectedSecurity(\n documentSelectedSecurity.value,\n undefined,\n securityRequirements.value,\n securitySchemes,\n options.authentication?.preferredSecurityScheme,\n ),\n)\n</script>\n<template>\n <AuthSelector\n v-if=\"Object.keys(securitySchemes).length\"\n :createAnySecurityScheme=\"\n options.authentication?.createAnySecurityScheme ?? false\n \"\n :environment\n :eventBus\n isStatic\n layout=\"reference\"\n :meta=\"{ type: 'document' }\"\n :options=\"{ oauth2RedirectUri: options.oauth2RedirectUri }\"\n :persistAuth=\"options.persistAuth\"\n :proxyUrl=\"options.proxyUrl ?? ''\"\n :securityRequirements\n :securitySchemes\n :selectedSecurity\n :server=\"selectedServer\"\n title=\"Authentication\" />\n</template>\n"],"mappings":""}
@@ -33,6 +33,7 @@ var Auth_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCom
33
33
  isStatic: "",
34
34
  layout: "reference",
35
35
  meta: { type: "document" },
36
+ options: { oauth2RedirectUri: __props.options.oauth2RedirectUri },
36
37
  persistAuth: __props.options.persistAuth,
37
38
  proxyUrl: __props.options.proxyUrl ?? "",
38
39
  securityRequirements: securityRequirements.value,
@@ -44,6 +45,7 @@ var Auth_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCom
44
45
  "createAnySecurityScheme",
45
46
  "environment",
46
47
  "eventBus",
48
+ "options",
47
49
  "persistAuth",
48
50
  "proxyUrl",
49
51
  "securityRequirements",
@@ -1 +1 @@
1
- {"version":3,"file":"Auth.vue.script.js","names":[],"sources":["../../../../src/components/Content/Auth/Auth.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { AuthSelector } from '@scalar/api-client/blocks/scalar-auth-selector-block'\nimport type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference'\nimport type { AuthStore } from '@scalar/workspace-store/entities/auth'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport {\n getSecurityRequirements,\n getSelectedSecurity,\n type MergedSecuritySchemes,\n} from '@scalar/workspace-store/request-example'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport { isOpenApiDocument } from '@scalar/workspace-store/schemas/type-guards'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport type { WorkspaceDocument } from '@scalar/workspace-store/schemas/workspace'\nimport { computed } from 'vue'\n\nconst { document, environment, eventBus, options, securitySchemes, authStore } =\n defineProps<{\n options: Pick<\n ApiReferenceConfigurationRaw,\n 'authentication' | 'persistAuth' | 'proxyUrl'\n >\n authStore: AuthStore\n document: WorkspaceDocument | undefined\n eventBus: WorkspaceEventBus\n securitySchemes: MergedSecuritySchemes\n selectedServer: ServerObject | null\n environment: XScalarEnvironment\n }>()\n\n/** Compute what the security requirements should be for the document */\nconst securityRequirements = computed(() =>\n getSecurityRequirements(\n isOpenApiDocument(document) ? document.security : undefined,\n ),\n)\n\n/** Grab the selected security for the document from the auth store */\nconst documentSelectedSecurity = computed(() =>\n authStore.getAuthSelectedSchemas({\n type: 'document',\n documentName: isOpenApiDocument(document)\n ? (document['x-scalar-navigation']?.name ?? '')\n : '',\n }),\n)\n\n/** The selected security keys for the document */\nconst selectedSecurity = computed(() =>\n getSelectedSecurity(\n documentSelectedSecurity.value,\n undefined,\n securityRequirements.value,\n securitySchemes,\n options.authentication?.preferredSecurityScheme,\n ),\n)\n</script>\n<template>\n <AuthSelector\n v-if=\"Object.keys(securitySchemes).length\"\n :createAnySecurityScheme=\"\n options.authentication?.createAnySecurityScheme ?? false\n \"\n :environment\n :eventBus\n isStatic\n layout=\"reference\"\n :meta=\"{ type: 'document' }\"\n :persistAuth=\"options.persistAuth\"\n :proxyUrl=\"options.proxyUrl ?? ''\"\n :securityRequirements\n :securitySchemes\n :selectedSecurity\n :server=\"selectedServer\"\n title=\"Authentication\" />\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;EA+BA,MAAM,uBAAuB,eAC3B,wBACE,kBAAkB,QAAA,SAAS,GAAG,QAAA,SAAS,WAAW,KAAA,EACnD,CACH;;EAGA,MAAM,2BAA2B,eAC/B,QAAA,UAAU,uBAAuB;GAC/B,MAAM;GACN,cAAc,kBAAkB,QAAA,SAAQ,GACnC,QAAA,SAAS,wBAAwB,QAAQ,KAC1C;GACL,CAAC,CACJ;;EAGA,MAAM,mBAAmB,eACvB,oBACE,yBAAyB,OACzB,KAAA,GACA,qBAAqB,OACrB,QAAA,iBACA,QAAA,QAAQ,gBAAgB,wBACzB,CACH;;UAIU,OAAO,KAAK,QAAA,gBAAe,CAAE,UAAA,WAAA,EADrC,YAgB2B,MAAA,aAAA,EAAA;;IAdxB,yBAAgC,QAAA,QAAQ,gBAAgB,2BAAuB;IAG/E,aAAA,QAAA;IACA,UAAA,QAAA;IACD,UAAA;IACA,QAAO;IACN,MAAM,EAAA,MAAA,YAAoB;IAC1B,aAAa,QAAA,QAAQ;IACrB,UAAU,QAAA,QAAQ,YAAQ;IAC1B,sBAAA,qBAAA;IACA,iBAAA,QAAA;IACA,kBAAA,iBAAA;IACA,QAAQ,QAAA;IACT,OAAM"}
1
+ {"version":3,"file":"Auth.vue.script.js","names":[],"sources":["../../../../src/components/Content/Auth/Auth.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { AuthSelector } from '@scalar/api-client/blocks/scalar-auth-selector-block'\nimport type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference'\nimport type { AuthStore } from '@scalar/workspace-store/entities/auth'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport {\n getSecurityRequirements,\n getSelectedSecurity,\n type MergedSecuritySchemes,\n} from '@scalar/workspace-store/request-example'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport { isOpenApiDocument } from '@scalar/workspace-store/schemas/type-guards'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport type { WorkspaceDocument } from '@scalar/workspace-store/schemas/workspace'\nimport { computed } from 'vue'\n\nconst { document, environment, eventBus, options, securitySchemes, authStore } =\n defineProps<{\n options: Pick<\n ApiReferenceConfigurationRaw,\n 'authentication' | 'oauth2RedirectUri' | 'persistAuth' | 'proxyUrl'\n >\n authStore: AuthStore\n document: WorkspaceDocument | undefined\n eventBus: WorkspaceEventBus\n securitySchemes: MergedSecuritySchemes\n selectedServer: ServerObject | null\n environment: XScalarEnvironment\n }>()\n\n/** Compute what the security requirements should be for the document */\nconst securityRequirements = computed(() =>\n getSecurityRequirements(\n isOpenApiDocument(document) ? document.security : undefined,\n ),\n)\n\n/** Grab the selected security for the document from the auth store */\nconst documentSelectedSecurity = computed(() =>\n authStore.getAuthSelectedSchemas({\n type: 'document',\n documentName: isOpenApiDocument(document)\n ? (document['x-scalar-navigation']?.name ?? '')\n : '',\n }),\n)\n\n/** The selected security keys for the document */\nconst selectedSecurity = computed(() =>\n getSelectedSecurity(\n documentSelectedSecurity.value,\n undefined,\n securityRequirements.value,\n securitySchemes,\n options.authentication?.preferredSecurityScheme,\n ),\n)\n</script>\n<template>\n <AuthSelector\n v-if=\"Object.keys(securitySchemes).length\"\n :createAnySecurityScheme=\"\n options.authentication?.createAnySecurityScheme ?? false\n \"\n :environment\n :eventBus\n isStatic\n layout=\"reference\"\n :meta=\"{ type: 'document' }\"\n :options=\"{ oauth2RedirectUri: options.oauth2RedirectUri }\"\n :persistAuth=\"options.persistAuth\"\n :proxyUrl=\"options.proxyUrl ?? ''\"\n :securityRequirements\n :securitySchemes\n :selectedSecurity\n :server=\"selectedServer\"\n title=\"Authentication\" />\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;EA+BA,MAAM,uBAAuB,eAC3B,wBACE,kBAAkB,QAAA,SAAS,GAAG,QAAA,SAAS,WAAW,KAAA,EACnD,CACH;;EAGA,MAAM,2BAA2B,eAC/B,QAAA,UAAU,uBAAuB;GAC/B,MAAM;GACN,cAAc,kBAAkB,QAAA,SAAQ,GACnC,QAAA,SAAS,wBAAwB,QAAQ,KAC1C;GACL,CAAC,CACJ;;EAGA,MAAM,mBAAmB,eACvB,oBACE,yBAAyB,OACzB,KAAA,GACA,qBAAqB,OACrB,QAAA,iBACA,QAAA,QAAQ,gBAAgB,wBACzB,CACH;;UAIU,OAAO,KAAK,QAAA,gBAAe,CAAE,UAAA,WAAA,EADrC,YAiB2B,MAAA,aAAA,EAAA;;IAfxB,yBAAgC,QAAA,QAAQ,gBAAgB,2BAAuB;IAG/E,aAAA,QAAA;IACA,UAAA,QAAA;IACD,UAAA;IACA,QAAO;IACN,MAAM,EAAA,MAAA,YAAoB;IAC1B,SAAO,EAAA,mBAAuB,QAAA,QAAQ,mBAAiB;IACvD,aAAa,QAAA,QAAQ;IACrB,UAAU,QAAA,QAAQ,YAAQ;IAC1B,sBAAA,qBAAA;IACA,iBAAA,QAAA;IACA,kBAAA,iBAAA;IACA,QAAQ,QAAA;IACT,OAAM"}
@@ -8,7 +8,7 @@ import type { Workspace, WorkspaceDocument } from '@scalar/workspace-store/schem
8
8
  type __VLS_Props = {
9
9
  infoSectionId: string;
10
10
  /** The subset of the configuration object required for the content component */
11
- options: Pick<ApiReferenceConfigurationRaw, 'authentication' | 'baseServerURL' | 'documentDownloadType' | 'expandAllResponses' | 'hiddenClients' | 'hideTestRequestButton' | 'layout' | 'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy' | 'persistAuth' | 'proxyUrl' | 'servers' | 'showOperationId' | 'hideModels'>;
11
+ options: Pick<ApiReferenceConfigurationRaw, 'authentication' | 'baseServerURL' | 'documentDownloadType' | 'expandAllResponses' | 'hiddenClients' | 'hideTestRequestButton' | 'layout' | 'oauth2RedirectUri' | 'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy' | 'expandAllSchemaProperties' | 'persistAuth' | 'proxyUrl' | 'servers' | 'showOperationId' | 'hideModels' | 'modelsSectionLabel'>;
12
12
  document: WorkspaceDocument | undefined;
13
13
  clientDocument: WorkspaceDocument | undefined;
14
14
  authStore: AuthStore;
@@ -20,11 +20,11 @@ type __VLS_Props = {
20
20
  /** Heading id generator for Markdown headings */
21
21
  headingSlugGenerator: (heading: Heading) => string;
22
22
  };
23
- declare var __VLS_6: {}, __VLS_76: {};
23
+ declare var __VLS_6: {}, __VLS_109: {};
24
24
  type __VLS_Slots = {} & {
25
25
  start?: (props: typeof __VLS_6) => any;
26
26
  } & {
27
- end?: (props: typeof __VLS_76) => any;
27
+ end?: (props: typeof __VLS_109) => any;
28
28
  };
29
29
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
30
30
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -1 +1 @@
1
- {"version":3,"file":"Content.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Content/Content.vue"],"names":[],"mappings":"AA6PA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAA;AAC/E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAA;AACtE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAMvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,cAAc,IAAI,kBAAkB,EAAE,MAAM,4CAA4C,CAAA;AAMtG,OAAO,KAAK,EACV,SAAS,EACT,iBAAiB,EAClB,MAAM,2CAA2C,CAAA;AAiBlD,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,MAAM,CAAA;IACrB,gFAAgF;IAChF,OAAO,EAAE,IAAI,CACX,4BAA4B,EAC1B,gBAAgB,GAChB,eAAe,GACf,sBAAsB,GACtB,oBAAoB,GACpB,eAAe,GACf,uBAAuB,GACvB,QAAQ,GACR,8BAA8B,GAC9B,yBAAyB,GACzB,aAAa,GACb,UAAU,GACV,SAAS,GACT,iBAAiB,GACjB,YAAY,CACf,CAAA;IACD,QAAQ,EAAE,iBAAiB,GAAG,SAAS,CAAA;IACvC,cAAc,EAAE,iBAAiB,GAAG,SAAS,CAAA;IAC7C,SAAS,EAAE,SAAS,CAAA;IACpB,oBAAoB,EAAE,SAAS,CAAC,yBAAyB,CAAC,CAAA;IAC1D,KAAK,EAAE,kBAAkB,EAAE,CAAA;IAC3B,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACtC,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,WAAW,EAAE,kBAAkB,CAAA;IAC/B,iDAAiD;IACjD,oBAAoB,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,MAAM,CAAA;CACnD,CAAC;AAkXF,QAAA,IAAI,OAAO,IAAU,EAAE,QAAQ,IAAY,CAAE;AAC7C,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAC1C;IAAE,GAAG,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAG5C,QAAA,MAAM,UAAU,kSAEd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"Content.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Content/Content.vue"],"names":[],"mappings":"AAyUA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAA;AAC/E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAKnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAA;AACtE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAMvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,cAAc,IAAI,kBAAkB,EAAE,MAAM,4CAA4C,CAAA;AAMtG,OAAO,KAAK,EACV,SAAS,EACT,iBAAiB,EAClB,MAAM,2CAA2C,CAAA;AAuBlD,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,MAAM,CAAA;IACrB,gFAAgF;IAChF,OAAO,EAAE,IAAI,CACX,4BAA4B,EAC1B,gBAAgB,GAChB,eAAe,GACf,sBAAsB,GACtB,oBAAoB,GACpB,eAAe,GACf,uBAAuB,GACvB,QAAQ,GACR,mBAAmB,GACnB,8BAA8B,GAC9B,yBAAyB,GACzB,2BAA2B,GAC3B,aAAa,GACb,UAAU,GACV,SAAS,GACT,iBAAiB,GACjB,YAAY,GACZ,oBAAoB,CACvB,CAAA;IACD,QAAQ,EAAE,iBAAiB,GAAG,SAAS,CAAA;IACvC,cAAc,EAAE,iBAAiB,GAAG,SAAS,CAAA;IAC7C,SAAS,EAAE,SAAS,CAAA;IACpB,oBAAoB,EAAE,SAAS,CAAC,yBAAyB,CAAC,CAAA;IAC1D,KAAK,EAAE,kBAAkB,EAAE,CAAA;IAC3B,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACtC,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,WAAW,EAAE,kBAAkB,CAAA;IAC/B,iDAAiD;IACjD,oBAAoB,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,MAAM,CAAA;CACnD,CAAC;AA6fF,QAAA,IAAI,OAAO,IAAU,EAAE,SAAS,IAAa,CAAE;AAC/C,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAC1C;IAAE,GAAG,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,SAAS,KAAK,GAAG,CAAA;CAAE,CAAC;AAG7C,QAAA,MAAM,UAAU,kSAEd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Content.vue.js","names":[],"sources":["../../../src/components/Content/Content.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { generateClientOptions } from '@scalar/api-client/blocks/operation-code-sample'\nimport { mapHiddenClientsConfig } from '@scalar/api-client/modal'\nimport { ScalarErrorBoundary } from '@scalar/components/error-boundary'\nimport type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference'\nimport type { Heading } from '@scalar/types/legacy'\nimport type { AuthStore } from '@scalar/workspace-store/entities/auth'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport {\n getSelectedServer,\n getServers,\n mergeSecurity,\n} from '@scalar/workspace-store/request-example'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport type { TraversedEntry as TraversedEntryType } from '@scalar/workspace-store/schemas/navigation'\nimport {\n getDocumentType,\n isAsyncApiDocument,\n isOpenApiDocument,\n} from '@scalar/workspace-store/schemas/type-guards'\nimport type {\n Workspace,\n WorkspaceDocument,\n} from '@scalar/workspace-store/schemas/workspace'\nimport { computed, onMounted } from 'vue'\n\nimport { ClientSelector } from '@/blocks/scalar-client-selector-block'\nimport { InfoBlock } from '@/blocks/scalar-info-block'\nimport { IntroductionCardItem } from '@/blocks/scalar-info-block/'\nimport { ServerSelector } from '@/blocks/scalar-server-selector-block'\nimport { Auth } from '@/components/Content/Auth'\nimport TraversedEntry from '@/components/Content/Operations/TraversedEntry.vue'\nimport { RenderPlugins } from '@/components/RenderPlugins'\nimport { SectionFlare } from '@/components/SectionFlare'\nimport { getXKeysFromObject } from '@/features/specification-extension'\nimport {\n firstLazyLoadComplete,\n scheduleInitialLoadComplete,\n} from '@/helpers/lazy-bus'\n\nconst {\n document,\n clientDocument,\n items,\n environment,\n eventBus,\n options,\n authStore,\n} = defineProps<{\n infoSectionId: string\n /** The subset of the configuration object required for the content component */\n options: Pick<\n ApiReferenceConfigurationRaw,\n | 'authentication'\n | 'baseServerURL'\n | 'documentDownloadType'\n | 'expandAllResponses'\n | 'hiddenClients'\n | 'hideTestRequestButton'\n | 'layout'\n | 'orderRequiredPropertiesFirst'\n | 'orderSchemaPropertiesBy'\n | 'persistAuth'\n | 'proxyUrl'\n | 'servers'\n | 'showOperationId'\n | 'hideModels'\n >\n document: WorkspaceDocument | undefined\n clientDocument: WorkspaceDocument | undefined\n authStore: AuthStore\n xScalarDefaultClient: Workspace['x-scalar-default-client']\n items: TraversedEntryType[]\n expandedItems: Record<string, boolean>\n eventBus: WorkspaceEventBus\n environment: XScalarEnvironment\n /** Heading id generator for Markdown headings */\n headingSlugGenerator: (heading: Heading) => string\n}>()\n\n/** Generate all client options so that it can be shared between the top client picker and the operations */\nconst clientOptions = computed(() =>\n generateClientOptions(mapHiddenClientsConfig(options.hiddenClients)),\n)\n\n/**\n * Narrow the (possibly AsyncAPI) documents to OpenAPI documents. api-reference\n * is OpenAPI-native, so AsyncAPI fields surface as undefined/empty.\n */\nconst openApiDocument = computed(() =>\n isOpenApiDocument(document) ? document : undefined,\n)\nconst openApiClientDocument = computed(() =>\n isOpenApiDocument(clientDocument) ? clientDocument : undefined,\n)\n\nconst documentType = computed(() => getDocumentType(document))\n\nconst specificationVersion = computed(() => {\n if (isAsyncApiDocument(document)) {\n return document['x-original-aas-version'] ?? document.asyncapi\n }\n return openApiDocument.value?.['x-original-oas-version']\n})\n\n/** Computed property to get all OpenAPI extension fields from the root document object */\nconst documentExtensions = computed(() => getXKeysFromObject(document))\n\n/** Computed property to get all OpenAPI extension fields from the document's info object */\nconst infoExtensions = computed(() => getXKeysFromObject(document?.info))\n\n/** Compute the servers for the document */\nconst servers = computed(() =>\n getServers(options?.servers ?? openApiClientDocument.value?.servers, {\n baseServerUrl: options?.baseServerURL,\n documentUrl: clientDocument?.['x-scalar-original-source-url'],\n }),\n)\n\n/** Compute the selected server for the document only (for now) */\nconst selectedServer = computed(() =>\n getSelectedServer(\n openApiClientDocument.value ?? null,\n null,\n null,\n servers.value,\n ),\n)\n\n/** Merge authentication config with the document security schemes */\nconst securitySchemes = computed(() =>\n mergeSecurity(\n openApiClientDocument.value?.components?.securitySchemes,\n options.authentication?.securitySchemes,\n authStore,\n openApiClientDocument.value?.['x-scalar-navigation']?.name ?? '',\n ),\n)\n\n/** Ensures firstLazyLoadComplete is set for documents with no Lazy sections (e.g. no operations/tags/models). */\nonMounted(() => {\n scheduleInitialLoadComplete()\n})\n</script>\n<template>\n <SectionFlare />\n\n <div class=\"narrow-references-container\">\n <slot name=\"start\" />\n\n <!-- Introduction -->\n\n <InfoBlock\n :id=\"infoSectionId\"\n :documentDownloadType=\"options.documentDownloadType\"\n :documentExtensions\n :documentType\n :documentUrl=\"document?.['x-scalar-original-source-url']\"\n :eventBus\n :externalDocs=\"openApiDocument?.externalDocs\"\n :headingSlugGenerator\n :info=\"document?.info\"\n :infoExtensions\n :layout=\"options.layout\"\n :specificationVersion>\n <template #selectors>\n <!-- Server Selector -->\n <ScalarErrorBoundary>\n <IntroductionCardItem\n v-if=\"servers?.length\"\n class=\"scalar-reference-intro-server scalar-client introduction-card-item text-base leading-normal [--scalar-address-bar-height:0px]\">\n <ServerSelector\n :eventBus\n :selectedServer\n :servers />\n </IntroductionCardItem>\n </ScalarErrorBoundary>\n\n <!-- Auth selector -->\n <ScalarErrorBoundary>\n <IntroductionCardItem\n v-if=\"document && !options.hideTestRequestButton\"\n class=\"scalar-reference-intro-auth scalar-client introduction-card-item leading-normal\">\n <Auth\n :authStore\n :document=\"clientDocument\"\n :environment\n :eventBus\n :options\n :securitySchemes\n :selectedServer />\n </IntroductionCardItem>\n </ScalarErrorBoundary>\n\n <!-- Client selector -->\n <ScalarErrorBoundary>\n <IntroductionCardItem\n v-if=\"clientOptions.length\"\n class=\"introduction-card-item scalar-reference-intro-clients\">\n <ClientSelector\n class=\"introduction-card-item scalar-reference-intro-clients\"\n :clientOptions\n :eventBus\n :selectedClient=\"xScalarDefaultClient\"\n :xScalarSdkInstallation=\"\n openApiDocument?.info?.['x-scalar-sdk-installation']\n \" />\n </IntroductionCardItem>\n </ScalarErrorBoundary>\n </template>\n </InfoBlock>\n\n <!-- Render traversed operations and webhooks -->\n <!-- Use recursive component for cleaner rendering -->\n <TraversedEntry\n v-if=\"items.length && openApiDocument\"\n :authStore\n :clientOptions\n :document=\"openApiDocument\"\n :entries=\"items\"\n :eventBus\n :expandedItems\n :options\n :securitySchemes\n :selectedClient=\"xScalarDefaultClient\"\n :selectedServer>\n </TraversedEntry>\n\n <!-- Render plugins at content.end view -->\n <RenderPlugins\n :options\n viewName=\"content.end\" />\n\n <slot name=\"end\" />\n <!-- Placeholder content to allow the active item to be scrolled to the top while the rest of the content is lazy loaded -->\n <div\n v-if=\"!firstLazyLoadComplete\"\n class=\"h-dvh\"></div>\n </div>\n</template>\n\n<style>\n.narrow-references-container {\n container-name: narrow-references-container;\n container-type: inline-size;\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"Content.vue.js","names":[],"sources":["../../../src/components/Content/Content.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { generateClientOptions } from '@scalar/api-client/blocks/operation-code-sample'\nimport { mapHiddenClientsConfig } from '@scalar/api-client/modal/map-hidden-clients-config'\nimport { ScalarErrorBoundary } from '@scalar/components/error-boundary'\nimport type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference'\nimport type { Heading } from '@scalar/types/legacy'\nimport {\n getAsyncApiServers,\n getSelectedAsyncApiServer,\n} from '@scalar/workspace-store/channel-example'\nimport type { AuthStore } from '@scalar/workspace-store/entities/auth'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport {\n getSelectedServer,\n getServers,\n mergeSecurity,\n} from '@scalar/workspace-store/request-example'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport type { TraversedEntry as TraversedEntryType } from '@scalar/workspace-store/schemas/navigation'\nimport {\n getDocumentType,\n isAsyncApiDocument,\n isOpenApiDocument,\n} from '@scalar/workspace-store/schemas/type-guards'\nimport type {\n Workspace,\n WorkspaceDocument,\n} from '@scalar/workspace-store/schemas/workspace'\nimport { computed, onMounted } from 'vue'\n\nimport { AsyncApiServerSelector } from '@/blocks/scalar-asyncapi-server-selector-block'\nimport { ClientSelector } from '@/blocks/scalar-client-selector-block'\nimport { InfoBlock } from '@/blocks/scalar-info-block'\nimport { IntroductionCardItem } from '@/blocks/scalar-info-block/'\nimport {\n getRenderableSdks,\n SdkInstallationInstructions,\n} from '@/blocks/scalar-sdk-installation-instructions'\nimport { ServerSelector } from '@/blocks/scalar-server-selector-block'\nimport { AsyncApiTraversedEntry } from '@/components/Content/AsyncApi'\nimport { Auth } from '@/components/Content/Auth'\nimport TraversedEntry from '@/components/Content/Operations/TraversedEntry.vue'\nimport { RenderPlugins } from '@/components/RenderPlugins'\nimport { SectionFlare } from '@/components/SectionFlare'\nimport { getXKeysFromObject } from '@/features/specification-extension'\nimport {\n firstLazyLoadComplete,\n scheduleInitialLoadComplete,\n} from '@/helpers/lazy-bus'\n\nconst {\n document,\n clientDocument,\n items,\n environment,\n eventBus,\n options,\n authStore,\n} = defineProps<{\n infoSectionId: string\n /** The subset of the configuration object required for the content component */\n options: Pick<\n ApiReferenceConfigurationRaw,\n | 'authentication'\n | 'baseServerURL'\n | 'documentDownloadType'\n | 'expandAllResponses'\n | 'hiddenClients'\n | 'hideTestRequestButton'\n | 'layout'\n | 'oauth2RedirectUri'\n | 'orderRequiredPropertiesFirst'\n | 'orderSchemaPropertiesBy'\n | 'expandAllSchemaProperties'\n | 'persistAuth'\n | 'proxyUrl'\n | 'servers'\n | 'showOperationId'\n | 'hideModels'\n | 'modelsSectionLabel'\n >\n document: WorkspaceDocument | undefined\n clientDocument: WorkspaceDocument | undefined\n authStore: AuthStore\n xScalarDefaultClient: Workspace['x-scalar-default-client']\n items: TraversedEntryType[]\n expandedItems: Record<string, boolean>\n eventBus: WorkspaceEventBus\n environment: XScalarEnvironment\n /** Heading id generator for Markdown headings */\n headingSlugGenerator: (heading: Heading) => string\n}>()\n\n/** Generate all client options so that it can be shared between the top client picker and the operations */\nconst clientOptions = computed(() =>\n generateClientOptions(mapHiddenClientsConfig(options.hiddenClients)),\n)\n\n/**\n * Custom SDK installation instructions that actually have something to render.\n * Entries with only a `lang` are ignored so we can fall back to the client\n * selector instead of showing an empty card.\n */\nconst sdkInstallation = computed(() =>\n getRenderableSdks(openApiDocument.value?.info?.['x-scalar-sdk-installation']),\n)\n\n/**\n * Narrow the (possibly AsyncAPI) documents to OpenAPI documents. api-reference\n * is OpenAPI-native, so AsyncAPI fields surface as undefined/empty.\n */\nconst openApiDocument = computed(() =>\n isOpenApiDocument(document) ? document : undefined,\n)\nconst openApiClientDocument = computed(() =>\n isOpenApiDocument(clientDocument) ? clientDocument : undefined,\n)\n\n/** AsyncAPI narrow, used to render the (currently channel-only) AsyncAPI content tree. */\nconst asyncApiDocument = computed(() =>\n isAsyncApiDocument(document) ? document : undefined,\n)\n\n/** AsyncAPI narrow of the client document, where server selection/variables are persisted. */\nconst asyncApiClientDocument = computed(() =>\n isAsyncApiDocument(clientDocument) ? clientDocument : undefined,\n)\n\nconst documentType = computed(() => getDocumentType(document))\n\nconst specificationVersion = computed(() => {\n if (isAsyncApiDocument(document)) {\n return document['x-original-aas-version'] ?? document.asyncapi\n }\n return openApiDocument.value?.['x-original-oas-version']\n})\n\n/** Computed property to get all OpenAPI extension fields from the root document object */\nconst documentExtensions = computed(() => getXKeysFromObject(document))\n\n/** Computed property to get all OpenAPI extension fields from the document's info object */\nconst infoExtensions = computed(() => getXKeysFromObject(document?.info))\n\n/** Compute the servers for the document */\nconst servers = computed(() =>\n getServers(options?.servers ?? openApiClientDocument.value?.servers, {\n baseServerUrl: options?.baseServerURL,\n documentUrl: clientDocument?.['x-scalar-original-source-url'],\n }),\n)\n\n/** Compute the selected server for the document only (for now) */\nconst selectedServer = computed(() =>\n getSelectedServer(\n openApiClientDocument.value ?? null,\n null,\n null,\n servers.value,\n ),\n)\n\n/**\n * Compute the AsyncAPI servers (all protocols, not just WebSocket) for the\n * document-level server selector.\n */\nconst asyncApiServers = computed(() =>\n asyncApiClientDocument.value\n ? getAsyncApiServers(asyncApiClientDocument.value, { webSocketOnly: false })\n : [],\n)\n\n/** Compute the selected AsyncAPI server for the document */\nconst asyncApiSelectedServer = computed(() =>\n getSelectedAsyncApiServer(\n asyncApiClientDocument.value ?? null,\n asyncApiServers.value,\n ),\n)\n\n/** Merge authentication config with the document security schemes */\nconst securitySchemes = computed(() =>\n mergeSecurity(\n openApiClientDocument.value?.components?.securitySchemes,\n options.authentication?.securitySchemes,\n authStore,\n openApiClientDocument.value?.['x-scalar-navigation']?.name ?? '',\n options.oauth2RedirectUri,\n ),\n)\n\n/** Ensures firstLazyLoadComplete is set for documents with no Lazy sections (e.g. no operations/tags/models). */\nonMounted(() => {\n scheduleInitialLoadComplete()\n})\n</script>\n<template>\n <SectionFlare />\n\n <div class=\"narrow-references-container\">\n <slot name=\"start\" />\n\n <!-- Introduction -->\n\n <InfoBlock\n :id=\"infoSectionId\"\n :documentDownloadType=\"options.documentDownloadType\"\n :documentExtensions\n :documentType\n :documentUrl=\"document?.['x-scalar-original-source-url']\"\n :eventBus\n :externalDocs=\"openApiDocument?.externalDocs\"\n :headingSlugGenerator\n :info=\"document?.info\"\n :infoExtensions\n :layout=\"options.layout\"\n :specificationVersion>\n <template #selectors>\n <!-- Server Selector -->\n <ScalarErrorBoundary>\n <IntroductionCardItem\n v-if=\"servers?.length\"\n class=\"scalar-reference-intro-server scalar-client introduction-card-item text-base leading-normal [--scalar-address-bar-height:0px]\">\n <ServerSelector\n :eventBus\n :selectedServer\n :servers />\n </IntroductionCardItem>\n </ScalarErrorBoundary>\n\n <!-- AsyncAPI Server Selector -->\n <ScalarErrorBoundary>\n <IntroductionCardItem\n v-if=\"asyncApiServers.length\"\n class=\"scalar-reference-intro-server scalar-client introduction-card-item text-base leading-normal [--scalar-address-bar-height:0px]\">\n <AsyncApiServerSelector\n :eventBus\n :selectedServer=\"asyncApiSelectedServer\"\n :servers=\"asyncApiServers\" />\n </IntroductionCardItem>\n </ScalarErrorBoundary>\n\n <!-- Auth selector -->\n <ScalarErrorBoundary>\n <IntroductionCardItem\n v-if=\"document && !options.hideTestRequestButton\"\n class=\"scalar-reference-intro-auth scalar-client introduction-card-item leading-normal\">\n <Auth\n :authStore\n :document=\"clientDocument\"\n :environment\n :eventBus\n :options\n :securitySchemes\n :selectedServer />\n </IntroductionCardItem>\n </ScalarErrorBoundary>\n\n <!-- Custom SDK installation instructions, or the generic client selector -->\n <ScalarErrorBoundary>\n <IntroductionCardItem\n v-if=\"sdkInstallation.length\"\n class=\"introduction-card-item scalar-reference-intro-clients\">\n <SdkInstallationInstructions\n class=\"introduction-card-item scalar-reference-intro-clients\"\n :xScalarSdkInstallation=\"sdkInstallation\" />\n </IntroductionCardItem>\n <IntroductionCardItem\n v-else-if=\"clientOptions.length && !asyncApiDocument\"\n class=\"introduction-card-item scalar-reference-intro-clients\">\n <ClientSelector\n class=\"introduction-card-item scalar-reference-intro-clients\"\n :clientOptions\n :eventBus\n :selectedClient=\"xScalarDefaultClient\" />\n </IntroductionCardItem>\n </ScalarErrorBoundary>\n </template>\n </InfoBlock>\n\n <!-- Render traversed operations and webhooks -->\n <!-- Use recursive component for cleaner rendering -->\n <TraversedEntry\n v-if=\"items.length && openApiDocument\"\n :authStore\n :clientOptions\n :document=\"openApiDocument\"\n :entries=\"items\"\n :eventBus\n :expandedItems\n :options\n :securitySchemes\n :selectedClient=\"xScalarDefaultClient\"\n :selectedServer>\n </TraversedEntry>\n\n <!-- AsyncAPI: render channels grouped by tag, mirroring the sidebar order. -->\n <AsyncApiTraversedEntry\n v-else-if=\"items.length && asyncApiDocument\"\n :document=\"asyncApiDocument\"\n :entries=\"items\"\n :eventBus\n :expandedItems\n :options />\n\n <!-- Render plugins at content.end view -->\n <RenderPlugins\n :options\n viewName=\"content.end\" />\n\n <slot name=\"end\" />\n <!-- Placeholder content to allow the active item to be scrolled to the top while the rest of the content is lazy loaded -->\n <div\n v-if=\"!firstLazyLoadComplete\"\n class=\"h-dvh\"></div>\n </div>\n</template>\n\n<style>\n.narrow-references-container {\n container-name: narrow-references-container;\n container-type: inline-size;\n}\n</style>\n"],"mappings":""}
@@ -1,23 +1,28 @@
1
+ import AsyncApiServerSelector_default from "../../blocks/scalar-asyncapi-server-selector-block/components/AsyncApiServerSelector.vue.js";
1
2
  import ClientSelector_default from "../../blocks/scalar-client-selector-block/components/ClientSelector.vue.js";
2
3
  import { getXKeysFromObject } from "../../features/specification-extension/helpers.js";
3
4
  import InfoBlock_default from "../../blocks/scalar-info-block/components/InfoBlock.vue.js";
4
5
  import IntroductionCardItem_default from "../../blocks/scalar-info-block/components/IntroductionCardItem.vue.js";
6
+ import { getRenderableSdks } from "../../blocks/scalar-sdk-installation-instructions/helpers/renderable-sdks.js";
7
+ import SdkInstallationInstructions_default from "../../blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.js";
5
8
  import ServerSelector_default from "../../blocks/scalar-server-selector-block/components/ServerSelector.vue.js";
6
- import Auth_default from "./Auth/Auth.vue.js";
7
9
  import { firstLazyLoadComplete, scheduleInitialLoadComplete } from "../../helpers/lazy-bus.js";
10
+ import AsyncApiTraversedEntry_default from "./AsyncApi/AsyncApiTraversedEntry.vue.js";
11
+ import Auth_default from "./Auth/Auth.vue.js";
8
12
  import TraversedEntry_default from "./Operations/TraversedEntry.vue.js";
9
13
  import RenderPlugins_default from "../RenderPlugins/RenderPlugins.vue.js";
10
14
  import SectionFlare_default from "../SectionFlare/SectionFlare.vue.js";
11
15
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, onMounted, openBlock, renderSlot, unref, withCtx } from "vue";
12
- import { mapHiddenClientsConfig } from "@scalar/api-client/modal";
16
+ import { getAsyncApiServers, getSelectedAsyncApiServer } from "@scalar/workspace-store/channel-example";
13
17
  import { getSelectedServer, getServers, mergeSecurity } from "@scalar/workspace-store/request-example";
14
18
  import { getDocumentType, isAsyncApiDocument, isOpenApiDocument } from "@scalar/workspace-store/schemas/type-guards";
15
19
  import { generateClientOptions } from "@scalar/api-client/blocks/operation-code-sample";
20
+ import { mapHiddenClientsConfig } from "@scalar/api-client/modal/map-hidden-clients-config";
16
21
  import { ScalarErrorBoundary } from "@scalar/components/error-boundary";
17
22
  //#region src/components/Content/Content.vue?vue&type=script&setup=true&lang.ts
18
23
  var _hoisted_1 = { class: "narrow-references-container" };
19
24
  var _hoisted_2 = {
20
- key: 1,
25
+ key: 2,
21
26
  class: "h-dvh"
22
27
  };
23
28
  var Content_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
@@ -39,11 +44,21 @@ var Content_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ define
39
44
  /** Generate all client options so that it can be shared between the top client picker and the operations */
40
45
  const clientOptions = computed(() => generateClientOptions(mapHiddenClientsConfig(__props.options.hiddenClients)));
41
46
  /**
47
+ * Custom SDK installation instructions that actually have something to render.
48
+ * Entries with only a `lang` are ignored so we can fall back to the client
49
+ * selector instead of showing an empty card.
50
+ */
51
+ const sdkInstallation = computed(() => getRenderableSdks(openApiDocument.value?.info?.["x-scalar-sdk-installation"]));
52
+ /**
42
53
  * Narrow the (possibly AsyncAPI) documents to OpenAPI documents. api-reference
43
54
  * is OpenAPI-native, so AsyncAPI fields surface as undefined/empty.
44
55
  */
45
56
  const openApiDocument = computed(() => isOpenApiDocument(__props.document) ? __props.document : void 0);
46
57
  const openApiClientDocument = computed(() => isOpenApiDocument(__props.clientDocument) ? __props.clientDocument : void 0);
58
+ /** AsyncAPI narrow, used to render the (currently channel-only) AsyncAPI content tree. */
59
+ const asyncApiDocument = computed(() => isAsyncApiDocument(__props.document) ? __props.document : void 0);
60
+ /** AsyncAPI narrow of the client document, where server selection/variables are persisted. */
61
+ const asyncApiClientDocument = computed(() => isAsyncApiDocument(__props.clientDocument) ? __props.clientDocument : void 0);
47
62
  const documentType = computed(() => getDocumentType(__props.document));
48
63
  const specificationVersion = computed(() => {
49
64
  if (isAsyncApiDocument(__props.document)) return __props.document["x-original-aas-version"] ?? __props.document.asyncapi;
@@ -60,8 +75,15 @@ var Content_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ define
60
75
  }));
61
76
  /** Compute the selected server for the document only (for now) */
62
77
  const selectedServer = computed(() => getSelectedServer(openApiClientDocument.value ?? null, null, null, servers.value));
78
+ /**
79
+ * Compute the AsyncAPI servers (all protocols, not just WebSocket) for the
80
+ * document-level server selector.
81
+ */
82
+ const asyncApiServers = computed(() => asyncApiClientDocument.value ? getAsyncApiServers(asyncApiClientDocument.value, { webSocketOnly: false }) : []);
83
+ /** Compute the selected AsyncAPI server for the document */
84
+ const asyncApiSelectedServer = computed(() => getSelectedAsyncApiServer(asyncApiClientDocument.value ?? null, asyncApiServers.value));
63
85
  /** Merge authentication config with the document security schemes */
64
- const securitySchemes = computed(() => mergeSecurity(openApiClientDocument.value?.components?.securitySchemes, __props.options.authentication?.securitySchemes, __props.authStore, openApiClientDocument.value?.["x-scalar-navigation"]?.name ?? ""));
86
+ const securitySchemes = computed(() => mergeSecurity(openApiClientDocument.value?.components?.securitySchemes, __props.options.authentication?.securitySchemes, __props.authStore, openApiClientDocument.value?.["x-scalar-navigation"]?.name ?? "", __props.options.oauth2RedirectUri));
65
87
  /** Ensures firstLazyLoadComplete is set for documents with no Lazy sections (e.g. no operations/tags/models). */
66
88
  onMounted(() => {
67
89
  scheduleInitialLoadComplete();
@@ -102,6 +124,24 @@ var Content_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ define
102
124
  })) : createCommentVNode("", true)]),
103
125
  _: 1
104
126
  }),
127
+ createVNode(unref(ScalarErrorBoundary), null, {
128
+ default: withCtx(() => [asyncApiServers.value.length ? (openBlock(), createBlock(unref(IntroductionCardItem_default), {
129
+ key: 0,
130
+ class: "scalar-reference-intro-server scalar-client introduction-card-item text-base leading-normal [--scalar-address-bar-height:0px]"
131
+ }, {
132
+ default: withCtx(() => [createVNode(unref(AsyncApiServerSelector_default), {
133
+ eventBus: __props.eventBus,
134
+ selectedServer: asyncApiSelectedServer.value,
135
+ servers: asyncApiServers.value
136
+ }, null, 8, [
137
+ "eventBus",
138
+ "selectedServer",
139
+ "servers"
140
+ ])]),
141
+ _: 1
142
+ })) : createCommentVNode("", true)]),
143
+ _: 1
144
+ }),
105
145
  createVNode(unref(ScalarErrorBoundary), null, {
106
146
  default: withCtx(() => [__props.document && !__props.options.hideTestRequestButton ? (openBlock(), createBlock(unref(IntroductionCardItem_default), {
107
147
  key: 0,
@@ -129,21 +169,28 @@ var Content_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ define
129
169
  _: 1
130
170
  }),
131
171
  createVNode(unref(ScalarErrorBoundary), null, {
132
- default: withCtx(() => [clientOptions.value.length ? (openBlock(), createBlock(unref(IntroductionCardItem_default), {
172
+ default: withCtx(() => [sdkInstallation.value.length ? (openBlock(), createBlock(unref(IntroductionCardItem_default), {
133
173
  key: 0,
134
174
  class: "introduction-card-item scalar-reference-intro-clients"
175
+ }, {
176
+ default: withCtx(() => [createVNode(unref(SdkInstallationInstructions_default), {
177
+ class: "introduction-card-item scalar-reference-intro-clients",
178
+ xScalarSdkInstallation: sdkInstallation.value
179
+ }, null, 8, ["xScalarSdkInstallation"])]),
180
+ _: 1
181
+ })) : clientOptions.value.length && !asyncApiDocument.value ? (openBlock(), createBlock(unref(IntroductionCardItem_default), {
182
+ key: 1,
183
+ class: "introduction-card-item scalar-reference-intro-clients"
135
184
  }, {
136
185
  default: withCtx(() => [createVNode(unref(ClientSelector_default), {
137
186
  class: "introduction-card-item scalar-reference-intro-clients",
138
187
  clientOptions: clientOptions.value,
139
188
  eventBus: __props.eventBus,
140
- selectedClient: __props.xScalarDefaultClient,
141
- xScalarSdkInstallation: openApiDocument.value?.info?.["x-scalar-sdk-installation"]
189
+ selectedClient: __props.xScalarDefaultClient
142
190
  }, null, 8, [
143
191
  "clientOptions",
144
192
  "eventBus",
145
- "selectedClient",
146
- "xScalarSdkInstallation"
193
+ "selectedClient"
147
194
  ])]),
148
195
  _: 1
149
196
  })) : createCommentVNode("", true)]),
@@ -188,6 +235,19 @@ var Content_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ define
188
235
  "securitySchemes",
189
236
  "selectedClient",
190
237
  "selectedServer"
238
+ ])) : __props.items.length && asyncApiDocument.value ? (openBlock(), createBlock(unref(AsyncApiTraversedEntry_default), {
239
+ key: 1,
240
+ document: asyncApiDocument.value,
241
+ entries: __props.items,
242
+ eventBus: __props.eventBus,
243
+ expandedItems: __props.expandedItems,
244
+ options: __props.options
245
+ }, null, 8, [
246
+ "document",
247
+ "entries",
248
+ "eventBus",
249
+ "expandedItems",
250
+ "options"
191
251
  ])) : createCommentVNode("", true),
192
252
  createVNode(unref(RenderPlugins_default), {
193
253
  options: __props.options,