@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,3 +1,4 @@
1
+ import { useLocalization } from "../localization/use-localization.js";
1
2
  import ScreenReader_default from "../../components/ScreenReader.vue.js";
2
3
  import ExampleSchema_default from "./ExampleSchema.vue.js";
3
4
  import ExampleResponse_default from "./ExampleResponse.vue.js";
@@ -8,9 +9,9 @@ import { hasResponseContent } from "./helpers/has-response-content.js";
8
9
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, openBlock, ref, renderList, toDisplayString, toValue, unref, useId, vModelCheckbox, watch, withCtx, withDirectives } from "vue";
9
10
  import { useClipboard } from "@scalar/use-hooks/useClipboard";
10
11
  import { getExample } from "@scalar/workspace-store/request-example";
11
- import { ExamplePicker } from "@scalar/api-client/blocks/operation-code-sample";
12
- import { ScalarMarkdown } from "@scalar/components/markdown";
13
12
  import { getResolvedRef } from "@scalar/workspace-store/helpers/get-resolved-ref";
13
+ import { ExamplePicker } from "@scalar/blocks/code-example";
14
+ import { ScalarMarkdown } from "@scalar/components/markdown";
14
15
  import { ScalarIcon } from "@scalar/components/icon";
15
16
  import { objectKeys } from "@scalar/helpers/object/object-keys";
16
17
  import { ScalarCard, ScalarCardFooter, ScalarCardSection } from "@scalar/components/card";
@@ -26,8 +27,13 @@ var _hoisted_3 = { class: "response-description" };
26
27
  */
27
28
  var ExampleResponses_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
28
29
  __name: "ExampleResponses",
