@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":"ModernLayout.vue.script.js","names":[],"sources":["../../../../src/features/Operation/layouts/ModernLayout.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { OperationCodeSample } from '@scalar/api-client/blocks/operation-code-sample'\nimport { ScalarErrorBoundary } from '@scalar/components/error-boundary'\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport { ScalarIconWebhooksLogo } from '@scalar/icons'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type { SecuritySchemeObjectSecret } from '@scalar/workspace-store/request-example'\nimport type {\n OpenApiDocument,\n OperationObject,\n ServerObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed, provide, ref, useId } from 'vue'\n\nimport { Anchor } from '@/components/Anchor'\nimport { Badge } from '@/components/Badge'\nimport { LinkList } from '@/components/LinkList'\nimport OperationPath from '@/components/OperationPath.vue'\nimport { Section, SectionContent, SectionHeaderTag } from '@/components/Section'\nimport AskAgentButton from '@/features/ask-agent-button/AskAgentButton.vue'\nimport { ExampleResponses } from '@/features/example-responses'\nimport { ExternalDocs } from '@/features/external-docs'\nimport Callbacks from '@/features/Operation/components/callbacks/Callbacks.vue'\nimport OperationParameters from '@/features/Operation/components/OperationParameters.vue'\nimport OperationResponses from '@/features/Operation/components/OperationResponses.vue'\nimport SecurityRequirementBadge from '@/features/Operation/components/SecurityRequirementBadge.vue'\nimport type { RequiredSecurity } from '@/features/Operation/helpers/get-required-security'\nimport {\n getOperationStability,\n getOperationStabilityColor,\n isOperationDeprecated,\n} from '@/features/Operation/helpers/operation-stability'\nimport type { OperationProps } from '@/features/Operation/Operation.vue'\nimport {\n REQUEST_BODY_COMPOSITION_INDEX_SYMBOL,\n type RequestBodyCompositionSelection,\n} from '@/features/Operation/request-body-composition-index'\nimport { getXKeysFromObject } from '@/features/specification-extension'\nimport SpecificationExtension from '@/features/specification-extension/SpecificationExtension.vue'\nimport { TestRequestButton } from '@/features/test-request-button'\nimport { XBadges } from '@/features/x-badges'\n\nconst {\n clientOptions,\n document,\n eventBus,\n isWebhook,\n method,\n operation,\n options,\n path,\n requiredSecurity,\n selectedServer,\n selectedSecuritySchemes,\n selectedClient,\n} = defineProps<\n Omit<\n OperationProps,\n | 'document'\n | 'pathValue'\n | 'server'\n | 'isCollapsed'\n | 'securitySchemes'\n | 'authStore'\n > & {\n /** Operation object with path params */\n operation: OperationObject\n /** The selected server for the operation */\n selectedServer: ServerObject | null\n /** The selected security schemes for the operation */\n selectedSecuritySchemes: SecuritySchemeObjectSecret[]\n /** Required/optional security state for the badge next to the path */\n requiredSecurity: RequiredSecurity\n /** The document the operation belongs to, used to resolve schema references for display */\n document?: OpenApiDocument\n }\n>()\n\nconst operationTitle = computed(() => operation.summary || path || '')\n\nconst labelId = useId()\n\nconst operationExtensions = computed(() => getXKeysFromObject(operation))\n\n/** Track the selected request body content type so the code sample stays in sync */\nconst selectedRequestBodyContentType = ref<string | undefined>()\n\n/** Selected request body oneOf/anyOf variants; synced with schema dropdowns and code sample */\nconst requestBodyCompositionSelection = ref<RequestBodyCompositionSelection>({})\n\nconst requestBodyCompositionSelectionForCodeSample = computed(\n (): RequestBodyCompositionSelection => ({\n ...requestBodyCompositionSelection.value,\n }),\n)\n\nconst requestBodyCompositionSelectionKey = computed(() =>\n JSON.stringify(requestBodyCompositionSelectionForCodeSample.value),\n)\n\nprovide(REQUEST_BODY_COMPOSITION_INDEX_SYMBOL, requestBodyCompositionSelection)\n</script>\n\n<template>\n <Section\n :id=\"id\"\n :aria-labelledby=\"labelId\"\n :label=\"operationTitle\"\n tabindex=\"-1\"\n @intersecting=\"() => eventBus?.emit('intersecting:nav-item', { id })\">\n <SectionContent>\n <!-- Badges -->\n <div class=\"flex flex-row justify-between gap-1\">\n <!-- Left -->\n <div class=\"flex gap-1\">\n <!-- Operation ID -->\n <Badge v-if=\"options?.showOperationId && operation.operationId\">\n {{ operation.operationId }}\n </Badge>\n <!-- Stability badge -->\n <Badge\n v-if=\"getOperationStability(operation)\"\n class=\"capitalize\"\n :class=\"getOperationStabilityColor(operation)\">\n {{ getOperationStability(operation) }}\n </Badge>\n <!-- Webhook badge -->\n <Badge\n v-if=\"isWebhook\"\n class=\"font-code text-green flex w-fit items-center justify-center gap-1\">\n <ScalarIconWebhooksLogo weight=\"bold\" />Webhook\n </Badge>\n <!-- x-badges before -->\n <XBadges\n :badges=\"operation['x-badges']\"\n position=\"before\" />\n </div>\n <!-- Right -->\n <div class=\"flex gap-1\">\n <!-- x-badges after -->\n <XBadges\n :badges=\"operation['x-badges']\"\n position=\"after\" />\n </div>\n </div>\n <div class=\"operation-layout\">\n <!-- Title -->\n <div\n class=\"operation-title\"\n :class=\"isOperationDeprecated(operation) && 'deprecated'\">\n <Anchor\n @copyAnchorUrl=\"() => eventBus?.emit('copy-url:nav-item', { id })\">\n <SectionHeaderTag\n :id=\"labelId\"\n :level=\"3\">\n {{ operationTitle }}\n </SectionHeaderTag>\n </Anchor>\n </div>\n\n <!-- Required auth badge -->\n <div class=\"operation-auth\">\n <SecurityRequirementBadge :requiredSecurity />\n </div>\n\n <!-- Description -->\n <div class=\"operation-description\">\n <SpecificationExtension :value=\"operationExtensions\" />\n <ScalarMarkdown\n :anchorPrefix=\"id\"\n aria-label=\"Operation Description\"\n role=\"group\"\n transformType=\"heading\"\n :value=\"operation.description\"\n withAnchors\n withImages />\n </div>\n\n <!--\n Parameters, request body, responses and callbacks.\n\n This block is kept before the examples in source order on purpose: the\n request body schema (via SchemaComposition) seeds the shared\n requestBodyCompositionSelection on mount, which drives the\n OperationCodeSample's :key. Mounting the details first means the code\n sample reads the final key on its first render and is never remounted —\n a remount would reset the selected client and tear down an open client\n picker. The grid (see grid-template-areas below) still paints the\n examples on the right, independent of this source order.\n -->\n <div class=\"operation-details\">\n <OperationParameters\n v-model:selectedContentType=\"selectedRequestBodyContentType\"\n :breadcrumb=\"[id]\"\n :document\n :eventBus\n :options\n :parameters=\"operation.parameters\"\n :requestBody=\"getResolvedRef(operation.requestBody)\" />\n <OperationResponses\n :breadcrumb=\"[id]\"\n :collapsableItems=\"!options.expandAllResponses\"\n :document\n :eventBus\n :options\n :responses=\"operation.responses\" />\n\n <!-- Callbacks -->\n <ScalarErrorBoundary>\n <Callbacks\n v-if=\"operation.callbacks\"\n :callbacks=\"operation.callbacks\"\n class=\"mt-6\"\n :document\n :eventBus\n :options\n :path />\n </ScalarErrorBoundary>\n </div>\n\n <!-- Example request and responses -->\n <div class=\"examples\">\n <!-- External Docs -->\n <LinkList v-if=\"operation.externalDocs\">\n <ExternalDocs :value=\"operation.externalDocs\" />\n </LinkList>\n\n <!-- New Example Request -->\n <ScalarErrorBoundary>\n <OperationCodeSample\n :key=\"requestBodyCompositionSelectionKey\"\n :clientOptions\n :eventBus\n fallback\n :isWebhook\n :method\n :operation\n :path\n :requestBodyCompositionSelection=\"\n requestBodyCompositionSelectionForCodeSample\n \"\n :securitySchemes=\"selectedSecuritySchemes\"\n :selectedClient\n :selectedContentType=\"selectedRequestBodyContentType\"\n :selectedServer>\n <template #header>\n <OperationPath\n class=\"font-code text-c-2 [&_em]:text-c-1 min-w-0 [&_em]:not-italic\"\n :deprecated=\"operation?.deprecated\"\n :path=\"path\" />\n </template>\n <template\n v-if=\"!isWebhook\"\n #footer=\"{ exampleName }\">\n <div class=\"flex\">\n <AskAgentButton />\n <TestRequestButton\n v-if=\"!options.hideTestRequestButton\"\n :id\n :eventBus\n :exampleName\n :method\n :path\n :requestBodyCompositionSelection=\"\n requestBodyCompositionSelectionForCodeSample\n \" />\n </div>\n </template>\n </OperationCodeSample>\n </ScalarErrorBoundary>\n\n <ScalarErrorBoundary>\n <ExampleResponses\n v-if=\"operation.responses\"\n :responses=\"operation.responses\"\n style=\"margin-top: 12px\" />\n </ScalarErrorBoundary>\n </div>\n </div>\n </SectionContent>\n </Section>\n</template>\n\n<style scoped>\n/*\n * The operation is a single grid so the request example can sit beside the\n * details on wide screens, then be lifted directly under the description when\n * the layout collapses (see the container query below). Vertical rhythm comes\n * from element margins rather than row-gap, because the details block carries\n * its own leading margin (mt-6) that already spaces it from whatever precedes\n * it — a row-gap would double that gap.\n */\n.operation-layout {\n display: grid;\n grid-template-columns: 1fr 1fr;\n grid-template-rows: auto auto 1fr;\n grid-template-areas:\n 'heading badge'\n 'description examples'\n 'details examples';\n column-gap: 48px;\n row-gap: 0;\n}\n\n.operation-title {\n grid-area: heading;\n margin-bottom: 12px;\n\n /* Mirror the shared section header typography (see SectionHeader.vue) */\n font-size: var(--font-size, var(--scalar-heading-1));\n font-weight: var(--font-weight, var(--scalar-bold));\n color: var(--scalar-color-1);\n line-height: 1.45;\n}\n\n.operation-auth {\n grid-area: badge;\n justify-self: end;\n align-self: start;\n}\n\n.operation-description {\n grid-area: description;\n min-width: 0;\n}\n\n.operation-details {\n grid-area: details;\n min-width: 0;\n}\n\n.examples {\n grid-area: examples;\n align-self: start;\n min-width: 0;\n\n position: sticky;\n top: calc(var(--refs-viewport-offset) + 24px);\n}\n\n.examples > * {\n max-height: calc((var(--refs-viewport-height) - 60px) / 2);\n position: relative;\n}\n\n.examples > *:first-of-type:last-of-type {\n max-height: calc((var(--refs-viewport-height) - 60px));\n}\n\n/*\n * Don't constrain card height on mobile\n * (or zoomed in screens)\n */\n@media (max-width: 600px) {\n .examples > * {\n max-height: unset;\n }\n}\n\n.deprecated * {\n text-decoration: line-through;\n}\n\n/*\n * On narrow containers the layout collapses to a single column: the request\n * example is lifted directly under the description, and the auth badge becomes\n * an eyebrow above the title.\n */\n@container narrow-references-container (max-width: 900px) {\n .operation-layout {\n grid-template-columns: 1fr;\n grid-template-areas:\n 'badge'\n 'heading'\n 'description'\n 'examples'\n 'details';\n column-gap: 0;\n }\n\n .operation-auth {\n justify-self: start;\n margin-bottom: 4px;\n }\n\n .operation-title {\n margin-bottom: 24px;\n }\n\n .operation-description {\n margin-bottom: 24px;\n }\n\n /* Don't make the examples sticky on narrow viewports */\n .examples {\n position: static;\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8EA,MAAM,iBAAiB,eAAe,QAAA,UAAU,WAAW,QAAA,QAAQ,GAAE;EAErE,MAAM,UAAU,OAAM;EAEtB,MAAM,sBAAsB,eAAe,mBAAmB,QAAA,UAAU,CAAA;;EAGxE,MAAM,iCAAiC,KAAwB;;EAG/D,MAAM,kCAAkC,IAAqC,EAAE,CAAA;EAE/E,MAAM,+CAA+C,gBACX,EACtC,GAAG,gCAAgC,OACpC,EACH;EAEA,MAAM,qCAAqC,eACzC,KAAK,UAAU,6CAA6C,MAAM,CACpE;AAEA,UAAQ,uCAAuC,gCAA+B;;uBAI5E,YAgLU,MAAA,gBAAA,E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.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { CodeExample } from '@scalar/blocks/code-example'\nimport { ScalarErrorBoundary } from '@scalar/components/error-boundary'\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport { ScalarIconWebhooksLogo } from '@scalar/icons'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type { SecuritySchemeObjectSecret } from '@scalar/workspace-store/request-example'\nimport type {\n OpenApiDocument,\n OperationObject,\n ServerObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed, provide, ref, useId } from 'vue'\n\nimport { Anchor } from '@/components/Anchor'\nimport { Badge } from '@/components/Badge'\nimport { LinkList } from '@/components/LinkList'\nimport OperationPath from '@/components/OperationPath.vue'\nimport { Section, SectionContent, SectionHeaderTag } from '@/components/Section'\nimport AskAgentButton from '@/features/ask-agent-button/AskAgentButton.vue'\nimport { ExampleResponses } from '@/features/example-responses'\nimport { ExternalDocs } from '@/features/external-docs'\nimport { useLocalization } from '@/features/localization'\nimport Callbacks from '@/features/Operation/components/callbacks/Callbacks.vue'\nimport OperationParameters from '@/features/Operation/components/OperationParameters.vue'\nimport OperationResponses from '@/features/Operation/components/OperationResponses.vue'\nimport SecurityRequirementBadge from '@/features/Operation/components/SecurityRequirementBadge.vue'\nimport type { RequiredSecurity } from '@/features/Operation/helpers/get-required-security'\nimport {\n getOperationStability,\n getOperationStabilityColor,\n isOperationDeprecated,\n} from '@/features/Operation/helpers/operation-stability'\nimport type { OperationProps } from '@/features/Operation/Operation.vue'\nimport {\n REQUEST_BODY_COMPOSITION_INDEX_SYMBOL,\n type RequestBodyCompositionSelection,\n} from '@/features/Operation/request-body-composition-index'\nimport { getXKeysFromObject } from '@/features/specification-extension'\nimport SpecificationExtension from '@/features/specification-extension/SpecificationExtension.vue'\nimport { TestRequestButton } from '@/features/test-request-button'\nimport { XBadges } from '@/features/x-badges'\n\nconst {\n clientOptions,\n document,\n eventBus,\n isWebhook,\n method,\n operation,\n options,\n path,\n requiredSecurity,\n selectedServer,\n selectedSecuritySchemes,\n selectedClient,\n selectedExample,\n} = defineProps<\n Omit<\n OperationProps,\n | 'document'\n | 'pathValue'\n | 'server'\n | 'isCollapsed'\n | 'securitySchemes'\n | 'authStore'\n > & {\n /** Operation object with path params */\n operation: OperationObject\n /** The selected server for the operation */\n selectedServer: ServerObject | null\n /** The selected security schemes for the operation */\n selectedSecuritySchemes: SecuritySchemeObjectSecret[]\n /** Required/optional security state for the badge next to the path */\n requiredSecurity: RequiredSecurity\n /** The document the operation belongs to, used to resolve schema references for display */\n document?: OpenApiDocument\n }\n>()\nconst { translate } = useLocalization()\n\nconst operationTitle = computed(() => operation.summary || path || '')\n\nconst labelId = useId()\n\nconst operationExtensions = computed(() => getXKeysFromObject(operation))\n\n/** Track the selected request body content type so the code sample stays in sync */\nconst selectedRequestBodyContentType = ref<string | undefined>()\n\n/** Selected request body oneOf/anyOf variants; synced with schema dropdowns and code sample */\nconst requestBodyCompositionSelection = ref<RequestBodyCompositionSelection>({})\n\nconst requestBodyCompositionSelectionForCodeSample = computed(\n (): RequestBodyCompositionSelection => ({\n ...requestBodyCompositionSelection.value,\n }),\n)\n\nconst requestBodyCompositionSelectionKey = computed(() =>\n JSON.stringify(requestBodyCompositionSelectionForCodeSample.value),\n)\n\nprovide(REQUEST_BODY_COMPOSITION_INDEX_SYMBOL, requestBodyCompositionSelection)\n</script>\n\n<template>\n <Section\n :id=\"id\"\n :aria-labelledby=\"labelId\"\n :label=\"operationTitle\"\n tabindex=\"-1\"\n @intersecting=\"() => eventBus?.emit('intersecting:nav-item', { id })\">\n <SectionContent>\n <!-- Badges -->\n <div class=\"flex flex-row justify-between gap-1\">\n <!-- Left -->\n <div class=\"flex gap-1\">\n <!-- Operation ID -->\n <Badge v-if=\"options?.showOperationId && operation.operationId\">\n {{ operation.operationId }}\n </Badge>\n <!-- Stability badge -->\n <Badge\n v-if=\"getOperationStability(operation)\"\n class=\"capitalize\"\n :class=\"getOperationStabilityColor(operation)\">\n {{ getOperationStability(operation) }}\n </Badge>\n <!-- Webhook badge -->\n <Badge\n v-if=\"isWebhook\"\n class=\"font-code text-green flex w-fit items-center justify-center gap-1\">\n <ScalarIconWebhooksLogo weight=\"bold\" />\n {{ translate('operation.webhook') }}\n </Badge>\n <!-- x-badges before -->\n <XBadges\n :badges=\"operation['x-badges']\"\n position=\"before\" />\n </div>\n <!-- Right -->\n <div class=\"flex gap-1\">\n <!-- x-badges after -->\n <XBadges\n :badges=\"operation['x-badges']\"\n position=\"after\" />\n </div>\n </div>\n <div class=\"operation-layout\">\n <!-- Title -->\n <div\n class=\"operation-title\"\n :class=\"isOperationDeprecated(operation) && 'deprecated'\">\n <Anchor\n @copyAnchorUrl=\"() => eventBus?.emit('copy-url:nav-item', { id })\">\n <SectionHeaderTag\n :id=\"labelId\"\n :level=\"3\">\n {{ operationTitle }}\n </SectionHeaderTag>\n </Anchor>\n </div>\n\n <!-- Required auth badge -->\n <div class=\"operation-auth\">\n <SecurityRequirementBadge :requiredSecurity />\n </div>\n\n <!-- Description -->\n <div class=\"operation-description\">\n <SpecificationExtension :value=\"operationExtensions\" />\n <ScalarMarkdown\n :anchorPrefix=\"id\"\n :aria-label=\"translate('common.description')\"\n role=\"group\"\n transformType=\"heading\"\n :value=\"operation.description\"\n withAnchors\n withImages />\n </div>\n\n <!--\n Parameters, request body, responses and callbacks.\n\n This block is kept before the examples in source order on purpose: the\n request body schema (via SchemaComposition) seeds the shared\n requestBodyCompositionSelection on mount, which drives the\n CodeExample's :key. Mounting the details first means the code\n sample reads the final key on its first render and is never remounted —\n a remount would reset the selected client and tear down an open client\n picker. The grid (see grid-template-areas below) still paints the\n examples on the right, independent of this source order.\n -->\n <div class=\"operation-details\">\n <OperationParameters\n v-model:selectedContentType=\"selectedRequestBodyContentType\"\n :breadcrumb=\"[id]\"\n :document\n :eventBus\n :options\n :parameters=\"operation.parameters\"\n :requestBody=\"getResolvedRef(operation.requestBody)\" />\n <OperationResponses\n :breadcrumb=\"[id]\"\n :collapsableItems=\"!options.expandAllResponses\"\n :document\n :eventBus\n :options\n :responses=\"operation.responses\" />\n\n <!-- Callbacks -->\n <ScalarErrorBoundary>\n <Callbacks\n v-if=\"operation.callbacks\"\n :callbacks=\"operation.callbacks\"\n class=\"mt-6\"\n :document\n :eventBus\n :options\n :path />\n </ScalarErrorBoundary>\n </div>\n\n <!-- Example request and responses -->\n <div class=\"examples\">\n <!-- External Docs -->\n <LinkList v-if=\"operation.externalDocs\">\n <ExternalDocs :value=\"operation.externalDocs\" />\n </LinkList>\n\n <!-- New Example Request -->\n <ScalarErrorBoundary>\n <CodeExample\n :key=\"requestBodyCompositionSelectionKey\"\n :clientOptions\n :eventBus\n fallback\n :isWebhook\n :method\n :operation\n :path\n :requestBodyCompositionSelection=\"\n requestBodyCompositionSelectionForCodeSample\n \"\n :securitySchemes=\"selectedSecuritySchemes\"\n :selectedClient\n :selectedContentType=\"selectedRequestBodyContentType\"\n :selectedExample\n :selectedServer>\n <template #header>\n <OperationPath\n class=\"font-code text-c-2 [&_em]:text-c-1 min-w-0 [&_em]:not-italic\"\n :deprecated=\"operation?.deprecated\"\n :path=\"path\" />\n </template>\n <template\n v-if=\"!isWebhook\"\n #footer=\"{ exampleName }\">\n <div class=\"flex\">\n <AskAgentButton />\n <TestRequestButton\n v-if=\"!options.hideTestRequestButton\"\n :id\n :eventBus\n :exampleName\n :method\n :path\n :requestBodyCompositionSelection=\"\n requestBodyCompositionSelectionForCodeSample\n \" />\n </div>\n </template>\n </CodeExample>\n </ScalarErrorBoundary>\n\n <ScalarErrorBoundary>\n <ExampleResponses\n v-if=\"operation.responses\"\n :eventBus\n :responses=\"operation.responses\"\n :selectedExample\n style=\"margin-top: 12px\" />\n </ScalarErrorBoundary>\n </div>\n </div>\n </SectionContent>\n </Section>\n</template>\n\n<style scoped>\n/*\n * The operation is a single grid so the request example can sit beside the\n * details on wide screens, then be lifted directly under the description when\n * the layout collapses (see the container query below). Vertical rhythm comes\n * from element margins rather than row-gap, because the details block carries\n * its own leading margin (mt-6) that already spaces it from whatever precedes\n * it — a row-gap would double that gap.\n */\n.operation-layout {\n display: grid;\n grid-template-columns: 1fr 1fr;\n grid-template-rows: auto auto 1fr;\n grid-template-areas:\n 'heading badge'\n 'description examples'\n 'details examples';\n column-gap: 48px;\n row-gap: 0;\n}\n\n.operation-title {\n grid-area: heading;\n margin-bottom: 12px;\n\n /* Mirror the shared section header typography (see SectionHeader.vue) */\n font-size: var(--font-size, var(--scalar-heading-1));\n font-weight: var(--font-weight, var(--scalar-bold));\n color: var(--scalar-color-1);\n line-height: 1.45;\n}\n\n.operation-auth {\n grid-area: badge;\n justify-self: end;\n align-self: start;\n}\n\n.operation-description {\n grid-area: description;\n min-width: 0;\n}\n\n.operation-details {\n grid-area: details;\n min-width: 0;\n}\n\n.examples {\n grid-area: examples;\n align-self: start;\n min-width: 0;\n\n position: sticky;\n top: calc(var(--refs-viewport-offset) + 24px);\n}\n\n.examples > * {\n max-height: calc((var(--refs-viewport-height) - 60px) / 2);\n position: relative;\n}\n\n.examples > *:first-of-type:last-of-type {\n max-height: calc((var(--refs-viewport-height) - 60px));\n}\n\n/*\n * Don't constrain card height on mobile\n * (or zoomed in screens)\n */\n@media (max-width: 600px) {\n .examples > * {\n max-height: unset;\n }\n}\n\n.deprecated * {\n text-decoration: line-through;\n}\n\n/*\n * On narrow containers the layout collapses to a single column: the request\n * example is lifted directly under the description, and the auth badge becomes\n * an eyebrow above the title.\n */\n@container narrow-references-container (max-width: 900px) {\n .operation-layout {\n grid-template-columns: 1fr;\n grid-template-areas:\n 'badge'\n 'heading'\n 'description'\n 'examples'\n 'details';\n column-gap: 0;\n }\n\n .operation-auth {\n justify-self: start;\n margin-bottom: 4px;\n }\n\n .operation-title {\n margin-bottom: 24px;\n }\n\n .operation-description {\n margin-bottom: 24px;\n }\n\n /* Don't make the examples sticky on narrow viewports */\n .examples {\n position: static;\n }\n}\n</style>\n"],"mappings":";;;;;;;;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,QAAA,WAAW;UACvB,MAAM,QAAA;;;aAGF,QAAA,YAAA;eACN;sBAaK,EAbK,kBAAW,CACtB,mBAYM,OAZN,YAYM,CAXJ,YAAkB,uBAAA,EAAA,CAET,QAAA,QAAQ,yBAAA,WAAA,EADjB,YASM,MAAA,0BAAA,EAAA;;UAPH,IAAA,QAAA;UACA,UAAA,QAAA;UACA;UACA,QAAA,QAAA;UACA,MAAA,QAAA;UACA,iCAAwD,6CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;OAQnE,YAOsB,MAAA,oBAAA,EAAA,MAAA;gCALZ,QAAA,UAAU,aAAA,WAAA,EADlB,YAK6B,MAAA,yBAAA,EAAA;;SAH1B,UAAA,QAAA;SACA,WAAW,QAAA,UAAU;SACrB,iBAAA,QAAA;SACD,OAAA,EAAA,cAAA,QAAwB"}
@@ -1 +1 @@
1
- {"version":3,"file":"SearchButton.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Search/components/SearchButton.vue"],"names":[],"mappings":"AA4HA,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,6BAA6B,CAAA;AACpC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAClE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAKnG,KAAK,WAAW,GAAG;IACjB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,kBAAkB,CAAC,EAAE,kBAAkB,CAAA;IACvC,QAAQ,CAAC,EAAE,eAAe,GAAG,gBAAgB,CAAA;IAC7C,QAAQ,EAAE,iBAAiB,CAAA;CAC5B,CAAC;AAuLF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"SearchButton.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Search/components/SearchButton.vue"],"names":[],"mappings":"AAgIA,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,6BAA6B,CAAA;AACpC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAClE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAOnG,KAAK,WAAW,GAAG;IACjB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,kBAAkB,CAAC,EAAE,kBAAkB,CAAA;IACvC,QAAQ,CAAC,EAAE,eAAe,GAAG,gBAAgB,CAAA;IAC7C,QAAQ,EAAE,iBAAiB,CAAA;CAC5B,CAAC;AA+LF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1 +1 @@
1
- {"version":3,"file":"SearchButton.vue.js","names":[],"sources":["../../../../src/features/Search/components/SearchButton.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarIconButton } from '@scalar/components/icon-button'\nimport { useModal } from '@scalar/components/modal'\nimport { ScalarSidebarSearchButton } from '@scalar/components/sidebar'\nimport { isMacOS } from '@scalar/helpers/general/is-mac-os'\nimport { ScalarIconMagnifyingGlass } from '@scalar/icons'\nimport {\n DEFAULT_MODELS_SECTION_LABEL,\n type ModelsSectionLabel,\n} from '@scalar/types/api-reference'\nimport type { AsyncApiDocument } from '@scalar/types/asyncapi/3.1'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue'\n\nimport SearchModal from './SearchModal.vue'\n\nconst {\n searchHotKey = 'k',\n modelsSectionLabel = DEFAULT_MODELS_SECTION_LABEL,\n} = defineProps<{\n forceIcon?: boolean\n searchHotKey?: string\n hideModels?: boolean\n modelsSectionLabel?: ModelsSectionLabel\n document?: OpenApiDocument | AsyncApiDocument\n eventBus: WorkspaceEventBus\n}>()\n\nconst button = ref<InstanceType<typeof ScalarSidebarSearchButton>>()\nconst modalState = useModal()\n\n/**\n * Whether the user is on macOS, used to show the correct shortcut symbol.\n *\n * This must default to `false` so the server-rendered markup and the first\n * client render agree. Detecting the platform relies on `navigator`, which is\n * unavailable during SSR, so we resolve it after mount to avoid a hydration\n * mismatch.\n */\nconst isMac = ref(false)\nonMounted(() => {\n isMac.value = isMacOS()\n})\n\nconst handleHotKey = (e: KeyboardEvent) => {\n if ((isMacOS() ? e.metaKey : e.ctrlKey) && e.key === searchHotKey) {\n e.preventDefault()\n e.stopPropagation()\n\n if (modalState.open) {\n modalState.hide()\n } else {\n modalState.show()\n }\n }\n}\n\nwatch(\n () => modalState.open,\n async (next, prev) => {\n // Return focus to the button when the modal is closed\n if (!next && prev) {\n await nextTick()\n button.value?.$el.focus()\n }\n },\n)\n\n// Handle keyboard shortcuts\n// TODO: we can move this to the hotkey event bus but we would need to set up a custom key from the searchHotKey config\n// and make sure it works correctly inside the references first\nonMounted(() => window.addEventListener('keydown', handleHotKey))\nonBeforeUnmount(() => window.removeEventListener('keydown', handleHotKey))\n\nfunction handleClick() {\n modalState.show()\n}\n</script>\n<template>\n <ScalarIconButton\n v-if=\"forceIcon\"\n :icon=\"ScalarIconMagnifyingGlass\"\n label=\"Search\"\n @click=\"handleClick\" />\n <ScalarSidebarSearchButton\n v-else\n ref=\"button\"\n class=\"w-full\"\n :class=\"$attrs.class\"\n @click=\"handleClick\">\n <span class=\"sr-only\">Open Search</span>\n <span\n aria-hidden=\"true\"\n class=\"sidebar-search-placeholder\">\n Search\n </span>\n <template #shortcut>\n <template v-if=\"isMac\">\n <span class=\"sr-only\">Command</span>\n <span aria-hidden=\"true\">⌘</span>\n </template>\n <template v-else>\n <span class=\"sr-only\">CTRL</span>\n <span aria-hidden=\"true\">⌃</span>\n </template>\n {{ searchHotKey }}\n </template>\n </ScalarSidebarSearchButton>\n\n <SearchModal\n :document\n :eventBus=\"eventBus\"\n :modalState=\"modalState\"\n :modelsSectionLabel=\"modelsSectionLabel\" />\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"SearchButton.vue.js","names":[],"sources":["../../../../src/features/Search/components/SearchButton.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarIconButton } from '@scalar/components/icon-button'\nimport { useModal } from '@scalar/components/modal'\nimport { ScalarSidebarSearchButton } from '@scalar/components/sidebar'\nimport { isMacOS } from '@scalar/helpers/general/is-mac-os'\nimport { ScalarIconMagnifyingGlass } from '@scalar/icons'\nimport {\n DEFAULT_MODELS_SECTION_LABEL,\n type ModelsSectionLabel,\n} from '@scalar/types/api-reference'\nimport type { AsyncApiDocument } from '@scalar/types/asyncapi/3.1'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue'\n\nimport { useLocalization } from '@/features/localization'\n\nimport SearchModal from './SearchModal.vue'\n\nconst {\n searchHotKey = 'k',\n modelsSectionLabel = DEFAULT_MODELS_SECTION_LABEL,\n} = defineProps<{\n forceIcon?: boolean\n searchHotKey?: string\n hideModels?: boolean\n modelsSectionLabel?: ModelsSectionLabel\n document?: OpenApiDocument | AsyncApiDocument\n eventBus: WorkspaceEventBus\n}>()\n\nconst button = ref<InstanceType<typeof ScalarSidebarSearchButton>>()\nconst modalState = useModal()\nconst { translate } = useLocalization()\n\n/**\n * Whether the user is on macOS, used to show the correct shortcut symbol.\n *\n * This must default to `false` so the server-rendered markup and the first\n * client render agree. Detecting the platform relies on `navigator`, which is\n * unavailable during SSR, so we resolve it after mount to avoid a hydration\n * mismatch.\n */\nconst isMac = ref(false)\nonMounted(() => {\n isMac.value = isMacOS()\n})\n\nconst handleHotKey = (e: KeyboardEvent) => {\n if ((isMacOS() ? e.metaKey : e.ctrlKey) && e.key === searchHotKey) {\n e.preventDefault()\n e.stopPropagation()\n\n if (modalState.open) {\n modalState.hide()\n } else {\n modalState.show()\n }\n }\n}\n\nwatch(\n () => modalState.open,\n async (next, prev) => {\n // Return focus to the button when the modal is closed\n if (!next && prev) {\n await nextTick()\n button.value?.$el.focus()\n }\n },\n)\n\n// Handle keyboard shortcuts\n// TODO: we can move this to the hotkey event bus but we would need to set up a custom key from the searchHotKey config\n// and make sure it works correctly inside the references first\nonMounted(() => window.addEventListener('keydown', handleHotKey))\nonBeforeUnmount(() => window.removeEventListener('keydown', handleHotKey))\n\nfunction handleClick() {\n modalState.show()\n}\n</script>\n<template>\n <ScalarIconButton\n v-if=\"forceIcon\"\n :icon=\"ScalarIconMagnifyingGlass\"\n :label=\"translate('search.label')\"\n @click=\"handleClick\" />\n <ScalarSidebarSearchButton\n v-else\n ref=\"button\"\n class=\"w-full\"\n :class=\"$attrs.class\"\n :shortcutLabel=\"translate('search.keyboardShortcut')\"\n @click=\"handleClick\">\n <span class=\"sr-only\">{{ translate('search.open') }}</span>\n <span\n aria-hidden=\"true\"\n class=\"sidebar-search-placeholder\">\n {{ translate('search.label') }}\n </span>\n <template #shortcut>\n <template v-if=\"isMac\">\n <span class=\"sr-only\">{{ translate('search.command') }}</span>\n <span aria-hidden=\"true\">⌘</span>\n </template>\n <template v-else>\n <span class=\"sr-only\">{{ translate('search.control') }}</span>\n <span aria-hidden=\"true\">⌃</span>\n </template>\n {{ searchHotKey }}\n </template>\n </ScalarSidebarSearchButton>\n\n <SearchModal\n :document\n :eventBus=\"eventBus\"\n :modalState=\"modalState\"\n :modelsSectionLabel=\"modelsSectionLabel\" />\n</template>\n"],"mappings":""}
@@ -1,3 +1,4 @@
1
+ import { useLocalization } from "../../localization/use-localization.js";
1
2
  import SearchModal_default from "./SearchModal.vue.js";
2
3
  import { Fragment, createBlock, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, nextTick, normalizeClass, onBeforeUnmount, onMounted, openBlock, ref, toDisplayString, unref, watch, withCtx } from "vue";
3
4
  import { ScalarSidebarSearchButton } from "@scalar/components/sidebar";
@@ -7,6 +8,13 @@ import { ScalarIconButton } from "@scalar/components/icon-button";
7
8
  import { useModal } from "@scalar/components/modal";
8
9
  import { isMacOS } from "@scalar/helpers/general/is-mac-os";
9
10
  //#region src/features/Search/components/SearchButton.vue?vue&type=script&setup=true&lang.ts
11
+ var _hoisted_1 = { class: "sr-only" };
12
+ var _hoisted_2 = {
13
+ "aria-hidden": "true",
14
+ class: "sidebar-search-placeholder"
15
+ };
16
+ var _hoisted_3 = { class: "sr-only" };
17
+ var _hoisted_4 = { class: "sr-only" };
10
18
  var SearchButton_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
11
19
  __name: "SearchButton",
12
20
  props: {
@@ -20,6 +28,7 @@ var SearchButton_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ d
20
28
  setup(__props) {
21
29
  const button = ref();
22
30
  const modalState = useModal();
31
+ const { translate } = useLocalization();
23
32
  /**
24
33
  * Whether the user is on macOS, used to show the correct shortcut symbol.
25
34
  *
@@ -55,22 +64,20 @@ var SearchButton_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ d
55
64
  return openBlock(), createElementBlock(Fragment, null, [__props.forceIcon ? (openBlock(), createBlock(unref(ScalarIconButton), {
56
65
  key: 0,
57
66
  icon: unref(ScalarIconMagnifyingGlass),
58
- label: "Search",
67
+ label: unref(translate)("search.label"),
59
68
  onClick: handleClick
60
- }, null, 8, ["icon"])) : (openBlock(), createBlock(unref(ScalarSidebarSearchButton), {
69
+ }, null, 8, ["icon", "label"])) : (openBlock(), createBlock(unref(ScalarSidebarSearchButton), {
61
70
  key: 1,
62
71
  ref_key: "button",
63
72
  ref: button,
64
73
  class: normalizeClass(["w-full", _ctx.$attrs.class]),
74
+ shortcutLabel: unref(translate)("search.keyboardShortcut"),
65
75
  onClick: handleClick
66
76
  }, {
67
- shortcut: withCtx(() => [isMac.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [_cache[0] || (_cache[0] = createElementVNode("span", { class: "sr-only" }, "Command", -1)), _cache[1] || (_cache[1] = createElementVNode("span", { "aria-hidden": "true" }, "⌘", -1))], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [_cache[2] || (_cache[2] = createElementVNode("span", { class: "sr-only" }, "CTRL", -1)), _cache[3] || (_cache[3] = createElementVNode("span", { "aria-hidden": "true" }, "⌃", -1))], 64)), createTextVNode(" " + toDisplayString(__props.searchHotKey), 1)]),
68
- default: withCtx(() => [_cache[4] || (_cache[4] = createElementVNode("span", { class: "sr-only" }, "Open Search", -1)), _cache[5] || (_cache[5] = createElementVNode("span", {
69
- "aria-hidden": "true",
70
- class: "sidebar-search-placeholder"
71
- }, " Search ", -1))]),
77
+ shortcut: withCtx(() => [isMac.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createElementVNode("span", _hoisted_3, toDisplayString(unref(translate)("search.command")), 1), _cache[0] || (_cache[0] = createElementVNode("span", { "aria-hidden": "true" }, "⌘", -1))], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createElementVNode("span", _hoisted_4, toDisplayString(unref(translate)("search.control")), 1), _cache[1] || (_cache[1] = createElementVNode("span", { "aria-hidden": "true" }, "⌃", -1))], 64)), createTextVNode(" " + toDisplayString(__props.searchHotKey), 1)]),
78
+ default: withCtx(() => [createElementVNode("span", _hoisted_1, toDisplayString(unref(translate)("search.open")), 1), createElementVNode("span", _hoisted_2, toDisplayString(unref(translate)("search.label")), 1)]),
72
79
  _: 1
73
- }, 8, ["class"])), createVNode(SearchModal_default, {
80
+ }, 8, ["class", "shortcutLabel"])), createVNode(SearchModal_default, {
74
81
  document: __props.document,
75
82
  eventBus: __props.eventBus,
76
83
  modalState: unref(modalState),
@@ -1 +1 @@
1
- {"version":3,"file":"SearchButton.vue.script.js","names":["$attrs"],"sources":["../../../../src/features/Search/components/SearchButton.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarIconButton } from '@scalar/components/icon-button'\nimport { useModal } from '@scalar/components/modal'\nimport { ScalarSidebarSearchButton } from '@scalar/components/sidebar'\nimport { isMacOS } from '@scalar/helpers/general/is-mac-os'\nimport { ScalarIconMagnifyingGlass } from '@scalar/icons'\nimport {\n DEFAULT_MODELS_SECTION_LABEL,\n type ModelsSectionLabel,\n} from '@scalar/types/api-reference'\nimport type { AsyncApiDocument } from '@scalar/types/asyncapi/3.1'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue'\n\nimport SearchModal from './SearchModal.vue'\n\nconst {\n searchHotKey = 'k',\n modelsSectionLabel = DEFAULT_MODELS_SECTION_LABEL,\n} = defineProps<{\n forceIcon?: boolean\n searchHotKey?: string\n hideModels?: boolean\n modelsSectionLabel?: ModelsSectionLabel\n document?: OpenApiDocument | AsyncApiDocument\n eventBus: WorkspaceEventBus\n}>()\n\nconst button = ref<InstanceType<typeof ScalarSidebarSearchButton>>()\nconst modalState = useModal()\n\n/**\n * Whether the user is on macOS, used to show the correct shortcut symbol.\n *\n * This must default to `false` so the server-rendered markup and the first\n * client render agree. Detecting the platform relies on `navigator`, which is\n * unavailable during SSR, so we resolve it after mount to avoid a hydration\n * mismatch.\n */\nconst isMac = ref(false)\nonMounted(() => {\n isMac.value = isMacOS()\n})\n\nconst handleHotKey = (e: KeyboardEvent) => {\n if ((isMacOS() ? e.metaKey : e.ctrlKey) && e.key === searchHotKey) {\n e.preventDefault()\n e.stopPropagation()\n\n if (modalState.open) {\n modalState.hide()\n } else {\n modalState.show()\n }\n }\n}\n\nwatch(\n () => modalState.open,\n async (next, prev) => {\n // Return focus to the button when the modal is closed\n if (!next && prev) {\n await nextTick()\n button.value?.$el.focus()\n }\n },\n)\n\n// Handle keyboard shortcuts\n// TODO: we can move this to the hotkey event bus but we would need to set up a custom key from the searchHotKey config\n// and make sure it works correctly inside the references first\nonMounted(() => window.addEventListener('keydown', handleHotKey))\nonBeforeUnmount(() => window.removeEventListener('keydown', handleHotKey))\n\nfunction handleClick() {\n modalState.show()\n}\n</script>\n<template>\n <ScalarIconButton\n v-if=\"forceIcon\"\n :icon=\"ScalarIconMagnifyingGlass\"\n label=\"Search\"\n @click=\"handleClick\" />\n <ScalarSidebarSearchButton\n v-else\n ref=\"button\"\n class=\"w-full\"\n :class=\"$attrs.class\"\n @click=\"handleClick\">\n <span class=\"sr-only\">Open Search</span>\n <span\n aria-hidden=\"true\"\n class=\"sidebar-search-placeholder\">\n Search\n </span>\n <template #shortcut>\n <template v-if=\"isMac\">\n <span class=\"sr-only\">Command</span>\n <span aria-hidden=\"true\">⌘</span>\n </template>\n <template v-else>\n <span class=\"sr-only\">CTRL</span>\n <span aria-hidden=\"true\">⌃</span>\n </template>\n {{ searchHotKey }}\n </template>\n </ScalarSidebarSearchButton>\n\n <SearchModal\n :document\n :eventBus=\"eventBus\"\n :modalState=\"modalState\"\n :modelsSectionLabel=\"modelsSectionLabel\" />\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;EA6BA,MAAM,SAAS,KAAoD;EACnE,MAAM,aAAa,UAAS;;;;;;;;;EAU5B,MAAM,QAAQ,IAAI,MAAK;AACvB,kBAAgB;AACd,SAAM,QAAQ,SAAQ;IACvB;EAED,MAAM,gBAAgB,MAAqB;AACzC,QAAK,SAAS,GAAG,EAAE,UAAU,EAAE,YAAY,EAAE,QAAQ,QAAA,cAAc;AACjE,MAAE,gBAAe;AACjB,MAAE,iBAAgB;AAElB,QAAI,WAAW,KACb,YAAW,MAAK;QAEhB,YAAW,MAAK;;;AAKtB,cACQ,WAAW,MACjB,OAAO,MAAM,SAAS;AAEpB,OAAI,CAAC,Q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AAA;IACA,UAAU,QAAA;IACV,YAAY,MAAA,WAAU;IACtB,oBAAoB,QAAA"}
1
+ {"version":3,"file":"SearchButton.vue.script.js","names":["$attrs"],"sources":["../../../../src/features/Search/components/SearchButton.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarIconButton } from '@scalar/components/icon-button'\nimport { useModal } from '@scalar/components/modal'\nimport { ScalarSidebarSearchButton } from '@scalar/components/sidebar'\nimport { isMacOS } from '@scalar/helpers/general/is-mac-os'\nimport { ScalarIconMagnifyingGlass } from '@scalar/icons'\nimport {\n DEFAULT_MODELS_SECTION_LABEL,\n type ModelsSectionLabel,\n} from '@scalar/types/api-reference'\nimport type { AsyncApiDocument } from '@scalar/types/asyncapi/3.1'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue'\n\nimport { useLocalization } from '@/features/localization'\n\nimport SearchModal from './SearchModal.vue'\n\nconst {\n searchHotKey = 'k',\n modelsSectionLabel = DEFAULT_MODELS_SECTION_LABEL,\n} = defineProps<{\n forceIcon?: boolean\n searchHotKey?: string\n hideModels?: boolean\n modelsSectionLabel?: ModelsSectionLabel\n document?: OpenApiDocument | AsyncApiDocument\n eventBus: WorkspaceEventBus\n}>()\n\nconst button = ref<InstanceType<typeof ScalarSidebarSearchButton>>()\nconst modalState = useModal()\nconst { translate } = useLocalization()\n\n/**\n * Whether the user is on macOS, used to show the correct shortcut symbol.\n *\n * This must default to `false` so the server-rendered markup and the first\n * client render agree. Detecting the platform relies on `navigator`, which is\n * unavailable during SSR, so we resolve it after mount to avoid a hydration\n * mismatch.\n */\nconst isMac = ref(false)\nonMounted(() => {\n isMac.value = isMacOS()\n})\n\nconst handleHotKey = (e: KeyboardEvent) => {\n if ((isMacOS() ? e.metaKey : e.ctrlKey) && e.key === searchHotKey) {\n e.preventDefault()\n e.stopPropagation()\n\n if (modalState.open) {\n modalState.hide()\n } else {\n modalState.show()\n }\n }\n}\n\nwatch(\n () => modalState.open,\n async (next, prev) => {\n // Return focus to the button when the modal is closed\n if (!next && prev) {\n await nextTick()\n button.value?.$el.focus()\n }\n },\n)\n\n// Handle keyboard shortcuts\n// TODO: we can move this to the hotkey event bus but we would need to set up a custom key from the searchHotKey config\n// and make sure it works correctly inside the references first\nonMounted(() => window.addEventListener('keydown', handleHotKey))\nonBeforeUnmount(() => window.removeEventListener('keydown', handleHotKey))\n\nfunction handleClick() {\n modalState.show()\n}\n</script>\n<template>\n <ScalarIconButton\n v-if=\"forceIcon\"\n :icon=\"ScalarIconMagnifyingGlass\"\n :label=\"translate('search.label')\"\n @click=\"handleClick\" />\n <ScalarSidebarSearchButton\n v-else\n ref=\"button\"\n class=\"w-full\"\n :class=\"$attrs.class\"\n :shortcutLabel=\"translate('search.keyboardShortcut')\"\n @click=\"handleClick\">\n <span class=\"sr-only\">{{ translate('search.open') }}</span>\n <span\n aria-hidden=\"true\"\n class=\"sidebar-search-placeholder\">\n {{ translate('search.label') }}\n </span>\n <template #shortcut>\n <template v-if=\"isMac\">\n <span class=\"sr-only\">{{ translate('search.command') }}</span>\n <span aria-hidden=\"true\">⌘</span>\n </template>\n <template v-else>\n <span class=\"sr-only\">{{ translate('search.control') }}</span>\n <span aria-hidden=\"true\">⌃</span>\n </template>\n {{ searchHotKey }}\n </template>\n </ScalarSidebarSearchButton>\n\n <SearchModal\n :document\n :eventBus=\"eventBus\"\n :modalState=\"modalState\"\n :modelsSectionLabel=\"modelsSectionLabel\" />\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+BA,MAAM,SAAS,KAAoD;EACnE,MAAM,aAAa,UAAS;EAC5B,MAAM,EAAE,cAAc,iBAAgB;;;;;;;;;EAUtC,MAAM,QAAQ,IAAI,MAAK;AACvB,kBAAgB;AACd,SAAM,QAAQ,SAAQ;IACvB;EAED,MAAM,gBAAgB,MAAqB;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A,GAAA,gBACjB,MACX,gBAAG,QAAA,aAAY,EAAA,EAAA,CAAA,CAAA;2BAf0C,CAA3D,mBAA2D,QAA3D,YAA2D,gBAAlC,MAAA,UAAS,CAAA,cAAA,CAAA,EAAA,EAAA,EAClC,mBAIO,QAJP,YAIO,gBADF,MAAA,UAAS,CAAA,eAAA,CAAA,EAAA,EAAA,CAAA,CAAA;;uCAehB,YAI6C,qBAAA;IAH1C,UAAA,QAAA;IACA,UAAU,QAAA;IACV,YAAY,MAAA,WAAU;IACtB,oBAAoB,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"SearchModal.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Search/components/SearchModal.vue"],"names":[],"mappings":"AAuJA,OAAO,EAAe,KAAK,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAGvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAClE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAOnG,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,QAAQ,EAAE,eAAe,GAAG,gBAAgB,GAAG,SAAS,CAAA;IACxD,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,kBAAkB,CAAC,EAAE,kBAAkB,CAAA;CACxC,CAAC;AA4PF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"SearchModal.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Search/components/SearchModal.vue"],"names":[],"mappings":"AAkKA,OAAO,EAAe,KAAK,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAGvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAClE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAQnG,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,QAAQ,EAAE,eAAe,GAAG,gBAAgB,GAAG,SAAS,CAAA;IACxD,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,kBAAkB,CAAC,EAAE,kBAAkB,CAAA;CACxC,CAAC;AA8QF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -2,7 +2,7 @@ import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_exp
2
2
  import SearchModal_vue_vue_type_script_setup_true_lang_default from "./SearchModal.vue.script.js";
3
3
  /* empty css */
4
4
  //#region src/features/Search/components/SearchModal.vue
5
- var SearchModal_default = /* @__PURE__ */ _plugin_vue_export_helper_default(SearchModal_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-25f2d34f"]]);
5
+ var SearchModal_default = /* @__PURE__ */ _plugin_vue_export_helper_default(SearchModal_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-ae9b4ecb"]]);
6
6
  //#endregion
7
7
  export { SearchModal_default as default };
8
8
 
@@ -1 +1 @@
1
- {"version":3,"file":"SearchModal.vue.js","names":[],"sources":["../../../../src/features/Search/components/SearchModal.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarModal, type ModalState } from '@scalar/components/modal'\nimport { ScalarSearchInput } from '@scalar/components/search-input'\nimport { ScalarSearchResultList } from '@scalar/components/search-results'\nimport type { ModelsSectionLabel } from '@scalar/types/api-reference'\nimport type { AsyncApiDocument } from '@scalar/types/asyncapi/3.1'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed, ref, useId, watch } from 'vue'\n\nimport { useSearchIndex } from '@/features/Search/hooks/useSearchIndex'\n\nimport SearchResult from './SearchResult.vue'\n\nconst props = defineProps<{\n modalState: ModalState\n document: OpenApiDocument | AsyncApiDocument | undefined\n eventBus: WorkspaceEventBus\n modelsSectionLabel?: ModelsSectionLabel\n}>()\n\n/** Base id for the search form */\nconst id = useId()\n/** An id for the results listbox */\nconst listboxId = `${id}-search-result`\n/** An id for the results instructions */\nconst instructionsId = `${id}-search-instructions`\n\nconst { query, results } = useSearchIndex(\n () => props.document,\n () => props.modelsSectionLabel,\n)\n\nconst selectedIndex = ref<number | undefined>(undefined)\n\n/** Clear the query value when the modal is opened */\nwatch(\n () => props.modalState.open,\n (open) => {\n if (open) {\n query.value = ''\n }\n },\n)\n\n/** Keyboard navigation */\nconst navigateSearchResults = (direction: 'up' | 'down') => {\n const offset = direction === 'up' ? -1 : 1\n const length = results.value.length\n\n if (typeof selectedIndex.value === 'number') {\n // Ensures we loop around the array by using the remainder\n selectedIndex.value = (selectedIndex.value + offset + length) % length\n } else {\n // If no index is selected, we select the first or last item depending on the direction\n\n selectedIndex.value = offset === -1 ? length - 1 : 0\n }\n}\n\n/** Handle the selection of a search result */\nfunction handleSelect(idx: number | undefined) {\n if (typeof idx !== 'number' || !results.value[idx]) {\n return\n }\n\n const result = results.value[idx]\n props.modalState.hide()\n props.eventBus.emit('scroll-to:nav-item', { id: result.item.id })\n}\n\n/**\n * Active descendant id for the search input\n * NOTE: Result items MUST share this id for the aria-activedescendant attribute to work correctly\n */\nconst activeDescendantId = computed(() => {\n const selectedResult = results.value[selectedIndex.value ?? -1]\n\n return selectedResult ? `search-result-${selectedResult.item.id}` : undefined\n})\n</script>\n<template>\n <ScalarModal\n aria-label=\"Reference Search\"\n :state=\"modalState\"\n variant=\"search\">\n <div\n class=\"mb-0 flex flex-col\"\n role=\"search\">\n <ScalarSearchInput\n v-model=\"query\"\n :aria-activedescendant=\"activeDescendantId\"\n aria-autocomplete=\"list\"\n :aria-controls=\"listboxId\"\n :aria-describedby=\"instructionsId\"\n role=\"combobox\"\n @blur=\"selectedIndex = undefined\"\n @keydown.down.stop.prevent=\"navigateSearchResults('down')\"\n @keydown.enter.stop.prevent=\"() => handleSelect(selectedIndex)\"\n @keydown.up.stop.prevent=\"navigateSearchResults('up')\" />\n </div>\n <ScalarSearchResultList\n :id=\"listboxId\"\n aria-label=\"Reference Search Results\"\n class=\"custom-scroll px-1 pb-1\"\n :noResults=\"!results.length\">\n <template #query>\n {{ query }}\n </template>\n <SearchResult\n v-for=\"(result, idx) in results\"\n :id=\"`search-result-${result.item.id}`\"\n :key=\"result.refIndex\"\n :isSelected=\"selectedIndex === idx\"\n :modelsSectionLabel=\"props.modelsSectionLabel\"\n :result=\"result\"\n @click.prevent=\"() => handleSelect(idx)\" />\n </ScalarSearchResultList>\n <div\n :id=\"instructionsId\"\n class=\"ref-search-meta\">\n <span\n aria-hidden=\"true\"\n class=\"contents\">\n <span>↑↓ Navigate</span>\n <span>⏎ Select</span>\n </span>\n <span class=\"sr-only\">\n Press up arrow / down arrow to navigate, enter to select, type to filter\n results\n </span>\n </div>\n </ScalarModal>\n</template>\n<style scoped>\n.ref-search-meta {\n background: var(--scalar-background-1);\n border-bottom-left-radius: var(--scalar-radius-lg);\n border-bottom-right-radius: var(--scalar-radius-lg);\n padding: 6px 12px;\n font-size: var(--scalar-font-size-4);\n color: var(--scalar-color-3);\n font-weight: var(--scalar-semibold);\n display: flex;\n gap: 12px;\n border-top: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"SearchModal.vue.js","names":[],"sources":["../../../../src/features/Search/components/SearchModal.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarModal, type ModalState } from '@scalar/components/modal'\nimport { ScalarSearchInput } from '@scalar/components/search-input'\nimport { ScalarSearchResultList } from '@scalar/components/search-results'\nimport type { ModelsSectionLabel } from '@scalar/types/api-reference'\nimport type { AsyncApiDocument } from '@scalar/types/asyncapi/3.1'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed, ref, useId, watch } from 'vue'\n\nimport { useLocalization } from '@/features/localization'\nimport { useSearchIndex } from '@/features/Search/hooks/useSearchIndex'\n\nimport SearchResult from './SearchResult.vue'\n\nconst props = defineProps<{\n modalState: ModalState\n document: OpenApiDocument | AsyncApiDocument | undefined\n eventBus: WorkspaceEventBus\n modelsSectionLabel?: ModelsSectionLabel\n}>()\nconst { translate } = useLocalization()\n\n/** Base id for the search form */\nconst id = useId()\n/** An id for the results listbox */\nconst listboxId = `${id}-search-result`\n/** An id for the results instructions */\nconst instructionsId = `${id}-search-instructions`\n\nconst { query, results } = useSearchIndex(\n () => props.document,\n () => props.modelsSectionLabel,\n () => ({\n heading: translate('search.entryHeading'),\n tagGroup: translate('search.entryTagGroup'),\n webhook: translate('search.entryWebhook'),\n webhooks: translate('navigation.webhooks'),\n introduction: translate('navigation.introduction'),\n }),\n)\n\nconst selectedIndex = ref<number | undefined>(undefined)\n\n/** Clear the query value when the modal is opened */\nwatch(\n () => props.modalState.open,\n (open) => {\n if (open) {\n query.value = ''\n }\n },\n)\n\n/** Keyboard navigation */\nconst navigateSearchResults = (direction: 'up' | 'down') => {\n const offset = direction === 'up' ? -1 : 1\n const length = results.value.length\n\n if (typeof selectedIndex.value === 'number') {\n // Ensures we loop around the array by using the remainder\n selectedIndex.value = (selectedIndex.value + offset + length) % length\n } else {\n // If no index is selected, we select the first or last item depending on the direction\n\n selectedIndex.value = offset === -1 ? length - 1 : 0\n }\n}\n\n/** Handle the selection of a search result */\nfunction handleSelect(idx: number | undefined) {\n if (typeof idx !== 'number' || !results.value[idx]) {\n return\n }\n\n const result = results.value[idx]\n props.modalState.hide()\n props.eventBus.emit('scroll-to:nav-item', { id: result.item.id })\n}\n\n/**\n * Active descendant id for the search input\n * NOTE: Result items MUST share this id for the aria-activedescendant attribute to work correctly\n */\nconst activeDescendantId = computed(() => {\n const selectedResult = results.value[selectedIndex.value ?? -1]\n\n return selectedResult ? `search-result-${selectedResult.item.id}` : undefined\n})\n</script>\n<template>\n <ScalarModal\n :aria-label=\"translate('search.label')\"\n :state=\"modalState\"\n variant=\"search\">\n <div\n class=\"mb-0 flex flex-col\"\n role=\"search\">\n <ScalarSearchInput\n v-model=\"query\"\n :aria-activedescendant=\"activeDescendantId\"\n aria-autocomplete=\"list\"\n :aria-controls=\"listboxId\"\n :aria-describedby=\"instructionsId\"\n :clearLabel=\"translate('search.clear')\"\n :label=\"translate('search.inputLabel')\"\n :placeholder=\"translate('search.placeholder')\"\n role=\"combobox\"\n @blur=\"selectedIndex = undefined\"\n @keydown.down.stop.prevent=\"navigateSearchResults('down')\"\n @keydown.enter.stop.prevent=\"() => handleSelect(selectedIndex)\"\n @keydown.up.stop.prevent=\"navigateSearchResults('up')\" />\n </div>\n <ScalarSearchResultList\n :id=\"listboxId\"\n :aria-label=\"translate('search.results')\"\n class=\"custom-scroll px-1 pb-1\"\n :noResults=\"!results.length\">\n <template #query>\n {{ query }}\n </template>\n <SearchResult\n v-for=\"(result, idx) in results\"\n :id=\"`search-result-${result.item.id}`\"\n :key=\"result.refIndex\"\n :isSelected=\"selectedIndex === idx\"\n :modelsSectionLabel=\"props.modelsSectionLabel\"\n :result=\"result\"\n @click.prevent=\"() => handleSelect(idx)\" />\n </ScalarSearchResultList>\n <div\n :id=\"instructionsId\"\n class=\"ref-search-meta\">\n <span\n aria-hidden=\"true\"\n class=\"contents\">\n <span>↑↓ {{ translate('search.navigate') }}</span>\n <span>⏎ {{ translate('search.select') }}</span>\n </span>\n <span class=\"sr-only\">\n {{ translate('search.instructions') }}\n </span>\n </div>\n </ScalarModal>\n</template>\n<style scoped>\n.ref-search-meta {\n background: var(--scalar-background-1);\n border-bottom-left-radius: var(--scalar-radius-lg);\n border-bottom-right-radius: var(--scalar-radius-lg);\n padding: 6px 12px;\n font-size: var(--scalar-font-size-4);\n color: var(--scalar-color-3);\n font-weight: var(--scalar-semibold);\n display: flex;\n gap: 12px;\n border-top: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n</style>\n"],"mappings":""}
@@ -1,3 +1,4 @@
1
+ import { useLocalization } from "../../localization/use-localization.js";
1
2
  import { useSearchIndex } from "../hooks/useSearchIndex.js";
2
3
  import SearchResult_default from "./SearchResult.vue.js";
3
4
  import { Fragment, computed, createBlock, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, isRef, openBlock, ref, renderList, toDisplayString, unref, useId, watch, withCtx, withKeys, withModifiers } from "vue";
@@ -9,6 +10,11 @@ var _hoisted_1 = {
9
10
  class: "mb-0 flex flex-col",
10
11
  role: "search"
11
12
  };
13
+ var _hoisted_2 = {
14
+ "aria-hidden": "true",
15
+ class: "contents"
16
+ };
17
+ var _hoisted_3 = { class: "sr-only" };
12
18
  var SearchModal_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
13
19
  __name: "SearchModal",
14
20
  props: {
@@ -19,13 +25,20 @@ var SearchModal_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ de
19
25
  },
20
26
  setup(__props) {
21
27
  const props = __props;
28
+ const { translate } = useLocalization();
22
29
  /** Base id for the search form */
23
30
  const id = useId();
24
31
  /** An id for the results listbox */
25
32
  const listboxId = `${id}-search-result`;
26
33
  /** An id for the results instructions */
27
34
  const instructionsId = `${id}-search-instructions`;
28
- const { query, results } = useSearchIndex(() => props.document, () => props.modelsSectionLabel);
35
+ const { query, results } = useSearchIndex(() => props.document, () => props.modelsSectionLabel, () => ({
36
+ heading: translate("search.entryHeading"),
37
+ tagGroup: translate("search.entryTagGroup"),
38
+ webhook: translate("search.entryWebhook"),
39
+ webhooks: translate("navigation.webhooks"),
40
+ introduction: translate("navigation.introduction")
41
+ }));
29
42
  const selectedIndex = ref(void 0);
30
43
  /** Clear the query value when the modal is opened */
31
44
  watch(() => props.modalState.open, (open) => {
@@ -55,7 +68,7 @@ var SearchModal_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ de
55
68
  });
56
69
  return (_ctx, _cache) => {
57
70
  return openBlock(), createBlock(unref(ScalarModal), {
58
- "aria-label": "Reference Search",
71
+ "aria-label": unref(translate)("search.label"),
59
72
  state: __props.modalState,
60
73
  variant: "search"
61
74
  }, {
@@ -67,6 +80,9 @@ var SearchModal_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ de
67
80
  "aria-autocomplete": "list",
68
81
  "aria-controls": listboxId,
69
82
  "aria-describedby": instructionsId,
83
+ clearLabel: unref(translate)("search.clear"),
84
+ label: unref(translate)("search.inputLabel"),
85
+ placeholder: unref(translate)("search.placeholder"),
70
86
  role: "combobox",
71
87
  onBlur: _cache[1] || (_cache[1] = ($event) => selectedIndex.value = void 0),
72
88
  onKeydown: [
@@ -74,10 +90,16 @@ var SearchModal_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ de
74
90
  _cache[3] || (_cache[3] = withKeys(withModifiers(() => handleSelect(selectedIndex.value), ["stop", "prevent"]), ["enter"])),
75
91
  _cache[4] || (_cache[4] = withKeys(withModifiers(($event) => navigateSearchResults("up"), ["stop", "prevent"]), ["up"]))
76
92
  ]
77
- }, null, 8, ["modelValue", "aria-activedescendant"])]),
93
+ }, null, 8, [
94
+ "modelValue",
95
+ "aria-activedescendant",
96
+ "clearLabel",
97
+ "label",
98
+ "placeholder"
99
+ ])]),
78
100
  createVNode(unref(ScalarSearchResultList), {
79
101
  id: listboxId,
80
- "aria-label": "Reference Search Results",
102
+ "aria-label": unref(translate)("search.results"),
81
103
  class: "custom-scroll px-1 pb-1",
82
104
  noResults: !unref(results).length
83
105
  }, {
@@ -99,17 +121,14 @@ var SearchModal_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ de
99
121
  ]);
100
122
  }), 128))]),
