@scalar/api-reference 1.60.0 → 1.62.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (555) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/dist/blocks/scalar-asyncapi-server-selector-block/components/AsyncApiServerSelector.vue.d.ts.map +1 -1
  3. package/dist/blocks/scalar-asyncapi-server-selector-block/components/AsyncApiServerSelector.vue.js.map +1 -1
  4. package/dist/blocks/scalar-asyncapi-server-selector-block/components/AsyncApiServerSelector.vue.script.js +8 -5
  5. package/dist/blocks/scalar-asyncapi-server-selector-block/components/AsyncApiServerSelector.vue.script.js.map +1 -1
  6. package/dist/blocks/scalar-asyncapi-server-selector-block/components/Selector.vue.d.ts.map +1 -1
  7. package/dist/blocks/scalar-asyncapi-server-selector-block/components/Selector.vue.js.map +1 -1
  8. package/dist/blocks/scalar-asyncapi-server-selector-block/components/Selector.vue.script.js +11 -7
  9. package/dist/blocks/scalar-asyncapi-server-selector-block/components/Selector.vue.script.js.map +1 -1
  10. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/AsyncApiSidebarFilters.vue.d.ts +36 -0
  11. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/AsyncApiSidebarFilters.vue.d.ts.map +1 -0
  12. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/AsyncApiSidebarFilters.vue.js +7 -0
  13. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/AsyncApiSidebarFilters.vue.js.map +1 -0
  14. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/AsyncApiSidebarFilters.vue.script.js +69 -0
  15. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/AsyncApiSidebarFilters.vue.script.js.map +1 -0
  16. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/SidebarFilter.vue.d.ts +28 -0
  17. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/SidebarFilter.vue.d.ts.map +1 -0
  18. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/SidebarFilter.vue.js +7 -0
  19. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/SidebarFilter.vue.js.map +1 -0
  20. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/SidebarFilter.vue.script.js +62 -0
  21. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/SidebarFilter.vue.script.js.map +1 -0
  22. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/helpers/filter-async-api-navigation.d.ts +18 -0
  23. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/helpers/filter-async-api-navigation.d.ts.map +1 -0
  24. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/helpers/filter-async-api-navigation.js +59 -0
  25. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/helpers/filter-async-api-navigation.js.map +1 -0
  26. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/index.d.ts +3 -0
  27. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/index.d.ts.map +1 -0
  28. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts +1 -1
  29. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts.map +1 -1
  30. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js +1 -1
  31. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js.map +1 -1
  32. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.script.js +6 -3
  33. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.script.js.map +1 -1
  34. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.d.ts +2 -2
  35. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.d.ts.map +1 -1
  36. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.js +1 -1
  37. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.js.map +1 -1
  38. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.script.js +4 -2
  39. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.script.js.map +1 -1
  40. package/dist/blocks/scalar-client-selector-block/helpers/featured-clients.d.ts +1 -1
  41. package/dist/blocks/scalar-client-selector-block/helpers/featured-clients.d.ts.map +1 -1
  42. package/dist/blocks/scalar-client-selector-block/helpers/featured-clients.js.map +1 -1
  43. package/dist/blocks/scalar-info-block/components/DownloadLink.vue.d.ts.map +1 -1
  44. package/dist/blocks/scalar-info-block/components/DownloadLink.vue.js +1 -1
  45. package/dist/blocks/scalar-info-block/components/DownloadLink.vue.js.map +1 -1
  46. package/dist/blocks/scalar-info-block/components/DownloadLink.vue.script.js +3 -1
  47. package/dist/blocks/scalar-info-block/components/DownloadLink.vue.script.js.map +1 -1
  48. package/dist/blocks/scalar-info-block/components/InfoLinks.vue.d.ts.map +1 -1
  49. package/dist/blocks/scalar-info-block/components/InfoLinks.vue.js.map +1 -1
  50. package/dist/blocks/scalar-info-block/components/InfoLinks.vue.script.js +17 -3
  51. package/dist/blocks/scalar-info-block/components/InfoLinks.vue.script.js.map +1 -1
  52. package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.d.ts.map +1 -1
  53. package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.js +1 -1
  54. package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.js.map +1 -1
  55. package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.script.js +4 -2
  56. package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.script.js.map +1 -1
  57. package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.d.ts.map +1 -1
  58. package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.js +1 -1
  59. package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.js.map +1 -1
  60. package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.script.js +16 -12
  61. package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.script.js.map +1 -1
  62. package/dist/blocks/scalar-server-selector-block/components/Selector.vue.d.ts.map +1 -1
  63. package/dist/blocks/scalar-server-selector-block/components/Selector.vue.js.map +1 -1
  64. package/dist/blocks/scalar-server-selector-block/components/Selector.vue.script.js +11 -7
  65. package/dist/blocks/scalar-server-selector-block/components/Selector.vue.script.js.map +1 -1
  66. package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.d.ts.map +1 -1
  67. package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.js.map +1 -1
  68. package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.script.js +7 -4
  69. package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.script.js.map +1 -1
  70. package/dist/browser/chunks/AgentScalarChatInterface-C3QiXv0S.js +27 -0
  71. package/dist/browser/chunks/ScalarTextInput.vue-CysYmeeN.js +27 -0
  72. package/dist/browser/chunks/basic-shape-diamond.svg-BTEOT1FL.js +1 -1
  73. package/dist/browser/chunks/basic-shape-hexagon.svg-BSPzaCgF.js +1 -1
  74. package/dist/browser/chunks/basic-shape-primary-circle-ellipse-round.svg-DKmZ8UUU.js +1 -1
  75. package/dist/browser/chunks/basic-shape-primary-square-rectangle.svg-n2YRykHD.js +1 -1
  76. package/dist/browser/chunks/basic-shape-shield.svg-Bec9cJDA.js +1 -1
  77. package/dist/browser/chunks/browser-67K6wmG9.js +1 -1
  78. package/dist/browser/chunks/computer-device-desktop-monitor.svg-m6j893Hb.js +1 -1
  79. package/dist/browser/chunks/computer-device-desktop.svg-Dk1VVO7k.js +1 -1
  80. package/dist/browser/chunks/computer-device-laptop.svg-BNGVUCYS.js +1 -1
  81. package/dist/browser/chunks/computer-device-mobile-phone-android-samsung-back.svg-CC4UUTFw.js +1 -1
  82. package/dist/browser/chunks/computer-device-mobile-phone-android-samsung.svg-D8ExpMpL.js +1 -1
  83. package/dist/browser/chunks/computer-device-mobile-phone-iphone-x-back.svg-CLm7sgMM.js +1 -1
  84. package/dist/browser/chunks/computer-device-mobile-phone-iphone-x.svg-Xrttg6_7.js +1 -1
  85. package/dist/browser/chunks/computer-device-mobile-tablet-touch.svg-DQ2oTvOG.js +1 -1
  86. package/dist/browser/chunks/computer-device-mobile-tablet.svg-DCr0XlRc.js +1 -1
  87. package/dist/browser/chunks/computer-device-network-ethernet-cat6.svg-AK9l0iOl.js +1 -1
  88. package/dist/browser/chunks/computer-device-network-lan-www.svg-gUIdFBlE.js +1 -1
  89. package/dist/browser/chunks/computer-device-network-wifi-connection.svg-Be-EMm4e.js +1 -1
  90. package/dist/browser/chunks/computer-device-network-wifi-router.svg-Dc2VzyqK.js +1 -1
  91. package/dist/browser/chunks/ecology-science-erlenmeyer-flask.svg-DHgy7Jfd.js +1 -1
  92. package/dist/browser/chunks/image-flash-lightning.svg-EETR_y1q.js +1 -1
  93. package/dist/browser/chunks/image-picture-flower.svg-DN1AYzJU.js +1 -1
  94. package/dist/browser/chunks/interface-alert-exclamation-diamond.svg-C5NozMV_.js +1 -1
  95. package/dist/browser/chunks/interface-alert-exclamation-triangle-warning.svg-DaAg2fF5.js +1 -1
  96. package/dist/browser/chunks/interface-alert-information-circle.svg-ckkkt9Mv.js +1 -1
  97. package/dist/browser/chunks/interface-award-crown.svg-pjvn9hY-.js +1 -1
  98. package/dist/browser/chunks/interface-bookmark-tag.svg-r2r-lQq4.js +1 -1
  99. package/dist/browser/chunks/interface-bookmark.svg-BK9HKQBT.js +1 -1
  100. package/dist/browser/chunks/interface-calendar-date-one.svg-DNnF0M1I.js +1 -1
  101. package/dist/browser/chunks/interface-content-book-open-pages.svg-CQj_w9Vp.js +1 -1
  102. package/dist/browser/chunks/interface-content-book-page.svg-DppoeJRe.js +1 -1
  103. package/dist/browser/chunks/interface-content-file.svg-CvcD7OiY.js +1 -1
  104. package/dist/browser/chunks/interface-content-folder.svg-BmtS5I9A.js +1 -1
  105. package/dist/browser/chunks/interface-copy-clipboard.svg-Be6EI50X.js +1 -1
  106. package/dist/browser/chunks/interface-edit-attachment.svg-G5TKzpWX.js +1 -1
  107. package/dist/browser/chunks/interface-edit-binocular.svg-jzL-DvGB.js +1 -1
  108. package/dist/browser/chunks/interface-edit-magic-wand.svg-BOTlymvp.js +1 -1
  109. package/dist/browser/chunks/interface-edit-tool-paint-roller.svg-s9dwryx7.js +1 -1
  110. package/dist/browser/chunks/interface-edit-tool-pencil.svg-C7v0dbB3.js +1 -1
  111. package/dist/browser/chunks/interface-favorite-award.svg-CYHUgUG0.js +1 -1
  112. package/dist/browser/chunks/interface-favorite-flag.svg-C10zlKOb.js +1 -1
  113. package/dist/browser/chunks/interface-favorite-heart.svg-eoduXxlz.js +1 -1
  114. package/dist/browser/chunks/interface-favorite-star.svg-BSmxJetr.js +1 -1
  115. package/dist/browser/chunks/interface-favorite-stars-sparkles.svg-JTFLj3Ls.js +1 -1
  116. package/dist/browser/chunks/interface-hierarchy-flowchart.svg-Cg_Wy0kN.js +1 -1
  117. package/dist/browser/chunks/interface-home-house.svg-DytoGRnv.js +1 -1
  118. package/dist/browser/chunks/interface-hyperlink.svg-CuEfmmQI.js +1 -1
  119. package/dist/browser/chunks/interface-lighting-brightness.svg-DSK0h_Pa.js +1 -1
  120. package/dist/browser/chunks/interface-lock-closed.svg-Cn6TaLYv.js +1 -1
  121. package/dist/browser/chunks/interface-lock-open-unlock.svg-CVkG5-9W.js +1 -1
  122. package/dist/browser/chunks/interface-login-key.svg-y-cwwXjN.js +1 -1
  123. package/dist/browser/chunks/interface-search.svg-S-puVFJB.js +1 -1
  124. package/dist/browser/chunks/interface-setting-cog.svg-CTH4_lLg.js +1 -1
  125. package/dist/browser/chunks/interface-share-megaphone-bullhorn.svg-Pbp39MyC.js +1 -1
  126. package/dist/browser/chunks/interface-share-rocket.svg-BgCsIRZO.js +1 -1
  127. package/dist/browser/chunks/interface-share-satellite.svg-DAMN9d5G.js +1 -1
  128. package/dist/browser/chunks/interface-share-space-ship.svg-Dt-Mejxk.js +1 -1
  129. package/dist/browser/chunks/interface-share.svg-vFYTXSti.js +1 -1
  130. package/dist/browser/chunks/interface-signal-square.svg-DNG4LpAe.js +1 -1
  131. package/dist/browser/chunks/interface-time-clock-circle.svg-Bpz-nLxo.js +1 -1
  132. package/dist/browser/chunks/interface-time-hour-glass.svg-D7agfKsH.js +1 -1
  133. package/dist/browser/chunks/interface-users-multiple.svg-CkPJBBnG.js +1 -1
  134. package/dist/browser/chunks/interface-weather-moon.svg-CaTZFMPO.js +1 -1
  135. package/dist/browser/chunks/mail-chat-bubble-square.svg-DC8RIihp.js +1 -1
  136. package/dist/browser/chunks/mail-send-email-paper-airplane.svg-D8OLs9jz.js +1 -1
  137. package/dist/browser/chunks/mail-send-envelope.svg-CV33h5Sx.js +1 -1
  138. package/dist/browser/chunks/{modal-LBDjZSmM.js → modal-CMytT4BZ.js} +2 -2
  139. package/dist/browser/chunks/modal-wI0tG53V.js +99 -0
  140. package/dist/browser/chunks/money-cashier-receipt.svg-CJL8C2gs.js +1 -1
  141. package/dist/browser/chunks/money-currency-dollar-pay.svg-VdBplCTx.js +1 -1
  142. package/dist/browser/chunks/money-graph-arrow-increase.svg-DcRov3zk.js +1 -1
  143. package/dist/browser/chunks/money-graph-bar-chart-increase.svg-Cc7KxjX-.js +1 -1
  144. package/dist/browser/chunks/nature-ecology-leaf.svg-DR3cTZxt.js +1 -1
  145. package/dist/browser/chunks/phone-telephone.svg-DyY0gUlk.js +1 -1
  146. package/dist/browser/chunks/programming-bug.svg-BHLT-Qhp.js +1 -1
  147. package/dist/browser/chunks/programming-cloud.svg-B6YW33ba.js +1 -1
  148. package/dist/browser/chunks/programming-computer-database-server.svg-B6o5Sdn-.js +1 -1
  149. package/dist/browser/chunks/programming-computer-database.svg-Cl7OVtpJ.js +1 -1
  150. package/dist/browser/chunks/programming-module-four-layout.svg-BQrerL1x.js +1 -1
  151. package/dist/browser/chunks/programming-module-three.svg-B2KTQzBM.js +1 -1
  152. package/dist/browser/chunks/programming-module.svg-CiID7kPm.js +1 -1
  153. package/dist/browser/chunks/programming-script-code.svg-D1M5rtkN.js +1 -1
  154. package/dist/browser/chunks/runtime-core.esm-bundler-Byrbbu5Q.js +1 -1
  155. package/dist/browser/chunks/shopping-cart.svg-BEegiIR9.js +1 -1
  156. package/dist/browser/chunks/shopping-gift-present.svg-BUHwuLix.js +1 -1
  157. package/dist/browser/chunks/shopping-shipping-box-parcel-package.svg-D6fxWdYx.js +1 -1
  158. package/dist/browser/chunks/tag-new-circle.svg-jsg1bGs0.js +1 -1
  159. package/dist/browser/chunks/travel-map-earth-globe.svg-ClbMiU-f.js +1 -1
  160. package/dist/browser/chunks/vendor-BPQqqkn-.js +306 -0
  161. package/dist/browser/standalone.esm.js +20 -20
  162. package/dist/browser/standalone.js +294 -294
  163. package/dist/components/AgentScalar/AgentScalarButton.vue.d.ts.map +1 -1
  164. package/dist/components/AgentScalar/AgentScalarButton.vue.js.map +1 -1
  165. package/dist/components/AgentScalar/AgentScalarButton.vue.script.js +4 -2
  166. package/dist/components/AgentScalar/AgentScalarButton.vue.script.js.map +1 -1
  167. package/dist/components/AgentScalar/AgentScalarDrawer.vue.d.ts.map +1 -1
  168. package/dist/components/AgentScalar/AgentScalarDrawer.vue.js +1 -1
  169. package/dist/components/AgentScalar/AgentScalarDrawer.vue.js.map +1 -1
  170. package/dist/components/AgentScalar/AgentScalarDrawer.vue.script.js +4 -2
  171. package/dist/components/AgentScalar/AgentScalarDrawer.vue.script.js.map +1 -1
  172. package/dist/components/AgentScalar/OpenMCPButton.vue.d.ts.map +1 -1
  173. package/dist/components/AgentScalar/OpenMCPButton.vue.js +1 -1
  174. package/dist/components/AgentScalar/OpenMCPButton.vue.js.map +1 -1
  175. package/dist/components/AgentScalar/OpenMCPButton.vue.script.js +8 -6
  176. package/dist/components/AgentScalar/OpenMCPButton.vue.script.js.map +1 -1
  177. package/dist/components/Anchor/Anchor.vue.d.ts.map +1 -1
  178. package/dist/components/Anchor/Anchor.vue.js.map +1 -1
  179. package/dist/components/Anchor/Anchor.vue.script.js +5 -3
  180. package/dist/components/Anchor/Anchor.vue.script.js.map +1 -1
  181. package/dist/components/Anchor/WithBreadcrumb.vue.d.ts +1 -3
  182. package/dist/components/Anchor/WithBreadcrumb.vue.d.ts.map +1 -1
  183. package/dist/components/Anchor/WithBreadcrumb.vue.js.map +1 -1
  184. package/dist/components/Anchor/WithBreadcrumb.vue.script.js +6 -2
  185. package/dist/components/Anchor/WithBreadcrumb.vue.script.js.map +1 -1
  186. package/dist/components/ApiReference.vue.d.ts.map +1 -1
  187. package/dist/components/ApiReference.vue.js +1 -1
  188. package/dist/components/ApiReference.vue.js.map +1 -1
  189. package/dist/components/ApiReference.vue.script.js +181 -46
  190. package/dist/components/ApiReference.vue.script.js.map +1 -1
  191. package/dist/components/Content/AsyncApi/AsyncApiLabels.vue.d.ts +10 -0
  192. package/dist/components/Content/AsyncApi/AsyncApiLabels.vue.d.ts.map +1 -0
  193. package/dist/components/Content/AsyncApi/AsyncApiLabels.vue.js +9 -0
  194. package/dist/components/Content/AsyncApi/AsyncApiLabels.vue.js.map +1 -0
  195. package/dist/components/Content/AsyncApi/AsyncApiLabels.vue.script.js +47 -0
  196. package/dist/components/Content/AsyncApi/AsyncApiLabels.vue.script.js.map +1 -0
  197. package/dist/components/Content/AsyncApi/AsyncApiTraversedEntry.vue.d.ts.map +1 -1
  198. package/dist/components/Content/AsyncApi/AsyncApiTraversedEntry.vue.js.map +1 -1
  199. package/dist/components/Content/AsyncApi/AsyncApiTraversedEntry.vue.script.js +2 -0
  200. package/dist/components/Content/AsyncApi/AsyncApiTraversedEntry.vue.script.js.map +1 -1
  201. package/dist/components/Content/AsyncApi/Channel.vue.d.ts +4 -1
  202. package/dist/components/Content/AsyncApi/Channel.vue.d.ts.map +1 -1
  203. package/dist/components/Content/AsyncApi/Channel.vue.js +1 -1
  204. package/dist/components/Content/AsyncApi/Channel.vue.js.map +1 -1
  205. package/dist/components/Content/AsyncApi/Channel.vue.script.js +98 -44
  206. package/dist/components/Content/AsyncApi/Channel.vue.script.js.map +1 -1
  207. package/dist/components/Content/AsyncApi/Message.vue.d.ts +18 -0
  208. package/dist/components/Content/AsyncApi/Message.vue.d.ts.map +1 -0
  209. package/dist/components/Content/AsyncApi/Message.vue.js +9 -0
  210. package/dist/components/Content/AsyncApi/Message.vue.js.map +1 -0
  211. package/dist/components/Content/AsyncApi/Message.vue.script.js +159 -0
  212. package/dist/components/Content/AsyncApi/Message.vue.script.js.map +1 -0
  213. package/dist/components/Content/AsyncApi/Operation.vue.d.ts +18 -0
  214. package/dist/components/Content/AsyncApi/Operation.vue.d.ts.map +1 -0
  215. package/dist/components/Content/AsyncApi/Operation.vue.js +9 -0
  216. package/dist/components/Content/AsyncApi/Operation.vue.js.map +1 -0
  217. package/dist/components/Content/AsyncApi/Operation.vue.script.js +84 -0
  218. package/dist/components/Content/AsyncApi/Operation.vue.script.js.map +1 -0
  219. package/dist/components/Content/AsyncApi/helpers/async-api-render-options.d.ts +14 -0
  220. package/dist/components/Content/AsyncApi/helpers/async-api-render-options.d.ts.map +1 -0
  221. package/dist/components/Content/AsyncApi/helpers/async-api-render-options.js +14 -0
  222. package/dist/components/Content/AsyncApi/helpers/async-api-render-options.js.map +1 -0
  223. package/dist/components/Content/AsyncApi/helpers/filter-children-by-type.d.ts +9 -0
  224. package/dist/components/Content/AsyncApi/helpers/filter-children-by-type.d.ts.map +1 -0
  225. package/dist/components/Content/AsyncApi/helpers/filter-children-by-type.js +12 -0
  226. package/dist/components/Content/AsyncApi/helpers/filter-children-by-type.js.map +1 -0
  227. package/dist/components/Content/AsyncApi/helpers/get-async-api-labels.d.ts +13 -0
  228. package/dist/components/Content/AsyncApi/helpers/get-async-api-labels.d.ts.map +1 -0
  229. package/dist/components/Content/AsyncApi/helpers/get-async-api-labels.js +23 -0
  230. package/dist/components/Content/AsyncApi/helpers/get-async-api-labels.js.map +1 -0
  231. package/dist/components/Content/AsyncApi/helpers/pick-heading.d.ts +10 -0
  232. package/dist/components/Content/AsyncApi/helpers/pick-heading.d.ts.map +1 -0
  233. package/dist/components/Content/AsyncApi/helpers/pick-heading.js +20 -0
  234. package/dist/components/Content/AsyncApi/helpers/pick-heading.js.map +1 -0
  235. package/dist/components/Content/AsyncApi/helpers/resolve-async-api-nodes.d.ts +21 -0
  236. package/dist/components/Content/AsyncApi/helpers/resolve-async-api-nodes.d.ts.map +1 -0
  237. package/dist/components/Content/AsyncApi/helpers/resolve-async-api-nodes.js +35 -0
  238. package/dist/components/Content/AsyncApi/helpers/resolve-async-api-nodes.js.map +1 -0
  239. package/dist/components/Content/Auth/Auth.vue.d.ts.map +1 -1
  240. package/dist/components/Content/Auth/Auth.vue.js.map +1 -1
  241. package/dist/components/Content/Auth/Auth.vue.script.js +5 -2
  242. package/dist/components/Content/Auth/Auth.vue.script.js.map +1 -1
  243. package/dist/components/Content/Content.vue.d.ts +1 -0
  244. package/dist/components/Content/Content.vue.d.ts.map +1 -1
  245. package/dist/components/Content/Content.vue.js.map +1 -1
  246. package/dist/components/Content/Content.vue.script.js +4 -1
  247. package/dist/components/Content/Content.vue.script.js.map +1 -1
  248. package/dist/components/Content/Operations/TraversedEntry.vue.d.ts +3 -1
  249. package/dist/components/Content/Operations/TraversedEntry.vue.d.ts.map +1 -1
  250. package/dist/components/Content/Operations/TraversedEntry.vue.js.map +1 -1
  251. package/dist/components/Content/Operations/TraversedEntry.vue.script.js +9 -0
  252. package/dist/components/Content/Operations/TraversedEntry.vue.script.js.map +1 -1
  253. package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
  254. package/dist/components/Content/Schema/Schema.vue.js +1 -1
  255. package/dist/components/Content/Schema/Schema.vue.js.map +1 -1
  256. package/dist/components/Content/Schema/Schema.vue.script.js +10 -6
  257. package/dist/components/Content/Schema/Schema.vue.script.js.map +1 -1
  258. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
  259. package/dist/components/Content/Schema/SchemaComposition.vue.js.map +1 -1
  260. package/dist/components/Content/Schema/SchemaComposition.vue.script.js +25 -12
  261. package/dist/components/Content/Schema/SchemaComposition.vue.script.js.map +1 -1
  262. package/dist/components/Content/Schema/SchemaEnums.vue.d.ts.map +1 -1
  263. package/dist/components/Content/Schema/SchemaEnums.vue.js +1 -1
  264. package/dist/components/Content/Schema/SchemaEnums.vue.js.map +1 -1
  265. package/dist/components/Content/Schema/SchemaEnums.vue.script.js +4 -2
  266. package/dist/components/Content/Schema/SchemaEnums.vue.script.js.map +1 -1
  267. package/dist/components/Content/Schema/SchemaHeading.vue.d.ts.map +1 -1
  268. package/dist/components/Content/Schema/SchemaHeading.vue.js +1 -1
  269. package/dist/components/Content/Schema/SchemaHeading.vue.js.map +1 -1
  270. package/dist/components/Content/Schema/SchemaHeading.vue.script.js +6 -4
  271. package/dist/components/Content/Schema/SchemaHeading.vue.script.js.map +1 -1
  272. package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.js.map +1 -1
  273. package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.script.js +1 -1
  274. package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.script.js.map +1 -1
  275. package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts.map +1 -1
  276. package/dist/components/Content/Schema/SchemaObjectProperties.vue.js.map +1 -1
  277. package/dist/components/Content/Schema/SchemaObjectProperties.vue.script.js +12 -0
  278. package/dist/components/Content/Schema/SchemaObjectProperties.vue.script.js.map +1 -1
  279. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +3 -1
  280. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  281. package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
  282. package/dist/components/Content/Schema/SchemaProperty.vue.js.map +1 -1
  283. package/dist/components/Content/Schema/SchemaProperty.vue.script.js +24 -6
  284. package/dist/components/Content/Schema/SchemaProperty.vue.script.js.map +1 -1
  285. package/dist/components/Content/Schema/SchemaPropertyDefault.vue.d.ts.map +1 -1
  286. package/dist/components/Content/Schema/SchemaPropertyDefault.vue.js +1 -1
  287. package/dist/components/Content/Schema/SchemaPropertyDefault.vue.js.map +1 -1
  288. package/dist/components/Content/Schema/SchemaPropertyDefault.vue.script.js +8 -5
  289. package/dist/components/Content/Schema/SchemaPropertyDefault.vue.script.js.map +1 -1
  290. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.d.ts.map +1 -1
  291. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js +1 -1
  292. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js.map +1 -1
  293. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.script.js +5 -3
  294. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.script.js.map +1 -1
  295. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts +3 -1
  296. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
  297. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +1 -1
  298. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js.map +1 -1
  299. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.script.js +47 -22
  300. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.script.js.map +1 -1
  301. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts.map +1 -1
  302. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +10 -9
  303. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js.map +1 -1
  304. package/dist/components/Content/Tags/components/ModernLayout.vue.d.ts.map +1 -1
  305. package/dist/components/Content/Tags/components/ModernLayout.vue.js +1 -1
  306. package/dist/components/Content/Tags/components/ModernLayout.vue.js.map +1 -1
  307. package/dist/components/Content/Tags/components/ModernLayout.vue.script.js +3 -1
  308. package/dist/components/Content/Tags/components/ModernLayout.vue.script.js.map +1 -1
  309. package/dist/components/Content/Tags/components/TagSection.vue.d.ts.map +1 -1
  310. package/dist/components/Content/Tags/components/TagSection.vue.js.map +1 -1
  311. package/dist/components/Content/Tags/components/TagSection.vue.script.js +3 -1
  312. package/dist/components/Content/Tags/components/TagSection.vue.script.js.map +1 -1
  313. package/dist/components/GettingStarted.vue.d.ts.map +1 -1
  314. package/dist/components/GettingStarted.vue.js +1 -1
  315. package/dist/components/GettingStarted.vue.js.map +1 -1
  316. package/dist/components/GettingStarted.vue.script.js +58 -21
  317. package/dist/components/GettingStarted.vue.script.js.map +1 -1
  318. package/dist/components/MobileHeader.vue.d.ts.map +1 -1
  319. package/dist/components/MobileHeader.vue.js.map +1 -1
  320. package/dist/components/MobileHeader.vue.script.js +3 -1
  321. package/dist/components/MobileHeader.vue.script.js.map +1 -1
  322. package/dist/components/OperationsList/OperationsList.vue.d.ts.map +1 -1
  323. package/dist/components/OperationsList/OperationsList.vue.js +1 -1
  324. package/dist/components/OperationsList/OperationsList.vue.js.map +1 -1
  325. package/dist/components/OperationsList/OperationsList.vue.script.js +4 -2
  326. package/dist/components/OperationsList/OperationsList.vue.script.js.map +1 -1
  327. package/dist/components/ShowMoreButton.vue.d.ts.map +1 -1
  328. package/dist/components/ShowMoreButton.vue.js +1 -1
  329. package/dist/components/ShowMoreButton.vue.js.map +1 -1
  330. package/dist/components/ShowMoreButton.vue.script.js +4 -2
  331. package/dist/components/ShowMoreButton.vue.script.js.map +1 -1
  332. package/dist/features/Operation/Operation.vue.d.ts +3 -1
  333. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  334. package/dist/features/Operation/Operation.vue.js.map +1 -1
  335. package/dist/features/Operation/Operation.vue.script.js +6 -1
  336. package/dist/features/Operation/Operation.vue.script.js.map +1 -1
  337. package/dist/features/Operation/components/ContentTypeSelect.vue.d.ts.map +1 -1
  338. package/dist/features/Operation/components/ContentTypeSelect.vue.js.map +1 -1
  339. package/dist/features/Operation/components/ContentTypeSelect.vue.script.js +4 -2
  340. package/dist/features/Operation/components/ContentTypeSelect.vue.script.js.map +1 -1
  341. package/dist/features/Operation/components/Headers.vue.d.ts.map +1 -1
  342. package/dist/features/Operation/components/Headers.vue.js +1 -1
  343. package/dist/features/Operation/components/Headers.vue.js.map +1 -1
  344. package/dist/features/Operation/components/Headers.vue.script.js +8 -6
  345. package/dist/features/Operation/components/Headers.vue.script.js.map +1 -1
  346. package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
  347. package/dist/features/Operation/components/OperationParameters.vue.js.map +1 -1
  348. package/dist/features/Operation/components/OperationParameters.vue.script.js +8 -6
  349. package/dist/features/Operation/components/OperationParameters.vue.script.js.map +1 -1
  350. package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
  351. package/dist/features/Operation/components/OperationResponses.vue.js.map +1 -1
  352. package/dist/features/Operation/components/OperationResponses.vue.script.js +10 -7
  353. package/dist/features/Operation/components/OperationResponses.vue.script.js.map +1 -1
  354. package/dist/features/Operation/components/ParameterListItem.vue.script.js +1 -1
  355. package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
  356. package/dist/features/Operation/components/RequestBody.vue.js +1 -1
  357. package/dist/features/Operation/components/RequestBody.vue.js.map +1 -1
  358. package/dist/features/Operation/components/RequestBody.vue.script.js +18 -13
  359. package/dist/features/Operation/components/RequestBody.vue.script.js.map +1 -1
  360. package/dist/features/Operation/components/SecurityRequirementBadge.vue.d.ts.map +1 -1
  361. package/dist/features/Operation/components/SecurityRequirementBadge.vue.js.map +1 -1
  362. package/dist/features/Operation/components/SecurityRequirementBadge.vue.script.js +5 -3
  363. package/dist/features/Operation/components/SecurityRequirementBadge.vue.script.js.map +1 -1
  364. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -1
  365. package/dist/features/Operation/components/callbacks/Callbacks.vue.js.map +1 -1
  366. package/dist/features/Operation/components/callbacks/Callbacks.vue.script.js +11 -8
  367. package/dist/features/Operation/components/callbacks/Callbacks.vue.script.js.map +1 -1
  368. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  369. package/dist/features/Operation/layouts/ClassicLayout.vue.js +1 -1
  370. package/dist/features/Operation/layouts/ClassicLayout.vue.js.map +1 -1
  371. package/dist/features/Operation/layouts/ClassicLayout.vue.script.js +37 -17
  372. package/dist/features/Operation/layouts/ClassicLayout.vue.script.js.map +1 -1
  373. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  374. package/dist/features/Operation/layouts/ModernLayout.vue.js +1 -1
  375. package/dist/features/Operation/layouts/ModernLayout.vue.js.map +1 -1
  376. package/dist/features/Operation/layouts/ModernLayout.vue.script.js +22 -7
  377. package/dist/features/Operation/layouts/ModernLayout.vue.script.js.map +1 -1
  378. package/dist/features/Search/components/SearchButton.vue.d.ts.map +1 -1
  379. package/dist/features/Search/components/SearchButton.vue.js.map +1 -1
  380. package/dist/features/Search/components/SearchButton.vue.script.js +15 -8
  381. package/dist/features/Search/components/SearchButton.vue.script.js.map +1 -1
  382. package/dist/features/Search/components/SearchModal.vue.d.ts.map +1 -1
  383. package/dist/features/Search/components/SearchModal.vue.js +1 -1
  384. package/dist/features/Search/components/SearchModal.vue.js.map +1 -1
  385. package/dist/features/Search/components/SearchModal.vue.script.js +29 -10
  386. package/dist/features/Search/components/SearchModal.vue.script.js.map +1 -1
  387. package/dist/features/Search/components/SearchResult.vue.d.ts.map +1 -1
  388. package/dist/features/Search/components/SearchResult.vue.js.map +1 -1
  389. package/dist/features/Search/components/SearchResult.vue.script.js +12 -8
  390. package/dist/features/Search/components/SearchResult.vue.script.js.map +1 -1
  391. package/dist/features/Search/helpers/create-search-index.d.ts +8 -0
  392. package/dist/features/Search/helpers/create-search-index.d.ts.map +1 -1
  393. package/dist/features/Search/helpers/create-search-index.js +18 -9
  394. package/dist/features/Search/helpers/create-search-index.js.map +1 -1
  395. package/dist/features/Search/hooks/useSearchIndex.d.ts +7 -1
  396. package/dist/features/Search/hooks/useSearchIndex.d.ts.map +1 -1
  397. package/dist/features/Search/hooks/useSearchIndex.js +11 -2
  398. package/dist/features/Search/hooks/useSearchIndex.js.map +1 -1
  399. package/dist/features/ask-agent-button/AskAgentButton.vue.d.ts.map +1 -1
  400. package/dist/features/ask-agent-button/AskAgentButton.vue.js +1 -1
  401. package/dist/features/ask-agent-button/AskAgentButton.vue.js.map +1 -1
  402. package/dist/features/ask-agent-button/AskAgentButton.vue.script.js +10 -6
  403. package/dist/features/ask-agent-button/AskAgentButton.vue.script.js.map +1 -1
  404. package/dist/features/developer-tools/DeveloperTools.vue.d.ts.map +1 -1
  405. package/dist/features/developer-tools/DeveloperTools.vue.js.map +1 -1
  406. package/dist/features/developer-tools/DeveloperTools.vue.script.js +10 -8
  407. package/dist/features/developer-tools/DeveloperTools.vue.script.js.map +1 -1
  408. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.d.ts.map +1 -1
  409. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.js.map +1 -1
  410. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.script.js +11 -11
  411. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.script.js.map +1 -1
  412. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.d.ts.map +1 -1
  413. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.js.map +1 -1
  414. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.script.js +15 -11
  415. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.script.js.map +1 -1
  416. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.script.js +1 -1
  417. package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.d.ts +1 -3
  418. package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.d.ts.map +1 -1
  419. package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.js.map +1 -1
  420. package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.script.js +4 -6
  421. package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.script.js.map +1 -1
  422. package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.d.ts.map +1 -1
  423. package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.js.map +1 -1
  424. package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.script.js +6 -4
  425. package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.script.js.map +1 -1
  426. package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.d.ts.map +1 -1
  427. package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.js.map +1 -1
  428. package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.script.js +23 -22
  429. package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.script.js.map +1 -1
  430. package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.d.ts.map +1 -1
  431. package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.js.map +1 -1
  432. package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.script.js +7 -5
  433. package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.script.js.map +1 -1
  434. package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.d.ts.map +1 -1
  435. package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.js.map +1 -1
  436. package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.script.js +9 -7
  437. package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.script.js.map +1 -1
  438. package/dist/features/developer-tools/components/DeployApiReference.vue.d.ts.map +1 -1
  439. package/dist/features/developer-tools/components/DeployApiReference.vue.js.map +1 -1
  440. package/dist/features/developer-tools/components/DeployApiReference.vue.script.js +7 -4
  441. package/dist/features/developer-tools/components/DeployApiReference.vue.script.js.map +1 -1
  442. package/dist/features/developer-tools/components/ModifyConfiguration.vue.d.ts.map +1 -1
  443. package/dist/features/developer-tools/components/ModifyConfiguration.vue.js.map +1 -1
  444. package/dist/features/developer-tools/components/ModifyConfiguration.vue.script.js +8 -6
  445. package/dist/features/developer-tools/components/ModifyConfiguration.vue.script.js.map +1 -1
  446. package/dist/features/developer-tools/components/ShareApiReference.vue.d.ts.map +1 -1
  447. package/dist/features/developer-tools/components/ShareApiReference.vue.js.map +1 -1
  448. package/dist/features/developer-tools/components/ShareApiReference.vue.script.js +7 -4
  449. package/dist/features/developer-tools/components/ShareApiReference.vue.script.js.map +1 -1
  450. package/dist/features/example-responses/ExampleResponse.vue.d.ts.map +1 -1
  451. package/dist/features/example-responses/ExampleResponse.vue.js +1 -1
  452. package/dist/features/example-responses/ExampleResponse.vue.js.map +1 -1
  453. package/dist/features/example-responses/ExampleResponse.vue.script.js +5 -3
  454. package/dist/features/example-responses/ExampleResponse.vue.script.js.map +1 -1
  455. package/dist/features/example-responses/ExampleResponses.vue.d.ts +9 -0
  456. package/dist/features/example-responses/ExampleResponses.vue.d.ts.map +1 -1
  457. package/dist/features/example-responses/ExampleResponses.vue.js +1 -1
  458. package/dist/features/example-responses/ExampleResponses.vue.js.map +1 -1
  459. package/dist/features/example-responses/ExampleResponses.vue.script.js +42 -23
  460. package/dist/features/example-responses/ExampleResponses.vue.script.js.map +1 -1
  461. package/dist/features/example-responses/ExampleSchema.vue.js.map +1 -1
  462. package/dist/features/example-responses/ExampleSchema.vue.script.js +1 -1
  463. package/dist/features/example-responses/ExampleSchema.vue.script.js.map +1 -1
  464. package/dist/features/info-object/Contact.vue.d.ts.map +1 -1
  465. package/dist/features/info-object/Contact.vue.js.map +1 -1
  466. package/dist/features/info-object/Contact.vue.script.js +14 -11
  467. package/dist/features/info-object/Contact.vue.script.js.map +1 -1
  468. package/dist/features/info-object/InfoLink.vue.d.ts +8 -0
  469. package/dist/features/info-object/InfoLink.vue.d.ts.map +1 -0
  470. package/dist/features/info-object/InfoLink.vue.js +7 -0
  471. package/dist/features/info-object/InfoLink.vue.js.map +1 -0
  472. package/dist/features/info-object/InfoLink.vue.script.js +30 -0
  473. package/dist/features/info-object/InfoLink.vue.script.js.map +1 -0
  474. package/dist/features/info-object/TermsOfService.vue.d.ts.map +1 -1
  475. package/dist/features/info-object/TermsOfService.vue.js.map +1 -1
  476. package/dist/features/info-object/TermsOfService.vue.script.js +9 -6
  477. package/dist/features/info-object/TermsOfService.vue.script.js.map +1 -1
  478. package/dist/features/info-object/index.d.ts +1 -0
  479. package/dist/features/info-object/index.d.ts.map +1 -1
  480. package/dist/features/localization/index.d.ts +2 -0
  481. package/dist/features/localization/index.d.ts.map +1 -0
  482. package/dist/features/localization/locales/ar.d.ts +227 -0
  483. package/dist/features/localization/locales/ar.d.ts.map +1 -0
  484. package/dist/features/localization/locales/ar.js +225 -0
  485. package/dist/features/localization/locales/ar.js.map +1 -0
  486. package/dist/features/localization/locales/de.d.ts +227 -0
  487. package/dist/features/localization/locales/de.d.ts.map +1 -0
  488. package/dist/features/localization/locales/de.js +225 -0
  489. package/dist/features/localization/locales/de.js.map +1 -0
  490. package/dist/features/localization/locales/en.d.ts +227 -0
  491. package/dist/features/localization/locales/en.d.ts.map +1 -0
  492. package/dist/features/localization/locales/en.js +225 -0
  493. package/dist/features/localization/locales/en.js.map +1 -0
  494. package/dist/features/localization/locales/es.d.ts +227 -0
  495. package/dist/features/localization/locales/es.d.ts.map +1 -0
  496. package/dist/features/localization/locales/es.js +225 -0
  497. package/dist/features/localization/locales/es.js.map +1 -0
  498. package/dist/features/localization/locales/fr.d.ts +227 -0
  499. package/dist/features/localization/locales/fr.d.ts.map +1 -0
  500. package/dist/features/localization/locales/fr.js +225 -0
  501. package/dist/features/localization/locales/fr.js.map +1 -0
  502. package/dist/features/localization/locales/ru.d.ts +227 -0
  503. package/dist/features/localization/locales/ru.d.ts.map +1 -0
  504. package/dist/features/localization/locales/ru.js +225 -0
  505. package/dist/features/localization/locales/ru.js.map +1 -0
  506. package/dist/features/localization/locales/zh-cn.d.ts +227 -0
  507. package/dist/features/localization/locales/zh-cn.d.ts.map +1 -0
  508. package/dist/features/localization/locales/zh-cn.js +225 -0
  509. package/dist/features/localization/locales/zh-cn.js.map +1 -0
  510. package/dist/features/localization/translations.d.ts +1588 -0
  511. package/dist/features/localization/translations.d.ts.map +1 -0
  512. package/dist/features/localization/translations.js +27 -0
  513. package/dist/features/localization/translations.js.map +1 -0
  514. package/dist/features/localization/use-localization.d.ts +18 -0
  515. package/dist/features/localization/use-localization.d.ts.map +1 -0
  516. package/dist/features/localization/use-localization.js +58 -0
  517. package/dist/features/localization/use-localization.js.map +1 -0
  518. package/dist/features/multiple-documents/DocumentSelector.vue.script.js +1 -1
  519. package/dist/features/test-request-button/TestRequestButton.vue.d.ts.map +1 -1
  520. package/dist/features/test-request-button/TestRequestButton.vue.js +1 -1
  521. package/dist/features/test-request-button/TestRequestButton.vue.js.map +1 -1
  522. package/dist/features/test-request-button/TestRequestButton.vue.script.js +3 -1
  523. package/dist/features/test-request-button/TestRequestButton.vue.script.js.map +1 -1
  524. package/dist/helpers/get-async-api-message-payload-schema.d.ts +18 -0
  525. package/dist/helpers/get-async-api-message-payload-schema.d.ts.map +1 -0
  526. package/dist/helpers/get-async-api-message-payload-schema.js +33 -0
  527. package/dist/helpers/get-async-api-message-payload-schema.js.map +1 -0
  528. package/dist/helpers/get-async-api-model-schema.d.ts.map +1 -1
  529. package/dist/helpers/get-async-api-model-schema.js +2 -11
  530. package/dist/helpers/get-async-api-model-schema.js.map +1 -1
  531. package/dist/helpers/is-introduction-entry.d.ts +16 -0
  532. package/dist/helpers/is-introduction-entry.d.ts.map +1 -0
  533. package/dist/helpers/is-introduction-entry.js +17 -0
  534. package/dist/helpers/is-introduction-entry.js.map +1 -0
  535. package/dist/helpers/load-from-perssistance.js +1 -1
  536. package/dist/helpers/load-from-perssistance.js.map +1 -1
  537. package/dist/helpers/map-config-plugins.d.ts +8 -3
  538. package/dist/helpers/map-config-plugins.d.ts.map +1 -1
  539. package/dist/helpers/map-config-plugins.js +22 -4
  540. package/dist/helpers/map-config-plugins.js.map +1 -1
  541. package/dist/helpers/map-config-to-workspace-store.js +1 -1
  542. package/dist/helpers/map-config-to-workspace-store.js.map +1 -1
  543. package/dist/helpers/storage.d.ts +14 -14
  544. package/dist/style.css +783 -666
  545. package/dist/styles/tailwind.config.css +1 -0
  546. package/dist/vue-styles.css +700 -597
  547. package/package.json +18 -17
  548. package/dist/browser/chunks/AgentScalarChatInterface-CesFQ_Ax.js +0 -27
  549. package/dist/browser/chunks/ScalarTextInput.vue-C14zmVNI.js +0 -27
  550. package/dist/browser/chunks/modal-BZzcBkVp.js +0 -99
  551. package/dist/browser/chunks/vendor-wW8jg8wN.js +0 -306
  552. package/dist/features/Operation/helpers/get-first-server.d.ts +0 -9
  553. package/dist/features/Operation/helpers/get-first-server.d.ts.map +0 -1
  554. package/dist/features/Operation/helpers/get-first-server.js +0 -27
  555. package/dist/features/Operation/helpers/get-first-server.js.map +0 -1