29
- props: { responses: {} },
30
+ props: {
31
+ responses: {},
32
+ selectedExample: {},
33
+ eventBus: {}
34
+ },
30
35
  setup(__props) {
36
+ const { translate } = useLocalization();
31
37
  const id = useId();
32
38
  const { copyToClipboard } = useClipboard();
33
39
  const orderedStatusCodes = computed(() => Object.keys(__props.responses ?? {}).sort());
@@ -38,17 +44,14 @@ var ExampleResponses_vue_vue_type_script_setup_true_lang_default = /* @__PURE__
38
44
  * Without this, the index can become out of bounds and cause a mismatch
39
45
  * between the visible tabs and the displayed content.
40
46
  *
41
- * We also reset `selectedExampleKey` to match the behavior of `changeTab`,
42
- * since the new response may not have the same example keys.
47
+ * We re-resolve `selectedExampleKey` the same way `changeTab` does, so the picker keeps the
48
+ * document-wide selection when the newly active response defines it instead of being blanked out.
43
49
  */
44
50
  watch(statusCodesWithContent, (codes) => {
45
- if (codes.length === 0) {
46
- selectedResponseIndex.value = 0;
47
- selectedExampleKey.value = "";
48
- } else if (selectedResponseIndex.value >= codes.length) {
49
- selectedResponseIndex.value = codes.length - 1;
50
- selectedExampleKey.value = "";
51
- }
51
+ if (codes.length === 0) selectedResponseIndex.value = 0;
52
+ else if (selectedResponseIndex.value >= codes.length) selectedResponseIndex.value = codes.length - 1;
53
+ else return;
54
+ selectedExampleKey.value = resolveExampleKey(__props.selectedExample);
52
55
  });
53
56
  const currentResponse = computed(() => {
54
57
  const currentStatusCode = toValue(statusCodesWithContent)[toValue(selectedResponseIndex)] ?? "";
@@ -61,7 +64,23 @@ var ExampleResponses_vue_vue_type_script_setup_true_lang_default = /* @__PURE__
61
64
  return normalizedContent?.[keys[0] ?? ""];
62
65
  });
63
66
  const hasMultipleExamples = computed(() => !!currentResponseContent.value?.examples && Object.keys(currentResponseContent.value?.examples ?? {}).length > 1);
64
- const selectedExampleKey = ref(Object.keys(currentResponseContent.value?.examples ?? {})[0] ?? "");
67
+ const selectedExampleKey = ref("");
68
+ /** Resolve the example key to show, preferring the document-wide selection when this response has it */
69
+ const resolveExampleKey = (preferred) => {
70
+ const keys = Object.keys(currentResponseContent.value?.examples ?? {});
71
+ if (preferred && keys.includes(preferred)) return preferred;
72
+ if (selectedExampleKey.value && keys.includes(selectedExampleKey.value)) return selectedExampleKey.value;
73
+ return keys[0] ?? "";
74
+ };
75
+ selectedExampleKey.value = resolveExampleKey(__props.selectedExample);
76
+ watch(() => __props.selectedExample, (preferred) => {
77
+ selectedExampleKey.value = resolveExampleKey(preferred);
78
+ });
79
+ /** Select an example and sync the choice across the document so other operations follow */
80
+ const selectExample = (key) => {
81
+ selectedExampleKey.value = key;
82
+ __props.eventBus?.emit("workspace:update:selected-example", key);
83
+ };
65
84
  /** Get the current example to display */
66
85
  const currentExample = computed(() => {
67
86
  if (!currentResponseContent.value) return;
@@ -70,13 +89,13 @@ var ExampleResponses_vue_vue_type_script_setup_true_lang_default = /* @__PURE__
70
89
  });
71
90
  const changeTab = (index) => {
72
91
  selectedResponseIndex.value = index;
73
- selectedExampleKey.value = "";
92
+ selectedExampleKey.value = resolveExampleKey(__props.selectedExample);
74
93
  };
75
94
  const showSchema = ref(false);
76
95
  return (_ctx, _cache) => {
77
96
  return statusCodesWithContent.value.length ? (openBlock(), createBlock(unref(ScalarCard), {
78
97
  key: 0,
79
- "aria-label": "Example Responses",
98
+ "aria-label": unref(translate)("response.exampleResponses"),
80
99
  class: "response-card",
81
100
  role: "region"
82
101
  }, {
@@ -91,14 +110,14 @@ var ExampleResponses_vue_vue_type_script_setup_true_lang_default = /* @__PURE__
91
110
  icon: "Clipboard",
92
111
  width: "12px"
93
112
  })])) : createCommentVNode("", true), currentResponseContent.value?.schema ? (openBlock(), createElementBlock("label", _hoisted_1, [
94
- _cache[4] || (_cache[4] = createTextVNode(" Show Schema ", -1)),
113
+ createTextVNode(toDisplayString(unref(translate)("response.showSchema")) + " ", 1),
95
114
  withDirectives(createElementVNode("input", {
96
115
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => showSchema.value = $event),
97
116
  "aria-controls": unref(id),
98
117
  class: "scalar-card-checkbox-input",
99
118
  type: "checkbox"
100
119
  }, null, 8, _hoisted_2), [[vModelCheckbox, showSchema.value]]),
101
- _cache[5] || (_cache[5] = createElementVNode("span", { class: "scalar-card-checkbox-checkmark" }, null, -1))
120
+ _cache[2] || (_cache[2] = createElementVNode("span", { class: "scalar-card-checkbox-checkmark" }, null, -1))
102
121
  ])) : createCommentVNode("", true)]),
103
122
  default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(statusCodesWithContent.value, (statusCode) => {
104
123
  return openBlock(), createBlock(ExampleResponseTab_default, {
@@ -106,7 +125,7 @@ var ExampleResponses_vue_vue_type_script_setup_true_lang_default = /* @__PURE__
106
125
  "aria-controls": unref(id)
107
126
  }, {
108
127
  default: withCtx(() => [createVNode(ScreenReader_default, null, {
109
- default: withCtx(() => [..._cache[3] || (_cache[3] = [createTextVNode("Status:", -1)])]),
128
+ default: withCtx(() => [createTextVNode(toDisplayString(unref(translate)("response.status")) + ":", 1)]),
110
129
  _: 1
111
130
  }), createTextVNode(" " + toDisplayString(statusCode), 1)]),
112
131
  _: 2
@@ -137,11 +156,11 @@ var ExampleResponses_vue_vue_type_script_setup_true_lang_default = /* @__PURE__
137
156
  }, {
138
157
  default: withCtx(() => [hasMultipleExamples.value ? (openBlock(), createBlock(unref(ExamplePicker), {
139
158
  key: 0,
140
- modelValue: selectedExampleKey.value,
141
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => selectedExampleKey.value = $event),
142
159
  class: "response-example-selector px-0",
143
- examples: currentResponseContent.value?.examples
144
- }, null, 8, ["modelValue", "examples"])) : createCommentVNode("", true), createElementVNode("div", _hoisted_3, [currentResponse.value?.description ? (openBlock(), createBlock(unref(ScalarMarkdown), {
160
+ examples: currentResponseContent.value?.examples,
161
+ modelValue: selectedExampleKey.value,
162
+ "onUpdate:modelValue": selectExample
163
+ }, null, 8, ["examples", "modelValue"])) : createCommentVNode("", true), createElementVNode("div", _hoisted_3, [currentResponse.value?.description ? (openBlock(), createBlock(unref(ScalarMarkdown), {
145
164
  key: 0,
146
165
  class: "response-description-markdown",
147
166
  value: currentResponse.value.description
@@ -150,7 +169,7 @@ var ExampleResponses_vue_vue_type_script_setup_true_lang_default = /* @__PURE__
150
169
  })) : createCommentVNode("", true)
151
170
  ]),
152
171
  _: 1
153
- })) : createCommentVNode("", true);
172
+ }, 8, ["aria-label"])) : createCommentVNode("", true);
154
173
  };
155
174
  }
156
175
  });
@@ -1 +1 @@
1
- {"version":3,"file":"ExampleResponses.vue.script.js","names":[],"sources":["../../../src/features/example-responses/ExampleResponses.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ExamplePicker } from '@scalar/api-client/blocks/operation-code-sample'\nimport {\n ScalarCard,\n ScalarCardFooter,\n ScalarCardSection,\n} from '@scalar/components/card'\nimport { ScalarIcon } from '@scalar/components/icon'\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport { objectKeys } from '@scalar/helpers/object/object-keys'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport { getExample } from '@scalar/workspace-store/request-example'\nimport type {\n MediaTypeObject,\n ResponsesObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed, ref, toValue, useId, watch } from 'vue'\n\nimport ScreenReader from '@/components/ScreenReader.vue'\nimport ExampleSchema from '@/features/example-responses/ExampleSchema.vue'\n\nimport ExampleResponse from './ExampleResponse.vue'\nimport ExampleResponseTab from './ExampleResponseTab.vue'\nimport ExampleResponseTabList from './ExampleResponseTabList.vue'\nimport { hasResponseContent } from './helpers/has-response-content'\nimport { normalizeMimeTypeObject } from './helpers/normalize-mime-type-object'\n\n/**\n * TODO: copyToClipboard isn't using the right content if there are multiple examples\n */\n\nconst { responses } = defineProps<{\n responses: ResponsesObject\n}>()\n\nconst id = useId()\nconst { copyToClipboard } = useClipboard()\n\n// Bring the status codes in the right order.\nconst orderedStatusCodes = computed<string[]>(() =>\n Object.keys(responses ?? {}).sort(),\n)\n\n// Filter to only valid response keys that should render in the example responses panel\nconst statusCodesWithContent = computed<string[]>(() =>\n orderedStatusCodes.value.filter((statusCode) =>\n hasResponseContent(getResolvedRef(responses?.[statusCode]), statusCode),\n ),\n)\n\n// Keep track of the current selected tab\nconst selectedResponseIndex = ref<number>(0)\n\n/**\n * Clamp the selected index when the filtered list shrinks.\n * Without this, the index can become out of bounds and cause a mismatch\n * between the visible tabs and the displayed content.\n *\n * We also reset `selectedExampleKey` to match the behavior of `changeTab`,\n * since the new response may not have the same example keys.\n */\nwatch(statusCodesWithContent, (codes) => {\n if (codes.length === 0) {\n selectedResponseIndex.value = 0\n selectedExampleKey.value = ''\n } else if (selectedResponseIndex.value >= codes.length) {\n selectedResponseIndex.value = codes.length - 1\n selectedExampleKey.value = ''\n }\n})\n\n// Return the whole response object\nconst currentResponse = computed(() => {\n const currentStatusCode =\n toValue(statusCodesWithContent)[toValue(selectedResponseIndex)] ?? ''\n\n return getResolvedRef(responses?.[currentStatusCode])\n})\n\nconst currentResponseContent = computed<MediaTypeObject | undefined>(() => {\n const normalizedContent = normalizeMimeTypeObject(\n currentResponse.value?.content,\n )\n\n /** All the keys of the normalized content */\n const keys = objectKeys(normalizedContent ?? {})\n return normalizedContent?.[keys[0] ?? '']\n})\n\nconst hasMultipleExamples = computed<boolean>(\n () =>\n !!currentResponseContent.value?.examples &&\n Object.keys(currentResponseContent.value?.examples ?? {}).length > 1,\n)\n\nconst selectedExampleKey = ref<string>(\n Object.keys(currentResponseContent.value?.examples ?? {})[0] ?? '',\n)\n\n/** Get the current example to display */\nconst currentExample = computed(() => {\n if (!currentResponseContent.value) {\n return undefined\n }\n\n // When multiple examples exist and one is selected, we access it directly\n if (hasMultipleExamples.value && selectedExampleKey.value) {\n return currentResponseContent.value.examples?.[selectedExampleKey.value]\n }\n\n // Otherwise, we use getExample with an undefined exampleKey to handle fallbacks\n return getExample(currentResponseContent.value, undefined, undefined)\n})\n\nconst changeTab = (index: number) => {\n selectedResponseIndex.value = index\n selectedExampleKey.value = ''\n}\n\nconst showSchema = ref(false)\n</script>\n<template>\n <ScalarCard\n v-if=\"statusCodesWithContent.length\"\n aria-label=\"Example Responses\"\n class=\"response-card\"\n role=\"region\">\n <ExampleResponseTabList @change=\"changeTab\">\n <ExampleResponseTab\n v-for=\"statusCode in statusCodesWithContent\"\n :key=\"statusCode\"\n :aria-controls=\"id\">\n <ScreenReader>Status:</ScreenReader>\n {{ statusCode }}\n </ExampleResponseTab>\n\n <template #actions>\n <button\n v-if=\"currentResponseContent?.example\"\n class=\"code-copy\"\n type=\"button\"\n @click=\"() => copyToClipboard(currentResponseContent?.example)\">\n <ScalarIcon\n icon=\"Clipboard\"\n width=\"12px\" />\n </button>\n <label\n v-if=\"currentResponseContent?.schema\"\n class=\"scalar-card-checkbox\">\n Show Schema\n <input\n v-model=\"showSchema\"\n :aria-controls=\"id\"\n class=\"scalar-card-checkbox-input\"\n type=\"checkbox\" />\n <span class=\"scalar-card-checkbox-checkmark\" />\n </label>\n </template>\n </ExampleResponseTabList>\n <ScalarCardSection class=\"grid flex-1\">\n <!-- Schema -->\n <ExampleSchema\n v-if=\"currentResponseContent?.schema && showSchema\"\n :id=\"id\"\n :schema=\"currentResponseContent?.schema\" />\n\n <!-- Example -->\n <ExampleResponse\n v-else\n :id=\"id\"\n :example=\"currentExample\"\n :response=\"currentResponseContent\" />\n </ScalarCardSection>\n <ScalarCardFooter\n v-if=\"currentResponse?.description || hasMultipleExamples\"\n class=\"response-card-footer\">\n <ExamplePicker\n v-if=\"hasMultipleExamples\"\n v-model=\"selectedExampleKey\"\n class=\"response-example-selector px-0\"\n :examples=\"currentResponseContent?.examples\" />\n <div class=\"response-description\">\n <ScalarMarkdown\n v-if=\"currentResponse?.description\"\n class=\"response-description-markdown\"\n :value=\"currentResponse.description\" />\n </div>\n </ScalarCardFooter>\n </ScalarCard>\n</template>\n\n<style scoped>\n.response-card {\n font-size: var(--scalar-font-size-3);\n}\n\n.code-copy {\n display: flex;\n align-items: center;\n justify-content: center;\n appearance: none;\n -webkit-appearance: none;\n outline: none;\n background: transparent;\n cursor: pointer;\n color: var(--scalar-color-3);\n border: none;\n padding: 0;\n margin-right: 12px;\n}\n.code-copy:hover {\n color: var(--scalar-color-1);\n}\n.code-copy svg {\n width: 13px;\n height: 13px;\n}\n.response-card-footer {\n display: flex;\n flex-direction: row-reverse;\n flex-wrap: wrap;\n justify-content: start;\n flex-shrink: 0;\n padding: 7px 12px;\n column-gap: 8px;\n}\n.response-example-selector {\n flex-shrink: 0;\n margin: -4px;\n}\n.response-description {\n font-weight: var(--scalar-semibold);\n font-size: var(--scalar-small);\n color: var(--scalar-color--1);\n\n box-sizing: border-box;\n\n flex-grow: 1;\n}\n.response-description-markdown {\n max-height: 3lh;\n}\n\n.response-description-markdown :deep(*) {\n margin: 0;\n}\n.schema-type {\n font-size: var(--scalar-micro);\n color: var(--scalar-color-2);\n font-weight: var(--scalar-semibold);\n background: var(--scalar-background-3);\n padding: 2px 4px;\n border-radius: 4px;\n margin-right: 4px;\n}\n.schema-example {\n font-size: var(--scalar-micro);\n color: var(--scalar-color-2);\n font-weight: var(--scalar-semibold);\n}\n\n.example-response-tab {\n display: block;\n margin: 6px;\n}\n\n.scalar-card-checkbox {\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n min-height: 17px;\n cursor: pointer;\n user-select: none;\n font-size: var(--scalar-small);\n font-weight: var(--scalar-font-normal);\n color: var(--scalar-color-2);\n width: fit-content;\n white-space: nowrap;\n gap: 6px;\n padding: 7px 6px;\n}\n.scalar-card-checkbox:has(.scalar-card-checkbox-input:focus-visible)\n .scalar-card-checkbox-checkmark {\n outline: 1px solid var(--scalar-color-accent);\n}\n.scalar-card-checkbox:hover {\n color: var(--scalar-color--1);\n}\n.scalar-card-checkbox .scalar-card-checkbox-input {\n position: absolute;\n opacity: 0;\n cursor: pointer;\n height: 0;\n width: 0;\n}\n\n.scalar-card-checkbox-checkmark {\n height: 16px;\n width: 16px;\n border-radius: var(--scalar-radius);\n background-color: transparent;\n background-color: var(--scalar-background-3);\n box-shadow: inset 0 0 0 var(--scalar-border-width) var(--scalar-border-color);\n}\n.scalar-card-checkbox:has(.scalar-card-checkbox-input:checked) {\n color: var(--scalar-color-1);\n font-weight: var(--scalar-semibold);\n}\n\n.scalar-card-checkbox\n .scalar-card-checkbox-input:checked\n ~ .scalar-card-checkbox-checkmark {\n background-color: var(--scalar-button-1);\n box-shadow: none;\n}\n\n.scalar-card-checkbox-checkmark:after {\n content: '';\n position: absolute;\n display: none;\n}\n\n.scalar-card-checkbox\n .scalar-card-checkbox-input:checked\n ~ .scalar-card-checkbox-checkmark:after {\n display: block;\n}\n\n.scalar-card-checkbox .scalar-card-checkbox-checkmark:after {\n right: 11.5px;\n top: 12.5px;\n width: 5px;\n height: 9px;\n border: solid 1px var(--scalar-button-1-color);\n border-width: 0 1.5px 1.5px 0;\n transform: rotate(45deg);\n}\n</style>\n"],"mappings":"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"}
1
+ {"version":3,"file":"ExampleResponses.vue.script.js","names":[],"sources":["../../../src/features/example-responses/ExampleResponses.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ExamplePicker } from '@scalar/blocks/code-example'\nimport {\n ScalarCard,\n ScalarCardFooter,\n ScalarCardSection,\n} from '@scalar/components/card'\nimport { ScalarIcon } from '@scalar/components/icon'\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport { objectKeys } from '@scalar/helpers/object/object-keys'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport { getExample } from '@scalar/workspace-store/request-example'\nimport type {\n MediaTypeObject,\n ResponsesObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed, ref, toValue, useId, watch } from 'vue'\n\nimport ScreenReader from '@/components/ScreenReader.vue'\nimport ExampleSchema from '@/features/example-responses/ExampleSchema.vue'\nimport { useLocalization } from '@/features/localization'\n\nimport ExampleResponse from './ExampleResponse.vue'\nimport ExampleResponseTab from './ExampleResponseTab.vue'\nimport ExampleResponseTabList from './ExampleResponseTabList.vue'\nimport { hasResponseContent } from './helpers/has-response-content'\nimport { normalizeMimeTypeObject } from './helpers/normalize-mime-type-object'\n\n/**\n * TODO: copyToClipboard isn't using the right content if there are multiple examples\n */\n\nconst { responses, selectedExample, eventBus } = defineProps<{\n responses: ResponsesObject\n /**\n * The document-wide selected example key. Honored only when the current response defines an\n * example with the same key, so response example pickers stay in sync between operations without\n * blanking out responses that do not share that key.\n */\n selectedExample?: string\n /** Event bus, used to broadcast the selected example so other operations can follow */\n eventBus?: WorkspaceEventBus\n}>()\nconst { translate } = useLocalization()\n\nconst id = useId()\nconst { copyToClipboard } = useClipboard()\n\n// Bring the status codes in the right order.\nconst orderedStatusCodes = computed<string[]>(() =>\n Object.keys(responses ?? {}).sort(),\n)\n\n// Filter to only valid response keys that should render in the example responses panel\nconst statusCodesWithContent = computed<string[]>(() =>\n orderedStatusCodes.value.filter((statusCode) =>\n hasResponseContent(getResolvedRef(responses?.[statusCode]), statusCode),\n ),\n)\n\n// Keep track of the current selected tab\nconst selectedResponseIndex = ref<number>(0)\n\n/**\n * Clamp the selected index when the filtered list shrinks.\n * Without this, the index can become out of bounds and cause a mismatch\n * between the visible tabs and the displayed content.\n *\n * We re-resolve `selectedExampleKey` the same way `changeTab` does, so the picker keeps the\n * document-wide selection when the newly active response defines it instead of being blanked out.\n */\nwatch(statusCodesWithContent, (codes) => {\n if (codes.length === 0) {\n selectedResponseIndex.value = 0\n } else if (selectedResponseIndex.value >= codes.length) {\n selectedResponseIndex.value = codes.length - 1\n } else {\n return\n }\n selectedExampleKey.value = resolveExampleKey(selectedExample)\n})\n\n// Return the whole response object\nconst currentResponse = computed(() => {\n const currentStatusCode =\n toValue(statusCodesWithContent)[toValue(selectedResponseIndex)] ?? ''\n\n return getResolvedRef(responses?.[currentStatusCode])\n})\n\nconst currentResponseContent = computed<MediaTypeObject | undefined>(() => {\n const normalizedContent = normalizeMimeTypeObject(\n currentResponse.value?.content,\n )\n\n /** All the keys of the normalized content */\n const keys = objectKeys(normalizedContent ?? {})\n return normalizedContent?.[keys[0] ?? '']\n})\n\nconst hasMultipleExamples = computed<boolean>(\n () =>\n !!currentResponseContent.value?.examples &&\n Object.keys(currentResponseContent.value?.examples ?? {}).length > 1,\n)\n\nconst selectedExampleKey = ref<string>('')\n\n/** Resolve the example key to show, preferring the document-wide selection when this response has it */\nconst resolveExampleKey = (preferred: string | undefined): string => {\n const keys = Object.keys(currentResponseContent.value?.examples ?? {})\n if (preferred && keys.includes(preferred)) {\n return preferred\n }\n // Keep the current example when it is still valid, otherwise fall back to the first one\n if (selectedExampleKey.value && keys.includes(selectedExampleKey.value)) {\n return selectedExampleKey.value\n }\n return keys[0] ?? ''\n}\n\n// Initialize from the document-wide selection, falling back to the first example\nselectedExampleKey.value = resolveExampleKey(selectedExample)\n\n// Follow the document-wide selection when it changes and this response has that example\nwatch(\n () => selectedExample,\n (preferred) => {\n selectedExampleKey.value = resolveExampleKey(preferred)\n },\n)\n\n/** Select an example and sync the choice across the document so other operations follow */\nconst selectExample = (key: string) => {\n selectedExampleKey.value = key\n eventBus?.emit('workspace:update:selected-example', key)\n}\n\n/** Get the current example to display */\nconst currentExample = computed(() => {\n if (!currentResponseContent.value) {\n return undefined\n }\n\n // When multiple examples exist and one is selected, we access it directly\n if (hasMultipleExamples.value && selectedExampleKey.value) {\n return currentResponseContent.value.examples?.[selectedExampleKey.value]\n }\n\n // Otherwise, we use getExample with an undefined exampleKey to handle fallbacks\n return getExample(currentResponseContent.value, undefined, undefined)\n})\n\nconst changeTab = (index: number) => {\n selectedResponseIndex.value = index\n // Re-apply the document-wide selection for the newly selected response, falling back to its first example\n selectedExampleKey.value = resolveExampleKey(selectedExample)\n}\n\nconst showSchema = ref(false)\n</script>\n<template>\n <ScalarCard\n v-if=\"statusCodesWithContent.length\"\n :aria-label=\"translate('response.exampleResponses')\"\n class=\"response-card\"\n role=\"region\">\n <ExampleResponseTabList @change=\"changeTab\">\n <ExampleResponseTab\n v-for=\"statusCode in statusCodesWithContent\"\n :key=\"statusCode\"\n :aria-controls=\"id\">\n <ScreenReader>{{ translate('response.status') }}:</ScreenReader>\n {{ statusCode }}\n </ExampleResponseTab>\n\n <template #actions>\n <button\n v-if=\"currentResponseContent?.example\"\n class=\"code-copy\"\n type=\"button\"\n @click=\"() => copyToClipboard(currentResponseContent?.example)\">\n <ScalarIcon\n icon=\"Clipboard\"\n width=\"12px\" />\n </button>\n <label\n v-if=\"currentResponseContent?.schema\"\n class=\"scalar-card-checkbox\">\n {{ translate('response.showSchema') }}\n <input\n v-model=\"showSchema\"\n :aria-controls=\"id\"\n class=\"scalar-card-checkbox-input\"\n type=\"checkbox\" />\n <span class=\"scalar-card-checkbox-checkmark\" />\n </label>\n </template>\n </ExampleResponseTabList>\n <ScalarCardSection class=\"grid flex-1\">\n <!-- Schema -->\n <ExampleSchema\n v-if=\"currentResponseContent?.schema && showSchema\"\n :id=\"id\"\n :schema=\"currentResponseContent?.schema\" />\n\n <!-- Example -->\n <ExampleResponse\n v-else\n :id=\"id\"\n :example=\"currentExample\"\n :response=\"currentResponseContent\" />\n </ScalarCardSection>\n <ScalarCardFooter\n v-if=\"currentResponse?.description || hasMultipleExamples\"\n class=\"response-card-footer\">\n <ExamplePicker\n v-if=\"hasMultipleExamples\"\n class=\"response-example-selector px-0\"\n :examples=\"currentResponseContent?.examples\"\n :modelValue=\"selectedExampleKey\"\n @update:modelValue=\"selectExample\" />\n <div class=\"response-description\">\n <ScalarMarkdown\n v-if=\"currentResponse?.description\"\n class=\"response-description-markdown\"\n :value=\"currentResponse.description\" />\n </div>\n </ScalarCardFooter>\n </ScalarCard>\n</template>\n\n<style scoped>\n.response-card {\n font-size: var(--scalar-font-size-3);\n}\n\n.code-copy {\n display: flex;\n align-items: center;\n justify-content: center;\n appearance: none;\n -webkit-appearance: none;\n outline: none;\n background: transparent;\n cursor: pointer;\n color: var(--scalar-color-3);\n border: none;\n padding: 0;\n margin-right: 12px;\n}\n.code-copy:hover {\n color: var(--scalar-color-1);\n}\n.code-copy svg {\n width: 13px;\n height: 13px;\n}\n.response-card-footer {\n display: flex;\n flex-direction: row-reverse;\n flex-wrap: wrap;\n justify-content: start;\n flex-shrink: 0;\n padding: 7px 12px;\n column-gap: 8px;\n}\n.response-example-selector {\n flex-shrink: 0;\n margin: -4px;\n}\n.response-description {\n font-weight: var(--scalar-semibold);\n font-size: var(--scalar-small);\n color: var(--scalar-color--1);\n\n box-sizing: border-box;\n\n flex-grow: 1;\n}\n.response-description-markdown {\n max-height: 3lh;\n}\n\n.response-description-markdown :deep(*) {\n margin: 0;\n}\n.schema-type {\n font-size: var(--scalar-micro);\n color: var(--scalar-color-2);\n font-weight: var(--scalar-semibold);\n background: var(--scalar-background-3);\n padding: 2px 4px;\n border-radius: 4px;\n margin-right: 4px;\n}\n.schema-example {\n font-size: var(--scalar-micro);\n color: var(--scalar-color-2);\n font-weight: var(--scalar-semibold);\n}\n\n.example-response-tab {\n display: block;\n margin: 6px;\n}\n\n.scalar-card-checkbox {\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n min-height: 17px;\n cursor: pointer;\n user-select: none;\n font-size: var(--scalar-small);\n font-weight: var(--scalar-font-normal);\n color: var(--scalar-color-2);\n width: fit-content;\n white-space: nowrap;\n gap: 6px;\n padding: 7px 6px;\n}\n.scalar-card-checkbox:has(.scalar-card-checkbox-input:focus-visible)\n .scalar-card-checkbox-checkmark {\n outline: 1px solid var(--scalar-color-accent);\n}\n.scalar-card-checkbox:hover {\n color: var(--scalar-color--1);\n}\n.scalar-card-checkbox .scalar-card-checkbox-input {\n position: absolute;\n opacity: 0;\n cursor: pointer;\n height: 0;\n width: 0;\n}\n\n.scalar-card-checkbox-checkmark {\n height: 16px;\n width: 16px;\n border-radius: var(--scalar-radius);\n background-color: transparent;\n background-color: var(--scalar-background-3);\n box-shadow: inset 0 0 0 var(--scalar-border-width) var(--scalar-border-color);\n}\n.scalar-card-checkbox:has(.scalar-card-checkbox-input:checked) {\n color: var(--scalar-color-1);\n font-weight: var(--scalar-semibold);\n}\n\n.scalar-card-checkbox\n .scalar-card-checkbox-input:checked\n ~ .scalar-card-checkbox-checkmark {\n background-color: var(--scalar-button-1);\n box-shadow: none;\n}\n\n.scalar-card-checkbox-checkmark:after {\n content: '';\n position: absolute;\n display: none;\n}\n\n.scalar-card-checkbox\n .scalar-card-checkbox-input:checked\n ~ .scalar-card-checkbox-checkmark:after {\n display: block;\n}\n\n.scalar-card-checkbox .scalar-card-checkbox-checkmark:after {\n right: 11.5px;\n top: 12.5px;\n width: 5px;\n height: 9px;\n border: solid 1px var(--scalar-button-1-color);\n border-width: 0 1.5px 1.5px 0;\n transform: rotate(45deg);\n}\n</style>\n"],"mappings":"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"}
@@ -1 +1 @@
1
- {"version":3,"file":"ExampleSchema.vue.js","names":[],"sources":["../../../src/features/example-responses/ExampleSchema.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { getResolvedRefDeep } from '@scalar/api-client/blocks/operation-code-sample'\nimport { ScalarCodeBlock } from '@scalar/components/code-block'\nimport { ScalarVirtualCodeBlock } from '@scalar/components/virtual-code-block'\nimport { prettyPrintJson } from '@scalar/helpers/json/pretty-print-json'\nimport type { ReferenceType } from '@scalar/workspace-store/schemas/v3.1/strict/reference'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/schema'\nimport { computed } from 'vue'\n\nconst { id, schema } = defineProps<{\n id: string\n schema: ReferenceType<SchemaObject>\n}>()\n\nconst schemaContent = computed(() => {\n if (!schema) {\n return undefined\n }\n\n return prettyPrintJson(getResolvedRefDeep(schema))\n})\n\nconst VIRTUALIZATION_THRESHOLD = 20_000\n\nconst shouldVirtualizeSchema = computed(() => {\n return (schemaContent.value?.length ?? 0) > VIRTUALIZATION_THRESHOLD\n})\n</script>\n\n<template>\n <ScalarCodeBlock\n v-if=\"!shouldVirtualizeSchema\"\n :id=\"id\"\n class=\"bg-b-2\"\n lang=\"json\"\n :prettyPrintedContent=\"schemaContent ?? ''\" />\n <ScalarVirtualCodeBlock\n v-else\n :id=\"id\"\n class=\"bg-b-2\"\n :content=\"schemaContent ?? ''\"\n lang=\"json\" />\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"ExampleSchema.vue.js","names":[],"sources":["../../../src/features/example-responses/ExampleSchema.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { getResolvedRefDeep } from '@scalar/blocks/code-example'\nimport { ScalarCodeBlock } from '@scalar/components/code-block'\nimport { ScalarVirtualCodeBlock } from '@scalar/components/virtual-code-block'\nimport { prettyPrintJson } from '@scalar/helpers/json/pretty-print-json'\nimport type { ReferenceType } from '@scalar/workspace-store/schemas/v3.1/strict/reference'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/schema'\nimport { computed } from 'vue'\n\nconst { id, schema } = defineProps<{\n id: string\n schema: ReferenceType<SchemaObject>\n}>()\n\nconst schemaContent = computed(() => {\n if (!schema) {\n return undefined\n }\n\n return prettyPrintJson(getResolvedRefDeep(schema))\n})\n\nconst VIRTUALIZATION_THRESHOLD = 20_000\n\nconst shouldVirtualizeSchema = computed(() => {\n return (schemaContent.value?.length ?? 0) > VIRTUALIZATION_THRESHOLD\n})\n</script>\n\n<template>\n <ScalarCodeBlock\n v-if=\"!shouldVirtualizeSchema\"\n :id=\"id\"\n class=\"bg-b-2\"\n lang=\"json\"\n :prettyPrintedContent=\"schemaContent ?? ''\" />\n <ScalarVirtualCodeBlock\n v-else\n :id=\"id\"\n class=\"bg-b-2\"\n :content=\"schemaContent ?? ''\"\n lang=\"json\" />\n</template>\n"],"mappings":""}
@@ -1,5 +1,5 @@
1
1
  import { computed, createBlock, defineComponent, openBlock, unref } from "vue";
2
- import { getResolvedRefDeep } from "@scalar/api-client/blocks/operation-code-sample";
2
+ import { getResolvedRefDeep } from "@scalar/blocks/code-example";
3
3
  import { ScalarCodeBlock } from "@scalar/components/code-block";
4
4
  import { ScalarVirtualCodeBlock } from "@scalar/components/virtual-code-block";
5
5
  import { prettyPrintJson } from "@scalar/helpers/json/pretty-print-json";
@@ -1 +1 @@
1
- {"version":3,"file":"ExampleSchema.vue.script.js","names":[],"sources":["../../../src/features/example-responses/ExampleSchema.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { getResolvedRefDeep } from '@scalar/api-client/blocks/operation-code-sample'\nimport { ScalarCodeBlock } from '@scalar/components/code-block'\nimport { ScalarVirtualCodeBlock } from '@scalar/components/virtual-code-block'\nimport { prettyPrintJson } from '@scalar/helpers/json/pretty-print-json'\nimport type { ReferenceType } from '@scalar/workspace-store/schemas/v3.1/strict/reference'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/schema'\nimport { computed } from 'vue'\n\nconst { id, schema } = defineProps<{\n id: string\n schema: ReferenceType<SchemaObject>\n}>()\n\nconst schemaContent = computed(() => {\n if (!schema) {\n return undefined\n }\n\n return prettyPrintJson(getResolvedRefDeep(schema))\n})\n\nconst VIRTUALIZATION_THRESHOLD = 20_000\n\nconst shouldVirtualizeSchema = computed(() => {\n return (schemaContent.value?.length ?? 0) > VIRTUALIZATION_THRESHOLD\n})\n</script>\n\n<template>\n <ScalarCodeBlock\n v-if=\"!shouldVirtualizeSchema\"\n :id=\"id\"\n class=\"bg-b-2\"\n lang=\"json\"\n :prettyPrintedContent=\"schemaContent ?? ''\" />\n <ScalarVirtualCodeBlock\n v-else\n :id=\"id\"\n class=\"bg-b-2\"\n :content=\"schemaContent ?? ''\"\n lang=\"json\" />\n</template>\n"],"mappings":";;;;;;AAsBA,IAAM,2BAA2B;;;;;;;;EARjC,MAAM,gBAAgB,eAAe;AACnC,OAAI,CAAC,QAAA,OACH;AAGF,UAAO,gBAAgB,mBAAmB,QAAA,OAAO,CAAA;IAClD;EAID,MAAM,yBAAyB,eAAe;AAC5C,WAAQ,cAAc,OAAO,UAAU,KAAK;IAC7C;;WAKU,uBAAA,SAAA,WAAA,EADT,YAKgD,MAAA,gBAAA,EAAA;;IAH7C,IAAI,QAAA;IACL,OAAM;IACN,MAAK;IACJ,sBAAsB,cAAA,SAAa;gEACtC,YAKgB,MAAA,uBAAA,EAAA;;IAHb,IAAI,QAAA;IACL,OAAM;IACL,SAAS,cAAA,SAAa;IACvB,MAAK"}
1
+ {"version":3,"file":"ExampleSchema.vue.script.js","names":[],"sources":["../../../src/features/example-responses/ExampleSchema.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { getResolvedRefDeep } from '@scalar/blocks/code-example'\nimport { ScalarCodeBlock } from '@scalar/components/code-block'\nimport { ScalarVirtualCodeBlock } from '@scalar/components/virtual-code-block'\nimport { prettyPrintJson } from '@scalar/helpers/json/pretty-print-json'\nimport type { ReferenceType } from '@scalar/workspace-store/schemas/v3.1/strict/reference'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/schema'\nimport { computed } from 'vue'\n\nconst { id, schema } = defineProps<{\n id: string\n schema: ReferenceType<SchemaObject>\n}>()\n\nconst schemaContent = computed(() => {\n if (!schema) {\n return undefined\n }\n\n return prettyPrintJson(getResolvedRefDeep(schema))\n})\n\nconst VIRTUALIZATION_THRESHOLD = 20_000\n\nconst shouldVirtualizeSchema = computed(() => {\n return (schemaContent.value?.length ?? 0) > VIRTUALIZATION_THRESHOLD\n})\n</script>\n\n<template>\n <ScalarCodeBlock\n v-if=\"!shouldVirtualizeSchema\"\n :id=\"id\"\n class=\"bg-b-2\"\n lang=\"json\"\n :prettyPrintedContent=\"schemaContent ?? ''\" />\n <ScalarVirtualCodeBlock\n v-else\n :id=\"id\"\n class=\"bg-b-2\"\n :content=\"schemaContent ?? ''\"\n lang=\"json\" />\n</template>\n"],"mappings":";;;;;;AAsBA,IAAM,2BAA2B;;;;;;;;EARjC,MAAM,gBAAgB,eAAe;AACnC,OAAI,CAAC,QAAA,OACH;AAGF,UAAO,gBAAgB,mBAAmB,QAAA,OAAO,CAAA;IAClD;EAID,MAAM,yBAAyB,eAAe;AAC5C,WAAQ,cAAc,OAAO,UAAU,KAAK;IAC7C;;WAKU,uBAAA,SAAA,WAAA,EADT,YAKgD,MAAA,gBAAA,EAAA;;IAH7C,IAAI,QAAA;IACL,OAAM;IACN,MAAK;IACJ,sBAAsB,cAAA,SAAa;gEACtC,YAKgB,MAAA,uBAAA,EAAA;;IAHb,IAAI,QAAA;IACL,OAAM;IACL,SAAS,cAAA,SAAa;IACvB,MAAK"}
@@ -1 +1 @@
1
- {"version":3,"file":"Contact.vue.d.ts","sourceRoot":"","sources":["../../../src/features/info-object/Contact.vue"],"names":[],"mappings":"AA2DA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8DAA8D,CAAA;AAWjG,KAAK,WAAW,GAAG;IACjB,KAAK,CAAC,EAAE,aAAa,CAAA;CACtB,CAAC;AAmGF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"Contact.vue.d.ts","sourceRoot":"","sources":["../../../src/features/info-object/Contact.vue"],"names":[],"mappings":"AAiEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8DAA8D,CAAA;AAWjG,KAAK,WAAW,GAAG;IACjB,KAAK,CAAC,EAAE,aAAa,CAAA;CACtB,CAAC;AAmHF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Contact.vue.js","names":[],"sources":["../../../src/features/info-object/Contact.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarIconEnvelopeSimple, ScalarIconLink } from '@scalar/icons'\nimport { cva } from '@scalar/use-hooks/useBindCx'\nimport type { ContactObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nconst variants = cva({\n base: 'text-c-1 mr-2 flex min-h-7 min-w-7 items-center rounded-lg border px-2 py-1 group-last:mr-0 xl:border-none',\n variants: {\n link: {\n true: 'no-underline hover:bg-b-2',\n },\n },\n})\n\ndefineProps<{\n value?: ContactObject\n}>()\n</script>\n\n<template>\n <template v-if=\"value\">\n <div\n class=\"group flex items-center last:border-r-0 xl:border-r xl:first:ml-auto\">\n <a\n v-if=\"value.email\"\n :class=\"variants({ link: true })\"\n :href=\"`mailto:${value.email}`\">\n <ScalarIconEnvelopeSimple\n weight=\"bold\"\n class=\"size-3 text-current\" />\n <span class=\"ml-1 empty:hidden\">{{ value.name }}</span>\n </a>\n <a\n v-if=\"value.url\"\n :class=\"variants({ link: true })\"\n :href=\"value.url\"\n rel=\"noopener noreferrer\"\n target=\"_blank\">\n <ScalarIconLink\n weight=\"bold\"\n class=\"size-3 text-current\" />\n <!-- Avoid repeating the name when the email link already shows it -->\n <span class=\"ml-1 empty:hidden\">{{\n value.email ? '' : value.name\n }}</span>\n </a>\n <span\n v-else-if=\"!value.email && value.name\"\n :class=\"variants({ link: false })\">\n {{ value.name }}\n </span>\n </div>\n </template>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"Contact.vue.js","names":[],"sources":["../../../src/features/info-object/Contact.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarIconEnvelopeSimple, ScalarIconLink } from '@scalar/icons'\nimport { cva } from '@scalar/use-hooks/useBindCx'\nimport type { ContactObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nconst variants = cva({\n base: 'text-c-1 mr-2 flex min-h-7 min-w-7 items-center rounded-lg border px-2 py-1 group-last:mr-0 xl:border-none',\n variants: {\n link: {\n true: 'no-underline hover:bg-b-2',\n },\n },\n})\n\ndefineProps<{\n value?: ContactObject\n}>()\n</script>\n\n<template>\n <template v-if=\"value\">\n <!-- Each link gets its own wrapper so the dividers render between them -->\n <div\n v-if=\"value.email\"\n class=\"group flex items-center last:border-r-0 xl:border-r xl:first:ml-auto\">\n <a\n :class=\"variants({ link: true })\"\n :href=\"`mailto:${value.email}`\">\n <ScalarIconEnvelopeSimple\n weight=\"bold\"\n class=\"size-3 text-current\" />\n <span class=\"ml-1 empty:hidden\">{{ value.name }}</span>\n </a>\n </div>\n <div\n v-if=\"value.url\"\n class=\"group flex items-center last:border-r-0 xl:border-r xl:first:ml-auto\">\n <a\n :class=\"variants({ link: true })\"\n :href=\"value.url\"\n rel=\"noopener noreferrer\"\n target=\"_blank\">\n <ScalarIconLink\n weight=\"bold\"\n class=\"size-3 text-current\" />\n <!-- Avoid repeating the name when the email link already shows it -->\n <span class=\"ml-1 empty:hidden\">{{\n value.email ? '' : value.name\n }}</span>\n </a>\n </div>\n <div\n v-else-if=\"!value.email && value.name\"\n class=\"group flex items-center last:border-r-0 xl:border-r xl:first:ml-auto\">\n <span :class=\"variants({ link: false })\">\n {{ value.name }}\n </span>\n </div>\n </template>\n</template>\n"],"mappings":""}
@@ -1,4 +1,4 @@
1
- import { createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, normalizeClass, openBlock, toDisplayString, unref } from "vue";
1
+ import { Fragment, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, normalizeClass, openBlock, toDisplayString, unref } from "vue";
2
2
  import { ScalarIconEnvelopeSimple, ScalarIconLink } from "@scalar/icons";
3
3
  import { cva } from "@scalar/use-hooks/useBindCx";
4
4
  //#region src/features/info-object/Contact.vue?vue&type=script&setup=true&lang.ts
@@ -8,8 +8,16 @@ var _hoisted_1 = {
8
8
  };
9
9
  var _hoisted_2 = ["href"];
10
10
  var _hoisted_3 = { class: "ml-1 empty:hidden" };
11
- var _hoisted_4 = ["href"];
12
- var _hoisted_5 = { class: "ml-1 empty:hidden" };
11
+ var _hoisted_4 = {
12
+ key: 1,
13
+ class: "group flex items-center last:border-r-0 xl:border-r xl:first:ml-auto"
14
+ };
15
+ var _hoisted_5 = ["href"];
16
+ var _hoisted_6 = { class: "ml-1 empty:hidden" };
17
+ var _hoisted_7 = {
18
+ key: 2,
19
+ class: "group flex items-center last:border-r-0 xl:border-r xl:first:ml-auto"
20
+ };
13
21
  var Contact_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
14
22
  __name: "Contact",
15
23
  props: { value: {} },
@@ -19,15 +27,13 @@ var Contact_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ define
19
27
  variants: { link: { true: "no-underline hover:bg-b-2" } }
20
28
  });
21
29
  return (_ctx, _cache) => {
22
- return __props.value ? (openBlock(), createElementBlock("div", _hoisted_1, [__props.value.email ? (openBlock(), createElementBlock("a", {
23
- key: 0,
30
+ return __props.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [__props.value.email ? (openBlock(), createElementBlock("div", _hoisted_1, [createElementVNode("a", {
24
31
  class: normalizeClass(unref(variants)({ link: true })),
25
32
  href: `mailto:${__props.value.email}`
26
33
  }, [createVNode(unref(ScalarIconEnvelopeSimple), {
27
34
  weight: "bold",
28
35
  class: "size-3 text-current"
29
- }), createElementVNode("span", _hoisted_3, toDisplayString(__props.value.name), 1)], 10, _hoisted_2)) : createCommentVNode("", true), __props.value.url ? (openBlock(), createElementBlock("a", {
30
- key: 1,
36
+ }), createElementVNode("span", _hoisted_3, toDisplayString(__props.value.name), 1)], 10, _hoisted_2)])) : createCommentVNode("", true), __props.value.url ? (openBlock(), createElementBlock("div", _hoisted_4, [createElementVNode("a", {
31
37
  class: normalizeClass(unref(variants)({ link: true })),
32
38
  href: __props.value.url,
33
39
  rel: "noopener noreferrer",
@@ -35,10 +41,7 @@ var Contact_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ define
35
41
  }, [createVNode(unref(ScalarIconLink), {
36
42
  weight: "bold",
37
43
  class: "size-3 text-current"
38
- }), createElementVNode("span", _hoisted_5, toDisplayString(__props.value.email ? "" : __props.value.name), 1)], 10, _hoisted_4)) : !__props.value.email && __props.value.name ? (openBlock(), createElementBlock("span", {
39
- key: 2,
40
- class: normalizeClass(unref(variants)({ link: false }))
41
- }, toDisplayString(__props.value.name), 3)) : createCommentVNode("", true)])) : createCommentVNode("", true);
44
+ }), createElementVNode("span", _hoisted_6, toDisplayString(__props.value.email ? "" : __props.value.name), 1)], 10, _hoisted_5)])) : !__props.value.email && __props.value.name ? (openBlock(), createElementBlock("div", _hoisted_7, [createElementVNode("span", { class: normalizeClass(unref(variants)({ link: false })) }, toDisplayString(__props.value.name), 3)])) : createCommentVNode("", true)], 64)) : createCommentVNode("", true);
42
45
  };