101
123
  _: 1
102
- }, 8, ["noResults"]),
124
+ }, 8, ["aria-label", "noResults"]),
103
125
  createElementVNode("div", {
104
126
  id: instructionsId,
105
127
  class: "ref-search-meta"
106
- }, [..._cache[5] || (_cache[5] = [createElementVNode("span", {
107
- "aria-hidden": "true",
108
- class: "contents"
109
- }, [createElementVNode("span", null, "↑↓ Navigate"), createElementVNode("span", null, "⏎ Select")], -1), createElementVNode("span", { class: "sr-only" }, " Press up arrow / down arrow to navigate, enter to select, type to filter results ", -1)])])
128
+ }, [createElementVNode("span", _hoisted_2, [createElementVNode("span", null, "↑↓ " + toDisplayString(unref(translate)("search.navigate")), 1), createElementVNode("span", null, "⏎ " + toDisplayString(unref(translate)("search.select")), 1)]), createElementVNode("span", _hoisted_3, toDisplayString(unref(translate)("search.instructions")), 1)])
110
129
  ]),
111
130
  _: 1
112
- }, 8, ["state"]);
131
+ }, 8, ["aria-label", "state"]);
113
132
  };
114
133
  }
115
134
  });
@@ -1 +1 @@
1
- {"version":3,"file":"SearchModal.vue.script.js","names":[],"sources":["../../../../src/features/Search/components/SearchModal.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarModal, type ModalState } from '@scalar/components/modal'\nimport { ScalarSearchInput } from '@scalar/components/search-input'\nimport { ScalarSearchResultList } from '@scalar/components/search-results'\nimport type { ModelsSectionLabel } from '@scalar/types/api-reference'\nimport type { AsyncApiDocument } from '@scalar/types/asyncapi/3.1'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed, ref, useId, watch } from 'vue'\n\nimport { useSearchIndex } from '@/features/Search/hooks/useSearchIndex'\n\nimport SearchResult from './SearchResult.vue'\n\nconst props = defineProps<{\n modalState: ModalState\n document: OpenApiDocument | AsyncApiDocument | undefined\n eventBus: WorkspaceEventBus\n modelsSectionLabel?: ModelsSectionLabel\n}>()\n\n/** Base id for the search form */\nconst id = useId()\n/** An id for the results listbox */\nconst listboxId = `${id}-search-result`\n/** An id for the results instructions */\nconst instructionsId = `${id}-search-instructions`\n\nconst { query, results } = useSearchIndex(\n () => props.document,\n () => props.modelsSectionLabel,\n)\n\nconst selectedIndex = ref<number | undefined>(undefined)\n\n/** Clear the query value when the modal is opened */\nwatch(\n () => props.modalState.open,\n (open) => {\n if (open) {\n query.value = ''\n }\n },\n)\n\n/** Keyboard navigation */\nconst navigateSearchResults = (direction: 'up' | 'down') => {\n const offset = direction === 'up' ? -1 : 1\n const length = results.value.length\n\n if (typeof selectedIndex.value === 'number') {\n // Ensures we loop around the array by using the remainder\n selectedIndex.value = (selectedIndex.value + offset + length) % length\n } else {\n // If no index is selected, we select the first or last item depending on the direction\n\n selectedIndex.value = offset === -1 ? length - 1 : 0\n }\n}\n\n/** Handle the selection of a search result */\nfunction handleSelect(idx: number | undefined) {\n if (typeof idx !== 'number' || !results.value[idx]) {\n return\n }\n\n const result = results.value[idx]\n props.modalState.hide()\n props.eventBus.emit('scroll-to:nav-item', { id: result.item.id })\n}\n\n/**\n * Active descendant id for the search input\n * NOTE: Result items MUST share this id for the aria-activedescendant attribute to work correctly\n */\nconst activeDescendantId = computed(() => {\n const selectedResult = results.value[selectedIndex.value ?? -1]\n\n return selectedResult ? `search-result-${selectedResult.item.id}` : undefined\n})\n</script>\n<template>\n <ScalarModal\n aria-label=\"Reference Search\"\n :state=\"modalState\"\n variant=\"search\">\n <div\n class=\"mb-0 flex flex-col\"\n role=\"search\">\n <ScalarSearchInput\n v-model=\"query\"\n :aria-activedescendant=\"activeDescendantId\"\n aria-autocomplete=\"list\"\n :aria-controls=\"listboxId\"\n :aria-describedby=\"instructionsId\"\n role=\"combobox\"\n @blur=\"selectedIndex = undefined\"\n @keydown.down.stop.prevent=\"navigateSearchResults('down')\"\n @keydown.enter.stop.prevent=\"() => handleSelect(selectedIndex)\"\n @keydown.up.stop.prevent=\"navigateSearchResults('up')\" />\n </div>\n <ScalarSearchResultList\n :id=\"listboxId\"\n aria-label=\"Reference Search Results\"\n class=\"custom-scroll px-1 pb-1\"\n :noResults=\"!results.length\">\n <template #query>\n {{ query }}\n </template>\n <SearchResult\n v-for=\"(result, idx) in results\"\n :id=\"`search-result-${result.item.id}`\"\n :key=\"result.refIndex\"\n :isSelected=\"selectedIndex === idx\"\n :modelsSectionLabel=\"props.modelsSectionLabel\"\n :result=\"result\"\n @click.prevent=\"() => handleSelect(idx)\" />\n </ScalarSearchResultList>\n <div\n :id=\"instructionsId\"\n class=\"ref-search-meta\">\n <span\n aria-hidden=\"true\"\n class=\"contents\">\n <span>↑↓ Navigate</span>\n <span>⏎ Select</span>\n </span>\n <span class=\"sr-only\">\n Press up arrow / down arrow to navigate, enter to select, type to filter\n results\n </span>\n </div>\n </ScalarModal>\n</template>\n<style scoped>\n.ref-search-meta {\n background: var(--scalar-background-1);\n border-bottom-left-radius: var(--scalar-radius-lg);\n border-bottom-right-radius: var(--scalar-radius-lg);\n padding: 6px 12px;\n font-size: var(--scalar-font-size-4);\n color: var(--scalar-color-3);\n font-weight: var(--scalar-semibold);\n display: flex;\n gap: 12px;\n border-top: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;EAcA,MAAM,QAAQ;;EAQd,MAAM,KAAK,OAAM;;EAEjB,MAAM,YAAY,GAAG,GAAG;;EAExB,MAAM,iBAAiB,GAAG,GAAG;EAE7B,MAAM,EAAE,OAAO,YAAY,qBACnB,MAAM,gBACN,MAAM,mBACd;EAEA,MAAM,gBAAgB,IAAwB,KAAA,EAAS;;AAGvD,cACQ,MAAM,WAAW,OACtB,SAAS;AACR,OAAI,KACF,OAAM,QAAQ;IAGpB;;EAGA,MAAM,yBAAyB,cAA6B;GAC1D,MAAM,SAAS,cAAc,OAAO,KAAK;GACzC,MAAM,SAAS,QAAQ,MAAM;AAE7B,OAAI,OAAO,cAAc,UAAU,SAEjC,eAAc,SAAS,cAAc,QAAQ,SAAS,UAAU;OAIhE,eAAc,QAAQ,WAAW,KAAK,SAAS,IAAI;;;EAKvD,S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;QACjC,KAAK,OAAO;QACZ,YAAY,cAAA,UAAkB;QAC9B,oBAAoB,MAAM;QAClB;QACR,SAAK,oBAAgB,aAAa,IAAG,EAAA,CAAA,UAAA,CAAA;;;;;;;;;;;KAE1C,mBAaM,OAAA;MAZH,IAAI;MACL,OAAM;uCACN,mBAKO,QAAA;MAJL,eAAY;MACZ,OAAM;SACN,mBAAwB,QAAA,MAAlB,cAAW,EACjB,mBAAqB,QAAA,MAAf,WAAQ,CAAA,EAAA,GAAA,EAEhB,mBAGO,QAAA,EAHD,OAAM,WAAS,EAAC,sFAGtB,GAAA,CAAA,EAAA,CAAA"}
1
+ {"version":3,"file":"SearchModal.vue.script.js","names":[],"sources":["../../../../src/features/Search/components/SearchModal.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarModal, type ModalState } from '@scalar/components/modal'\nimport { ScalarSearchInput } from '@scalar/components/search-input'\nimport { ScalarSearchResultList } from '@scalar/components/search-results'\nimport type { ModelsSectionLabel } from '@scalar/types/api-reference'\nimport type { AsyncApiDocument } from '@scalar/types/asyncapi/3.1'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed, ref, useId, watch } from 'vue'\n\nimport { useLocalization } from '@/features/localization'\nimport { useSearchIndex } from '@/features/Search/hooks/useSearchIndex'\n\nimport SearchResult from './SearchResult.vue'\n\nconst props = defineProps<{\n modalState: ModalState\n document: OpenApiDocument | AsyncApiDocument | undefined\n eventBus: WorkspaceEventBus\n modelsSectionLabel?: ModelsSectionLabel\n}>()\nconst { translate } = useLocalization()\n\n/** Base id for the search form */\nconst id = useId()\n/** An id for the results listbox */\nconst listboxId = `${id}-search-result`\n/** An id for the results instructions */\nconst instructionsId = `${id}-search-instructions`\n\nconst { query, results } = useSearchIndex(\n () => props.document,\n () => props.modelsSectionLabel,\n () => ({\n heading: translate('search.entryHeading'),\n tagGroup: translate('search.entryTagGroup'),\n webhook: translate('search.entryWebhook'),\n webhooks: translate('navigation.webhooks'),\n introduction: translate('navigation.introduction'),\n }),\n)\n\nconst selectedIndex = ref<number | undefined>(undefined)\n\n/** Clear the query value when the modal is opened */\nwatch(\n () => props.modalState.open,\n (open) => {\n if (open) {\n query.value = ''\n }\n },\n)\n\n/** Keyboard navigation */\nconst navigateSearchResults = (direction: 'up' | 'down') => {\n const offset = direction === 'up' ? -1 : 1\n const length = results.value.length\n\n if (typeof selectedIndex.value === 'number') {\n // Ensures we loop around the array by using the remainder\n selectedIndex.value = (selectedIndex.value + offset + length) % length\n } else {\n // If no index is selected, we select the first or last item depending on the direction\n\n selectedIndex.value = offset === -1 ? length - 1 : 0\n }\n}\n\n/** Handle the selection of a search result */\nfunction handleSelect(idx: number | undefined) {\n if (typeof idx !== 'number' || !results.value[idx]) {\n return\n }\n\n const result = results.value[idx]\n props.modalState.hide()\n props.eventBus.emit('scroll-to:nav-item', { id: result.item.id })\n}\n\n/**\n * Active descendant id for the search input\n * NOTE: Result items MUST share this id for the aria-activedescendant attribute to work correctly\n */\nconst activeDescendantId = computed(() => {\n const selectedResult = results.value[selectedIndex.value ?? -1]\n\n return selectedResult ? `search-result-${selectedResult.item.id}` : undefined\n})\n</script>\n<template>\n <ScalarModal\n :aria-label=\"translate('search.label')\"\n :state=\"modalState\"\n variant=\"search\">\n <div\n class=\"mb-0 flex flex-col\"\n role=\"search\">\n <ScalarSearchInput\n v-model=\"query\"\n :aria-activedescendant=\"activeDescendantId\"\n aria-autocomplete=\"list\"\n :aria-controls=\"listboxId\"\n :aria-describedby=\"instructionsId\"\n :clearLabel=\"translate('search.clear')\"\n :label=\"translate('search.inputLabel')\"\n :placeholder=\"translate('search.placeholder')\"\n role=\"combobox\"\n @blur=\"selectedIndex = undefined\"\n @keydown.down.stop.prevent=\"navigateSearchResults('down')\"\n @keydown.enter.stop.prevent=\"() => handleSelect(selectedIndex)\"\n @keydown.up.stop.prevent=\"navigateSearchResults('up')\" />\n </div>\n <ScalarSearchResultList\n :id=\"listboxId\"\n :aria-label=\"translate('search.results')\"\n class=\"custom-scroll px-1 pb-1\"\n :noResults=\"!results.length\">\n <template #query>\n {{ query }}\n </template>\n <SearchResult\n v-for=\"(result, idx) in results\"\n :id=\"`search-result-${result.item.id}`\"\n :key=\"result.refIndex\"\n :isSelected=\"selectedIndex === idx\"\n :modelsSectionLabel=\"props.modelsSectionLabel\"\n :result=\"result\"\n @click.prevent=\"() => handleSelect(idx)\" />\n </ScalarSearchResultList>\n <div\n :id=\"instructionsId\"\n class=\"ref-search-meta\">\n <span\n aria-hidden=\"true\"\n class=\"contents\">\n <span>↑↓ {{ translate('search.navigate') }}</span>\n <span>⏎ {{ translate('search.select') }}</span>\n </span>\n <span class=\"sr-only\">\n {{ translate('search.instructions') }}\n </span>\n </div>\n </ScalarModal>\n</template>\n<style scoped>\n.ref-search-meta {\n background: var(--scalar-background-1);\n border-bottom-left-radius: var(--scalar-radius-lg);\n border-bottom-right-radius: var(--scalar-radius-lg);\n padding: 6px 12px;\n font-size: var(--scalar-font-size-4);\n color: var(--scalar-color-3);\n font-weight: var(--scalar-semibold);\n display: flex;\n gap: 12px;\n border-top: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;EAeA,MAAM,QAAQ;EAMd,MAAM,EAAE,cAAc,iBAAgB;;EAGtC,MAAM,KAAK,OAAM;;EAEjB,MAAM,YAAY,GAAG,GAAG;;EAExB,MAAM,iBAAiB,GAAG,GAAG;EAE7B,MAAM,EAAE,OAAO,YAAY,qBACnB,MAAM,gBACN,MAAM,2BACL;GACL,SAAS,UAAU,sBAAsB;GACzC,UAAU,UAAU,uBAAuB;GAC3C,SAAS,UAAU,sBAAsB;GACzC,UAAU,UAAU,sBAAsB;GAC1C,cAAc,UAAU,0BAA0B;GACnD,EACH;EAEA,MAAM,gBAAgB,IAAwB,KAAA,EAAS;;AAGvD,cACQ,MAAM,WAAW,OACtB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A,CAAA;oEACnC,sBAAqB,KAAA,EAAA,CAAA,QAAA,UAAA,CAAA,EAAA,CAAA,KAAA,CAAA;;;;;;;;;KAEnD,YAgByB,MAAA,uBAAA,EAAA;MAftB,IAAI;MACJ,cAAY,MAAA,UAAS,CAAA,iBAAA;MACtB,OAAM;MACL,WAAS,CAAG,MAAA,QAAO,CAAC;;MACV,OAAK,cACH,CAAA,gBAAA,gBAAR,MAAA,MAAK,CAAA,EAAA,EAAA,CAAA,CAAA;6BAGwB,EAAA,UAAA,KAAA,EADlC,mBAO6C,UAAA,MAAA,WANnB,MAAA,QAAO,GAAvB,QAAQ,QAAG;2BADrB,YAO6C,sBAAA;QAL1C,IAAE,iBAAmB,OAAO,KAAK;QACjC,KAAK,OAAO;QACZ,YAAY,cAAA,UAAkB;QAC9B,oBAAoB,MAAM;QAClB;QACR,SAAK,oBAAgB,aAAa,IAAG,EAAA,CAAA,UAAA,CAAA;;;;;;;;;;;KAE1C,mBAYM,OAAA;MAXH,IAAI;MACL,OAAM;SACN,mBAKO,QALP,YAKO,CAFL,mBAAkD,QAAA,MAA5C,QAAG,gBAAG,MAAA,UAAS,CAAA,kBAAA,CAAA,EAAA,EAAA,EACrB,mBAA+C,QAAA,MAAzC,OAAE,gBAAG,MAAA,UAAS,CAAA,gBAAA,CAAA,EAAA,EAAA,CAAA,CAAA,EAEtB,mBAEO,QAFP,YAEO,gBADF,MAAA,UAAS,CAAA,sBAAA,CAAA,EAAA,EAAA,CAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"SearchResult.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Search/components/SearchResult.vue"],"names":[],"mappings":"AA2GA,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,6BAA6B,CAAA;AACpC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAGzC,OAAO,KAAK,EAAa,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAElE,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAA;IACV,UAAU,EAAE,OAAO,CAAA;IACnB,MAAM,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAA;IAC5B,kBAAkB,CAAC,EAAE,kBAAkB,CAAA;CACxC,CAAC;AAsIF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"SearchResult.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Search/components/SearchResult.vue"],"names":[],"mappings":"AA8GA,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,6BAA6B,CAAA;AACpC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAIzC,OAAO,KAAK,EAAa,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAElE,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAA;IACV,UAAU,EAAE,OAAO,CAAA;IACnB,MAAM,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAA;IAC5B,kBAAkB,CAAC,EAAE,kBAAkB,CAAA;CACxC,CAAC;AA4IF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1 +1 @@
1
- {"version":3,"file":"SearchResult.vue.js","names":[],"sources":["../../../../src/features/Search/components/SearchResult.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarSearchResultItem } from '@scalar/components/search-results'\nimport {\n ScalarIconBracketsCurly,\n ScalarIconTag,\n ScalarIconTerminalWindow,\n ScalarIconTextAlignLeft,\n} from '@scalar/icons'\nimport type { ScalarIconComponent } from '@scalar/icons/types'\nimport { HttpMethod } from '@scalar/sidebar'\nimport {\n DEFAULT_MODELS_SECTION_LABEL,\n type ModelsSectionLabel,\n} from '@scalar/types/api-reference'\nimport type { FuseResult } from 'fuse.js'\nimport { computed } from 'vue'\n\nimport type { EntryType, FuseData } from '@/features/Search/types'\n\nconst { modelsSectionLabel = DEFAULT_MODELS_SECTION_LABEL } = defineProps<{\n id: string\n isSelected: boolean\n result: FuseResult<FuseData>\n modelsSectionLabel?: ModelsSectionLabel\n}>()\n\nconst ENTRY_ICONS: { [x in EntryType]: ScalarIconComponent } = {\n heading: ScalarIconTextAlignLeft,\n model: ScalarIconBracketsCurly,\n operation: ScalarIconTerminalWindow,\n tag: ScalarIconTag,\n webhook: ScalarIconTerminalWindow,\n}\n\nconst entryLabels = computed((): { [x in EntryType]: string } => ({\n heading: 'Heading',\n operation: 'Operation',\n tag: 'Tag',\n model: modelsSectionLabel,\n webhook: 'Webhook',\n}))\n</script>\n\n<template>\n <ScalarSearchResultItem\n :id=\"id\"\n :icon=\"ENTRY_ICONS[result.item.type]\"\n :selected=\"isSelected\">\n <span\n :class=\"{\n 'text-decoration-line':\n result.item.entry.type === 'operation' &&\n result.item.entry.isDeprecated,\n }\">\n <span class=\"sr-only\">\n {{ entryLabels[result.item.type] }}:&nbsp;\n <template\n v-if=\"\n result.item.entry.type === 'operation' &&\n result.item.entry.isDeprecated\n \">\n (Deprecated)&nbsp;\n </template>\n </span>\n {{ result.item.title }}\n <span class=\"sr-only\">,</span>\n </span>\n <template\n v-if=\"\n result.item.type !== 'webhook' &&\n (result.item.method || result.item.path) &&\n result.item.path !== result.item.title\n \"\n #description>\n <span class=\"inline-flex items-center gap-1\">\n <template v-if=\"result.item.type === 'operation'\">\n <HttpMethod\n aria-hidden=\"true\"\n :method=\"result.item.method ?? 'get'\" />\n <span class=\"sr-only\">\n HTTP Method: {{ result.item.method ?? 'get' }}\n </span>\n </template>\n <span class=\"sr-only\">Path:&nbsp;</span>\n {{ result.item.path }}\n </span>\n </template>\n <template\n v-else-if=\"result.item.description\"\n #description>\n <span class=\"sr-only\">Description:&nbsp;</span>\n {{ result.item.description }}\n </template>\n </ScalarSearchResultItem>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"SearchResult.vue.js","names":[],"sources":["../../../../src/features/Search/components/SearchResult.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarSearchResultItem } from '@scalar/components/search-results'\nimport {\n ScalarIconBracketsCurly,\n ScalarIconTag,\n ScalarIconTerminalWindow,\n ScalarIconTextAlignLeft,\n} from '@scalar/icons'\nimport type { ScalarIconComponent } from '@scalar/icons/types'\nimport { HttpMethod } from '@scalar/sidebar'\nimport {\n DEFAULT_MODELS_SECTION_LABEL,\n type ModelsSectionLabel,\n} from '@scalar/types/api-reference'\nimport type { FuseResult } from 'fuse.js'\nimport { computed } from 'vue'\n\nimport { useLocalization } from '@/features/localization'\nimport type { EntryType, FuseData } from '@/features/Search/types'\n\nconst { modelsSectionLabel = DEFAULT_MODELS_SECTION_LABEL } = defineProps<{\n id: string\n isSelected: boolean\n result: FuseResult<FuseData>\n modelsSectionLabel?: ModelsSectionLabel\n}>()\nconst { translate } = useLocalization()\n\nconst ENTRY_ICONS: { [x in EntryType]: ScalarIconComponent } = {\n heading: ScalarIconTextAlignLeft,\n model: ScalarIconBracketsCurly,\n operation: ScalarIconTerminalWindow,\n tag: ScalarIconTag,\n webhook: ScalarIconTerminalWindow,\n}\n\nconst entryLabels = computed((): { [x in EntryType]: string } => ({\n heading: translate('search.entryHeading'),\n operation: translate('search.entryOperation'),\n tag: translate('search.entryTag'),\n model: modelsSectionLabel,\n webhook: translate('search.entryWebhook'),\n}))\n</script>\n\n<template>\n <ScalarSearchResultItem\n :id=\"id\"\n :icon=\"ENTRY_ICONS[result.item.type]\"\n :selected=\"isSelected\">\n <span\n :class=\"{\n 'text-decoration-line':\n result.item.entry.type === 'operation' &&\n result.item.entry.isDeprecated,\n }\">\n <span class=\"sr-only\">\n {{ entryLabels[result.item.type] }}:&nbsp;\n <template\n v-if=\"\n result.item.entry.type === 'operation' &&\n result.item.entry.isDeprecated\n \">\n ({{ translate('common.deprecated') }})&nbsp;\n </template>\n </span>\n {{ result.item.title }}\n <span class=\"sr-only\">,</span>\n </span>\n <template\n v-if=\"\n result.item.type !== 'webhook' &&\n (result.item.method || result.item.path) &&\n result.item.path !== result.item.title\n \"\n #description>\n <span class=\"inline-flex items-center gap-1\">\n <template v-if=\"result.item.type === 'operation'\">\n <HttpMethod\n aria-hidden=\"true\"\n :method=\"result.item.method ?? 'get'\" />\n <span class=\"sr-only\">\n {{ translate('common.httpMethod') }}:\n {{ result.item.method ?? 'get' }}\n </span>\n </template>\n <span class=\"sr-only\">{{ translate('common.path') }}:&nbsp;</span>\n {{ result.item.path }}\n </span>\n </template>\n <template\n v-else-if=\"result.item.description\"\n #description>\n <span class=\"sr-only\">{{ translate('common.description') }}:&nbsp;</span>\n {{ result.item.description }}\n </template>\n </ScalarSearchResultItem>\n</template>\n"],"mappings":""}
@@ -1,3 +1,4 @@
1
+ import { useLocalization } from "../../localization/use-localization.js";
1
2
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, normalizeClass, openBlock, toDisplayString, unref, withCtx } from "vue";
2
3
  import { HttpMethod } from "@scalar/sidebar";
