@scalar/api-reference 1.61.0 → 1.62.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (508) hide show
  1. package/CHANGELOG.md +31 -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-D7J_MHKY.js +27 -0
  71. package/dist/browser/chunks/ScalarTextInput.vue-Fb0snAee.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-CZI71Aau.js → modal-BLBi4S4R.js} +20 -20
  139. package/dist/browser/chunks/{modal-CKthJJWy.js → modal-BlpWsFBT.js} +2 -2
  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-DHN5fsxL.js +306 -0
  161. package/dist/browser/standalone.esm.js +20 -20
  162. package/dist/browser/standalone.js +293 -293
  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 +172 -43
  190. package/dist/components/ApiReference.vue.script.js.map +1 -1
  191. package/dist/components/Content/AsyncApi/AsyncApiLabels.vue.d.ts.map +1 -1
  192. package/dist/components/Content/AsyncApi/AsyncApiLabels.vue.js +1 -1
  193. package/dist/components/Content/AsyncApi/AsyncApiLabels.vue.js.map +1 -1
  194. package/dist/components/Content/AsyncApi/AsyncApiLabels.vue.script.js +6 -2
  195. package/dist/components/Content/AsyncApi/AsyncApiLabels.vue.script.js.map +1 -1
  196. package/dist/components/Content/AsyncApi/Message.vue.script.js +1 -1
  197. package/dist/components/Content/Auth/Auth.vue.d.ts.map +1 -1
  198. package/dist/components/Content/Auth/Auth.vue.js.map +1 -1
  199. package/dist/components/Content/Auth/Auth.vue.script.js +5 -2
  200. package/dist/components/Content/Auth/Auth.vue.script.js.map +1 -1
  201. package/dist/components/Content/Content.vue.d.ts +1 -0
  202. package/dist/components/Content/Content.vue.d.ts.map +1 -1
  203. package/dist/components/Content/Content.vue.js.map +1 -1
  204. package/dist/components/Content/Content.vue.script.js +4 -1
  205. package/dist/components/Content/Content.vue.script.js.map +1 -1
  206. package/dist/components/Content/Operations/TraversedEntry.vue.d.ts +3 -1
  207. package/dist/components/Content/Operations/TraversedEntry.vue.d.ts.map +1 -1
  208. package/dist/components/Content/Operations/TraversedEntry.vue.js.map +1 -1
  209. package/dist/components/Content/Operations/TraversedEntry.vue.script.js +9 -0
  210. package/dist/components/Content/Operations/TraversedEntry.vue.script.js.map +1 -1
  211. package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
  212. package/dist/components/Content/Schema/Schema.vue.js +1 -1
  213. package/dist/components/Content/Schema/Schema.vue.js.map +1 -1
  214. package/dist/components/Content/Schema/Schema.vue.script.js +100 -16
  215. package/dist/components/Content/Schema/Schema.vue.script.js.map +1 -1
  216. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
  217. package/dist/components/Content/Schema/SchemaComposition.vue.js.map +1 -1
  218. package/dist/components/Content/Schema/SchemaComposition.vue.script.js +9 -11
  219. package/dist/components/Content/Schema/SchemaComposition.vue.script.js.map +1 -1
  220. package/dist/components/Content/Schema/SchemaEnums.vue.d.ts.map +1 -1
  221. package/dist/components/Content/Schema/SchemaEnums.vue.js +1 -1
  222. package/dist/components/Content/Schema/SchemaEnums.vue.js.map +1 -1
  223. package/dist/components/Content/Schema/SchemaEnums.vue.script.js +4 -2
  224. package/dist/components/Content/Schema/SchemaEnums.vue.script.js.map +1 -1
  225. package/dist/components/Content/Schema/SchemaHeading.vue.d.ts.map +1 -1
  226. package/dist/components/Content/Schema/SchemaHeading.vue.js +1 -1
  227. package/dist/components/Content/Schema/SchemaHeading.vue.js.map +1 -1
  228. package/dist/components/Content/Schema/SchemaHeading.vue.script.js +5 -3
  229. package/dist/components/Content/Schema/SchemaHeading.vue.script.js.map +1 -1
  230. package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.js.map +1 -1
  231. package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.script.js +1 -1
  232. package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.script.js.map +1 -1
  233. package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts.map +1 -1
  234. package/dist/components/Content/Schema/SchemaObjectProperties.vue.js.map +1 -1
  235. package/dist/components/Content/Schema/SchemaObjectProperties.vue.script.js +12 -0
  236. package/dist/components/Content/Schema/SchemaObjectProperties.vue.script.js.map +1 -1
  237. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +3 -1
  238. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  239. package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
  240. package/dist/components/Content/Schema/SchemaProperty.vue.js.map +1 -1
  241. package/dist/components/Content/Schema/SchemaProperty.vue.script.js +41 -9
  242. package/dist/components/Content/Schema/SchemaProperty.vue.script.js.map +1 -1
  243. package/dist/components/Content/Schema/SchemaPropertyDefault.vue.d.ts.map +1 -1
  244. package/dist/components/Content/Schema/SchemaPropertyDefault.vue.js +1 -1
  245. package/dist/components/Content/Schema/SchemaPropertyDefault.vue.js.map +1 -1
  246. package/dist/components/Content/Schema/SchemaPropertyDefault.vue.script.js +8 -5
  247. package/dist/components/Content/Schema/SchemaPropertyDefault.vue.script.js.map +1 -1
  248. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.d.ts.map +1 -1
  249. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js +1 -1
  250. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js.map +1 -1
  251. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.script.js +5 -3
  252. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.script.js.map +1 -1
  253. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts +3 -1
  254. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
  255. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +1 -1
  256. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js.map +1 -1
  257. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.script.js +48 -23
  258. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.script.js.map +1 -1
  259. package/dist/components/Content/Schema/helpers/dynamic-scope.d.ts +27 -0
  260. package/dist/components/Content/Schema/helpers/dynamic-scope.d.ts.map +1 -0
  261. package/dist/components/Content/Schema/helpers/dynamic-scope.js +35 -0
  262. package/dist/components/Content/Schema/helpers/dynamic-scope.js.map +1 -0
  263. package/dist/components/Content/Schema/helpers/get-compositions-to-render.d.ts +10 -0
  264. package/dist/components/Content/Schema/helpers/get-compositions-to-render.d.ts.map +1 -1
  265. package/dist/components/Content/Schema/helpers/get-compositions-to-render.js +11 -2
  266. package/dist/components/Content/Schema/helpers/get-compositions-to-render.js.map +1 -1
  267. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +9 -2
  268. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js.map +1 -1
  269. package/dist/components/Content/Tags/components/ModernLayout.vue.d.ts.map +1 -1
  270. package/dist/components/Content/Tags/components/ModernLayout.vue.js +1 -1
  271. package/dist/components/Content/Tags/components/ModernLayout.vue.js.map +1 -1
  272. package/dist/components/Content/Tags/components/ModernLayout.vue.script.js +3 -1
  273. package/dist/components/Content/Tags/components/ModernLayout.vue.script.js.map +1 -1
  274. package/dist/components/Content/Tags/components/TagSection.vue.d.ts.map +1 -1
  275. package/dist/components/Content/Tags/components/TagSection.vue.js.map +1 -1
  276. package/dist/components/Content/Tags/components/TagSection.vue.script.js +3 -1
  277. package/dist/components/Content/Tags/components/TagSection.vue.script.js.map +1 -1
  278. package/dist/components/GettingStarted.vue.d.ts.map +1 -1
  279. package/dist/components/GettingStarted.vue.js +1 -1
  280. package/dist/components/GettingStarted.vue.js.map +1 -1
  281. package/dist/components/GettingStarted.vue.script.js +58 -21
  282. package/dist/components/GettingStarted.vue.script.js.map +1 -1
  283. package/dist/components/MobileHeader.vue.d.ts.map +1 -1
  284. package/dist/components/MobileHeader.vue.js.map +1 -1
  285. package/dist/components/MobileHeader.vue.script.js +3 -1
  286. package/dist/components/MobileHeader.vue.script.js.map +1 -1
  287. package/dist/components/OperationsList/OperationsList.vue.d.ts.map +1 -1
  288. package/dist/components/OperationsList/OperationsList.vue.js +1 -1
  289. package/dist/components/OperationsList/OperationsList.vue.js.map +1 -1
  290. package/dist/components/OperationsList/OperationsList.vue.script.js +4 -2
  291. package/dist/components/OperationsList/OperationsList.vue.script.js.map +1 -1
  292. package/dist/components/ShowMoreButton.vue.d.ts.map +1 -1
  293. package/dist/components/ShowMoreButton.vue.js +1 -1
  294. package/dist/components/ShowMoreButton.vue.js.map +1 -1
  295. package/dist/components/ShowMoreButton.vue.script.js +4 -2
  296. package/dist/components/ShowMoreButton.vue.script.js.map +1 -1
  297. package/dist/features/Operation/Operation.vue.d.ts +3 -1
  298. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  299. package/dist/features/Operation/Operation.vue.js.map +1 -1
  300. package/dist/features/Operation/Operation.vue.script.js +6 -1
  301. package/dist/features/Operation/Operation.vue.script.js.map +1 -1
  302. package/dist/features/Operation/components/ContentTypeSelect.vue.d.ts.map +1 -1
  303. package/dist/features/Operation/components/ContentTypeSelect.vue.js.map +1 -1
  304. package/dist/features/Operation/components/ContentTypeSelect.vue.script.js +4 -2
  305. package/dist/features/Operation/components/ContentTypeSelect.vue.script.js.map +1 -1
  306. package/dist/features/Operation/components/Headers.vue.d.ts.map +1 -1
  307. package/dist/features/Operation/components/Headers.vue.js +1 -1
  308. package/dist/features/Operation/components/Headers.vue.js.map +1 -1
  309. package/dist/features/Operation/components/Headers.vue.script.js +8 -6
  310. package/dist/features/Operation/components/Headers.vue.script.js.map +1 -1
  311. package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
  312. package/dist/features/Operation/components/OperationParameters.vue.js.map +1 -1
  313. package/dist/features/Operation/components/OperationParameters.vue.script.js +8 -6
  314. package/dist/features/Operation/components/OperationParameters.vue.script.js.map +1 -1
  315. package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
  316. package/dist/features/Operation/components/OperationResponses.vue.js.map +1 -1
  317. package/dist/features/Operation/components/OperationResponses.vue.script.js +10 -7
  318. package/dist/features/Operation/components/OperationResponses.vue.script.js.map +1 -1
  319. package/dist/features/Operation/components/ParameterListItem.vue.script.js +1 -1
  320. package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
  321. package/dist/features/Operation/components/RequestBody.vue.js +1 -1
  322. package/dist/features/Operation/components/RequestBody.vue.js.map +1 -1
  323. package/dist/features/Operation/components/RequestBody.vue.script.js +21 -14
  324. package/dist/features/Operation/components/RequestBody.vue.script.js.map +1 -1
  325. package/dist/features/Operation/components/SecurityRequirementBadge.vue.d.ts.map +1 -1
  326. package/dist/features/Operation/components/SecurityRequirementBadge.vue.js.map +1 -1
  327. package/dist/features/Operation/components/SecurityRequirementBadge.vue.script.js +5 -3
  328. package/dist/features/Operation/components/SecurityRequirementBadge.vue.script.js.map +1 -1
  329. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -1
  330. package/dist/features/Operation/components/callbacks/Callbacks.vue.js.map +1 -1
  331. package/dist/features/Operation/components/callbacks/Callbacks.vue.script.js +11 -8
  332. package/dist/features/Operation/components/callbacks/Callbacks.vue.script.js.map +1 -1
  333. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  334. package/dist/features/Operation/layouts/ClassicLayout.vue.js +1 -1
  335. package/dist/features/Operation/layouts/ClassicLayout.vue.js.map +1 -1
  336. package/dist/features/Operation/layouts/ClassicLayout.vue.script.js +37 -17
  337. package/dist/features/Operation/layouts/ClassicLayout.vue.script.js.map +1 -1
  338. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  339. package/dist/features/Operation/layouts/ModernLayout.vue.js +1 -1
  340. package/dist/features/Operation/layouts/ModernLayout.vue.js.map +1 -1
  341. package/dist/features/Operation/layouts/ModernLayout.vue.script.js +22 -7
  342. package/dist/features/Operation/layouts/ModernLayout.vue.script.js.map +1 -1
  343. package/dist/features/Search/components/SearchButton.vue.d.ts.map +1 -1
  344. package/dist/features/Search/components/SearchButton.vue.js.map +1 -1
  345. package/dist/features/Search/components/SearchButton.vue.script.js +15 -8
  346. package/dist/features/Search/components/SearchButton.vue.script.js.map +1 -1
  347. package/dist/features/Search/components/SearchModal.vue.d.ts.map +1 -1
  348. package/dist/features/Search/components/SearchModal.vue.js +1 -1
  349. package/dist/features/Search/components/SearchModal.vue.js.map +1 -1
  350. package/dist/features/Search/components/SearchModal.vue.script.js +29 -10
  351. package/dist/features/Search/components/SearchModal.vue.script.js.map +1 -1
  352. package/dist/features/Search/components/SearchResult.vue.d.ts.map +1 -1
  353. package/dist/features/Search/components/SearchResult.vue.js.map +1 -1
  354. package/dist/features/Search/components/SearchResult.vue.script.js +12 -8
  355. package/dist/features/Search/components/SearchResult.vue.script.js.map +1 -1
  356. package/dist/features/Search/helpers/create-search-index.d.ts +8 -0
  357. package/dist/features/Search/helpers/create-search-index.d.ts.map +1 -1
  358. package/dist/features/Search/helpers/create-search-index.js +18 -9
  359. package/dist/features/Search/helpers/create-search-index.js.map +1 -1
  360. package/dist/features/Search/hooks/useSearchIndex.d.ts +7 -1
  361. package/dist/features/Search/hooks/useSearchIndex.d.ts.map +1 -1
  362. package/dist/features/Search/hooks/useSearchIndex.js +11 -2
  363. package/dist/features/Search/hooks/useSearchIndex.js.map +1 -1
  364. package/dist/features/ask-agent-button/AskAgentButton.vue.d.ts.map +1 -1
  365. package/dist/features/ask-agent-button/AskAgentButton.vue.js +1 -1
  366. package/dist/features/ask-agent-button/AskAgentButton.vue.js.map +1 -1
  367. package/dist/features/ask-agent-button/AskAgentButton.vue.script.js +10 -6
  368. package/dist/features/ask-agent-button/AskAgentButton.vue.script.js.map +1 -1
  369. package/dist/features/developer-tools/DeveloperTools.vue.d.ts.map +1 -1
  370. package/dist/features/developer-tools/DeveloperTools.vue.js.map +1 -1
  371. package/dist/features/developer-tools/DeveloperTools.vue.script.js +10 -8
  372. package/dist/features/developer-tools/DeveloperTools.vue.script.js.map +1 -1
  373. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.d.ts.map +1 -1
  374. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.js.map +1 -1
  375. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.script.js +11 -11
  376. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.script.js.map +1 -1
  377. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.d.ts.map +1 -1
  378. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.js.map +1 -1
  379. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.script.js +15 -11
  380. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.script.js.map +1 -1
  381. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.script.js +1 -1
  382. package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.d.ts +1 -3
  383. package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.d.ts.map +1 -1
  384. package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.js.map +1 -1
  385. package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.script.js +4 -6
  386. package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.script.js.map +1 -1
  387. package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.d.ts.map +1 -1
  388. package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.js.map +1 -1
  389. package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.script.js +6 -4
  390. package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.script.js.map +1 -1
  391. package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.d.ts.map +1 -1
  392. package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.js.map +1 -1
  393. package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.script.js +23 -22
  394. package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.script.js.map +1 -1
  395. package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.d.ts.map +1 -1
  396. package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.js.map +1 -1
  397. package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.script.js +7 -5
  398. package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.script.js.map +1 -1
  399. package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.d.ts.map +1 -1
  400. package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.js.map +1 -1
  401. package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.script.js +9 -7
  402. package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.script.js.map +1 -1
  403. package/dist/features/developer-tools/components/DeployApiReference.vue.d.ts.map +1 -1
  404. package/dist/features/developer-tools/components/DeployApiReference.vue.js.map +1 -1
  405. package/dist/features/developer-tools/components/DeployApiReference.vue.script.js +7 -4
  406. package/dist/features/developer-tools/components/DeployApiReference.vue.script.js.map +1 -1
  407. package/dist/features/developer-tools/components/ModifyConfiguration.vue.d.ts.map +1 -1
  408. package/dist/features/developer-tools/components/ModifyConfiguration.vue.js.map +1 -1
  409. package/dist/features/developer-tools/components/ModifyConfiguration.vue.script.js +8 -6
  410. package/dist/features/developer-tools/components/ModifyConfiguration.vue.script.js.map +1 -1
  411. package/dist/features/developer-tools/components/ShareApiReference.vue.d.ts.map +1 -1
  412. package/dist/features/developer-tools/components/ShareApiReference.vue.js.map +1 -1
  413. package/dist/features/developer-tools/components/ShareApiReference.vue.script.js +7 -4
  414. package/dist/features/developer-tools/components/ShareApiReference.vue.script.js.map +1 -1
  415. package/dist/features/example-responses/ExampleResponse.vue.d.ts.map +1 -1
  416. package/dist/features/example-responses/ExampleResponse.vue.js +1 -1
  417. package/dist/features/example-responses/ExampleResponse.vue.js.map +1 -1
  418. package/dist/features/example-responses/ExampleResponse.vue.script.js +5 -3
  419. package/dist/features/example-responses/ExampleResponse.vue.script.js.map +1 -1
  420. package/dist/features/example-responses/ExampleResponses.vue.d.ts +9 -0
  421. package/dist/features/example-responses/ExampleResponses.vue.d.ts.map +1 -1
  422. package/dist/features/example-responses/ExampleResponses.vue.js +1 -1
  423. package/dist/features/example-responses/ExampleResponses.vue.js.map +1 -1
  424. package/dist/features/example-responses/ExampleResponses.vue.script.js +42 -23
  425. package/dist/features/example-responses/ExampleResponses.vue.script.js.map +1 -1
  426. package/dist/features/example-responses/ExampleSchema.vue.js.map +1 -1
  427. package/dist/features/example-responses/ExampleSchema.vue.script.js +1 -1
  428. package/dist/features/example-responses/ExampleSchema.vue.script.js.map +1 -1
  429. package/dist/features/info-object/Contact.vue.d.ts.map +1 -1
  430. package/dist/features/info-object/Contact.vue.js.map +1 -1
  431. package/dist/features/info-object/Contact.vue.script.js +14 -11
  432. package/dist/features/info-object/Contact.vue.script.js.map +1 -1
  433. package/dist/features/info-object/InfoLink.vue.d.ts +8 -0
  434. package/dist/features/info-object/InfoLink.vue.d.ts.map +1 -0
  435. package/dist/features/info-object/InfoLink.vue.js +7 -0
  436. package/dist/features/info-object/InfoLink.vue.js.map +1 -0
  437. package/dist/features/info-object/InfoLink.vue.script.js +30 -0
  438. package/dist/features/info-object/InfoLink.vue.script.js.map +1 -0
  439. package/dist/features/info-object/TermsOfService.vue.d.ts.map +1 -1
  440. package/dist/features/info-object/TermsOfService.vue.js.map +1 -1
  441. package/dist/features/info-object/TermsOfService.vue.script.js +9 -6
  442. package/dist/features/info-object/TermsOfService.vue.script.js.map +1 -1
  443. package/dist/features/info-object/index.d.ts +1 -0
  444. package/dist/features/info-object/index.d.ts.map +1 -1
  445. package/dist/features/localization/index.d.ts +2 -0
  446. package/dist/features/localization/index.d.ts.map +1 -0
  447. package/dist/features/localization/locales/ar.d.ts +227 -0
  448. package/dist/features/localization/locales/ar.d.ts.map +1 -0
  449. package/dist/features/localization/locales/ar.js +225 -0
  450. package/dist/features/localization/locales/ar.js.map +1 -0
  451. package/dist/features/localization/locales/de.d.ts +227 -0
  452. package/dist/features/localization/locales/de.d.ts.map +1 -0
  453. package/dist/features/localization/locales/de.js +225 -0
  454. package/dist/features/localization/locales/de.js.map +1 -0
  455. package/dist/features/localization/locales/en.d.ts +227 -0
  456. package/dist/features/localization/locales/en.d.ts.map +1 -0
  457. package/dist/features/localization/locales/en.js +225 -0
  458. package/dist/features/localization/locales/en.js.map +1 -0
  459. package/dist/features/localization/locales/es.d.ts +227 -0
  460. package/dist/features/localization/locales/es.d.ts.map +1 -0
  461. package/dist/features/localization/locales/es.js +225 -0
  462. package/dist/features/localization/locales/es.js.map +1 -0
  463. package/dist/features/localization/locales/fr.d.ts +227 -0
  464. package/dist/features/localization/locales/fr.d.ts.map +1 -0
  465. package/dist/features/localization/locales/fr.js +225 -0
  466. package/dist/features/localization/locales/fr.js.map +1 -0
  467. package/dist/features/localization/locales/ru.d.ts +227 -0
  468. package/dist/features/localization/locales/ru.d.ts.map +1 -0
  469. package/dist/features/localization/locales/ru.js +225 -0
  470. package/dist/features/localization/locales/ru.js.map +1 -0
  471. package/dist/features/localization/locales/zh-cn.d.ts +227 -0
  472. package/dist/features/localization/locales/zh-cn.d.ts.map +1 -0
  473. package/dist/features/localization/locales/zh-cn.js +225 -0
  474. package/dist/features/localization/locales/zh-cn.js.map +1 -0
  475. package/dist/features/localization/translations.d.ts +1588 -0
  476. package/dist/features/localization/translations.d.ts.map +1 -0
  477. package/dist/features/localization/translations.js +27 -0
  478. package/dist/features/localization/translations.js.map +1 -0
  479. package/dist/features/localization/use-localization.d.ts +18 -0
  480. package/dist/features/localization/use-localization.d.ts.map +1 -0
  481. package/dist/features/localization/use-localization.js +58 -0
  482. package/dist/features/localization/use-localization.js.map +1 -0
  483. package/dist/features/multiple-documents/DocumentSelector.vue.script.js +1 -1
  484. package/dist/features/test-request-button/TestRequestButton.vue.d.ts.map +1 -1
  485. package/dist/features/test-request-button/TestRequestButton.vue.js +1 -1
  486. package/dist/features/test-request-button/TestRequestButton.vue.js.map +1 -1
  487. package/dist/features/test-request-button/TestRequestButton.vue.script.js +3 -1
  488. package/dist/features/test-request-button/TestRequestButton.vue.script.js.map +1 -1
  489. package/dist/helpers/is-introduction-entry.d.ts +16 -0
  490. package/dist/helpers/is-introduction-entry.d.ts.map +1 -0
  491. package/dist/helpers/is-introduction-entry.js +17 -0
  492. package/dist/helpers/is-introduction-entry.js.map +1 -0
  493. package/dist/helpers/load-from-perssistance.js +1 -1
  494. package/dist/helpers/load-from-perssistance.js.map +1 -1
  495. package/dist/helpers/map-config-to-workspace-store.js +1 -1
  496. package/dist/helpers/map-config-to-workspace-store.js.map +1 -1
  497. package/dist/helpers/storage.d.ts +14 -14
  498. package/dist/style.css +446 -434
  499. package/dist/styles/tailwind.config.css +1 -0
  500. package/dist/vue-styles.css +383 -380
  501. package/package.json +17 -16
  502. package/dist/browser/chunks/AgentScalarChatInterface-BhUn0w1j.js +0 -27
  503. package/dist/browser/chunks/ScalarTextInput.vue-BUzf4Z_k.js +0 -27
  504. package/dist/browser/chunks/vendor-BeJNu9KM.js +0 -306
  505. package/dist/features/Operation/helpers/get-first-server.d.ts +0 -9
  506. package/dist/features/Operation/helpers/get-first-server.d.ts.map +0 -1
  507. package/dist/features/Operation/helpers/get-first-server.js +0 -27
  508. package/dist/features/Operation/helpers/get-first-server.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ApiReferenceToolbarTitle.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarTitle.vue"],"names":[],"mappings":"AA+LA,QAAA,MAAM,YAAY,+QAChB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"ApiReferenceToolbarTitle.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarTitle.vue"],"names":[],"mappings":"AAyMA,QAAA,MAAM,YAAY,+QAChB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ApiReferenceToolbarTitle.vue.js","names":[],"sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarTitle.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarIconButton } from '@scalar/components/icon-button'\nimport { ScalarIconCopy, ScalarIconInfo } from '@scalar/icons'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\n\nimport ApiReferenceToolbarPopover from './ApiReferenceToolbarPopover.vue'\n\nconst CONFIG_SETTING = 'showDeveloperTools: \"never\"'\n\nconst { copyToClipboard } = useClipboard()\n</script>\n<template>\n <ApiReferenceToolbarPopover\n class=\"w-120\"\n placement=\"bottom-start\">\n <template #button>\n <button\n class=\"text-c-2 hover:text-c-1 hover:bg-b-2 ml-auto flex items-center gap-1 rounded px-2 py-2.25 text-base leading-none\"\n type=\"button\">\n <ScalarIconInfo />\n Developer Tools\n </button>\n </template>\n <div class=\"-m-2 flex flex-col gap-2 leading-relaxed\">\n <div>\n The developer tools allow you to customize the appearance and behavior\n of your documentation. You can also share your documentation using the\n Scalar Registry.\n </div>\n <div>\n To disable the toolbar, set\n <div\n class=\"bg-b-2 inline-flex items-center gap-0.5 rounded border px-1 py-0.5 text-sm\">\n <code class=\"font-code\">{{ CONFIG_SETTING }}</code>\n <ScalarIconButton\n class=\"-m-1 p-1.25\"\n :icon=\"ScalarIconCopy\"\n label=\"Copy link to clipboard\"\n size=\"sm\"\n @click=\"copyToClipboard(CONFIG_SETTING)\" />\n </div>\n in your configuration.\n </div>\n </div>\n <template #info>\n The developer tools will only appear when running on localhost.\n </template>\n </ApiReferenceToolbarPopover>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"ApiReferenceToolbarTitle.vue.js","names":[],"sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarTitle.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarIconButton } from '@scalar/components/icon-button'\nimport { ScalarIconCopy, ScalarIconInfo } from '@scalar/icons'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\n\nimport { useLocalization } from '@/features/localization'\n\nimport ApiReferenceToolbarPopover from './ApiReferenceToolbarPopover.vue'\n\nconst CONFIG_SETTING = 'showDeveloperTools: \"never\"'\n\nconst { copyToClipboard } = useClipboard()\nconst { translate } = useLocalization()\n</script>\n<template>\n <ApiReferenceToolbarPopover\n class=\"w-120\"\n placement=\"bottom-start\">\n <template #button>\n <button\n class=\"text-c-2 hover:text-c-1 hover:bg-b-2 ml-auto flex items-center gap-1 rounded px-2 py-2.25 text-base leading-none\"\n type=\"button\">\n <ScalarIconInfo />\n {{ translate('developerTools.title') }}\n </button>\n </template>\n <div class=\"-m-2 flex flex-col gap-2 leading-relaxed\">\n <div>{{ translate('developerTools.intro') }}</div>\n <div>\n {{ translate('developerTools.disableToolbarBefore') }}\n <div\n class=\"bg-b-2 inline-flex items-center gap-0.5 rounded border px-1 py-0.5 text-sm\">\n <code class=\"font-code\">{{ CONFIG_SETTING }}</code>\n <ScalarIconButton\n class=\"-m-1 p-1.25\"\n :icon=\"ScalarIconCopy\"\n :label=\"translate('actions.copyToClipboard')\"\n size=\"sm\"\n @click=\"copyToClipboard(CONFIG_SETTING)\" />\n </div>\n {{ translate('developerTools.disableToolbarAfter') }}\n </div>\n </div>\n <template #info>\n {{ translate('developerTools.localhostOnly') }}\n </template>\n </ApiReferenceToolbarPopover>\n</template>\n"],"mappings":""}