43
46
  }
44
47
  });
@@ -1 +1 @@
1
- {"version":3,"file":"Contact.vue.script.js","names":[],"sources":["../../../src/features/info-object/Contact.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarIconEnvelopeSimple, ScalarIconLink } from '@scalar/icons'\nimport { cva } from '@scalar/use-hooks/useBindCx'\nimport type { ContactObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nconst variants = cva({\n base: 'text-c-1 mr-2 flex min-h-7 min-w-7 items-center rounded-lg border px-2 py-1 group-last:mr-0 xl:border-none',\n variants: {\n link: {\n true: 'no-underline hover:bg-b-2',\n },\n },\n})\n\ndefineProps<{\n value?: ContactObject\n}>()\n</script>\n\n<template>\n <template v-if=\"value\">\n <div\n class=\"group flex items-center last:border-r-0 xl:border-r xl:first:ml-auto\">\n <a\n v-if=\"value.email\"\n :class=\"variants({ link: true })\"\n :href=\"`mailto:${value.email}`\">\n <ScalarIconEnvelopeSimple\n weight=\"bold\"\n class=\"size-3 text-current\" />\n <span class=\"ml-1 empty:hidden\">{{ value.name }}</span>\n </a>\n <a\n v-if=\"value.url\"\n :class=\"variants({ link: true })\"\n :href=\"value.url\"\n rel=\"noopener noreferrer\"\n target=\"_blank\">\n <ScalarIconLink\n weight=\"bold\"\n class=\"size-3 text-current\" />\n <!-- Avoid repeating the name when the email link already shows it -->\n <span class=\"ml-1 empty:hidden\">{{\n value.email ? '' : value.name\n }}</span>\n </a>\n <span\n v-else-if=\"!value.email && value.name\"\n :class=\"variants({ link: false })\">\n {{ value.name }}\n </span>\n </div>\n </template>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;EAKA,MAAM,WAAW,IAAI;GACnB,MAAM;GACN,UAAU,EACR,MAAM,EACJ,MAAM,6BACP,EACF;GACF,CAAA;;UAQiB,QAAA,SAAA,WAAA,EACd,mBA8BM,OA9BN,YA8BM,CA3BI,QAAA,MAAM,SAAA,WAAA,EADd,mBAQI,KAAA;;IAND,OAAK,eAAE,MAAA,SAAQ,CAAA,EAAA,MAAA,MAAA,CAAA,CAAA;IACf,MAAI,UAAY,QAAA,MAAM;OACvB,YAEgC,MAAA,yBAAA,EAAA;IAD9B,QAAO;IACP,OAAM;OACR,mBAAuD,QAAvD,YAAuD,gBAApB,QAAA,MAAM,KAAI,EAAA,EAAA,CAAA,EAAA,IAAA,WAAA,IAAA,mBAAA,IAAA,KAAA,EAGvC,QAAA,MAAM,OAAA,WAAA,EADd,mBAaI,KAAA;;IAXD,OAAK,eAAE,MAAA,SAAQ,CAAA,EAAA,MAAA,MAAA,CAAA,CAAA;IACf,MAAM,QAAA,MAAM;IACb,KAAI;IACJ,QAAO;OACP,YAEgC,MAAA,eAAA,EAAA;IAD9B,QAAO;IACP,OAAM;OAER,mBAES,QAFT,YAES,gBADP,QAAA,MAAM,QAAK,KAAQ,QAAA,MAAM,KAAI,EAAA,EAAA,CAAA,EAAA,IAAA,WAAA,IAAA,CAInB,QAAA,MAAM,SAAS,QAAA,MAAM,QAAA,WAAA,EADnC,mBAIO,QAAA;;IAFJ,OAAK,eAAE,MAAA,SAAQ,CAAA,EAAA,MAAA,OAAA,CAAA,CAAA;sBACb,QAAA,MAAM,KAAI,EAAA,EAAA,IAAA,mBAAA,IAAA,KAAA,CAAA,CAAA,IAAA,mBAAA,IAAA,KAAA"}
1
+ {"version":3,"file":"Contact.vue.script.js","names":[],"sources":["../../../src/features/info-object/Contact.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarIconEnvelopeSimple, ScalarIconLink } from '@scalar/icons'\nimport { cva } from '@scalar/use-hooks/useBindCx'\nimport type { ContactObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nconst variants = cva({\n base: 'text-c-1 mr-2 flex min-h-7 min-w-7 items-center rounded-lg border px-2 py-1 group-last:mr-0 xl:border-none',\n variants: {\n link: {\n true: 'no-underline hover:bg-b-2',\n },\n },\n})\n\ndefineProps<{\n value?: ContactObject\n}>()\n</script>\n\n<template>\n <template v-if=\"value\">\n <!-- Each link gets its own wrapper so the dividers render between them -->\n <div\n v-if=\"value.email\"\n class=\"group flex items-center last:border-r-0 xl:border-r xl:first:ml-auto\">\n <a\n :class=\"variants({ link: true })\"\n :href=\"`mailto:${value.email}`\">\n <ScalarIconEnvelopeSimple\n weight=\"bold\"\n class=\"size-3 text-current\" />\n <span class=\"ml-1 empty:hidden\">{{ value.name }}</span>\n </a>\n </div>\n <div\n v-if=\"value.url\"\n class=\"group flex items-center last:border-r-0 xl:border-r xl:first:ml-auto\">\n <a\n :class=\"variants({ link: true })\"\n :href=\"value.url\"\n rel=\"noopener noreferrer\"\n target=\"_blank\">\n <ScalarIconLink\n weight=\"bold\"\n class=\"size-3 text-current\" />\n <!-- Avoid repeating the name when the email link already shows it -->\n <span class=\"ml-1 empty:hidden\">{{\n value.email ? '' : value.name\n }}</span>\n </a>\n </div>\n <div\n v-else-if=\"!value.email && value.name\"\n class=\"group flex items-center last:border-r-0 xl:border-r xl:first:ml-auto\">\n <span :class=\"variants({ link: false })\">\n {{ value.name }}\n </span>\n </div>\n </template>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;EAKA,MAAM,WAAW,IAAI;GACnB,MAAM;GACN,UAAU,EACR,MAAM,EACJ,MAAM,6BACP,EACF;GACF,CAAA;;UAQiB,QAAA,SAAA,WAAA,EAAhB,mBAsCW,UAAA,EAAA,KAAA,GAAA,EAAA,CAnCD,QAAA,MAAM,SAAA,WAAA,EADd,mBAWM,OAXN,YAWM,CARJ,mBAOI,KAAA;IAND,OAAK,eAAE,MAAA,SAAQ,CAAA,EAAA,MAAA,MAAA,CAAA,CAAA;IACf,MAAI,UAAY,QAAA,MAAM;OACvB,YAEgC,MAAA,yBAAA,EAAA;IAD9B,QAAO;IACP,OAAM;OACR,mBAAuD,QAAvD,YAAuD,gBAApB,QAAA,MAAM,KAAI,EAAA,EAAA,CAAA,EAAA,IAAA,WAAA,CAAA,CAAA,IAAA,mBAAA,IAAA,KAAA,EAIzC,QAAA,MAAM,OAAA,WAAA,EADd,mBAgBM,OAhBN,YAgBM,CAbJ,mBAYI,KAAA;IAXD,OAAK,eAAE,MAAA,SAAQ,CAAA,EAAA,MAAA,MAAA,CAAA,CAAA;IACf,MAAM,QAAA,MAAM;IACb,KAAI;IACJ,QAAO;OACP,YAEgC,MAAA,eAAA,EAAA;IAD9B,QAAO;IACP,OAAM;OAER,mBAES,QAFT,YAES,gBADP,QAAA,MAAM,QAAK,KAAQ,QAAA,MAAM,KAAI,EAAA,EAAA,CAAA,EAAA,IAAA,WAAA,CAAA,CAAA,IAAA,CAKrB,QAAA,MAAM,SAAS,QAAA,MAAM,QAAA,WAAA,EADnC,mBAMM,OANN,YAMM,CAHJ,mBAEO,QAAA,EAFA,OAAK,eAAE,MAAA,SAAQ,CAAA,EAAA,MAAA,OAAA,CAAA,CAAA,EAAA,EAAA,gBACjB,QAAA,MAAM,KAAI,EAAA,EAAA,CAAA,CAAA,IAAA,mBAAA,IAAA,KAAA,CAAA,EAAA,GAAA,IAAA,mBAAA,IAAA,KAAA"}
@@ -0,0 +1,8 @@
1
+ type __VLS_Props = {
2
+ name: string;
3
+ url: string;
4
+ };
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
8
+ //# sourceMappingURL=InfoLink.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InfoLink.vue.d.ts","sourceRoot":"","sources":["../../../src/features/info-object/InfoLink.vue"],"names":[],"mappings":"AA6BA,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;CACZ,CAAC;AAyEF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -0,0 +1,7 @@
1
+ import InfoLink_vue_vue_type_script_setup_true_lang_default from "./InfoLink.vue.script.js";
2
+ //#region src/features/info-object/InfoLink.vue
3
+ var InfoLink_default = InfoLink_vue_vue_type_script_setup_true_lang_default;
4
+ //#endregion
5
+ export { InfoLink_default as default };
6
+
7
+ //# sourceMappingURL=InfoLink.vue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InfoLink.vue.js","names":[],"sources":["../../../src/features/info-object/InfoLink.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarIconLink } from '@scalar/icons'\n\ndefineProps<{\n name: string\n url: string\n}>()\n</script>\n\n<template>\n <div\n class=\"group flex items-center last:border-r-0 xl:border-r xl:first:ml-auto\">\n <a\n class=\"text-c-1 hover:bg-b-2 mr-2 flex min-h-7 min-w-7 items-center rounded-lg border px-2 py-1 no-underline group-last:mr-0 xl:border-none\"\n :href=\"url\"\n target=\"_blank\"\n rel=\"noopener noreferrer\">\n <ScalarIconLink\n weight=\"bold\"\n class=\"size-3 text-current\" />\n <span class=\"ml-1 empty:hidden\">{{ name }}</span>\n </a>\n </div>\n</template>\n"],"mappings":""}
@@ -0,0 +1,30 @@
1
+ import { createElementBlock, createElementVNode, createVNode, defineComponent, openBlock, toDisplayString, unref } from "vue";
2
+ import { ScalarIconLink } from "@scalar/icons";
3
+ //#region src/features/info-object/InfoLink.vue?vue&type=script&setup=true&lang.ts
4
+ var _hoisted_1 = { class: "group flex items-center last:border-r-0 xl:border-r xl:first:ml-auto" };
5
+ var _hoisted_2 = ["href"];
6
+ var _hoisted_3 = { class: "ml-1 empty:hidden" };
7
+ var InfoLink_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
8
+ __name: "InfoLink",
9
+ props: {
10
+ name: {},
11
+ url: {}
12
+ },
13
+ setup(__props) {
14
+ return (_ctx, _cache) => {
15
+ return openBlock(), createElementBlock("div", _hoisted_1, [createElementVNode("a", {
16
+ class: "text-c-1 hover:bg-b-2 mr-2 flex min-h-7 min-w-7 items-center rounded-lg border px-2 py-1 no-underline group-last:mr-0 xl:border-none",
17
+ href: __props.url,
18
+ target: "_blank",
19
+ rel: "noopener noreferrer"
20
+ }, [createVNode(unref(ScalarIconLink), {
21
+ weight: "bold",
22
+ class: "size-3 text-current"
23
+ }), createElementVNode("span", _hoisted_3, toDisplayString(__props.name), 1)], 8, _hoisted_2)]);
24
+ };
25
+ }
26
+ });
27
+ //#endregion
28
+ export { InfoLink_vue_vue_type_script_setup_true_lang_default as default };
29
+
30
+ //# sourceMappingURL=InfoLink.vue.script.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InfoLink.vue.script.js","names":[],"sources":["../../../src/features/info-object/InfoLink.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarIconLink } from '@scalar/icons'\n\ndefineProps<{\n name: string\n url: string\n}>()\n</script>\n\n<template>\n <div\n class=\"group flex items-center last:border-r-0 xl:border-r xl:first:ml-auto\">\n <a\n class=\"text-c-1 hover:bg-b-2 mr-2 flex min-h-7 min-w-7 items-center rounded-lg border px-2 py-1 no-underline group-last:mr-0 xl:border-none\"\n :href=\"url\"\n target=\"_blank\"\n rel=\"noopener noreferrer\">\n <ScalarIconLink\n weight=\"bold\"\n class=\"size-3 text-current\" />\n <span class=\"ml-1 empty:hidden\">{{ name }}</span>\n </a>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;uBAUE,mBAYM,OAZN,YAYM,CAVJ,mBASI,KAAA;IARF,OAAM;IACL,MAAM,QAAA;IACP,QAAO;IACP,KAAI;OACJ,YAEgC,MAAA,eAAA,EAAA;IAD9B,QAAO;IACP,OAAM;OACR,mBAAiD,QAAjD,YAAiD,gBAAd,QAAA,KAAI,EAAA,EAAA,CAAA,EAAA,GAAA,WAAA,CAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"TermsOfService.vue.d.ts","sourceRoot":"","sources":["../../../src/features/info-object/TermsOfService.vue"],"names":[],"mappings":"AA8BA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8DAA8D,CAAA;AAE9F,KAAK,WAAW,GAAG;IACjB,KAAK,CAAC,EAAE,UAAU,CAAC,gBAAgB,CAAC,CAAA;CACrC,CAAC;AA0EF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"TermsOfService.vue.d.ts","sourceRoot":"","sources":["../../../src/features/info-object/TermsOfService.vue"],"names":[],"mappings":"AAmCA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8DAA8D,CAAA;AAI9F,KAAK,WAAW,GAAG;IACjB,KAAK,CAAC,EAAE,UAAU,CAAC,gBAAgB,CAAC,CAAA;CACrC,CAAC;AA6EF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1 +1 @@
1
- {"version":3,"file":"TermsOfService.vue.js","names":[],"sources":["../../../src/features/info-object/TermsOfService.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarIconScroll } from '@scalar/icons'\nimport type { InfoObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\ndefineProps<{\n value?: InfoObject['termsOfService']\n}>()\n</script>\n\n<template>\n <template v-if=\"value\">\n <div\n class=\"group flex items-center last:border-r-0 xl:border-r xl:first:ml-auto\">\n <a\n class=\"text-c-1 hover:bg-b-2 mr-2 flex min-h-7 min-w-7 items-center rounded-lg border px-2 py-1 no-underline group-last:mr-0 xl:border-none\"\n :href=\"value\"\n target=\"_blank\"\n rel=\"noopener noreferrer\">\n <ScalarIconScroll\n weight=\"bold\"\n class=\"size-3 text-current\" />\n <span class=\"ml-1 empty:hidden\">Terms of Service</span>\n </a>\n </div>\n </template>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"TermsOfService.vue.js","names":[],"sources":["../../../src/features/info-object/TermsOfService.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarIconScroll } from '@scalar/icons'\nimport type { InfoObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nimport { useLocalization } from '@/features/localization'\n\ndefineProps<{\n value?: InfoObject['termsOfService']\n}>()\nconst { translate } = useLocalization()\n</script>\n\n<template>\n <template v-if=\"value\">\n <div\n class=\"group flex items-center last:border-r-0 xl:border-r xl:first:ml-auto\">\n <a\n class=\"text-c-1 hover:bg-b-2 mr-2 flex min-h-7 min-w-7 items-center rounded-lg border px-2 py-1 no-underline group-last:mr-0 xl:border-none\"\n :href=\"value\"\n rel=\"noopener noreferrer\"\n target=\"_blank\">\n <ScalarIconScroll\n class=\"size-3 text-current\"\n weight=\"bold\" />\n <span class=\"ml-1 empty:hidden\">\n {{ translate('info.termsOfService') }}\n </span>\n </a>\n </div>\n </template>\n</template>\n"],"mappings":""}
@@ -1,4 +1,5 @@
1
- import { createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, openBlock, unref } from "vue";
1
+ import { useLocalization } from "../localization/use-localization.js";
2
+ import { createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, openBlock, toDisplayString, unref } from "vue";
2
3
  import { ScalarIconScroll } from "@scalar/icons";
