@scalar/api-reference 1.61.0 → 1.62.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (508) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/dist/blocks/scalar-asyncapi-server-selector-block/components/AsyncApiServerSelector.vue.d.ts.map +1 -1
  3. package/dist/blocks/scalar-asyncapi-server-selector-block/components/AsyncApiServerSelector.vue.js.map +1 -1
  4. package/dist/blocks/scalar-asyncapi-server-selector-block/components/AsyncApiServerSelector.vue.script.js +8 -5
  5. package/dist/blocks/scalar-asyncapi-server-selector-block/components/AsyncApiServerSelector.vue.script.js.map +1 -1
  6. package/dist/blocks/scalar-asyncapi-server-selector-block/components/Selector.vue.d.ts.map +1 -1
  7. package/dist/blocks/scalar-asyncapi-server-selector-block/components/Selector.vue.js.map +1 -1
  8. package/dist/blocks/scalar-asyncapi-server-selector-block/components/Selector.vue.script.js +11 -7
  9. package/dist/blocks/scalar-asyncapi-server-selector-block/components/Selector.vue.script.js.map +1 -1
  10. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/AsyncApiSidebarFilters.vue.d.ts +36 -0
  11. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/AsyncApiSidebarFilters.vue.d.ts.map +1 -0
  12. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/AsyncApiSidebarFilters.vue.js +7 -0
  13. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/AsyncApiSidebarFilters.vue.js.map +1 -0
  14. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/AsyncApiSidebarFilters.vue.script.js +69 -0
  15. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/AsyncApiSidebarFilters.vue.script.js.map +1 -0
  16. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/SidebarFilter.vue.d.ts +28 -0
  17. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/SidebarFilter.vue.d.ts.map +1 -0
  18. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/SidebarFilter.vue.js +7 -0
  19. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/SidebarFilter.vue.js.map +1 -0
  20. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/SidebarFilter.vue.script.js +62 -0
  21. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/SidebarFilter.vue.script.js.map +1 -0
  22. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/helpers/filter-async-api-navigation.d.ts +18 -0
  23. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/helpers/filter-async-api-navigation.d.ts.map +1 -0
  24. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/helpers/filter-async-api-navigation.js +59 -0
  25. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/helpers/filter-async-api-navigation.js.map +1 -0
  26. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/index.d.ts +3 -0
  27. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/index.d.ts.map +1 -0
  28. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts +1 -1
  29. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts.map +1 -1
  30. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js +1 -1
  31. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js.map +1 -1
  32. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.script.js +6 -3
  33. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.script.js.map +1 -1
  34. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.d.ts +2 -2
  35. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.d.ts.map +1 -1
  36. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.js +1 -1
  37. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.js.map +1 -1
  38. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.script.js +4 -2
  39. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.script.js.map +1 -1
  40. package/dist/blocks/scalar-client-selector-block/helpers/featured-clients.d.ts +1 -1
  41. package/dist/blocks/scalar-client-selector-block/helpers/featured-clients.d.ts.map +1 -1
  42. package/dist/blocks/scalar-client-selector-block/helpers/featured-clients.js.map +1 -1
  43. package/dist/blocks/scalar-info-block/components/DownloadLink.vue.d.ts.map +1 -1
  44. package/dist/blocks/scalar-info-block/components/DownloadLink.vue.js +1 -1
  45. package/dist/blocks/scalar-info-block/components/DownloadLink.vue.js.map +1 -1
  46. package/dist/blocks/scalar-info-block/components/DownloadLink.vue.script.js +3 -1
  47. package/dist/blocks/scalar-info-block/components/DownloadLink.vue.script.js.map +1 -1
  48. package/dist/blocks/scalar-info-block/components/InfoLinks.vue.d.ts.map +1 -1
  49. package/dist/blocks/scalar-info-block/components/InfoLinks.vue.js.map +1 -1
  50. package/dist/blocks/scalar-info-block/components/InfoLinks.vue.script.js +17 -3
  51. package/dist/blocks/scalar-info-block/components/InfoLinks.vue.script.js.map +1 -1
  52. package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.d.ts.map +1 -1
  53. package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.js +1 -1
  54. package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.js.map +1 -1
  55. package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.script.js +4 -2
  56. package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.script.js.map +1 -1
  57. package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.d.ts.map +1 -1
  58. package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.js +1 -1
  59. package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.js.map +1 -1
  60. package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.script.js +16 -12
  61. package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.script.js.map +1 -1
  62. package/dist/blocks/scalar-server-selector-block/components/Selector.vue.d.ts.map +1 -1
  63. package/dist/blocks/scalar-server-selector-block/components/Selector.vue.js.map +1 -1
  64. package/dist/blocks/scalar-server-selector-block/components/Selector.vue.script.js +11 -7
  65. package/dist/blocks/scalar-server-selector-block/components/Selector.vue.script.js.map +1 -1
  66. package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.d.ts.map +1 -1
  67. package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.js.map +1 -1
  68. package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.script.js +7 -4
  69. package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.script.js.map +1 -1
  70. package/dist/browser/chunks/AgentScalarChatInterface-D7J_MHKY.js +27 -0
  71. package/dist/browser/chunks/ScalarTextInput.vue-Fb0snAee.js +27 -0
  72. package/dist/browser/chunks/basic-shape-diamond.svg-BTEOT1FL.js +1 -1
  73. package/dist/browser/chunks/basic-shape-hexagon.svg-BSPzaCgF.js +1 -1
  74. package/dist/browser/chunks/basic-shape-primary-circle-ellipse-round.svg-DKmZ8UUU.js +1 -1
  75. package/dist/browser/chunks/basic-shape-primary-square-rectangle.svg-n2YRykHD.js +1 -1
  76. package/dist/browser/chunks/basic-shape-shield.svg-Bec9cJDA.js +1 -1
  77. package/dist/browser/chunks/browser-67K6wmG9.js +1 -1
  78. package/dist/browser/chunks/computer-device-desktop-monitor.svg-m6j893Hb.js +1 -1
  79. package/dist/browser/chunks/computer-device-desktop.svg-Dk1VVO7k.js +1 -1
  80. package/dist/browser/chunks/computer-device-laptop.svg-BNGVUCYS.js +1 -1
  81. package/dist/browser/chunks/computer-device-mobile-phone-android-samsung-back.svg-CC4UUTFw.js +1 -1
  82. package/dist/browser/chunks/computer-device-mobile-phone-android-samsung.svg-D8ExpMpL.js +1 -1
  83. package/dist/browser/chunks/computer-device-mobile-phone-iphone-x-back.svg-CLm7sgMM.js +1 -1
  84. package/dist/browser/chunks/computer-device-mobile-phone-iphone-x.svg-Xrttg6_7.js +1 -1
  85. package/dist/browser/chunks/computer-device-mobile-tablet-touch.svg-DQ2oTvOG.js +1 -1
  86. package/dist/browser/chunks/computer-device-mobile-tablet.svg-DCr0XlRc.js +1 -1
  87. package/dist/browser/chunks/computer-device-network-ethernet-cat6.svg-AK9l0iOl.js +1 -1
  88. package/dist/browser/chunks/computer-device-network-lan-www.svg-gUIdFBlE.js +1 -1
  89. package/dist/browser/chunks/computer-device-network-wifi-connection.svg-Be-EMm4e.js +1 -1
  90. package/dist/browser/chunks/computer-device-network-wifi-router.svg-Dc2VzyqK.js +1 -1
  91. package/dist/browser/chunks/ecology-science-erlenmeyer-flask.svg-DHgy7Jfd.js +1 -1
  92. package/dist/browser/chunks/image-flash-lightning.svg-EETR_y1q.js +1 -1
  93. package/dist/browser/chunks/image-picture-flower.svg-DN1AYzJU.js +1 -1
  94. package/dist/browser/chunks/interface-alert-exclamation-diamond.svg-C5NozMV_.js +1 -1
  95. package/dist/browser/chunks/interface-alert-exclamation-triangle-warning.svg-DaAg2fF5.js +1 -1
  96. package/dist/browser/chunks/interface-alert-information-circle.svg-ckkkt9Mv.js +1 -1
  97. package/dist/browser/chunks/interface-award-crown.svg-pjvn9hY-.js +1 -1
  98. package/dist/browser/chunks/interface-bookmark-tag.svg-r2r-lQq4.js +1 -1
  99. package/dist/browser/chunks/interface-bookmark.svg-BK9HKQBT.js +1 -1
  100. package/dist/browser/chunks/interface-calendar-date-one.svg-DNnF0M1I.js +1 -1
  101. package/dist/browser/chunks/interface-content-book-open-pages.svg-CQj_w9Vp.js +1 -1
  102. package/dist/browser/chunks/interface-content-book-page.svg-DppoeJRe.js +1 -1
  103. package/dist/browser/chunks/interface-content-file.svg-CvcD7OiY.js +1 -1
  104. package/dist/browser/chunks/interface-content-folder.svg-BmtS5I9A.js +1 -1
  105. package/dist/browser/chunks/interface-copy-clipboard.svg-Be6EI50X.js +1 -1
  106. package/dist/browser/chunks/interface-edit-attachment.svg-G5TKzpWX.js +1 -1
  107. package/dist/browser/chunks/interface-edit-binocular.svg-jzL-DvGB.js +1 -1
  108. package/dist/browser/chunks/interface-edit-magic-wand.svg-BOTlymvp.js +1 -1
  109. package/dist/browser/chunks/interface-edit-tool-paint-roller.svg-s9dwryx7.js +1 -1
  110. package/dist/browser/chunks/interface-edit-tool-pencil.svg-C7v0dbB3.js +1 -1
  111. package/dist/browser/chunks/interface-favorite-award.svg-CYHUgUG0.js +1 -1
  112. package/dist/browser/chunks/interface-favorite-flag.svg-C10zlKOb.js +1 -1
  113. package/dist/browser/chunks/interface-favorite-heart.svg-eoduXxlz.js +1 -1
  114. package/dist/browser/chunks/interface-favorite-star.svg-BSmxJetr.js +1 -1
  115. package/dist/browser/chunks/interface-favorite-stars-sparkles.svg-JTFLj3Ls.js +1 -1
  116. package/dist/browser/chunks/interface-hierarchy-flowchart.svg-Cg_Wy0kN.js +1 -1
  117. package/dist/browser/chunks/interface-home-house.svg-DytoGRnv.js +1 -1
  118. package/dist/browser/chunks/interface-hyperlink.svg-CuEfmmQI.js +1 -1
  119. package/dist/browser/chunks/interface-lighting-brightness.svg-DSK0h_Pa.js +1 -1
  120. package/dist/browser/chunks/interface-lock-closed.svg-Cn6TaLYv.js +1 -1
  121. package/dist/browser/chunks/interface-lock-open-unlock.svg-CVkG5-9W.js +1 -1
  122. package/dist/browser/chunks/interface-login-key.svg-y-cwwXjN.js +1 -1
  123. package/dist/browser/chunks/interface-search.svg-S-puVFJB.js +1 -1
  124. package/dist/browser/chunks/interface-setting-cog.svg-CTH4_lLg.js +1 -1
  125. package/dist/browser/chunks/interface-share-megaphone-bullhorn.svg-Pbp39MyC.js +1 -1
  126. package/dist/browser/chunks/interface-share-rocket.svg-BgCsIRZO.js +1 -1
  127. package/dist/browser/chunks/interface-share-satellite.svg-DAMN9d5G.js +1 -1
  128. package/dist/browser/chunks/interface-share-space-ship.svg-Dt-Mejxk.js +1 -1
  129. package/dist/browser/chunks/interface-share.svg-vFYTXSti.js +1 -1
  130. package/dist/browser/chunks/interface-signal-square.svg-DNG4LpAe.js +1 -1
  131. package/dist/browser/chunks/interface-time-clock-circle.svg-Bpz-nLxo.js +1 -1
  132. package/dist/browser/chunks/interface-time-hour-glass.svg-D7agfKsH.js +1 -1
  133. package/dist/browser/chunks/interface-users-multiple.svg-CkPJBBnG.js +1 -1
  134. package/dist/browser/chunks/interface-weather-moon.svg-CaTZFMPO.js +1 -1
  135. package/dist/browser/chunks/mail-chat-bubble-square.svg-DC8RIihp.js +1 -1
  136. package/dist/browser/chunks/mail-send-email-paper-airplane.svg-D8OLs9jz.js +1 -1
  137. package/dist/browser/chunks/mail-send-envelope.svg-CV33h5Sx.js +1 -1
  138. package/dist/browser/chunks/{modal-CZI71Aau.js → modal-BLBi4S4R.js} +20 -20
  139. package/dist/browser/chunks/{modal-CKthJJWy.js → modal-BlpWsFBT.js} +2 -2
  140. package/dist/browser/chunks/money-cashier-receipt.svg-CJL8C2gs.js +1 -1
  141. package/dist/browser/chunks/money-currency-dollar-pay.svg-VdBplCTx.js +1 -1
  142. package/dist/browser/chunks/money-graph-arrow-increase.svg-DcRov3zk.js +1 -1
  143. package/dist/browser/chunks/money-graph-bar-chart-increase.svg-Cc7KxjX-.js +1 -1
  144. package/dist/browser/chunks/nature-ecology-leaf.svg-DR3cTZxt.js +1 -1
  145. package/dist/browser/chunks/phone-telephone.svg-DyY0gUlk.js +1 -1
  146. package/dist/browser/chunks/programming-bug.svg-BHLT-Qhp.js +1 -1
  147. package/dist/browser/chunks/programming-cloud.svg-B6YW33ba.js +1 -1
  148. package/dist/browser/chunks/programming-computer-database-server.svg-B6o5Sdn-.js +1 -1
  149. package/dist/browser/chunks/programming-computer-database.svg-Cl7OVtpJ.js +1 -1
  150. package/dist/browser/chunks/programming-module-four-layout.svg-BQrerL1x.js +1 -1
  151. package/dist/browser/chunks/programming-module-three.svg-B2KTQzBM.js +1 -1
  152. package/dist/browser/chunks/programming-module.svg-CiID7kPm.js +1 -1
  153. package/dist/browser/chunks/programming-script-code.svg-D1M5rtkN.js +1 -1
  154. package/dist/browser/chunks/runtime-core.esm-bundler-Byrbbu5Q.js +1 -1
  155. package/dist/browser/chunks/shopping-cart.svg-BEegiIR9.js +1 -1
  156. package/dist/browser/chunks/shopping-gift-present.svg-BUHwuLix.js +1 -1
  157. package/dist/browser/chunks/shopping-shipping-box-parcel-package.svg-D6fxWdYx.js +1 -1
  158. package/dist/browser/chunks/tag-new-circle.svg-jsg1bGs0.js +1 -1
  159. package/dist/browser/chunks/travel-map-earth-globe.svg-ClbMiU-f.js +1 -1
  160. package/dist/browser/chunks/vendor-DHN5fsxL.js +306 -0
  161. package/dist/browser/standalone.esm.js +20 -20
  162. package/dist/browser/standalone.js +293 -293
  163. package/dist/components/AgentScalar/AgentScalarButton.vue.d.ts.map +1 -1
  164. package/dist/components/AgentScalar/AgentScalarButton.vue.js.map +1 -1
  165. package/dist/components/AgentScalar/AgentScalarButton.vue.script.js +4 -2
  166. package/dist/components/AgentScalar/AgentScalarButton.vue.script.js.map +1 -1
  167. package/dist/components/AgentScalar/AgentScalarDrawer.vue.d.ts.map +1 -1
  168. package/dist/components/AgentScalar/AgentScalarDrawer.vue.js +1 -1
  169. package/dist/components/AgentScalar/AgentScalarDrawer.vue.js.map +1 -1
  170. package/dist/components/AgentScalar/AgentScalarDrawer.vue.script.js +4 -2
  171. package/dist/components/AgentScalar/AgentScalarDrawer.vue.script.js.map +1 -1
  172. package/dist/components/AgentScalar/OpenMCPButton.vue.d.ts.map +1 -1
  173. package/dist/components/AgentScalar/OpenMCPButton.vue.js +1 -1
  174. package/dist/components/AgentScalar/OpenMCPButton.vue.js.map +1 -1
  175. package/dist/components/AgentScalar/OpenMCPButton.vue.script.js +8 -6
  176. package/dist/components/AgentScalar/OpenMCPButton.vue.script.js.map +1 -1
  177. package/dist/components/Anchor/Anchor.vue.d.ts.map +1 -1
  178. package/dist/components/Anchor/Anchor.vue.js.map +1 -1
  179. package/dist/components/Anchor/Anchor.vue.script.js +5 -3
  180. package/dist/components/Anchor/Anchor.vue.script.js.map +1 -1
  181. package/dist/components/Anchor/WithBreadcrumb.vue.d.ts +1 -3
  182. package/dist/components/Anchor/WithBreadcrumb.vue.d.ts.map +1 -1
  183. package/dist/components/Anchor/WithBreadcrumb.vue.js.map +1 -1
  184. package/dist/components/Anchor/WithBreadcrumb.vue.script.js +6 -2
  185. package/dist/components/Anchor/WithBreadcrumb.vue.script.js.map +1 -1
  186. package/dist/components/ApiReference.vue.d.ts.map +1 -1
  187. package/dist/components/ApiReference.vue.js +1 -1
  188. package/dist/components/ApiReference.vue.js.map +1 -1
  189. package/dist/components/ApiReference.vue.script.js +172 -43
  190. package/dist/components/ApiReference.vue.script.js.map +1 -1
  191. package/dist/components/Content/AsyncApi/AsyncApiLabels.vue.d.ts.map +1 -1
  192. package/dist/components/Content/AsyncApi/AsyncApiLabels.vue.js +1 -1
  193. package/dist/components/Content/AsyncApi/AsyncApiLabels.vue.js.map +1 -1
  194. package/dist/components/Content/AsyncApi/AsyncApiLabels.vue.script.js +6 -2
  195. package/dist/components/Content/AsyncApi/AsyncApiLabels.vue.script.js.map +1 -1
  196. package/dist/components/Content/AsyncApi/Message.vue.script.js +1 -1
  197. package/dist/components/Content/Auth/Auth.vue.d.ts.map +1 -1
  198. package/dist/components/Content/Auth/Auth.vue.js.map +1 -1
  199. package/dist/components/Content/Auth/Auth.vue.script.js +5 -2
  200. package/dist/components/Content/Auth/Auth.vue.script.js.map +1 -1
  201. package/dist/components/Content/Content.vue.d.ts +1 -0
  202. package/dist/components/Content/Content.vue.d.ts.map +1 -1
  203. package/dist/components/Content/Content.vue.js.map +1 -1
  204. package/dist/components/Content/Content.vue.script.js +4 -1
  205. package/dist/components/Content/Content.vue.script.js.map +1 -1
  206. package/dist/components/Content/Operations/TraversedEntry.vue.d.ts +3 -1
  207. package/dist/components/Content/Operations/TraversedEntry.vue.d.ts.map +1 -1
  208. package/dist/components/Content/Operations/TraversedEntry.vue.js.map +1 -1
  209. package/dist/components/Content/Operations/TraversedEntry.vue.script.js +9 -0
  210. package/dist/components/Content/Operations/TraversedEntry.vue.script.js.map +1 -1
  211. package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
  212. package/dist/components/Content/Schema/Schema.vue.js +1 -1
  213. package/dist/components/Content/Schema/Schema.vue.js.map +1 -1
  214. package/dist/components/Content/Schema/Schema.vue.script.js +100 -16
  215. package/dist/components/Content/Schema/Schema.vue.script.js.map +1 -1
  216. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
  217. package/dist/components/Content/Schema/SchemaComposition.vue.js.map +1 -1
  218. package/dist/components/Content/Schema/SchemaComposition.vue.script.js +9 -11
  219. package/dist/components/Content/Schema/SchemaComposition.vue.script.js.map +1 -1
  220. package/dist/components/Content/Schema/SchemaEnums.vue.d.ts.map +1 -1
  221. package/dist/components/Content/Schema/SchemaEnums.vue.js +1 -1
  222. package/dist/components/Content/Schema/SchemaEnums.vue.js.map +1 -1
  223. package/dist/components/Content/Schema/SchemaEnums.vue.script.js +4 -2
  224. package/dist/components/Content/Schema/SchemaEnums.vue.script.js.map +1 -1
  225. package/dist/components/Content/Schema/SchemaHeading.vue.d.ts.map +1 -1
  226. package/dist/components/Content/Schema/SchemaHeading.vue.js +1 -1
  227. package/dist/components/Content/Schema/SchemaHeading.vue.js.map +1 -1
  228. package/dist/components/Content/Schema/SchemaHeading.vue.script.js +5 -3
  229. package/dist/components/Content/Schema/SchemaHeading.vue.script.js.map +1 -1
  230. package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.js.map +1 -1
  231. package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.script.js +1 -1
  232. package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.script.js.map +1 -1
  233. package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts.map +1 -1
  234. package/dist/components/Content/Schema/SchemaObjectProperties.vue.js.map +1 -1
  235. package/dist/components/Content/Schema/SchemaObjectProperties.vue.script.js +12 -0
  236. package/dist/components/Content/Schema/SchemaObjectProperties.vue.script.js.map +1 -1
  237. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +3 -1
  238. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  239. package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
  240. package/dist/components/Content/Schema/SchemaProperty.vue.js.map +1 -1
  241. package/dist/components/Content/Schema/SchemaProperty.vue.script.js +41 -9
  242. package/dist/components/Content/Schema/SchemaProperty.vue.script.js.map +1 -1
  243. package/dist/components/Content/Schema/SchemaPropertyDefault.vue.d.ts.map +1 -1
  244. package/dist/components/Content/Schema/SchemaPropertyDefault.vue.js +1 -1
  245. package/dist/components/Content/Schema/SchemaPropertyDefault.vue.js.map +1 -1
  246. package/dist/components/Content/Schema/SchemaPropertyDefault.vue.script.js +8 -5
  247. package/dist/components/Content/Schema/SchemaPropertyDefault.vue.script.js.map +1 -1
  248. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.d.ts.map +1 -1
  249. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js +1 -1
  250. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js.map +1 -1
  251. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.script.js +5 -3
  252. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.script.js.map +1 -1
  253. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts +3 -1
  254. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
  255. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +1 -1
  256. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js.map +1 -1
  257. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.script.js +48 -23
  258. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.script.js.map +1 -1
  259. package/dist/components/Content/Schema/helpers/dynamic-scope.d.ts +27 -0
  260. package/dist/components/Content/Schema/helpers/dynamic-scope.d.ts.map +1 -0
  261. package/dist/components/Content/Schema/helpers/dynamic-scope.js +35 -0
  262. package/dist/components/Content/Schema/helpers/dynamic-scope.js.map +1 -0
  263. package/dist/components/Content/Schema/helpers/get-compositions-to-render.d.ts +10 -0
  264. package/dist/components/Content/Schema/helpers/get-compositions-to-render.d.ts.map +1 -1
  265. package/dist/components/Content/Schema/helpers/get-compositions-to-render.js +11 -2
  266. package/dist/components/Content/Schema/helpers/get-compositions-to-render.js.map +1 -1
  267. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +9 -2
  268. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js.map +1 -1
  269. package/dist/components/Content/Tags/components/ModernLayout.vue.d.ts.map +1 -1
  270. package/dist/components/Content/Tags/components/ModernLayout.vue.js +1 -1
  271. package/dist/components/Content/Tags/components/ModernLayout.vue.js.map +1 -1
  272. package/dist/components/Content/Tags/components/ModernLayout.vue.script.js +3 -1
  273. package/dist/components/Content/Tags/components/ModernLayout.vue.script.js.map +1 -1
  274. package/dist/components/Content/Tags/components/TagSection.vue.d.ts.map +1 -1
  275. package/dist/components/Content/Tags/components/TagSection.vue.js.map +1 -1
  276. package/dist/components/Content/Tags/components/TagSection.vue.script.js +3 -1
  277. package/dist/components/Content/Tags/components/TagSection.vue.script.js.map +1 -1
  278. package/dist/components/GettingStarted.vue.d.ts.map +1 -1
  279. package/dist/components/GettingStarted.vue.js +1 -1
  280. package/dist/components/GettingStarted.vue.js.map +1 -1
  281. package/dist/components/GettingStarted.vue.script.js +58 -21
  282. package/dist/components/GettingStarted.vue.script.js.map +1 -1
  283. package/dist/components/MobileHeader.vue.d.ts.map +1 -1
  284. package/dist/components/MobileHeader.vue.js.map +1 -1
  285. package/dist/components/MobileHeader.vue.script.js +3 -1
  286. package/dist/components/MobileHeader.vue.script.js.map +1 -1
  287. package/dist/components/OperationsList/OperationsList.vue.d.ts.map +1 -1
  288. package/dist/components/OperationsList/OperationsList.vue.js +1 -1
  289. package/dist/components/OperationsList/OperationsList.vue.js.map +1 -1
  290. package/dist/components/OperationsList/OperationsList.vue.script.js +4 -2
  291. package/dist/components/OperationsList/OperationsList.vue.script.js.map +1 -1
  292. package/dist/components/ShowMoreButton.vue.d.ts.map +1 -1
  293. package/dist/components/ShowMoreButton.vue.js +1 -1
  294. package/dist/components/ShowMoreButton.vue.js.map +1 -1
  295. package/dist/components/ShowMoreButton.vue.script.js +4 -2
  296. package/dist/components/ShowMoreButton.vue.script.js.map +1 -1
  297. package/dist/features/Operation/Operation.vue.d.ts +3 -1
  298. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  299. package/dist/features/Operation/Operation.vue.js.map +1 -1
  300. package/dist/features/Operation/Operation.vue.script.js +6 -1
  301. package/dist/features/Operation/Operation.vue.script.js.map +1 -1
  302. package/dist/features/Operation/components/ContentTypeSelect.vue.d.ts.map +1 -1
  303. package/dist/features/Operation/components/ContentTypeSelect.vue.js.map +1 -1
  304. package/dist/features/Operation/components/ContentTypeSelect.vue.script.js +4 -2
  305. package/dist/features/Operation/components/ContentTypeSelect.vue.script.js.map +1 -1
  306. package/dist/features/Operation/components/Headers.vue.d.ts.map +1 -1
  307. package/dist/features/Operation/components/Headers.vue.js +1 -1
  308. package/dist/features/Operation/components/Headers.vue.js.map +1 -1
  309. package/dist/features/Operation/components/Headers.vue.script.js +8 -6
  310. package/dist/features/Operation/components/Headers.vue.script.js.map +1 -1
  311. package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
  312. package/dist/features/Operation/components/OperationParameters.vue.js.map +1 -1
  313. package/dist/features/Operation/components/OperationParameters.vue.script.js +8 -6
  314. package/dist/features/Operation/components/OperationParameters.vue.script.js.map +1 -1
  315. package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
  316. package/dist/features/Operation/components/OperationResponses.vue.js.map +1 -1
  317. package/dist/features/Operation/components/OperationResponses.vue.script.js +10 -7
  318. package/dist/features/Operation/components/OperationResponses.vue.script.js.map +1 -1
  319. package/dist/features/Operation/components/ParameterListItem.vue.script.js +1 -1
  320. package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
  321. package/dist/features/Operation/components/RequestBody.vue.js +1 -1
  322. package/dist/features/Operation/components/RequestBody.vue.js.map +1 -1
  323. package/dist/features/Operation/components/RequestBody.vue.script.js +21 -14
  324. package/dist/features/Operation/components/RequestBody.vue.script.js.map +1 -1
  325. package/dist/features/Operation/components/SecurityRequirementBadge.vue.d.ts.map +1 -1
  326. package/dist/features/Operation/components/SecurityRequirementBadge.vue.js.map +1 -1
  327. package/dist/features/Operation/components/SecurityRequirementBadge.vue.script.js +5 -3
  328. package/dist/features/Operation/components/SecurityRequirementBadge.vue.script.js.map +1 -1
  329. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -1
  330. package/dist/features/Operation/components/callbacks/Callbacks.vue.js.map +1 -1
  331. package/dist/features/Operation/components/callbacks/Callbacks.vue.script.js +11 -8
  332. package/dist/features/Operation/components/callbacks/Callbacks.vue.script.js.map +1 -1
  333. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  334. package/dist/features/Operation/layouts/ClassicLayout.vue.js +1 -1
  335. package/dist/features/Operation/layouts/ClassicLayout.vue.js.map +1 -1
  336. package/dist/features/Operation/layouts/ClassicLayout.vue.script.js +37 -17
  337. package/dist/features/Operation/layouts/ClassicLayout.vue.script.js.map +1 -1
  338. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  339. package/dist/features/Operation/layouts/ModernLayout.vue.js +1 -1
  340. package/dist/features/Operation/layouts/ModernLayout.vue.js.map +1 -1
  341. package/dist/features/Operation/layouts/ModernLayout.vue.script.js +22 -7
  342. package/dist/features/Operation/layouts/ModernLayout.vue.script.js.map +1 -1
  343. package/dist/features/Search/components/SearchButton.vue.d.ts.map +1 -1
  344. package/dist/features/Search/components/SearchButton.vue.js.map +1 -1
  345. package/dist/features/Search/components/SearchButton.vue.script.js +15 -8
  346. package/dist/features/Search/components/SearchButton.vue.script.js.map +1 -1
  347. package/dist/features/Search/components/SearchModal.vue.d.ts.map +1 -1
  348. package/dist/features/Search/components/SearchModal.vue.js +1 -1
  349. package/dist/features/Search/components/SearchModal.vue.js.map +1 -1
  350. package/dist/features/Search/components/SearchModal.vue.script.js +29 -10
  351. package/dist/features/Search/components/SearchModal.vue.script.js.map +1 -1
  352. package/dist/features/Search/components/SearchResult.vue.d.ts.map +1 -1
  353. package/dist/features/Search/components/SearchResult.vue.js.map +1 -1
  354. package/dist/features/Search/components/SearchResult.vue.script.js +12 -8
  355. package/dist/features/Search/components/SearchResult.vue.script.js.map +1 -1
  356. package/dist/features/Search/helpers/create-search-index.d.ts +8 -0
  357. package/dist/features/Search/helpers/create-search-index.d.ts.map +1 -1
  358. package/dist/features/Search/helpers/create-search-index.js +18 -9
  359. package/dist/features/Search/helpers/create-search-index.js.map +1 -1
  360. package/dist/features/Search/hooks/useSearchIndex.d.ts +7 -1
  361. package/dist/features/Search/hooks/useSearchIndex.d.ts.map +1 -1
  362. package/dist/features/Search/hooks/useSearchIndex.js +11 -2
  363. package/dist/features/Search/hooks/useSearchIndex.js.map +1 -1
  364. package/dist/features/ask-agent-button/AskAgentButton.vue.d.ts.map +1 -1
  365. package/dist/features/ask-agent-button/AskAgentButton.vue.js +1 -1
  366. package/dist/features/ask-agent-button/AskAgentButton.vue.js.map +1 -1
  367. package/dist/features/ask-agent-button/AskAgentButton.vue.script.js +10 -6
  368. package/dist/features/ask-agent-button/AskAgentButton.vue.script.js.map +1 -1
  369. package/dist/features/developer-tools/DeveloperTools.vue.d.ts.map +1 -1
  370. package/dist/features/developer-tools/DeveloperTools.vue.js.map +1 -1
  371. package/dist/features/developer-tools/DeveloperTools.vue.script.js +10 -8
  372. package/dist/features/developer-tools/DeveloperTools.vue.script.js.map +1 -1
  373. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.d.ts.map +1 -1
  374. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.js.map +1 -1
  375. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.script.js +11 -11
  376. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.script.js.map +1 -1
  377. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.d.ts.map +1 -1
  378. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.js.map +1 -1
  379. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.script.js +15 -11
  380. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.script.js.map +1 -1
  381. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.script.js +1 -1
  382. package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.d.ts +1 -3
  383. package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.d.ts.map +1 -1
  384. package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.js.map +1 -1
  385. package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.script.js +4 -6
  386. package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.script.js.map +1 -1
  387. package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.d.ts.map +1 -1
  388. package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.js.map +1 -1
  389. package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.script.js +6 -4
  390. package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.script.js.map +1 -1
  391. package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.d.ts.map +1 -1
  392. package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.js.map +1 -1
  393. package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.script.js +23 -22
  394. package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.script.js.map +1 -1
  395. package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.d.ts.map +1 -1
  396. package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.js.map +1 -1
  397. package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.script.js +7 -5
  398. package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.script.js.map +1 -1
  399. package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.d.ts.map +1 -1
  400. package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.js.map +1 -1
  401. package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.script.js +9 -7
  402. package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.script.js.map +1 -1
  403. package/dist/features/developer-tools/components/DeployApiReference.vue.d.ts.map +1 -1
  404. package/dist/features/developer-tools/components/DeployApiReference.vue.js.map +1 -1
  405. package/dist/features/developer-tools/components/DeployApiReference.vue.script.js +7 -4
  406. package/dist/features/developer-tools/components/DeployApiReference.vue.script.js.map +1 -1
  407. package/dist/features/developer-tools/components/ModifyConfiguration.vue.d.ts.map +1 -1
  408. package/dist/features/developer-tools/components/ModifyConfiguration.vue.js.map +1 -1
  409. package/dist/features/developer-tools/components/ModifyConfiguration.vue.script.js +8 -6
  410. package/dist/features/developer-tools/components/ModifyConfiguration.vue.script.js.map +1 -1
  411. package/dist/features/developer-tools/components/ShareApiReference.vue.d.ts.map +1 -1
  412. package/dist/features/developer-tools/components/ShareApiReference.vue.js.map +1 -1
  413. package/dist/features/developer-tools/components/ShareApiReference.vue.script.js +7 -4
  414. package/dist/features/developer-tools/components/ShareApiReference.vue.script.js.map +1 -1
  415. package/dist/features/example-responses/ExampleResponse.vue.d.ts.map +1 -1
  416. package/dist/features/example-responses/ExampleResponse.vue.js +1 -1
  417. package/dist/features/example-responses/ExampleResponse.vue.js.map +1 -1
  418. package/dist/features/example-responses/ExampleResponse.vue.script.js +5 -3
  419. package/dist/features/example-responses/ExampleResponse.vue.script.js.map +1 -1
  420. package/dist/features/example-responses/ExampleResponses.vue.d.ts +9 -0
  421. package/dist/features/example-responses/ExampleResponses.vue.d.ts.map +1 -1
  422. package/dist/features/example-responses/ExampleResponses.vue.js +1 -1
  423. package/dist/features/example-responses/ExampleResponses.vue.js.map +1 -1
  424. package/dist/features/example-responses/ExampleResponses.vue.script.js +42 -23
  425. package/dist/features/example-responses/ExampleResponses.vue.script.js.map +1 -1
  426. package/dist/features/example-responses/ExampleSchema.vue.js.map +1 -1
  427. package/dist/features/example-responses/ExampleSchema.vue.script.js +1 -1
  428. package/dist/features/example-responses/ExampleSchema.vue.script.js.map +1 -1
  429. package/dist/features/info-object/Contact.vue.d.ts.map +1 -1
  430. package/dist/features/info-object/Contact.vue.js.map +1 -1
  431. package/dist/features/info-object/Contact.vue.script.js +14 -11
  432. package/dist/features/info-object/Contact.vue.script.js.map +1 -1
  433. package/dist/features/info-object/InfoLink.vue.d.ts +8 -0
  434. package/dist/features/info-object/InfoLink.vue.d.ts.map +1 -0
  435. package/dist/features/info-object/InfoLink.vue.js +7 -0
  436. package/dist/features/info-object/InfoLink.vue.js.map +1 -0
  437. package/dist/features/info-object/InfoLink.vue.script.js +30 -0
  438. package/dist/features/info-object/InfoLink.vue.script.js.map +1 -0
  439. package/dist/features/info-object/TermsOfService.vue.d.ts.map +1 -1
  440. package/dist/features/info-object/TermsOfService.vue.js.map +1 -1
  441. package/dist/features/info-object/TermsOfService.vue.script.js +9 -6
  442. package/dist/features/info-object/TermsOfService.vue.script.js.map +1 -1
  443. package/dist/features/info-object/index.d.ts +1 -0
  444. package/dist/features/info-object/index.d.ts.map +1 -1
  445. package/dist/features/localization/index.d.ts +2 -0
  446. package/dist/features/localization/index.d.ts.map +1 -0
  447. package/dist/features/localization/locales/ar.d.ts +227 -0
  448. package/dist/features/localization/locales/ar.d.ts.map +1 -0
  449. package/dist/features/localization/locales/ar.js +225 -0
  450. package/dist/features/localization/locales/ar.js.map +1 -0
  451. package/dist/features/localization/locales/de.d.ts +227 -0
  452. package/dist/features/localization/locales/de.d.ts.map +1 -0
  453. package/dist/features/localization/locales/de.js +225 -0
  454. package/dist/features/localization/locales/de.js.map +1 -0
  455. package/dist/features/localization/locales/en.d.ts +227 -0
  456. package/dist/features/localization/locales/en.d.ts.map +1 -0
  457. package/dist/features/localization/locales/en.js +225 -0
  458. package/dist/features/localization/locales/en.js.map +1 -0
  459. package/dist/features/localization/locales/es.d.ts +227 -0
  460. package/dist/features/localization/locales/es.d.ts.map +1 -0
  461. package/dist/features/localization/locales/es.js +225 -0
  462. package/dist/features/localization/locales/es.js.map +1 -0
  463. package/dist/features/localization/locales/fr.d.ts +227 -0
  464. package/dist/features/localization/locales/fr.d.ts.map +1 -0
  465. package/dist/features/localization/locales/fr.js +225 -0
  466. package/dist/features/localization/locales/fr.js.map +1 -0
  467. package/dist/features/localization/locales/ru.d.ts +227 -0
  468. package/dist/features/localization/locales/ru.d.ts.map +1 -0
  469. package/dist/features/localization/locales/ru.js +225 -0
  470. package/dist/features/localization/locales/ru.js.map +1 -0
  471. package/dist/features/localization/locales/zh-cn.d.ts +227 -0
  472. package/dist/features/localization/locales/zh-cn.d.ts.map +1 -0
  473. package/dist/features/localization/locales/zh-cn.js +225 -0
  474. package/dist/features/localization/locales/zh-cn.js.map +1 -0
  475. package/dist/features/localization/translations.d.ts +1588 -0
  476. package/dist/features/localization/translations.d.ts.map +1 -0
  477. package/dist/features/localization/translations.js +27 -0
  478. package/dist/features/localization/translations.js.map +1 -0
  479. package/dist/features/localization/use-localization.d.ts +18 -0
  480. package/dist/features/localization/use-localization.d.ts.map +1 -0
  481. package/dist/features/localization/use-localization.js +58 -0
  482. package/dist/features/localization/use-localization.js.map +1 -0
  483. package/dist/features/multiple-documents/DocumentSelector.vue.script.js +1 -1
  484. package/dist/features/test-request-button/TestRequestButton.vue.d.ts.map +1 -1
  485. package/dist/features/test-request-button/TestRequestButton.vue.js +1 -1
  486. package/dist/features/test-request-button/TestRequestButton.vue.js.map +1 -1
  487. package/dist/features/test-request-button/TestRequestButton.vue.script.js +3 -1
  488. package/dist/features/test-request-button/TestRequestButton.vue.script.js.map +1 -1
  489. package/dist/helpers/is-introduction-entry.d.ts +16 -0
  490. package/dist/helpers/is-introduction-entry.d.ts.map +1 -0
  491. package/dist/helpers/is-introduction-entry.js +17 -0
  492. package/dist/helpers/is-introduction-entry.js.map +1 -0
  493. package/dist/helpers/load-from-perssistance.js +1 -1
  494. package/dist/helpers/load-from-perssistance.js.map +1 -1
  495. package/dist/helpers/map-config-to-workspace-store.js +1 -1
  496. package/dist/helpers/map-config-to-workspace-store.js.map +1 -1
  497. package/dist/helpers/storage.d.ts +14 -14
  498. package/dist/style.css +446 -434
  499. package/dist/styles/tailwind.config.css +1 -0
  500. package/dist/vue-styles.css +383 -380
  501. package/package.json +17 -16
  502. package/dist/browser/chunks/AgentScalarChatInterface-BhUn0w1j.js +0 -27
  503. package/dist/browser/chunks/ScalarTextInput.vue-BUzf4Z_k.js +0 -27
  504. package/dist/browser/chunks/vendor-BeJNu9KM.js +0 -306
  505. package/dist/features/Operation/helpers/get-first-server.d.ts +0 -9
  506. package/dist/features/Operation/helpers/get-first-server.d.ts.map +0 -1
  507. package/dist/features/Operation/helpers/get-first-server.js +0 -27
  508. package/dist/features/Operation/helpers/get-first-server.js.map +0 -1