@@ -1,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,QAAQ,MAAM;AACjB,UAAM,UAAS;AACf,WAAO,OAAO,IAAI,OAAM;;IAG9B;AAKA,kBAAgB,OAAO,iBAAiB,WAAW,aAAa,CAAA;AAChE,wBAAsB,OAAO,oBAAoB,WAAW,aAAa,CAAA;EAEzE,SAAS,cAAc;AACrB,cAAW,MAAK;;;2DAKR,QAAA,aAAA,WAAA,EADR,YAIyB,MAAA,iBAAA,EAAA;;IAFtB,MAAM,MAAA,0BAAyB;IAChC,OAAM;IACL,SAAO;0CACV,YAuB4B,MAAA,0BAAA,EAAA;;aArBtB;IAAJ,KAAI;IACJ,OAAK,eAAA,CAAC,UACEA,KAAAA,OAAO,MAAK,CAAA;IACnB,SAAO;;IAOG,UAAQ,cAIN,CAHK,MAAA,SAAA,WAAA,EAAhB,mBAGW,UAAA,EAAA,KAAA,GAAA,EAAA,CAAA,OAAA,OAAA,OAAA,KAFT,mBAAoC,QAAA,EAA9B,OAAM,WAAS,EAAC,WAAO,GAAA,GAAA,OAAA,OAAA,OAAA,KAC7B,mBAAiC,QAAA,EAA3B,eAAY,QAAM,EAAC,KAAC,GAAA,EAAA,EAAA,GAAA,KAAA,WAAA,EAE5B,mBAGW,UAAA,EAAA,KAAA,GAAA,EAAA,CAAA,OAAA,OAAA,OAAA,KAFT,mBAAiC,QAAA,EAA3B,OAAM,WAAS,EAAC,QAAI,GAAA,GAAA,OAAA,OAAA,OAAA,KAC1B,mBAAiC,QAAA,EAA3B,eAAY,QAAM,EAAC,KAAC,GAAA,EAAA,EAAA,GAAA,GAAA,gBACjB,MACX,gBAAG,QAAA,aAAY,EAAA,EAAA,CAAA,CAAA;2BAfuB,CAAA,OAAA,OAAA,OAAA,KAAxC,mBAAwC,QAAA,EAAlC,OAAM,WAAS,EAAC,eAAW,GAAA,GAAA,OAAA,OAAA,OAAA,KACjC,mBAIO,QAAA;KAHL,eAAY;KACZ,OAAM;OAA6B,YAErC,GAAA,EAAA,CAAA;;sBAcF,YAI6C,qBAAA;IAH1C,UAAA,QAAA;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;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,QAAQ,MAAM;AACjB,UAAM,UAAS;AACf,WAAO,OAAO,IAAI,OAAM;;IAG9B;AAKA,kBAAgB,OAAO,iBAAiB,WAAW,aAAa,CAAA;AAChE,wBAAsB,OAAO,oBAAoB,WAAW,aAAa,CAAA;EAEzE,SAAS,cAAc;AACrB,cAAW,MAAK;;;2DAKR,QAAA,aAAA,WAAA,EADR,YAIyB,MAAA,iBAAA,EAAA;;IAFtB,MAAM,MAAA,0BAAyB;IAC/B,OAAO,MAAA,UAAS,CAAA,eAAA;IAChB,SAAO;mDACV,YAwB4B,MAAA,0BAAA,EAAA;;aAtBtB;IAAJ,KAAI;IACJ,OAAK,eAAA,CAAC,UACEA,KAAAA,OAAO,MAAK,CAAA;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;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>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BAAqB,OAAA,EAAA,CAAA,QAAA,UAAA,CAAA,EAAA,CAAA,OAAA,CAAA;8DACd,aAAa,cAAA,MAAa,EAAA,CAAA,QAAA,UAAA,CAAA,EAAA,CAAA,QAAA,CAAA;oEACnC,sBAAqB,KAAA,EAAA,CAAA,QAAA,UAAA,CAAA,EAAA,CAAA,KAAA,CAAA;;;KAEnD,YAgByB,MAAA,uBAAA,EAAA;MAftB,IAAI;MACL,cAAW;MACX,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,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);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,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":";;;;;;;;;;;;;;;;;;EA0BA,MAAM,cAAyD;GAC7D,SAAS;GACT,OAAO;GACP,WAAW;GACX,KAAK;GACL,SAAS;GACX;EAEA,MAAM,cAAc,gBAA8C;GAChE,SAAS;GACT,WAAW;GACX,KAAK;GACL,OAAO,QAAA;GACP,SAAS;GACV,EAAC;;uBAIA,YAiDyB,MAAA,uBAAA,EAAA;IAhDtB,IAAI,QAAA;IACJ,MAAM,YAAY,QAAA,OAAO,KAAK;IAC9B,UAAU,QAAA;;2BAmBJ,CAlBP,mBAkBO,QAAA,EAjBJ,OAAK,eAAA,EAAA,wBAA8C,QAAA,OAAO,KAAK,MAAM,SAAI,eAA8B,QAAA,OAAO,KAAK,MAAM,cAAA,CAAA,EAAA,EAAA;KAK1H,mBASO,QATP,YASO,CAAA,gBAAA,gBARF,YAAA,MAAY,QAAA,OAAO,KAAK,MAAI,GAAI,UACnC,EAAA,EACqB,QAAA,OAAO,KAAK,MAAM,SAAI,eAAgC,QAAA,OAAO,KAAK,MAAM,gBAAA,WAAA,EAD7F,mBAMW,UAAA,EAAA,KAAA,GAAA,EAAA,CAAA,gBAFP,qBAEJ,CAAA,EAAA,GAAA,IAAA,mBAAA,IAAA,KAAA,CAAA,CAAA;qBACK,MACP,gBAAG,QAAA,OAAO,KAAK,MAAK,GAAG,KACvB,EAAA;+BAAA,mBAA8B,QAAA,EAAxB,OAAM,WAAS,EAAC,KAAC,GAAA;;;OAGR,QAAA,OAAO,KAAK,SAAI,cAA2B,QAAA,OAAO,KAAK,UAAU,QAAA,OAAO,KAAK,SAAiB,QAAA,OAAO,KAAK,SAAS,QAAA,OAAO,KAAK,QAAA;UAK7I;sBAYM,CAXP,mBAWO,QAXP,YAWO;KAVW,QAAA,OAAO,KAAK,SAAI,eAAA,WAAA,EAAhC,mBAOW,UAAA,EAAA,KAAA,GAAA,EAAA,CANT,YAE0C,MAAA,WAAA,EAAA;MADxC,eAAY;MACX,QAAQ,QAAA,OAAO,KAAK,UAAM;8BAC7B,mBAEO,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,sBAAsB;GAC1C,EAAC;;uBAIA,YAkDyB,MAAA,uBAAA,EAAA;IAjDtB,IAAI,QAAA;IACJ,MAAM,YAAY,QAAA,OAAO,KAAK;IAC9B,UAAU,QAAA;;2BAmBJ,CAlBP,mBAkBO,QAAA,EAjBJ,OAAK,eAAA,EAAA,wBAA8C,QAAA,OAAO,KAAK,MAAM,SAAI,eAA8B,QAAA,OAAO,KAAK,MAAM,cAAA,CAAA,EAAA,EAAA;KAK1H,mBASO,QATP,YASO,CAAA,gBAAA,gBARF,YAAA,MAAY,QAAA,OAAO,KAAK,MAAI,GAAI,UACnC,EAAA,EACqB,QAAA,OAAO,KAAK,MAAM,SAAI,eAAgC,QAAA,OAAO,KAAK,MAAM,gBAAA,WAAA,EAD7F,mBAMW,UAAA,EAAA,KAAA,GAAA,EAAA,CAAA,gBAFP,OACD,gBAAG,MAAA,UAAS,CAAA,oBAAA,CAAA,GAAwB,UACvC,EAAA,CAAA,EAAA,GAAA,IAAA,mBAAA,IAAA,KAAA,CAAA,CAAA;qBACK,MACP,gBAAG,QAAA,OAAO,KAAK,MAAK,GAAG,KACvB,EAAA;+BAAA,mBAA8B,QAAA,EAAxB,OAAM,WAAS,EAAC,KAAC,GAAA;;;OAGR,QAAA,OAAO,KAAK,SAAI,cAA2B,QAAA,OAAO,KAAK,UAAU,QAAA,OAAO,KAAK,SAAiB,QAAA,OAAO,KAAK,SAAS,QAAA,OAAO,KAAK,QAAA;UAK7I;sBAaM,CAZP,mBAYO,QAZP,YAYO;KAXW,QAAA,OAAO,KAAK,SAAI,eAAA,WAAA,EAAhC,mBAQW,UAAA,EAAA,KAAA,GAAA,EAAA,CAPT,YAE0C,MAAA,WAAA,EAAA;MADxC,eAAY;MACX,QAAQ,QAAA,OAAO,KAAK,UAAM;8BAC7B,mBAGO,QAHP,YAGO,gBAFF,MAAA,UAAS,CAAA,oBAAA,CAAA,GAAwB,OACpC,gBAAG,QAAA,OAAO,KAAK,UAAM,MAAA,EAAA,EAAA,CAAA,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,EAAE,kBAAkB,CAAA;CACxC,CAAA;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,kBAAkB,GAAG,SAAS,EACxC,OAAO,CAAC,EAAE,wBAAwB,GACjC,QAAQ,EAAE,CAqBZ"}
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;AAYvD,qJAAqJ;AACrJ,KAAK,kBAAkB,GAAG,eAAe,GAAG,gBAAgB,CAAA;AA4E5D,KAAK,wBAAwB,GAAG;IAC9B,MAAM,CAAC,EAAE,iBAAiB,CAAA;IAC1B,kBAAkB,CAAC,EAAE,kBAAkB,CAAA;CACxC,CAAA;AAED,KAAK,iBAAiB,GAAG;IACvB,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,YAAY,EAAE,MAAM,CAAA;CACrB,CAAA;AAUD;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,kBAAkB,GAAG,SAAS,EACxC,OAAO,CAAC,EAAE,wBAAwB,GACjC,QAAQ,EAAE,CAsBZ"}
@@ -1,4 +1,5 @@
1
1
  import { getAsyncApiModelSchema } from "../../../helpers/get-async-api-model-schema.js";