3
4
  //#region src/features/info-object/TermsOfService.vue?vue&type=script&setup=true&lang.ts
4
5
  var _hoisted_1 = {
@@ -6,20 +7,22 @@ var _hoisted_1 = {
6
7
  class: "group flex items-center last:border-r-0 xl:border-r xl:first:ml-auto"
7
8
  };
8
9
  var _hoisted_2 = ["href"];
10
+ var _hoisted_3 = { class: "ml-1 empty:hidden" };
9
11
  var TermsOfService_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
10
12
  __name: "TermsOfService",
11
13
  props: { value: {} },
12
14
  setup(__props) {
15
+ const { translate } = useLocalization();
13
16
  return (_ctx, _cache) => {
14
17
  return __props.value ? (openBlock(), createElementBlock("div", _hoisted_1, [createElementVNode("a", {
15
18
  class: "text-c-1 hover:bg-b-2 mr-2 flex min-h-7 min-w-7 items-center rounded-lg border px-2 py-1 no-underline group-last:mr-0 xl:border-none",
16
19
  href: __props.value,
17
- target: "_blank",
18
- rel: "noopener noreferrer"
20
+ rel: "noopener noreferrer",
21
+ target: "_blank"
19
22
  }, [createVNode(unref(ScalarIconScroll), {
20
- weight: "bold",
21
- class: "size-3 text-current"
22
- }), _cache[0] || (_cache[0] = createElementVNode("span", { class: "ml-1 empty:hidden" }, "Terms of Service", -1))], 8, _hoisted_2)])) : createCommentVNode("", true);
23
+ class: "size-3 text-current",
24
+ weight: "bold"
25
+ }), createElementVNode("span", _hoisted_3, toDisplayString(unref(translate)("info.termsOfService")), 1)], 8, _hoisted_2)])) : createCommentVNode("", true);
23
26
  };