3
4
  import { DEFAULT_MODELS_SECTION_LABEL } from "@scalar/types/api-reference";
@@ -7,6 +8,8 @@ import { ScalarSearchResultItem } from "@scalar/components/search-results";
7
8
  var _hoisted_1 = { class: "sr-only" };
8
9
  var _hoisted_2 = { class: "inline-flex items-center gap-1" };
9
10
  var _hoisted_3 = { class: "sr-only" };
11
+ var _hoisted_4 = { class: "sr-only" };
12
+ var _hoisted_5 = { class: "sr-only" };
10
13
  var SearchResult_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
11
14
  __name: "SearchResult",
12
15
  props: {
@@ -16,6 +19,7 @@ var SearchResult_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ d
16
19
  modelsSectionLabel: { default: () => DEFAULT_MODELS_SECTION_LABEL }
17
20
  },
18
21
  setup(__props) {
22
+ const { translate } = useLocalization();
19
23
  const ENTRY_ICONS = {
20
24
  heading: ScalarIconTextAlignLeft,
21
25
  model: ScalarIconBracketsCurly,
@@ -24,11 +28,11 @@ var SearchResult_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ d
24
28
  webhook: ScalarIconTerminalWindow
25
29
  };
26
30
  const entryLabels = computed(() => ({
27
- heading: "Heading",
28
- operation: "Operation",
29
- tag: "Tag",
31
+ heading: translate("search.entryHeading"),
32
+ operation: translate("search.entryOperation"),
33
+ tag: translate("search.entryTag"),
30
34
  model: __props.modelsSectionLabel,
31
- webhook: "Webhook"
35
+ webhook: translate("search.entryWebhook")
32
36
  }));
33
37
  return (_ctx, _cache) => {
34
38
  return openBlock(), createBlock(unref(ScalarSearchResultItem), {
@@ -37,7 +41,7 @@ var SearchResult_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ d
37
41
  selected: __props.isSelected
38
42
  }, createSlots({
39
43
  default: withCtx(() => [createElementVNode("span", { class: normalizeClass({ "text-decoration-line": __props.result.item.entry.type === "operation" && __props.result.item.entry.isDeprecated }) }, [
40
- createElementVNode("span", _hoisted_1, [createTextVNode(toDisplayString(entryLabels.value[__props.result.item.type]) + ":\xA0 ", 1), __props.result.item.entry.type === "operation" && __props.result.item.entry.isDeprecated ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createTextVNode(" (Deprecated)\xA0 ")], 64)) : createCommentVNode("", true)]),
44
+ createElementVNode("span", _hoisted_1, [createTextVNode(toDisplayString(entryLabels.value[__props.result.item.type]) + ":\xA0 ", 1), __props.result.item.entry.type === "operation" && __props.result.item.entry.isDeprecated ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createTextVNode(" (" + toDisplayString(unref(translate)("common.deprecated")) + ")\xA0 ", 1)], 64)) : createCommentVNode("", true)]),
41
45
  createTextVNode(" " + toDisplayString(__props.result.item.title) + " ", 1),
42
46
  _cache[0] || (_cache[0] = createElementVNode("span", { class: "sr-only" }, ",", -1))
43
47
  ], 2)]),
