@scalar/api-reference 1.60.0 → 1.62.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 (555) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/dist/blocks/scalar-asyncapi-server-selector-block/components/AsyncApiServerSelector.vue.d.ts.map +1 -1
  3. package/dist/blocks/scalar-asyncapi-server-selector-block/components/AsyncApiServerSelector.vue.js.map +1 -1
  4. package/dist/blocks/scalar-asyncapi-server-selector-block/components/AsyncApiServerSelector.vue.script.js +8 -5
  5. package/dist/blocks/scalar-asyncapi-server-selector-block/components/AsyncApiServerSelector.vue.script.js.map +1 -1
  6. package/dist/blocks/scalar-asyncapi-server-selector-block/components/Selector.vue.d.ts.map +1 -1
  7. package/dist/blocks/scalar-asyncapi-server-selector-block/components/Selector.vue.js.map +1 -1
  8. package/dist/blocks/scalar-asyncapi-server-selector-block/components/Selector.vue.script.js +11 -7
  9. package/dist/blocks/scalar-asyncapi-server-selector-block/components/Selector.vue.script.js.map +1 -1
  10. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/AsyncApiSidebarFilters.vue.d.ts +36 -0
  11. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/AsyncApiSidebarFilters.vue.d.ts.map +1 -0
  12. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/AsyncApiSidebarFilters.vue.js +7 -0
  13. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/AsyncApiSidebarFilters.vue.js.map +1 -0
  14. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/AsyncApiSidebarFilters.vue.script.js +69 -0
  15. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/AsyncApiSidebarFilters.vue.script.js.map +1 -0
  16. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/SidebarFilter.vue.d.ts +28 -0
  17. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/SidebarFilter.vue.d.ts.map +1 -0
  18. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/SidebarFilter.vue.js +7 -0
  19. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/SidebarFilter.vue.js.map +1 -0
  20. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/SidebarFilter.vue.script.js +62 -0
  21. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/SidebarFilter.vue.script.js.map +1 -0
  22. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/helpers/filter-async-api-navigation.d.ts +18 -0
  23. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/helpers/filter-async-api-navigation.d.ts.map +1 -0
  24. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/helpers/filter-async-api-navigation.js +59 -0
  25. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/helpers/filter-async-api-navigation.js.map +1 -0
  26. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/index.d.ts +3 -0
  27. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/index.d.ts.map +1 -0
  28. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts +1 -1
  29. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts.map +1 -1
  30. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js +1 -1
  31. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js.map +1 -1
  32. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.script.js +6 -3
  33. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.script.js.map +1 -1
  34. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.d.ts +2 -2
  35. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.d.ts.map +1 -1
  36. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.js +1 -1
  37. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.js.map +1 -1
  38. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.script.js +4 -2
  39. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.script.js.map +1 -1
  40. package/dist/blocks/scalar-client-selector-block/helpers/featured-clients.d.ts +1 -1
  41. package/dist/blocks/scalar-client-selector-block/helpers/featured-clients.d.ts.map +1 -1
  42. package/dist/blocks/scalar-client-selector-block/helpers/featured-clients.js.map +1 -1
  43. package/dist/blocks/scalar-info-block/components/DownloadLink.vue.d.ts.map +1 -1
  44. package/dist/blocks/scalar-info-block/components/DownloadLink.vue.js +1 -1
  45. package/dist/blocks/scalar-info-block/components/DownloadLink.vue.js.map +1 -1
  46. package/dist/blocks/scalar-info-block/components/DownloadLink.vue.script.js +3 -1
  47. package/dist/blocks/scalar-info-block/components/DownloadLink.vue.script.js.map +1 -1
  48. package/dist/blocks/scalar-info-block/components/InfoLinks.vue.d.ts.map +1 -1
  49. package/dist/blocks/scalar-info-block/components/InfoLinks.vue.js.map +1 -1
  50. package/dist/blocks/scalar-info-block/components/InfoLinks.vue.script.js +17 -3
  51. package/dist/blocks/scalar-info-block/components/InfoLinks.vue.script.js.map +1 -1
  52. package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.d.ts.map +1 -1
  53. package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.js +1 -1
  54. package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.js.map +1 -1
  55. package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.script.js +4 -2
  56. package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.script.js.map +1 -1
  57. package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.d.ts.map +1 -1
  58. package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.js +1 -1
  59. package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.js.map +1 -1
  60. package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.script.js +16 -12
  61. package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.script.js.map +1 -1
  62. package/dist/blocks/scalar-server-selector-block/components/Selector.vue.d.ts.map +1 -1
  63. package/dist/blocks/scalar-server-selector-block/components/Selector.vue.js.map +1 -1
  64. package/dist/blocks/scalar-server-selector-block/components/Selector.vue.script.js +11 -7
  65. package/dist/blocks/scalar-server-selector-block/components/Selector.vue.script.js.map +1 -1
  66. package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.d.ts.map +1 -1
  67. package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.js.map +1 -1
  68. package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.script.js +7 -4
  69. package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.script.js.map +1 -1
  70. package/dist/browser/chunks/AgentScalarChatInterface-C3QiXv0S.js +27 -0
  71. package/dist/browser/chunks/ScalarTextInput.vue-CysYmeeN.js +27 -0
  72. package/dist/browser/chunks/basic-shape-diamond.svg-BTEOT1FL.js +1 -1
  73. package/dist/browser/chunks/basic-shape-hexagon.svg-BSPzaCgF.js +1 -1
  74. package/dist/browser/chunks/basic-shape-primary-circle-ellipse-round.svg-DKmZ8UUU.js +1 -1
  75. package/dist/browser/chunks/basic-shape-primary-square-rectangle.svg-n2YRykHD.js +1 -1
  76. package/dist/browser/chunks/basic-shape-shield.svg-Bec9cJDA.js +1 -1
  77. package/dist/browser/chunks/browser-67K6wmG9.js +1 -1
  78. package/dist/browser/chunks/computer-device-desktop-monitor.svg-m6j893Hb.js +1 -1
  79. package/dist/browser/chunks/computer-device-desktop.svg-Dk1VVO7k.js +1 -1
  80. package/dist/browser/chunks/computer-device-laptop.svg-BNGVUCYS.js +1 -1
  81. package/dist/browser/chunks/computer-device-mobile-phone-android-samsung-back.svg-CC4UUTFw.js +1 -1
  82. package/dist/browser/chunks/computer-device-mobile-phone-android-samsung.svg-D8ExpMpL.js +1 -1
  83. package/dist/browser/chunks/computer-device-mobile-phone-iphone-x-back.svg-CLm7sgMM.js +1 -1
  84. package/dist/browser/chunks/computer-device-mobile-phone-iphone-x.svg-Xrttg6_7.js +1 -1
  85. package/dist/browser/chunks/computer-device-mobile-tablet-touch.svg-DQ2oTvOG.js +1 -1
  86. package/dist/browser/chunks/computer-device-mobile-tablet.svg-DCr0XlRc.js +1 -1
  87. package/dist/browser/chunks/computer-device-network-ethernet-cat6.svg-AK9l0iOl.js +1 -1
  88. package/dist/browser/chunks/computer-device-network-lan-www.svg-gUIdFBlE.js +1 -1
  89. package/dist/browser/chunks/computer-device-network-wifi-connection.svg-Be-EMm4e.js +1 -1
  90. package/dist/browser/chunks/computer-device-network-wifi-router.svg-Dc2VzyqK.js +1 -1
  91. package/dist/browser/chunks/ecology-science-erlenmeyer-flask.svg-DHgy7Jfd.js +1 -1
  92. package/dist/browser/chunks/image-flash-lightning.svg-EETR_y1q.js +1 -1
  93. package/dist/browser/chunks/image-picture-flower.svg-DN1AYzJU.js +1 -1
  94. package/dist/browser/chunks/interface-alert-exclamation-diamond.svg-C5NozMV_.js +1 -1
  95. package/dist/browser/chunks/interface-alert-exclamation-triangle-warning.svg-DaAg2fF5.js +1 -1
  96. package/dist/browser/chunks/interface-alert-information-circle.svg-ckkkt9Mv.js +1 -1
  97. package/dist/browser/chunks/interface-award-crown.svg-pjvn9hY-.js +1 -1
  98. package/dist/browser/chunks/interface-bookmark-tag.svg-r2r-lQq4.js +1 -1
  99. package/dist/browser/chunks/interface-bookmark.svg-BK9HKQBT.js +1 -1
  100. package/dist/browser/chunks/interface-calendar-date-one.svg-DNnF0M1I.js +1 -1
  101. package/dist/browser/chunks/interface-content-book-open-pages.svg-CQj_w9Vp.js +1 -1
  102. package/dist/browser/chunks/interface-content-book-page.svg-DppoeJRe.js +1 -1
  103. package/dist/browser/chunks/interface-content-file.svg-CvcD7OiY.js +1 -1
  104. package/dist/browser/chunks/interface-content-folder.svg-BmtS5I9A.js +1 -1
  105. package/dist/browser/chunks/interface-copy-clipboard.svg-Be6EI50X.js +1 -1
  106. package/dist/browser/chunks/interface-edit-attachment.svg-G5TKzpWX.js +1 -1
  107. package/dist/browser/chunks/interface-edit-binocular.svg-jzL-DvGB.js +1 -1
  108. package/dist/browser/chunks/interface-edit-magic-wand.svg-BOTlymvp.js +1 -1
  109. package/dist/browser/chunks/interface-edit-tool-paint-roller.svg-s9dwryx7.js +1 -1
  110. package/dist/browser/chunks/interface-edit-tool-pencil.svg-C7v0dbB3.js +1 -1
  111. package/dist/browser/chunks/interface-favorite-award.svg-CYHUgUG0.js +1 -1
  112. package/dist/browser/chunks/interface-favorite-flag.svg-C10zlKOb.js +1 -1
  113. package/dist/browser/chunks/interface-favorite-heart.svg-eoduXxlz.js +1 -1
  114. package/dist/browser/chunks/interface-favorite-star.svg-BSmxJetr.js +1 -1
  115. package/dist/browser/chunks/interface-favorite-stars-sparkles.svg-JTFLj3Ls.js +1 -1
  116. package/dist/browser/chunks/interface-hierarchy-flowchart.svg-Cg_Wy0kN.js +1 -1
  117. package/dist/browser/chunks/interface-home-house.svg-DytoGRnv.js +1 -1
  118. package/dist/browser/chunks/interface-hyperlink.svg-CuEfmmQI.js +1 -1
  119. package/dist/browser/chunks/interface-lighting-brightness.svg-DSK0h_Pa.js +1 -1
  120. package/dist/browser/chunks/interface-lock-closed.svg-Cn6TaLYv.js +1 -1
  121. package/dist/browser/chunks/interface-lock-open-unlock.svg-CVkG5-9W.js +1 -1
  122. package/dist/browser/chunks/interface-login-key.svg-y-cwwXjN.js +1 -1
  123. package/dist/browser/chunks/interface-search.svg-S-puVFJB.js +1 -1
  124. package/dist/browser/chunks/interface-setting-cog.svg-CTH4_lLg.js +1 -1
  125. package/dist/browser/chunks/interface-share-megaphone-bullhorn.svg-Pbp39MyC.js +1 -1
  126. package/dist/browser/chunks/interface-share-rocket.svg-BgCsIRZO.js +1 -1
  127. package/dist/browser/chunks/interface-share-satellite.svg-DAMN9d5G.js +1 -1
  128. package/dist/browser/chunks/interface-share-space-ship.svg-Dt-Mejxk.js +1 -1
  129. package/dist/browser/chunks/interface-share.svg-vFYTXSti.js +1 -1
  130. package/dist/browser/chunks/interface-signal-square.svg-DNG4LpAe.js +1 -1
  131. package/dist/browser/chunks/interface-time-clock-circle.svg-Bpz-nLxo.js +1 -1
  132. package/dist/browser/chunks/interface-time-hour-glass.svg-D7agfKsH.js +1 -1
  133. package/dist/browser/chunks/interface-users-multiple.svg-CkPJBBnG.js +1 -1
  134. package/dist/browser/chunks/interface-weather-moon.svg-CaTZFMPO.js +1 -1
  135. package/dist/browser/chunks/mail-chat-bubble-square.svg-DC8RIihp.js +1 -1
  136. package/dist/browser/chunks/mail-send-email-paper-airplane.svg-D8OLs9jz.js +1 -1
  137. package/dist/browser/chunks/mail-send-envelope.svg-CV33h5Sx.js +1 -1
  138. package/dist/browser/chunks/{modal-LBDjZSmM.js → modal-CMytT4BZ.js} +2 -2
  139. package/dist/browser/chunks/modal-wI0tG53V.js +99 -0
  140. package/dist/browser/chunks/money-cashier-receipt.svg-CJL8C2gs.js +1 -1
  141. package/dist/browser/chunks/money-currency-dollar-pay.svg-VdBplCTx.js +1 -1
  142. package/dist/browser/chunks/money-graph-arrow-increase.svg-DcRov3zk.js +1 -1
  143. package/dist/browser/chunks/money-graph-bar-chart-increase.svg-Cc7KxjX-.js +1 -1
  144. package/dist/browser/chunks/nature-ecology-leaf.svg-DR3cTZxt.js +1 -1
  145. package/dist/browser/chunks/phone-telephone.svg-DyY0gUlk.js +1 -1
  146. package/dist/browser/chunks/programming-bug.svg-BHLT-Qhp.js +1 -1
  147. package/dist/browser/chunks/programming-cloud.svg-B6YW33ba.js +1 -1
  148. package/dist/browser/chunks/programming-computer-database-server.svg-B6o5Sdn-.js +1 -1
  149. package/dist/browser/chunks/programming-computer-database.svg-Cl7OVtpJ.js +1 -1
  150. package/dist/browser/chunks/programming-module-four-layout.svg-BQrerL1x.js +1 -1
  151. package/dist/browser/chunks/programming-module-three.svg-B2KTQzBM.js +1 -1
  152. package/dist/browser/chunks/programming-module.svg-CiID7kPm.js +1 -1
  153. package/dist/browser/chunks/programming-script-code.svg-D1M5rtkN.js +1 -1
  154. package/dist/browser/chunks/runtime-core.esm-bundler-Byrbbu5Q.js +1 -1
  155. package/dist/browser/chunks/shopping-cart.svg-BEegiIR9.js +1 -1
  156. package/dist/browser/chunks/shopping-gift-present.svg-BUHwuLix.js +1 -1
  157. package/dist/browser/chunks/shopping-shipping-box-parcel-package.svg-D6fxWdYx.js +1 -1
  158. package/dist/browser/chunks/tag-new-circle.svg-jsg1bGs0.js +1 -1
  159. package/dist/browser/chunks/travel-map-earth-globe.svg-ClbMiU-f.js +1 -1
  160. package/dist/browser/chunks/vendor-BPQqqkn-.js +306 -0
  161. package/dist/browser/standalone.esm.js +20 -20
  162. package/dist/browser/standalone.js +294 -294
  163. package/dist/components/AgentScalar/AgentScalarButton.vue.d.ts.map +1 -1
  164. package/dist/components/AgentScalar/AgentScalarButton.vue.js.map +1 -1
  165. package/dist/components/AgentScalar/AgentScalarButton.vue.script.js +4 -2
  166. package/dist/components/AgentScalar/AgentScalarButton.vue.script.js.map +1 -1
  167. package/dist/components/AgentScalar/AgentScalarDrawer.vue.d.ts.map +1 -1
  168. package/dist/components/AgentScalar/AgentScalarDrawer.vue.js +1 -1
  169. package/dist/components/AgentScalar/AgentScalarDrawer.vue.js.map +1 -1
  170. package/dist/components/AgentScalar/AgentScalarDrawer.vue.script.js +4 -2
  171. package/dist/components/AgentScalar/AgentScalarDrawer.vue.script.js.map +1 -1
  172. package/dist/components/AgentScalar/OpenMCPButton.vue.d.ts.map +1 -1
  173. package/dist/components/AgentScalar/OpenMCPButton.vue.js +1 -1
  174. package/dist/components/AgentScalar/OpenMCPButton.vue.js.map +1 -1
  175. package/dist/components/AgentScalar/OpenMCPButton.vue.script.js +8 -6
  176. package/dist/components/AgentScalar/OpenMCPButton.vue.script.js.map +1 -1
  177. package/dist/components/Anchor/Anchor.vue.d.ts.map +1 -1
  178. package/dist/components/Anchor/Anchor.vue.js.map +1 -1
  179. package/dist/components/Anchor/Anchor.vue.script.js +5 -3
  180. package/dist/components/Anchor/Anchor.vue.script.js.map +1 -1
  181. package/dist/components/Anchor/WithBreadcrumb.vue.d.ts +1 -3
  182. package/dist/components/Anchor/WithBreadcrumb.vue.d.ts.map +1 -1
  183. package/dist/components/Anchor/WithBreadcrumb.vue.js.map +1 -1
  184. package/dist/components/Anchor/WithBreadcrumb.vue.script.js +6 -2
  185. package/dist/components/Anchor/WithBreadcrumb.vue.script.js.map +1 -1
  186. package/dist/components/ApiReference.vue.d.ts.map +1 -1
  187. package/dist/components/ApiReference.vue.js +1 -1
  188. package/dist/components/ApiReference.vue.js.map +1 -1
  189. package/dist/components/ApiReference.vue.script.js +181 -46
  190. package/dist/components/ApiReference.vue.script.js.map +1 -1
  191. package/dist/components/Content/AsyncApi/AsyncApiLabels.vue.d.ts +10 -0
  192. package/dist/components/Content/AsyncApi/AsyncApiLabels.vue.d.ts.map +1 -0
  193. package/dist/components/Content/AsyncApi/AsyncApiLabels.vue.js +9 -0
  194. package/dist/components/Content/AsyncApi/AsyncApiLabels.vue.js.map +1 -0
  195. package/dist/components/Content/AsyncApi/AsyncApiLabels.vue.script.js +47 -0
  196. package/dist/components/Content/AsyncApi/AsyncApiLabels.vue.script.js.map +1 -0
  197. package/dist/components/Content/AsyncApi/AsyncApiTraversedEntry.vue.d.ts.map +1 -1
  198. package/dist/components/Content/AsyncApi/AsyncApiTraversedEntry.vue.js.map +1 -1
  199. package/dist/components/Content/AsyncApi/AsyncApiTraversedEntry.vue.script.js +2 -0
  200. package/dist/components/Content/AsyncApi/AsyncApiTraversedEntry.vue.script.js.map +1 -1
  201. package/dist/components/Content/AsyncApi/Channel.vue.d.ts +4 -1
  202. package/dist/components/Content/AsyncApi/Channel.vue.d.ts.map +1 -1
  203. package/dist/components/Content/AsyncApi/Channel.vue.js +1 -1
  204. package/dist/components/Content/AsyncApi/Channel.vue.js.map +1 -1
  205. package/dist/components/Content/AsyncApi/Channel.vue.script.js +98 -44
  206. package/dist/components/Content/AsyncApi/Channel.vue.script.js.map +1 -1
  207. package/dist/components/Content/AsyncApi/Message.vue.d.ts +18 -0
  208. package/dist/components/Content/AsyncApi/Message.vue.d.ts.map +1 -0
  209. package/dist/components/Content/AsyncApi/Message.vue.js +9 -0
  210. package/dist/components/Content/AsyncApi/Message.vue.js.map +1 -0
  211. package/dist/components/Content/AsyncApi/Message.vue.script.js +159 -0
  212. package/dist/components/Content/AsyncApi/Message.vue.script.js.map +1 -0
  213. package/dist/components/Content/AsyncApi/Operation.vue.d.ts +18 -0
  214. package/dist/components/Content/AsyncApi/Operation.vue.d.ts.map +1 -0
  215. package/dist/components/Content/AsyncApi/Operation.vue.js +9 -0
  216. package/dist/components/Content/AsyncApi/Operation.vue.js.map +1 -0
  217. package/dist/components/Content/AsyncApi/Operation.vue.script.js +84 -0
  218. package/dist/components/Content/AsyncApi/Operation.vue.script.js.map +1 -0
  219. package/dist/components/Content/AsyncApi/helpers/async-api-render-options.d.ts +14 -0
  220. package/dist/components/Content/AsyncApi/helpers/async-api-render-options.d.ts.map +1 -0
  221. package/dist/components/Content/AsyncApi/helpers/async-api-render-options.js +14 -0
  222. package/dist/components/Content/AsyncApi/helpers/async-api-render-options.js.map +1 -0
  223. package/dist/components/Content/AsyncApi/helpers/filter-children-by-type.d.ts +9 -0
  224. package/dist/components/Content/AsyncApi/helpers/filter-children-by-type.d.ts.map +1 -0
  225. package/dist/components/Content/AsyncApi/helpers/filter-children-by-type.js +12 -0
  226. package/dist/components/Content/AsyncApi/helpers/filter-children-by-type.js.map +1 -0
  227. package/dist/components/Content/AsyncApi/helpers/get-async-api-labels.d.ts +13 -0
  228. package/dist/components/Content/AsyncApi/helpers/get-async-api-labels.d.ts.map +1 -0
  229. package/dist/components/Content/AsyncApi/helpers/get-async-api-labels.js +23 -0
  230. package/dist/components/Content/AsyncApi/helpers/get-async-api-labels.js.map +1 -0
  231. package/dist/components/Content/AsyncApi/helpers/pick-heading.d.ts +10 -0
  232. package/dist/components/Content/AsyncApi/helpers/pick-heading.d.ts.map +1 -0
  233. package/dist/components/Content/AsyncApi/helpers/pick-heading.js +20 -0
  234. package/dist/components/Content/AsyncApi/helpers/pick-heading.js.map +1 -0
  235. package/dist/components/Content/AsyncApi/helpers/resolve-async-api-nodes.d.ts +21 -0
  236. package/dist/components/Content/AsyncApi/helpers/resolve-async-api-nodes.d.ts.map +1 -0
  237. package/dist/components/Content/AsyncApi/helpers/resolve-async-api-nodes.js +35 -0
  238. package/dist/components/Content/AsyncApi/helpers/resolve-async-api-nodes.js.map +1 -0
  239. package/dist/components/Content/Auth/Auth.vue.d.ts.map +1 -1
  240. package/dist/components/Content/Auth/Auth.vue.js.map +1 -1
  241. package/dist/components/Content/Auth/Auth.vue.script.js +5 -2
  242. package/dist/components/Content/Auth/Auth.vue.script.js.map +1 -1
  243. package/dist/components/Content/Content.vue.d.ts +1 -0
  244. package/dist/components/Content/Content.vue.d.ts.map +1 -1
  245. package/dist/components/Content/Content.vue.js.map +1 -1
  246. package/dist/components/Content/Content.vue.script.js +4 -1
  247. package/dist/components/Content/Content.vue.script.js.map +1 -1
  248. package/dist/components/Content/Operations/TraversedEntry.vue.d.ts +3 -1
  249. package/dist/components/Content/Operations/TraversedEntry.vue.d.ts.map +1 -1
  250. package/dist/components/Content/Operations/TraversedEntry.vue.js.map +1 -1
  251. package/dist/components/Content/Operations/TraversedEntry.vue.script.js +9 -0
  252. package/dist/components/Content/Operations/TraversedEntry.vue.script.js.map +1 -1
  253. package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
  254. package/dist/components/Content/Schema/Schema.vue.js +1 -1
  255. package/dist/components/Content/Schema/Schema.vue.js.map +1 -1
  256. package/dist/components/Content/Schema/Schema.vue.script.js +10 -6
  257. package/dist/components/Content/Schema/Schema.vue.script.js.map +1 -1
  258. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
  259. package/dist/components/Content/Schema/SchemaComposition.vue.js.map +1 -1
  260. package/dist/components/Content/Schema/SchemaComposition.vue.script.js +25 -12
  261. package/dist/components/Content/Schema/SchemaComposition.vue.script.js.map +1 -1
  262. package/dist/components/Content/Schema/SchemaEnums.vue.d.ts.map +1 -1
  263. package/dist/components/Content/Schema/SchemaEnums.vue.js +1 -1
  264. package/dist/components/Content/Schema/SchemaEnums.vue.js.map +1 -1
  265. package/dist/components/Content/Schema/SchemaEnums.vue.script.js +4 -2
  266. package/dist/components/Content/Schema/SchemaEnums.vue.script.js.map +1 -1
  267. package/dist/components/Content/Schema/SchemaHeading.vue.d.ts.map +1 -1
  268. package/dist/components/Content/Schema/SchemaHeading.vue.js +1 -1
  269. package/dist/components/Content/Schema/SchemaHeading.vue.js.map +1 -1
  270. package/dist/components/Content/Schema/SchemaHeading.vue.script.js +6 -4
  271. package/dist/components/Content/Schema/SchemaHeading.vue.script.js.map +1 -1
  272. package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.js.map +1 -1
  273. package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.script.js +1 -1
  274. package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.script.js.map +1 -1
  275. package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts.map +1 -1
  276. package/dist/components/Content/Schema/SchemaObjectProperties.vue.js.map +1 -1
  277. package/dist/components/Content/Schema/SchemaObjectProperties.vue.script.js +12 -0
  278. package/dist/components/Content/Schema/SchemaObjectProperties.vue.script.js.map +1 -1
  279. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +3 -1
  280. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  281. package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
  282. package/dist/components/Content/Schema/SchemaProperty.vue.js.map +1 -1
  283. package/dist/components/Content/Schema/SchemaProperty.vue.script.js +24 -6
  284. package/dist/components/Content/Schema/SchemaProperty.vue.script.js.map +1 -1
  285. package/dist/components/Content/Schema/SchemaPropertyDefault.vue.d.ts.map +1 -1
  286. package/dist/components/Content/Schema/SchemaPropertyDefault.vue.js +1 -1
  287. package/dist/components/Content/Schema/SchemaPropertyDefault.vue.js.map +1 -1
  288. package/dist/components/Content/Schema/SchemaPropertyDefault.vue.script.js +8 -5
  289. package/dist/components/Content/Schema/SchemaPropertyDefault.vue.script.js.map +1 -1
  290. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.d.ts.map +1 -1
  291. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js +1 -1
  292. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js.map +1 -1
  293. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.script.js +5 -3
  294. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.script.js.map +1 -1
  295. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts +3 -1
  296. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
  297. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +1 -1
  298. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js.map +1 -1
  299. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.script.js +47 -22
  300. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.script.js.map +1 -1
  301. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts.map +1 -1
  302. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +10 -9
  303. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js.map +1 -1
  304. package/dist/components/Content/Tags/components/ModernLayout.vue.d.ts.map +1 -1
  305. package/dist/components/Content/Tags/components/ModernLayout.vue.js +1 -1
  306. package/dist/components/Content/Tags/components/ModernLayout.vue.js.map +1 -1
  307. package/dist/components/Content/Tags/components/ModernLayout.vue.script.js +3 -1
  308. package/dist/components/Content/Tags/components/ModernLayout.vue.script.js.map +1 -1
  309. package/dist/components/Content/Tags/components/TagSection.vue.d.ts.map +1 -1
  310. package/dist/components/Content/Tags/components/TagSection.vue.js.map +1 -1
  311. package/dist/components/Content/Tags/components/TagSection.vue.script.js +3 -1
  312. package/dist/components/Content/Tags/components/TagSection.vue.script.js.map +1 -1
  313. package/dist/components/GettingStarted.vue.d.ts.map +1 -1
  314. package/dist/components/GettingStarted.vue.js +1 -1
  315. package/dist/components/GettingStarted.vue.js.map +1 -1
  316. package/dist/components/GettingStarted.vue.script.js +58 -21
  317. package/dist/components/GettingStarted.vue.script.js.map +1 -1
  318. package/dist/components/MobileHeader.vue.d.ts.map +1 -1
  319. package/dist/components/MobileHeader.vue.js.map +1 -1
  320. package/dist/components/MobileHeader.vue.script.js +3 -1
  321. package/dist/components/MobileHeader.vue.script.js.map +1 -1
  322. package/dist/components/OperationsList/OperationsList.vue.d.ts.map +1 -1
  323. package/dist/components/OperationsList/OperationsList.vue.js +1 -1
  324. package/dist/components/OperationsList/OperationsList.vue.js.map +1 -1
  325. package/dist/components/OperationsList/OperationsList.vue.script.js +4 -2
  326. package/dist/components/OperationsList/OperationsList.vue.script.js.map +1 -1
  327. package/dist/components/ShowMoreButton.vue.d.ts.map +1 -1
  328. package/dist/components/ShowMoreButton.vue.js +1 -1
  329. package/dist/components/ShowMoreButton.vue.js.map +1 -1
  330. package/dist/components/ShowMoreButton.vue.script.js +4 -2
  331. package/dist/components/ShowMoreButton.vue.script.js.map +1 -1
  332. package/dist/features/Operation/Operation.vue.d.ts +3 -1
  333. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  334. package/dist/features/Operation/Operation.vue.js.map +1 -1
  335. package/dist/features/Operation/Operation.vue.script.js +6 -1
  336. package/dist/features/Operation/Operation.vue.script.js.map +1 -1
  337. package/dist/features/Operation/components/ContentTypeSelect.vue.d.ts.map +1 -1
  338. package/dist/features/Operation/components/ContentTypeSelect.vue.js.map +1 -1
  339. package/dist/features/Operation/components/ContentTypeSelect.vue.script.js +4 -2
  340. package/dist/features/Operation/components/ContentTypeSelect.vue.script.js.map +1 -1
  341. package/dist/features/Operation/components/Headers.vue.d.ts.map +1 -1
  342. package/dist/features/Operation/components/Headers.vue.js +1 -1
  343. package/dist/features/Operation/components/Headers.vue.js.map +1 -1
  344. package/dist/features/Operation/components/Headers.vue.script.js +8 -6
  345. package/dist/features/Operation/components/Headers.vue.script.js.map +1 -1
  346. package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
  347. package/dist/features/Operation/components/OperationParameters.vue.js.map +1 -1
  348. package/dist/features/Operation/components/OperationParameters.vue.script.js +8 -6
  349. package/dist/features/Operation/components/OperationParameters.vue.script.js.map +1 -1
  350. package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
  351. package/dist/features/Operation/components/OperationResponses.vue.js.map +1 -1
  352. package/dist/features/Operation/components/OperationResponses.vue.script.js +10 -7
  353. package/dist/features/Operation/components/OperationResponses.vue.script.js.map +1 -1
  354. package/dist/features/Operation/components/ParameterListItem.vue.script.js +1 -1
  355. package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
  356. package/dist/features/Operation/components/RequestBody.vue.js +1 -1
  357. package/dist/features/Operation/components/RequestBody.vue.js.map +1 -1
  358. package/dist/features/Operation/components/RequestBody.vue.script.js +18 -13
  359. package/dist/features/Operation/components/RequestBody.vue.script.js.map +1 -1
  360. package/dist/features/Operation/components/SecurityRequirementBadge.vue.d.ts.map +1 -1
  361. package/dist/features/Operation/components/SecurityRequirementBadge.vue.js.map +1 -1
  362. package/dist/features/Operation/components/SecurityRequirementBadge.vue.script.js +5 -3
  363. package/dist/features/Operation/components/SecurityRequirementBadge.vue.script.js.map +1 -1
  364. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -1
  365. package/dist/features/Operation/components/callbacks/Callbacks.vue.js.map +1 -1
  366. package/dist/features/Operation/components/callbacks/Callbacks.vue.script.js +11 -8
  367. package/dist/features/Operation/components/callbacks/Callbacks.vue.script.js.map +1 -1
  368. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  369. package/dist/features/Operation/layouts/ClassicLayout.vue.js +1 -1
  370. package/dist/features/Operation/layouts/ClassicLayout.vue.js.map +1 -1
  371. package/dist/features/Operation/layouts/ClassicLayout.vue.script.js +37 -17
  372. package/dist/features/Operation/layouts/ClassicLayout.vue.script.js.map +1 -1
  373. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  374. package/dist/features/Operation/layouts/ModernLayout.vue.js +1 -1
  375. package/dist/features/Operation/layouts/ModernLayout.vue.js.map +1 -1
  376. package/dist/features/Operation/layouts/ModernLayout.vue.script.js +22 -7
  377. package/dist/features/Operation/layouts/ModernLayout.vue.script.js.map +1 -1
  378. package/dist/features/Search/components/SearchButton.vue.d.ts.map +1 -1
  379. package/dist/features/Search/components/SearchButton.vue.js.map +1 -1
  380. package/dist/features/Search/components/SearchButton.vue.script.js +15 -8
  381. package/dist/features/Search/components/SearchButton.vue.script.js.map +1 -1
  382. package/dist/features/Search/components/SearchModal.vue.d.ts.map +1 -1
  383. package/dist/features/Search/components/SearchModal.vue.js +1 -1
  384. package/dist/features/Search/components/SearchModal.vue.js.map +1 -1
  385. package/dist/features/Search/components/SearchModal.vue.script.js +29 -10
  386. package/dist/features/Search/components/SearchModal.vue.script.js.map +1 -1
  387. package/dist/features/Search/components/SearchResult.vue.d.ts.map +1 -1
  388. package/dist/features/Search/components/SearchResult.vue.js.map +1 -1
  389. package/dist/features/Search/components/SearchResult.vue.script.js +12 -8
  390. package/dist/features/Search/components/SearchResult.vue.script.js.map +1 -1
  391. package/dist/features/Search/helpers/create-search-index.d.ts +8 -0
  392. package/dist/features/Search/helpers/create-search-index.d.ts.map +1 -1
  393. package/dist/features/Search/helpers/create-search-index.js +18 -9
  394. package/dist/features/Search/helpers/create-search-index.js.map +1 -1
  395. package/dist/features/Search/hooks/useSearchIndex.d.ts +7 -1
  396. package/dist/features/Search/hooks/useSearchIndex.d.ts.map +1 -1
  397. package/dist/features/Search/hooks/useSearchIndex.js +11 -2
  398. package/dist/features/Search/hooks/useSearchIndex.js.map +1 -1
  399. package/dist/features/ask-agent-button/AskAgentButton.vue.d.ts.map +1 -1
  400. package/dist/features/ask-agent-button/AskAgentButton.vue.js +1 -1
  401. package/dist/features/ask-agent-button/AskAgentButton.vue.js.map +1 -1
  402. package/dist/features/ask-agent-button/AskAgentButton.vue.script.js +10 -6
  403. package/dist/features/ask-agent-button/AskAgentButton.vue.script.js.map +1 -1
  404. package/dist/features/developer-tools/DeveloperTools.vue.d.ts.map +1 -1
  405. package/dist/features/developer-tools/DeveloperTools.vue.js.map +1 -1
  406. package/dist/features/developer-tools/DeveloperTools.vue.script.js +10 -8
  407. package/dist/features/developer-tools/DeveloperTools.vue.script.js.map +1 -1
  408. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.d.ts.map +1 -1
  409. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.js.map +1 -1
  410. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.script.js +11 -11
  411. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.script.js.map +1 -1
  412. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.d.ts.map +1 -1
  413. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.js.map +1 -1
  414. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.script.js +15 -11
  415. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.script.js.map +1 -1
  416. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.script.js +1 -1
  417. package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.d.ts +1 -3
  418. package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.d.ts.map +1 -1
  419. package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.js.map +1 -1
  420. package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.script.js +4 -6
  421. package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.script.js.map +1 -1
  422. package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.d.ts.map +1 -1
  423. package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.js.map +1 -1
  424. package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.script.js +6 -4
  425. package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.script.js.map +1 -1
  426. package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.d.ts.map +1 -1
  427. package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.js.map +1 -1
  428. package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.script.js +23 -22
  429. package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.script.js.map +1 -1
  430. package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.d.ts.map +1 -1
  431. package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.js.map +1 -1
  432. package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.script.js +7 -5
  433. package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.script.js.map +1 -1
  434. package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.d.ts.map +1 -1
  435. package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.js.map +1 -1
  436. package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.script.js +9 -7
  437. package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.script.js.map +1 -1
  438. package/dist/features/developer-tools/components/DeployApiReference.vue.d.ts.map +1 -1
  439. package/dist/features/developer-tools/components/DeployApiReference.vue.js.map +1 -1
  440. package/dist/features/developer-tools/components/DeployApiReference.vue.script.js +7 -4
  441. package/dist/features/developer-tools/components/DeployApiReference.vue.script.js.map +1 -1
  442. package/dist/features/developer-tools/components/ModifyConfiguration.vue.d.ts.map +1 -1
  443. package/dist/features/developer-tools/components/ModifyConfiguration.vue.js.map +1 -1
  444. package/dist/features/developer-tools/components/ModifyConfiguration.vue.script.js +8 -6
  445. package/dist/features/developer-tools/components/ModifyConfiguration.vue.script.js.map +1 -1
  446. package/dist/features/developer-tools/components/ShareApiReference.vue.d.ts.map +1 -1
  447. package/dist/features/developer-tools/components/ShareApiReference.vue.js.map +1 -1
  448. package/dist/features/developer-tools/components/ShareApiReference.vue.script.js +7 -4
  449. package/dist/features/developer-tools/components/ShareApiReference.vue.script.js.map +1 -1
  450. package/dist/features/example-responses/ExampleResponse.vue.d.ts.map +1 -1
  451. package/dist/features/example-responses/ExampleResponse.vue.js +1 -1
  452. package/dist/features/example-responses/ExampleResponse.vue.js.map +1 -1
  453. package/dist/features/example-responses/ExampleResponse.vue.script.js +5 -3
  454. package/dist/features/example-responses/ExampleResponse.vue.script.js.map +1 -1
  455. package/dist/features/example-responses/ExampleResponses.vue.d.ts +9 -0
  456. package/dist/features/example-responses/ExampleResponses.vue.d.ts.map +1 -1
  457. package/dist/features/example-responses/ExampleResponses.vue.js +1 -1
  458. package/dist/features/example-responses/ExampleResponses.vue.js.map +1 -1
  459. package/dist/features/example-responses/ExampleResponses.vue.script.js +42 -23
  460. package/dist/features/example-responses/ExampleResponses.vue.script.js.map +1 -1
  461. package/dist/features/example-responses/ExampleSchema.vue.js.map +1 -1
  462. package/dist/features/example-responses/ExampleSchema.vue.script.js +1 -1
  463. package/dist/features/example-responses/ExampleSchema.vue.script.js.map +1 -1
  464. package/dist/features/info-object/Contact.vue.d.ts.map +1 -1
  465. package/dist/features/info-object/Contact.vue.js.map +1 -1
  466. package/dist/features/info-object/Contact.vue.script.js +14 -11
  467. package/dist/features/info-object/Contact.vue.script.js.map +1 -1
  468. package/dist/features/info-object/InfoLink.vue.d.ts +8 -0
  469. package/dist/features/info-object/InfoLink.vue.d.ts.map +1 -0
  470. package/dist/features/info-object/InfoLink.vue.js +7 -0
  471. package/dist/features/info-object/InfoLink.vue.js.map +1 -0
  472. package/dist/features/info-object/InfoLink.vue.script.js +30 -0
  473. package/dist/features/info-object/InfoLink.vue.script.js.map +1 -0
  474. package/dist/features/info-object/TermsOfService.vue.d.ts.map +1 -1
  475. package/dist/features/info-object/TermsOfService.vue.js.map +1 -1
  476. package/dist/features/info-object/TermsOfService.vue.script.js +9 -6
  477. package/dist/features/info-object/TermsOfService.vue.script.js.map +1 -1
  478. package/dist/features/info-object/index.d.ts +1 -0
  479. package/dist/features/info-object/index.d.ts.map +1 -1
  480. package/dist/features/localization/index.d.ts +2 -0
  481. package/dist/features/localization/index.d.ts.map +1 -0
  482. package/dist/features/localization/locales/ar.d.ts +227 -0
  483. package/dist/features/localization/locales/ar.d.ts.map +1 -0
  484. package/dist/features/localization/locales/ar.js +225 -0
  485. package/dist/features/localization/locales/ar.js.map +1 -0
  486. package/dist/features/localization/locales/de.d.ts +227 -0
  487. package/dist/features/localization/locales/de.d.ts.map +1 -0
  488. package/dist/features/localization/locales/de.js +225 -0
  489. package/dist/features/localization/locales/de.js.map +1 -0
  490. package/dist/features/localization/locales/en.d.ts +227 -0
  491. package/dist/features/localization/locales/en.d.ts.map +1 -0
  492. package/dist/features/localization/locales/en.js +225 -0
  493. package/dist/features/localization/locales/en.js.map +1 -0
  494. package/dist/features/localization/locales/es.d.ts +227 -0
  495. package/dist/features/localization/locales/es.d.ts.map +1 -0
  496. package/dist/features/localization/locales/es.js +225 -0
  497. package/dist/features/localization/locales/es.js.map +1 -0
  498. package/dist/features/localization/locales/fr.d.ts +227 -0
  499. package/dist/features/localization/locales/fr.d.ts.map +1 -0
  500. package/dist/features/localization/locales/fr.js +225 -0
  501. package/dist/features/localization/locales/fr.js.map +1 -0
  502. package/dist/features/localization/locales/ru.d.ts +227 -0
  503. package/dist/features/localization/locales/ru.d.ts.map +1 -0
  504. package/dist/features/localization/locales/ru.js +225 -0
  505. package/dist/features/localization/locales/ru.js.map +1 -0
  506. package/dist/features/localization/locales/zh-cn.d.ts +227 -0
  507. package/dist/features/localization/locales/zh-cn.d.ts.map +1 -0
  508. package/dist/features/localization/locales/zh-cn.js +225 -0
  509. package/dist/features/localization/locales/zh-cn.js.map +1 -0
  510. package/dist/features/localization/translations.d.ts +1588 -0
  511. package/dist/features/localization/translations.d.ts.map +1 -0
  512. package/dist/features/localization/translations.js +27 -0
  513. package/dist/features/localization/translations.js.map +1 -0
  514. package/dist/features/localization/use-localization.d.ts +18 -0
  515. package/dist/features/localization/use-localization.d.ts.map +1 -0
  516. package/dist/features/localization/use-localization.js +58 -0
  517. package/dist/features/localization/use-localization.js.map +1 -0
  518. package/dist/features/multiple-documents/DocumentSelector.vue.script.js +1 -1
  519. package/dist/features/test-request-button/TestRequestButton.vue.d.ts.map +1 -1
  520. package/dist/features/test-request-button/TestRequestButton.vue.js +1 -1
  521. package/dist/features/test-request-button/TestRequestButton.vue.js.map +1 -1
  522. package/dist/features/test-request-button/TestRequestButton.vue.script.js +3 -1
  523. package/dist/features/test-request-button/TestRequestButton.vue.script.js.map +1 -1
  524. package/dist/helpers/get-async-api-message-payload-schema.d.ts +18 -0
  525. package/dist/helpers/get-async-api-message-payload-schema.d.ts.map +1 -0
  526. package/dist/helpers/get-async-api-message-payload-schema.js +33 -0
  527. package/dist/helpers/get-async-api-message-payload-schema.js.map +1 -0
  528. package/dist/helpers/get-async-api-model-schema.d.ts.map +1 -1
  529. package/dist/helpers/get-async-api-model-schema.js +2 -11
  530. package/dist/helpers/get-async-api-model-schema.js.map +1 -1
  531. package/dist/helpers/is-introduction-entry.d.ts +16 -0
  532. package/dist/helpers/is-introduction-entry.d.ts.map +1 -0
  533. package/dist/helpers/is-introduction-entry.js +17 -0
  534. package/dist/helpers/is-introduction-entry.js.map +1 -0
  535. package/dist/helpers/load-from-perssistance.js +1 -1
  536. package/dist/helpers/load-from-perssistance.js.map +1 -1
  537. package/dist/helpers/map-config-plugins.d.ts +8 -3
  538. package/dist/helpers/map-config-plugins.d.ts.map +1 -1
  539. package/dist/helpers/map-config-plugins.js +22 -4
  540. package/dist/helpers/map-config-plugins.js.map +1 -1
  541. package/dist/helpers/map-config-to-workspace-store.js +1 -1
  542. package/dist/helpers/map-config-to-workspace-store.js.map +1 -1
  543. package/dist/helpers/storage.d.ts +14 -14
  544. package/dist/style.css +783 -666
  545. package/dist/styles/tailwind.config.css +1 -0
  546. package/dist/vue-styles.css +700 -597
  547. package/package.json +18 -17
  548. package/dist/browser/chunks/AgentScalarChatInterface-CesFQ_Ax.js +0 -27
  549. package/dist/browser/chunks/ScalarTextInput.vue-C14zmVNI.js +0 -27
  550. package/dist/browser/chunks/modal-BZzcBkVp.js +0 -99
  551. package/dist/browser/chunks/vendor-wW8jg8wN.js +0 -306
  552. package/dist/features/Operation/helpers/get-first-server.d.ts +0 -9
  553. package/dist/features/Operation/helpers/get-first-server.d.ts.map +0 -1
  554. package/dist/features/Operation/helpers/get-first-server.js +0 -27
  555. package/dist/features/Operation/helpers/get-first-server.js.map +0 -1