@@ -1,3 +1,4 @@
1
+ import { useLocalization } from "../../localization/use-localization.js";
1
2
  import ApiReferenceToolbarPopover_default from "./ApiReferenceToolbarPopover.vue.js";
2
3
  import { createBlock, createElementVNode, createTextVNode, createVNode, defineComponent, openBlock, toDisplayString, unref, withCtx } from "vue";
3
4
  import { useClipboard } from "@scalar/use-hooks/useClipboard";
@@ -15,23 +16,24 @@ var ApiReferenceToolbarTitle_vue_vue_type_script_setup_true_lang_default = /* @_
15
16
  __name: "ApiReferenceToolbarTitle",
16
17
  setup(__props) {
17
18
  const { copyToClipboard } = useClipboard();
19
+ const { translate } = useLocalization();
18
20
  return (_ctx, _cache) => {
19
21
  return openBlock(), createBlock(ApiReferenceToolbarPopover_default, {
20
22
  class: "w-120",
21
23
  placement: "bottom-start"
22
24
  }, {
23
- button: withCtx(() => [createElementVNode("button", _hoisted_1, [createVNode(unref(ScalarIconInfo)), _cache[1] || (_cache[1] = createTextVNode(" Developer Tools ", -1))])]),
24
- info: withCtx(() => [..._cache[5] || (_cache[5] = [createTextVNode(" The developer tools will only appear when running on localhost. ", -1)])]),
25
- default: withCtx(() => [createElementVNode("div", _hoisted_2, [_cache[4] || (_cache[4] = createElementVNode("div", null, " The developer tools allow you to customize the appearance and behavior of your documentation. You can also share your documentation using the Scalar Registry. ", -1)), createElementVNode("div", null, [
26
- _cache[2] || (_cache[2] = createTextVNode(" To disable the toolbar, set ", -1)),
25
+ button: withCtx(() => [createElementVNode("button", _hoisted_1, [createVNode(unref(ScalarIconInfo)), createTextVNode(" " + toDisplayString(unref(translate)("developerTools.title")), 1)])]),
26
+ info: withCtx(() => [createTextVNode(toDisplayString(unref(translate)("developerTools.localhostOnly")), 1)]),
27
+ default: withCtx(() => [createElementVNode("div", _hoisted_2, [createElementVNode("div", null, toDisplayString(unref(translate)("developerTools.intro")), 1), createElementVNode("div", null, [
28
+ createTextVNode(toDisplayString(unref(translate)("developerTools.disableToolbarBefore")) + " ", 1),
27
29
  createElementVNode("div", _hoisted_3, [createElementVNode("code", { class: "font-code" }, toDisplayString(CONFIG_SETTING)), createVNode(unref(ScalarIconButton), {
28
30
  class: "-m-1 p-1.25",
29
31
  icon: unref(ScalarIconCopy),
30
- label: "Copy link to clipboard",
32
+ label: unref(translate)("actions.copyToClipboard"),
31
33
  size: "sm",
32
34
  onClick: _cache[0] || (_cache[0] = ($event) => unref(copyToClipboard)(CONFIG_SETTING))
33
- }, null, 8, ["icon"])]),
34
- _cache[3] || (_cache[3] = createTextVNode(" in your configuration. ", -1))
35
+ }, null, 8, ["icon", "label"])]),
36
+ createTextVNode(" " + toDisplayString(unref(translate)("developerTools.disableToolbarAfter")), 1)
35
37
  ])])]),
36
38
  _: 1
37
39
  });
@@ -1 +1 @@
1
- {"version":3,"file":"ApiReferenceToolbarTitle.vue.script.js","names":[],"sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarTitle.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarIconButton } from '@scalar/components/icon-button'\nimport { ScalarIconCopy, ScalarIconInfo } from '@scalar/icons'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\n\nimport ApiReferenceToolbarPopover from './ApiReferenceToolbarPopover.vue'\n\nconst CONFIG_SETTING = 'showDeveloperTools: \"never\"'\n\nconst { copyToClipboard } = useClipboard()\n</script>\n<template>\n <ApiReferenceToolbarPopover\n class=\"w-120\"\n placement=\"bottom-start\">\n <template #button>\n <button\n class=\"text-c-2 hover:text-c-1 hover:bg-b-2 ml-auto flex items-center gap-1 rounded px-2 py-2.25 text-base leading-none\"\n type=\"button\">\n <ScalarIconInfo />\n Developer Tools\n </button>\n </template>\n <div class=\"-m-2 flex flex-col gap-2 leading-relaxed\">\n <div>\n The developer tools allow you to customize the appearance and behavior\n of your documentation. You can also share your documentation using the\n Scalar Registry.\n </div>\n <div>\n To disable the toolbar, set\n <div\n class=\"bg-b-2 inline-flex items-center gap-0.5 rounded border px-1 py-0.5 text-sm\">\n <code class=\"font-code\">{{ CONFIG_SETTING }}</code>\n <ScalarIconButton\n class=\"-m-1 p-1.25\"\n :icon=\"ScalarIconCopy\"\n label=\"Copy link to clipboard\"\n size=\"sm\"\n @click=\"copyToClipboard(CONFIG_SETTING)\" />\n </div>\n in your configuration.\n </div>\n </div>\n <template #info>\n The developer tools will only appear when running on localhost.\n </template>\n </ApiReferenceToolbarPopover>\n</template>\n"],"mappings":";;;;;;;;;;;;AAOA,IAAM,iBAAiB;;;;EAEvB,MAAM,EAAE,oBAAoB,cAAa;;uBAGvC,YAmC6B,oCAAA;IAlC3B,OAAM;IACN,WAAU;;IACC,QAAM,cAMN,CALT,mBAKS,UALT,YAKS,CAFP,YAAkB,MAAA,eAAA,CAAA,EAAA,OAAA,OAAA,OAAA,KAAA,gBAAA,qBAEpB,GAAA,EAAA,CAAA,CAAA,CAAA;IAuBS,MAAI,cAEf,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAFgB,qEAEhB,GAAA,CAAA,EAAA,CAAA;2BAHM,CApBN,mBAoBM,OApBN,YAoBM,CAAA,OAAA,OAAA,OAAA,KAnBJ,mBAIM,OAAA,MAJD,oKAIL,GAAA,GACA,mBAaM,OAAA,MAAA;+CAbD,iCAEH,GAAA;KAAA,mBASM,OATN,YASM,CAPJ,mBAAmD,QAAA,EAA7C,OAAM,aAAW,EAAA,gBAAI,eAAc,CAAA,EACzC,YAK6C,MAAA,iBAAA,EAAA;MAJ3C,OAAM;MACL,MAAM,MAAA,eAAc;MACrB,OAAM;MACN,MAAK;MACJ,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,MAAA,gBAAe,CAAC,eAAc;;+CACpC,4BAER,GAAA"}
1
+ {"version":3,"file":"ApiReferenceToolbarTitle.vue.script.js","names":[],"sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarTitle.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarIconButton } from '@scalar/components/icon-button'\nimport { ScalarIconCopy, ScalarIconInfo } from '@scalar/icons'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\n\nimport { useLocalization } from '@/features/localization'\n\nimport ApiReferenceToolbarPopover from './ApiReferenceToolbarPopover.vue'\n\nconst CONFIG_SETTING = 'showDeveloperTools: \"never\"'\n\nconst { copyToClipboard } = useClipboard()\nconst { translate } = useLocalization()\n</script>\n<template>\n <ApiReferenceToolbarPopover\n class=\"w-120\"\n placement=\"bottom-start\">\n <template #button>\n <button\n class=\"text-c-2 hover:text-c-1 hover:bg-b-2 ml-auto flex items-center gap-1 rounded px-2 py-2.25 text-base leading-none\"\n type=\"button\">\n <ScalarIconInfo />\n {{ translate('developerTools.title') }}\n </button>\n </template>\n <div class=\"-m-2 flex flex-col gap-2 leading-relaxed\">\n <div>{{ translate('developerTools.intro') }}</div>\n <div>\n {{ translate('developerTools.disableToolbarBefore') }}\n <div\n class=\"bg-b-2 inline-flex items-center gap-0.5 rounded border px-1 py-0.5 text-sm\">\n <code class=\"font-code\">{{ CONFIG_SETTING }}</code>\n <ScalarIconButton\n class=\"-m-1 p-1.25\"\n :icon=\"ScalarIconCopy\"\n :label=\"translate('actions.copyToClipboard')\"\n size=\"sm\"\n @click=\"copyToClipboard(CONFIG_SETTING)\" />\n </div>\n {{ translate('developerTools.disableToolbarAfter') }}\n </div>\n </div>\n <template #info>\n {{ translate('developerTools.localhostOnly') }}\n </template>\n </ApiReferenceToolbarPopover>\n</template>\n"],"mappings":";;;;;;;;;;;;;AASA,IAAM,iBAAiB;;;;EAEvB,MAAM,EAAE,oBAAoB,cAAa;EACzC,MAAM,EAAE,cAAc,iBAAgB;;uBAGpC,YA+B6B,oCAAA;IA9B3B,OAAM;IACN,WAAU;;IACC,QAAM,cAMN,CALT,mBAKS,UALT,YAKS,CAFP,YAAkB,MAAA,eAAA,CAAA,EAAA,gBAAA,MAClB,gBAAG,MAAA,UAAS,CAAA,uBAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA;IAoBL,MAAI,cACkC,CAAA,gBAAA,gBAA5C,MAAA,UAAS,CAAA,+BAAA,CAAA,EAAA,EAAA,CAAA,CAAA;2BAFR,CAhBN,mBAgBM,OAhBN,YAgBM,CAfJ,mBAAkD,OAAA,MAAA,gBAA1C,MAAA,UAAS,CAAA,uBAAA,CAAA,EAAA,EAAA,EACjB,mBAaM,OAAA,MAAA;qCAZD,MAAA,UAAS,CAAA,sCAAA,CAAA,GAA0C,KACtD,EAAA;KAAA,mBASM,OATN,YASM,CAPJ,mBAAmD,QAAA,EAA7C,OAAM,aAAW,EAAA,gBAAI,eAAc,CAAA,EACzC,YAK6C,MAAA,iBAAA,EAAA;MAJ3C,OAAM;MACL,MAAM,MAAA,eAAc;MACpB,OAAO,MAAA,UAAS,CAAA,0BAAA;MACjB,MAAK;MACJ,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,MAAA,gBAAe,CAAC,eAAc;;qBACpC,MACN,gBAAG,MAAA,UAAS,CAAA,qCAAA,CAAA,EAAA,EAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"DeployApiReference.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/developer-tools/components/DeployApiReference.vue"],"names":[],"mappings":"AAiCA,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":"DeployApiReference.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/developer-tools/components/DeployApiReference.vue"],"names":[],"mappings":"AAmCA,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":"DeployApiReference.vue.js","names":[],"sources":["../../../../src/features/developer-tools/components/DeployApiReference.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 ApiReferenceToolbarShareRegister from './ApiReferenceToolbarShareRegister.vue'\n\nconst { workspace, externalUrls } = defineProps<{\n workspace: WorkspaceStore\n externalUrls: ExternalUrls\n}>()\n</script>\n\n<template>\n <ApiReferenceToolbarPopover class=\"w-120\">\n <template #label>Deploy</template>\n <ScalarFormSection>\n <template #label>Scalar Docs</template>\n <p class=\"text-c-2 mb-2 leading-normal\">\n Deploy your documentation on Scalar, the modern documentation platform\n for your API and everything else.\n </p>\n <ApiReferenceToolbarShareRegister\n :externalUrls\n :workspace />\n </ScalarFormSection>\n </ApiReferenceToolbarPopover>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"DeployApiReference.vue.js","names":[],"sources":["../../../../src/features/developer-tools/components/DeployApiReference.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 ApiReferenceToolbarShareRegister from './ApiReferenceToolbarShareRegister.vue'\n\nconst { workspace, externalUrls } = defineProps<{\n workspace: WorkspaceStore\n externalUrls: ExternalUrls\n}>()\nconst { translate } = useLocalization()\n</script>\n\n<template>\n <ApiReferenceToolbarPopover class=\"w-120\">\n <template #label>{{ translate('developerTools.deploy') }}</template>\n <ScalarFormSection>\n <template #label>{{ translate('developerTools.scalarDocs') }}</template>\n <p class=\"text-c-2 mb-2 leading-normal\">\n {{ translate('developerTools.deployDescription') }}\n </p>\n <ApiReferenceToolbarShareRegister\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 ApiReferenceToolbarShareRegister_default from "./ApiReferenceToolbarShareRegister.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/DeployApiReference.vue?vue&type=script&setup=true&lang.ts
7
+ var _hoisted_1 = { class: "text-c-2 mb-2 leading-normal" };
6
8
  var DeployApiReference_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
7
9
  __name: "DeployApiReference",
8
10
  props: {
@@ -10,12 +12,13 @@ var DeployApiReference_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("Deploy", -1)])]),
18
+ label: withCtx(() => [createTextVNode(toDisplayString(unref(translate)("developerTools.deploy")), 1)]),
16
19
  default: withCtx(() => [createVNode(unref(ScalarFormSection), null, {
17
- label: withCtx(() => [..._cache[1] || (_cache[1] = [createTextVNode("Scalar Docs", -1)])]),
18
- default: withCtx(() => [_cache[2] || (_cache[2] = createElementVNode("p", { class: "text-c-2 mb-2 leading-normal" }, " Deploy your documentation on Scalar, the modern documentation platform for your API and everything else. ", -1)), createVNode(ApiReferenceToolbarShareRegister_default, {
20
+ label: withCtx(() => [createTextVNode(toDisplayString(unref(translate)("developerTools.scalarDocs")), 1)]),
21
+ default: withCtx(() => [createElementVNode("p", _hoisted_1, toDisplayString(unref(translate)("developerTools.deployDescription")), 1), createVNode(ApiReferenceToolbarShareRegister_default, {
19
22
  externalUrls: __props.externalUrls,
20
23
  workspace: __props.workspace
21
24
  }, null, 8, ["externalUrls", "workspace"])]),
@@ -1 +1 @@
1
- {"version":3,"file":"DeployApiReference.vue.script.js","names":[],"sources":["../../../../src/features/developer-tools/components/DeployApiReference.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 ApiReferenceToolbarShareRegister from './ApiReferenceToolbarShareRegister.vue'\n\nconst { workspace, externalUrls } = defineProps<{\n workspace: WorkspaceStore\n externalUrls: ExternalUrls\n}>()\n</script>\n\n<template>\n <ApiReferenceToolbarPopover class=\"w-120\">\n <template #label>Deploy</template>\n <ScalarFormSection>\n <template #label>Scalar Docs</template>\n <p class=\"text-c-2 mb-2 leading-normal\">\n Deploy your documentation on Scalar, the modern documentation platform\n for your API and everything else.\n </p>\n <ApiReferenceToolbarShareRegister\n :externalUrls\n :workspace />\n </ScalarFormSection>\n </ApiReferenceToolbarPopover>\n</template>\n"],"mappings":";;;;;;;;;;;;;uBAeE,YAY6B,oCAAA,EAZD,OAAM,SAAO,EAAA;IAC5B,OAAK,cAAO,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAAN,UAAM,GAAA,CAAA,EAAA,CAAA;2BAUH,CATpB,YASoB,MAAA,kBAAA,EAAA,MAAA;KARP,OAAK,cAAY,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAAX,eAAW,GAAA,CAAA,EAAA,CAAA;4BAIxB,CAAA,OAAA,OAAA,OAAA,KAHJ,mBAGI,KAAA,EAHD,OAAM,gCAA8B,EAAC,8GAGxC,GAAA,GACA,YAEe,0CAAA;MADZ,cAAA,QAAA;MACA,WAAA,QAAA"}
1
+ {"version":3,"file":"DeployApiReference.vue.script.js","names":[],"sources":["../../../../src/features/developer-tools/components/DeployApiReference.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 ApiReferenceToolbarShareRegister from './ApiReferenceToolbarShareRegister.vue'\n\nconst { workspace, externalUrls } = defineProps<{\n workspace: WorkspaceStore\n externalUrls: ExternalUrls\n}>()\nconst { translate } = useLocalization()\n</script>\n\n<template>\n <ApiReferenceToolbarPopover class=\"w-120\">\n <template #label>{{ translate('developerTools.deploy') }}</template>\n <ScalarFormSection>\n <template #label>{{ translate('developerTools.scalarDocs') }}</template>\n <p class=\"text-c-2 mb-2 leading-normal\">\n {{ translate('developerTools.deployDescription') }}\n </p>\n <ApiReferenceToolbarShareRegister\n :externalUrls\n :workspace />\n </ScalarFormSection>\n </ApiReferenceToolbarPopover>\n</template>\n"],"mappings":";;;;;;;;;;;;;;EAcA,MAAM,EAAE,cAAc,iBAAgB;;uBAIpC,YAW6B,oCAAA,EAXD,OAAM,SAAO,EAAA;IAC5B,OAAK,cAAyC,CAAA,gBAAA,gBAArC,MAAA,UAAS,CAAA,wBAAA,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,mCAAA,CAAA,EAAA,EAAA,EAEd,YAEe,0CAAA;MADZ,cAAA,QAAA;MACA,WAAA,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ModifyConfiguration.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/developer-tools/components/ModifyConfiguration.vue"],"names":[],"mappings":"AAwEA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAQ5E,KAAK,WAAW,GAAG;IACjB,aAAa,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC,CAAA;CACnD,CAAC;AAyBF,KAAK,gBAAgB,GAAG;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC,CAAC;CAChD,CAAC;AAKF,KAAK,iBAAiB,GAAG,WAAW,GAAG,gBAAgB,CAAC;AAsKxD,QAAA,MAAM,YAAY;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"ModifyConfiguration.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/developer-tools/components/ModifyConfiguration.vue"],"names":[],"mappings":"AA+EA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAU5E,KAAK,WAAW,GAAG;IACjB,aAAa,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC,CAAA;CACnD,CAAC;AA0BF,KAAK,gBAAgB,GAAG;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC,CAAC;CAChD,CAAC;AAKF,KAAK,iBAAiB,GAAG,WAAW,GAAG,gBAAgB,CAAC;AAgLxD,QAAA,MAAM,YAAY;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ModifyConfiguration.vue.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":""}
1
+ {"version":3,"file":"ModifyConfiguration.vue.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":""}
@@ -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":""}