@@ -1,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":"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"}
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":"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"}
@@ -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,6BAA6B,CAAA;AACnG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAClE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAEnG,OAAO,EAAE,KAAK,gBAAgB,EAA0B,MAAM,KAAK,CAAA;AAInE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAIxC;;GAEG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,gBAAgB,CAAC,eAAe,GAAG,gBAAgB,GAAG,SAAS,CAAC,EAC1E,kBAAkB,GAAE,gBAAgB,CAAC,kBAAkB,GAAG,SAAS,CAAgC;;;;;;EAsCpG"}
1
+ {"version":3,"file":"useSearchIndex.d.ts","sourceRoot":"","sources":["../../../../src/features/Search/hooks/useSearchIndex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgC,KAAK,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AACnG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAClE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAEnG,OAAO,EAAE,KAAK,gBAAgB,EAA0B,MAAM,KAAK,CAAA;AAInE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAIxC;;GAEG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,gBAAgB,CAAC,eAAe,GAAG,gBAAgB,GAAG,SAAS,CAAC,EAC1E,kBAAkB,GAAE,gBAAgB,CAAC,kBAAkB,GAAG,SAAS,CAAgC,EACnG,MAAM,GAAE,gBAAgB,CAAC;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,CAMA;;;;;;EAuCF"}
@@ -7,8 +7,17 @@ var MAX_SEARCH_RESULTS = 25;
7
7
  /**
8
8
  * Creates the search index from an OpenAPI or AsyncAPI document.
9
9
  */
10
- function useSearchIndex(document, modelsSectionLabel = DEFAULT_MODELS_SECTION_LABEL) {
11
- const searchIndex = computed(() => createSearchIndex(toValue(document), { modelsSectionLabel: toValue(modelsSectionLabel) ?? DEFAULT_MODELS_SECTION_LABEL }));
10
+ function useSearchIndex(document, modelsSectionLabel = DEFAULT_MODELS_SECTION_LABEL, labels = {
11
+ heading: "Heading",
12
+ tagGroup: "Tag Group",
13
+ webhook: "Webhook",
14
+ webhooks: "Webhooks",
15
+ introduction: "Introduction"
16
+ }) {
17
+ const searchIndex = computed(() => createSearchIndex(toValue(document), {
18
+ labels: toValue(labels),
19
+ modelsSectionLabel: toValue(modelsSectionLabel) ?? DEFAULT_MODELS_SECTION_LABEL
20
+ }));
12
21
  /** When the document changes we replace the search index */
13
22
  const fuse = computed(() => {
14
23
  const instance = createFuseInstance();
@@ -1 +1 @@
1
- {"version":3,"file":"useSearchIndex.js","names":[],"sources":["../../../../src/features/Search/hooks/useSearchIndex.ts"],"sourcesContent":["import { DEFAULT_MODELS_SECTION_LABEL, type ModelsSectionLabel } from '@scalar/types/api-reference'\nimport type { AsyncApiDocument } from '@scalar/types/asyncapi/3.1'\nimport type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport type { FuseResult } from 'fuse.js'\nimport { type MaybeRefOrGetter, computed, ref, toValue } from 'vue'\n\nimport { createFuseInstance } from '../helpers/create-fuse-instance'\nimport { createSearchIndex } from '../helpers/create-search-index'\nimport type { FuseData } from '../types'\n\nconst MAX_SEARCH_RESULTS = 25\n\n/**\n * Creates the search index from an OpenAPI or AsyncAPI document.\n */\nexport function useSearchIndex(\n document: MaybeRefOrGetter<OpenApiDocument | AsyncApiDocument | undefined>,\n modelsSectionLabel: MaybeRefOrGetter<ModelsSectionLabel | undefined> = DEFAULT_MODELS_SECTION_LABEL,\n) {\n const searchIndex = computed<FuseData[]>(() =>\n createSearchIndex(toValue(document), {\n modelsSectionLabel: toValue(modelsSectionLabel) ?? DEFAULT_MODELS_SECTION_LABEL,\n }),\n )\n\n /** When the document changes we replace the search index */\n const fuse = computed(() => {\n const instance = createFuseInstance()\n instance.setCollection(searchIndex.value)\n return instance\n })\n\n const query = ref<string>('')\n\n const results = computed(() => {\n if (query.value.length !== 0) {\n return fuse.value.search(query.value, {\n limit: MAX_SEARCH_RESULTS,\n })\n }\n\n // Show a few entries as a placeholder\n return searchIndex.value.slice(0, MAX_SEARCH_RESULTS).map(\n (item: FuseData, index: number) =>\n ({\n item,\n refIndex: index,\n }) satisfies FuseResult<FuseData>,\n )\n })\n\n return {\n results,\n query,\n }\n}\n"],"mappings":";;;;;AAUA,IAAM,qBAAqB;;;;AAK3B,SAAgB,eACd,UACA,qBAAuE,8BACvE;CACA,MAAM,cAAc,eAClB,kBAAkB,QAAQ,SAAS,EAAE,EACnC,oBAAoB,QAAQ,mBAAmB,IAAI,8BACpD,CAAC,CACH;;CAGD,MAAM,OAAO,eAAe;EAC1B,MAAM,WAAW,oBAAoB;AACrC,WAAS,cAAc,YAAY,MAAM;AACzC,SAAO;GACP;CAEF,MAAM,QAAQ,IAAY,GAAG;AAmB7B,QAAO;EACL,SAlBc,eAAe;AAC7B,OAAI,MAAM,MAAM,WAAW,EACzB,QAAO,KAAK,MAAM,OAAO,MAAM,OAAO,EACpC,OAAO,oBACR,CAAC;AAIJ,UAAO,YAAY,MAAM,MAAM,GAAG,mBAAmB,CAAC,KACnD,MAAgB,WACd;IACC;IACA,UAAU;IACX,EACJ;IACD;EAIA;EACD"}
1
+ {"version":3,"file":"useSearchIndex.js","names":[],"sources":["../../../../src/features/Search/hooks/useSearchIndex.ts"],"sourcesContent":["import { DEFAULT_MODELS_SECTION_LABEL, type ModelsSectionLabel } from '@scalar/types/api-reference'\nimport type { AsyncApiDocument } from '@scalar/types/asyncapi/3.1'\nimport type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport type { FuseResult } from 'fuse.js'\nimport { type MaybeRefOrGetter, computed, ref, toValue } from 'vue'\n\nimport { createFuseInstance } from '../helpers/create-fuse-instance'\nimport { createSearchIndex } from '../helpers/create-search-index'\nimport type { FuseData } from '../types'\n\nconst MAX_SEARCH_RESULTS = 25\n\n/**\n * Creates the search index from an OpenAPI or AsyncAPI document.\n */\nexport function useSearchIndex(\n document: MaybeRefOrGetter<OpenApiDocument | AsyncApiDocument | undefined>,\n modelsSectionLabel: MaybeRefOrGetter<ModelsSectionLabel | undefined> = DEFAULT_MODELS_SECTION_LABEL,\n labels: MaybeRefOrGetter<{\n heading: string\n tagGroup: string\n webhook: string\n webhooks: string\n introduction: string\n }> = {\n heading: 'Heading',\n tagGroup: 'Tag Group',\n webhook: 'Webhook',\n webhooks: 'Webhooks',\n introduction: 'Introduction',\n },\n) {\n const searchIndex = computed<FuseData[]>(() =>\n createSearchIndex(toValue(document), {\n labels: toValue(labels),\n modelsSectionLabel: toValue(modelsSectionLabel) ?? DEFAULT_MODELS_SECTION_LABEL,\n }),\n )\n\n /** When the document changes we replace the search index */\n const fuse = computed(() => {\n const instance = createFuseInstance()\n instance.setCollection(searchIndex.value)\n return instance\n })\n\n const query = ref<string>('')\n\n const results = computed(() => {\n if (query.value.length !== 0) {\n return fuse.value.search(query.value, {\n limit: MAX_SEARCH_RESULTS,\n })\n }\n\n // Show a few entries as a placeholder\n return searchIndex.value.slice(0, MAX_SEARCH_RESULTS).map(\n (item: FuseData, index: number) =>\n ({\n item,\n refIndex: index,\n }) satisfies FuseResult<FuseData>,\n )\n })\n\n return {\n results,\n query,\n }\n}\n"],"mappings":";;;;;AAUA,IAAM,qBAAqB;;;;AAK3B,SAAgB,eACd,UACA,qBAAuE,8BACvE,SAMK;CACH,SAAS;CACT,UAAU;CACV,SAAS;CACT,UAAU;CACV,cAAc;CACf,EACD;CACA,MAAM,cAAc,eAClB,kBAAkB,QAAQ,SAAS,EAAE;EACnC,QAAQ,QAAQ,OAAO;EACvB,oBAAoB,QAAQ,mBAAmB,IAAI;EACpD,CAAC,CACH;;CAGD,MAAM,OAAO,eAAe;EAC1B,MAAM,WAAW,oBAAoB;AACrC,WAAS,cAAc,YAAY,MAAM;AACzC,SAAO;GACP;CAEF,MAAM,QAAQ,IAAY,GAAG;AAmB7B,QAAO;EACL,SAlBc,eAAe;AAC7B,OAAI,MAAM,MAAM,WAAW,EACzB,QAAO,KAAK,MAAM,OAAO,MAAM,OAAO,EACpC,OAAO,oBACR,CAAC;AAIJ,UAAO,YAAY,MAAM,MAAM,GAAG,mBAAmB,CAAC,KACnD,MAAgB,WACd;IACC;IACA,UAAU;IACX,EACJ;IACD;EAIA;EACD"}
@@ -1 +1 @@
1
- {"version":3,"file":"AskAgentButton.vue.d.ts","sourceRoot":"","sources":["../../../src/features/ask-agent-button/AskAgentButton.vue"],"names":[],"mappings":"AAoQA,QAAA,MAAM,YAAY,+QAChB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"AskAgentButton.vue.d.ts","sourceRoot":"","sources":["../../../src/features/ask-agent-button/AskAgentButton.vue"],"names":[],"mappings":"AA4QA,QAAA,MAAM,YAAY,+QAChB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -2,7 +2,7 @@ import _plugin_vue_export_helper_default from "../../_virtual/_plugin-vue_export
2
2
  import AskAgentButton_vue_vue_type_script_setup_true_lang_default from "./AskAgentButton.vue.script.js";
3
3
  /* empty css */
4
4
  //#region src/features/ask-agent-button/AskAgentButton.vue
5
- var AskAgentButton_default = /* @__PURE__ */ _plugin_vue_export_helper_default(AskAgentButton_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-78f5377c"]]);
5
+ var AskAgentButton_default = /* @__PURE__ */ _plugin_vue_export_helper_default(AskAgentButton_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-10a4fb90"]]);
6
6
  //#endregion
7
7
  export { AskAgentButton_default as default };
8
8
 
@@ -1 +1 @@
1
- {"version":3,"file":"AskAgentButton.vue.js","names":[],"sources":["../../../src/features/ask-agent-button/AskAgentButton.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarIconArrowUp, ScalarIconSparkle } from '@scalar/icons'\nimport { ref } from 'vue'\n\nimport { useAgentContext } from '@/hooks/use-agent'\n\nconst agentContext = useAgentContext()\n\nconst message = ref('')\nconst inputRef = ref<HTMLInputElement>()\n\nfunction handleSubmit() {\n agentContext.value?.openAgent(message.value)\n message.value = ''\n}\n</script>\n<template>\n <form\n v-if=\"agentContext?.agentEnabled.value\"\n class=\"agent-button-container\"\n @click=\"inputRef?.focus()\"\n @submit.prevent=\"handleSubmit()\">\n <ScalarIconSparkle\n class=\"size-3 shrink-0\"\n weight=\"fill\" />\n <div class=\"ask-agent-scalar-input-label\">Ask AI Agent</div>\n <input\n ref=\"inputRef\"\n v-model=\"message\"\n class=\"ask-agent-scalar-input\"\n :class=\"{ 'ask-agent-scalar-input-not-empty': message.length > 0 }\"\n placeholder=\"Ask AI Agent\" />\n <button\n class=\"ask-agent-scalar-send\"\n type=\"submit\">\n <ScalarIconArrowUp\n class=\"size-3\"\n weight=\"bold\" />\n </button>\n </form>\n</template>\n<style scoped>\n/** Container */\n.agent-button-container {\n position: relative;\n color: var(--scalar-color-1);\n background: color-mix(in srgb, var(--scalar-background-3), white 15%);\n display: flex;\n align-items: center;\n cursor: pointer;\n padding: 1px 6px;\n margin-right: 4px;\n border-radius: var(--scalar-radius);\n z-index: 2;\n height: 100%;\n}\n.agent-button-container:hover:not(:focus-within) {\n background: color-mix(in srgb, var(--scalar-background-3), white 20%);\n}\n.agent-button-container:has(.ask-agent-scalar-input-not-empty),\n.agent-button-container:focus-within {\n position: absolute;\n inset: 2px;\n border-radius: var(--scalar-radius-lg);\n margin-right: 0;\n height: auto;\n}\n.agent-button-container:has(.ask-agent-scalar-input:focus-visible) {\n outline-style: solid;\n}\n/** Input */\n.ask-agent-scalar-input {\n width: 0px;\n opacity: 0;\n font-size: 0px;\n border: none;\n}\n.agent-button-container:has(.ask-agent-scalar-input-not-empty)\n .ask-agent-scalar-input,\n.agent-button-container:focus-within .ask-agent-scalar-input {\n width: 100%;\n font-size: inherit;\n opacity: 1;\n line-height: 20px;\n outline: none;\n padding-inline: 4px;\n}\n.ask-agent-scalar-input::placeholder {\n color: var(--scalar-color-2);\n font-family: inherit;\n}\n/** Input label */\n.ask-agent-scalar-input-label {\n /** Shown by default */\n color: var(--scalar-color-1);\n font-weight: var(--scalar-semibold);\n margin-left: 4px;\n}\n.agent-button-container:has(.ask-agent-scalar-input-not-empty)\n .ask-agent-scalar-input-label,\n.agent-button-container:focus-within .ask-agent-scalar-input-label {\n /** Hidden when input is focused */\n display: none;\n}\n/** Send button */\n.ask-agent-scalar-send {\n background: var(--scalar-color-blue);\n color: #fff;\n width: 24px;\n height: 24px;\n flex-shrink: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: var(--scalar-radius);\n outline-offset: 1px;\n /* Hidden by default */\n display: none;\n}\n.agent-button-container:has(.ask-agent-scalar-input-not-empty)\n .ask-agent-scalar-send {\n /** Show when input is not empty */\n display: flex;\n}\n.ask-agent-scalar-send:hover {\n background: color-mix(in srgb, var(--scalar-color-blue), transparent 10%);\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"AskAgentButton.vue.js","names":[],"sources":["../../../src/features/ask-agent-button/AskAgentButton.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarIconArrowUp, ScalarIconSparkle } from '@scalar/icons'\nimport { ref } from 'vue'\n\nimport { useLocalization } from '@/features/localization'\nimport { useAgentContext } from '@/hooks/use-agent'\n\nconst agentContext = useAgentContext()\nconst { translate } = useLocalization()\n\nconst message = ref('')\nconst inputRef = ref<HTMLInputElement>()\n\nfunction handleSubmit() {\n agentContext.value?.openAgent(message.value)\n message.value = ''\n}\n</script>\n<template>\n <form\n v-if=\"agentContext?.agentEnabled.value\"\n class=\"agent-button-container\"\n @click=\"inputRef?.focus()\"\n @submit.prevent=\"handleSubmit()\">\n <ScalarIconSparkle\n class=\"size-3 shrink-0\"\n weight=\"fill\" />\n <div class=\"ask-agent-scalar-input-label\">\n {{ translate('agent.askAiAgent') }}\n </div>\n <input\n ref=\"inputRef\"\n v-model=\"message\"\n class=\"ask-agent-scalar-input\"\n :class=\"{ 'ask-agent-scalar-input-not-empty': message.length > 0 }\"\n :placeholder=\"translate('agent.askAiAgent')\" />\n <button\n class=\"ask-agent-scalar-send\"\n type=\"submit\">\n <ScalarIconArrowUp\n class=\"size-3\"\n weight=\"bold\" />\n </button>\n </form>\n</template>\n<style scoped>\n/** Container */\n.agent-button-container {\n position: relative;\n color: var(--scalar-color-1);\n background: color-mix(in srgb, var(--scalar-background-3), white 15%);\n display: flex;\n align-items: center;\n cursor: pointer;\n padding: 1px 6px;\n margin-right: 4px;\n border-radius: var(--scalar-radius);\n z-index: 2;\n height: 100%;\n}\n.agent-button-container:hover:not(:focus-within) {\n background: color-mix(in srgb, var(--scalar-background-3), white 20%);\n}\n.agent-button-container:has(.ask-agent-scalar-input-not-empty),\n.agent-button-container:focus-within {\n position: absolute;\n inset: 2px;\n border-radius: var(--scalar-radius-lg);\n margin-right: 0;\n height: auto;\n}\n.agent-button-container:has(.ask-agent-scalar-input:focus-visible) {\n outline-style: solid;\n}\n/** Input */\n.ask-agent-scalar-input {\n width: 0px;\n opacity: 0;\n font-size: 0px;\n border: none;\n}\n.agent-button-container:has(.ask-agent-scalar-input-not-empty)\n .ask-agent-scalar-input,\n.agent-button-container:focus-within .ask-agent-scalar-input {\n width: 100%;\n font-size: inherit;\n opacity: 1;\n line-height: 20px;\n outline: none;\n padding-inline: 4px;\n}\n.ask-agent-scalar-input::placeholder {\n color: var(--scalar-color-2);\n font-family: inherit;\n}\n/** Input label */\n.ask-agent-scalar-input-label {\n /** Shown by default */\n color: var(--scalar-color-1);\n font-weight: var(--scalar-semibold);\n margin-left: 4px;\n}\n.agent-button-container:has(.ask-agent-scalar-input-not-empty)\n .ask-agent-scalar-input-label,\n.agent-button-container:focus-within .ask-agent-scalar-input-label {\n /** Hidden when input is focused */\n display: none;\n}\n/** Send button */\n.ask-agent-scalar-send {\n background: var(--scalar-color-blue);\n color: #fff;\n width: 24px;\n height: 24px;\n flex-shrink: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: var(--scalar-radius);\n outline-offset: 1px;\n /* Hidden by default */\n display: none;\n}\n.agent-button-container:has(.ask-agent-scalar-input-not-empty)\n .ask-agent-scalar-send {\n /** Show when input is not empty */\n display: flex;\n}\n.ask-agent-scalar-send:hover {\n background: color-mix(in srgb, var(--scalar-color-blue), transparent 10%);\n}\n</style>\n"],"mappings":""}
@@ -1,8 +1,11 @@
1
+ import { useLocalization } from "../localization/use-localization.js";
1
2
  import { useAgentContext } from "../../hooks/use-agent.js";
2
- import { createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, normalizeClass, openBlock, ref, unref, vModelText, withDirectives, withModifiers } from "vue";
3
+ import { createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, normalizeClass, openBlock, ref, toDisplayString, unref, vModelText, withDirectives, withModifiers } from "vue";
3
4
  import { ScalarIconArrowUp, ScalarIconSparkle } from "@scalar/icons";
4
5
  //#region src/features/ask-agent-button/AskAgentButton.vue?vue&type=script&setup=true&lang.ts
5
- var _hoisted_1 = {
6
+ var _hoisted_1 = { class: "ask-agent-scalar-input-label" };
7
+ var _hoisted_2 = ["placeholder"];
8
+ var _hoisted_3 = {
6
9
  class: "ask-agent-scalar-send",
7
10
  type: "submit"
8
11
  };
@@ -10,6 +13,7 @@ var AskAgentButton_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
10
13
  __name: "AskAgentButton",
11
14
  setup(__props) {
12
15
  const agentContext = useAgentContext();
16
+ const { translate } = useLocalization();
13
17
  const message = ref("");
14
18
  const inputRef = ref();
15
19
  function handleSubmit() {
@@ -27,15 +31,15 @@ var AskAgentButton_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
27
31
  class: "size-3 shrink-0",
28
32
  weight: "fill"
29
33
  }),
30
- _cache[3] || (_cache[3] = createElementVNode("div", { class: "ask-agent-scalar-input-label" }, "Ask AI Agent", -1)),
34
+ createElementVNode("div", _hoisted_1, toDisplayString(unref(translate)("agent.askAiAgent")), 1),
31
35
  withDirectives(createElementVNode("input", {
32
36
  ref_key: "inputRef",
33
37
  ref: inputRef,
34
38
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => message.value = $event),
35
39
  class: normalizeClass(["ask-agent-scalar-input", { "ask-agent-scalar-input-not-empty": message.value.length > 0 }]),
36
- placeholder: "Ask AI Agent"
37
- }, null, 2), [[vModelText, message.value]]),
38
- createElementVNode("button", _hoisted_1, [createVNode(unref(ScalarIconArrowUp), {
40
+ placeholder: unref(translate)("agent.askAiAgent")
41
+ }, null, 10, _hoisted_2), [[vModelText, message.value]]),
42
+ createElementVNode("button", _hoisted_3, [createVNode(unref(ScalarIconArrowUp), {
39
43
  class: "size-3",
40
44
  weight: "bold"
41
45
  })])
@@ -1 +1 @@
1
- {"version":3,"file":"AskAgentButton.vue.script.js","names":[],"sources":["../../../src/features/ask-agent-button/AskAgentButton.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarIconArrowUp, ScalarIconSparkle } from '@scalar/icons'\nimport { ref } from 'vue'\n\nimport { useAgentContext } from '@/hooks/use-agent'\n\nconst agentContext = useAgentContext()\n\nconst message = ref('')\nconst inputRef = ref<HTMLInputElement>()\n\nfunction handleSubmit() {\n agentContext.value?.openAgent(message.value)\n message.value = ''\n}\n</script>\n<template>\n <form\n v-if=\"agentContext?.agentEnabled.value\"\n class=\"agent-button-container\"\n @click=\"inputRef?.focus()\"\n @submit.prevent=\"handleSubmit()\">\n <ScalarIconSparkle\n class=\"size-3 shrink-0\"\n weight=\"fill\" />\n <div class=\"ask-agent-scalar-input-label\">Ask AI Agent</div>\n <input\n ref=\"inputRef\"\n v-model=\"message\"\n class=\"ask-agent-scalar-input\"\n :class=\"{ 'ask-agent-scalar-input-not-empty': message.length > 0 }\"\n placeholder=\"Ask AI Agent\" />\n <button\n class=\"ask-agent-scalar-send\"\n type=\"submit\">\n <ScalarIconArrowUp\n class=\"size-3\"\n weight=\"bold\" />\n </button>\n </form>\n</template>\n<style scoped>\n/** Container */\n.agent-button-container {\n position: relative;\n color: var(--scalar-color-1);\n background: color-mix(in srgb, var(--scalar-background-3), white 15%);\n display: flex;\n align-items: center;\n cursor: pointer;\n padding: 1px 6px;\n margin-right: 4px;\n border-radius: var(--scalar-radius);\n z-index: 2;\n height: 100%;\n}\n.agent-button-container:hover:not(:focus-within) {\n background: color-mix(in srgb, var(--scalar-background-3), white 20%);\n}\n.agent-button-container:has(.ask-agent-scalar-input-not-empty),\n.agent-button-container:focus-within {\n position: absolute;\n inset: 2px;\n border-radius: var(--scalar-radius-lg);\n margin-right: 0;\n height: auto;\n}\n.agent-button-container:has(.ask-agent-scalar-input:focus-visible) {\n outline-style: solid;\n}\n/** Input */\n.ask-agent-scalar-input {\n width: 0px;\n opacity: 0;\n font-size: 0px;\n border: none;\n}\n.agent-button-container:has(.ask-agent-scalar-input-not-empty)\n .ask-agent-scalar-input,\n.agent-button-container:focus-within .ask-agent-scalar-input {\n width: 100%;\n font-size: inherit;\n opacity: 1;\n line-height: 20px;\n outline: none;\n padding-inline: 4px;\n}\n.ask-agent-scalar-input::placeholder {\n color: var(--scalar-color-2);\n font-family: inherit;\n}\n/** Input label */\n.ask-agent-scalar-input-label {\n /** Shown by default */\n color: var(--scalar-color-1);\n font-weight: var(--scalar-semibold);\n margin-left: 4px;\n}\n.agent-button-container:has(.ask-agent-scalar-input-not-empty)\n .ask-agent-scalar-input-label,\n.agent-button-container:focus-within .ask-agent-scalar-input-label {\n /** Hidden when input is focused */\n display: none;\n}\n/** Send button */\n.ask-agent-scalar-send {\n background: var(--scalar-color-blue);\n color: #fff;\n width: 24px;\n height: 24px;\n flex-shrink: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: var(--scalar-radius);\n outline-offset: 1px;\n /* Hidden by default */\n display: none;\n}\n.agent-button-container:has(.ask-agent-scalar-input-not-empty)\n .ask-agent-scalar-send {\n /** Show when input is not empty */\n display: flex;\n}\n.ask-agent-scalar-send:hover {\n background: color-mix(in srgb, var(--scalar-color-blue), transparent 10%);\n}\n</style>\n"],"mappings":";;;;;;;;;;;EAMA,MAAM,eAAe,iBAAgB;EAErC,MAAM,UAAU,IAAI,GAAE;EACtB,MAAM,WAAW,KAAsB;EAEvC,SAAS,eAAe;AACtB,gBAAa,OAAO,UAAU,QAAQ,MAAK;AAC3C,WAAQ,QAAQ;;;UAKR,MAAA,aAAY,EAAE,aAAa,SAAA,WAAA,EADnC,mBAsBO,QAAA;;IApBL,OAAM;IACL,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,SAAA,OAAU,OAAK;IACtB,UAAM,OAAA,OAAA,OAAA,KAAA,eAAA,WAAU,cAAY,EAAA,CAAA,UAAA,CAAA;;IAC7B,YAEkB,MAAA,kBAAA,EAAA;KADhB,OAAM;KACN,QAAO;;8BACT,mBAA4D,OAAA,EAAvD,OAAM,gCAA8B,EAAC,gBAAY,GAAA;mBACtD,mBAK+B,SAAA;cAJzB;KAAJ,KAAI;0EACY,QAAA;KAChB,OAAK,eAAA,CAAC,0BAAwB,EAAA,oCACgB,QAAA,MAAQ,SAAM,GAAA,CAAA,CAAA;KAC5D,aAAY;+BAHH,QAAA,MAAO,CAAA,CAAA;IAIlB,mBAMS,UANT,YAMS,CAHP,YAEkB,MAAA,kBAAA,EAAA;KADhB,OAAM;KACN,QAAO"}
1
+ {"version":3,"file":"AskAgentButton.vue.script.js","names":[],"sources":["../../../src/features/ask-agent-button/AskAgentButton.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarIconArrowUp, ScalarIconSparkle } from '@scalar/icons'\nimport { ref } from 'vue'\n\nimport { useLocalization } from '@/features/localization'\nimport { useAgentContext } from '@/hooks/use-agent'\n\nconst agentContext = useAgentContext()\nconst { translate } = useLocalization()\n\nconst message = ref('')\nconst inputRef = ref<HTMLInputElement>()\n\nfunction handleSubmit() {\n agentContext.value?.openAgent(message.value)\n message.value = ''\n}\n</script>\n<template>\n <form\n v-if=\"agentContext?.agentEnabled.value\"\n class=\"agent-button-container\"\n @click=\"inputRef?.focus()\"\n @submit.prevent=\"handleSubmit()\">\n <ScalarIconSparkle\n class=\"size-3 shrink-0\"\n weight=\"fill\" />\n <div class=\"ask-agent-scalar-input-label\">\n {{ translate('agent.askAiAgent') }}\n </div>\n <input\n ref=\"inputRef\"\n v-model=\"message\"\n class=\"ask-agent-scalar-input\"\n :class=\"{ 'ask-agent-scalar-input-not-empty': message.length > 0 }\"\n :placeholder=\"translate('agent.askAiAgent')\" />\n <button\n class=\"ask-agent-scalar-send\"\n type=\"submit\">\n <ScalarIconArrowUp\n class=\"size-3\"\n weight=\"bold\" />\n </button>\n </form>\n</template>\n<style scoped>\n/** Container */\n.agent-button-container {\n position: relative;\n color: var(--scalar-color-1);\n background: color-mix(in srgb, var(--scalar-background-3), white 15%);\n display: flex;\n align-items: center;\n cursor: pointer;\n padding: 1px 6px;\n margin-right: 4px;\n border-radius: var(--scalar-radius);\n z-index: 2;\n height: 100%;\n}\n.agent-button-container:hover:not(:focus-within) {\n background: color-mix(in srgb, var(--scalar-background-3), white 20%);\n}\n.agent-button-container:has(.ask-agent-scalar-input-not-empty),\n.agent-button-container:focus-within {\n position: absolute;\n inset: 2px;\n border-radius: var(--scalar-radius-lg);\n margin-right: 0;\n height: auto;\n}\n.agent-button-container:has(.ask-agent-scalar-input:focus-visible) {\n outline-style: solid;\n}\n/** Input */\n.ask-agent-scalar-input {\n width: 0px;\n opacity: 0;\n font-size: 0px;\n border: none;\n}\n.agent-button-container:has(.ask-agent-scalar-input-not-empty)\n .ask-agent-scalar-input,\n.agent-button-container:focus-within .ask-agent-scalar-input {\n width: 100%;\n font-size: inherit;\n opacity: 1;\n line-height: 20px;\n outline: none;\n padding-inline: 4px;\n}\n.ask-agent-scalar-input::placeholder {\n color: var(--scalar-color-2);\n font-family: inherit;\n}\n/** Input label */\n.ask-agent-scalar-input-label {\n /** Shown by default */\n color: var(--scalar-color-1);\n font-weight: var(--scalar-semibold);\n margin-left: 4px;\n}\n.agent-button-container:has(.ask-agent-scalar-input-not-empty)\n .ask-agent-scalar-input-label,\n.agent-button-container:focus-within .ask-agent-scalar-input-label {\n /** Hidden when input is focused */\n display: none;\n}\n/** Send button */\n.ask-agent-scalar-send {\n background: var(--scalar-color-blue);\n color: #fff;\n width: 24px;\n height: 24px;\n flex-shrink: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: var(--scalar-radius);\n outline-offset: 1px;\n /* Hidden by default */\n display: none;\n}\n.agent-button-container:has(.ask-agent-scalar-input-not-empty)\n .ask-agent-scalar-send {\n /** Show when input is not empty */\n display: flex;\n}\n.ask-agent-scalar-send:hover {\n background: color-mix(in srgb, var(--scalar-color-blue), transparent 10%);\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;EAOA,MAAM,eAAe,iBAAgB;EACrC,MAAM,EAAE,cAAc,iBAAgB;EAEtC,MAAM,UAAU,IAAI,GAAE;EACtB,MAAM,WAAW,KAAsB;EAEvC,SAAS,eAAe;AACtB,gBAAa,OAAO,UAAU,QAAQ,MAAK;AAC3C,WAAQ,QAAQ;;;UAKR,MAAA,aAAY,EAAE,aAAa,SAAA,WAAA,EADnC,mBAwBO,QAAA;;IAtBL,OAAM;IACL,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,SAAA,OAAU,OAAK;IACtB,UAAM,OAAA,OAAA,OAAA,KAAA,eAAA,WAAU,cAAY,EAAA,CAAA,UAAA,CAAA;;IAC7B,YAEkB,MAAA,kBAAA,EAAA;KADhB,OAAM;KACN,QAAO;;IACT,mBAEM,OAFN,YAEM,gBADD,MAAA,UAAS,CAAA,mBAAA,CAAA,EAAA,EAAA;mBAEd,mBAKiD,SAAA;cAJ3C;KAAJ,KAAI;0EACY,QAAA;KAChB,OAAK,eAAA,CAAC,0BAAwB,EAAA,oCACgB,QAAA,MAAQ,SAAM,GAAA,CAAA,CAAA;KAC3D,aAAa,MAAA,UAAS,CAAA,mBAAA;4CAHd,QAAA,MAAO,CAAA,CAAA;IAIlB,mBAMS,UANT,YAMS,CAHP,YAEkB,MAAA,kBAAA,EAAA;KADhB,OAAM;KACN,QAAO"}
@@ -1 +1 @@
1
- {"version":3,"file":"DeveloperTools.vue.d.ts","sourceRoot":"","sources":["../../../src/features/developer-tools/DeveloperTools.vue"],"names":[],"mappings":"AAkEA,OAAO,KAAK,EACV,yBAAyB,EACzB,YAAY,EACb,MAAM,6BAA6B,CAAA;AACpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAQpE,KAAK,WAAW,GAAG;IACjB,SAAS,CAAC,EAAE,cAAc,CAAA;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC,CAAA;IAClD,YAAY,EAAE,YAAY,CAAA;CAC3B,CAAC;AAuBF,KAAK,gBAAgB,GAAG;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC,CAAC;CAChD,CAAC;AAKF,KAAK,iBAAiB,GAAG,WAAW,GAAG,gBAAgB,CAAC;AA0FxD,QAAA,MAAM,YAAY;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"DeveloperTools.vue.d.ts","sourceRoot":"","sources":["../../../src/features/developer-tools/DeveloperTools.vue"],"names":[],"mappings":"AAqEA,OAAO,KAAK,EACV,yBAAyB,EACzB,YAAY,EACb,MAAM,6BAA6B,CAAA;AACpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAUpE,KAAK,WAAW,GAAG;IACjB,SAAS,CAAC,EAAE,cAAc,CAAA;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC,CAAA;IAClD,YAAY,EAAE,YAAY,CAAA;CAC3B,CAAC;AAwBF,KAAK,gBAAgB,GAAG;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC,CAAC;CAChD,CAAC;AAKF,KAAK,iBAAiB,GAAG,WAAW,GAAG,gBAAgB,CAAC;AA2FxD,QAAA,MAAM,YAAY;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1 +1 @@
1
- {"version":3,"file":"DeveloperTools.vue.js","names":[],"sources":["../../../src/features/developer-tools/DeveloperTools.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { isLocalUrl } from '@scalar/helpers/url/is-local-url'\nimport type {\n ApiReferenceConfiguration,\n ExternalUrls,\n} from '@scalar/types/api-reference'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport { computed } from 'vue'\n\nimport ApiReferenceToolbarTitle from './components/ApiReferenceToolbarTitle.vue'\nimport DeployApiReference from './components/DeployApiReference.vue'\nimport ModifyConfiguration from './components/ModifyConfiguration.vue'\nimport ShareApiReference from './components/ShareApiReference.vue'\n\nconst { configuration, externalUrls } = defineProps<{\n workspace?: WorkspaceStore\n configuration?: Partial<ApiReferenceConfiguration>\n externalUrls: ExternalUrls\n}>()\n\nconst overrides = defineModel<Partial<ApiReferenceConfiguration>>('overrides')\n\nconst showDeveloperTools = computed<boolean>(() => {\n if (configuration?.showDeveloperTools === 'always') {\n return true\n }\n\n if (configuration?.showDeveloperTools === 'never') {\n return false\n }\n\n if (typeof window === 'undefined') {\n return false\n }\n\n return isLocalUrl(window.location.href)\n})\n</script>\n<template>\n <header\n v-if=\"showDeveloperTools\"\n aria-label=\"Developer Tools\"\n class=\"api-reference-toolbar bg-b-1 relative z-1 flex h-10 justify-center border-b px-15\">\n <div\n class=\"-mx-2 flex max-w-(--refs-content-max-width) flex-1 items-center\">\n <div class=\"flex flex-1 items-center\">\n <ApiReferenceToolbarTitle />\n </div>\n <ModifyConfiguration\n v-model:overrides=\"overrides\"\n :configuration />\n <template v-if=\"workspace\">\n <ShareApiReference\n :externalUrls\n :workspace />\n <DeployApiReference\n :externalUrls\n :workspace />\n </template>\n </div>\n </header>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"DeveloperTools.vue.js","names":[],"sources":["../../../src/features/developer-tools/DeveloperTools.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { isLocalUrl } from '@scalar/helpers/url/is-local-url'\nimport type {\n ApiReferenceConfiguration,\n ExternalUrls,\n} from '@scalar/types/api-reference'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport { computed } from 'vue'\n\nimport { useLocalization } from '@/features/localization'\n\nimport ApiReferenceToolbarTitle from './components/ApiReferenceToolbarTitle.vue'\nimport DeployApiReference from './components/DeployApiReference.vue'\nimport ModifyConfiguration from './components/ModifyConfiguration.vue'\nimport ShareApiReference from './components/ShareApiReference.vue'\n\nconst { configuration, externalUrls } = defineProps<{\n workspace?: WorkspaceStore\n configuration?: Partial<ApiReferenceConfiguration>\n externalUrls: ExternalUrls\n}>()\n\nconst overrides = defineModel<Partial<ApiReferenceConfiguration>>('overrides')\nconst { translate } = useLocalization()\n\nconst showDeveloperTools = computed<boolean>(() => {\n if (configuration?.showDeveloperTools === 'always') {\n return true\n }\n\n if (configuration?.showDeveloperTools === 'never') {\n return false\n }\n\n if (typeof window === 'undefined') {\n return false\n }\n\n return isLocalUrl(window.location.href)\n})\n</script>\n<template>\n <header\n v-if=\"showDeveloperTools\"\n :aria-label=\"translate('developerTools.title')\"\n class=\"api-reference-toolbar bg-b-1 relative z-1 flex h-10 justify-center border-b px-15\">\n <div\n class=\"-mx-2 flex max-w-(--refs-content-max-width) flex-1 items-center\">\n <div class=\"flex flex-1 items-center\">\n <ApiReferenceToolbarTitle />\n </div>\n <ModifyConfiguration\n v-model:overrides=\"overrides\"\n :configuration />\n <template v-if=\"workspace\">\n <ShareApiReference\n :externalUrls\n :workspace />\n <DeployApiReference\n :externalUrls\n :workspace />\n </template>\n </div>\n </header>\n</template>\n"],"mappings":""}
@@ -1,15 +1,12 @@
1
+ import { useLocalization } from "../localization/use-localization.js";
1
2
  import ApiReferenceToolbarTitle_default from "./components/ApiReferenceToolbarTitle.vue.js";
2
3
  import DeployApiReference_default from "./components/DeployApiReference.vue.js";
3
4
  import ModifyConfiguration_default from "./components/ModifyConfiguration.vue.js";
4
5
  import ShareApiReference_default from "./components/ShareApiReference.vue.js";
5
- import { Fragment, computed, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, mergeModels, openBlock, useModel } from "vue";
6
+ import { Fragment, computed, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, mergeModels, openBlock, unref, useModel } from "vue";
6
7
  import { isLocalUrl } from "@scalar/helpers/url/is-local-url";
7
8
  //#region src/features/developer-tools/DeveloperTools.vue?vue&type=script&setup=true&lang.ts
8
- var _hoisted_1 = {
9
- key: 0,
10
- "aria-label": "Developer Tools",
11
- class: "api-reference-toolbar bg-b-1 relative z-1 flex h-10 justify-center border-b px-15"
12
- };
9
+ var _hoisted_1 = ["aria-label"];
13
10
  var _hoisted_2 = { class: "-mx-2 flex max-w-(--refs-content-max-width) flex-1 items-center" };
14
11
  var _hoisted_3 = { class: "flex flex-1 items-center" };
15
12
  var DeveloperTools_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
@@ -25,6 +22,7 @@ var DeveloperTools_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
25
22
  emits: ["update:overrides"],
26
23
  setup(__props) {
27
24
  const overrides = useModel(__props, "overrides");
25
+ const { translate } = useLocalization();
28
26
  const showDeveloperTools = computed(() => {
29
27
  if (__props.configuration?.showDeveloperTools === "always") return true;
30
28
  if (__props.configuration?.showDeveloperTools === "never") return false;
@@ -32,7 +30,11 @@ var DeveloperTools_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
32
30
  return isLocalUrl(window.location.href);
33
31
  });
34
32
  return (_ctx, _cache) => {
35
- return showDeveloperTools.value ? (openBlock(), createElementBlock("header", _hoisted_1, [createElementVNode("div", _hoisted_2, [
33
+ return showDeveloperTools.value ? (openBlock(), createElementBlock("header", {
34
+ key: 0,
35
+ "aria-label": unref(translate)("developerTools.title"),
36
+ class: "api-reference-toolbar bg-b-1 relative z-1 flex h-10 justify-center border-b px-15"
37
+ }, [createElementVNode("div", _hoisted_2, [
36
38
  createElementVNode("div", _hoisted_3, [createVNode(ApiReferenceToolbarTitle_default)]),
37
39
  createVNode(ModifyConfiguration_default, {
38
40
  overrides: overrides.value,
@@ -46,7 +48,7 @@ var DeveloperTools_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
46
48
  externalUrls: __props.externalUrls,
47
49
  workspace: __props.workspace
48
50
  }, null, 8, ["externalUrls", "workspace"])], 64)) : createCommentVNode("", true)
49
- ])])) : createCommentVNode("", true);
51
+ ])], 8, _hoisted_1)) : createCommentVNode("", true);
50
52
  };
51
53
  }
52
54
  });
@@ -1 +1 @@
1
- {"version":3,"file":"DeveloperTools.vue.script.js","names":[],"sources":["../../../src/features/developer-tools/DeveloperTools.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { isLocalUrl } from '@scalar/helpers/url/is-local-url'\nimport type {\n ApiReferenceConfiguration,\n ExternalUrls,\n} from '@scalar/types/api-reference'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport { computed } from 'vue'\n\nimport ApiReferenceToolbarTitle from './components/ApiReferenceToolbarTitle.vue'\nimport DeployApiReference from './components/DeployApiReference.vue'\nimport ModifyConfiguration from './components/ModifyConfiguration.vue'\nimport ShareApiReference from './components/ShareApiReference.vue'\n\nconst { configuration, externalUrls } = defineProps<{\n workspace?: WorkspaceStore\n configuration?: Partial<ApiReferenceConfiguration>\n externalUrls: ExternalUrls\n}>()\n\nconst overrides = defineModel<Partial<ApiReferenceConfiguration>>('overrides')\n\nconst showDeveloperTools = computed<boolean>(() => {\n if (configuration?.showDeveloperTools === 'always') {\n return true\n }\n\n if (configuration?.showDeveloperTools === 'never') {\n return false\n }\n\n if (typeof window === 'undefined') {\n return false\n }\n\n return isLocalUrl(window.location.href)\n})\n</script>\n<template>\n <header\n v-if=\"showDeveloperTools\"\n aria-label=\"Developer Tools\"\n class=\"api-reference-toolbar bg-b-1 relative z-1 flex h-10 justify-center border-b px-15\">\n <div\n class=\"-mx-2 flex max-w-(--refs-content-max-width) flex-1 items-center\">\n <div class=\"flex flex-1 items-center\">\n <ApiReferenceToolbarTitle />\n </div>\n <ModifyConfiguration\n v-model:overrides=\"overrides\"\n :configuration />\n <template v-if=\"workspace\">\n <ShareApiReference\n :externalUrls\n :workspace />\n <DeployApiReference\n :externalUrls\n :workspace />\n </template>\n </div>\n </header>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;EAoBA,MAAM,YAAY,SAA+C,SAAC,YAAW;EAE7E,MAAM,qBAAqB,eAAwB;AACjD,OAAI,QAAA,eAAe,uBAAuB,SACxC,QAAO;AAGT,OAAI,QAAA,eAAe,uBAAuB,QACxC,QAAO;AAGT,OAAI,OAAO,WAAW,YACpB,QAAO;AAGT,UAAO,WAAW,OAAO,SAAS,KAAI;IACvC;;UAIS,mBAAA,SAAA,WAAA,EADR,mBAqBS,UArBT,YAqBS,CAjBP,mBAgBM,OAhBN,YAgBM;IAdJ,mBAEM,OAFN,YAEM,CADJ,YAA4B,iCAAA,CAAA,CAAA;IAE9B,YAEmB,6BAAA;KADT,WAAW,UAAA;2EAAS,QAAA;KAC3B,eAAA,QAAA;;IACa,QAAA,aAAA,WAAA,EAAhB,mBAOW,UAAA,EAAA,KAAA,GAAA,EAAA,CANT,YAEe,2BAAA;KADZ,cAAA,QAAA;KACA,WAAA,QAAA;gDACH,YAEe,4BAAA;KADZ,cAAA,QAAA;KACA,WAAA,QAAA"}
1
+ {"version":3,"file":"DeveloperTools.vue.script.js","names":[],"sources":["../../../src/features/developer-tools/DeveloperTools.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { isLocalUrl } from '@scalar/helpers/url/is-local-url'\nimport type {\n ApiReferenceConfiguration,\n ExternalUrls,\n} from '@scalar/types/api-reference'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport { computed } from 'vue'\n\nimport { useLocalization } from '@/features/localization'\n\nimport ApiReferenceToolbarTitle from './components/ApiReferenceToolbarTitle.vue'\nimport DeployApiReference from './components/DeployApiReference.vue'\nimport ModifyConfiguration from './components/ModifyConfiguration.vue'\nimport ShareApiReference from './components/ShareApiReference.vue'\n\nconst { configuration, externalUrls } = defineProps<{\n workspace?: WorkspaceStore\n configuration?: Partial<ApiReferenceConfiguration>\n externalUrls: ExternalUrls\n}>()\n\nconst overrides = defineModel<Partial<ApiReferenceConfiguration>>('overrides')\nconst { translate } = useLocalization()\n\nconst showDeveloperTools = computed<boolean>(() => {\n if (configuration?.showDeveloperTools === 'always') {\n return true\n }\n\n if (configuration?.showDeveloperTools === 'never') {\n return false\n }\n\n if (typeof window === 'undefined') {\n return false\n }\n\n return isLocalUrl(window.location.href)\n})\n</script>\n<template>\n <header\n v-if=\"showDeveloperTools\"\n :aria-label=\"translate('developerTools.title')\"\n class=\"api-reference-toolbar bg-b-1 relative z-1 flex h-10 justify-center border-b px-15\">\n <div\n class=\"-mx-2 flex max-w-(--refs-content-max-width) flex-1 items-center\">\n <div class=\"flex flex-1 items-center\">\n <ApiReferenceToolbarTitle />\n </div>\n <ModifyConfiguration\n v-model:overrides=\"overrides\"\n :configuration />\n <template v-if=\"workspace\">\n <ShareApiReference\n :externalUrls\n :workspace />\n <DeployApiReference\n :externalUrls\n :workspace />\n </template>\n </div>\n </header>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;EAsBA,MAAM,YAAY,SAA+C,SAAC,YAAW;EAC7E,MAAM,EAAE,cAAc,iBAAgB;EAEtC,MAAM,qBAAqB,eAAwB;AACjD,OAAI,QAAA,eAAe,uBAAuB,SACxC,QAAO;AAGT,OAAI,QAAA,eAAe,uBAAuB,QACxC,QAAO;AAGT,OAAI,OAAO,WAAW,YACpB,QAAO;AAGT,UAAO,WAAW,OAAO,SAAS,KAAI;IACvC;;UAIS,mBAAA,SAAA,WAAA,EADR,mBAqBS,UAAA;;IAnBN,cAAY,MAAA,UAAS,CAAA,uBAAA;IACtB,OAAM;OACN,mBAgBM,OAhBN,YAgBM;IAdJ,mBAEM,OAFN,YAEM,CADJ,YAA4B,iCAAA,CAAA,CAAA;IAE9B,YAEmB,6BAAA;KADT,WAAW,UAAA;2EAAS,QAAA;KAC3B,eAAA,QAAA;;IACa,QAAA,aAAA,WAAA,EAAhB,mBAOW,UAAA,EAAA,KAAA,GAAA,EAAA,CANT,YAEe,2BAAA;KADZ,cAAA,QAAA;KACA,WAAA,QAAA;gDACH,YAEe,4BAAA;KADZ,cAAA,QAAA;KACA,WAAA,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ApiReferenceToolbarConfigLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue"],"names":[],"mappings":"AAoDA,KAAK,gBAAgB,GAAG;IACxB,UAAU,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;CACjC,CAAC;AA2CF,QAAA,MAAM,YAAY;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"ApiReferenceToolbarConfigLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue"],"names":[],"mappings":"AAwDA,KAAK,gBAAgB,GAAG;IACxB,UAAU,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;CACjC,CAAC;AA2CF,QAAA,MAAM,YAAY;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ApiReferenceToolbarConfigLayout.vue.js","names":[],"sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport {\n ScalarCheckboxRadioGroup,\n type ScalarCheckboxOption,\n} from '@scalar/components/checkbox-input'\nimport { computed } from 'vue'\n\nconst ModernOption = { label: 'Modern', value: 'modern' } as const\nconst ClassicOption = { label: 'Classic', value: 'classic' } as const\n\nconst options = [\n ModernOption,\n ClassicOption,\n] as const satisfies ScalarCheckboxOption[]\n\nconst model = defineModel<'modern' | 'classic'>()\n\nconst selected = computed<(typeof options)[number]>({\n get: () => (model.value === 'modern' ? ModernOption : ClassicOption),\n set: (option) => (model.value = option.value),\n})\n</script>\n<template>\n <ScalarCheckboxRadioGroup\n v-model=\"selected\"\n :options />\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"ApiReferenceToolbarConfigLayout.vue.js","names":[],"sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport {\n ScalarCheckboxRadioGroup,\n type ScalarCheckboxOption,\n} from '@scalar/components/checkbox-input'\nimport { computed } from 'vue'\n\nimport { useLocalization } from '@/features/localization'\n\nconst model = defineModel<'modern' | 'classic'>()\nconst { translate } = useLocalization()\n\nconst options = computed<ScalarCheckboxOption[]>(() => [\n { label: translate('developerTools.layoutModern'), value: 'modern' },\n { label: translate('developerTools.layoutClassic'), value: 'classic' },\n])\n\nconst selected = computed<ScalarCheckboxOption>({\n get: () =>\n options.value.find((option) => option.value === model.value) ??\n options.value[0]!,\n set: (option) => (model.value = option.value as 'modern' | 'classic'),\n})\n</script>\n<template>\n <ScalarCheckboxRadioGroup\n v-model=\"selected\"\n :options />\n</template>\n"],"mappings":""}
@@ -1,3 +1,4 @@
1
+ import { useLocalization } from "../../localization/use-localization.js";
1
2
  import { computed, createBlock, defineComponent, openBlock, unref, useModel } from "vue";
2
3
  import { ScalarCheckboxRadioGroup } from "@scalar/components/checkbox-input";
3
4
  //#region src/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue?vue&type=script&setup=true&lang.ts
@@ -9,26 +10,25 @@ var ApiReferenceToolbarConfigLayout_vue_vue_type_script_setup_true_lang_default
9
10
  },
10
11
  emits: ["update:modelValue"],
11
12
  setup(__props) {
12
- const ModernOption = {
13
- label: "Modern",
13
+ const model = useModel(__props, "modelValue");
14
+ const { translate } = useLocalization();
15
+ const options = computed(() => [{
16
+ label: translate("developerTools.layoutModern"),
14
17
  value: "modern"
15
- };
16
- const ClassicOption = {
17
- label: "Classic",
18
+ }, {
19
+ label: translate("developerTools.layoutClassic"),
18
20
  value: "classic"
19
- };
20
- const options = [ModernOption, ClassicOption];
21
- const model = useModel(__props, "modelValue");
21
+ }]);
22
22
  const selected = computed({
23
- get: () => model.value === "modern" ? ModernOption : ClassicOption,
23
+ get: () => options.value.find((option) => option.value === model.value) ?? options.value[0],
24
24
  set: (option) => model.value = option.value
25
25
  });
26
26
  return (_ctx, _cache) => {
27
27
  return openBlock(), createBlock(unref(ScalarCheckboxRadioGroup), {
28
28
  modelValue: selected.value,
29
29
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selected.value = $event),
30
- options
31
- }, null, 8, ["modelValue"]);
30
+ options: options.value
31
+ }, null, 8, ["modelValue", "options"]);
32
32
  };
33
33
  }
34
34
  });