@@ -1,8 +1,9 @@
1
+ import { useLocalization } from "../../localization/use-localization.js";
1
2
  import ApiReferenceToolbarPopover_default from "./ApiReferenceToolbarPopover.vue.js";
2
3
  import ApiReferenceToolbarConfigLayout_default from "./ApiReferenceToolbarConfigLayout.vue.js";
3
4
  import ApiReferenceToolbarConfigLayoutOptions_default from "./ApiReferenceToolbarConfigLayoutOptions.vue.js";
4
5
  import ApiReferenceToolbarConfigTheme_default from "./ApiReferenceToolbarConfigTheme.vue.js";
5
- import { computed, createBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeModels, openBlock, unref, useModel, withCtx } from "vue";
6
+ import { computed, createBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeModels, openBlock, toDisplayString, unref, useModel, withCtx } from "vue";
6
7
  import { ScalarCodeBlock } from "@scalar/components/code-block";
7
8
  import { prettyPrintJson } from "@scalar/helpers/json/pretty-print-json";
8
9
  import { ScalarFormField, ScalarFormSection } from "@scalar/components/form";
@@ -17,6 +18,7 @@ var ModifyConfiguration_vue_vue_type_script_setup_true_lang_default = /* @__PURE
17
18
  emits: ["update:overrides"],
18
19
  setup(__props) {
19
20
  const overrides = useModel(__props, "overrides");
21
+ const { translate } = useLocalization();
20
22
  const snippet = computed(() => {
21
23
  return prettyPrintJson({
22
24
  ...overrides.value,
@@ -40,9 +42,9 @@ var ModifyConfiguration_vue_vue_type_script_setup_true_lang_default = /* @__PURE
40
42
  });
41
43
  return (_ctx, _cache) => {
42
44
  return openBlock(), createBlock(ApiReferenceToolbarPopover_default, { class: "w-120" }, {
43
- label: withCtx(() => [..._cache[3] || (_cache[3] = [createTextVNode("Configure", -1)])]),
45
+ label: withCtx(() => [createTextVNode(toDisplayString(unref(translate)("developerTools.configure")), 1)]),
44
46
  default: withCtx(() => [createVNode(unref(ScalarFormSection), null, {
45
- label: withCtx(() => [..._cache[4] || (_cache[4] = [createTextVNode("Scalar Configuration", -1)])]),
47
+ label: withCtx(() => [createTextVNode(toDisplayString(unref(translate)("developerTools.scalarConfiguration")), 1)]),
46
48
  default: withCtx(() => [createVNode(unref(ScalarCodeBlock), {
47
49
  class: "bg-b-1.5 flex max-h-40 flex-col rounded border text-sm",
48
50
  content: snippet.value,
@@ -51,7 +53,7 @@ var ModifyConfiguration_vue_vue_type_script_setup_true_lang_default = /* @__PURE
51
53
  _: 1
52
54
  }), createElementVNode("div", _hoisted_1, [
53
55
  createVNode(unref(ScalarFormField), null, {
54
- label: withCtx(() => [..._cache[5] || (_cache[5] = [createTextVNode("Theme", -1)])]),
56
+ label: withCtx(() => [createTextVNode(toDisplayString(unref(translate)("developerTools.theme")), 1)]),
55
57
  default: withCtx(() => [createVNode(ApiReferenceToolbarConfigTheme_default, {
56
58
  modelValue: theme.value,
57
59
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => theme.value = $event)
@@ -59,7 +61,7 @@ var ModifyConfiguration_vue_vue_type_script_setup_true_lang_default = /* @__PURE
59
61
  _: 1
60
62
  }),
61
63
  createVNode(unref(ScalarFormField), null, {
62
- label: withCtx(() => [..._cache[6] || (_cache[6] = [createTextVNode("Layout", -1)])]),
64
+ label: withCtx(() => [createTextVNode(toDisplayString(unref(translate)("developerTools.layout")), 1)]),
63
65
  default: withCtx(() => [createVNode(ApiReferenceToolbarConfigLayout_default, {
64
66
  modelValue: layout.value,
65
67
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => layout.value = $event)
@@ -67,7 +69,7 @@ var ModifyConfiguration_vue_vue_type_script_setup_true_lang_default = /* @__PURE
67
69
  _: 1
68
70
  }),
69
71
  createVNode(unref(ScalarFormField), { is: "div" }, {
70
- label: withCtx(() => [..._cache[7] || (_cache[7] = [createTextVNode("Layout Options", -1)])]),
72
+ label: withCtx(() => [createTextVNode(toDisplayString(unref(translate)("developerTools.layoutOptions")), 1)]),
71
73
  default: withCtx(() => [createVNode(ApiReferenceToolbarConfigLayoutOptions_default, {
72
74
  modelValue: overrides.value,
73
75
  "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => overrides.value = $event),
@@ -1 +1 @@
1
- {"version":3,"file":"ModifyConfiguration.vue.script.js","names":[],"sources":["../../../../src/features/developer-tools/components/ModifyConfiguration.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarCodeBlock } from '@scalar/components/code-block'\nimport { ScalarFormField, ScalarFormSection } from '@scalar/components/form'\nimport { prettyPrintJson } from '@scalar/helpers/json/pretty-print-json'\nimport { type ThemeId } from '@scalar/themes'\nimport type { ApiReferenceConfiguration } from '@scalar/types/api-reference'\nimport { computed } from 'vue'\n\nimport ApiReferenceToolbarConfigLayout from './ApiReferenceToolbarConfigLayout.vue'\nimport ApiReferenceToolbarConfigLayoutOptions from './ApiReferenceToolbarConfigLayoutOptions.vue'\nimport ApiReferenceToolbarConfigTheme from './ApiReferenceToolbarConfigTheme.vue'\nimport ApiReferenceToolbarPopover from './ApiReferenceToolbarPopover.vue'\n\nconst { configuration } = defineProps<{\n configuration?: Partial<ApiReferenceConfiguration>\n}>()\n\nconst overrides = defineModel<Partial<ApiReferenceConfiguration>>('overrides')\n\nconst snippet = computed<string>(() => {\n return prettyPrintJson({\n ...overrides.value, // Make sure the overrides are first\n ...configuration,\n ...overrides.value, // But also that they override the configuration\n })\n})\n\nconst theme = computed<ThemeId>({\n get: () => overrides.value?.theme ?? configuration?.theme ?? 'default',\n set: (t) => (overrides.value = { ...overrides.value, theme: t }),\n})\n\nconst layout = computed<'modern' | 'classic'>({\n get: () => overrides.value?.layout ?? configuration?.layout ?? 'modern',\n set: (l) => (overrides.value = { ...overrides.value, layout: l }),\n})\n</script>\n<template>\n <ApiReferenceToolbarPopover class=\"w-120\">\n <template #label>Configure</template>\n <ScalarFormSection>\n <template #label>Scalar Configuration</template>\n <ScalarCodeBlock\n class=\"bg-b-1.5 flex max-h-40 flex-col rounded border text-sm\"\n :content=\"snippet\"\n lang=\"json\" />\n </ScalarFormSection>\n <div class=\"flex flex-col gap-4\">\n <ScalarFormField>\n <template #label>Theme</template>\n <ApiReferenceToolbarConfigTheme v-model=\"theme\" />\n </ScalarFormField>\n <ScalarFormField>\n <template #label>Layout</template>\n <ApiReferenceToolbarConfigLayout v-model=\"layout\" />\n </ScalarFormField>\n <ScalarFormField is=\"div\">\n <template #label>Layout Options</template>\n <ApiReferenceToolbarConfigLayoutOptions\n v-model=\"overrides\"\n :configuration />\n </ScalarFormField>\n </div>\n </ApiReferenceToolbarPopover>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;EAiBA,MAAM,YAAY,SAA+C,SAAC,YAAW;EAE7E,MAAM,UAAU,eAAuB;AACrC,UAAO,gBAAgB;IACrB,GAAG,UAAU;IACb,GAAG,QAAA;IACH,GAAG,UAAU;IACd,CAAA;IACF;EAED,MAAM,QAAQ,SAAkB;GAC9B,WAAW,UAAU,OAAO,SAAS,QAAA,eAAe,SAAS;GAC7D,MAAM,MAAO,UAAU,QAAQ;IAAE,GAAG,UAAU;IAAO,OAAO;IAAG;GAChE,CAAA;EAED,MAAM,SAAS,SAA+B;GAC5C,WAAW,UAAU,OAAO,UAAU,QAAA,eAAe,UAAU;GAC/D,MAAM,MAAO,UAAU,QAAQ;IAAE,GAAG,UAAU;IAAO,QAAQ;IAAG;GACjE,CAAA;;uBAGC,YAyB6B,oCAAA,EAzBD,OAAM,SAAO,EAAA;IAC5B,OAAK,cAAU,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAAT,aAAS,GAAA,CAAA,EAAA,CAAA;2BAON,CANpB,YAMoB,MAAA,kBAAA,EAAA,MAAA;KALP,OAAK,cAAqB,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAApB,wBAAoB,GAAA,CAAA,EAAA,CAAA;4BAIrB,CAHhB,YAGgB,MAAA,gBAAA,EAAA;MAFd,OAAM;MACL,SAAS,QAAA;MACV,MAAK;;;QAET,mBAeM,OAfN,YAeM;KAdJ,YAGkB,MAAA,gBAAA,EAAA,MAAA;MAFL,OAAK,cAAM,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAAL,SAAK,GAAA,CAAA,EAAA,CAAA;6BAC4B,CAAlD,YAAkD,wCAAA;mBAAT,MAAA;0EAAK,QAAA;;;;KAEhD,YAGkB,MAAA,gBAAA,EAAA,MAAA;MAFL,OAAK,cAAO,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAAN,UAAM,GAAA,CAAA,EAAA,CAAA;6BAC6B,CAApD,YAAoD,yCAAA;mBAAV,OAAA;2EAAM,QAAA;;;;KAElD,YAKkB,MAAA,gBAAA,EAAA,EALD,IAAG,OAAK,EAAA;MACZ,OAAK,cAAe,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAAd,kBAAc,GAAA,CAAA,EAAA,CAAA;6BAGZ,CAFnB,YAEmB,gDAAA;mBADR,UAAA;8EAAS,QAAA;OACjB,eAAA,QAAA"}
1
+ {"version":3,"file":"ModifyConfiguration.vue.script.js","names":[],"sources":["../../../../src/features/developer-tools/components/ModifyConfiguration.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarCodeBlock } from '@scalar/components/code-block'\nimport { ScalarFormField, ScalarFormSection } from '@scalar/components/form'\nimport { prettyPrintJson } from '@scalar/helpers/json/pretty-print-json'\nimport { type ThemeId } from '@scalar/themes'\nimport type { ApiReferenceConfiguration } from '@scalar/types/api-reference'\nimport { computed } from 'vue'\n\nimport { useLocalization } from '@/features/localization'\n\nimport ApiReferenceToolbarConfigLayout from './ApiReferenceToolbarConfigLayout.vue'\nimport ApiReferenceToolbarConfigLayoutOptions from './ApiReferenceToolbarConfigLayoutOptions.vue'\nimport ApiReferenceToolbarConfigTheme from './ApiReferenceToolbarConfigTheme.vue'\nimport ApiReferenceToolbarPopover from './ApiReferenceToolbarPopover.vue'\n\nconst { configuration } = defineProps<{\n configuration?: Partial<ApiReferenceConfiguration>\n}>()\n\nconst overrides = defineModel<Partial<ApiReferenceConfiguration>>('overrides')\nconst { translate } = useLocalization()\n\nconst snippet = computed<string>(() => {\n return prettyPrintJson({\n ...overrides.value, // Make sure the overrides are first\n ...configuration,\n ...overrides.value, // But also that they override the configuration\n })\n})\n\nconst theme = computed<ThemeId>({\n get: () => overrides.value?.theme ?? configuration?.theme ?? 'default',\n set: (t) => (overrides.value = { ...overrides.value, theme: t }),\n})\n\nconst layout = computed<'modern' | 'classic'>({\n get: () => overrides.value?.layout ?? configuration?.layout ?? 'modern',\n set: (l) => (overrides.value = { ...overrides.value, layout: l }),\n})\n</script>\n<template>\n <ApiReferenceToolbarPopover class=\"w-120\">\n <template #label>{{ translate('developerTools.configure') }}</template>\n <ScalarFormSection>\n <template #label>\n {{ translate('developerTools.scalarConfiguration') }}\n </template>\n <ScalarCodeBlock\n class=\"bg-b-1.5 flex max-h-40 flex-col rounded border text-sm\"\n :content=\"snippet\"\n lang=\"json\" />\n </ScalarFormSection>\n <div class=\"flex flex-col gap-4\">\n <ScalarFormField>\n <template #label>{{ translate('developerTools.theme') }}</template>\n <ApiReferenceToolbarConfigTheme v-model=\"theme\" />\n </ScalarFormField>\n <ScalarFormField>\n <template #label>{{ translate('developerTools.layout') }}</template>\n <ApiReferenceToolbarConfigLayout v-model=\"layout\" />\n </ScalarFormField>\n <ScalarFormField is=\"div\">\n <template #label>\n {{ translate('developerTools.layoutOptions') }}\n </template>\n <ApiReferenceToolbarConfigLayoutOptions\n v-model=\"overrides\"\n :configuration />\n </ScalarFormField>\n </div>\n </ApiReferenceToolbarPopover>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;EAmBA,MAAM,YAAY,SAA+C,SAAC,YAAW;EAC7E,MAAM,EAAE,cAAc,iBAAgB;EAEtC,MAAM,UAAU,eAAuB;AACrC,UAAO,gBAAgB;IACrB,GAAG,UAAU;IACb,GAAG,QAAA;IACH,GAAG,UAAU;IACd,CAAA;IACF;EAED,MAAM,QAAQ,SAAkB;GAC9B,WAAW,UAAU,OAAO,SAAS,QAAA,eAAe,SAAS;GAC7D,MAAM,MAAO,UAAU,QAAQ;IAAE,GAAG,UAAU;IAAO,OAAO;IAAG;GAChE,CAAA;EAED,MAAM,SAAS,SAA+B;GAC5C,WAAW,UAAU,OAAO,UAAU,QAAA,eAAe,UAAU;GAC/D,MAAM,MAAO,UAAU,QAAQ;IAAE,GAAG,UAAU;IAAO,QAAQ;IAAG;GACjE,CAAA;;uBAGC,YA6B6B,oCAAA,EA7BD,OAAM,SAAO,EAAA;IAC5B,OAAK,cAA4C,CAAA,gBAAA,gBAAxC,MAAA,UAAS,CAAA,2BAAA,CAAA,EAAA,EAAA,CAAA,CAAA;2BAST,CARpB,YAQoB,MAAA,kBAAA,EAAA,MAAA;KAPP,OAAK,cACuC,CAAA,gBAAA,gBAAlD,MAAA,UAAS,CAAA,qCAAA,CAAA,EAAA,EAAA,CAAA,CAAA;4BAKE,CAHhB,YAGgB,MAAA,gBAAA,EAAA;MAFd,OAAM;MACL,SAAS,QAAA;MACV,MAAK;;;QAET,mBAiBM,OAjBN,YAiBM;KAhBJ,YAGkB,MAAA,gBAAA,EAAA,MAAA;MAFL,OAAK,cAAwC,CAAA,gBAAA,gBAApC,MAAA,UAAS,CAAA,uBAAA,CAAA,EAAA,EAAA,CAAA,CAAA;6BACqB,CAAlD,YAAkD,wCAAA;mBAAT,MAAA;0EAAK,QAAA;;;;KAEhD,YAGkB,MAAA,gBAAA,EAAA,MAAA;MAFL,OAAK,cAAyC,CAAA,gBAAA,gBAArC,MAAA,UAAS,CAAA,wBAAA,CAAA,EAAA,EAAA,CAAA,CAAA;6BACuB,CAApD,YAAoD,yCAAA;mBAAV,OAAA;2EAAM,QAAA;;;;KAElD,YAOkB,MAAA,gBAAA,EAAA,EAPD,IAAG,OAAK,EAAA;MACZ,OAAK,cACiC,CAAA,gBAAA,gBAA5C,MAAA,UAAS,CAAA,+BAAA,CAAA,EAAA,EAAA,CAAA,CAAA;6BAIK,CAFnB,YAEmB,gDAAA;mBADR,UAAA;8EAAS,QAAA;OACjB,eAAA,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ShareApiReference.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/developer-tools/components/ShareApiReference.vue"],"names":[],"mappings":"AAgCA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAKpE,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,cAAc,CAAA;IACzB,YAAY,EAAE,YAAY,CAAA;CAC3B,CAAC;AAmEF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"ShareApiReference.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/developer-tools/components/ShareApiReference.vue"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAOpE,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,cAAc,CAAA;IACzB,YAAY,EAAE,YAAY,CAAA;CAC3B,CAAC;AAkFF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ShareApiReference.vue.js","names":[],"sources":["../../../../src/features/developer-tools/components/ShareApiReference.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarFormSection } from '@scalar/components/form'\nimport type { ExternalUrls } from '@scalar/types/api-reference'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\n\nimport ApiReferenceToolbarPopover from './ApiReferenceToolbarPopover.vue'\nimport ApiReferenceToolbarShareTemporary from './ApiReferenceToolbarShareTemporary.vue'\n\nconst { workspace, externalUrls } = defineProps<{\n workspace: WorkspaceStore\n externalUrls: ExternalUrls\n}>()\n</script>\n<template>\n <ApiReferenceToolbarPopover class=\"w-120\">\n <template #label>Share</template>\n <ScalarFormSection>\n <template #label>Share your API Reference</template>\n <p class=\"text-c-2 mb-2 leading-normal\">\n Upload your OpenAPI document to share your API Reference with others. As\n easy as pressing a button.\n </p>\n <ApiReferenceToolbarShareTemporary\n :externalUrls\n :workspace />\n </ScalarFormSection>\n </ApiReferenceToolbarPopover>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"ShareApiReference.vue.js","names":[],"sources":["../../../../src/features/developer-tools/components/ShareApiReference.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarFormSection } from '@scalar/components/form'\nimport type { ExternalUrls } from '@scalar/types/api-reference'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\n\nimport { useLocalization } from '@/features/localization'\n\nimport ApiReferenceToolbarPopover from './ApiReferenceToolbarPopover.vue'\nimport ApiReferenceToolbarShareTemporary from './ApiReferenceToolbarShareTemporary.vue'\n\nconst { workspace, externalUrls } = defineProps<{\n workspace: WorkspaceStore\n externalUrls: ExternalUrls\n}>()\nconst { translate } = useLocalization()\n</script>\n<template>\n <ApiReferenceToolbarPopover class=\"w-120\">\n <template #label>{{ translate('developerTools.share') }}</template>\n <ScalarFormSection>\n <template #label>{{ translate('developerTools.shareTitle') }}</template>\n <p class=\"text-c-2 mb-2 leading-normal\">\n {{ translate('developerTools.shareDescription') }}\n </p>\n <ApiReferenceToolbarShareTemporary\n :externalUrls\n :workspace />\n </ScalarFormSection>\n </ApiReferenceToolbarPopover>\n</template>\n"],"mappings":""}
@@ -1,8 +1,10 @@
1
+ import { useLocalization } from "../../localization/use-localization.js";
1
2
  import ApiReferenceToolbarPopover_default from "./ApiReferenceToolbarPopover.vue.js";
2
3
  import ApiReferenceToolbarShareTemporary_default from "./ApiReferenceToolbarShareTemporary.vue.js";
3
- import { createBlock, createElementVNode, createTextVNode, createVNode, defineComponent, openBlock, unref, withCtx } from "vue";
4
+ import { createBlock, createElementVNode, createTextVNode, createVNode, defineComponent, openBlock, toDisplayString, unref, withCtx } from "vue";
4
5
  import { ScalarFormSection } from "@scalar/components/form";
5
6
  //#region src/features/developer-tools/components/ShareApiReference.vue?vue&type=script&setup=true&lang.ts
7
+ var _hoisted_1 = { class: "text-c-2 mb-2 leading-normal" };
6
8
  var ShareApiReference_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
7
9
  __name: "ShareApiReference",
8
10
  props: {
@@ -10,12 +12,13 @@ var ShareApiReference_vue_vue_type_script_setup_true_lang_default = /* @__PURE__
10
12
  externalUrls: {}
11
13
  },
12
14
  setup(__props) {
15
+ const { translate } = useLocalization();
13
16
  return (_ctx, _cache) => {
14
17
  return openBlock(), createBlock(ApiReferenceToolbarPopover_default, { class: "w-120" }, {
15
- label: withCtx(() => [..._cache[0] || (_cache[0] = [createTextVNode("Share", -1)])]),
18
+ label: withCtx(() => [createTextVNode(toDisplayString(unref(translate)("developerTools.share")), 1)]),
16
19
  default: withCtx(() => [createVNode(unref(ScalarFormSection), null, {
17
- label: withCtx(() => [..._cache[1] || (_cache[1] = [createTextVNode("Share your API Reference", -1)])]),
18
- default: withCtx(() => [_cache[2] || (_cache[2] = createElementVNode("p", { class: "text-c-2 mb-2 leading-normal" }, " Upload your OpenAPI document to share your API Reference with others. As easy as pressing a button. ", -1)), createVNode(ApiReferenceToolbarShareTemporary_default, {
20
+ label: withCtx(() => [createTextVNode(toDisplayString(unref(translate)("developerTools.shareTitle")), 1)]),
21
+ default: withCtx(() => [createElementVNode("p", _hoisted_1, toDisplayString(unref(translate)("developerTools.shareDescription")), 1), createVNode(ApiReferenceToolbarShareTemporary_default, {
19
22
  externalUrls: __props.externalUrls,
20
23
  workspace: __props.workspace
21
24
  }, null, 8, ["externalUrls", "workspace"])]),
@@ -1 +1 @@
1
- {"version":3,"file":"ShareApiReference.vue.script.js","names":[],"sources":["../../../../src/features/developer-tools/components/ShareApiReference.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarFormSection } from '@scalar/components/form'\nimport type { ExternalUrls } from '@scalar/types/api-reference'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\n\nimport ApiReferenceToolbarPopover from './ApiReferenceToolbarPopover.vue'\nimport ApiReferenceToolbarShareTemporary from './ApiReferenceToolbarShareTemporary.vue'\n\nconst { workspace, externalUrls } = defineProps<{\n workspace: WorkspaceStore\n externalUrls: ExternalUrls\n}>()\n</script>\n<template>\n <ApiReferenceToolbarPopover class=\"w-120\">\n <template #label>Share</template>\n <ScalarFormSection>\n <template #label>Share your API Reference</template>\n <p class=\"text-c-2 mb-2 leading-normal\">\n Upload your OpenAPI document to share your API Reference with others. As\n easy as pressing a button.\n </p>\n <ApiReferenceToolbarShareTemporary\n :externalUrls\n :workspace />\n </ScalarFormSection>\n </ApiReferenceToolbarPopover>\n</template>\n"],"mappings":";;;;;;;;;;;;;uBAcE,YAY6B,oCAAA,EAZD,OAAM,SAAO,EAAA;IAC5B,OAAK,cAAM,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAAL,SAAK,GAAA,CAAA,EAAA,CAAA;2BAUF,CATpB,YASoB,MAAA,kBAAA,EAAA,MAAA;KARP,OAAK,cAAyB,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAAxB,4BAAwB,GAAA,CAAA,EAAA,CAAA;4BAIrC,CAAA,OAAA,OAAA,OAAA,KAHJ,mBAGI,KAAA,EAHD,OAAM,gCAA8B,EAAC,yGAGxC,GAAA,GACA,YAEe,2CAAA;MADZ,cAAA,QAAA;MACA,WAAA,QAAA"}
1
+ {"version":3,"file":"ShareApiReference.vue.script.js","names":[],"sources":["../../../../src/features/developer-tools/components/ShareApiReference.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarFormSection } from '@scalar/components/form'\nimport type { ExternalUrls } from '@scalar/types/api-reference'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\n\nimport { useLocalization } from '@/features/localization'\n\nimport ApiReferenceToolbarPopover from './ApiReferenceToolbarPopover.vue'\nimport ApiReferenceToolbarShareTemporary from './ApiReferenceToolbarShareTemporary.vue'\n\nconst { workspace, externalUrls } = defineProps<{\n workspace: WorkspaceStore\n externalUrls: ExternalUrls\n}>()\nconst { translate } = useLocalization()\n</script>\n<template>\n <ApiReferenceToolbarPopover class=\"w-120\">\n <template #label>{{ translate('developerTools.share') }}</template>\n <ScalarFormSection>\n <template #label>{{ translate('developerTools.shareTitle') }}</template>\n <p class=\"text-c-2 mb-2 leading-normal\">\n {{ translate('developerTools.shareDescription') }}\n </p>\n <ApiReferenceToolbarShareTemporary\n :externalUrls\n :workspace />\n </ScalarFormSection>\n </ApiReferenceToolbarPopover>\n</template>\n"],"mappings":";;;;;;;;;;;;;;EAcA,MAAM,EAAE,cAAc,iBAAgB;;uBAGpC,YAW6B,oCAAA,EAXD,OAAM,SAAO,EAAA;IAC5B,OAAK,cAAwC,CAAA,gBAAA,gBAApC,MAAA,UAAS,CAAA,uBAAA,CAAA,EAAA,EAAA,CAAA,CAAA;2BAST,CARpB,YAQoB,MAAA,kBAAA,EAAA,MAAA;KAPP,OAAK,cAA6C,CAAA,gBAAA,gBAAzC,MAAA,UAAS,CAAA,4BAAA,CAAA,EAAA,EAAA,CAAA,CAAA;4BAGzB,CAFJ,mBAEI,KAFJ,YAEI,gBADC,MAAA,UAAS,CAAA,kCAAA,CAAA,EAAA,EAAA,EAEd,YAEe,2CAAA;MADZ,cAAA,QAAA;MACA,WAAA,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ExampleResponse.vue.d.ts","sourceRoot":"","sources":["../../../src/features/example-responses/ExampleResponse.vue"],"names":[],"mappings":"AAgJA,OAAO,KAAK,EACV,aAAa,EACb,eAAe,EAEhB,MAAM,8DAA8D,CAAA;AAGrE,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,eAAe,GAAG,SAAS,CAAA;IACrC,OAAO,EAAE,aAAa,GAAG,SAAS,CAAA;CACnC,CAAC;AAwHF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"ExampleResponse.vue.d.ts","sourceRoot":"","sources":["../../../src/features/example-responses/ExampleResponse.vue"],"names":[],"mappings":"AAmJA,OAAO,KAAK,EACV,aAAa,EACb,eAAe,EAEhB,MAAM,8DAA8D,CAAA;AAKrE,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,eAAe,GAAG,SAAS,CAAA;IACrC,OAAO,EAAE,aAAa,GAAG,SAAS,CAAA;CACnC,CAAC;AA2HF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -2,7 +2,7 @@ import _plugin_vue_export_helper_default from "../../_virtual/_plugin-vue_export
2
2
  import ExampleResponse_vue_vue_type_script_setup_true_lang_default from "./ExampleResponse.vue.script.js";
3
3
  /* empty css */