2
+ import { isIntroductionEntry } from "../../../helpers/is-introduction-entry.js";
2
3
  import { extractBodyDescriptions, extractBodyFieldNames, extractParameterDescriptions, extractParameterNames, extractSchemaDescriptions, extractSchemaFieldNames } from "../../../helpers/openapi.js";
3
4
  import { DEFAULT_MODELS_SECTION_LABEL } from "@scalar/types/api-reference";
4
5
  import { combineParams } from "@scalar/workspace-store/request-example";
@@ -46,18 +47,26 @@ function extractResponseExamples(responses) {
46
47
  });
47
48
  }).filter((value) => value.length > 0);
48
49
  }
50
+ var DEFAULT_SEARCH_INDEX_LABELS = {
51
+ heading: "Heading",
52
+ tagGroup: "Tag Group",
53
+ webhook: "Webhook",
54
+ webhooks: "Webhooks",
55
+ introduction: "Introduction"
56
+ };
49
57
  /**
50
58
  * Create a search index from a list of entries.
51
59
  */
52
60
  function createSearchIndex(document, options) {
53
61
  const index = [];
54
62
  const modelsSectionTitle = options?.modelsSectionLabel ?? DEFAULT_MODELS_SECTION_LABEL;
63
+ const labels = options?.labels ?? DEFAULT_SEARCH_INDEX_LABELS;
55
64
  /**
56
65
  * Recursively processes entries and their children to build the search index.
57
66
  */
58
67
  function processEntries(entriesToProcess) {
59
68
  entriesToProcess.forEach((entry) => {
60
- addEntryToIndex(entry, index, document, modelsSectionTitle);
69
+ addEntryToIndex(entry, index, document, modelsSectionTitle, labels);
61
70
  if ("children" in entry && entry.children) processEntries(entry.children);
62
71
  });
63
72
  }
@@ -70,7 +79,7 @@ function createSearchIndex(document, options) {
70
79
  * AsyncAPI documents contribute heading, tag, and model entries here. Their
71
80
  * channels, operations, and messages are not indexed yet.
72
81
  */
73
- function addEntryToIndex(entry, index, document, modelsSectionTitle) {
82
+ function addEntryToIndex(entry, index, document, modelsSectionTitle, labels) {
74
83
  const openApiDocument = isOpenApiDocument(document) ? document : void 0;
75
84
  if (entry.type === "operation") {
76
85
  const pathItem = getResolvedPathItem(openApiDocument?.paths?.[entry.path]);
@@ -137,8 +146,8 @@ function addEntryToIndex(entry, index, document, modelsSectionTitle) {
137
146
  index.push({
138
147
  id: entry.id,
139
148
  type: "heading",
140
- title: entry.title,
141
- description: "Heading",
149
+ title: modelsSectionTitle,
150
+ description: labels.heading,
142
151
  body: "",
143
152
  entry
144
153
  });
@@ -148,8 +157,8 @@ function addEntryToIndex(entry, index, document, modelsSectionTitle) {
148
157
  index.push({
149
158
  id: entry.id,
150
159
  type: "heading",
151
- title: "Webhooks",
152
- description: "Heading",
160
+ title: labels.webhooks,
161
+ description: labels.heading,
153
162
  body: "",
154
163
  entry
155
164
  });
@@ -170,7 +179,7 @@ function addEntryToIndex(entry, index, document, modelsSectionTitle) {
170
179
  index.push({
171
180
  id: entry.id,
172
181
  title: entry.title,
173
- description: "Tag Group",
182
+ description: labels.tagGroup,
174
183
  type: "tag",
175
184
  body: "",
176
185
  entry
@@ -181,8 +190,8 @@ function addEntryToIndex(entry, index, document, modelsSectionTitle) {
181
190
  index.push({
182
191
  id: entry.id,
183
192
  type: "heading",
184
- title: entry.title ?? "",
185
- description: "Heading",
193
+ title: isIntroductionEntry(entry) ? labels.introduction : entry.title ?? "",
194
+ description: labels.heading,
186
195
  body: "",
187
196
  entry
188
197
  });
@@ -1 +1 @@
1
- {"version":3,"file":"create-search-index.js","names":[],"sources":["../../../../src/features/Search/helpers/create-search-index.ts"],"sourcesContent":["import { DEFAULT_MODELS_SECTION_LABEL, type ModelsSectionLabel } from '@scalar/types/api-reference'\nimport type { AsyncApiDocument } from '@scalar/types/asyncapi/3.1'\nimport { getPathItemOperation, getResolvedPathItem } from '@scalar/workspace-store/helpers/for-each-path-item-operation'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport { combineParams } from '@scalar/workspace-store/request-example'\nimport type { TraversedEntry } from '@scalar/workspace-store/schemas/navigation'\nimport { isAsyncApiDocument, isOpenApiDocument } from '@scalar/workspace-store/schemas/type-guards'\nimport type {\n MediaTypeObject,\n OpenApiDocument,\n OperationObject,\n ResponsesObject,\n SchemaObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nimport type { FuseData } from '@/features/Search/types'\nimport { getAsyncApiModelSchema } from '@/helpers/get-async-api-model-schema'\nimport {\n extractBodyDescriptions,\n extractBodyFieldNames,\n extractParameterDescriptions,\n extractParameterNames,\n extractSchemaDescriptions,\n extractSchemaFieldNames,\n} from '@/helpers/openapi'\n\n/** Documents the search index can ingest. AsyncAPI is supported for headings, tags, and models; channels/operations/messages are not indexed yet. */\ntype SearchableDocument = OpenApiDocument | AsyncApiDocument\n\n/**\n * Resolves a schema from `components.schemas` for either document type.\n *\n * OpenAPI and AsyncAPI keep reusable schemas in the same place, so model search entries can read\n * property names and descriptions from both. AsyncAPI entries need extra handling (ref siblings,\n * multi-format wrappers, boolean schemas), which lives in {@link getAsyncApiModelSchema}.\n */\nfunction getModelSchema(document: SearchableDocument | undefined, name: string): SchemaObject | undefined {\n if (isOpenApiDocument(document)) {\n return getResolvedRef(document.components?.schemas?.[name])\n }\n\n if (isAsyncApiDocument(document)) {\n return getAsyncApiModelSchema(document, name)\n }\n\n return undefined\n}\n\nfunction responseExampleValueToString(value: unknown): string {\n if (typeof value === 'string') {\n return value\n }\n\n try {\n return JSON.stringify(value)\n } catch (_error) {\n return ''\n }\n}\n\nfunction mediaTypeExamplesToStrings(mediaType: MediaTypeObject): string[] {\n const examplesFromNamedMap = Object.values(mediaType.examples ?? {})\n .flatMap((example) => {\n const resolvedExample = getResolvedRef(example)\n\n if (!resolvedExample || !('value' in resolvedExample)) {\n return []\n }\n\n return responseExampleValueToString(resolvedExample.value)\n })\n .filter((value) => value.length > 0)\n\n const mediaTypeExample =\n 'example' in mediaType && mediaType.example !== undefined ? responseExampleValueToString(mediaType.example) : ''\n\n return mediaTypeExample ? [mediaTypeExample, ...examplesFromNamedMap] : examplesFromNamedMap\n}\n\nfunction extractResponseExamples(responses: ResponsesObject | undefined): string[] {\n if (!responses) {\n return []\n }\n\n return Object.values(responses)\n .flatMap((response) => {\n const resolvedResponse = getResolvedRef(response)\n if (!resolvedResponse?.content) {\n return []\n }\n\n return Object.values(resolvedResponse.content).flatMap((mediaType) => {\n const resolvedMediaType = getResolvedRef(mediaType)\n if (!resolvedMediaType) {\n return []\n }\n\n return mediaTypeExamplesToStrings(resolvedMediaType)\n })\n })\n .filter((value) => value.length > 0)\n}\n\ntype CreateSearchIndexOptions = {\n modelsSectionLabel?: ModelsSectionLabel\n}\n\n/**\n * Create a search index from a list of entries.\n */\nexport function createSearchIndex(\n document: SearchableDocument | undefined,\n options?: CreateSearchIndexOptions,\n): FuseData[] {\n const index: FuseData[] = []\n const modelsSectionTitle = options?.modelsSectionLabel ?? DEFAULT_MODELS_SECTION_LABEL\n\n /**\n * Recursively processes entries and their children to build the search index.\n */\n function processEntries(entriesToProcess: TraversedEntry[]): void {\n entriesToProcess.forEach((entry) => {\n addEntryToIndex(entry, index, document, modelsSectionTitle)\n\n // Recursively process children if they exist\n if ('children' in entry && entry.children) {\n processEntries(entry.children)\n }\n })\n }\n\n processEntries(document?.['x-scalar-navigation']?.children ?? [])\n\n return index\n}\n\n/**\n * Adds a single entry to the search index, handling all entry types recursively.\n *\n * AsyncAPI documents contribute heading, tag, and model entries here. Their\n * channels, operations, and messages are not indexed yet.\n */\nfunction addEntryToIndex(\n entry: TraversedEntry,\n index: FuseData[],\n document: SearchableDocument | undefined,\n modelsSectionTitle: string,\n): void {\n // OpenAPI-only branches read fields that do not exist on AsyncAPI documents (paths, webhooks,\n // components.schemas). Narrow once here so each branch can dereference safely.\n const openApiDocument = isOpenApiDocument(document) ? document : undefined\n\n // Operation\n if (entry.type === 'operation') {\n const pathItem = getResolvedPathItem(openApiDocument?.paths?.[entry.path])\n const operation = (getResolvedRef(getPathItemOperation(openApiDocument?.paths?.[entry.path], entry.method)) ??\n {}) as OperationObject\n const operationWithPathParams = {\n ...operation,\n parameters: combineParams(pathItem?.parameters, operation.parameters),\n }\n\n const parameters = extractParameterNames(operationWithPathParams.parameters ?? [])\n const parameterDescriptions = extractParameterDescriptions(operationWithPathParams.parameters ?? [])\n const body = extractBodyFieldNames(operationWithPathParams)\n const bodyDescriptions = extractBodyDescriptions(operationWithPathParams)\n const responseExamples = extractResponseExamples(operationWithPathParams.responses)\n\n index.push({\n type: 'operation',\n title: entry.title,\n id: entry.id,\n description: operationWithPathParams.description || '',\n method: entry.method,\n path: entry.path,\n body,\n bodyDescriptions,\n parameters,\n parameterDescriptions,\n responseExamples,\n operationId: operationWithPathParams.operationId,\n entry,\n })\n\n return\n }\n\n // Webhook\n if (entry.type === 'webhook') {\n const webhook = getResolvedRef(getPathItemOperation(openApiDocument?.webhooks?.[entry.name], entry.method)) ?? {}\n const webhookDescription = webhook.description || ''\n\n index.push({\n id: entry.id,\n type: 'webhook',\n title: entry.title,\n description: 'Webhook',\n method: entry.method,\n body: '',\n bodyDescriptions: webhookDescription ? [webhookDescription] : [],\n operationId: webhook.operationId,\n entry,\n })\n\n return\n }\n\n // Model\n if (entry.type === 'model') {\n const schema = getModelSchema(document, entry.name)\n const schemaDescription = schema?.description ?? ''\n const propertyNames = extractSchemaFieldNames(schema)\n const propertyDescriptions = extractSchemaDescriptions(schema)\n\n index.push({\n type: 'model',\n title: entry.title,\n description: modelsSectionTitle,\n id: entry.id,\n body: propertyNames,\n bodyDescriptions: schemaDescription ? [schemaDescription, ...propertyDescriptions] : propertyDescriptions,\n entry,\n })\n\n return\n }\n\n // Models heading\n if (entry.type === 'models') {\n index.push({\n id: entry.id,\n type: 'heading',\n title: entry.title,\n description: 'Heading',\n body: '',\n entry,\n })\n\n return\n }\n\n // Tag\n if (entry.type === 'tag' && entry.isWebhooks === true) {\n index.push({\n id: entry.id,\n type: 'heading',\n title: 'Webhooks',\n description: 'Heading',\n body: '',\n entry,\n })\n\n return\n }\n\n if (entry.type === 'tag' && entry.isGroup === false) {\n index.push({\n id: entry.id,\n title: entry.title,\n description: entry.description || '',\n type: 'tag',\n body: '',\n entry,\n })\n\n return\n }\n\n // Tag group\n if (entry.type === 'tag' && entry.isGroup === true) {\n index.push({\n id: entry.id,\n title: entry.title,\n description: 'Tag Group',\n type: 'tag',\n body: '',\n entry,\n })\n\n return\n }\n\n // Headings from info.description\n if (entry.type === 'text') {\n index.push({\n id: entry.id,\n type: 'heading',\n title: entry.title ?? '',\n description: 'Heading',\n body: '',\n entry,\n })\n\n return\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAoCA,SAAS,eAAe,UAA0C,MAAwC;AACxG,KAAI,kBAAkB,SAAS,CAC7B,QAAO,eAAe,SAAS,YAAY,UAAU,MAAM;AAG7D,KAAI,mBAAmB,SAAS,CAC9B,QAAO,uBAAuB,UAAU,KAAK;;AAMjD,SAAS,6BAA6B,OAAwB;AAC5D,KAAI,OAAO,UAAU,SACnB,QAAO;AAGT,KAAI;AACF,SAAO,KAAK,UAAU,MAAM;UACrB,QAAQ;AACf,SAAO;;;AAIX,SAAS,2BAA2B,WAAsC;CACxE,MAAM,uBAAuB,OAAO,OAAO,UAAU,YAAY,EAAE,CAAC,CACjE,SAAS,YAAY;EACpB,MAAM,kBAAkB,eAAe,QAAQ;AAE/C,MAAI,CAAC,mBAAmB,EAAE,WAAW,iBACnC,QAAO,EAAE;AAGX,SAAO,6BAA6B,gBAAgB,MAAM;GAC1D,CACD,QAAQ,UAAU,MAAM,SAAS,EAAE;CAEtC,MAAM,mBACJ,a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AS,MAAM,eAAe,MAAM;AACrD,QAAM,KAAK;GACT,IAAI,MAAM;GACV,MAAM;GACN,OAAO;GACP,aAAa;GACb,MAAM;GACN;GACD,CAAC;AAEF;;AAGF,KAAI,MAAM,SAAS,SAAS,MAAM,YAAY,OAAO;AACnD,QAAM,KAAK;GACT,IAAI,MAAM;GACV,OAAO,MAAM;GACb,aAAa,MAAM,eAAe;GAClC,MAAM;GACN,MAAM;GACN;GACD,CAAC;AAEF;;AAIF,KAAI,MAAM,SAAS,SAAS,MAAM,YAAY,MAAM;AAClD,QAAM,KAAK;GACT,IAAI,MAAM;GACV,OAAO,MAAM;GACb,aAAa;GACb,MAAM;GACN,MAAM;GACN;GACD,CAAC;AAEF;;AAIF,KAAI,MAAM,SAAS,QAAQ;AACzB,QAAM,KAAK;GACT,IAAI,MAAM;GACV,MAAM;GACN,OAAO,MAAM,SAAS;GACtB,aAAa;GACb,MAAM;GACN;GACD,CAAC;AAEF"}
1
+ {"version":3,"file":"create-search-index.js","names":[],"sources":["../../../../src/features/Search/helpers/create-search-index.ts"],"sourcesContent":["import { DEFAULT_MODELS_SECTION_LABEL, type ModelsSectionLabel } from '@scalar/types/api-reference'\nimport type { AsyncApiDocument } from '@scalar/types/asyncapi/3.1'\nimport { getPathItemOperation, getResolvedPathItem } from '@scalar/workspace-store/helpers/for-each-path-item-operation'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport { combineParams } from '@scalar/workspace-store/request-example'\nimport type { TraversedEntry } from '@scalar/workspace-store/schemas/navigation'\nimport { isAsyncApiDocument, isOpenApiDocument } from '@scalar/workspace-store/schemas/type-guards'\nimport type {\n MediaTypeObject,\n OpenApiDocument,\n OperationObject,\n ResponsesObject,\n SchemaObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nimport type { FuseData } from '@/features/Search/types'\nimport { getAsyncApiModelSchema } from '@/helpers/get-async-api-model-schema'\nimport { isIntroductionEntry } from '@/helpers/is-introduction-entry'\nimport {\n extractBodyDescriptions,\n extractBodyFieldNames,\n extractParameterDescriptions,\n extractParameterNames,\n extractSchemaDescriptions,\n extractSchemaFieldNames,\n} from '@/helpers/openapi'\n\n/** Documents the search index can ingest. AsyncAPI is supported for headings, tags, and models; channels/operations/messages are not indexed yet. */\ntype SearchableDocument = OpenApiDocument | AsyncApiDocument\n\n/**\n * Resolves a schema from `components.schemas` for either document type.\n *\n * OpenAPI and AsyncAPI keep reusable schemas in the same place, so model search entries can read\n * property names and descriptions from both. AsyncAPI entries need extra handling (ref siblings,\n * multi-format wrappers, boolean schemas), which lives in {@link getAsyncApiModelSchema}.\n */\nfunction getModelSchema(document: SearchableDocument | undefined, name: string): SchemaObject | undefined {\n if (isOpenApiDocument(document)) {\n return getResolvedRef(document.components?.schemas?.[name])\n }\n\n if (isAsyncApiDocument(document)) {\n return getAsyncApiModelSchema(document, name)\n }\n\n return undefined\n}\n\nfunction responseExampleValueToString(value: unknown): string {\n if (typeof value === 'string') {\n return value\n }\n\n try {\n return JSON.stringify(value)\n } catch (_error) {\n return ''\n }\n}\n\nfunction mediaTypeExamplesToStrings(mediaType: MediaTypeObject): string[] {\n const examplesFromNamedMap = Object.values(mediaType.examples ?? {})\n .flatMap((example) => {\n const resolvedExample = getResolvedRef(example)\n\n if (!resolvedExample || !('value' in resolvedExample)) {\n return []\n }\n\n return responseExampleValueToString(resolvedExample.value)\n })\n .filter((value) => value.length > 0)\n\n const mediaTypeExample =\n 'example' in mediaType && mediaType.example !== undefined ? responseExampleValueToString(mediaType.example) : ''\n\n return mediaTypeExample ? [mediaTypeExample, ...examplesFromNamedMap] : examplesFromNamedMap\n}\n\nfunction extractResponseExamples(responses: ResponsesObject | undefined): string[] {\n if (!responses) {\n return []\n }\n\n return Object.values(responses)\n .flatMap((response) => {\n const resolvedResponse = getResolvedRef(response)\n if (!resolvedResponse?.content) {\n return []\n }\n\n return Object.values(resolvedResponse.content).flatMap((mediaType) => {\n const resolvedMediaType = getResolvedRef(mediaType)\n if (!resolvedMediaType) {\n return []\n }\n\n return mediaTypeExamplesToStrings(resolvedMediaType)\n })\n })\n .filter((value) => value.length > 0)\n}\n\ntype CreateSearchIndexOptions = {\n labels?: SearchIndexLabels\n modelsSectionLabel?: ModelsSectionLabel\n}\n\ntype SearchIndexLabels = {\n heading: string\n tagGroup: string\n webhook: string\n webhooks: string\n introduction: string\n}\n\nconst DEFAULT_SEARCH_INDEX_LABELS = {\n heading: 'Heading',\n tagGroup: 'Tag Group',\n webhook: 'Webhook',\n webhooks: 'Webhooks',\n introduction: 'Introduction',\n} satisfies SearchIndexLabels\n\n/**\n * Create a search index from a list of entries.\n */\nexport function createSearchIndex(\n document: SearchableDocument | undefined,\n options?: CreateSearchIndexOptions,\n): FuseData[] {\n const index: FuseData[] = []\n const modelsSectionTitle = options?.modelsSectionLabel ?? DEFAULT_MODELS_SECTION_LABEL\n const labels = options?.labels ?? DEFAULT_SEARCH_INDEX_LABELS\n\n /**\n * Recursively processes entries and their children to build the search index.\n */\n function processEntries(entriesToProcess: TraversedEntry[]): void {\n entriesToProcess.forEach((entry) => {\n addEntryToIndex(entry, index, document, modelsSectionTitle, labels)\n\n // Recursively process children if they exist\n if ('children' in entry && entry.children) {\n processEntries(entry.children)\n }\n })\n }\n\n processEntries(document?.['x-scalar-navigation']?.children ?? [])\n\n return index\n}\n\n/**\n * Adds a single entry to the search index, handling all entry types recursively.\n *\n * AsyncAPI documents contribute heading, tag, and model entries here. Their\n * channels, operations, and messages are not indexed yet.\n */\nfunction addEntryToIndex(\n entry: TraversedEntry,\n index: FuseData[],\n document: SearchableDocument | undefined,\n modelsSectionTitle: string,\n labels: SearchIndexLabels,\n): void {\n // OpenAPI-only branches read fields that do not exist on AsyncAPI documents (paths, webhooks,\n // components.schemas). Narrow once here so each branch can dereference safely.\n const openApiDocument = isOpenApiDocument(document) ? document : undefined\n\n // Operation\n if (entry.type === 'operation') {\n const pathItem = getResolvedPathItem(openApiDocument?.paths?.[entry.path])\n const operation = (getResolvedRef(getPathItemOperation(openApiDocument?.paths?.[entry.path], entry.method)) ??\n {}) as OperationObject\n const operationWithPathParams = {\n ...operation,\n parameters: combineParams(pathItem?.parameters, operation.parameters),\n }\n\n const parameters = extractParameterNames(operationWithPathParams.parameters ?? [])\n const parameterDescriptions = extractParameterDescriptions(operationWithPathParams.parameters ?? [])\n const body = extractBodyFieldNames(operationWithPathParams)\n const bodyDescriptions = extractBodyDescriptions(operationWithPathParams)\n const responseExamples = extractResponseExamples(operationWithPathParams.responses)\n\n index.push({\n type: 'operation',\n title: entry.title,\n id: entry.id,\n description: operationWithPathParams.description || '',\n method: entry.method,\n path: entry.path,\n body,\n bodyDescriptions,\n parameters,\n parameterDescriptions,\n responseExamples,\n operationId: operationWithPathParams.operationId,\n entry,\n })\n\n return\n }\n\n // Webhook\n if (entry.type === 'webhook') {\n const webhook = getResolvedRef(getPathItemOperation(openApiDocument?.webhooks?.[entry.name], entry.method)) ?? {}\n const webhookDescription = webhook.description || ''\n\n index.push({\n id: entry.id,\n type: 'webhook',\n title: entry.title,\n description: 'Webhook',\n method: entry.method,\n body: '',\n bodyDescriptions: webhookDescription ? [webhookDescription] : [],\n operationId: webhook.operationId,\n entry,\n })\n\n return\n }\n\n // Model\n if (entry.type === 'model') {\n const schema = getModelSchema(document, entry.name)\n const schemaDescription = schema?.description ?? ''\n const propertyNames = extractSchemaFieldNames(schema)\n const propertyDescriptions = extractSchemaDescriptions(schema)\n\n index.push({\n type: 'model',\n title: entry.title,\n description: modelsSectionTitle,\n id: entry.id,\n body: propertyNames,\n bodyDescriptions: schemaDescription ? [schemaDescription, ...propertyDescriptions] : propertyDescriptions,\n entry,\n })\n\n return\n }\n\n // Models heading\n if (entry.type === 'models') {\n index.push({\n id: entry.id,\n type: 'heading',\n title: modelsSectionTitle,\n description: labels.heading,\n body: '',\n entry,\n })\n\n return\n }\n\n // Tag\n if (entry.type === 'tag' && entry.isWebhooks === true) {\n index.push({\n id: entry.id,\n type: 'heading',\n title: labels.webhooks,\n description: labels.heading,\n body: '',\n entry,\n })\n\n return\n }\n\n if (entry.type === 'tag' && entry.isGroup === false) {\n index.push({\n id: entry.id,\n title: entry.title,\n description: entry.description || '',\n type: 'tag',\n body: '',\n entry,\n })\n\n return\n }\n\n // Tag group\n if (entry.type === 'tag' && entry.isGroup === true) {\n index.push({\n id: entry.id,\n title: entry.title,\n description: labels.tagGroup,\n type: 'tag',\n body: '',\n entry,\n })\n\n return\n }\n\n // Headings from info.description\n if (entry.type === 'text') {\n index.push({\n id: entry.id,\n type: 'heading',\n title: isIntroductionEntry(entry) ? labels.introduction : (entry.title ?? ''),\n description: labels.heading,\n body: '',\n entry,\n })\n\n return\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAqCA,SAAS,eAAe,UAA0C,MAAwC;AACxG,KAAI,kBAAkB,SAAS,CAC7B,QAAO,eAAe,SAAS,YAAY,UAAU,MAAM;AAG7D,KAAI,mBAAmB,SAAS,CAC9B,QAAO,uBAAuB,UAAU,KAAK;;AAMjD,SAAS,6BAA6B,OAAwB;AAC5D,KAAI,OAAO,UAAU,SACnB,QAAO;AAGT,KAAI;AACF,SAAO,KAAK,UAAU,MAAM;UACrB,QAAQ;AACf,SAAO;;;AAIX,SAAS,2BAA2B,WAAsC;CACxE,MAAM,uBAAuB,OAAO,OAAO,UAAU,YAAY,EAAE,CAAC,CACjE,SAAS,YAAY;EACpB,MAAM,kBAAkB,eAAe,QAAQ;AAE/C,MAAI,CAAC,mBAAmB,EAAE,WAAW,iBACnC,QAAO,EAAE;AAGX,SAAO,6BAA6B,gBAAgB,MAAM;GAC1D,CACD,QAAQ,UAAU,MAAM,SAAS,EAAE;CAEtC,MAAM,mBACJ,aAAa,aAAa,UAAU,YAAY,KAAA,IAAY,6BAA6B,UAAU,QAAQ,GAAG;AAEhH,QAAO,mBAAmB,CAAC,kBAAkB,GAAG,qBAAqB,GAAG;;AAG1E,SAAS,wBAAwB,WAAkD;AACjF,KAAI,CAAC,UACH,QAAO,E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M;GACV,MAAM;GACN,OAAO,OAAO;GACd,aAAa,OAAO;GACpB,MAAM;GACN;GACD,CAAC;AAEF;;AAGF,KAAI,MAAM,SAAS,SAAS,MAAM,YAAY,OAAO;AACnD,QAAM,KAAK;GACT,IAAI,MAAM;GACV,OAAO,MAAM;GACb,aAAa,MAAM,eAAe;GAClC,MAAM;GACN,MAAM;GACN;GACD,CAAC;AAEF;;AAIF,KAAI,MAAM,SAAS,SAAS,MAAM,YAAY,MAAM;AAClD,QAAM,KAAK;GACT,IAAI,MAAM;GACV,OAAO,MAAM;GACb,aAAa,OAAO;GACpB,MAAM;GACN,MAAM;GACN;GACD,CAAC;AAEF;;AAIF,KAAI,MAAM,SAAS,QAAQ;AACzB,QAAM,KAAK;GACT,IAAI,MAAM;GACV,MAAM;GACN,OAAO,oBAAoB,MAAM,GAAG,OAAO,eAAgB,MAAM,SAAS;GAC1E,aAAa,OAAO;GACpB,MAAM;GACN;GACD,CAAC;AAEF"}
@@ -6,7 +6,13 @@ import type { FuseData } from '../types';
6
6
  /**
7
7
  * Creates the search index from an OpenAPI or AsyncAPI document.
8
8
  */
9
- export declare function useSearchIndex(document: MaybeRefOrGetter<OpenApiDocument | AsyncApiDocument | undefined>, modelsSectionLabel?: MaybeRefOrGetter<ModelsSectionLabel | undefined>): {
9
+ export declare function useSearchIndex(document: MaybeRefOrGetter<OpenApiDocument | AsyncApiDocument | undefined>, modelsSectionLabel?: MaybeRefOrGetter<ModelsSectionLabel | undefined>, labels?: MaybeRefOrGetter<{
10
+ heading: string;
11
+ tagGroup: string;
12
+ webhook: string;
13
+ webhooks: string;
14
+ introduction: string;
15
+ }>): {
10
16
  results: import("vue").ComputedRef<{
11
17
  item: FuseData;
12
18
  refIndex: number;
@@ -1 +1 @@
1
- {"version":3,"file":"useSearchIndex.d.ts","sourceRoot":"","sources":["../../../../src/features/Search/hooks/useSearchIndex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgC,KAAK,kBAAkB,EAAE,MAAM,6BA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