@@ -1 +1 @@
1
- {"version":3,"file":"ApiReferenceToolbarConfigLayout.vue.script.js","names":[],"sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport {\n ScalarCheckboxRadioGroup,\n type ScalarCheckboxOption,\n} from '@scalar/components/checkbox-input'\nimport { computed } from 'vue'\n\nconst ModernOption = { label: 'Modern', value: 'modern' } as const\nconst ClassicOption = { label: 'Classic', value: 'classic' } as const\n\nconst options = [\n ModernOption,\n ClassicOption,\n] as const satisfies ScalarCheckboxOption[]\n\nconst model = defineModel<'modern' | 'classic'>()\n\nconst selected = computed<(typeof options)[number]>({\n get: () => (model.value === 'modern' ? ModernOption : ClassicOption),\n set: (option) => (model.value = option.value),\n})\n</script>\n<template>\n <ScalarCheckboxRadioGroup\n v-model=\"selected\"\n :options />\n</template>\n"],"mappings":";;;;;;;;;;;EAOA,MAAM,eAAe;GAAE,OAAO;GAAU,OAAO;GAAU;EACzD,MAAM,gBAAgB;GAAE,OAAO;GAAW,OAAO;GAAW;EAE5D,MAAM,UAAU,CACd,cACA,cACD;EAED,MAAM,QAAQ,SAAiC,SAAA,aAAC;EAEhD,MAAM,WAAW,SAAmC;GAClD,WAAY,MAAM,UAAU,WAAW,eAAe;GACtD,MAAM,WAAY,MAAM,QAAQ,OAAO;GACxC,CAAA;;uBAGC,YAEa,MAAA,yBAAA,EAAA;gBADF,SAAA;0EAAQ,QAAA;IAChB"}
1
+ {"version":3,"file":"ApiReferenceToolbarConfigLayout.vue.script.js","names":[],"sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport {\n ScalarCheckboxRadioGroup,\n type ScalarCheckboxOption,\n} from '@scalar/components/checkbox-input'\nimport { computed } from 'vue'\n\nimport { useLocalization } from '@/features/localization'\n\nconst model = defineModel<'modern' | 'classic'>()\nconst { translate } = useLocalization()\n\nconst options = computed<ScalarCheckboxOption[]>(() => [\n { label: translate('developerTools.layoutModern'), value: 'modern' },\n { label: translate('developerTools.layoutClassic'), value: 'classic' },\n])\n\nconst selected = computed<ScalarCheckboxOption>({\n get: () =>\n options.value.find((option) => option.value === model.value) ??\n options.value[0]!,\n set: (option) => (model.value = option.value as 'modern' | 'classic'),\n})\n</script>\n<template>\n <ScalarCheckboxRadioGroup\n v-model=\"selected\"\n :options />\n</template>\n"],"mappings":";;;;;;;;;;;;EASA,MAAM,QAAQ,SAAiC,SAAA,aAAC;EAChD,MAAM,EAAE,cAAc,iBAAgB;EAEtC,MAAM,UAAU,eAAuC,CACrD;GAAE,OAAO,UAAU,8BAA8B;GAAE,OAAO;GAAU,EACpE;GAAE,OAAO,UAAU,+BAA+B;GAAE,OAAO;GAAW,CACvE,CAAA;EAED,MAAM,WAAW,SAA+B;GAC9C,WACE,QAAQ,MAAM,MAAM,WAAW,OAAO,UAAU,MAAM,MAAM,IAC5D,QAAQ,MAAM;GAChB,MAAM,WAAY,MAAM,QAAQ,OAAO;GACxC,CAAA;;uBAGC,YAEa,MAAA,yBAAA,EAAA;gBADF,SAAA;0EAAQ,QAAA;IAChB,SAAA,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ApiReferenceToolbarConfigLayoutOptions.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue"],"names":[],"mappings":"AAqHA,OAAO,EAEL,KAAK,yBAAyB,EAC/B,MAAM,6BAA6B,CAAA;AAGpC,KAAK,aAAa,GAAG;IACnB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,sBAAsB,CAAC,EAAE,OAAO,CAAA;IAChC,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,CAAA;AAED,KAAK,WAAW,GAAG;IACjB,aAAa,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC,CAAA;CACnD,CAAC;AAkCF,KAAK,gBAAgB,GAAG;IACxB,UAAU,CAAC,EAAE,aAAa,CAAC;CAC1B,CAAC;AAKF,KAAK,iBAAiB,GAAG,WAAW,GAAG,gBAAgB,CAAC;AAgRxD,QAAA,MAAM,YAAY;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"ApiReferenceToolbarConfigLayoutOptions.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue"],"names":[],"mappings":"AAgIA,OAAO,EAEL,KAAK,yBAAyB,EAC/B,MAAM,6BAA6B,CAAA;AAKpC,KAAK,aAAa,GAAG;IACnB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,sBAAsB,CAAC,EAAE,OAAO,CAAA;IAChC,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,CAAA;AAED,KAAK,WAAW,GAAG;IACjB,aAAa,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC,CAAA;CACnD,CAAC;AA2CF,KAAK,gBAAgB,GAAG;IACxB,UAAU,CAAC,EAAE,aAAa,CAAC;CAC1B,CAAC;AAKF,KAAK,iBAAiB,GAAG,WAAW,GAAG,gBAAgB,CAAC;AA2RxD,QAAA,MAAM,YAAY;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ApiReferenceToolbarConfigLayoutOptions.vue.js","names":[],"sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarFormInputGroup } from '@scalar/components/form'\nimport { ScalarToggleInput } from '@scalar/components/toggle'\nimport {\n DEFAULT_MODELS_SECTION_LABEL,\n type ApiReferenceConfiguration,\n} from '@scalar/types/api-reference'\nimport { computed } from 'vue'\n\ntype LayoutOptions = {\n showSidebar?: boolean\n defaultOpenFirstTag?: boolean\n defaultOpenAllTags?: boolean\n expandAllModelSections?: boolean\n expandAllResponses?: boolean\n hideClientButton?: boolean\n hideDarkModeToggle?: boolean\n hideModels?: boolean\n hideSearch?: boolean\n hideTestRequestButton?: boolean\n showOperationId?: boolean\n}\n\nconst { configuration } = defineProps<{\n configuration?: Partial<ApiReferenceConfiguration>\n}>()\n\nconst model = defineModel<LayoutOptions>({\n default: {},\n})\n\nfunction getValue(key: keyof LayoutOptions, defaultValue: boolean = false) {\n return model.value[key] ?? configuration?.[key] ?? defaultValue\n}\n\nfunction setValue(\n key: keyof LayoutOptions,\n value: boolean,\n defaultValue: boolean = false,\n) {\n if (value !== defaultValue) {\n model.value = { ...model.value, [key]: value }\n } else {\n model.value = Object.fromEntries(\n Object.entries(model.value).filter(([k]) => key !== k),\n )\n }\n}\n\nconst modelsSectionLabel = computed(\n () => configuration?.modelsSectionLabel ?? DEFAULT_MODELS_SECTION_LABEL,\n)\n</script>\n<template>\n <ScalarFormInputGroup>\n <ScalarToggleInput\n :modelValue=\"getValue('showSidebar', true)\"\n @update:modelValue=\"(v) => setValue('showSidebar', !!v, true)\">\n Show Sidebar\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('defaultOpenFirstTag', true)\"\n @update:modelValue=\"(v) => setValue('defaultOpenFirstTag', !!v, true)\">\n Default Open First Tag\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('defaultOpenAllTags')\"\n @update:modelValue=\"(v) => setValue('defaultOpenAllTags', !!v)\">\n Default Open All Tags\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('expandAllModelSections')\"\n @update:modelValue=\"(v) => setValue('expandAllModelSections', !!v)\">\n Expand All {{ modelsSectionLabel }}\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('expandAllResponses')\"\n @update:modelValue=\"(v) => setValue('expandAllResponses', !!v)\">\n Expand All Responses\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('hideClientButton')\"\n @update:modelValue=\"(v) => setValue('hideClientButton', !!v)\">\n Hide Client Button\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('hideDarkModeToggle')\"\n @update:modelValue=\"(v) => setValue('hideDarkModeToggle', !!v)\">\n Hide Dark Mode Toggle\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('hideModels')\"\n @update:modelValue=\"(v) => setValue('hideModels', !!v)\">\n Hide {{ modelsSectionLabel }}\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('hideSearch')\"\n @update:modelValue=\"(v) => setValue('hideSearch', !!v)\">\n Hide Search\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('showOperationId')\"\n @update:modelValue=\"(v) => setValue('showOperationId', !!v)\">\n Show Operation ID\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('hideTestRequestButton')\"\n @update:modelValue=\"(v) => setValue('hideTestRequestButton', !!v)\">\n Hide Test Request Button\n </ScalarToggleInput>\n </ScalarFormInputGroup>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"ApiReferenceToolbarConfigLayoutOptions.vue.js","names":[],"sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarFormInputGroup } from '@scalar/components/form'\nimport { ScalarToggleInput } from '@scalar/components/toggle'\nimport {\n DEFAULT_MODELS_SECTION_LABEL,\n type ApiReferenceConfiguration,\n} from '@scalar/types/api-reference'\nimport { computed } from 'vue'\n\nimport { useLocalization } from '@/features/localization'\n\ntype LayoutOptions = {\n showSidebar?: boolean\n defaultOpenFirstTag?: boolean\n defaultOpenAllTags?: boolean\n expandAllModelSections?: boolean\n expandAllResponses?: boolean\n hideClientButton?: boolean\n hideDarkModeToggle?: boolean\n hideModels?: boolean\n hideSearch?: boolean\n hideTestRequestButton?: boolean\n showOperationId?: boolean\n}\n\nconst { configuration } = defineProps<{\n configuration?: Partial<ApiReferenceConfiguration>\n}>()\n\nconst model = defineModel<LayoutOptions>({\n default: {},\n})\nconst { translate } = useLocalization()\n\nfunction getValue(key: keyof LayoutOptions, defaultValue: boolean = false) {\n return model.value[key] ?? configuration?.[key] ?? defaultValue\n}\n\nfunction setValue(\n key: keyof LayoutOptions,\n value: boolean,\n defaultValue: boolean = false,\n) {\n if (value !== defaultValue) {\n model.value = { ...model.value, [key]: value }\n } else {\n model.value = Object.fromEntries(\n Object.entries(model.value).filter(([k]) => key !== k),\n )\n }\n}\n\nconst modelsSectionLabel = computed(\n () => configuration?.modelsSectionLabel ?? DEFAULT_MODELS_SECTION_LABEL,\n)\n\nconst expandAllModelsLabel = computed(() =>\n translate('developerTools.expandAll', { label: modelsSectionLabel.value }),\n)\n\nconst hideModelsLabel = computed(() =>\n translate('developerTools.hideModels', { label: modelsSectionLabel.value }),\n)\n</script>\n<template>\n <ScalarFormInputGroup>\n <ScalarToggleInput\n :modelValue=\"getValue('showSidebar', true)\"\n @update:modelValue=\"(v) => setValue('showSidebar', !!v, true)\">\n {{ translate('developerTools.showSidebar') }}\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('defaultOpenFirstTag', true)\"\n @update:modelValue=\"(v) => setValue('defaultOpenFirstTag', !!v, true)\">\n {{ translate('developerTools.defaultOpenFirstTag') }}\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('defaultOpenAllTags')\"\n @update:modelValue=\"(v) => setValue('defaultOpenAllTags', !!v)\">\n {{ translate('developerTools.defaultOpenAllTags') }}\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('expandAllModelSections')\"\n @update:modelValue=\"(v) => setValue('expandAllModelSections', !!v)\">\n {{ expandAllModelsLabel }}\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('expandAllResponses')\"\n @update:modelValue=\"(v) => setValue('expandAllResponses', !!v)\">\n {{ translate('developerTools.expandAllResponses') }}\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('hideClientButton')\"\n @update:modelValue=\"(v) => setValue('hideClientButton', !!v)\">\n {{ translate('developerTools.hideClientButton') }}\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('hideDarkModeToggle')\"\n @update:modelValue=\"(v) => setValue('hideDarkModeToggle', !!v)\">\n {{ translate('developerTools.hideDarkModeToggle') }}\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('hideModels')\"\n @update:modelValue=\"(v) => setValue('hideModels', !!v)\">\n {{ hideModelsLabel }}\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('hideSearch')\"\n @update:modelValue=\"(v) => setValue('hideSearch', !!v)\">\n {{ translate('developerTools.hideSearch') }}\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('showOperationId')\"\n @update:modelValue=\"(v) => setValue('showOperationId', !!v)\">\n {{ translate('developerTools.showOperationId') }}\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('hideTestRequestButton')\"\n @update:modelValue=\"(v) => setValue('hideTestRequestButton', !!v)\">\n {{ translate('developerTools.hideTestRequestButton') }}\n </ScalarToggleInput>\n </ScalarFormInputGroup>\n</template>\n"],"mappings":""}