24
27
  }
25
28
  });
@@ -1 +1 @@
1
- {"version":3,"file":"TermsOfService.vue.script.js","names":[],"sources":["../../../src/features/info-object/TermsOfService.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarIconScroll } from '@scalar/icons'\nimport type { InfoObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\ndefineProps<{\n value?: InfoObject['termsOfService']\n}>()\n</script>\n\n<template>\n <template v-if=\"value\">\n <div\n class=\"group flex items-center last:border-r-0 xl:border-r xl:first:ml-auto\">\n <a\n class=\"text-c-1 hover:bg-b-2 mr-2 flex min-h-7 min-w-7 items-center rounded-lg border px-2 py-1 no-underline group-last:mr-0 xl:border-none\"\n :href=\"value\"\n target=\"_blank\"\n rel=\"noopener noreferrer\">\n <ScalarIconScroll\n weight=\"bold\"\n class=\"size-3 text-current\" />\n <span class=\"ml-1 empty:hidden\">Terms of Service</span>\n </a>\n </div>\n </template>\n</template>\n"],"mappings":";;;;;;;;;;;;;UAUkB,QAAA,SAAA,WAAA,EACd,mBAYM,OAZN,YAYM,CAVJ,mBASI,KAAA;IARF,OAAM;IACL,MAAM,QAAA;IACP,QAAO;IACP,KAAI;OACJ,YAEgC,MAAA,iBAAA,EAAA;IAD9B,QAAO;IACP,OAAM;iCACR,mBAAuD,QAAA,EAAjD,OAAM,qBAAmB,EAAC,oBAAgB,GAAA,EAAA,EAAA,GAAA,WAAA,CAAA,CAAA,IAAA,mBAAA,IAAA,KAAA"}
1
+ {"version":3,"file":"TermsOfService.vue.script.js","names":[],"sources":["../../../src/features/info-object/TermsOfService.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarIconScroll } from '@scalar/icons'\nimport type { InfoObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nimport { useLocalization } from '@/features/localization'\n\ndefineProps<{\n value?: InfoObject['termsOfService']\n}>()\nconst { translate } = useLocalization()\n</script>\n\n<template>\n <template v-if=\"value\">\n <div\n class=\"group flex items-center last:border-r-0 xl:border-r xl:first:ml-auto\">\n <a\n class=\"text-c-1 hover:bg-b-2 mr-2 flex min-h-7 min-w-7 items-center rounded-lg border px-2 py-1 no-underline group-last:mr-0 xl:border-none\"\n :href=\"value\"\n rel=\"noopener noreferrer\"\n target=\"_blank\">\n <ScalarIconScroll\n class=\"size-3 text-current\"\n weight=\"bold\" />\n <span class=\"ml-1 empty:hidden\">\n {{ translate('info.termsOfService') }}\n </span>\n </a>\n </div>\n </template>\n</template>\n"],"mappings":";;;;;;;;;;;;;;EASA,MAAM,EAAE,cAAc,iBAAgB;;UAIpB,QAAA,SAAA,WAAA,EACd,mBAcM,OAdN,YAcM,CAZJ,mBAWI,KAAA;IAVF,OAAM;IACL,MAAM,QAAA;IACP,KAAI;IACJ,QAAO;OACP,YAEkB,MAAA,iBAAA,EAAA;IADhB,OAAM;IACN,QAAO;OACT,mBAEO,QAFP,YAEO,gBADF,MAAA,UAAS,CAAA,sBAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,WAAA,CAAA,CAAA,IAAA,mBAAA,IAAA,KAAA"}
@@ -1,4 +1,5 @@
1
1
  export { default as Contact } from './Contact.vue.js';
2
+ export { default as InfoLink } from './InfoLink.vue.js';
2
3
  export { default as License } from './License.vue.js';
3
4
  export { default as TermsOfService } from './TermsOfService.vue.js';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/features/info-object/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/features/info-object/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACpD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA"}
@@ -0,0 +1,2 @@
1
+ export { provideLocalization, resolveLocalization, useLocalization, } from './use-localization.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/features/localization/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,eAAe,GAChB,MAAM,oBAAoB,CAAA"}