@@ -48,14 +52,14 @@ var SearchResult_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ d
48
52
  __props.result.item.type === "operation" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createVNode(unref(HttpMethod), {
49
53
  "aria-hidden": "true",
50
54
  method: __props.result.item.method ?? "get"
51
- }, null, 8, ["method"]), createElementVNode("span", _hoisted_3, " HTTP Method: " + toDisplayString(__props.result.item.method ?? "get"), 1)], 64)) : createCommentVNode("", true),
52
- _cache[1] || (_cache[1] = createElementVNode("span", { class: "sr-only" }, "Path:\xA0", -1)),
55
+ }, null, 8, ["method"]), createElementVNode("span", _hoisted_3, toDisplayString(unref(translate)("common.httpMethod")) + ": " + toDisplayString(__props.result.item.method ?? "get"), 1)], 64)) : createCommentVNode("", true),
56
+ createElementVNode("span", _hoisted_4, toDisplayString(unref(translate)("common.path")) + ":\xA0", 1),
53
57
  createTextVNode(" " + toDisplayString(__props.result.item.path), 1)
54
58
  ])]),
55
59
  key: "0"
56
60
  } : __props.result.item.description ? {
57
61
  name: "description",
58
- fn: withCtx(() => [_cache[2] || (_cache[2] = createElementVNode("span", { class: "sr-only" }, "Description:\xA0", -1)), createTextVNode(" " + toDisplayString(__props.result.item.description), 1)]),
62
+ fn: withCtx(() => [createElementVNode("span", _hoisted_5, toDisplayString(unref(translate)("common.description")) + ":\xA0", 1), createTextVNode(" " + toDisplayString(__props.result.item.description), 1)]),
59
63
  key: "1"
60
64
  } : void 0]), 1032, [
61
65
  "id",
@@ -1 +1 @@
1
- {"version":3,"file":"SearchResult.vue.script.js","names":[],"sources":["../../../../src/features/Search/components/SearchResult.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarSearchResultItem } from '@scalar/components/search-results'\nimport {\n ScalarIconBracketsCurly,\n ScalarIconTag,\n ScalarIconTerminalWindow,\n ScalarIconTextAlignLeft,\n} from '@scalar/icons'\nimport type { ScalarIconComponent } from '@scalar/icons/types'\nimport { HttpMethod } from '@scalar/sidebar'\nimport {\n DEFAULT_MODELS_SECTION_LABEL,\n type ModelsSectionLabel,\n} from '@scalar/types/api-reference'\nimport type { FuseResult } from 'fuse.js'\nimport { computed } from 'vue'\n\nimport type { EntryType, FuseData } from '@/features/Search/types'\n\nconst { modelsSectionLabel = DEFAULT_MODELS_SECTION_LABEL } = defineProps<{\n id: string\n isSelected: boolean\n result: FuseResult<FuseData>\n modelsSectionLabel?: ModelsSectionLabel\n}>()\n\nconst ENTRY_ICONS: { [x in EntryType]: ScalarIconComponent } = {\n heading: ScalarIconTextAlignLeft,\n model: ScalarIconBracketsCurly,\n operation: ScalarIconTerminalWindow,\n tag: ScalarIconTag,\n webhook: ScalarIconTerminalWindow,\n}\n\nconst entryLabels = computed((): { [x in EntryType]: string } => ({\n heading: 'Heading',\n operation: 'Operation',\n tag: 'Tag',\n model: modelsSectionLabel,\n webhook: 'Webhook',\n}))\n</script>\n\n<template>\n <ScalarSearchResultItem\n :id=\"id\"\n :icon=\"ENTRY_ICONS[result.item.type]\"\n :selected=\"isSelected\">\n <span\n :class=\"{\n 'text-decoration-line':\n result.item.entry.type === 'operation' &&\n result.item.entry.isDeprecated,\n }\">\n <span class=\"sr-only\">\n {{ entryLabels[result.item.type] }}:&nbsp;\n <template\n v-if=\"\n result.item.entry.type === 'operation' &&\n result.item.entry.isDeprecated\n \">\n (Deprecated)&nbsp;\n </template>\n </span>\n {{ result.item.title }}\n <span class=\"sr-only\">,</span>\n </span>\n <template\n v-if=\"\n result.item.type !== 'webhook' &&\n (result.item.method || result.item.path) &&\n result.item.path !== result.item.title\n \"\n #description>\n <span class=\"inline-flex items-center gap-1\">\n <template v-if=\"result.item.type === 'operation'\">\n <HttpMethod\n aria-hidden=\"true\"\n :method=\"result.item.method ?? 'get'\" />\n <span class=\"sr-only\">\n HTTP Method: {{ result.item.method ?? 'get' }}\n </span>\n </template>\n <span class=\"sr-only\">Path:&nbsp;</span>\n {{ result.item.path }}\n </span>\n </template>\n <template\n v-else-if=\"result.item.description\"\n #description>\n <span class=\"sr-only\">Description:&nbsp;</span>\n {{ result.item.description }}\n </template>\n </ScalarSearchResultItem>\n</template>\n"],"mappings":";;;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BAEO,QAFP,YAAsB,mBACP,gBAAG,QAAA,OAAO,KAAK,UAAM,MAAA,EAAA,EAAA,CAAA,EAAA,GAAA,IAAA,mBAAA,IAAA,KAAA;+BAGtC,mBAAwC,QAAA,EAAlC,OAAM,WAAS,EAAC,aAAW,GAAA;qBAAO,MACxC,gBAAG,QAAA,OAAO,KAAK,KAAI,EAAA,EAAA;;;OAIV,QAAA,OAAO,KAAK,cAAA;UACtB;sBAC8C,CAAA,OAAA,OAAA,OAAA,KAA/C,mBAA+C,QAAA,EAAzC,OAAM,WAAS,EAAC,oBAAkB,GAAA,GAAA,gBAAO,MAC/C,gBAAG,QAAA,OAAO,KAAK,YAAW,EAAA,EAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"SearchResult.vue.script.js","names":[],"sources":["../../../../src/features/Search/components/SearchResult.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarSearchResultItem } from '@scalar/components/search-results'\nimport {\n ScalarIconBracketsCurly,\n ScalarIconTag,\n ScalarIconTerminalWindow,\n ScalarIconTextAlignLeft,\n} from '@scalar/icons'\nimport type { ScalarIconComponent } from '@scalar/icons/types'\nimport { HttpMethod } from '@scalar/sidebar'\nimport {\n DEFAULT_MODELS_SECTION_LABEL,\n type ModelsSectionLabel,\n} from '@scalar/types/api-reference'\nimport type { FuseResult } from 'fuse.js'\nimport { computed } from 'vue'\n\nimport { useLocalization } from '@/features/localization'\nimport type { EntryType, FuseData } from '@/features/Search/types'\n\nconst { modelsSectionLabel = DEFAULT_MODELS_SECTION_LABEL } = defineProps<{\n id: string\n isSelected: boolean\n result: FuseResult<FuseData>\n modelsSectionLabel?: ModelsSectionLabel\n}>()\nconst { translate } = useLocalization()\n\nconst ENTRY_ICONS: { [x in EntryType]: ScalarIconComponent } = {\n heading: ScalarIconTextAlignLeft,\n model: ScalarIconBracketsCurly,\n operation: ScalarIconTerminalWindow,\n tag: ScalarIconTag,\n webhook: ScalarIconTerminalWindow,\n}\n\nconst entryLabels = computed((): { [x in EntryType]: string } => ({\n heading: translate('search.entryHeading'),\n operation: translate('search.entryOperation'),\n tag: translate('search.entryTag'),\n model: modelsSectionLabel,\n webhook: translate('search.entryWebhook'),\n}))\n</script>\n\n<template>\n <ScalarSearchResultItem\n :id=\"id\"\n :icon=\"ENTRY_ICONS[result.item.type]\"\n :selected=\"isSelected\">\n <span\n :class=\"{\n 'text-decoration-line':\n result.item.entry.type === 'operation' &&\n result.item.entry.isDeprecated,\n }\">\n <span class=\"sr-only\">\n {{ entryLabels[result.item.type] }}:&nbsp;\n <template\n v-if=\"\n result.item.entry.type === 'operation' &&\n result.item.entry.isDeprecated\n \">\n ({{ translate('common.deprecated') }})&nbsp;\n </template>\n </span>\n {{ result.item.title }}\n <span class=\"sr-only\">,</span>\n </span>\n <template\n v-if=\"\n result.item.type !== 'webhook' &&\n (result.item.method || result.item.path) &&\n result.item.path !== result.item.title\n \"\n #description>\n <span class=\"inline-flex items-center gap-1\">\n <template v-if=\"result.item.type === 'operation'\">\n <HttpMethod\n aria-hidden=\"true\"\n :method=\"result.item.method ?? 'get'\" />\n <span class=\"sr-only\">\n {{ translate('common.httpMethod') }}:\n {{ result.item.method ?? 'get' }}\n </span>\n </template>\n <span class=\"sr-only\">{{ translate('common.path') }}:&nbsp;</span>\n {{ result.item.path }}\n </span>\n </template>\n <template\n v-else-if=\"result.item.description\"\n #description>\n <span class=\"sr-only\">{{ translate('common.description') }}:&nbsp;</span>\n {{ result.item.description }}\n </template>\n </ScalarSearchResultItem>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;EA0BA,MAAM,EAAE,cAAc,iBAAgB;EAEtC,MAAM,cAAyD;GAC7D,SAAS;GACT,OAAO;GACP,WAAW;GACX,KAAK;GACL,SAAS;GACX;EAEA,MAAM,cAAc,gBAA8C;GAChE,SAAS,UAAU,sBAAsB;GACzC,WAAW,UAAU,wBAAwB;GAC7C,KAAK,UAAU,kBAAkB;GACjC,OAAO,QAAA;GACP,SAAS,UAAU,sBA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EAAA,GAAA,IAAA,mBAAA,IAAA,KAAA;KAGzB,mBAAkE,QAAlE,YAAkE,gBAAzC,MAAA,UAAS,CAAA,cAAA,CAAA,GAAkB,SAAO,EAAA;qBAAO,MAClE,gBAAG,QAAA,OAAO,KAAK,KAAI,EAAA,EAAA;;;OAIV,QAAA,OAAO,KAAK,cAAA;UACtB;sBACwE,CAAzE,mBAAyE,QAAzE,YAAyE,gBAAhD,MAAA,UAAS,CAAA,qBAAA,CAAA,GAAyB,SAAO,EAAA,EAAA,gBAAO,MACzE,gBAAG,QAAA,OAAO,KAAK,YAAW,EAAA,EAAA,CAAA,CAAA"}
@@ -5,8 +5,16 @@ import type { FuseData } from '../../../features/Search/types';
5
5
  /** Documents the search index can ingest. AsyncAPI is supported for headings, tags, and models; channels/operations/messages are not indexed yet. */
6
6
  type SearchableDocument = OpenApiDocument | AsyncApiDocument;
7
7
  type CreateSearchIndexOptions = {
8
+ labels?: SearchIndexLabels;
8
9
  modelsSectionLabel?: ModelsSectionLabel;
9
10
  };
11
+ type SearchIndexLabels = {
12
+ heading: string;
13
+ tagGroup: string;
14
+ webhook: string;
15
+ webhooks: string;
16
+ introduction: string;
17
+ };
10
18
  /**
11
19
  * Create a search index from a list of entries.
12
20
  */
@@ -1 +1 @@
1
- {"version":3,"file":"create-search-index.d.ts","sourceRoot":"","sources":["../../../../src/features/Search/helpers/create-search-index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgC,KAAK,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AACnG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAMlE,OAAO,KAAK,EAEV,eAAe,EAIhB,MAAM,8DAA8D,CAAA;AAErE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAWvD,qJAAqJ;AACrJ,KAAK,kBAAkB,GAAG,eAAe,GAAG,gBAAgB,CAAA;AA4E5D,KAAK,wBAAwB,GAAG;IAC9B,kBAAkB,CAAC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