4
4
  //#region src/features/example-responses/ExampleResponse.vue
5
- var ExampleResponse_default = /* @__PURE__ */ _plugin_vue_export_helper_default(ExampleResponse_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-da52ac9d"]]);
5
+ var ExampleResponse_default = /* @__PURE__ */ _plugin_vue_export_helper_default(ExampleResponse_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-ce6cfefc"]]);
6
6
  //#endregion
7
7
  export { ExampleResponse_default as default };
8
8
 
@@ -1 +1 @@
1
- {"version":3,"file":"ExampleResponse.vue.js","names":[],"sources":["../../../src/features/example-responses/ExampleResponse.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { getResolvedRefDeep } from '@scalar/api-client/blocks/operation-code-sample'\nimport { ScalarCodeBlock } from '@scalar/components/code-block'\nimport { ScalarVirtualCodeBlock } from '@scalar/components/virtual-code-block'\nimport { prettyPrintJson } from '@scalar/helpers/json/pretty-print-json'\nimport { getExampleFromSchema } from '@scalar/workspace-store/request-example'\nimport type {\n ExampleObject,\n MediaTypeObject,\n SchemaObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nconst { example, response } = defineProps<{\n response: MediaTypeObject | undefined\n example: ExampleObject | undefined\n}>()\n\n/** Get content from the appropriate source */\nconst getContent = () => {\n if (example !== undefined) {\n return getResolvedRefDeep(example)?.value ?? ''\n }\n\n if (response?.schema) {\n return getExampleFromSchema(\n // Should be safe to deep resolve the schema here because we don't have to do any sibling resolution for example generation\n getResolvedRefDeep(response.schema) as SchemaObject,\n {\n emptyString: 'string',\n mode: 'read',\n },\n )\n }\n\n return undefined\n}\n\n/** Pre-pretty printed content string, avoids multiple pretty prints*/\nconst prettyPrintedContent = computed(() => {\n const content = getContent()\n if (content === undefined) {\n return undefined\n }\n return prettyPrintJson(content)\n})\n\nconst VIRTUALIZATION_THRESHOLD = 20_000\n\n// Virtualize the code block if it's too large\nconst shouldVirtualize = computed(() => {\n if (prettyPrintedContent.value === undefined) {\n return false\n }\n return prettyPrintedContent.value.length > VIRTUALIZATION_THRESHOLD\n})\n</script>\n<template>\n <!-- Example -->\n <ScalarCodeBlock\n v-if=\"prettyPrintedContent !== undefined && !shouldVirtualize\"\n class=\"bg-b-2\"\n lang=\"json\"\n :prettyPrintedContent=\"prettyPrintedContent\" />\n\n <ScalarVirtualCodeBlock\n v-else-if=\"prettyPrintedContent !== undefined && shouldVirtualize\"\n class=\"bg-b-2\"\n :content=\"prettyPrintedContent\"\n lang=\"json\" />\n\n <div\n v-else\n class=\"empty-state\">\n No Body\n </div>\n</template>\n\n<style scoped>\n.empty-state {\n margin: 10px 0 10px 12px;\n text-align: center;\n font-size: var(--scalar-mini);\n min-height: 56px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: var(--scalar-radius-lg);\n color: var(--scalar-color-2);\n}\n\n.rule-title {\n font-family: var(--scalar-font-code);\n color: var(--scalar-color-1);\n display: inline-block;\n margin: 12px 0 6px;\n border-radius: var(--scalar-radius);\n}\n\n.rule {\n margin: 0 12px 0;\n border-radius: var(--scalar-radius-lg);\n}\n\n.rule-items {\n counter-reset: list-number;\n display: flex;\n flex-direction: column;\n gap: 12px;\n border-left: 1px solid var(--scalar-border-color);\n padding: 12px 0 12px;\n}\n.rule-item {\n counter-increment: list-number;\n border: 1px solid var(--scalar-border-color);\n border-radius: var(--scalar-radius-lg);\n overflow: hidden;\n margin-left: 24px;\n}\n.rule-item:before {\n /* content: counter(list-number); */\n border: 1px solid var(--scalar-border-color);\n border-top: 0;\n border-right: 0;\n content: ' ';\n display: block;\n width: 24px;\n height: 6px;\n border-radius: 0 0 0 var(--scalar-radius-lg);\n margin-top: 6px;\n color: var(--scalar-color-2);\n transform: translateX(-25px);\n color: var(--scalar-color-1);\n position: absolute;\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"ExampleResponse.vue.js","names":[],"sources":["../../../src/features/example-responses/ExampleResponse.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { getResolvedRefDeep } from '@scalar/blocks/code-example'\nimport { ScalarCodeBlock } from '@scalar/components/code-block'\nimport { ScalarVirtualCodeBlock } from '@scalar/components/virtual-code-block'\nimport { prettyPrintJson } from '@scalar/helpers/json/pretty-print-json'\nimport { getExampleFromSchema } from '@scalar/workspace-store/request-example'\nimport type {\n ExampleObject,\n MediaTypeObject,\n SchemaObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport { useLocalization } from '@/features/localization'\n\nconst { example, response } = defineProps<{\n response: MediaTypeObject | undefined\n example: ExampleObject | undefined\n}>()\nconst { translate } = useLocalization()\n\n/** Get content from the appropriate source */\nconst getContent = () => {\n if (example !== undefined) {\n return getResolvedRefDeep(example)?.value ?? ''\n }\n\n if (response?.schema) {\n return getExampleFromSchema(\n // Should be safe to deep resolve the schema here because we don't have to do any sibling resolution for example generation\n getResolvedRefDeep(response.schema) as SchemaObject,\n {\n emptyString: 'string',\n mode: 'read',\n },\n )\n }\n\n return undefined\n}\n\n/** Pre-pretty printed content string, avoids multiple pretty prints*/\nconst prettyPrintedContent = computed(() => {\n const content = getContent()\n if (content === undefined) {\n return undefined\n }\n return prettyPrintJson(content)\n})\n\nconst VIRTUALIZATION_THRESHOLD = 20_000\n\n// Virtualize the code block if it's too large\nconst shouldVirtualize = computed(() => {\n if (prettyPrintedContent.value === undefined) {\n return false\n }\n return prettyPrintedContent.value.length > VIRTUALIZATION_THRESHOLD\n})\n</script>\n<template>\n <!-- Example -->\n <ScalarCodeBlock\n v-if=\"prettyPrintedContent !== undefined && !shouldVirtualize\"\n class=\"bg-b-2\"\n lang=\"json\"\n :prettyPrintedContent=\"prettyPrintedContent\" />\n\n <ScalarVirtualCodeBlock\n v-else-if=\"prettyPrintedContent !== undefined && shouldVirtualize\"\n class=\"bg-b-2\"\n :content=\"prettyPrintedContent\"\n lang=\"json\" />\n\n <div\n v-else\n class=\"empty-state\">\n {{ translate('response.noBody') }}\n </div>\n</template>\n\n<style scoped>\n.empty-state {\n margin: 10px 0 10px 12px;\n text-align: center;\n font-size: var(--scalar-mini);\n min-height: 56px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: var(--scalar-radius-lg);\n color: var(--scalar-color-2);\n}\n\n.rule-title {\n font-family: var(--scalar-font-code);\n color: var(--scalar-color-1);\n display: inline-block;\n margin: 12px 0 6px;\n border-radius: var(--scalar-radius);\n}\n\n.rule {\n margin: 0 12px 0;\n border-radius: var(--scalar-radius-lg);\n}\n\n.rule-items {\n counter-reset: list-number;\n display: flex;\n flex-direction: column;\n gap: 12px;\n border-left: 1px solid var(--scalar-border-color);\n padding: 12px 0 12px;\n}\n.rule-item {\n counter-increment: list-number;\n border: 1px solid var(--scalar-border-color);\n border-radius: var(--scalar-radius-lg);\n overflow: hidden;\n margin-left: 24px;\n}\n.rule-item:before {\n /* content: counter(list-number); */\n border: 1px solid var(--scalar-border-color);\n border-top: 0;\n border-right: 0;\n content: ' ';\n display: block;\n width: 24px;\n height: 6px;\n border-radius: 0 0 0 var(--scalar-radius-lg);\n margin-top: 6px;\n color: var(--scalar-color-2);\n transform: translateX(-25px);\n color: var(--scalar-color-1);\n position: absolute;\n}\n</style>\n"],"mappings":""}
@@ -1,6 +1,7 @@
1
- import { computed, createBlock, createElementBlock, defineComponent, openBlock, unref } from "vue";
1
+ import { useLocalization } from "../localization/use-localization.js";
2
+ import { computed, createBlock, createElementBlock, defineComponent, openBlock, toDisplayString, unref } from "vue";
2
3
  import { getExampleFromSchema } from "@scalar/workspace-store/request-example";
3
- import { getResolvedRefDeep } from "@scalar/api-client/blocks/operation-code-sample";
4
+ import { getResolvedRefDeep } from "@scalar/blocks/code-example";
4
5
  import { ScalarCodeBlock } from "@scalar/components/code-block";
5
6
  import { ScalarVirtualCodeBlock } from "@scalar/components/virtual-code-block";
6
7
  import { prettyPrintJson } from "@scalar/helpers/json/pretty-print-json";
@@ -17,6 +18,7 @@ var ExampleResponse_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ *
17
18
  example: {}
18
19
  },
19
20
  setup(__props) {
21
+ const { translate } = useLocalization();
20
22
  /** Get content from the appropriate source */
21
23
  const getContent = () => {
22
24
  if (__props.example !== void 0) return getResolvedRefDeep(__props.example)?.value ?? "";
@@ -46,7 +48,7 @@ var ExampleResponse_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ *
46
48
  class: "bg-b-2",
47
49
  content: prettyPrintedContent.value,
48
50
  lang: "json"
49
- }, null, 8, ["content"])) : (openBlock(), createElementBlock("div", _hoisted_1, " No Body "));
51
+ }, null, 8, ["content"])) : (openBlock(), createElementBlock("div", _hoisted_1, toDisplayString(unref(translate)("response.noBody")), 1));
50
52
  };
51
53
  }
52
54
  });
@@ -1 +1 @@
1
- {"version":3,"file":"ExampleResponse.vue.script.js","names":[],"sources":["../../../src/features/example-responses/ExampleResponse.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { getResolvedRefDeep } from '@scalar/api-client/blocks/operation-code-sample'\nimport { ScalarCodeBlock } from '@scalar/components/code-block'\nimport { ScalarVirtualCodeBlock } from '@scalar/components/virtual-code-block'\nimport { prettyPrintJson } from '@scalar/helpers/json/pretty-print-json'\nimport { getExampleFromSchema } from '@scalar/workspace-store/request-example'\nimport type {\n ExampleObject,\n MediaTypeObject,\n SchemaObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nconst { example, response } = defineProps<{\n response: MediaTypeObject | undefined\n example: ExampleObject | undefined\n}>()\n\n/** Get content from the appropriate source */\nconst getContent = () => {\n if (example !== undefined) {\n return getResolvedRefDeep(example)?.value ?? ''\n }\n\n if (response?.schema) {\n return getExampleFromSchema(\n // Should be safe to deep resolve the schema here because we don't have to do any sibling resolution for example generation\n getResolvedRefDeep(response.schema) as SchemaObject,\n {\n emptyString: 'string',\n mode: 'read',\n },\n )\n }\n\n return undefined\n}\n\n/** Pre-pretty printed content string, avoids multiple pretty prints*/\nconst prettyPrintedContent = computed(() => {\n const content = getContent()\n if (content === undefined) {\n return undefined\n }\n return prettyPrintJson(content)\n})\n\nconst VIRTUALIZATION_THRESHOLD = 20_000\n\n// Virtualize the code block if it's too large\nconst shouldVirtualize = computed(() => {\n if (prettyPrintedContent.value === undefined) {\n return false\n }\n return prettyPrintedContent.value.length > VIRTUALIZATION_THRESHOLD\n})\n</script>\n<template>\n <!-- Example -->\n <ScalarCodeBlock\n v-if=\"prettyPrintedContent !== undefined && !shouldVirtualize\"\n class=\"bg-b-2\"\n lang=\"json\"\n :prettyPrintedContent=\"prettyPrintedContent\" />\n\n <ScalarVirtualCodeBlock\n v-else-if=\"prettyPrintedContent !== undefined && shouldVirtualize\"\n class=\"bg-b-2\"\n :content=\"prettyPrintedContent\"\n lang=\"json\" />\n\n <div\n v-else\n class=\"empty-state\">\n No Body\n </div>\n</template>\n\n<style scoped>\n.empty-state {\n margin: 10px 0 10px 12px;\n text-align: center;\n font-size: var(--scalar-mini);\n min-height: 56px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: var(--scalar-radius-lg);\n color: var(--scalar-color-2);\n}\n\n.rule-title {\n font-family: var(--scalar-font-code);\n color: var(--scalar-color-1);\n display: inline-block;\n margin: 12px 0 6px;\n border-radius: var(--scalar-radius);\n}\n\n.rule {\n margin: 0 12px 0;\n border-radius: var(--scalar-radius-lg);\n}\n\n.rule-items {\n counter-reset: list-number;\n display: flex;\n flex-direction: column;\n gap: 12px;\n border-left: 1px solid var(--scalar-border-color);\n padding: 12px 0 12px;\n}\n.rule-item {\n counter-increment: list-number;\n border: 1px solid var(--scalar-border-color);\n border-radius: var(--scalar-radius-lg);\n overflow: hidden;\n margin-left: 24px;\n}\n.rule-item:before {\n /* content: counter(list-number); */\n border: 1px solid var(--scalar-border-color);\n border-top: 0;\n border-right: 0;\n content: ' ';\n display: block;\n width: 24px;\n height: 6px;\n border-radius: 0 0 0 var(--scalar-radius-lg);\n margin-top: 6px;\n color: var(--scalar-color-2);\n transform: translateX(-25px);\n color: var(--scalar-color-1);\n position: absolute;\n}\n</style>\n"],"mappings":";;;;;;;;;;;AA+CA,IAAM,2BAA2B;;;;;;;;;EA5BjC,MAAM,mBAAmB;AACvB,OAAI,QAAA,YAAY,KAAA,EACd,QAAO,mBAAmB,QAAA,QAAQ,EAAE,SAAS;AAG/C,OAAI,QAAA,UAAU,OACZ,QAAO,qBAEL,mBAAmB,QAAA,SAAS,OAAO,EACnC;IACE,aAAa;IACb,MAAM;IACP,CACH;;;EAOJ,MAAM,uBAAuB,eAAe;GAC1C,MAAM,UAAU,YAAW;AAC3B,OAAI,YAAY,KAAA,EACd;AAEF,UAAO,gBAAgB,QAAO;IAC/B;EAKD,MAAM,mBAAmB,eAAe;AACtC,OAAI,qBAAqB,UAAU,KAAA,EACjC,QAAO;AAET,UAAO,qBAAqB,MAAM,SAAS;IAC5C;;UAKS,qBAAA,UAAyB,KAAA,KAAS,CAAK,iBAAA,SAAA,WAAA,EAD/C,YAIiD,MAAA,gBAAA,EAAA;;IAF/C,OAAM;IACN,MAAK;IACJ,sBAAsB,qBAAA;4CAGZ,qBAAA,UAAyB,KAAA,KAAa,iBAAA,SAAA,WAAA,EADnD,YAIgB,MAAA,uBAAA,EAAA;;IAFd,OAAM;IACL,SAAS,qBAAA;IACV,MAAK;6CAEP,mBAIM,OAJN,YAEsB,YAEtB"}
1
+ {"version":3,"file":"ExampleResponse.vue.script.js","names":[],"sources":["../../../src/features/example-responses/ExampleResponse.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { getResolvedRefDeep } from '@scalar/blocks/code-example'\nimport { ScalarCodeBlock } from '@scalar/components/code-block'\nimport { ScalarVirtualCodeBlock } from '@scalar/components/virtual-code-block'\nimport { prettyPrintJson } from '@scalar/helpers/json/pretty-print-json'\nimport { getExampleFromSchema } from '@scalar/workspace-store/request-example'\nimport type {\n ExampleObject,\n MediaTypeObject,\n SchemaObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport { useLocalization } from '@/features/localization'\n\nconst { example, response } = defineProps<{\n response: MediaTypeObject | undefined\n example: ExampleObject | undefined\n}>()\nconst { translate } = useLocalization()\n\n/** Get content from the appropriate source */\nconst getContent = () => {\n if (example !== undefined) {\n return getResolvedRefDeep(example)?.value ?? ''\n }\n\n if (response?.schema) {\n return getExampleFromSchema(\n // Should be safe to deep resolve the schema here because we don't have to do any sibling resolution for example generation\n getResolvedRefDeep(response.schema) as SchemaObject,\n {\n emptyString: 'string',\n mode: 'read',\n },\n )\n }\n\n return undefined\n}\n\n/** Pre-pretty printed content string, avoids multiple pretty prints*/\nconst prettyPrintedContent = computed(() => {\n const content = getContent()\n if (content === undefined) {\n return undefined\n }\n return prettyPrintJson(content)\n})\n\nconst VIRTUALIZATION_THRESHOLD = 20_000\n\n// Virtualize the code block if it's too large\nconst shouldVirtualize = computed(() => {\n if (prettyPrintedContent.value === undefined) {\n return false\n }\n return prettyPrintedContent.value.length > VIRTUALIZATION_THRESHOLD\n})\n</script>\n<template>\n <!-- Example -->\n <ScalarCodeBlock\n v-if=\"prettyPrintedContent !== undefined && !shouldVirtualize\"\n class=\"bg-b-2\"\n lang=\"json\"\n :prettyPrintedContent=\"prettyPrintedContent\" />\n\n <ScalarVirtualCodeBlock\n v-else-if=\"prettyPrintedContent !== undefined && shouldVirtualize\"\n class=\"bg-b-2\"\n :content=\"prettyPrintedContent\"\n lang=\"json\" />\n\n <div\n v-else\n class=\"empty-state\">\n {{ translate('response.noBody') }}\n </div>\n</template>\n\n<style scoped>\n.empty-state {\n margin: 10px 0 10px 12px;\n text-align: center;\n font-size: var(--scalar-mini);\n min-height: 56px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: var(--scalar-radius-lg);\n color: var(--scalar-color-2);\n}\n\n.rule-title {\n font-family: var(--scalar-font-code);\n color: var(--scalar-color-1);\n display: inline-block;\n margin: 12px 0 6px;\n border-radius: var(--scalar-radius);\n}\n\n.rule {\n margin: 0 12px 0;\n border-radius: var(--scalar-radius-lg);\n}\n\n.rule-items {\n counter-reset: list-number;\n display: flex;\n flex-direction: column;\n gap: 12px;\n border-left: 1px solid var(--scalar-border-color);\n padding: 12px 0 12px;\n}\n.rule-item {\n counter-increment: list-number;\n border: 1px solid var(--scalar-border-color);\n border-radius: var(--scalar-radius-lg);\n overflow: hidden;\n margin-left: 24px;\n}\n.rule-item:before {\n /* content: counter(list-number); */\n border: 1px solid var(--scalar-border-color);\n border-top: 0;\n border-right: 0;\n content: ' ';\n display: block;\n width: 24px;\n height: 6px;\n border-radius: 0 0 0 var(--scalar-radius-lg);\n margin-top: 6px;\n color: var(--scalar-color-2);\n transform: translateX(-25px);\n color: var(--scalar-color-1);\n position: absolute;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;AAkDA,IAAM,2BAA2B;;;;;;;;EA/BjC,MAAM,EAAE,cAAc,iBAAgB;;EAGtC,MAAM,mBAAmB;AACvB,OAAI,QAAA,YAAY,KAAA,EACd,QAAO,mBAAmB,QAAA,QAAQ,EAAE,SAAS;AAG/C,OAAI,QAAA,UAAU,OACZ,QAAO,qBAEL,mBAAmB,QAAA,SAAS,OAAO,EACnC;IACE,aAAa;IACb,MAAM;IACP,CACH;;;EAOJ,MAAM,uBAAuB,eAAe;GAC1C,MAAM,UAAU,YAAW;AAC3B,OAAI,YAAY,KAAA,EACd;AAEF,UAAO,gBAAgB,QAAO;IAC/B;EAKD,MAAM,mBAAmB,eAAe;AACtC,OAAI,qBAAqB,UAAU,KAAA,EACjC,QAAO;AAET,UAAO,qBAAqB,MAAM,SAAS;IAC5C;;UAKS,qBAAA,UAAyB,KAAA,KAAS,CAAK,iBAAA,SAAA,WAAA,EAD/C,YAIiD,MAAA,gBAAA,EAAA;;IAF/C,OAAM;IACN,MAAK;IACJ,sBAAsB,qBAAA;4CAGZ,qBAAA,UAAyB,KAAA,KAAa,iBAAA,SAAA,WAAA,EADnD,YAIgB,MAAA,uBAAA,EAAA;;IAFd,OAAM;IACL,SAAS,qBAAA;IACV,MAAK;6CAEP,mBAIM,OAJN,YAIM,gBADD,MAAA,UAAS,CAAA,kBAAA,CAAA,EAAA,EAAA"}
@@ -1,9 +1,18 @@
1
+ import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
1
2
  import type { ResponsesObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
2
3
  /**
3
4
  * TODO: copyToClipboard isn't using the right content if there are multiple examples
4
5
  */
5
6
  type __VLS_Props = {
6
7
  responses: ResponsesObject;
8
+ /**
9
+ * The document-wide selected example key. Honored only when the current response defines an
10
+ * example with the same key, so response example pickers stay in sync between operations without
11
+ * blanking out responses that do not share that key.
12
+ */
13
+ selectedExample?: string;
14
+ /** Event bus, used to broadcast the selected example so other operations can follow */
15
+ eventBus?: WorkspaceEventBus;
7
16
  };
8
17
  declare const __VLS_export: 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>;
9
18
  declare const _default: typeof __VLS_export;
@@ -1 +1 @@
1
- {"version":3,"file":"ExampleResponses.vue.d.ts","sourceRoot":"","sources":["../../../src/features/example-responses/ExampleResponses.vue"],"names":[],"mappings":"AAmWA,OAAO,KAAK,EAEV,eAAe,EAChB,MAAM,8DAA8D,CAAA;AAYrE;;GAEG;AAEH,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,eAAe,CAAA;CAC3B,CAAC;AA4WF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"ExampleResponses.vue.d.ts","sourceRoot":"","sources":["../../../src/features/example-responses/ExampleResponses.vue"],"names":[],"mappings":"AA2YA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAGvE,OAAO,KAAK,EAEV,eAAe,EAChB,MAAM,8DAA8D,CAAA;AAarE;;GAEG;AAEH,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,eAAe,CAAA;IAC1B;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,uFAAuF;IACvF,QAAQ,CAAC,EAAE,iBAAiB,CAAA;CAC7B,CAAC;AAuZF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -2,7 +2,7 @@ import _plugin_vue_export_helper_default from "../../_virtual/_plugin-vue_export
2
2
  import ExampleResponses_vue_vue_type_script_setup_true_lang_default from "./ExampleResponses.vue.script.js";
3
3
  /* empty css */
4
4
  //#region src/features/example-responses/ExampleResponses.vue
5
- var ExampleResponses_default = /* @__PURE__ */ _plugin_vue_export_helper_default(ExampleResponses_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-b3a2a96e"]]);
5
+ var ExampleResponses_default = /* @__PURE__ */ _plugin_vue_export_helper_default(ExampleResponses_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-5123cd9f"]]);
6
6
  //#endregion
7
7
  export { ExampleResponses_default as default };
8
8
 
@@ -1 +1 @@
1
- {"version":3,"file":"ExampleResponses.vue.js","names":[],"sources":["../../../src/features/example-responses/ExampleResponses.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ExamplePicker } from '@scalar/api-client/blocks/operation-code-sample'\nimport {\n ScalarCard,\n ScalarCardFooter,\n ScalarCardSection,\n} from '@scalar/components/card'\nimport { ScalarIcon } from '@scalar/components/icon'\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport { objectKeys } from '@scalar/helpers/object/object-keys'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport { getExample } from '@scalar/workspace-store/request-example'\nimport type {\n MediaTypeObject,\n ResponsesObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed, ref, toValue, useId, watch } from 'vue'\n\nimport ScreenReader from '@/components/ScreenReader.vue'\nimport ExampleSchema from '@/features/example-responses/ExampleSchema.vue'\n\nimport ExampleResponse from './ExampleResponse.vue'\nimport ExampleResponseTab from './ExampleResponseTab.vue'\nimport ExampleResponseTabList from './ExampleResponseTabList.vue'\nimport { hasResponseContent } from './helpers/has-response-content'\nimport { normalizeMimeTypeObject } from './helpers/normalize-mime-type-object'\n\n/**\n * TODO: copyToClipboard isn't using the right content if there are multiple examples\n */\n\nconst { responses } = defineProps<{\n responses: ResponsesObject\n}>()\n\nconst id = useId()\nconst { copyToClipboard } = useClipboard()\n\n// Bring the status codes in the right order.\nconst orderedStatusCodes = computed<string[]>(() =>\n Object.keys(responses ?? {}).sort(),\n)\n\n// Filter to only valid response keys that should render in the example responses panel\nconst statusCodesWithContent = computed<string[]>(() =>\n orderedStatusCodes.value.filter((statusCode) =>\n hasResponseContent(getResolvedRef(responses?.[statusCode]), statusCode),\n ),\n)\n\n// Keep track of the current selected tab\nconst selectedResponseIndex = ref<number>(0)\n\n/**\n * Clamp the selected index when the filtered list shrinks.\n * Without this, the index can become out of bounds and cause a mismatch\n * between the visible tabs and the displayed content.\n *\n * We also reset `selectedExampleKey` to match the behavior of `changeTab`,\n * since the new response may not have the same example keys.\n */\nwatch(statusCodesWithContent, (codes) => {\n if (codes.length === 0) {\n selectedResponseIndex.value = 0\n selectedExampleKey.value = ''\n } else if (selectedResponseIndex.value >= codes.length) {\n selectedResponseIndex.value = codes.length - 1\n selectedExampleKey.value = ''\n }\n})\n\n// Return the whole response object\nconst currentResponse = computed(() => {\n const currentStatusCode =\n toValue(statusCodesWithContent)[toValue(selectedResponseIndex)] ?? ''\n\n return getResolvedRef(responses?.[currentStatusCode])\n})\n\nconst currentResponseContent = computed<MediaTypeObject | undefined>(() => {\n const normalizedContent = normalizeMimeTypeObject(\n currentResponse.value?.content,\n )\n\n /** All the keys of the normalized content */\n const keys = objectKeys(normalizedContent ?? {})\n return normalizedContent?.[keys[0] ?? '']\n})\n\nconst hasMultipleExamples = computed<boolean>(\n () =>\n !!currentResponseContent.value?.examples &&\n Object.keys(currentResponseContent.value?.examples ?? {}).length > 1,\n)\n\nconst selectedExampleKey = ref<string>(\n Object.keys(currentResponseContent.value?.examples ?? {})[0] ?? '',\n)\n\n/** Get the current example to display */\nconst currentExample = computed(() => {\n if (!currentResponseContent.value) {\n return undefined\n }\n\n // When multiple examples exist and one is selected, we access it directly\n if (hasMultipleExamples.value && selectedExampleKey.value) {\n return currentResponseContent.value.examples?.[selectedExampleKey.value]\n }\n\n // Otherwise, we use getExample with an undefined exampleKey to handle fallbacks\n return getExample(currentResponseContent.value, undefined, undefined)\n})\n\nconst changeTab = (index: number) => {\n selectedResponseIndex.value = index\n selectedExampleKey.value = ''\n}\n\nconst showSchema = ref(false)\n</script>\n<template>\n <ScalarCard\n v-if=\"statusCodesWithContent.length\"\n aria-label=\"Example Responses\"\n class=\"response-card\"\n role=\"region\">\n <ExampleResponseTabList @change=\"changeTab\">\n <ExampleResponseTab\n v-for=\"statusCode in statusCodesWithContent\"\n :key=\"statusCode\"\n :aria-controls=\"id\">\n <ScreenReader>Status:</ScreenReader>\n {{ statusCode }}\n </ExampleResponseTab>\n\n <template #actions>\n <button\n v-if=\"currentResponseContent?.example\"\n class=\"code-copy\"\n type=\"button\"\n @click=\"() => copyToClipboard(currentResponseContent?.example)\">\n <ScalarIcon\n icon=\"Clipboard\"\n width=\"12px\" />\n </button>\n <label\n v-if=\"currentResponseContent?.schema\"\n class=\"scalar-card-checkbox\">\n Show Schema\n <input\n v-model=\"showSchema\"\n :aria-controls=\"id\"\n class=\"scalar-card-checkbox-input\"\n type=\"checkbox\" />\n <span class=\"scalar-card-checkbox-checkmark\" />\n </label>\n </template>\n </ExampleResponseTabList>\n <ScalarCardSection class=\"grid flex-1\">\n <!-- Schema -->\n <ExampleSchema\n v-if=\"currentResponseContent?.schema && showSchema\"\n :id=\"id\"\n :schema=\"currentResponseContent?.schema\" />\n\n <!-- Example -->\n <ExampleResponse\n v-else\n :id=\"id\"\n :example=\"currentExample\"\n :response=\"currentResponseContent\" />\n </ScalarCardSection>\n <ScalarCardFooter\n v-if=\"currentResponse?.description || hasMultipleExamples\"\n class=\"response-card-footer\">\n <ExamplePicker\n v-if=\"hasMultipleExamples\"\n v-model=\"selectedExampleKey\"\n class=\"response-example-selector px-0\"\n :examples=\"currentResponseContent?.examples\" />\n <div class=\"response-description\">\n <ScalarMarkdown\n v-if=\"currentResponse?.description\"\n class=\"response-description-markdown\"\n :value=\"currentResponse.description\" />\n </div>\n </ScalarCardFooter>\n </ScalarCard>\n</template>\n\n<style scoped>\n.response-card {\n font-size: var(--scalar-font-size-3);\n}\n\n.code-copy {\n display: flex;\n align-items: center;\n justify-content: center;\n appearance: none;\n -webkit-appearance: none;\n outline: none;\n background: transparent;\n cursor: pointer;\n color: var(--scalar-color-3);\n border: none;\n padding: 0;\n margin-right: 12px;\n}\n.code-copy:hover {\n color: var(--scalar-color-1);\n}\n.code-copy svg {\n width: 13px;\n height: 13px;\n}\n.response-card-footer {\n display: flex;\n flex-direction: row-reverse;\n flex-wrap: wrap;\n justify-content: start;\n flex-shrink: 0;\n padding: 7px 12px;\n column-gap: 8px;\n}\n.response-example-selector {\n flex-shrink: 0;\n margin: -4px;\n}\n.response-description {\n font-weight: var(--scalar-semibold);\n font-size: var(--scalar-small);\n color: var(--scalar-color--1);\n\n box-sizing: border-box;\n\n flex-grow: 1;\n}\n.response-description-markdown {\n max-height: 3lh;\n}\n\n.response-description-markdown :deep(*) {\n margin: 0;\n}\n.schema-type {\n font-size: var(--scalar-micro);\n color: var(--scalar-color-2);\n font-weight: var(--scalar-semibold);\n background: var(--scalar-background-3);\n padding: 2px 4px;\n border-radius: 4px;\n margin-right: 4px;\n}\n.schema-example {\n font-size: var(--scalar-micro);\n color: var(--scalar-color-2);\n font-weight: var(--scalar-semibold);\n}\n\n.example-response-tab {\n display: block;\n margin: 6px;\n}\n\n.scalar-card-checkbox {\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n min-height: 17px;\n cursor: pointer;\n user-select: none;\n font-size: var(--scalar-small);\n font-weight: var(--scalar-font-normal);\n color: var(--scalar-color-2);\n width: fit-content;\n white-space: nowrap;\n gap: 6px;\n padding: 7px 6px;\n}\n.scalar-card-checkbox:has(.scalar-card-checkbox-input:focus-visible)\n .scalar-card-checkbox-checkmark {\n outline: 1px solid var(--scalar-color-accent);\n}\n.scalar-card-checkbox:hover {\n color: var(--scalar-color--1);\n}\n.scalar-card-checkbox .scalar-card-checkbox-input {\n position: absolute;\n opacity: 0;\n cursor: pointer;\n height: 0;\n width: 0;\n}\n\n.scalar-card-checkbox-checkmark {\n height: 16px;\n width: 16px;\n border-radius: var(--scalar-radius);\n background-color: transparent;\n background-color: var(--scalar-background-3);\n box-shadow: inset 0 0 0 var(--scalar-border-width) var(--scalar-border-color);\n}\n.scalar-card-checkbox:has(.scalar-card-checkbox-input:checked) {\n color: var(--scalar-color-1);\n font-weight: var(--scalar-semibold);\n}\n\n.scalar-card-checkbox\n .scalar-card-checkbox-input:checked\n ~ .scalar-card-checkbox-checkmark {\n background-color: var(--scalar-button-1);\n box-shadow: none;\n}\n\n.scalar-card-checkbox-checkmark:after {\n content: '';\n position: absolute;\n display: none;\n}\n\n.scalar-card-checkbox\n .scalar-card-checkbox-input:checked\n ~ .scalar-card-checkbox-checkmark:after {\n display: block;\n}\n\n.scalar-card-checkbox .scalar-card-checkbox-checkmark:after {\n right: 11.5px;\n top: 12.5px;\n width: 5px;\n height: 9px;\n border: solid 1px var(--scalar-button-1-color);\n border-width: 0 1.5px 1.5px 0;\n transform: rotate(45deg);\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"ExampleResponses.vue.js","names":[],"sources":["../../../src/features/example-responses/ExampleResponses.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ExamplePicker } from '@scalar/blocks/code-example'\nimport {\n ScalarCard,\n ScalarCardFooter,\n ScalarCardSection,\n} from '@scalar/components/card'\nimport { ScalarIcon } from '@scalar/components/icon'\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport { objectKeys } from '@scalar/helpers/object/object-keys'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport { getExample } from '@scalar/workspace-store/request-example'\nimport type {\n MediaTypeObject,\n ResponsesObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed, ref, toValue, useId, watch } from 'vue'\n\nimport ScreenReader from '@/components/ScreenReader.vue'\nimport ExampleSchema from '@/features/example-responses/ExampleSchema.vue'\nimport { useLocalization } from '@/features/localization'\n\nimport ExampleResponse from './ExampleResponse.vue'\nimport ExampleResponseTab from './ExampleResponseTab.vue'\nimport ExampleResponseTabList from './ExampleResponseTabList.vue'\nimport { hasResponseContent } from './helpers/has-response-content'\nimport { normalizeMimeTypeObject } from './helpers/normalize-mime-type-object'\n\n/**\n * TODO: copyToClipboard isn't using the right content if there are multiple examples\n */\n\nconst { responses, selectedExample, eventBus } = defineProps<{\n responses: ResponsesObject\n /**\n * The document-wide selected example key. Honored only when the current response defines an\n * example with the same key, so response example pickers stay in sync between operations without\n * blanking out responses that do not share that key.\n */\n selectedExample?: string\n /** Event bus, used to broadcast the selected example so other operations can follow */\n eventBus?: WorkspaceEventBus\n}>()\nconst { translate } = useLocalization()\n\nconst id = useId()\nconst { copyToClipboard } = useClipboard()\n\n// Bring the status codes in the right order.\nconst orderedStatusCodes = computed<string[]>(() =>\n Object.keys(responses ?? {}).sort(),\n)\n\n// Filter to only valid response keys that should render in the example responses panel\nconst statusCodesWithContent = computed<string[]>(() =>\n orderedStatusCodes.value.filter((statusCode) =>\n hasResponseContent(getResolvedRef(responses?.[statusCode]), statusCode),\n ),\n)\n\n// Keep track of the current selected tab\nconst selectedResponseIndex = ref<number>(0)\n\n/**\n * Clamp the selected index when the filtered list shrinks.\n * Without this, the index can become out of bounds and cause a mismatch\n * between the visible tabs and the displayed content.\n *\n * We re-resolve `selectedExampleKey` the same way `changeTab` does, so the picker keeps the\n * document-wide selection when the newly active response defines it instead of being blanked out.\n */\nwatch(statusCodesWithContent, (codes) => {\n if (codes.length === 0) {\n selectedResponseIndex.value = 0\n } else if (selectedResponseIndex.value >= codes.length) {\n selectedResponseIndex.value = codes.length - 1\n } else {\n return\n }\n selectedExampleKey.value = resolveExampleKey(selectedExample)\n})\n\n// Return the whole response object\nconst currentResponse = computed(() => {\n const currentStatusCode =\n toValue(statusCodesWithContent)[toValue(selectedResponseIndex)] ?? ''\n\n return getResolvedRef(responses?.[currentStatusCode])\n})\n\nconst currentResponseContent = computed<MediaTypeObject | undefined>(() => {\n const normalizedContent = normalizeMimeTypeObject(\n currentResponse.value?.content,\n )\n\n /** All the keys of the normalized content */\n const keys = objectKeys(normalizedContent ?? {})\n return normalizedContent?.[keys[0] ?? '']\n})\n\nconst hasMultipleExamples = computed<boolean>(\n () =>\n !!currentResponseContent.value?.examples &&\n Object.keys(currentResponseContent.value?.examples ?? {}).length > 1,\n)\n\nconst selectedExampleKey = ref<string>('')\n\n/** Resolve the example key to show, preferring the document-wide selection when this response has it */\nconst resolveExampleKey = (preferred: string | undefined): string => {\n const keys = Object.keys(currentResponseContent.value?.examples ?? {})\n if (preferred && keys.includes(preferred)) {\n return preferred\n }\n // Keep the current example when it is still valid, otherwise fall back to the first one\n if (selectedExampleKey.value && keys.includes(selectedExampleKey.value)) {\n return selectedExampleKey.value\n }\n return keys[0] ?? ''\n}\n\n// Initialize from the document-wide selection, falling back to the first example\nselectedExampleKey.value = resolveExampleKey(selectedExample)\n\n// Follow the document-wide selection when it changes and this response has that example\nwatch(\n () => selectedExample,\n (preferred) => {\n selectedExampleKey.value = resolveExampleKey(preferred)\n },\n)\n\n/** Select an example and sync the choice across the document so other operations follow */\nconst selectExample = (key: string) => {\n selectedExampleKey.value = key\n eventBus?.emit('workspace:update:selected-example', key)\n}\n\n/** Get the current example to display */\nconst currentExample = computed(() => {\n if (!currentResponseContent.value) {\n return undefined\n }\n\n // When multiple examples exist and one is selected, we access it directly\n if (hasMultipleExamples.value && selectedExampleKey.value) {\n return currentResponseContent.value.examples?.[selectedExampleKey.value]\n }\n\n // Otherwise, we use getExample with an undefined exampleKey to handle fallbacks\n return getExample(currentResponseContent.value, undefined, undefined)\n})\n\nconst changeTab = (index: number) => {\n selectedResponseIndex.value = index\n // Re-apply the document-wide selection for the newly selected response, falling back to its first example\n selectedExampleKey.value = resolveExampleKey(selectedExample)\n}\n\nconst showSchema = ref(false)\n</script>\n<template>\n <ScalarCard\n v-if=\"statusCodesWithContent.length\"\n :aria-label=\"translate('response.exampleResponses')\"\n class=\"response-card\"\n role=\"region\">\n <ExampleResponseTabList @change=\"changeTab\">\n <ExampleResponseTab\n v-for=\"statusCode in statusCodesWithContent\"\n :key=\"statusCode\"\n :aria-controls=\"id\">\n <ScreenReader>{{ translate('response.status') }}:</ScreenReader>\n {{ statusCode }}\n </ExampleResponseTab>\n\n <template #actions>\n <button\n v-if=\"currentResponseContent?.example\"\n class=\"code-copy\"\n type=\"button\"\n @click=\"() => copyToClipboard(currentResponseContent?.example)\">\n <ScalarIcon\n icon=\"Clipboard\"\n width=\"12px\" />\n </button>\n <label\n v-if=\"currentResponseContent?.schema\"\n class=\"scalar-card-checkbox\">\n {{ translate('response.showSchema') }}\n <input\n v-model=\"showSchema\"\n :aria-controls=\"id\"\n class=\"scalar-card-checkbox-input\"\n type=\"checkbox\" />\n <span class=\"scalar-card-checkbox-checkmark\" />\n </label>\n </template>\n </ExampleResponseTabList>\n <ScalarCardSection class=\"grid flex-1\">\n <!-- Schema -->\n <ExampleSchema\n v-if=\"currentResponseContent?.schema && showSchema\"\n :id=\"id\"\n :schema=\"currentResponseContent?.schema\" />\n\n <!-- Example -->\n <ExampleResponse\n v-else\n :id=\"id\"\n :example=\"currentExample\"\n :response=\"currentResponseContent\" />\n </ScalarCardSection>\n <ScalarCardFooter\n v-if=\"currentResponse?.description || hasMultipleExamples\"\n class=\"response-card-footer\">\n <ExamplePicker\n v-if=\"hasMultipleExamples\"\n class=\"response-example-selector px-0\"\n :examples=\"currentResponseContent?.examples\"\n :modelValue=\"selectedExampleKey\"\n @update:modelValue=\"selectExample\" />\n <div class=\"response-description\">\n <ScalarMarkdown\n v-if=\"currentResponse?.description\"\n class=\"response-description-markdown\"\n :value=\"currentResponse.description\" />\n </div>\n </ScalarCardFooter>\n </ScalarCard>\n</template>\n\n<style scoped>\n.response-card {\n font-size: var(--scalar-font-size-3);\n}\n\n.code-copy {\n display: flex;\n align-items: center;\n justify-content: center;\n appearance: none;\n -webkit-appearance: none;\n outline: none;\n background: transparent;\n cursor: pointer;\n color: var(--scalar-color-3);\n border: none;\n padding: 0;\n margin-right: 12px;\n}\n.code-copy:hover {\n color: var(--scalar-color-1);\n}\n.code-copy svg {\n width: 13px;\n height: 13px;\n}\n.response-card-footer {\n display: flex;\n flex-direction: row-reverse;\n flex-wrap: wrap;\n justify-content: start;\n flex-shrink: 0;\n padding: 7px 12px;\n column-gap: 8px;\n}\n.response-example-selector {\n flex-shrink: 0;\n margin: -4px;\n}\n.response-description {\n font-weight: var(--scalar-semibold);\n font-size: var(--scalar-small);\n color: var(--scalar-color--1);\n\n box-sizing: border-box;\n\n flex-grow: 1;\n}\n.response-description-markdown {\n max-height: 3lh;\n}\n\n.response-description-markdown :deep(*) {\n margin: 0;\n}\n.schema-type {\n font-size: var(--scalar-micro);\n color: var(--scalar-color-2);\n font-weight: var(--scalar-semibold);\n background: var(--scalar-background-3);\n padding: 2px 4px;\n border-radius: 4px;\n margin-right: 4px;\n}\n.schema-example {\n font-size: var(--scalar-micro);\n color: var(--scalar-color-2);\n font-weight: var(--scalar-semibold);\n}\n\n.example-response-tab {\n display: block;\n margin: 6px;\n}\n\n.scalar-card-checkbox {\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n min-height: 17px;\n cursor: pointer;\n user-select: none;\n font-size: var(--scalar-small);\n font-weight: var(--scalar-font-normal);\n color: var(--scalar-color-2);\n width: fit-content;\n white-space: nowrap;\n gap: 6px;\n padding: 7px 6px;\n}\n.scalar-card-checkbox:has(.scalar-card-checkbox-input:focus-visible)\n .scalar-card-checkbox-checkmark {\n outline: 1px solid var(--scalar-color-accent);\n}\n.scalar-card-checkbox:hover {\n color: var(--scalar-color--1);\n}\n.scalar-card-checkbox .scalar-card-checkbox-input {\n position: absolute;\n opacity: 0;\n cursor: pointer;\n height: 0;\n width: 0;\n}\n\n.scalar-card-checkbox-checkmark {\n height: 16px;\n width: 16px;\n border-radius: var(--scalar-radius);\n background-color: transparent;\n background-color: var(--scalar-background-3);\n box-shadow: inset 0 0 0 var(--scalar-border-width) var(--scalar-border-color);\n}\n.scalar-card-checkbox:has(.scalar-card-checkbox-input:checked) {\n color: var(--scalar-color-1);\n font-weight: var(--scalar-semibold);\n}\n\n.scalar-card-checkbox\n .scalar-card-checkbox-input:checked\n ~ .scalar-card-checkbox-checkmark {\n background-color: var(--scalar-button-1);\n box-shadow: none;\n}\n\n.scalar-card-checkbox-checkmark:after {\n content: '';\n position: absolute;\n display: none;\n}\n\n.scalar-card-checkbox\n .scalar-card-checkbox-input:checked\n ~ .scalar-card-checkbox-checkmark:after {\n display: block;\n}\n\n.scalar-card-checkbox .scalar-card-checkbox-checkmark:after {\n right: 11.5px;\n top: 12.5px;\n width: 5px;\n height: 9px;\n border: solid 1px var(--scalar-button-1-color);\n border-width: 0 1.5px 1.5px 0;\n transform: rotate(45deg);\n}\n</style>\n"],"mappings":""}
@@ -1,3 +1,4 @@
1
+ import { useLocalization } from "../localization/use-localization.js";
1
2
  import ScreenReader_default from "../../components/ScreenReader.vue.js";
2
3
  import ExampleSchema_default from "./ExampleSchema.vue.js";
3
4
  import ExampleResponse_default from "./ExampleResponse.vue.js";
@@ -8,9 +9,9 @@ import { hasResponseContent } from "./helpers/has-response-content.js";
8
9
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, openBlock, ref, renderList, toDisplayString, toValue, unref, useId, vModelCheckbox, watch, withCtx, withDirectives } from "vue";
9
10
  import { useClipboard } from "@scalar/use-hooks/useClipboard";
10
11
  import { getExample } from "@scalar/workspace-store/request-example";
11
- import { ExamplePicker } from "@scalar/api-client/blocks/operation-code-sample";
12
- import { ScalarMarkdown } from "@scalar/components/markdown";
13
12
  import { getResolvedRef } from "@scalar/workspace-store/helpers/get-resolved-ref";
13
+ import { ExamplePicker } from "@scalar/blocks/code-example";
14
+ import { ScalarMarkdown } from "@scalar/components/markdown";
14
15
  import { ScalarIcon } from "@scalar/components/icon";
15
16
  import { objectKeys } from "@scalar/helpers/object/object-keys";
16
17
  import { ScalarCard, ScalarCardFooter, ScalarCardSection } from "@scalar/components/card";
@@ -26,8 +27,13 @@ var _hoisted_3 = { class: "response-description" };
26
27
  */
27
28
  var ExampleResponses_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
28
29
  __name: "ExampleResponses",
29
- props: { responses: {} },
30
+ props: {
31
+ responses: {},
32
+ selectedExample: {},
33
+ eventBus: {}
34
+ },
30
35
  setup(__props) {
36
+ const { translate } = useLocalization();
31
37
  const id = useId();
32
38
  const { copyToClipboard } = useClipboard();
33
39
  const orderedStatusCodes = computed(() => Object.keys(__props.responses ?? {}).sort());
@@ -38,17 +44,14 @@ var ExampleResponses_vue_vue_type_script_setup_true_lang_default = /* @__PURE__
38
44
  * Without this, the index can become out of bounds and cause a mismatch
39
45
  * between the visible tabs and the displayed content.
40
46
  *
41
- * We also reset `selectedExampleKey` to match the behavior of `changeTab`,
42
- * since the new response may not have the same example keys.
47
+ * We re-resolve `selectedExampleKey` the same way `changeTab` does, so the picker keeps the
48
+ * document-wide selection when the newly active response defines it instead of being blanked out.
43
49
  */
44
50
  watch(statusCodesWithContent, (codes) => {
45
- if (codes.length === 0) {
46
- selectedResponseIndex.value = 0;
47
- selectedExampleKey.value = "";
48
- } else if (selectedResponseIndex.value >= codes.length) {
49
- selectedResponseIndex.value = codes.length - 1;
50
- selectedExampleKey.value = "";
51
- }
51
+ if (codes.length === 0) selectedResponseIndex.value = 0;
52
+ else if (selectedResponseIndex.value >= codes.length) selectedResponseIndex.value = codes.length - 1;
53
+ else return;
54
+ selectedExampleKey.value = resolveExampleKey(__props.selectedExample);
52
55
  });
53
56
  const currentResponse = computed(() => {
54
57
  const currentStatusCode = toValue(statusCodesWithContent)[toValue(selectedResponseIndex)] ?? "";
@@ -61,7 +64,23 @@ var ExampleResponses_vue_vue_type_script_setup_true_lang_default = /* @__PURE__
61
64
  return normalizedContent?.[keys[0] ?? ""];
62
65
  });
63
66
  const hasMultipleExamples = computed(() => !!currentResponseContent.value?.examples && Object.keys(currentResponseContent.value?.examples ?? {}).length > 1);
64
- const selectedExampleKey = ref(Object.keys(currentResponseContent.value?.examples ?? {})[0] ?? "");
67
+ const selectedExampleKey = ref("");
68
+ /** Resolve the example key to show, preferring the document-wide selection when this response has it */
69
+ const resolveExampleKey = (preferred) => {
70
+ const keys = Object.keys(currentResponseContent.value?.examples ?? {});
71
+ if (preferred && keys.includes(preferred)) return preferred;
72
+ if (selectedExampleKey.value && keys.includes(selectedExampleKey.value)) return selectedExampleKey.value;
73
+ return keys[0] ?? "";
74
+ };
75
+ selectedExampleKey.value = resolveExampleKey(__props.selectedExample);
76
+ watch(() => __props.selectedExample, (preferred) => {
77
+ selectedExampleKey.value = resolveExampleKey(preferred);
78
+ });
79
+ /** Select an example and sync the choice across the document so other operations follow */
80
+ const selectExample = (key) => {
81
+ selectedExampleKey.value = key;
82
+ __props.eventBus?.emit("workspace:update:selected-example", key);
83
+ };
65
84
  /** Get the current example to display */
66
85
  const currentExample = computed(() => {
67
86
  if (!currentResponseContent.value) return;
@@ -70,13 +89,13 @@ var ExampleResponses_vue_vue_type_script_setup_true_lang_default = /* @__PURE__
70
89
  });
71
90
  const changeTab = (index) => {
72
91
  selectedResponseIndex.value = index;
73
- selectedExampleKey.value = "";
92
+ selectedExampleKey.value = resolveExampleKey(__props.selectedExample);
74
93
  };
75
94
  const showSchema = ref(false);
76
95
  return (_ctx, _cache) => {
77
96
  return statusCodesWithContent.value.length ? (openBlock(), createBlock(unref(ScalarCard), {
78
97
  key: 0,
79
- "aria-label": "Example Responses",
98
+ "aria-label": unref(translate)("response.exampleResponses"),
80
99
  class: "response-card",
81
100
  role: "region"
82
101
  }, {
@@ -91,14 +110,14 @@ var ExampleResponses_vue_vue_type_script_setup_true_lang_default = /* @__PURE__
91
110
  icon: "Clipboard",
92
111
  width: "12px"
93
112
  })])) : createCommentVNode("", true), currentResponseContent.value?.schema ? (openBlock(), createElementBlock("label", _hoisted_1, [
94
- _cache[4] || (_cache[4] = createTextVNode(" Show Schema ", -1)),
113
+ createTextVNode(toDisplayString(unref(translate)("response.showSchema")) + " ", 1),
95
114
  withDirectives(createElementVNode("input", {
96
115
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => showSchema.value = $event),
97
116
  "aria-controls": unref(id),
98
117
  class: "scalar-card-checkbox-input",
99
118
  type: "checkbox"
100
119
  }, null, 8, _hoisted_2), [[vModelCheckbox, showSchema.value]]),
101
- _cache[5] || (_cache[5] = createElementVNode("span", { class: "scalar-card-checkbox-checkmark" }, null, -1))
120
+ _cache[2] || (_cache[2] = createElementVNode("span", { class: "scalar-card-checkbox-checkmark" }, null, -1))
102
121
  ])) : createCommentVNode("", true)]),
103
122
  default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(statusCodesWithContent.value, (statusCode) => {
104
123
  return openBlock(), createBlock(ExampleResponseTab_default, {
@@ -106,7 +125,7 @@ var ExampleResponses_vue_vue_type_script_setup_true_lang_default = /* @__PURE__
106
125
  "aria-controls": unref(id)
107
126
  }, {
108
127
  default: withCtx(() => [createVNode(ScreenReader_default, null, {
109
- default: withCtx(() => [..._cache[3] || (_cache[3] = [createTextVNode("Status:", -1)])]),
128
+ default: withCtx(() => [createTextVNode(toDisplayString(unref(translate)("response.status")) + ":", 1)]),
110
129
  _: 1
111
130
  }), createTextVNode(" " + toDisplayString(statusCode), 1)]),
112
131
  _: 2
@@ -137,11 +156,11 @@ var ExampleResponses_vue_vue_type_script_setup_true_lang_default = /* @__PURE__
137
156
  }, {
138
157
  default: withCtx(() => [hasMultipleExamples.value ? (openBlock(), createBlock(unref(ExamplePicker), {
139
158
  key: 0,
140
- modelValue: selectedExampleKey.value,
141
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => selectedExampleKey.value = $event),
142
159
  class: "response-example-selector px-0",
143
- examples: currentResponseContent.value?.examples
144
- }, null, 8, ["modelValue", "examples"])) : createCommentVNode("", true), createElementVNode("div", _hoisted_3, [currentResponse.value?.description ? (openBlock(), createBlock(unref(ScalarMarkdown), {
160
+ examples: currentResponseContent.value?.examples,
161
+ modelValue: selectedExampleKey.value,
162
+ "onUpdate:modelValue": selectExample
163
+ }, null, 8, ["examples", "modelValue"])) : createCommentVNode("", true), createElementVNode("div", _hoisted_3, [currentResponse.value?.description ? (openBlock(), createBlock(unref(ScalarMarkdown), {
145
164
  key: 0,
146
165
  class: "response-description-markdown",
147
166
  value: currentResponse.value.description
@@ -150,7 +169,7 @@ var ExampleResponses_vue_vue_type_script_setup_true_lang_default = /* @__PURE__
150
169
  })) : createCommentVNode("", true)
151
170
  ]),
152
171
  _: 1
153
- })) : createCommentVNode("", true);
172
+ }, 8, ["aria-label"])) : createCommentVNode("", true);
154
173
  };
155
174
  }
156
175
  });
@@ -1 +1 @@
1
- {"version":3,"file":"ExampleResponses.vue.script.js","names":[],"sources":["../../../src/features/example-responses/ExampleResponses.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ExamplePicker } from '@scalar/api-client/blocks/operation-code-sample'\nimport {\n ScalarCard,\n ScalarCardFooter,\n ScalarCardSection,\n} from '@scalar/components/card'\nimport { ScalarIcon } from '@scalar/components/icon'\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport { objectKeys } from '@scalar/helpers/object/object-keys'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport { getExample } from '@scalar/workspace-store/request-example'\nimport type {\n MediaTypeObject,\n ResponsesObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed, ref, toValue, useId, watch } from 'vue'\n\nimport ScreenReader from '@/components/ScreenReader.vue'\nimport ExampleSchema from '@/features/example-responses/ExampleSchema.vue'\n\nimport ExampleResponse from './ExampleResponse.vue'\nimport ExampleResponseTab from './ExampleResponseTab.vue'\nimport ExampleResponseTabList from './ExampleResponseTabList.vue'\nimport { hasResponseContent } from './helpers/has-response-content'\nimport { normalizeMimeTypeObject } from './helpers/normalize-mime-type-object'\n\n/**\n * TODO: copyToClipboard isn't using the right content if there are multiple examples\n */\n\nconst { responses } = defineProps<{\n responses: ResponsesObject\n}>()\n\nconst id = useId()\nconst { copyToClipboard } = useClipboard()\n\n// Bring the status codes in the right order.\nconst orderedStatusCodes = computed<string[]>(() =>\n Object.keys(responses ?? {}).sort(),\n)\n\n// Filter to only valid response keys that should render in the example responses panel\nconst statusCodesWithContent = computed<string[]>(() =>\n orderedStatusCodes.value.filter((statusCode) =>\n hasResponseContent(getResolvedRef(responses?.[statusCode]), statusCode),\n ),\n)\n\n// Keep track of the current selected tab\nconst selectedResponseIndex = ref<number>(0)\n\n/**\n * Clamp the selected index when the filtered list shrinks.\n * Without this, the index can become out of bounds and cause a mismatch\n * between the visible tabs and the displayed content.\n *\n * We also reset `selectedExampleKey` to match the behavior of `changeTab`,\n * since the new response may not have the same example keys.\n */\nwatch(statusCodesWithContent, (codes) => {\n if (codes.length === 0) {\n selectedResponseIndex.value = 0\n selectedExampleKey.value = ''\n } else if (selectedResponseIndex.value >= codes.length) {\n selectedResponseIndex.value = codes.length - 1\n selectedExampleKey.value = ''\n }\n})\n\n// Return the whole response object\nconst currentResponse = computed(() => {\n const currentStatusCode =\n toValue(statusCodesWithContent)[toValue(selectedResponseIndex)] ?? ''\n\n return getResolvedRef(responses?.[currentStatusCode])\n})\n\nconst currentResponseContent = computed<MediaTypeObject | undefined>(() => {\n const normalizedContent = normalizeMimeTypeObject(\n currentResponse.value?.content,\n )\n\n /** All the keys of the normalized content */\n const keys = objectKeys(normalizedContent ?? {})\n return normalizedContent?.[keys[0] ?? '']\n})\n\nconst hasMultipleExamples = computed<boolean>(\n () =>\n !!currentResponseContent.value?.examples &&\n Object.keys(currentResponseContent.value?.examples ?? {}).length > 1,\n)\n\nconst selectedExampleKey = ref<string>(\n Object.keys(currentResponseContent.value?.examples ?? {})[0] ?? '',\n)\n\n/** Get the current example to display */\nconst currentExample = computed(() => {\n if (!currentResponseContent.value) {\n return undefined\n }\n\n // When multiple examples exist and one is selected, we access it directly\n if (hasMultipleExamples.value && selectedExampleKey.value) {\n return currentResponseContent.value.examples?.[selectedExampleKey.value]\n }\n\n // Otherwise, we use getExample with an undefined exampleKey to handle fallbacks\n return getExample(currentResponseContent.value, undefined, undefined)\n})\n\nconst changeTab = (index: number) => {\n selectedResponseIndex.value = index\n selectedExampleKey.value = ''\n}\n\nconst showSchema = ref(false)\n</script>\n<template>\n <ScalarCard\n v-if=\"statusCodesWithContent.length\"\n aria-label=\"Example Responses\"\n class=\"response-card\"\n role=\"region\">\n <ExampleResponseTabList @change=\"changeTab\">\n <ExampleResponseTab\n v-for=\"statusCode in statusCodesWithContent\"\n :key=\"statusCode\"\n :aria-controls=\"id\">\n <ScreenReader>Status:</ScreenReader>\n {{ statusCode }}\n </ExampleResponseTab>\n\n <template #actions>\n <button\n v-if=\"currentResponseContent?.example\"\n class=\"code-copy\"\n type=\"button\"\n @click=\"() => copyToClipboard(currentResponseContent?.example)\">\n <ScalarIcon\n icon=\"Clipboard\"\n width=\"12px\" />\n </button>\n <label\n v-if=\"currentResponseContent?.schema\"\n class=\"scalar-card-checkbox\">\n Show Schema\n <input\n v-model=\"showSchema\"\n :aria-controls=\"id\"\n class=\"scalar-card-checkbox-input\"\n type=\"checkbox\" />\n <span class=\"scalar-card-checkbox-checkmark\" />\n </label>\n </template>\n </ExampleResponseTabList>\n <ScalarCardSection class=\"grid flex-1\">\n <!-- Schema -->\n <ExampleSchema\n v-if=\"currentResponseContent?.schema && showSchema\"\n :id=\"id\"\n :schema=\"currentResponseContent?.schema\" />\n\n <!-- Example -->\n <ExampleResponse\n v-else\n :id=\"id\"\n :example=\"currentExample\"\n :response=\"currentResponseContent\" />\n </ScalarCardSection>\n <ScalarCardFooter\n v-if=\"currentResponse?.description || hasMultipleExamples\"\n class=\"response-card-footer\">\n <ExamplePicker\n v-if=\"hasMultipleExamples\"\n v-model=\"selectedExampleKey\"\n class=\"response-example-selector px-0\"\n :examples=\"currentResponseContent?.examples\" />\n <div class=\"response-description\">\n <ScalarMarkdown\n v-if=\"currentResponse?.description\"\n class=\"response-description-markdown\"\n :value=\"currentResponse.description\" />\n </div>\n </ScalarCardFooter>\n </ScalarCard>\n</template>\n\n<style scoped>\n.response-card {\n font-size: var(--scalar-font-size-3);\n}\n\n.code-copy {\n display: flex;\n align-items: center;\n justify-content: center;\n appearance: none;\n -webkit-appearance: none;\n outline: none;\n background: transparent;\n cursor: pointer;\n color: var(--scalar-color-3);\n border: none;\n padding: 0;\n margin-right: 12px;\n}\n.code-copy:hover {\n color: var(--scalar-color-1);\n}\n.code-copy svg {\n width: 13px;\n height: 13px;\n}\n.response-card-footer {\n display: flex;\n flex-direction: row-reverse;\n flex-wrap: wrap;\n justify-content: start;\n flex-shrink: 0;\n padding: 7px 12px;\n column-gap: 8px;\n}\n.response-example-selector {\n flex-shrink: 0;\n margin: -4px;\n}\n.response-description {\n font-weight: var(--scalar-semibold);\n font-size: var(--scalar-small);\n color: var(--scalar-color--1);\n\n box-sizing: border-box;\n\n flex-grow: 1;\n}\n.response-description-markdown {\n max-height: 3lh;\n}\n\n.response-description-markdown :deep(*) {\n margin: 0;\n}\n.schema-type {\n font-size: var(--scalar-micro);\n color: var(--scalar-color-2);\n font-weight: var(--scalar-semibold);\n background: var(--scalar-background-3);\n padding: 2px 4px;\n border-radius: 4px;\n margin-right: 4px;\n}\n.schema-example {\n font-size: var(--scalar-micro);\n color: var(--scalar-color-2);\n font-weight: var(--scalar-semibold);\n}\n\n.example-response-tab {\n display: block;\n margin: 6px;\n}\n\n.scalar-card-checkbox {\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n min-height: 17px;\n cursor: pointer;\n user-select: none;\n font-size: var(--scalar-small);\n font-weight: var(--scalar-font-normal);\n color: var(--scalar-color-2);\n width: fit-content;\n white-space: nowrap;\n gap: 6px;\n padding: 7px 6px;\n}\n.scalar-card-checkbox:has(.scalar-card-checkbox-input:focus-visible)\n .scalar-card-checkbox-checkmark {\n outline: 1px solid var(--scalar-color-accent);\n}\n.scalar-card-checkbox:hover {\n color: var(--scalar-color--1);\n}\n.scalar-card-checkbox .scalar-card-checkbox-input {\n position: absolute;\n opacity: 0;\n cursor: pointer;\n height: 0;\n width: 0;\n}\n\n.scalar-card-checkbox-checkmark {\n height: 16px;\n width: 16px;\n border-radius: var(--scalar-radius);\n background-color: transparent;\n background-color: var(--scalar-background-3);\n box-shadow: inset 0 0 0 var(--scalar-border-width) var(--scalar-border-color);\n}\n.scalar-card-checkbox:has(.scalar-card-checkbox-input:checked) {\n color: var(--scalar-color-1);\n font-weight: var(--scalar-semibold);\n}\n\n.scalar-card-checkbox\n .scalar-card-checkbox-input:checked\n ~ .scalar-card-checkbox-checkmark {\n background-color: var(--scalar-button-1);\n box-shadow: none;\n}\n\n.scalar-card-checkbox-checkmark:after {\n content: '';\n position: absolute;\n display: none;\n}\n\n.scalar-card-checkbox\n .scalar-card-checkbox-input:checked\n ~ .scalar-card-checkbox-checkmark:after {\n display: block;\n}\n\n.scalar-card-checkbox .scalar-card-checkbox-checkmark:after {\n right: 11.5px;\n top: 12.5px;\n width: 5px;\n height: 9px;\n border: solid 1px var(--scalar-button-1-color);\n border-width: 0 1.5px 1.5px 0;\n transform: rotate(45deg);\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoCA,MAAM,KAAK,OAAM;EACjB,MAAM,EAAE,oBAAoB,cAAa;EAGzC,MAAM,qBAAqB,eACzB,OAAO,KAAK,QAAA,aAAa,EAAE,CAAC,CAAC,MAAM,CACrC;EAGA,MAAM,yBAAyB,eAC7B,mBAAmB,MAAM,QAAQ,eAC/B,mBAAmB,eAAe,QAAA,YAAY,YAAY,EAAE,WAAW,CACxE,CACH;EAGA,MAAM,wBAAwB,IAAY,EAAC;;;;;;;;;AAU3C,QAAM,yBAAyB,UAAU;AACvC,OAAI,MAAM,WAAW,GAAG;AACtB,0BAAsB,QAAQ;AAC9B,uBAAmB,QAAQ;cAClB,sBAAsB,SAAS,MAAM,QAAQ;AACtD,0BAAsB,QAAQ,MAAM,SAAS;AAC7C,uBAAmB,QAAQ;;IAE9B;EAGD,MAAM,kBAAkB,eAAe;GACrC,MAAM,oBACJ,QAAQ,uBAAuB,CAAC,QAAQ,sBAAsB,KAAK;AAErE,UAAO,eAAe,QAAA,YAAY,mBAAkB;IACrD;EAED,MAAM,yBAAyB,eAA4C;GACzE,MAAM,oBAAoB,wBACxB,gBAAgB,OAAO,QACzB;;GAGA,MAAM,OAAO,WAAW,qBAAqB,EAAE,CAAA;AAC/C,UAAO,oBAAoB,KAAK,MAAM;IACvC;EAED,MAAM,sBAAsB,eAExB,CAAC,CAAC,uBAAuB,OAAO,YAChC,OAAO,KAAK,uBAAuB,OAAO,YAAY,EAAE,CAAC,CAAC,SAAS,EACvE;EAEA,MAAM,qBAAqB,IACzB,OAAO,KAAK,uBAAuB,OAAO,YAAY,EAAE,CAAC,CAAC,MAAM,GAClE;;EAGA,MAAM,iBAAiB,eAAe;AACpC,OAAI,CAAC,uBAAuB,MAC1B;AAIF,OAAI,oBAAoB,SAAS,mBAAmB,MAClD,QAAO,uBAAuB,MAAM,WAAW,mBAAmB;AAIpE,UAAO,WAAW,uBAAuB,OAAO,KAAA,GAAW,KAAA,EAAS;IACrE;EAED,MAAM,aAAa,UAAkB;AACnC,yBAAsB,QAAQ;AAC9B,sBAAmB,QAAQ;;EAG7B,MAAM,aAAa,IAAI,MAAK;;UAIlB,uBAAA,MAAuB,UAAA,WAAA,EAD/B,YAkEa,MAAA,WAAA,EAAA;;IAhEX,cAAW;IACX,OAAM;IACN,MAAK;;2BAgCoB;KA/BzB,YA+ByB,gCAAA,EA/BA,UAAQ,WAAS,EAAA;MAS7B,SAAO,cASP,CAPD,uBAAA,OAAwB,WAAA,WAAA,EADhC,mBAQS,UAAA;;OANP,OAAM;OACN,MAAK;OACJ,SAAK,OAAA,OAAA,OAAA,WAAQ,MAAA,gBAAe,CAAC,uBAAA,OAAwB,QAAO;UAC7D,YAEiB,MAAA,WAAA,EAAA;OADf,MAAK;OACL,OAAM;4CAGF,uBAAA,OAAwB,UAAA,WAAA,EADhC,mBAUQ,SAVR,YAUQ;iDARuB,iBAE7B,GAAA;sBAAA,mBAIoB,SAAA;gFAHC,QAAA;QAClB,iBAAe,MAAA,GAAE;QAClB,OAAM;QACN,MAAK;kDAHI,WAAA,MAAU,CAAA,CAAA;iCAIrB,mBAA+C,QAAA,EAAzC,OAAM,kCAAgC,EAAA,MAAA,GAAA;;6BA1BF,EAAA,UAAA,KAAA,EAD9C,mBAMqB,UAAA,MAAA,WALE,uBAAA,QAAd,eAAU;2BADnB,YAMqB,4BAAA;QAJlB,KAAK;QACL,iBAAe,MAAA,GAAE;;+BACkB,CAApC,YAAoC,sBAAA,MAAA;gCAAf,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAAP,WAAO,GAAA,CAAA,EAAA,CAAA;;4BAAe,MACpC,gBAAG,WAAU,EAAA,EAAA,CAAA,CAAA;;;;;;KA0BjB,YAaoB,MAAA,kBAAA,EAAA,EAbD,OAAM,eAAa,EAAA;6BAKS,CAFrC,uBAAA,OAAwB,UAAU,WAAA,SAAA,WAAA,EAD1C,YAG6C,uBAAA;;OAD1C,IAAI,MAAA,GAAE;OACN,QAAQ,uBAAA,OAAwB;qDAGnC,YAIuC,yBAAA;;OAFpC,IAAI,MAAA,GAAE;OACN,SAAS,eAAA;OACT,UAAU,uBAAA;;;;;;;;KAGP,gBAAA,OAAiB,eAAe,oBAAA,SAAA,WAAA,EADxC,YAcmB,MAAA,iBAAA,EAAA;;MAZjB,OAAM;;6BAK2C,CAHzC,oBAAA,SAAA,WAAA,EADR,YAIiD,MAAA,cAAA,EAAA;;mBAFtC,mBAAA;uFAAkB,QAAA;OAC3B,OAAM;OACL,UAAU,uBAAA,OAAwB;+EACrC,mBAKM,OALN,YAKM,CAHI,gBAAA,OAAiB,eAAA,WAAA,EADzB,YAGyC,MAAA,eAAA,EAAA;;OADvC,OAAM;OACL,OAAO,gBAAA,MAAgB"}
1
+ {"version":3,"file":"ExampleResponses.vue.script.js","names":[],"sources":["../../../src/features/example-responses/ExampleResponses.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ExamplePicker } from '@scalar/blocks/code-example'\nimport {\n ScalarCard,\n ScalarCardFooter,\n ScalarCardSection,\n} from '@scalar/components/card'\nimport { ScalarIcon } from '@scalar/components/icon'\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport { objectKeys } from '@scalar/helpers/object/object-keys'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport { getExample } from '@scalar/workspace-store/request-example'\nimport type {\n MediaTypeObject,\n ResponsesObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed, ref, toValue, useId, watch } from 'vue'\n\nimport ScreenReader from '@/components/ScreenReader.vue'\nimport ExampleSchema from '@/features/example-responses/ExampleSchema.vue'\nimport { useLocalization } from '@/features/localization'\n\nimport ExampleResponse from './ExampleResponse.vue'\nimport ExampleResponseTab from './ExampleResponseTab.vue'\nimport ExampleResponseTabList from './ExampleResponseTabList.vue'\nimport { hasResponseContent } from './helpers/has-response-content'\nimport { normalizeMimeTypeObject } from './helpers/normalize-mime-type-object'\n\n/**\n * TODO: copyToClipboard isn't using the right content if there are multiple examples\n */\n\nconst { responses, selectedExample, eventBus } = defineProps<{\n responses: ResponsesObject\n /**\n * The document-wide selected example key. Honored only when the current response defines an\n * example with the same key, so response example pickers stay in sync between operations without\n * blanking out responses that do not share that key.\n */\n selectedExample?: string\n /** Event bus, used to broadcast the selected example so other operations can follow */\n eventBus?: WorkspaceEventBus\n}>()\nconst { translate } = useLocalization()\n\nconst id = useId()\nconst { copyToClipboard } = useClipboard()\n\n// Bring the status codes in the right order.\nconst orderedStatusCodes = computed<string[]>(() =>\n Object.keys(responses ?? {}).sort(),\n)\n\n// Filter to only valid response keys that should render in the example responses panel\nconst statusCodesWithContent = computed<string[]>(() =>\n orderedStatusCodes.value.filter((statusCode) =>\n hasResponseContent(getResolvedRef(responses?.[statusCode]), statusCode),\n ),\n)\n\n// Keep track of the current selected tab\nconst selectedResponseIndex = ref<number>(0)\n\n/**\n * Clamp the selected index when the filtered list shrinks.\n * Without this, the index can become out of bounds and cause a mismatch\n * between the visible tabs and the displayed content.\n *\n * We re-resolve `selectedExampleKey` the same way `changeTab` does, so the picker keeps the\n * document-wide selection when the newly active response defines it instead of being blanked out.\n */\nwatch(statusCodesWithContent, (codes) => {\n if (codes.length === 0) {\n selectedResponseIndex.value = 0\n } else if (selectedResponseIndex.value >= codes.length) {\n selectedResponseIndex.value = codes.length - 1\n } else {\n return\n }\n selectedExampleKey.value = resolveExampleKey(selectedExample)\n})\n\n// Return the whole response object\nconst currentResponse = computed(() => {\n const currentStatusCode =\n toValue(statusCodesWithContent)[toValue(selectedResponseIndex)] ?? ''\n\n return getResolvedRef(responses?.[currentStatusCode])\n})\n\nconst currentResponseContent = computed<MediaTypeObject | undefined>(() => {\n const normalizedContent = normalizeMimeTypeObject(\n currentResponse.value?.content,\n )\n\n /** All the keys of the normalized content */\n const keys = objectKeys(normalizedContent ?? {})\n return normalizedContent?.[keys[0] ?? '']\n})\n\nconst hasMultipleExamples = computed<boolean>(\n () =>\n !!currentResponseContent.value?.examples &&\n Object.keys(currentResponseContent.value?.examples ?? {}).length > 1,\n)\n\nconst selectedExampleKey = ref<string>('')\n\n/** Resolve the example key to show, preferring the document-wide selection when this response has it */\nconst resolveExampleKey = (preferred: string | undefined): string => {\n const keys = Object.keys(currentResponseContent.value?.examples ?? {})\n if (preferred && keys.includes(preferred)) {\n return preferred\n }\n // Keep the current example when it is still valid, otherwise fall back to the first one\n if (selectedExampleKey.value && keys.includes(selectedExampleKey.value)) {\n return selectedExampleKey.value\n }\n return keys[0] ?? ''\n}\n\n// Initialize from the document-wide selection, falling back to the first example\nselectedExampleKey.value = resolveExampleKey(selectedExample)\n\n// Follow the document-wide selection when it changes and this response has that example\nwatch(\n () => selectedExample,\n (preferred) => {\n selectedExampleKey.value = resolveExampleKey(preferred)\n },\n)\n\n/** Select an example and sync the choice across the document so other operations follow */\nconst selectExample = (key: string) => {\n selectedExampleKey.value = key\n eventBus?.emit('workspace:update:selected-example', key)\n}\n\n/** Get the current example to display */\nconst currentExample = computed(() => {\n if (!currentResponseContent.value) {\n return undefined\n }\n\n // When multiple examples exist and one is selected, we access it directly\n if (hasMultipleExamples.value && selectedExampleKey.value) {\n return currentResponseContent.value.examples?.[selectedExampleKey.value]\n }\n\n // Otherwise, we use getExample with an undefined exampleKey to handle fallbacks\n return getExample(currentResponseContent.value, undefined, undefined)\n})\n\nconst changeTab = (index: number) => {\n selectedResponseIndex.value = index\n // Re-apply the document-wide selection for the newly selected response, falling back to its first example\n selectedExampleKey.value = resolveExampleKey(selectedExample)\n}\n\nconst showSchema = ref(false)\n</script>\n<template>\n <ScalarCard\n v-if=\"statusCodesWithContent.length\"\n :aria-label=\"translate('response.exampleResponses')\"\n class=\"response-card\"\n role=\"region\">\n <ExampleResponseTabList @change=\"changeTab\">\n <ExampleResponseTab\n v-for=\"statusCode in statusCodesWithContent\"\n :key=\"statusCode\"\n :aria-controls=\"id\">\n <ScreenReader>{{ translate('response.status') }}:</ScreenReader>\n {{ statusCode }}\n </ExampleResponseTab>\n\n <template #actions>\n <button\n v-if=\"currentResponseContent?.example\"\n class=\"code-copy\"\n type=\"button\"\n @click=\"() => copyToClipboard(currentResponseContent?.example)\">\n <ScalarIcon\n icon=\"Clipboard\"\n width=\"12px\" />\n </button>\n <label\n v-if=\"currentResponseContent?.schema\"\n class=\"scalar-card-checkbox\">\n {{ translate('response.showSchema') }}\n <input\n v-model=\"showSchema\"\n :aria-controls=\"id\"\n class=\"scalar-card-checkbox-input\"\n type=\"checkbox\" />\n <span class=\"scalar-card-checkbox-checkmark\" />\n </label>\n </template>\n </ExampleResponseTabList>\n <ScalarCardSection class=\"grid flex-1\">\n <!-- Schema -->\n <ExampleSchema\n v-if=\"currentResponseContent?.schema && showSchema\"\n :id=\"id\"\n :schema=\"currentResponseContent?.schema\" />\n\n <!-- Example -->\n <ExampleResponse\n v-else\n :id=\"id\"\n :example=\"currentExample\"\n :response=\"currentResponseContent\" />\n </ScalarCardSection>\n <ScalarCardFooter\n v-if=\"currentResponse?.description || hasMultipleExamples\"\n class=\"response-card-footer\">\n <ExamplePicker\n v-if=\"hasMultipleExamples\"\n class=\"response-example-selector px-0\"\n :examples=\"currentResponseContent?.examples\"\n :modelValue=\"selectedExampleKey\"\n @update:modelValue=\"selectExample\" />\n <div class=\"response-description\">\n <ScalarMarkdown\n v-if=\"currentResponse?.description\"\n class=\"response-description-markdown\"\n :value=\"currentResponse.description\" />\n </div>\n </ScalarCardFooter>\n </ScalarCard>\n</template>\n\n<style scoped>\n.response-card {\n font-size: var(--scalar-font-size-3);\n}\n\n.code-copy {\n display: flex;\n align-items: center;\n justify-content: center;\n appearance: none;\n -webkit-appearance: none;\n outline: none;\n background: transparent;\n cursor: pointer;\n color: var(--scalar-color-3);\n border: none;\n padding: 0;\n margin-right: 12px;\n}\n.code-copy:hover {\n color: var(--scalar-color-1);\n}\n.code-copy svg {\n width: 13px;\n height: 13px;\n}\n.response-card-footer {\n display: flex;\n flex-direction: row-reverse;\n flex-wrap: wrap;\n justify-content: start;\n flex-shrink: 0;\n padding: 7px 12px;\n column-gap: 8px;\n}\n.response-example-selector {\n flex-shrink: 0;\n margin: -4px;\n}\n.response-description {\n font-weight: var(--scalar-semibold);\n font-size: var(--scalar-small);\n color: var(--scalar-color--1);\n\n box-sizing: border-box;\n\n flex-grow: 1;\n}\n.response-description-markdown {\n max-height: 3lh;\n}\n\n.response-description-markdown :deep(*) {\n margin: 0;\n}\n.schema-type {\n font-size: var(--scalar-micro);\n color: var(--scalar-color-2);\n font-weight: var(--scalar-semibold);\n background: var(--scalar-background-3);\n padding: 2px 4px;\n border-radius: 4px;\n margin-right: 4px;\n}\n.schema-example {\n font-size: var(--scalar-micro);\n color: var(--scalar-color-2);\n font-weight: var(--scalar-semibold);\n}\n\n.example-response-tab {\n display: block;\n margin: 6px;\n}\n\n.scalar-card-checkbox {\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n min-height: 17px;\n cursor: pointer;\n user-select: none;\n font-size: var(--scalar-small);\n font-weight: var(--scalar-font-normal);\n color: var(--scalar-color-2);\n width: fit-content;\n white-space: nowrap;\n gap: 6px;\n padding: 7px 6px;\n}\n.scalar-card-checkbox:has(.scalar-card-checkbox-input:focus-visible)\n .scalar-card-checkbox-checkmark {\n outline: 1px solid var(--scalar-color-accent);\n}\n.scalar-card-checkbox:hover {\n color: var(--scalar-color--1);\n}\n.scalar-card-checkbox .scalar-card-checkbox-input {\n position: absolute;\n opacity: 0;\n cursor: pointer;\n height: 0;\n width: 0;\n}\n\n.scalar-card-checkbox-checkmark {\n height: 16px;\n width: 16px;\n border-radius: var(--scalar-radius);\n background-color: transparent;\n background-color: var(--scalar-background-3);\n box-shadow: inset 0 0 0 var(--scalar-border-width) var(--scalar-border-color);\n}\n.scalar-card-checkbox:has(.scalar-card-checkbox-input:checked) {\n color: var(--scalar-color-1);\n font-weight: var(--scalar-semibold);\n}\n\n.scalar-card-checkbox\n .scalar-card-checkbox-input:checked\n ~ .scalar-card-checkbox-checkmark {\n background-color: var(--scalar-button-1);\n box-shadow: none;\n}\n\n.scalar-card-checkbox-checkmark:after {\n content: '';\n position: absolute;\n display: none;\n}\n\n.scalar-card-checkbox\n .scalar-card-checkbox-input:checked\n ~ .scalar-card-checkbox-checkmark:after {\n display: block;\n}\n\n.scalar-card-checkbox .scalar-card-checkbox-checkmark:after {\n right: 11.5px;\n top: 12.5px;\n width: 5px;\n height: 9px;\n border: solid 1px var(--scalar-button-1-color);\n border-width: 0 1.5px 1.5px 0;\n transform: rotate(45deg);\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6CA,MAAM,EAAE,cAAc,iBAAgB;EAEtC,MAAM,KAAK,OAAM;EACjB,MAAM,EAAE,oBAAoB,cAAa;EAGzC,MAAM,qBAAqB,eACzB,OAAO,KAAK,QAAA,aAAa,EAAE,CAAC,CAAC,MAAM,CACrC;EAGA,MAAM,yBAAyB,eAC7B,mBAAmB,MAAM,QAAQ,eAC/B,mBAAmB,eAAe,QAAA,YAAY,YAAY,EAAE,WAAW,CACxE,CACH;EAGA,MAAM,wBAAwB,IAAY,EAAC;;;;;;;;;AAU3C,QAAM,yBAAyB,UAAU;AACvC,OAAI,MAAM,WAAW,EACnB,uBAAsB,QAAQ;YACrB,sBAAsB,SAAS,MAAM,OAC9C,uBAAsB,QAAQ,MAAM,SAAS;OAE7C;AAEF,sBAAmB,QAAQ,kBAAkB,QAAA,gBAAe;IAC7D;EAGD,MAAM,kBAAkB,eAAe;GACrC,MAAM,oBACJ,QAAQ,uBAAuB,CAAC,QAAQ,sBAAsB,KAAK;AAErE,UAAO,eAAe,QAAA,YAAY,mBAAkB;IACrD;EAED,MAAM,yBAAyB,eAA4C;GACzE,MAAM,oBAAoB,wBACxB,gBAAgB,OAAO,QACzB;;GAGA,MAAM,OAAO,WAAW,qBAAqB,EAAE,CAAA;AAC/C,UAAO,oBAAoB,KAAK,MAAM;IACvC;EAED,MAAM,sBAAsB,eAExB,CAAC,CAAC,uBAAuB,OAAO,YAChC,OAAO,KAAK,uBAAuB,OAAO,YAAY,EAAE,CAAC,CAAC,SAAS,EACvE;EAEA,MAAM,qBAAqB,IAAY,GAAE;;EAGzC,MAAM,qBAAqB,cAA0C;GACnE,MAAM,OAAO,OAAO,KAAK,uBAAuB,OAAO,YAAY,EAAE,CAAA;AACrE,OAAI,aAAa,KAAK,SAAS,UAAU,CACvC,QAAO;AAGT,OAAI,mBAAmB,SAAS,KAAK,SAAS,mBAAmB,MAAM,CACrE,QAAO,mBAAmB;AAE5B,UAAO,KAAK,MAAM;;AAIpB,qBAAmB,QAAQ,kBAAkB,QAAA,gBAAe;AAG5D,cACQ,QAAA,kBACL,cAAc;AACb,sBAAmB,QAAQ,kBAAkB,UAAS;IAE1D;;EAGA,MAAM,iBAAiB,QAAgB;AACrC,sBAAmB,QAAQ;AAC3B,WAAA,UAAU,KAAK,qCAAqC,IAAG;;;EAIzD,MAAM,iBAAiB,eAAe;AACpC,OAAI,CAAC,uBAAuB,MAC1B;AAIF,OAAI,oBAAoB,SAAS,mBAAmB,MAClD,QAAO,uBAAuB,MAAM,WAAW,mBAAmB;AAIpE,UAAO,WAAW,uBAAuB,OAAO,KAAA,GAAW,KAAA,EAAS;IACrE;EAED,MAAM,aAAa,UAAkB;AACnC,yBAAsB,QAAQ;AAE9B,sBAAmB,QAAQ,kBAAkB,QAAA,gBAAe;;EAG9D,MAAM,aAAa,IAAI,MAAK;;UAIlB,uBAAA,MAAuB,UAAA,WAAA,EAD/B,YAmEa,MAAA,WAAA,EAAA;;IAjEV,cAAY,MAAA,UAAS,CAAA,4BAAA;IACtB,OAAM;IACN,MAAK;;2BAgCoB;KA/BzB,YA+ByB,gCAAA,EA/BA,UAAQ,WAAS,EAAA;MAS7B,SAAO,cASP,CAPD,uBAAA,OAAwB,WAAA,WAAA,EADhC,mBAQS,UAAA;;OANP,OAAM;OACN,MAAK;OACJ,SAAK,OAAA,OAAA,OAAA,WAAQ,MAAA,gBAAe,CAAC,uBAAA,OAAwB,QAAO;UAC7D,YAEiB,MAAA,WAAA,EAAA;OADf,MAAK;OACL,OAAM;4CAGF,uBAAA,OAAwB,UAAA,WAAA,EADhC,mBAUQ,SAVR,YAUQ;uCAPH,MAAA,UAAS,CAAA,sBAAA,CAAA,GAA0B,KACtC,EAAA;sBAAA,mBAIoB,SAAA;gFAHC,QAAA;QAClB,iBAAe,MAAA,GAAE;QAClB,OAAM;QACN,MAAK;kDAHI,WAAA,MAAU,CAAA,CAAA;iCAIrB,mBAA+C,QAAA,EAAzC,OAAM,kCAAgC,EAAA,MAAA,GAAA;;6BA1BF,EAAA,UAAA,KAAA,EAD9C,mBAMqB,UAAA,MAAA,WALE,uBAAA,QAAd,eAAU;2BADnB,YAMqB,4BAAA;QAJlB,KAAK;QACL,iBAAe,MAAA,GAAE;;+BAC8C,CAAhE,YAAgE,sBAAA,MAAA;gCAAhB,CAAA,gBAAA,gBAA/B,MAAA,UAAS,CAAA,kBAAA,CAAA,GAAsB,KAAC,EAAA,CAAA,CAAA;;4BAAe,MAChE,gBAAG,WAAU,EAAA,EAAA,CAAA,CAAA;;;;;;KA0BjB,YAaoB,MAAA,kBAAA,EAAA,EAbD,OAAM,eAAa,EAAA;6BAKS,CAFrC,uBAAA,OAAwB,UAAU,WAAA,SAAA,WAAA,EAD1C,YAG6C,uBAAA;;OAD1C,IAAI,MAAA,GAAE;OACN,QAAQ,uBAAA,OAAwB;qDAGnC,YAIuC,yBAAA;;OAFpC,IAAI,MAAA,GAAE;OACN,SAAS,eAAA;OACT,UAAU,uBAAA;;;;;;;;KAGP,gBAAA,OAAiB,eAAe,oBAAA,SAAA,WAAA,EADxC,YAemB,MAAA,iBAAA,EAAA;;MAbjB,OAAM;;6BAMiC,CAJ/B,oBAAA,SAAA,WAAA,EADR,YAKuC,MAAA,cAAA,EAAA;;OAHrC,OAAM;OACL,UAAU,uBAAA,OAAwB;OAClC,YAAY,mBAAA;OACZ,uBAAmB;+EACtB,mBAKM,OALN,YAKM,CAHI,gBAAA,OAAiB,eAAA,WAAA,EADzB,YAGyC,MAAA,eAAA,EAAA;;OADvC,OAAM;OACL,OAAO,gBAAA,MAAgB"}
@@ -1 +1 @@
1
- {"version":3,"file":"ExampleSchema.vue.js","names":[],"sources":["../../../src/features/example-responses/ExampleSchema.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { getResolvedRefDeep } from '@scalar/api-client/blocks/operation-code-sample'\nimport { ScalarCodeBlock } from '@scalar/components/code-block'\nimport { ScalarVirtualCodeBlock } from '@scalar/components/virtual-code-block'\nimport { prettyPrintJson } from '@scalar/helpers/json/pretty-print-json'\nimport type { ReferenceType } from '@scalar/workspace-store/schemas/v3.1/strict/reference'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/schema'\nimport { computed } from 'vue'\n\nconst { id, schema } = defineProps<{\n id: string\n schema: ReferenceType<SchemaObject>\n}>()\n\nconst schemaContent = computed(() => {\n if (!schema) {\n return undefined\n }\n\n return prettyPrintJson(getResolvedRefDeep(schema))\n})\n\nconst VIRTUALIZATION_THRESHOLD = 20_000\n\nconst shouldVirtualizeSchema = computed(() => {\n return (schemaContent.value?.length ?? 0) > VIRTUALIZATION_THRESHOLD\n})\n</script>\n\n<template>\n <ScalarCodeBlock\n v-if=\"!shouldVirtualizeSchema\"\n :id=\"id\"\n class=\"bg-b-2\"\n lang=\"json\"\n :prettyPrintedContent=\"schemaContent ?? ''\" />\n <ScalarVirtualCodeBlock\n v-else\n :id=\"id\"\n class=\"bg-b-2\"\n :content=\"schemaContent ?? ''\"\n lang=\"json\" />\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"ExampleSchema.vue.js","names":[],"sources":["../../../src/features/example-responses/ExampleSchema.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { getResolvedRefDeep } from '@scalar/blocks/code-example'\nimport { ScalarCodeBlock } from '@scalar/components/code-block'\nimport { ScalarVirtualCodeBlock } from '@scalar/components/virtual-code-block'\nimport { prettyPrintJson } from '@scalar/helpers/json/pretty-print-json'\nimport type { ReferenceType } from '@scalar/workspace-store/schemas/v3.1/strict/reference'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/schema'\nimport { computed } from 'vue'\n\nconst { id, schema } = defineProps<{\n id: string\n schema: ReferenceType<SchemaObject>\n}>()\n\nconst schemaContent = computed(() => {\n if (!schema) {\n return undefined\n }\n\n return prettyPrintJson(getResolvedRefDeep(schema))\n})\n\nconst VIRTUALIZATION_THRESHOLD = 20_000\n\nconst shouldVirtualizeSchema = computed(() => {\n return (schemaContent.value?.length ?? 0) > VIRTUALIZATION_THRESHOLD\n})\n</script>\n\n<template>\n <ScalarCodeBlock\n v-if=\"!shouldVirtualizeSchema\"\n :id=\"id\"\n class=\"bg-b-2\"\n lang=\"json\"\n :prettyPrintedContent=\"schemaContent ?? ''\" />\n <ScalarVirtualCodeBlock\n v-else\n :id=\"id\"\n class=\"bg-b-2\"\n :content=\"schemaContent ?? ''\"\n lang=\"json\" />\n</template>\n"],"mappings":""}
@@ -1,5 +1,5 @@
1
1
  import { computed, createBlock, defineComponent, openBlock, unref } from "vue";
2
- import { getResolvedRefDeep } from "@scalar/api-client/blocks/operation-code-sample";
2
+ import { getResolvedRefDeep } from "@scalar/blocks/code-example";
3
3
  import { ScalarCodeBlock } from "@scalar/components/code-block";
4
4
  import { ScalarVirtualCodeBlock } from "@scalar/components/virtual-code-block";
5
5
  import { prettyPrintJson } from "@scalar/helpers/json/pretty-print-json";
@@ -1 +1 @@
1
- {"version":3,"file":"ExampleSchema.vue.script.js","names":[],"sources":["../../../src/features/example-responses/ExampleSchema.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { getResolvedRefDeep } from '@scalar/api-client/blocks/operation-code-sample'\nimport { ScalarCodeBlock } from '@scalar/components/code-block'\nimport { ScalarVirtualCodeBlock } from '@scalar/components/virtual-code-block'\nimport { prettyPrintJson } from '@scalar/helpers/json/pretty-print-json'\nimport type { ReferenceType } from '@scalar/workspace-store/schemas/v3.1/strict/reference'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/schema'\nimport { computed } from 'vue'\n\nconst { id, schema } = defineProps<{\n id: string\n schema: ReferenceType<SchemaObject>\n}>()\n\nconst schemaContent = computed(() => {\n if (!schema) {\n return undefined\n }\n\n return prettyPrintJson(getResolvedRefDeep(schema))\n})\n\nconst VIRTUALIZATION_THRESHOLD = 20_000\n\nconst shouldVirtualizeSchema = computed(() => {\n return (schemaContent.value?.length ?? 0) > VIRTUALIZATION_THRESHOLD\n})\n</script>\n\n<template>\n <ScalarCodeBlock\n v-if=\"!shouldVirtualizeSchema\"\n :id=\"id\"\n class=\"bg-b-2\"\n lang=\"json\"\n :prettyPrintedContent=\"schemaContent ?? ''\" />\n <ScalarVirtualCodeBlock\n v-else\n :id=\"id\"\n class=\"bg-b-2\"\n :content=\"schemaContent ?? ''\"\n lang=\"json\" />\n</template>\n"],"mappings":";;;;;;AAsBA,IAAM,2BAA2B;;;;;;;;EARjC,MAAM,gBAAgB,eAAe;AACnC,OAAI,CAAC,QAAA,OACH;AAGF,UAAO,gBAAgB,mBAAmB,QAAA,OAAO,CAAA;IAClD;EAID,MAAM,yBAAyB,eAAe;AAC5C,WAAQ,cAAc,OAAO,UAAU,KAAK;IAC7C;;WAKU,uBAAA,SAAA,WAAA,EADT,YAKgD,MAAA,gBAAA,EAAA;;IAH7C,IAAI,QAAA;IACL,OAAM;IACN,MAAK;IACJ,sBAAsB,cAAA,SAAa;gEACtC,YAKgB,MAAA,uBAAA,EAAA;;IAHb,IAAI,QAAA;IACL,OAAM;IACL,SAAS,cAAA,SAAa;IACvB,MAAK"}
1
+ {"version":3,"file":"ExampleSchema.vue.script.js","names":[],"sources":["../../../src/features/example-responses/ExampleSchema.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { getResolvedRefDeep } from '@scalar/blocks/code-example'\nimport { ScalarCodeBlock } from '@scalar/components/code-block'\nimport { ScalarVirtualCodeBlock } from '@scalar/components/virtual-code-block'\nimport { prettyPrintJson } from '@scalar/helpers/json/pretty-print-json'\nimport type { ReferenceType } from '@scalar/workspace-store/schemas/v3.1/strict/reference'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/schema'\nimport { computed } from 'vue'\n\nconst { id, schema } = defineProps<{\n id: string\n schema: ReferenceType<SchemaObject>\n}>()\n\nconst schemaContent = computed(() => {\n if (!schema) {\n return undefined\n }\n\n return prettyPrintJson(getResolvedRefDeep(schema))\n})\n\nconst VIRTUALIZATION_THRESHOLD = 20_000\n\nconst shouldVirtualizeSchema = computed(() => {\n return (schemaContent.value?.length ?? 0) > VIRTUALIZATION_THRESHOLD\n})\n</script>\n\n<template>\n <ScalarCodeBlock\n v-if=\"!shouldVirtualizeSchema\"\n :id=\"id\"\n class=\"bg-b-2\"\n lang=\"json\"\n :prettyPrintedContent=\"schemaContent ?? ''\" />\n <ScalarVirtualCodeBlock\n v-else\n :id=\"id\"\n class=\"bg-b-2\"\n :content=\"schemaContent ?? ''\"\n lang=\"json\" />\n</template>\n"],"mappings":";;;;;;AAsBA,IAAM,2BAA2B;;;;;;;;EARjC,MAAM,gBAAgB,eAAe;AACnC,OAAI,CAAC,QAAA,OACH;AAGF,UAAO,gBAAgB,mBAAmB,QAAA,OAAO,CAAA;IAClD;EAID,MAAM,yBAAyB,eAAe;AAC5C,WAAQ,cAAc,OAAO,UAAU,KAAK;IAC7C;;WAKU,uBAAA,SAAA,WAAA,EADT,YAKgD,MAAA,gBAAA,EAAA;;IAH7C,IAAI,QAAA;IACL,OAAM;IACN,MAAK;IACJ,sBAAsB,cAAA,SAAa;gEACtC,YAKgB,MAAA,uBAAA,EAAA;;IAHb,IAAI,QAAA;IACL,OAAM;IACL,SAAS,cAAA,SAAa;IACvB,MAAK"}