@scalar/api-reference 1.63.0 → 1.64.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 (656) hide show
  1. package/CHANGELOG.md +90 -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.script.js +1 -1
  4. package/dist/blocks/scalar-asyncapi-server-selector-block/components/AsyncApiServerSelector.vue.script.js.map +1 -1
  5. package/dist/blocks/scalar-asyncapi-server-selector-block/components/Selector.vue.d.ts.map +1 -1
  6. package/dist/blocks/scalar-asyncapi-server-selector-block/components/Selector.vue.script.js +1 -1
  7. package/dist/blocks/scalar-asyncapi-server-selector-block/components/Selector.vue.script.js.map +1 -1
  8. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/AsyncApiSidebarFilters.vue.script.js +2 -2
  9. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/AsyncApiSidebarFilters.vue.script.js.map +1 -1
  10. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/SidebarFilter.vue.d.ts.map +1 -1
  11. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/SidebarFilter.vue.script.js +1 -1
  12. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/SidebarFilter.vue.script.js.map +1 -1
  13. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/helpers/filter-async-api-navigation.js.map +1 -1
  14. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts +1 -3
  15. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts.map +1 -1
  16. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js +1 -1
  17. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js.map +1 -1
  18. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.script.js +13 -27
  19. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.script.js.map +1 -1
  20. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.d.ts.map +1 -1
  21. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.js +1 -1
  22. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.js.map +1 -1
  23. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.script.js +37 -25
  24. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.script.js.map +1 -1
  25. package/dist/blocks/scalar-client-selector-block/helpers/featured-clients.js.map +1 -1
  26. package/dist/blocks/scalar-info-block/components/DownloadLink.vue.d.ts.map +1 -1
  27. package/dist/blocks/scalar-info-block/components/DownloadLink.vue.js +1 -1
  28. package/dist/blocks/scalar-info-block/components/DownloadLink.vue.js.map +1 -1
  29. package/dist/blocks/scalar-info-block/components/DownloadLink.vue.script.js +10 -4
  30. package/dist/blocks/scalar-info-block/components/DownloadLink.vue.script.js.map +1 -1
  31. package/dist/blocks/scalar-info-block/components/InfoBlock.vue.script.js +1 -1
  32. package/dist/blocks/scalar-info-block/components/InfoBlock.vue.script.js.map +1 -1
  33. package/dist/blocks/scalar-info-block/components/InfoDescription.vue.js +1 -1
  34. package/dist/blocks/scalar-info-block/components/InfoDescription.vue.script.js +1 -1
  35. package/dist/blocks/scalar-info-block/components/InfoDescription.vue.script.js.map +1 -1
  36. package/dist/blocks/scalar-info-block/components/InfoLinks.vue.script.js +1 -1
  37. package/dist/blocks/scalar-info-block/components/InfoLinks.vue.script.js.map +1 -1
  38. package/dist/blocks/scalar-info-block/components/InfoMarkdownSection.vue.script.js +1 -1
  39. package/dist/blocks/scalar-info-block/components/InfoMarkdownSection.vue.script.js.map +1 -1
  40. package/dist/blocks/scalar-info-block/components/InfoVersion.vue.script.js +1 -1
  41. package/dist/blocks/scalar-info-block/components/InfoVersion.vue.script.js.map +1 -1
  42. package/dist/blocks/scalar-info-block/components/IntroductionCard.vue.d.ts.map +1 -1
  43. package/dist/blocks/scalar-info-block/components/IntroductionCard.vue.js +1 -1
  44. package/dist/blocks/scalar-info-block/components/IntroductionCard.vue.js.map +1 -1
  45. package/dist/blocks/scalar-info-block/components/IntroductionCard.vue.script.js +1 -1
  46. package/dist/blocks/scalar-info-block/components/IntroductionCard.vue.script.js.map +1 -1
  47. package/dist/blocks/scalar-info-block/components/IntroductionCardItem.vue.js +1 -1
  48. package/dist/blocks/scalar-info-block/components/IntroductionCardItem.vue.js.map +1 -1
  49. package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.d.ts.map +1 -1
  50. package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.js +1 -1
  51. package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.script.js +1 -1
  52. package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.script.js.map +1 -1
  53. package/dist/blocks/scalar-info-block/components/IntroductionLoading.vue.d.ts.map +1 -1
  54. package/dist/blocks/scalar-info-block/components/IntroductionLoading.vue.js +1 -1
  55. package/dist/blocks/scalar-info-block/components/IntroductionLoading.vue.js.map +1 -1
  56. package/dist/blocks/scalar-info-block/components/IntroductionLoading.vue.script.js +5 -5
  57. package/dist/blocks/scalar-info-block/components/IntroductionLoading.vue.script.js.map +1 -1
  58. package/dist/blocks/scalar-info-block/components/SpecificationVersion.vue.script.js +1 -1
  59. package/dist/blocks/scalar-info-block/components/SpecificationVersion.vue.script.js.map +1 -1
  60. package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.d.ts.map +1 -1
  61. package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.js +1 -1
  62. package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.js.map +1 -1
  63. package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.script.js +16 -9
  64. package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.script.js.map +1 -1
  65. package/dist/blocks/scalar-sdk-installation-instructions/helpers/language-icon.js.map +1 -1
  66. package/dist/blocks/scalar-sdk-installation-instructions/helpers/renderable-sdks.js.map +1 -1
  67. package/dist/blocks/scalar-sdk-installation-instructions/helpers/visible-tab-count.js.map +1 -1
  68. package/dist/blocks/scalar-server-selector-block/components/Selector.vue.d.ts.map +1 -1
  69. package/dist/blocks/scalar-server-selector-block/components/Selector.vue.script.js +1 -1
  70. package/dist/blocks/scalar-server-selector-block/components/Selector.vue.script.js.map +1 -1
  71. package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.d.ts.map +1 -1
  72. package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.script.js +1 -1
  73. package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.script.js.map +1 -1
  74. package/dist/browser/chunks/AgentScalarChatInterface-D1mzA447.js +27 -0
  75. package/dist/browser/chunks/ScalarTextInput.vue-OfiA6SHf.js +27 -0
  76. package/dist/browser/chunks/{basic-shape-diamond.svg-BTEOT1FL.js → basic-shape-diamond.svg-o5eiY2I7.js} +2 -2
  77. package/dist/browser/chunks/{basic-shape-hexagon.svg-BSPzaCgF.js → basic-shape-hexagon.svg-CGuS7mbd.js} +2 -2
  78. package/dist/browser/chunks/{basic-shape-primary-circle-ellipse-round.svg-DKmZ8UUU.js → basic-shape-primary-circle-ellipse-round.svg-DDIpXiBm.js} +2 -2
  79. package/dist/browser/chunks/{basic-shape-primary-square-rectangle.svg-n2YRykHD.js → basic-shape-primary-square-rectangle.svg-DzVEJHMB.js} +2 -2
  80. package/dist/browser/chunks/{basic-shape-shield.svg-Bec9cJDA.js → basic-shape-shield.svg-BZzapRqv.js} +2 -2
  81. package/dist/browser/chunks/browser-CTPPEMEL.js +129 -0
  82. package/dist/browser/chunks/{computer-device-desktop-monitor.svg-m6j893Hb.js → computer-device-desktop-monitor.svg-OSM05r1I.js} +2 -2
  83. package/dist/browser/chunks/{computer-device-desktop.svg-Dk1VVO7k.js → computer-device-desktop.svg-BMFzGZ27.js} +2 -2
  84. package/dist/browser/chunks/{computer-device-laptop.svg-BNGVUCYS.js → computer-device-laptop.svg-CMAjzuB-.js} +2 -2
  85. package/dist/browser/chunks/{computer-device-mobile-phone-android-samsung-back.svg-CC4UUTFw.js → computer-device-mobile-phone-android-samsung-back.svg-D4xBONmL.js} +2 -2
  86. package/dist/browser/chunks/{computer-device-mobile-phone-android-samsung.svg-D8ExpMpL.js → computer-device-mobile-phone-android-samsung.svg-gbMJLjJw.js} +2 -2
  87. package/dist/browser/chunks/{computer-device-mobile-phone-iphone-x-back.svg-CLm7sgMM.js → computer-device-mobile-phone-iphone-x-back.svg-Bl1rmdKA.js} +2 -2
  88. package/dist/browser/chunks/{computer-device-mobile-phone-iphone-x.svg-Xrttg6_7.js → computer-device-mobile-phone-iphone-x.svg-DVetP0aa.js} +2 -2
  89. package/dist/browser/chunks/{computer-device-mobile-tablet-touch.svg-DQ2oTvOG.js → computer-device-mobile-tablet-touch.svg-Zi88BP4L.js} +2 -2
  90. package/dist/browser/chunks/{computer-device-mobile-tablet.svg-DCr0XlRc.js → computer-device-mobile-tablet.svg-C1ggisWP.js} +2 -2
  91. package/dist/browser/chunks/{computer-device-network-ethernet-cat6.svg-AK9l0iOl.js → computer-device-network-ethernet-cat6.svg-BIUymdC1.js} +2 -2
  92. package/dist/browser/chunks/{computer-device-network-lan-www.svg-gUIdFBlE.js → computer-device-network-lan-www.svg-CoFUlIVO.js} +2 -2
  93. package/dist/browser/chunks/{computer-device-network-wifi-connection.svg-Be-EMm4e.js → computer-device-network-wifi-connection.svg-DeWsacxI.js} +2 -2
  94. package/dist/browser/chunks/{computer-device-network-wifi-router.svg-Dc2VzyqK.js → computer-device-network-wifi-router.svg-BjpZEot4.js} +2 -2
  95. package/dist/browser/chunks/{ecology-science-erlenmeyer-flask.svg-DHgy7Jfd.js → ecology-science-erlenmeyer-flask.svg-ftjGGirE.js} +2 -2
  96. package/dist/browser/chunks/{image-flash-lightning.svg-EETR_y1q.js → image-flash-lightning.svg-DYQ0W4Fi.js} +2 -2
  97. package/dist/browser/chunks/{image-picture-flower.svg-DN1AYzJU.js → image-picture-flower.svg-Bfe5SVDf.js} +2 -2
  98. package/dist/browser/chunks/{interface-alert-exclamation-diamond.svg-C5NozMV_.js → interface-alert-exclamation-diamond.svg-D1HePDNM.js} +2 -2
  99. package/dist/browser/chunks/{interface-alert-exclamation-triangle-warning.svg-DaAg2fF5.js → interface-alert-exclamation-triangle-warning.svg-CILUsxBC.js} +2 -2
  100. package/dist/browser/chunks/{interface-alert-information-circle.svg-ckkkt9Mv.js → interface-alert-information-circle.svg-9LrbJM5J.js} +2 -2
  101. package/dist/browser/chunks/{interface-award-crown.svg-pjvn9hY-.js → interface-award-crown.svg-DllWgiU1.js} +2 -2
  102. package/dist/browser/chunks/{interface-bookmark.svg-BK9HKQBT.js → interface-bookmark-tag.svg-Dc-JL-Kc.js} +2 -2
  103. package/dist/browser/chunks/{interface-bookmark-tag.svg-r2r-lQq4.js → interface-bookmark.svg-Dc-JL-Kc.js} +2 -2
  104. package/dist/browser/chunks/{interface-calendar-date-one.svg-DNnF0M1I.js → interface-calendar-date-one.svg-DO2jelhF.js} +2 -2
  105. package/dist/browser/chunks/{interface-content-book-open-pages.svg-CQj_w9Vp.js → interface-content-book-open-pages.svg-BJjMjIgA.js} +2 -2
  106. package/dist/browser/chunks/{interface-content-book-page.svg-DppoeJRe.js → interface-content-book-page.svg-C6rKB2fs.js} +2 -2
  107. package/dist/browser/chunks/{interface-content-file.svg-CvcD7OiY.js → interface-content-file.svg-CS0q2FKx.js} +2 -2
  108. package/dist/browser/chunks/{interface-content-folder.svg-BmtS5I9A.js → interface-content-folder.svg-CThTWsJX.js} +2 -2
  109. package/dist/browser/chunks/{interface-copy-clipboard.svg-Be6EI50X.js → interface-copy-clipboard.svg-DdN67cLv.js} +2 -2
  110. package/dist/browser/chunks/{interface-edit-attachment.svg-G5TKzpWX.js → interface-edit-attachment.svg-Ciizphuh.js} +2 -2
  111. package/dist/browser/chunks/{interface-edit-binocular.svg-jzL-DvGB.js → interface-edit-binocular.svg-Dw1nDqmL.js} +2 -2
  112. package/dist/browser/chunks/{interface-edit-magic-wand.svg-BOTlymvp.js → interface-edit-magic-wand.svg-BYS0jm_E.js} +2 -2
  113. package/dist/browser/chunks/{interface-edit-tool-paint-roller.svg-s9dwryx7.js → interface-edit-tool-paint-roller.svg-NioSHZC2.js} +2 -2
  114. package/dist/browser/chunks/{interface-edit-tool-pencil.svg-C7v0dbB3.js → interface-edit-tool-pencil.svg-P87QFlat.js} +2 -2
  115. package/dist/browser/chunks/{interface-favorite-award.svg-CYHUgUG0.js → interface-favorite-award.svg-DBBAChSi.js} +2 -2
  116. package/dist/browser/chunks/{interface-favorite-flag.svg-C10zlKOb.js → interface-favorite-flag.svg-HlhPomHY.js} +2 -2
  117. package/dist/browser/chunks/{interface-favorite-heart.svg-eoduXxlz.js → interface-favorite-heart.svg-Cqu2GYDo.js} +2 -2
  118. package/dist/browser/chunks/{interface-favorite-star.svg-BSmxJetr.js → interface-favorite-star.svg-BD4JY_J2.js} +2 -2
  119. package/dist/browser/chunks/{interface-favorite-stars-sparkles.svg-JTFLj3Ls.js → interface-favorite-stars-sparkles.svg-BXi6aO8q.js} +2 -2
  120. package/dist/browser/chunks/{interface-hierarchy-flowchart.svg-Cg_Wy0kN.js → interface-hierarchy-flowchart.svg-CDEVSsD4.js} +2 -2
  121. package/dist/browser/chunks/{interface-home-house.svg-DytoGRnv.js → interface-home-house.svg-DJetUjwj.js} +2 -2
  122. package/dist/browser/chunks/{interface-hyperlink.svg-CuEfmmQI.js → interface-hyperlink.svg-DJ1LREmz.js} +2 -2
  123. package/dist/browser/chunks/{interface-lighting-brightness.svg-DSK0h_Pa.js → interface-lighting-brightness.svg-TGKAaHYV.js} +2 -2
  124. package/dist/browser/chunks/{interface-lock-closed.svg-Cn6TaLYv.js → interface-lock-closed.svg-3hehWr3i.js} +2 -2
  125. package/dist/browser/chunks/{interface-lock-open-unlock.svg-CVkG5-9W.js → interface-lock-open-unlock.svg-CuXKcv1m.js} +2 -2
  126. package/dist/browser/chunks/{interface-login-key.svg-y-cwwXjN.js → interface-login-key.svg-Chwvvywd.js} +2 -2
  127. package/dist/browser/chunks/{interface-search.svg-S-puVFJB.js → interface-search.svg-JDE3fk0u.js} +2 -2
  128. package/dist/browser/chunks/{interface-setting-cog.svg-CTH4_lLg.js → interface-setting-cog.svg-BBCkeh4K.js} +2 -2
  129. package/dist/browser/chunks/{interface-share-megaphone-bullhorn.svg-Pbp39MyC.js → interface-share-megaphone-bullhorn.svg-CDdxF-4y.js} +2 -2
  130. package/dist/browser/chunks/{interface-share-rocket.svg-BgCsIRZO.js → interface-share-rocket.svg-DSbdn_o7.js} +2 -2
  131. package/dist/browser/chunks/{interface-share-satellite.svg-DAMN9d5G.js → interface-share-satellite.svg-CefBVZvY.js} +2 -2
  132. package/dist/browser/chunks/{interface-share-space-ship.svg-Dt-Mejxk.js → interface-share-space-ship.svg-tFA2dsSU.js} +2 -2
  133. package/dist/browser/chunks/{interface-share.svg-vFYTXSti.js → interface-share.svg-BpOGopyv.js} +2 -2
  134. package/dist/browser/chunks/{interface-signal-square.svg-DNG4LpAe.js → interface-signal-square.svg-BcX_BoaC.js} +2 -2
  135. package/dist/browser/chunks/{interface-time-clock-circle.svg-Bpz-nLxo.js → interface-time-clock-circle.svg-C8B_L_RM.js} +2 -2
  136. package/dist/browser/chunks/{interface-time-hour-glass.svg-D7agfKsH.js → interface-time-hour-glass.svg-qw-oeoVn.js} +2 -2
  137. package/dist/browser/chunks/{interface-users-multiple.svg-CkPJBBnG.js → interface-users-multiple.svg-Cs13Eewq.js} +2 -2
  138. package/dist/browser/chunks/{interface-weather-moon.svg-CaTZFMPO.js → interface-weather-moon.svg-CV-oDTae.js} +2 -2
  139. package/dist/browser/chunks/{mail-chat-bubble-square.svg-DC8RIihp.js → mail-chat-bubble-square.svg-dpauJhin.js} +2 -2
  140. package/dist/browser/chunks/{mail-send-email-paper-airplane.svg-D8OLs9jz.js → mail-send-email-paper-airplane.svg-BBofxojL.js} +2 -2
  141. package/dist/browser/chunks/{mail-send-envelope.svg-CV33h5Sx.js → mail-send-envelope.svg-DyENgYOI.js} +2 -2
  142. package/dist/browser/chunks/modal-BS4e2gew.js +99 -0
  143. package/dist/browser/chunks/{money-cashier-receipt.svg-CJL8C2gs.js → money-cashier-receipt.svg-dNTr5aio.js} +2 -2
  144. package/dist/browser/chunks/{money-currency-dollar-pay.svg-VdBplCTx.js → money-currency-dollar-pay.svg-1ZESPtFY.js} +2 -2
  145. package/dist/browser/chunks/{money-graph-arrow-increase.svg-DcRov3zk.js → money-graph-arrow-increase.svg-kEZ2u2z2.js} +2 -2
  146. package/dist/browser/chunks/{money-graph-bar-chart-increase.svg-Cc7KxjX-.js → money-graph-bar-chart-increase.svg-B-t2UWB3.js} +2 -2
  147. package/dist/browser/chunks/{nature-ecology-leaf.svg-DR3cTZxt.js → nature-ecology-leaf.svg-DZ2GJV8m.js} +2 -2
  148. package/dist/browser/chunks/{phone-telephone.svg-DyY0gUlk.js → phone-telephone.svg-C12QjpN7.js} +2 -2
  149. package/dist/browser/chunks/{programming-bug.svg-BHLT-Qhp.js → programming-bug.svg-wLTsruN9.js} +2 -2
  150. package/dist/browser/chunks/{programming-cloud.svg-B6YW33ba.js → programming-cloud.svg-3XU6dNUg.js} +2 -2
  151. package/dist/browser/chunks/{programming-computer-database-server.svg-B6o5Sdn-.js → programming-computer-database-server.svg-B1JrHSPd.js} +2 -2
  152. package/dist/browser/chunks/{programming-computer-database.svg-Cl7OVtpJ.js → programming-computer-database.svg-BxHSuFl7.js} +2 -2
  153. package/dist/browser/chunks/{programming-module-four-layout.svg-BQrerL1x.js → programming-module-four-layout.svg-CeV35q45.js} +2 -2
  154. package/dist/browser/chunks/{programming-module-three.svg-B2KTQzBM.js → programming-module-three.svg-YIBpLt45.js} +2 -2
  155. package/dist/browser/chunks/{programming-module.svg-CiID7kPm.js → programming-module.svg-CU_pEibI.js} +2 -2
  156. package/dist/browser/chunks/{programming-script-code.svg-D1M5rtkN.js → programming-script-code.svg-CLzinmHT.js} +2 -2
  157. package/dist/browser/chunks/runtime-core.esm-bundler-CqqEw5ds.js +17 -0
  158. package/dist/browser/chunks/{shopping-cart.svg-BEegiIR9.js → shopping-cart.svg-Brzddu3K.js} +2 -2
  159. package/dist/browser/chunks/{shopping-gift-present.svg-BUHwuLix.js → shopping-gift-present.svg-l2K48g7L.js} +2 -2
  160. package/dist/browser/chunks/{shopping-shipping-box-parcel-package.svg-D6fxWdYx.js → shopping-shipping-box-parcel-package.svg-DesGopPo.js} +2 -2
  161. package/dist/browser/chunks/{tag-new-circle.svg-jsg1bGs0.js → tag-new-circle.svg-DE-VaLZU.js} +2 -2
  162. package/dist/browser/chunks/{travel-map-earth-globe.svg-ClbMiU-f.js → travel-map-earth-globe.svg-DLaOMzx6.js} +2 -2
  163. package/dist/browser/chunks/vendor-DWZAEyBy.js +306 -0
  164. package/dist/browser/standalone.esm.js +26 -24
  165. package/dist/browser/standalone.js +310 -311
  166. package/dist/components/AgentScalar/AgentScalarButton.vue.script.js +1 -1
  167. package/dist/components/AgentScalar/AgentScalarButton.vue.script.js.map +1 -1
  168. package/dist/components/AgentScalar/AgentScalarChatInterface.vue.script.js +1 -1
  169. package/dist/components/AgentScalar/AgentScalarChatInterface.vue.script.js.map +1 -1
  170. package/dist/components/AgentScalar/AgentScalarDrawer.vue.d.ts.map +1 -1
  171. package/dist/components/AgentScalar/AgentScalarDrawer.vue.js +1 -1
  172. package/dist/components/AgentScalar/AgentScalarDrawer.vue.script.js +1 -1
  173. package/dist/components/AgentScalar/AgentScalarDrawer.vue.script.js.map +1 -1
  174. package/dist/components/AgentScalar/OpenMCPButton.vue.d.ts.map +1 -1
  175. package/dist/components/AgentScalar/OpenMCPButton.vue.js +1 -1
  176. package/dist/components/AgentScalar/OpenMCPButton.vue.js.map +1 -1
  177. package/dist/components/AgentScalar/OpenMCPButton.vue.script.js +47 -32
  178. package/dist/components/AgentScalar/OpenMCPButton.vue.script.js.map +1 -1
  179. package/dist/components/Anchor/Anchor.vue.d.ts.map +1 -1
  180. package/dist/components/Anchor/Anchor.vue.script.js +1 -1
  181. package/dist/components/Anchor/Anchor.vue.script.js.map +1 -1
  182. package/dist/components/Anchor/WithBreadcrumb.vue.script.js +2 -2
  183. package/dist/components/Anchor/WithBreadcrumb.vue.script.js.map +1 -1
  184. package/dist/components/ApiReference.vue.d.ts.map +1 -1
  185. package/dist/components/ApiReference.vue.js +1 -1
  186. package/dist/components/ApiReference.vue.js.map +1 -1
  187. package/dist/components/ApiReference.vue.script.js +141 -33
  188. package/dist/components/ApiReference.vue.script.js.map +1 -1
  189. package/dist/components/Badge/Badge.vue.d.ts.map +1 -1
  190. package/dist/components/Badge/Badge.vue.js +1 -1
  191. package/dist/components/Badge/Badge.vue.js.map +1 -1
  192. package/dist/components/Badge/Badge.vue.script.js +9 -9
  193. package/dist/components/Badge/Badge.vue.script.js.map +1 -1
  194. package/dist/components/ClassicHeader.vue.js +1 -1
  195. package/dist/components/ClassicHeader.vue.js.map +1 -1
  196. package/dist/components/Content/AsyncApi/AsyncApiLabels.vue.js +1 -1
  197. package/dist/components/Content/AsyncApi/AsyncApiLabels.vue.script.js +1 -1
  198. package/dist/components/Content/AsyncApi/AsyncApiLabels.vue.script.js.map +1 -1
  199. package/dist/components/Content/AsyncApi/AsyncApiTraversedEntry.vue.script.js +1 -1
  200. package/dist/components/Content/AsyncApi/AsyncApiTraversedEntry.vue.script.js.map +1 -1
  201. package/dist/components/Content/AsyncApi/Channel.vue.d.ts.map +1 -1
  202. package/dist/components/Content/AsyncApi/Channel.vue.js +1 -1
  203. package/dist/components/Content/AsyncApi/Channel.vue.script.js +1 -1
  204. package/dist/components/Content/AsyncApi/Channel.vue.script.js.map +1 -1
  205. package/dist/components/Content/AsyncApi/ChannelsList.vue.js +1 -1
  206. package/dist/components/Content/AsyncApi/ChannelsList.vue.script.js +1 -1
  207. package/dist/components/Content/AsyncApi/ChannelsList.vue.script.js.map +1 -1
  208. package/dist/components/Content/AsyncApi/Message.vue.d.ts.map +1 -1
  209. package/dist/components/Content/AsyncApi/Message.vue.js +1 -1
  210. package/dist/components/Content/AsyncApi/Message.vue.script.js +2 -2
  211. package/dist/components/Content/AsyncApi/Message.vue.script.js.map +1 -1
  212. package/dist/components/Content/AsyncApi/Operation.vue.d.ts.map +1 -1
  213. package/dist/components/Content/AsyncApi/Operation.vue.js +1 -1
  214. package/dist/components/Content/AsyncApi/Operation.vue.js.map +1 -1
  215. package/dist/components/Content/AsyncApi/Operation.vue.script.js +6 -1
  216. package/dist/components/Content/AsyncApi/Operation.vue.script.js.map +1 -1
  217. package/dist/components/Content/AsyncApi/helpers/adapt-async-api-parameters.js.map +1 -1
  218. package/dist/components/Content/AsyncApi/helpers/async-api-render-options.js.map +1 -1
  219. package/dist/components/Content/AsyncApi/helpers/filter-children-by-type.js.map +1 -1
  220. package/dist/components/Content/AsyncApi/helpers/get-async-api-labels.js.map +1 -1
  221. package/dist/components/Content/AsyncApi/helpers/get-async-api-required-security.d.ts +17 -0
  222. package/dist/components/Content/AsyncApi/helpers/get-async-api-required-security.d.ts.map +1 -0
  223. package/dist/components/Content/AsyncApi/helpers/get-async-api-required-security.js +21 -0
  224. package/dist/components/Content/AsyncApi/helpers/get-async-api-required-security.js.map +1 -0
  225. package/dist/components/Content/AsyncApi/helpers/pick-heading.js.map +1 -1
  226. package/dist/components/Content/AsyncApi/helpers/resolve-async-api-nodes.js.map +1 -1
  227. package/dist/components/Content/Auth/Auth.vue.script.js +1 -1
  228. package/dist/components/Content/Auth/Auth.vue.script.js.map +1 -1
  229. package/dist/components/Content/Content.vue.script.js +1 -1
  230. package/dist/components/Content/Content.vue.script.js.map +1 -1
  231. package/dist/components/Content/Models/Model.vue.script.js +1 -1
  232. package/dist/components/Content/Models/Model.vue.script.js.map +1 -1
  233. package/dist/components/Content/Models/ModelTag.vue.d.ts.map +1 -1
  234. package/dist/components/Content/Models/ModelTag.vue.script.js +2 -2
  235. package/dist/components/Content/Models/ModelTag.vue.script.js.map +1 -1
  236. package/dist/components/Content/Models/components/ClassicLayout.vue.d.ts.map +1 -1
  237. package/dist/components/Content/Models/components/ClassicLayout.vue.js +1 -1
  238. package/dist/components/Content/Models/components/ClassicLayout.vue.script.js +1 -1
  239. package/dist/components/Content/Models/components/ClassicLayout.vue.script.js.map +1 -1
  240. package/dist/components/Content/Models/components/ModernLayout.vue.d.ts.map +1 -1
  241. package/dist/components/Content/Models/components/ModernLayout.vue.script.js +1 -1
  242. package/dist/components/Content/Models/components/ModernLayout.vue.script.js.map +1 -1
  243. package/dist/components/Content/Operations/TraversedEntry.vue.script.js +1 -1
  244. package/dist/components/Content/Operations/TraversedEntry.vue.script.js.map +1 -1
  245. package/dist/components/Content/Schema/LinkButton.vue.js +1 -1
  246. package/dist/components/Content/Schema/LinkButton.vue.js.map +1 -1
  247. package/dist/components/Content/Schema/RenderString.vue.script.js +1 -1
  248. package/dist/components/Content/Schema/RenderString.vue.script.js.map +1 -1
  249. package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
  250. package/dist/components/Content/Schema/Schema.vue.js +1 -1
  251. package/dist/components/Content/Schema/Schema.vue.js.map +1 -1
  252. package/dist/components/Content/Schema/Schema.vue.script.js +5 -13
  253. package/dist/components/Content/Schema/Schema.vue.script.js.map +1 -1
  254. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
  255. package/dist/components/Content/Schema/SchemaComposition.vue.js.map +1 -1
  256. package/dist/components/Content/Schema/SchemaComposition.vue.script.js +69 -34
  257. package/dist/components/Content/Schema/SchemaComposition.vue.script.js.map +1 -1
  258. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.js +1 -1
  259. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.script.js +1 -1
  260. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.script.js.map +1 -1
  261. package/dist/components/Content/Schema/SchemaEnums.vue.d.ts.map +1 -1
  262. package/dist/components/Content/Schema/SchemaEnums.vue.js +1 -1
  263. package/dist/components/Content/Schema/SchemaEnums.vue.js.map +1 -1
  264. package/dist/components/Content/Schema/SchemaEnums.vue.script.js +16 -8
  265. package/dist/components/Content/Schema/SchemaEnums.vue.script.js.map +1 -1
  266. package/dist/components/Content/Schema/SchemaHeading.vue.js +1 -1
  267. package/dist/components/Content/Schema/SchemaHeading.vue.script.js +1 -1
  268. package/dist/components/Content/Schema/SchemaHeading.vue.script.js.map +1 -1
  269. package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.script.js +1 -1
  270. package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.script.js.map +1 -1
  271. package/dist/components/Content/Schema/SchemaObjectProperties.vue.script.js +1 -1
  272. package/dist/components/Content/Schema/SchemaObjectProperties.vue.script.js.map +1 -1
  273. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  274. package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
  275. package/dist/components/Content/Schema/SchemaProperty.vue.js.map +1 -1
  276. package/dist/components/Content/Schema/SchemaProperty.vue.script.js +4 -3
  277. package/dist/components/Content/Schema/SchemaProperty.vue.script.js.map +1 -1
  278. package/dist/components/Content/Schema/SchemaPropertyDefault.vue.js +1 -1
  279. package/dist/components/Content/Schema/SchemaPropertyDefault.vue.script.js +1 -1
  280. package/dist/components/Content/Schema/SchemaPropertyDefault.vue.script.js.map +1 -1
  281. package/dist/components/Content/Schema/SchemaPropertyDetail.vue.js +1 -1
  282. package/dist/components/Content/Schema/SchemaPropertyDetail.vue.script.js +1 -1
  283. package/dist/components/Content/Schema/SchemaPropertyDetail.vue.script.js.map +1 -1
  284. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js +1 -1
  285. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.script.js +1 -1
  286. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.script.js.map +1 -1
  287. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
  288. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +1 -1
  289. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js.map +1 -1
  290. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.script.js +31 -21
  291. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.script.js.map +1 -1
  292. package/dist/components/Content/Schema/helpers/dynamic-scope.js.map +1 -1
  293. package/dist/components/Content/Schema/helpers/format-example.js.map +1 -1
  294. package/dist/components/Content/Schema/helpers/format-value.js.map +1 -1
  295. package/dist/components/Content/Schema/helpers/get-compositions-to-render.js.map +1 -1
  296. package/dist/components/Content/Schema/helpers/get-enum-values.js.map +1 -1
  297. package/dist/components/Content/Schema/helpers/get-property-description.js.map +1 -1
  298. package/dist/components/Content/Schema/helpers/get-ref-name.js.map +1 -1
  299. package/dist/components/Content/Schema/helpers/get-schema-type.js.map +1 -1
  300. package/dist/components/Content/Schema/helpers/has-complex-array-items.js.map +1 -1
  301. package/dist/components/Content/Schema/helpers/is-empty-schema-object.js.map +1 -1
  302. package/dist/components/Content/Schema/helpers/is-type-object.js.map +1 -1
  303. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +3 -3
  304. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js.map +1 -1
  305. package/dist/components/Content/Schema/helpers/optimize-value-for-display.d.ts.map +1 -1
  306. package/dist/components/Content/Schema/helpers/optimize-value-for-display.js +1 -4
  307. package/dist/components/Content/Schema/helpers/optimize-value-for-display.js.map +1 -1
  308. package/dist/components/Content/Schema/helpers/partition-all-of-compositions.d.ts +32 -0
  309. package/dist/components/Content/Schema/helpers/partition-all-of-compositions.d.ts.map +1 -0
  310. package/dist/components/Content/Schema/helpers/partition-all-of-compositions.js +97 -0
  311. package/dist/components/Content/Schema/helpers/partition-all-of-compositions.js.map +1 -0
  312. package/dist/components/Content/Schema/helpers/schema-composition.js.map +1 -1
  313. package/dist/components/Content/Schema/helpers/schema-cycle.js.map +1 -1
  314. package/dist/components/Content/Schema/helpers/schema-name.js.map +1 -1
  315. package/dist/components/Content/Schema/helpers/should-display-description.js.map +1 -1
  316. package/dist/components/Content/Schema/helpers/should-display-heading.js.map +1 -1
  317. package/dist/components/Content/Schema/helpers/should-render-array-item-composition.js.map +1 -1
  318. package/dist/components/Content/Schema/helpers/sort-property-names.js.map +1 -1
  319. package/dist/components/Content/Tags/Tag.vue.script.js +1 -1
  320. package/dist/components/Content/Tags/Tag.vue.script.js.map +1 -1
  321. package/dist/components/Content/Tags/components/ClassicLayout.vue.d.ts.map +1 -1
  322. package/dist/components/Content/Tags/components/ClassicLayout.vue.js +1 -1
  323. package/dist/components/Content/Tags/components/ClassicLayout.vue.script.js +1 -1
  324. package/dist/components/Content/Tags/components/ClassicLayout.vue.script.js.map +1 -1
  325. package/dist/components/Content/Tags/components/ModernLayout.vue.d.ts.map +1 -1
  326. package/dist/components/Content/Tags/components/ModernLayout.vue.js +1 -1
  327. package/dist/components/Content/Tags/components/ModernLayout.vue.script.js +1 -1
  328. package/dist/components/Content/Tags/components/ModernLayout.vue.script.js.map +1 -1
  329. package/dist/components/Content/Tags/components/TagSection.vue.d.ts.map +1 -1
  330. package/dist/components/Content/Tags/components/TagSection.vue.script.js +1 -1
  331. package/dist/components/Content/Tags/components/TagSection.vue.script.js.map +1 -1
  332. package/dist/components/GettingStarted.vue.d.ts.map +1 -1
  333. package/dist/components/GettingStarted.vue.js +1 -1
  334. package/dist/components/GettingStarted.vue.js.map +1 -1
  335. package/dist/components/GettingStarted.vue.script.js +4 -3
  336. package/dist/components/GettingStarted.vue.script.js.map +1 -1
  337. package/dist/components/HttpMethod/HttpMethod.vue.script.js +1 -1
  338. package/dist/components/HttpMethod/HttpMethod.vue.script.js.map +1 -1
  339. package/dist/components/IntersectionObserver.vue.script.js +10 -7
  340. package/dist/components/IntersectionObserver.vue.script.js.map +1 -1
  341. package/dist/components/Lazy/Lazy.vue.script.js +2 -2
  342. package/dist/components/Lazy/Lazy.vue.script.js.map +1 -1
  343. package/dist/components/LinkList/LinkList.vue.js +1 -1
  344. package/dist/components/LinkList/LinkList.vue.js.map +1 -1
  345. package/dist/components/LinkList/LinkList.vue.script.js +2 -2
  346. package/dist/components/LinkList/LinkList.vue.script.js.map +1 -1
  347. package/dist/components/MobileHeader.vue.d.ts.map +1 -1
  348. package/dist/components/MobileHeader.vue.script.js +4 -4
  349. package/dist/components/MobileHeader.vue.script.js.map +1 -1
  350. package/dist/components/OperationPath.vue.d.ts.map +1 -1
  351. package/dist/components/OperationPath.vue.js +1 -1
  352. package/dist/components/OperationPath.vue.script.js +1 -1
  353. package/dist/components/OperationPath.vue.script.js.map +1 -1
  354. package/dist/components/OperationsList/OperationsList.vue.js +1 -1
  355. package/dist/components/OperationsList/OperationsList.vue.script.js +1 -1
  356. package/dist/components/OperationsList/OperationsList.vue.script.js.map +1 -1
  357. package/dist/components/OperationsList/OperationsListItem.vue.js +1 -1
  358. package/dist/components/OperationsList/OperationsListItem.vue.script.js +1 -1
  359. package/dist/components/OperationsList/OperationsListItem.vue.script.js.map +1 -1
  360. package/dist/components/RenderPlugins/RenderPluginView.vue.script.js +1 -1
  361. package/dist/components/RenderPlugins/RenderPluginView.vue.script.js.map +1 -1
  362. package/dist/components/RenderPlugins/RenderPlugins.vue.script.js +1 -1
  363. package/dist/components/RenderPlugins/RenderPlugins.vue.script.js.map +1 -1
  364. package/dist/components/ScreenReader.vue.js +1 -1
  365. package/dist/components/ScreenReader.vue.script.js +2 -2
  366. package/dist/components/ScreenReader.vue.script.js.map +1 -1
  367. package/dist/components/Section/CompactSection.vue.d.ts.map +1 -1
  368. package/dist/components/Section/CompactSection.vue.js +1 -1
  369. package/dist/components/Section/CompactSection.vue.js.map +1 -1
  370. package/dist/components/Section/CompactSection.vue.script.js +22 -6
  371. package/dist/components/Section/CompactSection.vue.script.js.map +1 -1
  372. package/dist/components/Section/Section.vue.js +1 -1
  373. package/dist/components/Section/Section.vue.script.js +1 -1
  374. package/dist/components/Section/Section.vue.script.js.map +1 -1
  375. package/dist/components/Section/SectionAccordion.vue.d.ts.map +1 -1
  376. package/dist/components/Section/SectionAccordion.vue.js +1 -1
  377. package/dist/components/Section/SectionAccordion.vue.script.js +1 -1
  378. package/dist/components/Section/SectionAccordion.vue.script.js.map +1 -1
  379. package/dist/components/Section/SectionColumn.vue.js +1 -1
  380. package/dist/components/Section/SectionColumn.vue.js.map +1 -1
  381. package/dist/components/Section/SectionColumns.vue.js +1 -1
  382. package/dist/components/Section/SectionColumns.vue.js.map +1 -1
  383. package/dist/components/Section/SectionContainer.vue.js +1 -1
  384. package/dist/components/Section/SectionContainer.vue.script.js +2 -2
  385. package/dist/components/Section/SectionContainer.vue.script.js.map +1 -1
  386. package/dist/components/Section/SectionContainerAccordion.vue.d.ts.map +1 -1
  387. package/dist/components/Section/SectionContainerAccordion.vue.js +1 -1
  388. package/dist/components/Section/SectionContainerAccordion.vue.script.js +1 -1
  389. package/dist/components/Section/SectionContainerAccordion.vue.script.js.map +1 -1
  390. package/dist/components/Section/SectionContent.vue.js +1 -1
  391. package/dist/components/Section/SectionContent.vue.js.map +1 -1
  392. package/dist/components/Section/SectionHeader.vue.d.ts.map +1 -1
  393. package/dist/components/Section/SectionHeader.vue.js +1 -1
  394. package/dist/components/Section/SectionHeader.vue.js.map +1 -1
  395. package/dist/components/Section/SectionHeader.vue.script.js +3 -3
  396. package/dist/components/Section/SectionHeader.vue.script.js.map +1 -1
  397. package/dist/components/Section/SectionHeaderTag.vue.js +1 -1
  398. package/dist/components/Section/SectionHeaderTag.vue.script.js +1 -1
  399. package/dist/components/Section/SectionHeaderTag.vue.script.js.map +1 -1
  400. package/dist/components/SectionFlare/SectionFlare.vue.js +1 -1
  401. package/dist/components/SectionFlare/SectionFlare.vue.js.map +1 -1
  402. package/dist/components/ShowMoreButton.vue.js +1 -1
  403. package/dist/components/ShowMoreButton.vue.script.js +1 -1
  404. package/dist/components/ShowMoreButton.vue.script.js.map +1 -1
  405. package/dist/features/Operation/Operation.vue.script.js +2 -2
  406. package/dist/features/Operation/Operation.vue.script.js.map +1 -1
  407. package/dist/features/Operation/components/ContentTypeSelect.vue.d.ts.map +1 -1
  408. package/dist/features/Operation/components/ContentTypeSelect.vue.script.js +2 -2
  409. package/dist/features/Operation/components/ContentTypeSelect.vue.script.js.map +1 -1
  410. package/dist/features/Operation/components/Header.vue.script.js +1 -1
  411. package/dist/features/Operation/components/Header.vue.script.js.map +1 -1
  412. package/dist/features/Operation/components/Headers.vue.d.ts.map +1 -1
  413. package/dist/features/Operation/components/Headers.vue.js +1 -1
  414. package/dist/features/Operation/components/Headers.vue.script.js +1 -1
  415. package/dist/features/Operation/components/Headers.vue.script.js.map +1 -1
  416. package/dist/features/Operation/components/OperationParameters.vue.script.js +2 -2
  417. package/dist/features/Operation/components/OperationParameters.vue.script.js.map +1 -1
  418. package/dist/features/Operation/components/OperationResponses.vue.script.js +1 -1
  419. package/dist/features/Operation/components/OperationResponses.vue.script.js.map +1 -1
  420. package/dist/features/Operation/components/OperationScopes.vue.d.ts +8 -0
  421. package/dist/features/Operation/components/OperationScopes.vue.d.ts.map +1 -0
  422. package/dist/features/Operation/components/OperationScopes.vue.js +7 -0
  423. package/dist/features/Operation/components/OperationScopes.vue.js.map +1 -0
  424. package/dist/features/Operation/components/OperationScopes.vue.script.js +60 -0
  425. package/dist/features/Operation/components/OperationScopes.vue.script.js.map +1 -0
  426. package/dist/features/Operation/components/ParameterList.vue.script.js +1 -1
  427. package/dist/features/Operation/components/ParameterList.vue.script.js.map +1 -1
  428. package/dist/features/Operation/components/ParameterListItem.vue.js +1 -1
  429. package/dist/features/Operation/components/ParameterListItem.vue.script.js +1 -1
  430. package/dist/features/Operation/components/ParameterListItem.vue.script.js.map +1 -1
  431. package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
  432. package/dist/features/Operation/components/RequestBody.vue.js +1 -1
  433. package/dist/features/Operation/components/RequestBody.vue.script.js +2 -2
  434. package/dist/features/Operation/components/RequestBody.vue.script.js.map +1 -1
  435. package/dist/features/Operation/components/SecurityRequirementBadge.vue.d.ts.map +1 -1
  436. package/dist/features/Operation/components/SecurityRequirementBadge.vue.js.map +1 -1
  437. package/dist/features/Operation/components/SecurityRequirementBadge.vue.script.js +90 -17
  438. package/dist/features/Operation/components/SecurityRequirementBadge.vue.script.js.map +1 -1
  439. package/dist/features/Operation/components/SecurityRequirementBadgeScheme.vue.script.js +1 -1
  440. package/dist/features/Operation/components/SecurityRequirementBadgeScheme.vue.script.js.map +1 -1
  441. package/dist/features/Operation/components/callbacks/Callback.vue.js +1 -1
  442. package/dist/features/Operation/components/callbacks/Callback.vue.script.js +1 -1
  443. package/dist/features/Operation/components/callbacks/Callback.vue.script.js.map +1 -1
  444. package/dist/features/Operation/components/callbacks/Callbacks.vue.script.js +1 -1
  445. package/dist/features/Operation/components/callbacks/Callbacks.vue.script.js.map +1 -1
  446. package/dist/features/Operation/components/helpers/get-parameter-examples.js.map +1 -1
  447. package/dist/features/Operation/helpers/filter-selected-security.js.map +1 -1
  448. package/dist/features/Operation/helpers/flatten-deep-object-query-parameter.js.map +1 -1
  449. package/dist/features/Operation/helpers/get-required-security.d.ts +13 -0
  450. package/dist/features/Operation/helpers/get-required-security.d.ts.map +1 -1
  451. package/dist/features/Operation/helpers/get-required-security.js +22 -1
  452. package/dist/features/Operation/helpers/get-required-security.js.map +1 -1
  453. package/dist/features/Operation/helpers/operation-stability.js.map +1 -1
  454. package/dist/features/Operation/helpers/should-ignore-entity.js.map +1 -1
  455. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +1 -1
  456. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  457. package/dist/features/Operation/layouts/ClassicLayout.vue.js +1 -1
  458. package/dist/features/Operation/layouts/ClassicLayout.vue.js.map +1 -1
  459. package/dist/features/Operation/layouts/ClassicLayout.vue.script.js +16 -7
  460. package/dist/features/Operation/layouts/ClassicLayout.vue.script.js.map +1 -1
  461. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  462. package/dist/features/Operation/layouts/ModernLayout.vue.js +1 -1
  463. package/dist/features/Operation/layouts/ModernLayout.vue.js.map +1 -1
  464. package/dist/features/Operation/layouts/ModernLayout.vue.script.js +3 -1
  465. package/dist/features/Operation/layouts/ModernLayout.vue.script.js.map +1 -1
  466. package/dist/features/Operation/request-body-composition-index.js.map +1 -1
  467. package/dist/features/Search/components/SearchButton.vue.d.ts.map +1 -1
  468. package/dist/features/Search/components/SearchButton.vue.script.js +1 -1
  469. package/dist/features/Search/components/SearchButton.vue.script.js.map +1 -1
  470. package/dist/features/Search/components/SearchModal.vue.d.ts.map +1 -1
  471. package/dist/features/Search/components/SearchModal.vue.js +1 -1
  472. package/dist/features/Search/components/SearchModal.vue.script.js +1 -1
  473. package/dist/features/Search/components/SearchModal.vue.script.js.map +1 -1
  474. package/dist/features/Search/components/SearchResult.vue.d.ts.map +1 -1
  475. package/dist/features/Search/components/SearchResult.vue.script.js +1 -1
  476. package/dist/features/Search/components/SearchResult.vue.script.js.map +1 -1
  477. package/dist/features/Search/helpers/create-fuse-instance.js.map +1 -1
  478. package/dist/features/Search/helpers/create-search-index.js.map +1 -1
  479. package/dist/features/Search/hooks/useSearchIndex.js.map +1 -1
  480. package/dist/features/ask-agent-button/AskAgentButton.vue.js +1 -1
  481. package/dist/features/ask-agent-button/AskAgentButton.vue.script.js +1 -1
  482. package/dist/features/ask-agent-button/AskAgentButton.vue.script.js.map +1 -1
  483. package/dist/features/developer-tools/DeveloperTools.vue.script.js +2 -2
  484. package/dist/features/developer-tools/DeveloperTools.vue.script.js.map +1 -1
  485. package/dist/features/developer-tools/components/ApiReferenceToolbarBlurb.vue.js +1 -1
  486. package/dist/features/developer-tools/components/ApiReferenceToolbarBlurb.vue.js.map +1 -1
  487. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.script.js +1 -1
  488. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.script.js.map +1 -1
  489. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.d.ts.map +1 -1
  490. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.js.map +1 -1
  491. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.script.js +3 -3
  492. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.script.js.map +1 -1
  493. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.d.ts +2 -2
  494. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.script.js +1 -1
  495. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.script.js.map +1 -1
  496. package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.script.js +2 -2
  497. package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.script.js.map +1 -1
  498. package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.d.ts.map +1 -1
  499. package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.script.js +4 -3
  500. package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.script.js.map +1 -1
  501. package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.d.ts.map +1 -1
  502. package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.js.map +1 -1
  503. package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.script.js +2 -1
  504. package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.script.js.map +1 -1
  505. package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.d.ts.map +1 -1
  506. package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.script.js +4 -3
  507. package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.script.js.map +1 -1
  508. package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.d.ts.map +1 -1
  509. package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.script.js +1 -1
  510. package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.script.js.map +1 -1
  511. package/dist/features/developer-tools/components/DeployApiReference.vue.script.js +1 -1
  512. package/dist/features/developer-tools/components/DeployApiReference.vue.script.js.map +1 -1
  513. package/dist/features/developer-tools/components/ModifyConfiguration.vue.script.js +2 -2
  514. package/dist/features/developer-tools/components/ModifyConfiguration.vue.script.js.map +1 -1
  515. package/dist/features/developer-tools/components/ShareApiReference.vue.script.js +1 -1
  516. package/dist/features/developer-tools/components/ShareApiReference.vue.script.js.map +1 -1
  517. package/dist/features/example-responses/ExampleResponse.vue.js +1 -1
  518. package/dist/features/example-responses/ExampleResponse.vue.script.js +1 -1
  519. package/dist/features/example-responses/ExampleResponse.vue.script.js.map +1 -1
  520. package/dist/features/example-responses/ExampleResponseTab.vue.js +1 -1
  521. package/dist/features/example-responses/ExampleResponseTab.vue.script.js +1 -1
  522. package/dist/features/example-responses/ExampleResponseTab.vue.script.js.map +1 -1
  523. package/dist/features/example-responses/ExampleResponseTabList.vue.d.ts.map +1 -1
  524. package/dist/features/example-responses/ExampleResponseTabList.vue.js +1 -1
  525. package/dist/features/example-responses/ExampleResponseTabList.vue.script.js +1 -1
  526. package/dist/features/example-responses/ExampleResponseTabList.vue.script.js.map +1 -1
  527. package/dist/features/example-responses/ExampleResponses.vue.d.ts.map +1 -1
  528. package/dist/features/example-responses/ExampleResponses.vue.js +1 -1
  529. package/dist/features/example-responses/ExampleResponses.vue.script.js +1 -1
  530. package/dist/features/example-responses/ExampleResponses.vue.script.js.map +1 -1
  531. package/dist/features/example-responses/ExampleSchema.vue.script.js +1 -1
  532. package/dist/features/example-responses/ExampleSchema.vue.script.js.map +1 -1
  533. package/dist/features/example-responses/helpers/has-response-content.js.map +1 -1
  534. package/dist/features/example-responses/helpers/normalize-mime-type-object.js.map +1 -1
  535. package/dist/features/example-responses/helpers/normalize-mime-type.js.map +1 -1
  536. package/dist/features/external-docs/ExternalDocs.vue.d.ts.map +1 -1
  537. package/dist/features/external-docs/ExternalDocs.vue.js.map +1 -1
  538. package/dist/features/external-docs/ExternalDocs.vue.script.js +27 -15
  539. package/dist/features/external-docs/ExternalDocs.vue.script.js.map +1 -1
  540. package/dist/features/info-object/Contact.vue.d.ts.map +1 -1
  541. package/dist/features/info-object/Contact.vue.js.map +1 -1
  542. package/dist/features/info-object/Contact.vue.script.js +18 -12
  543. package/dist/features/info-object/Contact.vue.script.js.map +1 -1
  544. package/dist/features/info-object/InfoLink.vue.d.ts.map +1 -1
  545. package/dist/features/info-object/InfoLink.vue.js.map +1 -1
  546. package/dist/features/info-object/InfoLink.vue.script.js +23 -11
  547. package/dist/features/info-object/InfoLink.vue.script.js.map +1 -1
  548. package/dist/features/info-object/License.vue.d.ts.map +1 -1
  549. package/dist/features/info-object/License.vue.js.map +1 -1
  550. package/dist/features/info-object/License.vue.script.js +13 -7
  551. package/dist/features/info-object/License.vue.script.js.map +1 -1
  552. package/dist/features/info-object/TermsOfService.vue.d.ts.map +1 -1
  553. package/dist/features/info-object/TermsOfService.vue.js.map +1 -1
  554. package/dist/features/info-object/TermsOfService.vue.script.js +12 -6
  555. package/dist/features/info-object/TermsOfService.vue.script.js.map +1 -1
  556. package/dist/features/localization/locales/ar.d.ts +1 -0
  557. package/dist/features/localization/locales/ar.d.ts.map +1 -1
  558. package/dist/features/localization/locales/ar.js +2 -1
  559. package/dist/features/localization/locales/ar.js.map +1 -1
  560. package/dist/features/localization/locales/de.d.ts +1 -0
  561. package/dist/features/localization/locales/de.d.ts.map +1 -1
  562. package/dist/features/localization/locales/de.js +2 -1
  563. package/dist/features/localization/locales/de.js.map +1 -1
  564. package/dist/features/localization/locales/en.d.ts +1 -0
  565. package/dist/features/localization/locales/en.d.ts.map +1 -1
  566. package/dist/features/localization/locales/en.js +2 -1
  567. package/dist/features/localization/locales/en.js.map +1 -1
  568. package/dist/features/localization/locales/es.d.ts +1 -0
  569. package/dist/features/localization/locales/es.d.ts.map +1 -1
  570. package/dist/features/localization/locales/es.js +2 -1
  571. package/dist/features/localization/locales/es.js.map +1 -1
  572. package/dist/features/localization/locales/fr.d.ts +1 -0
  573. package/dist/features/localization/locales/fr.d.ts.map +1 -1
  574. package/dist/features/localization/locales/fr.js +2 -1
  575. package/dist/features/localization/locales/fr.js.map +1 -1
  576. package/dist/features/localization/locales/pt.d.ts +229 -0
  577. package/dist/features/localization/locales/pt.d.ts.map +1 -0
  578. package/dist/features/localization/locales/pt.js +227 -0
  579. package/dist/features/localization/locales/pt.js.map +1 -0
  580. package/dist/features/localization/locales/ru.d.ts +1 -0
  581. package/dist/features/localization/locales/ru.d.ts.map +1 -1
  582. package/dist/features/localization/locales/ru.js +2 -1
  583. package/dist/features/localization/locales/ru.js.map +1 -1
  584. package/dist/features/localization/locales/zh-cn.d.ts +1 -0
  585. package/dist/features/localization/locales/zh-cn.d.ts.map +1 -1
  586. package/dist/features/localization/locales/zh-cn.js +2 -1
  587. package/dist/features/localization/locales/zh-cn.js.map +1 -1
  588. package/dist/features/localization/translations.d.ts +235 -0
  589. package/dist/features/localization/translations.d.ts.map +1 -1
  590. package/dist/features/localization/translations.js +4 -2
  591. package/dist/features/localization/translations.js.map +1 -1
  592. package/dist/features/localization/use-localization.js.map +1 -1
  593. package/dist/features/multiple-documents/DocumentSelector.vue.d.ts.map +1 -1
  594. package/dist/features/multiple-documents/DocumentSelector.vue.script.js +1 -1
  595. package/dist/features/multiple-documents/DocumentSelector.vue.script.js.map +1 -1
  596. package/dist/features/specification-extension/SpecificationExtension.vue.script.js +1 -1
  597. package/dist/features/specification-extension/SpecificationExtension.vue.script.js.map +1 -1
  598. package/dist/features/specification-extension/helpers.js.map +1 -1
  599. package/dist/features/test-request-button/TestRequestButton.vue.js +1 -1
  600. package/dist/features/test-request-button/TestRequestButton.vue.script.js +1 -1
  601. package/dist/features/test-request-button/TestRequestButton.vue.script.js.map +1 -1
  602. package/dist/features/x-badges/XBadges.vue.d.ts.map +1 -1
  603. package/dist/features/x-badges/XBadges.vue.script.js +1 -1
  604. package/dist/features/x-badges/XBadges.vue.script.js.map +1 -1
  605. package/dist/helpers/color-mode.js.map +1 -1
  606. package/dist/helpers/download.js.map +1 -1
  607. package/dist/helpers/get-async-api-message-payload-schema.js.map +1 -1
  608. package/dist/helpers/get-async-api-model-schema.js.map +1 -1
  609. package/dist/helpers/id-routing.d.ts +18 -4
  610. package/dist/helpers/id-routing.d.ts.map +1 -1
  611. package/dist/helpers/id-routing.js +67 -20
  612. package/dist/helpers/id-routing.js.map +1 -1
  613. package/dist/helpers/is-introduction-entry.js.map +1 -1
  614. package/dist/helpers/lazy-bus.js.map +1 -1
  615. package/dist/helpers/load-from-perssistance.js.map +1 -1
  616. package/dist/helpers/map-config-plugins.js.map +1 -1
  617. package/dist/helpers/map-config-to-workspace-store.js.map +1 -1
  618. package/dist/helpers/normalize-configurations.js +1 -1
  619. package/dist/helpers/normalize-configurations.js.map +1 -1
  620. package/dist/helpers/openapi.d.ts +6 -1
  621. package/dist/helpers/openapi.d.ts.map +1 -1
  622. package/dist/helpers/openapi.js +37 -6
  623. package/dist/helpers/openapi.js.map +1 -1
  624. package/dist/helpers/safe-deep-clone.js.map +1 -1
  625. package/dist/helpers/storage.d.ts +21 -2
  626. package/dist/helpers/storage.d.ts.map +1 -1
  627. package/dist/helpers/storage.js +14 -0
  628. package/dist/helpers/storage.js.map +1 -1
  629. package/dist/helpers/upload-temp-document.js.map +1 -1
  630. package/dist/hooks/use-agent.js.map +1 -1
  631. package/dist/hooks/use-intersection.js.map +1 -1
  632. package/dist/plugins/hooks/usePluginManager.js.map +1 -1
  633. package/dist/plugins/persistence-plugin.js +6 -1
  634. package/dist/plugins/persistence-plugin.js.map +1 -1
  635. package/dist/plugins/plugin-manager.js +35 -0
  636. package/dist/plugins/plugin-manager.js.map +1 -1
  637. package/dist/plugins/posthog/index.js.map +1 -1
  638. package/dist/standalone/lib/html-api.d.ts.map +1 -1
  639. package/dist/standalone/lib/html-api.js +11 -4
  640. package/dist/standalone/lib/html-api.js.map +1 -1
  641. package/dist/standalone/lib/load-plugins-from-urls.d.ts +13 -0
  642. package/dist/standalone/lib/load-plugins-from-urls.d.ts.map +1 -0
  643. package/dist/standalone/lib/load-plugins-from-urls.js +60 -0
  644. package/dist/standalone/lib/load-plugins-from-urls.js.map +1 -0
  645. package/dist/style.css +1637 -1505
  646. package/dist/styles/print.css +118 -0
  647. package/dist/styles/tailwind.config.css +16 -0
  648. package/dist/vue-styles.css +1102 -1050
  649. package/package.json +29 -29
  650. package/dist/browser/chunks/AgentScalarChatInterface-YU9KKgvZ.js +0 -27
  651. package/dist/browser/chunks/ScalarTextInput.vue-B-Nhpn0q.js +0 -27
  652. package/dist/browser/chunks/browser-67K6wmG9.js +0 -129
  653. package/dist/browser/chunks/modal-BVUfMpuv.js +0 -15
  654. package/dist/browser/chunks/modal-WJ4Gcv8N.js +0 -99
  655. package/dist/browser/chunks/runtime-core.esm-bundler-Byrbbu5Q.js +0 -17
  656. package/dist/browser/chunks/vendor-BqFs9NIb.js +0 -306
@@ -1 +1 @@
1
- {"version":3,"file":"RequestBody.vue.script.js","names":[],"sources":["../../../../src/features/Operation/components/RequestBody.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type {\n OpenApiDocument,\n RequestBodyObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport { Schema } from '@/components/Content/Schema'\nimport { inferDiscriminatorMappingComposition } from '@/components/Content/Schema/helpers/get-compositions-to-render'\nimport { isTypeObject } from '@/components/Content/Schema/helpers/is-type-object'\nimport { getModelNameFromSchema } from '@/components/Content/Schema/helpers/schema-name'\nimport {\n reduceNamesToObject,\n sortPropertyNames,\n} from '@/components/Content/Schema/helpers/sort-property-names'\nimport LinkButton from '@/components/Content/Schema/LinkButton.vue'\nimport { useLocalization } from '@/features/localization'\n\nimport ContentTypeSelect from './ContentTypeSelect.vue'\n\nconst { requestBody, options, document } = defineProps<{\n breadcrumb?: string[]\n requestBody?: RequestBodyObject\n eventBus: WorkspaceEventBus | null\n /** The document the request body belongs to, used to resolve schema references for display */\n document?: OpenApiDocument\n options: {\n orderRequiredPropertiesFirst: boolean | undefined\n orderSchemaPropertiesBy: 'alpha' | 'preserve' | undefined\n hideModels: boolean | undefined\n expandAllSchemaProperties: boolean | undefined\n }\n}>()\nconst { translate } = useLocalization()\n\n/**\n * The maximum number of properties to show in the request body schema.\n */\nconst MAX_VISIBLE_PROPERTIES = 12\n\nconst availableContentTypes = computed(() =>\n Object.keys(requestBody?.content ?? {}),\n)\n\nconst selectedContentType = defineModel<string>('selectedContentType', {\n default: 'application/json',\n})\n\nif (requestBody?.content) {\n if (availableContentTypes.value[0]) {\n selectedContentType.value = availableContentTypes.value[0]\n }\n}\n\n/** Raw schema (possibly with $ref) for the selected content type */\nconst rawSchema = computed(\n () => requestBody?.content?.[selectedContentType.value]?.schema,\n)\n\nconst schema = computed(() => getResolvedRef(rawSchema.value))\n\n/** When the schema is a $ref, preserve its name so the UI can show the ref name instead of just the type. */\nconst modelLink = computed(\n () => (rawSchema.value && getModelNameFromSchema(rawSchema.value)) ?? null,\n)\n\n/**\n * Splits schema properties into visible and collapsed sections when there are more than 12 properties.\n * Returns null for schemas with fewer properties or non-object schemas.\n */\nconst partitionedSchema = computed(() => {\n // Early return if not an object schema\n if (!schema.value || !isTypeObject(schema.value)) {\n return null\n }\n\n // A schema whose variants are inferred from a `discriminator.mapping` renders\n // as a single variant selector, not a flat property list. Splitting it would\n // duplicate that selector across the visible and collapsed blocks, so we keep\n // it whole. See https://github.com/scalar/scalar/issues/7472\n if (inferDiscriminatorMappingComposition(schema.value, document)) {\n return null\n }\n\n // Lets sort the names first\n const sortedNames = sortPropertyNames(\n schema.value,\n schema.value.discriminator,\n {\n hideReadOnly: true,\n orderSchemaPropertiesBy: options.orderSchemaPropertiesBy,\n orderRequiredPropertiesFirst: options.orderRequiredPropertiesFirst,\n },\n )\n\n if (sortedNames.length <= MAX_VISIBLE_PROPERTIES) {\n return null\n }\n\n // Destructure everything except properties\n const { properties, ...schemaMetadata } = schema.value\n if (!properties) {\n return null\n }\n\n return {\n visibleProperties: {\n ...schemaMetadata,\n properties: reduceNamesToObject(\n sortedNames.slice(0, MAX_VISIBLE_PROPERTIES),\n properties,\n ),\n },\n collapsedProperties: {\n ...schemaMetadata,\n properties: reduceNamesToObject(\n sortedNames.slice(MAX_VISIBLE_PROPERTIES),\n properties,\n ),\n },\n }\n})\n\n/**\n * We don't want to render the request body if its completely empty\n * @example\n * {\n * \"content\": {},\n * }\n */\nconst shouldRenderRequestBody = computed(\n () =>\n Object.keys(requestBody?.content ?? {}).length > 0 ||\n requestBody?.description ||\n requestBody?.required,\n)\n</script>\n<template>\n <div\n v-if=\"requestBody && shouldRenderRequestBody\"\n :aria-label=\"translate('operation.requestBody')\"\n class=\"request-body\"\n role=\"group\">\n <div class=\"request-body-header\">\n <div class=\"request-body-title\">\n <slot name=\"title\" />\n <span\n v-if=\"modelLink\"\n class=\"text-c-2 text-xs leading-none font-normal\"\n data-testid=\"request-body-schema-name\">\n <span class=\"text-c-3 mx-1.5\">·</span>\n <LinkButton\n v-if=\"eventBus && modelLink.schemaKey\"\n @click=\"\n eventBus.emit('scroll-to:model-by-name', {\n name: modelLink.schemaKey,\n })\n \">\n {{ modelLink.label }}\n </LinkButton>\n <template v-else>{{ modelLink.label }}</template>\n </span>\n </div>\n <div class=\"flex items-center gap-2\">\n <div\n v-if=\"requestBody.required\"\n class=\"request-body-required\">\n {{ translate('common.required') }}\n </div>\n <ContentTypeSelect\n v-model=\"selectedContentType\"\n :content=\"requestBody.content\" />\n </div>\n <div\n v-if=\"requestBody.description\"\n class=\"request-body-description\">\n <ScalarMarkdown :value=\"requestBody.description\" />\n </div>\n </div>\n\n <!-- For over 12 properties we want to show 12 and collapse the rest -->\n <div\n v-if=\"partitionedSchema\"\n class=\"request-body-schema\">\n <Schema\n :breadcrumb\n compact\n :compositionPath=\"['requestBody']\"\n :eventBus=\"eventBus\"\n :name=\"translate('operation.requestBody')\"\n noncollapsible\n :options=\"{\n hideReadOnly: true,\n orderRequiredPropertiesFirst: options.orderRequiredPropertiesFirst,\n orderSchemaPropertiesBy: options.orderSchemaPropertiesBy,\n expandAllSchemaProperties: options.expandAllSchemaProperties,\n document,\n }\"\n :schema=\"partitionedSchema.visibleProperties\"\n schemaContext=\"requestBody\" />\n\n <Schema\n additionalProperties\n :breadcrumb\n compact\n :compositionPath=\"['requestBody']\"\n :eventBus=\"eventBus\"\n hideDescription\n :name=\"translate('operation.requestBody')\"\n :options=\"{\n hideReadOnly: true,\n orderRequiredPropertiesFirst: options.orderRequiredPropertiesFirst,\n orderSchemaPropertiesBy: options.orderSchemaPropertiesBy,\n expandAllSchemaProperties: options.expandAllSchemaProperties,\n document,\n }\"\n :schema=\"partitionedSchema.collapsedProperties\"\n schemaContext=\"requestBody\" />\n </div>\n\n <!-- Show em all 12 and under -->\n <div\n v-else-if=\"schema\"\n class=\"request-body-schema\">\n <Schema\n :breadcrumb\n compact\n :compositionPath=\"['requestBody']\"\n :eventBus=\"eventBus\"\n :hideReadOnly=\"true\"\n :name=\"translate('operation.requestBody')\"\n noncollapsible\n :options=\"{\n hideReadOnly: true,\n orderRequiredPropertiesFirst: options.orderRequiredPropertiesFirst,\n orderSchemaPropertiesBy: options.orderSchemaPropertiesBy,\n expandAllSchemaProperties: options.expandAllSchemaProperties,\n document,\n }\"\n :schema=\"schema\"\n schemaContext=\"requestBody\" />\n </div>\n </div>\n</template>\n\n<style scoped>\n.request-body {\n margin-top: 24px;\n}\n.request-body-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding-bottom: 12px;\n border-bottom: var(--scalar-border-width) solid var(--scalar-border-color);\n flex-flow: wrap;\n}\n.request-body-title {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: var(--scalar-font-size-2);\n font-weight: var(--scalar-semibold);\n color: var(--scalar-color-1);\n}\n.request-body-required {\n font-size: var(--scalar-micro);\n color: var(--scalar-color-orange);\n font-weight: normal;\n border-radius: 16px;\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n padding: 2px 8px;\n height: 20px;\n}\n.request-body-description {\n margin-top: 6px;\n font-size: var(--scalar-small);\n width: 100%;\n}\n\n.request-body-header\n + .request-body-schema:has(> .schema-card > .schema-card-description),\n.request-body-header\n + .request-body-schema:has(\n > .schema-card > .schema-properties > * > .property--level-0\n ) {\n /** Add a bit of space between the heading border and the schema description or properties */\n padding-top: 8px;\n}\n.request-body-description :deep(.markdown) * {\n color: var(--scalar-color-2) !important;\n}\n</style>\n"],"mappings":"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"}
1
+ {"version":3,"file":"RequestBody.vue.script.js","names":[],"sources":["../../../../src/features/Operation/components/RequestBody.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type {\n OpenApiDocument,\n RequestBodyObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport { Schema } from '@/components/Content/Schema'\nimport { inferDiscriminatorMappingComposition } from '@/components/Content/Schema/helpers/get-compositions-to-render'\nimport { isTypeObject } from '@/components/Content/Schema/helpers/is-type-object'\nimport { getModelNameFromSchema } from '@/components/Content/Schema/helpers/schema-name'\nimport {\n reduceNamesToObject,\n sortPropertyNames,\n} from '@/components/Content/Schema/helpers/sort-property-names'\nimport LinkButton from '@/components/Content/Schema/LinkButton.vue'\nimport { useLocalization } from '@/features/localization'\n\nimport ContentTypeSelect from './ContentTypeSelect.vue'\n\nconst { requestBody, options, document } = defineProps<{\n breadcrumb?: string[]\n requestBody?: RequestBodyObject\n eventBus: WorkspaceEventBus | null\n /** The document the request body belongs to, used to resolve schema references for display */\n document?: OpenApiDocument\n options: {\n orderRequiredPropertiesFirst: boolean | undefined\n orderSchemaPropertiesBy: 'alpha' | 'preserve' | undefined\n hideModels: boolean | undefined\n expandAllSchemaProperties: boolean | undefined\n }\n}>()\nconst { translate } = useLocalization()\n\n/**\n * The maximum number of properties to show in the request body schema.\n */\nconst MAX_VISIBLE_PROPERTIES = 12\n\nconst availableContentTypes = computed(() =>\n Object.keys(requestBody?.content ?? {}),\n)\n\nconst selectedContentType = defineModel<string>('selectedContentType', {\n default: 'application/json',\n})\n\nif (requestBody?.content) {\n if (availableContentTypes.value[0]) {\n selectedContentType.value = availableContentTypes.value[0]\n }\n}\n\n/** Raw schema (possibly with $ref) for the selected content type */\nconst rawSchema = computed(\n () => requestBody?.content?.[selectedContentType.value]?.schema,\n)\n\nconst schema = computed(() => getResolvedRef(rawSchema.value))\n\n/** When the schema is a $ref, preserve its name so the UI can show the ref name instead of just the type. */\nconst modelLink = computed(\n () => (rawSchema.value && getModelNameFromSchema(rawSchema.value)) ?? null,\n)\n\n/**\n * Splits schema properties into visible and collapsed sections when there are more than 12 properties.\n * Returns null for schemas with fewer properties or non-object schemas.\n */\nconst partitionedSchema = computed(() => {\n // Early return if not an object schema\n if (!schema.value || !isTypeObject(schema.value)) {\n return null\n }\n\n // A schema whose variants are inferred from a `discriminator.mapping` renders\n // as a single variant selector, not a flat property list. Splitting it would\n // duplicate that selector across the visible and collapsed blocks, so we keep\n // it whole. See https://github.com/scalar/scalar/issues/7472\n if (inferDiscriminatorMappingComposition(schema.value, document)) {\n return null\n }\n\n // Lets sort the names first\n const sortedNames = sortPropertyNames(\n schema.value,\n schema.value.discriminator,\n {\n hideReadOnly: true,\n orderSchemaPropertiesBy: options.orderSchemaPropertiesBy,\n orderRequiredPropertiesFirst: options.orderRequiredPropertiesFirst,\n },\n )\n\n if (sortedNames.length <= MAX_VISIBLE_PROPERTIES) {\n return null\n }\n\n // Destructure everything except properties\n const { properties, ...schemaMetadata } = schema.value\n if (!properties) {\n return null\n }\n\n return {\n visibleProperties: {\n ...schemaMetadata,\n properties: reduceNamesToObject(\n sortedNames.slice(0, MAX_VISIBLE_PROPERTIES),\n properties,\n ),\n },\n collapsedProperties: {\n ...schemaMetadata,\n properties: reduceNamesToObject(\n sortedNames.slice(MAX_VISIBLE_PROPERTIES),\n properties,\n ),\n },\n }\n})\n\n/**\n * We don't want to render the request body if its completely empty\n * @example\n * {\n * \"content\": {},\n * }\n */\nconst shouldRenderRequestBody = computed(\n () =>\n Object.keys(requestBody?.content ?? {}).length > 0 ||\n requestBody?.description ||\n requestBody?.required,\n)\n</script>\n<template>\n <div\n v-if=\"requestBody && shouldRenderRequestBody\"\n :aria-label=\"translate('operation.requestBody')\"\n class=\"request-body\"\n role=\"group\">\n <div class=\"request-body-header\">\n <div class=\"request-body-title\">\n <slot name=\"title\" />\n <span\n v-if=\"modelLink\"\n class=\"text-c-2 text-xs leading-none font-normal\"\n data-testid=\"request-body-schema-name\">\n <span class=\"text-c-3 mx-1.5\">·</span>\n <LinkButton\n v-if=\"eventBus && modelLink.schemaKey\"\n @click=\"\n eventBus.emit('scroll-to:model-by-name', {\n name: modelLink.schemaKey,\n })\n \">\n {{ modelLink.label }}\n </LinkButton>\n <template v-else>{{ modelLink.label }}</template>\n </span>\n </div>\n <div class=\"flex items-center gap-2\">\n <div\n v-if=\"requestBody.required\"\n class=\"request-body-required\">\n {{ translate('common.required') }}\n </div>\n <ContentTypeSelect\n v-model=\"selectedContentType\"\n :content=\"requestBody.content\" />\n </div>\n <div\n v-if=\"requestBody.description\"\n class=\"request-body-description\">\n <ScalarMarkdown :value=\"requestBody.description\" />\n </div>\n </div>\n\n <!-- For over 12 properties we want to show 12 and collapse the rest -->\n <div\n v-if=\"partitionedSchema\"\n class=\"request-body-schema\">\n <Schema\n :breadcrumb\n compact\n :compositionPath=\"['requestBody']\"\n :eventBus=\"eventBus\"\n :name=\"translate('operation.requestBody')\"\n noncollapsible\n :options=\"{\n hideReadOnly: true,\n orderRequiredPropertiesFirst: options.orderRequiredPropertiesFirst,\n orderSchemaPropertiesBy: options.orderSchemaPropertiesBy,\n expandAllSchemaProperties: options.expandAllSchemaProperties,\n document,\n }\"\n :schema=\"partitionedSchema.visibleProperties\"\n schemaContext=\"requestBody\" />\n\n <Schema\n additionalProperties\n :breadcrumb\n compact\n :compositionPath=\"['requestBody']\"\n :eventBus=\"eventBus\"\n hideDescription\n :name=\"translate('operation.requestBody')\"\n :options=\"{\n hideReadOnly: true,\n orderRequiredPropertiesFirst: options.orderRequiredPropertiesFirst,\n orderSchemaPropertiesBy: options.orderSchemaPropertiesBy,\n expandAllSchemaProperties: options.expandAllSchemaProperties,\n document,\n }\"\n :schema=\"partitionedSchema.collapsedProperties\"\n schemaContext=\"requestBody\" />\n </div>\n\n <!-- Show em all 12 and under -->\n <div\n v-else-if=\"schema\"\n class=\"request-body-schema\">\n <Schema\n :breadcrumb\n compact\n :compositionPath=\"['requestBody']\"\n :eventBus=\"eventBus\"\n :hideReadOnly=\"true\"\n :name=\"translate('operation.requestBody')\"\n noncollapsible\n :options=\"{\n hideReadOnly: true,\n orderRequiredPropertiesFirst: options.orderRequiredPropertiesFirst,\n orderSchemaPropertiesBy: options.orderSchemaPropertiesBy,\n expandAllSchemaProperties: options.expandAllSchemaProperties,\n document,\n }\"\n :schema=\"schema\"\n schemaContext=\"requestBody\" />\n </div>\n </div>\n</template>\n\n<style scoped>\n.request-body {\n margin-top: 24px;\n}\n.request-body-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding-bottom: 12px;\n border-bottom: var(--scalar-border-width) solid var(--scalar-border-color);\n flex-flow: wrap;\n}\n.request-body-title {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: var(--scalar-font-size-2);\n font-weight: var(--scalar-semibold);\n color: var(--scalar-color-1);\n}\n.request-body-required {\n font-size: var(--scalar-micro);\n color: var(--scalar-color-orange);\n font-weight: normal;\n border-radius: 16px;\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n padding: 2px 8px;\n height: 20px;\n}\n.request-body-description {\n margin-top: 6px;\n font-size: var(--scalar-small);\n width: 100%;\n}\n\n.request-body-header\n + .request-body-schema:has(> .schema-card > .schema-card-description),\n.request-body-header\n + .request-body-schema:has(\n > .schema-card > .schema-properties > * > .property--level-0\n ) {\n /** Add a bit of space between the heading border and the schema description or properties */\n padding-top: 8px;\n}\n.request-body-description :deep(.markdown) * {\n color: var(--scalar-color-2) !important;\n}\n</style>\n"],"mappings":"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"}
@@ -1 +1 @@
1
- {"version":3,"file":"SecurityRequirementBadge.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/SecurityRequirementBadge.vue"],"names":[],"mappings":"AA2IA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oDAAoD,CAAA;AAE1F,KAAK,WAAW,GAAG;IACjB,gBAAgB,EAAE,gBAAgB,CAAA;IAClC,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAC;AAyPF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"SecurityRequirementBadge.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/SecurityRequirementBadge.vue"],"names":[],"mappings":"AAuOA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oDAAoD,CAAA;AAE1F,KAAK,WAAW,GAAG;IACjB,gBAAgB,EAAE,gBAAgB,CAAA;IAClC,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAC;AAkWF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1 +1 @@
1
- {"version":3,"file":"SecurityRequirementBadge.vue.js","names":[],"sources":["../../../../src/features/Operation/components/SecurityRequirementBadge.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarPopover } from '@scalar/components/popover'\nimport { ScalarIconLockSimple, ScalarIconLockSimpleOpen } from '@scalar/icons'\nimport { computed } from 'vue'\n\nimport { useLocalization } from '@/features/localization'\nimport SecurityRequirementBadgeScheme from '@/features/Operation/components/SecurityRequirementBadgeScheme.vue'\nimport type { RequiredSecurity } from '@/features/Operation/helpers/get-required-security'\n\nconst { requiredSecurity, hideLabel = false } = defineProps<{\n requiredSecurity: RequiredSecurity\n hideLabel?: boolean\n}>()\nconst { translate } = useLocalization()\n\nconst label = computed(() =>\n requiredSecurity.state === 'required'\n ? translate('authentication.required')\n : translate('authentication.optional'),\n)\n\nconst verb = computed(() =>\n requiredSecurity.state === 'required'\n ? translate('authentication.requires')\n : translate('authentication.accepts'),\n)\n\n/** Single group, single scheme — shown inline in the header. */\nconst isSingleScheme = computed(\n () =>\n requiredSecurity.requirements.length === 1 &&\n requiredSecurity.requirements[0]?.schemes.length === 1,\n)\n\n/** Single group with multiple schemes — all must be satisfied (AND). */\nconst isAndGroup = computed(\n () =>\n requiredSecurity.requirements.length === 1 &&\n (requiredSecurity.requirements[0]?.schemes.length ?? 0) > 1,\n)\n\n/** Multiple groups — any one group satisfies authentication (OR). */\nconst isOrAlternatives = computed(\n () => requiredSecurity.requirements.length > 1,\n)\n</script>\n\n<template>\n <ScalarPopover\n v-if=\"requiredSecurity.state !== 'none'\"\n placement=\"bottom-end\">\n <button\n class=\"security-requirement-badge inline-flex w-fit shrink-0 items-center justify-center gap-1 text-sm\"\n :class=\"\n requiredSecurity.state === 'optional'\n ? 'text-c-2'\n : 'text-c-1 font-medium'\n \"\n type=\"button\"\n @click.stop>\n <ScalarIconLockSimple\n v-if=\"requiredSecurity.state === 'required'\"\n class=\"size-3\"\n weight=\"bold\" />\n <ScalarIconLockSimpleOpen\n v-else\n class=\"size-3\"\n weight=\"bold\" />\n <span v-if=\"!hideLabel\">{{ label }}</span>\n </button>\n <template #popover>\n <div class=\"flex max-w-xs min-w-48 flex-col gap-1.5 p-2 text-sm\">\n <div class=\"font-medium\">\n {{ verb }}\n <template v-if=\"isSingleScheme\">\n <SecurityRequirementBadgeScheme\n is=\"span\"\n class=\"contents\"\n :scheme=\"requiredSecurity.requirements[0]!.schemes[0]!\" />\n </template>\n <template v-else-if=\"isOrAlternatives\">\n {{ translate('authentication.oneOf') }}\n </template>\n <template v-else-if=\"isAndGroup\">\n {{ translate('authentication.allOf') }}\n </template>\n <template v-else>\n {{ translate('authentication.authentication') }}\n </template>\n </div>\n\n <!-- Multiple OR alternatives -->\n <ul\n v-if=\"isOrAlternatives\"\n class=\"contents\">\n <li\n v-for=\"(group, gi) in requiredSecurity.requirements\"\n :key=\"gi\"\n class=\"markdown\">\n <!-- Single scheme in this OR branch -->\n <SecurityRequirementBadgeScheme\n is=\"span\"\n v-if=\"group.schemes.length === 1\"\n class=\"contents\"\n :scheme=\"group.schemes[0]!\" />\n <!-- Multiple AND schemes in this OR branch -->\n <template v-else>\n <ul class=\"contents\">\n <SecurityRequirementBadgeScheme\n v-for=\"(scheme, si) in group.schemes\"\n :key=\"si\"\n :scheme />\n </ul>\n </template>\n </li>\n </ul>\n\n <!-- Single group, multiple AND schemes -->\n <ul\n v-else-if=\"isAndGroup\"\n class=\"contents\">\n <SecurityRequirementBadgeScheme\n v-for=\"(scheme, key) in requiredSecurity.requirements[0]!.schemes\"\n :key\n :scheme />\n </ul>\n </div>\n </template>\n </ScalarPopover>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"SecurityRequirementBadge.vue.js","names":[],"sources":["../../../../src/features/Operation/components/SecurityRequirementBadge.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n ScalarFloating,\n ScalarFloatingBackdrop,\n} from '@scalar/components/floating'\nimport { ScalarIconLockSimple, ScalarIconLockSimpleOpen } from '@scalar/icons'\nimport { onClickOutside, onKeyStroke } from '@vueuse/core'\nimport { computed, onBeforeUnmount, ref } from 'vue'\n\nimport { useLocalization } from '@/features/localization'\nimport SecurityRequirementBadgeScheme from '@/features/Operation/components/SecurityRequirementBadgeScheme.vue'\nimport type { RequiredSecurity } from '@/features/Operation/helpers/get-required-security'\n\nconst { requiredSecurity, hideLabel = false } = defineProps<{\n requiredSecurity: RequiredSecurity\n hideLabel?: boolean\n}>()\nconst { translate } = useLocalization()\n\n/**\n * The badge shows a small panel with the security details. It opens on hover\n * and on click, so we own the open state directly instead of leaning on a\n * click-only popover. Owning the state keeps the two interactions from fighting\n * each other: hover and the click of the same gesture (a tap fires both) can no\n * longer toggle each other off.\n */\nconst triggerRef = ref<HTMLButtonElement | null>(null)\nconst panelRef = ref<HTMLElement | null>(null)\nconst isOpen = ref(false)\n\n/**\n * Whether the panel is pinned open by a click. A pinned panel ignores the\n * pointer leaving so it behaves like the old click-to-open popover, and it only\n * closes on another click, a click outside, or Escape.\n */\nconst isPinned = ref(false)\nlet closeTimeout: ReturnType<typeof setTimeout> | undefined\n\n/**\n * Close after a short delay so the pointer can travel across the gap between the\n * badge and the panel without the panel disappearing. A pinned panel stays open.\n */\nconst scheduleClose = () => {\n if (isPinned.value) {\n return\n }\n clearTimeout(closeTimeout)\n closeTimeout = setTimeout(() => {\n isOpen.value = false\n }, 120)\n}\n\nconst cancelClose = () => clearTimeout(closeTimeout)\n\nconst openOnHover = () => {\n cancelClose()\n isOpen.value = true\n}\n\nconst close = () => {\n cancelClose()\n isOpen.value = false\n isPinned.value = false\n}\n\n/**\n * Toggle on click. A hover already opened the panel (and a tap's `mouseenter`\n * fires just before its `click`), so the first click pins it open rather than\n * closing it; a click on an already pinned panel closes it.\n */\nconst toggleOnClick = () => {\n if (isPinned.value) {\n close()\n return\n }\n cancelClose()\n isOpen.value = true\n isPinned.value = true\n}\n\nonClickOutside(triggerRef, close, { ignore: [panelRef] })\nonKeyStroke('Escape', () => {\n if (isOpen.value) {\n close()\n }\n})\n\nonBeforeUnmount(() => clearTimeout(closeTimeout))\n\nconst label = computed(() =>\n requiredSecurity.state === 'required'\n ? translate('authentication.required')\n : translate('authentication.optional'),\n)\n\nconst verb = computed(() =>\n requiredSecurity.state === 'required'\n ? translate('authentication.requires')\n : translate('authentication.accepts'),\n)\n\n/** Single group, single scheme — shown inline in the header. */\nconst isSingleScheme = computed(\n () =>\n requiredSecurity.requirements.length === 1 &&\n requiredSecurity.requirements[0]?.schemes.length === 1,\n)\n\n/** Single group with multiple schemes — all must be satisfied (AND). */\nconst isAndGroup = computed(\n () =>\n requiredSecurity.requirements.length === 1 &&\n (requiredSecurity.requirements[0]?.schemes.length ?? 0) > 1,\n)\n\n/** Multiple groups — any one group satisfies authentication (OR). */\nconst isOrAlternatives = computed(\n () => requiredSecurity.requirements.length > 1,\n)\n</script>\n\n<template>\n <ScalarFloating\n v-if=\"requiredSecurity.state !== 'none'\"\n placement=\"bottom-end\">\n <button\n ref=\"triggerRef\"\n class=\"security-requirement-badge inline-flex w-fit shrink-0 items-center justify-center gap-1 text-sm\"\n :class=\"\n requiredSecurity.state === 'optional'\n ? 'text-c-2'\n : 'text-c-1 font-medium'\n \"\n type=\"button\"\n :aria-expanded=\"isOpen\"\n aria-haspopup=\"dialog\"\n @click.stop=\"toggleOnClick\"\n @mouseenter=\"openOnHover\"\n @mouseleave=\"scheduleClose\">\n <ScalarIconLockSimple\n v-if=\"requiredSecurity.state === 'required'\"\n class=\"size-3\"\n weight=\"bold\" />\n <ScalarIconLockSimpleOpen\n v-else\n class=\"size-3\"\n weight=\"bold\" />\n <span v-if=\"!hideLabel\">{{ label }}</span>\n </button>\n <template #floating>\n <div\n v-if=\"isOpen\"\n ref=\"panelRef\"\n class=\"relative flex flex-col p-0.75\"\n @click.stop\n @mouseenter=\"cancelClose\"\n @mouseleave=\"scheduleClose\">\n <div class=\"flex max-w-xs min-w-48 flex-col gap-1.5 p-2 text-sm\">\n <div class=\"font-medium\">\n {{ verb }}\n <template v-if=\"isSingleScheme\">\n <SecurityRequirementBadgeScheme\n is=\"span\"\n class=\"contents\"\n :scheme=\"requiredSecurity.requirements[0]!.schemes[0]!\" />\n </template>\n <template v-else-if=\"isOrAlternatives\">\n {{ translate('authentication.oneOf') }}\n </template>\n <template v-else-if=\"isAndGroup\">\n {{ translate('authentication.allOf') }}\n </template>\n <template v-else>\n {{ translate('authentication.authentication') }}\n </template>\n </div>\n\n <!-- Multiple OR alternatives -->\n <ul\n v-if=\"isOrAlternatives\"\n class=\"contents\">\n <li\n v-for=\"(group, gi) in requiredSecurity.requirements\"\n :key=\"gi\"\n class=\"markdown\">\n <!-- Single scheme in this OR branch -->\n <SecurityRequirementBadgeScheme\n is=\"span\"\n v-if=\"group.schemes.length === 1\"\n class=\"contents\"\n :scheme=\"group.schemes[0]!\" />\n <!-- Multiple AND schemes in this OR branch -->\n <template v-else>\n <ul class=\"contents\">\n <SecurityRequirementBadgeScheme\n v-for=\"(scheme, si) in group.schemes\"\n :key=\"si\"\n :scheme />\n </ul>\n </template>\n </li>\n </ul>\n\n <!-- Single group, multiple AND schemes -->\n <ul\n v-else-if=\"isAndGroup\"\n class=\"contents\">\n <SecurityRequirementBadgeScheme\n v-for=\"(scheme, key) in requiredSecurity.requirements[0]!.schemes\"\n :key\n :scheme />\n </ul>\n </div>\n <ScalarFloatingBackdrop />\n </div>\n </template>\n </ScalarFloating>\n</template>\n"],"mappings":""}
@@ -1,25 +1,27 @@
1
1
  import { useLocalization } from "../../localization/use-localization.js";
2
2
  import SecurityRequirementBadgeScheme_default from "./SecurityRequirementBadgeScheme.vue.js";
3
- import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, normalizeClass, openBlock, renderList, toDisplayString, unref, withCtx, withModifiers } from "vue";
3
+ import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, normalizeClass, onBeforeUnmount, openBlock, ref, renderList, toDisplayString, unref, withCtx, withModifiers } from "vue";
4
+ import { onClickOutside, onKeyStroke } from "@vueuse/core";
4
5
  import { ScalarIconLockSimple, ScalarIconLockSimpleOpen } from "@scalar/icons";
5
- import { ScalarPopover } from "@scalar/components/popover";
6
+ import { ScalarFloating, ScalarFloatingBackdrop } from "@scalar/components/floating";
6
7
  //#region src/features/Operation/components/SecurityRequirementBadge.vue?vue&type=script&setup=true&lang.ts
7
- var _hoisted_1 = { key: 2 };
8
- var _hoisted_2 = { class: "flex max-w-xs min-w-48 flex-col gap-1.5 p-2 text-sm" };
9
- var _hoisted_3 = { class: "font-medium" };
10
- var _hoisted_4 = {
8
+ var _hoisted_1 = ["aria-expanded"];
9
+ var _hoisted_2 = { key: 2 };
10
+ var _hoisted_3 = { class: "flex max-w-xs min-w-48 flex-col gap-1.5 p-2 text-sm" };
11
+ var _hoisted_4 = { class: "font-medium" };
12
+ var _hoisted_5 = {
11
13
  key: 0,
12
14
  class: "contents"
13
15
  };
14
- var _hoisted_5 = {
16
+ var _hoisted_6 = {
15
17
  key: 1,
16
18
  class: "contents"
17
19
  };
18
- var _hoisted_6 = {
20
+ var _hoisted_7 = {
19
21
  key: 1,
20
22
  class: "contents"
21
23
  };
22
- var SecurityRequirementBadge_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
24
+ var SecurityRequirementBadge_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
23
25
  __name: "SecurityRequirementBadge",
24
26
  props: {
25
27
  requiredSecurity: {},
@@ -30,6 +32,63 @@ var SecurityRequirementBadge_vue_vue_type_script_setup_true_lang_default = /* @_
30
32
  },
31
33
  setup(__props) {
32
34
  const { translate } = useLocalization();
35
+ /**
36
+ * The badge shows a small panel with the security details. It opens on hover
37
+ * and on click, so we own the open state directly instead of leaning on a
38
+ * click-only popover. Owning the state keeps the two interactions from fighting
39
+ * each other: hover and the click of the same gesture (a tap fires both) can no
40
+ * longer toggle each other off.
41
+ */
42
+ const triggerRef = ref(null);
43
+ const panelRef = ref(null);
44
+ const isOpen = ref(false);
45
+ /**
46
+ * Whether the panel is pinned open by a click. A pinned panel ignores the
47
+ * pointer leaving so it behaves like the old click-to-open popover, and it only
48
+ * closes on another click, a click outside, or Escape.
49
+ */
50
+ const isPinned = ref(false);
51
+ let closeTimeout;
52
+ /**
53
+ * Close after a short delay so the pointer can travel across the gap between the
54
+ * badge and the panel without the panel disappearing. A pinned panel stays open.
55
+ */
56
+ const scheduleClose = () => {
57
+ if (isPinned.value) return;
58
+ clearTimeout(closeTimeout);
59
+ closeTimeout = setTimeout(() => {
60
+ isOpen.value = false;
61
+ }, 120);
62
+ };
63
+ const cancelClose = () => clearTimeout(closeTimeout);
64
+ const openOnHover = () => {
65
+ cancelClose();
66
+ isOpen.value = true;
67
+ };
68
+ const close = () => {
69
+ cancelClose();
70
+ isOpen.value = false;
71
+ isPinned.value = false;
72
+ };
73
+ /**
74
+ * Toggle on click. A hover already opened the panel (and a tap's `mouseenter`
75
+ * fires just before its `click`), so the first click pins it open rather than
76
+ * closing it; a click on an already pinned panel closes it.
77
+ */
78
+ const toggleOnClick = () => {
79
+ if (isPinned.value) {
80
+ close();
81
+ return;
82
+ }
83
+ cancelClose();
84
+ isOpen.value = true;
85
+ isPinned.value = true;
86
+ };
87
+ onClickOutside(triggerRef, close, { ignore: [panelRef] });
88
+ onKeyStroke("Escape", () => {
89
+ if (isOpen.value) close();
90
+ });
91
+ onBeforeUnmount(() => clearTimeout(closeTimeout));
33
92
  const label = computed(() => __props.requiredSecurity.state === "required" ? translate("authentication.required") : translate("authentication.optional"));
34
93
  const verb = computed(() => __props.requiredSecurity.state === "required" ? translate("authentication.requires") : translate("authentication.accepts"));
35
94
  /** Single group, single scheme — shown inline in the header. */
@@ -39,16 +98,24 @@ var SecurityRequirementBadge_vue_vue_type_script_setup_true_lang_default = /* @_
39
98
  /** Multiple groups — any one group satisfies authentication (OR). */
40
99
  const isOrAlternatives = computed(() => __props.requiredSecurity.requirements.length > 1);
41
100
  return (_ctx, _cache) => {
42
- return __props.requiredSecurity.state !== "none" ? (openBlock(), createBlock(unref(ScalarPopover), {
101
+ return __props.requiredSecurity.state !== "none" ? (openBlock(), createBlock(unref(ScalarFloating), {
43
102
  key: 0,
44
103
  placement: "bottom-end"
45
104
  }, {
46
- popover: withCtx(() => [createElementVNode("div", _hoisted_2, [createElementVNode("div", _hoisted_3, [createTextVNode(toDisplayString(verb.value) + " ", 1), isSingleScheme.value ? (openBlock(), createBlock(SecurityRequirementBadgeScheme_default, {
105
+ floating: withCtx(() => [isOpen.value ? (openBlock(), createElementBlock("div", {
106
+ key: 0,
107
+ ref_key: "panelRef",
108
+ ref: panelRef,
109
+ class: "relative flex flex-col p-0.75",
110
+ onClick: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop"])),
111
+ onMouseenter: cancelClose,
112
+ onMouseleave: scheduleClose
113
+ }, [createElementVNode("div", _hoisted_3, [createElementVNode("div", _hoisted_4, [createTextVNode(toDisplayString(verb.value) + " ", 1), isSingleScheme.value ? (openBlock(), createBlock(SecurityRequirementBadgeScheme_default, {
47
114
  key: 0,
48
115
  is: "span",
49
116
  class: "contents",
50
117
  scheme: __props.requiredSecurity.requirements[0].schemes[0]
51
- }, null, 8, ["scheme"])) : isOrAlternatives.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(unref(translate)("authentication.oneOf")), 1)], 64)) : isAndGroup.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [createTextVNode(toDisplayString(unref(translate)("authentication.allOf")), 1)], 64)) : (openBlock(), createElementBlock(Fragment, { key: 3 }, [createTextVNode(toDisplayString(unref(translate)("authentication.authentication")), 1)], 64))]), isOrAlternatives.value ? (openBlock(), createElementBlock("ul", _hoisted_4, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.requiredSecurity.requirements, (group, gi) => {
118
+ }, null, 8, ["scheme"])) : isOrAlternatives.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(unref(translate)("authentication.oneOf")), 1)], 64)) : isAndGroup.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [createTextVNode(toDisplayString(unref(translate)("authentication.allOf")), 1)], 64)) : (openBlock(), createElementBlock(Fragment, { key: 3 }, [createTextVNode(toDisplayString(unref(translate)("authentication.authentication")), 1)], 64))]), isOrAlternatives.value ? (openBlock(), createElementBlock("ul", _hoisted_5, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.requiredSecurity.requirements, (group, gi) => {
52
119
  return openBlock(), createElementBlock("li", {
53
120
  key: gi,
54
121
  class: "markdown"
@@ -57,22 +124,28 @@ var SecurityRequirementBadge_vue_vue_type_script_setup_true_lang_default = /* @_
57
124
  is: "span",
58
125
  class: "contents",
59
126
  scheme: group.schemes[0]
60
- }, null, 8, ["scheme"])) : (openBlock(), createElementBlock("ul", _hoisted_5, [(openBlock(true), createElementBlock(Fragment, null, renderList(group.schemes, (scheme, si) => {
127
+ }, null, 8, ["scheme"])) : (openBlock(), createElementBlock("ul", _hoisted_6, [(openBlock(true), createElementBlock(Fragment, null, renderList(group.schemes, (scheme, si) => {
61
128
  return openBlock(), createBlock(SecurityRequirementBadgeScheme_default, {
62
129
  key: si,
63
130
  scheme
64
131
  }, null, 8, ["scheme"]);
65
132
  }), 128))]))]);
66
- }), 128))])) : isAndGroup.value ? (openBlock(), createElementBlock("ul", _hoisted_6, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.requiredSecurity.requirements[0].schemes, (scheme, key) => {
133
+ }), 128))])) : isAndGroup.value ? (openBlock(), createElementBlock("ul", _hoisted_7, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.requiredSecurity.requirements[0].schemes, (scheme, key) => {
67
134
  return openBlock(), createBlock(SecurityRequirementBadgeScheme_default, {
68
135
  key,
69
136
  scheme
70
137
  }, null, 8, ["scheme"]);
71
- }), 128))])) : createCommentVNode("", true)])]),
138
+ }), 128))])) : createCommentVNode("", true)]), createVNode(unref(ScalarFloatingBackdrop))], 544)) : createCommentVNode("", true)]),
72
139
  default: withCtx(() => [createElementVNode("button", {
140
+ ref_key: "triggerRef",
141
+ ref: triggerRef,
73
142
  class: normalizeClass(["security-requirement-badge inline-flex w-fit shrink-0 items-center justify-center gap-1 text-sm", __props.requiredSecurity.state === "optional" ? "text-c-2" : "text-c-1 font-medium"]),
74
143
  type: "button",
75
- onClick: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop"]))
144
+ "aria-expanded": isOpen.value,
145
+ "aria-haspopup": "dialog",
146
+ onClick: withModifiers(toggleOnClick, ["stop"]),
147
+ onMouseenter: openOnHover,
148
+ onMouseleave: scheduleClose
76
149
  }, [__props.requiredSecurity.state === "required" ? (openBlock(), createBlock(unref(ScalarIconLockSimple), {
77
150
  key: 0,
78
151
  class: "size-3",
@@ -81,7 +154,7 @@ var SecurityRequirementBadge_vue_vue_type_script_setup_true_lang_default = /* @_
81
154
  key: 1,
82
155
  class: "size-3",
83
156
  weight: "bold"
84
- })), !__props.hideLabel ? (openBlock(), createElementBlock("span", _hoisted_1, toDisplayString(label.value), 1)) : createCommentVNode("", true)], 2)]),
157
+ })), !__props.hideLabel ? (openBlock(), createElementBlock("span", _hoisted_2, toDisplayString(label.value), 1)) : createCommentVNode("", true)], 42, _hoisted_1)]),
85
158
  _: 1
86
159
  })) : createCommentVNode("", true);
87
160
  };
@@ -1 +1 @@
1
- {"version":3,"file":"SecurityRequirementBadge.vue.script.js","names":[],"sources":["../../../../src/features/Operation/components/SecurityRequirementBadge.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarPopover } from '@scalar/components/popover'\nimport { ScalarIconLockSimple, ScalarIconLockSimpleOpen } from '@scalar/icons'\nimport { computed } from 'vue'\n\nimport { useLocalization } from '@/features/localization'\nimport SecurityRequirementBadgeScheme from '@/features/Operation/components/SecurityRequirementBadgeScheme.vue'\nimport type { RequiredSecurity } from '@/features/Operation/helpers/get-required-security'\n\nconst { requiredSecurity, hideLabel = false } = defineProps<{\n requiredSecurity: RequiredSecurity\n hideLabel?: boolean\n}>()\nconst { translate } = useLocalization()\n\nconst label = computed(() =>\n requiredSecurity.state === 'required'\n ? translate('authentication.required')\n : translate('authentication.optional'),\n)\n\nconst verb = computed(() =>\n requiredSecurity.state === 'required'\n ? translate('authentication.requires')\n : translate('authentication.accepts'),\n)\n\n/** Single group, single scheme — shown inline in the header. */\nconst isSingleScheme = computed(\n () =>\n requiredSecurity.requirements.length === 1 &&\n requiredSecurity.requirements[0]?.schemes.length === 1,\n)\n\n/** Single group with multiple schemes — all must be satisfied (AND). */\nconst isAndGroup = computed(\n () =>\n requiredSecurity.requirements.length === 1 &&\n (requiredSecurity.requirements[0]?.schemes.length ?? 0) > 1,\n)\n\n/** Multiple groups — any one group satisfies authentication (OR). */\nconst isOrAlternatives = computed(\n () => requiredSecurity.requirements.length > 1,\n)\n</script>\n\n<template>\n <ScalarPopover\n v-if=\"requiredSecurity.state !== 'none'\"\n placement=\"bottom-end\">\n <button\n class=\"security-requirement-badge inline-flex w-fit shrink-0 items-center justify-center gap-1 text-sm\"\n :class=\"\n requiredSecurity.state === 'optional'\n ? 'text-c-2'\n : 'text-c-1 font-medium'\n \"\n type=\"button\"\n @click.stop>\n <ScalarIconLockSimple\n v-if=\"requiredSecurity.state === 'required'\"\n class=\"size-3\"\n weight=\"bold\" />\n <ScalarIconLockSimpleOpen\n v-else\n class=\"size-3\"\n weight=\"bold\" />\n <span v-if=\"!hideLabel\">{{ label }}</span>\n </button>\n <template #popover>\n <div class=\"flex max-w-xs min-w-48 flex-col gap-1.5 p-2 text-sm\">\n <div class=\"font-medium\">\n {{ verb }}\n <template v-if=\"isSingleScheme\">\n <SecurityRequirementBadgeScheme\n is=\"span\"\n class=\"contents\"\n :scheme=\"requiredSecurity.requirements[0]!.schemes[0]!\" />\n </template>\n <template v-else-if=\"isOrAlternatives\">\n {{ translate('authentication.oneOf') }}\n </template>\n <template v-else-if=\"isAndGroup\">\n {{ translate('authentication.allOf') }}\n </template>\n <template v-else>\n {{ translate('authentication.authentication') }}\n </template>\n </div>\n\n <!-- Multiple OR alternatives -->\n <ul\n v-if=\"isOrAlternatives\"\n class=\"contents\">\n <li\n v-for=\"(group, gi) in requiredSecurity.requirements\"\n :key=\"gi\"\n class=\"markdown\">\n <!-- Single scheme in this OR branch -->\n <SecurityRequirementBadgeScheme\n is=\"span\"\n v-if=\"group.schemes.length === 1\"\n class=\"contents\"\n :scheme=\"group.schemes[0]!\" />\n <!-- Multiple AND schemes in this OR branch -->\n <template v-else>\n <ul class=\"contents\">\n <SecurityRequirementBadgeScheme\n v-for=\"(scheme, si) in group.schemes\"\n :key=\"si\"\n :scheme />\n </ul>\n </template>\n </li>\n </ul>\n\n <!-- Single group, multiple AND schemes -->\n <ul\n v-else-if=\"isAndGroup\"\n class=\"contents\">\n <SecurityRequirementBadgeScheme\n v-for=\"(scheme, key) in requiredSecurity.requirements[0]!.schemes\"\n :key\n :scheme />\n </ul>\n </div>\n </template>\n </ScalarPopover>\n</template>\n"],"mappings":"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"}
1
+ {"version":3,"file":"SecurityRequirementBadge.vue.script.js","names":[],"sources":["../../../../src/features/Operation/components/SecurityRequirementBadge.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n ScalarFloating,\n ScalarFloatingBackdrop,\n} from '@scalar/components/floating'\nimport { ScalarIconLockSimple, ScalarIconLockSimpleOpen } from '@scalar/icons'\nimport { onClickOutside, onKeyStroke } from '@vueuse/core'\nimport { computed, onBeforeUnmount, ref } from 'vue'\n\nimport { useLocalization } from '@/features/localization'\nimport SecurityRequirementBadgeScheme from '@/features/Operation/components/SecurityRequirementBadgeScheme.vue'\nimport type { RequiredSecurity } from '@/features/Operation/helpers/get-required-security'\n\nconst { requiredSecurity, hideLabel = false } = defineProps<{\n requiredSecurity: RequiredSecurity\n hideLabel?: boolean\n}>()\nconst { translate } = useLocalization()\n\n/**\n * The badge shows a small panel with the security details. It opens on hover\n * and on click, so we own the open state directly instead of leaning on a\n * click-only popover. Owning the state keeps the two interactions from fighting\n * each other: hover and the click of the same gesture (a tap fires both) can no\n * longer toggle each other off.\n */\nconst triggerRef = ref<HTMLButtonElement | null>(null)\nconst panelRef = ref<HTMLElement | null>(null)\nconst isOpen = ref(false)\n\n/**\n * Whether the panel is pinned open by a click. A pinned panel ignores the\n * pointer leaving so it behaves like the old click-to-open popover, and it only\n * closes on another click, a click outside, or Escape.\n */\nconst isPinned = ref(false)\nlet closeTimeout: ReturnType<typeof setTimeout> | undefined\n\n/**\n * Close after a short delay so the pointer can travel across the gap between the\n * badge and the panel without the panel disappearing. A pinned panel stays open.\n */\nconst scheduleClose = () => {\n if (isPinned.value) {\n return\n }\n clearTimeout(closeTimeout)\n closeTimeout = setTimeout(() => {\n isOpen.value = false\n }, 120)\n}\n\nconst cancelClose = () => clearTimeout(closeTimeout)\n\nconst openOnHover = () => {\n cancelClose()\n isOpen.value = true\n}\n\nconst close = () => {\n cancelClose()\n isOpen.value = false\n isPinned.value = false\n}\n\n/**\n * Toggle on click. A hover already opened the panel (and a tap's `mouseenter`\n * fires just before its `click`), so the first click pins it open rather than\n * closing it; a click on an already pinned panel closes it.\n */\nconst toggleOnClick = () => {\n if (isPinned.value) {\n close()\n return\n }\n cancelClose()\n isOpen.value = true\n isPinned.value = true\n}\n\nonClickOutside(triggerRef, close, { ignore: [panelRef] })\nonKeyStroke('Escape', () => {\n if (isOpen.value) {\n close()\n }\n})\n\nonBeforeUnmount(() => clearTimeout(closeTimeout))\n\nconst label = computed(() =>\n requiredSecurity.state === 'required'\n ? translate('authentication.required')\n : translate('authentication.optional'),\n)\n\nconst verb = computed(() =>\n requiredSecurity.state === 'required'\n ? translate('authentication.requires')\n : translate('authentication.accepts'),\n)\n\n/** Single group, single scheme — shown inline in the header. */\nconst isSingleScheme = computed(\n () =>\n requiredSecurity.requirements.length === 1 &&\n requiredSecurity.requirements[0]?.schemes.length === 1,\n)\n\n/** Single group with multiple schemes — all must be satisfied (AND). */\nconst isAndGroup = computed(\n () =>\n requiredSecurity.requirements.length === 1 &&\n (requiredSecurity.requirements[0]?.schemes.length ?? 0) > 1,\n)\n\n/** Multiple groups — any one group satisfies authentication (OR). */\nconst isOrAlternatives = computed(\n () => requiredSecurity.requirements.length > 1,\n)\n</script>\n\n<template>\n <ScalarFloating\n v-if=\"requiredSecurity.state !== 'none'\"\n placement=\"bottom-end\">\n <button\n ref=\"triggerRef\"\n class=\"security-requirement-badge inline-flex w-fit shrink-0 items-center justify-center gap-1 text-sm\"\n :class=\"\n requiredSecurity.state === 'optional'\n ? 'text-c-2'\n : 'text-c-1 font-medium'\n \"\n type=\"button\"\n :aria-expanded=\"isOpen\"\n aria-haspopup=\"dialog\"\n @click.stop=\"toggleOnClick\"\n @mouseenter=\"openOnHover\"\n @mouseleave=\"scheduleClose\">\n <ScalarIconLockSimple\n v-if=\"requiredSecurity.state === 'required'\"\n class=\"size-3\"\n weight=\"bold\" />\n <ScalarIconLockSimpleOpen\n v-else\n class=\"size-3\"\n weight=\"bold\" />\n <span v-if=\"!hideLabel\">{{ label }}</span>\n </button>\n <template #floating>\n <div\n v-if=\"isOpen\"\n ref=\"panelRef\"\n class=\"relative flex flex-col p-0.75\"\n @click.stop\n @mouseenter=\"cancelClose\"\n @mouseleave=\"scheduleClose\">\n <div class=\"flex max-w-xs min-w-48 flex-col gap-1.5 p-2 text-sm\">\n <div class=\"font-medium\">\n {{ verb }}\n <template v-if=\"isSingleScheme\">\n <SecurityRequirementBadgeScheme\n is=\"span\"\n class=\"contents\"\n :scheme=\"requiredSecurity.requirements[0]!.schemes[0]!\" />\n </template>\n <template v-else-if=\"isOrAlternatives\">\n {{ translate('authentication.oneOf') }}\n </template>\n <template v-else-if=\"isAndGroup\">\n {{ translate('authentication.allOf') }}\n </template>\n <template v-else>\n {{ translate('authentication.authentication') }}\n </template>\n </div>\n\n <!-- Multiple OR alternatives -->\n <ul\n v-if=\"isOrAlternatives\"\n class=\"contents\">\n <li\n v-for=\"(group, gi) in requiredSecurity.requirements\"\n :key=\"gi\"\n class=\"markdown\">\n <!-- Single scheme in this OR branch -->\n <SecurityRequirementBadgeScheme\n is=\"span\"\n v-if=\"group.schemes.length === 1\"\n class=\"contents\"\n :scheme=\"group.schemes[0]!\" />\n <!-- Multiple AND schemes in this OR branch -->\n <template v-else>\n <ul class=\"contents\">\n <SecurityRequirementBadgeScheme\n v-for=\"(scheme, si) in group.schemes\"\n :key=\"si\"\n :scheme />\n </ul>\n </template>\n </li>\n </ul>\n\n <!-- Single group, multiple AND schemes -->\n <ul\n v-else-if=\"isAndGroup\"\n class=\"contents\">\n <SecurityRequirementBadgeScheme\n v-for=\"(scheme, key) in requiredSecurity.requirements[0]!.schemes\"\n :key\n :scheme />\n </ul>\n </div>\n <ScalarFloatingBackdrop />\n </div>\n </template>\n </ScalarFloating>\n</template>\n"],"mappings":"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"}
@@ -2,7 +2,7 @@ import { Fragment, createBlock, createCommentVNode, createElementBlock, createTe
2
2
  //#region src/features/Operation/components/SecurityRequirementBadgeScheme.vue?vue&type=script&setup=true&lang.ts
3
3
  var _hoisted_1 = { key: 0 };
4
4
  var _hoisted_2 = { key: 1 };
5
- var SecurityRequirementBadgeScheme_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
5
+ var SecurityRequirementBadgeScheme_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
6
6
  __name: "SecurityRequirementBadgeScheme",
7
7
  props: {
8
8
  is: { default: "li" },
@@ -1 +1 @@
1
- {"version":3,"file":"SecurityRequirementBadgeScheme.vue.script.js","names":[],"sources":["../../../../src/features/Operation/components/SecurityRequirementBadgeScheme.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { Component } from 'vue'\n\nimport type { RequiredSecurityScheme } from '@/features/Operation/helpers/get-required-security'\n\nconst { is = 'li', scheme } = defineProps<{\n is?: Component | string\n scheme: RequiredSecurityScheme\n}>()\n</script>\n<template>\n <component\n :is\n class=\"markdown\">\n {{ scheme.name }}\n <code v-if=\"scheme.scheme?.type\">{{ scheme.scheme.type }}</code>\n <ul v-if=\"scheme.scopes.length\">\n <li\n v-for=\"scope in scheme.scopes\"\n :key=\"scope\"\n class=\"font-code text-c-2\">\n {{ scope }}\n </li>\n </ul>\n </component>\n</template>\n"],"mappings":";;;;;;;;;;;;uBAWE,YAaY,wBAZT,QAAA,GAAE,EAAA,EACH,OAAM,YAAU,EAAA;2BACC;qCAAd,QAAA,OAAO,KAAI,GAAG,KACjB,EAAA;KAAY,QAAA,OAAO,QAAQ,QAAA,WAAA,EAA3B,mBAAgE,QAAA,YAAA,gBAA5B,QAAA,OAAO,OAAO,KAAI,EAAA,EAAA,IAAA,mBAAA,IAAA,KAAA;KAC5C,QAAA,OAAO,OAAO,UAAA,WAAA,EAAxB,mBAOK,MAAA,YAAA,EAAA,UAAA,KAAA,EANH,mBAKK,UAAA,MAAA,WAJa,QAAA,OAAO,SAAhB,UAAK;0BADd,mBAKK,MAAA;OAHF,KAAK;OACN,OAAM;yBACH,MAAK,EAAA,EAAA"}
1
+ {"version":3,"file":"SecurityRequirementBadgeScheme.vue.script.js","names":[],"sources":["../../../../src/features/Operation/components/SecurityRequirementBadgeScheme.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { Component } from 'vue'\n\nimport type { RequiredSecurityScheme } from '@/features/Operation/helpers/get-required-security'\n\nconst { is = 'li', scheme } = defineProps<{\n is?: Component | string\n scheme: RequiredSecurityScheme\n}>()\n</script>\n<template>\n <component\n :is\n class=\"markdown\">\n {{ scheme.name }}\n <code v-if=\"scheme.scheme?.type\">{{ scheme.scheme.type }}</code>\n <ul v-if=\"scheme.scopes.length\">\n <li\n v-for=\"scope in scheme.scopes\"\n :key=\"scope\"\n class=\"font-code text-c-2\">\n {{ scope }}\n </li>\n </ul>\n </component>\n</template>\n"],"mappings":";;;;;;;;;;;;uBAWE,YAaY,wBAZT,QAAA,EAAE,GAAA,EACH,OAAM,WAAU,GAAA;2BACC;qCAAd,QAAA,OAAO,IAAI,IAAG,KACjB,CAAA;KAAY,QAAA,OAAO,QAAQ,QAAA,UAAA,GAA3B,mBAAgE,QAAA,YAAA,gBAA5B,QAAA,OAAO,OAAO,IAAI,GAAA,CAAA,KAAA,mBAAA,IAAA,IAAA;KAC5C,QAAA,OAAO,OAAO,UAAA,UAAA,GAAxB,mBAOK,MAAA,YAAA,EAAA,UAAA,IAAA,GANH,mBAKK,UAAA,MAAA,WAJa,QAAA,OAAO,SAAhB,UAAK;0BADd,mBAKK,MAAA;OAHF,KAAK;OACN,OAAM;yBACH,KAAK,GAAA,CAAA"}
@@ -2,7 +2,7 @@ import _plugin_vue_export_helper_default from "../../../../_virtual/_plugin-vue_
2
2
  import Callback_vue_vue_type_script_setup_true_lang_default from "./Callback.vue.script.js";
3
3
  /* empty css */
4
4
  //#region src/features/Operation/components/callbacks/Callback.vue
5
- var Callback_default = /* @__PURE__ */ _plugin_vue_export_helper_default(Callback_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-474e6fa6"]]);
5
+ var Callback_default = /*#__PURE__*/ _plugin_vue_export_helper_default(Callback_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-474e6fa6"]]);
6
6
  //#endregion
7
7
  export { Callback_default as default };
8
8
 
@@ -10,7 +10,7 @@ var _hoisted_2 = { class: "font-code bg-b-1 callback-sticky-offset callback-list
10
10
  var _hoisted_3 = { class: "text-c-1 min-w-0 flex-1 truncate text-sm leading-5 font-bold group-open:whitespace-normal" };
11
11
  var _hoisted_4 = { class: "text-c-2 font-normal" };
12
12
  var _hoisted_5 = { class: "callback-operation-container flex flex-col gap-2" };
13
- var Callback_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
13
+ var Callback_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
14
14
  __name: "Callback",
15
15
  props: {
16
16
  callback: {},
@@ -1 +1 @@
1
- {"version":3,"file":"Callback.vue.script.js","names":[],"sources":["../../../../../src/features/Operation/components/callbacks/Callback.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { HttpMethod as HttpMethodType } from '@scalar/helpers/http/http-methods'\nimport { ScalarIconCaretRight } from '@scalar/icons'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport {\n type OpenApiDocument,\n type OperationObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nimport { HttpMethod } from '@/components/HttpMethod'\nimport OperationParameters from '@/features/Operation/components/OperationParameters.vue'\nimport OperationResponses from '@/features/Operation/components/OperationResponses.vue'\nimport type { OperationProps } from '@/features/Operation/Operation.vue'\n\nconst { method, name, url, options, document } = defineProps<{\n callback: OperationObject\n method: HttpMethodType\n name: string\n url: string\n eventBus: WorkspaceEventBus | null\n /** The document the callback belongs to, used to resolve schema references for display */\n document?: OpenApiDocument\n options: Pick<\n OperationProps['options'],\n | 'hideModels'\n | 'orderRequiredPropertiesFirst'\n | 'orderSchemaPropertiesBy'\n | 'expandAllSchemaProperties'\n >\n}>()\n</script>\n\n<template>\n <details class=\"group callback-list-item\">\n <!-- Title -->\n <summary\n class=\"font-code bg-b-1 callback-sticky-offset callback-list-item-title sticky flex cursor-pointer flex-row items-start gap-2 border-t py-2.5 text-sm group-open:flex-wrap\">\n <ScalarIconCaretRight\n class=\"callback-list-item-icon text-c-3 group-hover:text-c-1 absolute top-3.5 -left-5 size-3 transition-transform duration-100 group-open:rotate-90\"\n weight=\"bold\" />\n <HttpMethod\n as=\"span\"\n class=\"request-method py-0.75 font-bold\"\n :method=\"method\" />\n <div\n class=\"text-c-1 min-w-0 flex-1 truncate text-sm leading-5 font-bold group-open:whitespace-normal\">\n {{ name }}\n <span class=\"text-c-2 font-normal\">\n {{ url }}\n </span>\n </div>\n </summary>\n\n <!-- Body -->\n <div class=\"callback-operation-container flex flex-col gap-2\">\n <OperationParameters\n :document=\"document\"\n :eventBus=\"eventBus\"\n :options=\"options\"\n :parameters=\"\n callback.parameters?.map((param) => getResolvedRef(param)) ?? []\n \"\n :requestBody=\"getResolvedRef(callback.requestBody)\" />\n\n <!-- Responses -->\n <OperationResponses\n :collapsableItems=\"false\"\n :document\n :eventBus\n :options\n :responses=\"callback.responses\" />\n </div>\n </details>\n</template>\n<style scoped>\n.callback-sticky-offset {\n top: var(--refs-viewport-offset, 0px);\n z-index: 1;\n}\n.callback-operation-container :deep(.request-body),\n.callback-operation-container :deep(.request-body-description),\n.callback-operation-container :deep(.request-body-header) {\n margin-top: 0;\n}\n.callback-operation-container :deep(.request-body-header) {\n --scalar-font-size-2: var(--scalar-font-size-4);\n padding: 10px;\n border-bottom: none;\n border: 0.5px solid var(--scalar-border-color);\n border-radius: var(--scalar-radius-lg) var(--scalar-radius-lg) 0 0;\n background: color-mix(in srgb, var(--scalar-background-2) 50%, transparent);\n}\n.callback-operation-container\n :deep(.request-body-schema > .schema-card > .schema-card-description) {\n padding-inline: 8px;\n}\n.callback-operation-container :deep(ul li.property.property--level-1) {\n padding: 10px;\n}\n.callback-operation-container :deep(.request-body-schema) {\n background-color: var(--scalar-background-1);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n border-top: none;\n overflow: hidden;\n border-radius: 0 0 var(--scalar-radius-lg) var(--scalar-radius-lg);\n}\n.callback-operation-container :deep(.parameter-list) {\n margin-top: 0;\n}\n.callback-operation-container :deep(.parameter-list-title) {\n background: color-mix(in srgb, var(--scalar-background-2) 50%, transparent);\n border-radius: var(--scalar-radius-lg) var(--scalar-radius-lg) 0 0;\n padding: 10px;\n margin-bottom: 0;\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n border-bottom: none;\n --scalar-font-size-2: var(--scalar-font-size-4);\n}\n.callback-operation-container :deep(.parameter-list-items) {\n /* background: pink; */\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n border-radius: 0 0 var(--scalar-radius-lg) var(--scalar-radius-lg);\n}\n.callback-operation-container :deep(.parameter-list-items > li:first-of-type) {\n border-top: none;\n}\n.callback-operation-container :deep(.parameter-list-items > li) {\n padding: 0 8px;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;uBAkCE,mBAuCU,WAvCV,YAuCU,CArCR,mBAgBU,WAhBV,YAgBU;IAdR,YAEkB,MAAA,qBAAA,EAAA;KADhB,OAAM;KACN,QAAO;;IACT,YAGqB,MAAA,mBAAA,EAAA;KAFnB,IAAG;KACH,OAAM;KACL,QAAQ,QAAA;;IACX,mBAMM,OANN,YAMM,CAAA,gBAAA,gBAJD,QAAA,KAAI,GAAG,KACV,EAAA,EAAA,mBAEO,QAFP,YAEO,gBADF,QAAA,IAAG,EAAA,EAAA,CAAA,CAAA;OAMZ,mBAiBM,OAjBN,YAiBM,CAhBJ,YAOwD,6BAAA;IANrD,UAAU,QAAA;IACV,UAAU,QAAA;IACV,SAAS,QAAA;IACT,YAAuB,QAAA,SAAS,YAAY,KAAK,UAAU,MAAA,eAAc,CAAC,MAAK,CAAA,IAAA,EAAA;IAG/E,aAAa,MAAA,eAAc,CAAC,QAAA,SAAS,YAAW;;;;;;;OAGnD,YAKoC,4BAAA;IAJjC,kBAAkB;IAClB,UAAA,QAAA;IACA,UAAA,QAAA;IACA,SAAA,QAAA;IACA,WAAW,QAAA,SAAS"}
1
+ {"version":3,"file":"Callback.vue.script.js","names":[],"sources":["../../../../../src/features/Operation/components/callbacks/Callback.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { HttpMethod as HttpMethodType } from '@scalar/helpers/http/http-methods'\nimport { ScalarIconCaretRight } from '@scalar/icons'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport {\n type OpenApiDocument,\n type OperationObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nimport { HttpMethod } from '@/components/HttpMethod'\nimport OperationParameters from '@/features/Operation/components/OperationParameters.vue'\nimport OperationResponses from '@/features/Operation/components/OperationResponses.vue'\nimport type { OperationProps } from '@/features/Operation/Operation.vue'\n\nconst { method, name, url, options, document } = defineProps<{\n callback: OperationObject\n method: HttpMethodType\n name: string\n url: string\n eventBus: WorkspaceEventBus | null\n /** The document the callback belongs to, used to resolve schema references for display */\n document?: OpenApiDocument\n options: Pick<\n OperationProps['options'],\n | 'hideModels'\n | 'orderRequiredPropertiesFirst'\n | 'orderSchemaPropertiesBy'\n | 'expandAllSchemaProperties'\n >\n}>()\n</script>\n\n<template>\n <details class=\"group callback-list-item\">\n <!-- Title -->\n <summary\n class=\"font-code bg-b-1 callback-sticky-offset callback-list-item-title sticky flex cursor-pointer flex-row items-start gap-2 border-t py-2.5 text-sm group-open:flex-wrap\">\n <ScalarIconCaretRight\n class=\"callback-list-item-icon text-c-3 group-hover:text-c-1 absolute top-3.5 -left-5 size-3 transition-transform duration-100 group-open:rotate-90\"\n weight=\"bold\" />\n <HttpMethod\n as=\"span\"\n class=\"request-method py-0.75 font-bold\"\n :method=\"method\" />\n <div\n class=\"text-c-1 min-w-0 flex-1 truncate text-sm leading-5 font-bold group-open:whitespace-normal\">\n {{ name }}\n <span class=\"text-c-2 font-normal\">\n {{ url }}\n </span>\n </div>\n </summary>\n\n <!-- Body -->\n <div class=\"callback-operation-container flex flex-col gap-2\">\n <OperationParameters\n :document=\"document\"\n :eventBus=\"eventBus\"\n :options=\"options\"\n :parameters=\"\n callback.parameters?.map((param) => getResolvedRef(param)) ?? []\n \"\n :requestBody=\"getResolvedRef(callback.requestBody)\" />\n\n <!-- Responses -->\n <OperationResponses\n :collapsableItems=\"false\"\n :document\n :eventBus\n :options\n :responses=\"callback.responses\" />\n </div>\n </details>\n</template>\n<style scoped>\n.callback-sticky-offset {\n top: var(--refs-viewport-offset, 0px);\n z-index: 1;\n}\n.callback-operation-container :deep(.request-body),\n.callback-operation-container :deep(.request-body-description),\n.callback-operation-container :deep(.request-body-header) {\n margin-top: 0;\n}\n.callback-operation-container :deep(.request-body-header) {\n --scalar-font-size-2: var(--scalar-font-size-4);\n padding: 10px;\n border-bottom: none;\n border: 0.5px solid var(--scalar-border-color);\n border-radius: var(--scalar-radius-lg) var(--scalar-radius-lg) 0 0;\n background: color-mix(in srgb, var(--scalar-background-2) 50%, transparent);\n}\n.callback-operation-container\n :deep(.request-body-schema > .schema-card > .schema-card-description) {\n padding-inline: 8px;\n}\n.callback-operation-container :deep(ul li.property.property--level-1) {\n padding: 10px;\n}\n.callback-operation-container :deep(.request-body-schema) {\n background-color: var(--scalar-background-1);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n border-top: none;\n overflow: hidden;\n border-radius: 0 0 var(--scalar-radius-lg) var(--scalar-radius-lg);\n}\n.callback-operation-container :deep(.parameter-list) {\n margin-top: 0;\n}\n.callback-operation-container :deep(.parameter-list-title) {\n background: color-mix(in srgb, var(--scalar-background-2) 50%, transparent);\n border-radius: var(--scalar-radius-lg) var(--scalar-radius-lg) 0 0;\n padding: 10px;\n margin-bottom: 0;\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n border-bottom: none;\n --scalar-font-size-2: var(--scalar-font-size-4);\n}\n.callback-operation-container :deep(.parameter-list-items) {\n /* background: pink; */\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n border-radius: 0 0 var(--scalar-radius-lg) var(--scalar-radius-lg);\n}\n.callback-operation-container :deep(.parameter-list-items > li:first-of-type) {\n border-top: none;\n}\n.callback-operation-container :deep(.parameter-list-items > li) {\n padding: 0 8px;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;uBAkCE,mBAuCU,WAvCV,YAuCU,CArCR,mBAgBU,WAhBV,YAgBU;IAdR,YAEkB,MAAA,oBAAA,GAAA;KADhB,OAAM;KACN,QAAO;;IACT,YAGqB,MAAA,kBAAA,GAAA;KAFnB,IAAG;KACH,OAAM;KACL,QAAQ,QAAA;;IACX,mBAMM,OANN,YAMM,CAAA,gBAAA,gBAJD,QAAA,IAAI,IAAG,KACV,CAAA,GAAA,mBAEO,QAFP,YAEO,gBADF,QAAA,GAAG,GAAA,CAAA,CAAA,CAAA;OAMZ,mBAiBM,OAjBN,YAiBM,CAhBJ,YAOwD,6BAAA;IANrD,UAAU,QAAA;IACV,UAAU,QAAA;IACV,SAAS,QAAA;IACT,YAAuB,QAAA,SAAS,YAAY,KAAK,UAAU,MAAA,cAAA,CAAc,CAAC,KAAK,CAAA,KAAA,CAAA;IAG/E,aAAa,MAAA,cAAA,CAAc,CAAC,QAAA,SAAS,WAAW;;;;;;;OAGnD,YAKoC,4BAAA;IAJjC,kBAAkB;IAClB,UAAA,QAAA;IACA,UAAA,QAAA;IACA,SAAA,QAAA;IACA,WAAW,QAAA,SAAS"}
@@ -8,7 +8,7 @@ import { objectEntries } from "@scalar/helpers/object/object-entries";
8
8
  var _hoisted_1 = ["aria-label"];
9
9
  var _hoisted_2 = { class: "callbacks-title text-c-1 my-3 text-lg font-medium" };
10
10
  /** Extract the callbacks with method, url, and name */
11
- var Callbacks_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
11
+ var Callbacks_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
12
12
  __name: "Callbacks",
13
13
  props: {
14
14
  path: {},
@@ -1 +1 @@
1
- {"version":3,"file":"Callbacks.vue.script.js","names":[],"sources":["../../../../../src/features/Operation/components/callbacks/Callbacks.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { HttpMethod } from '@scalar/helpers/http/http-methods'\nimport { isHttpMethod } from '@scalar/helpers/http/is-http-method'\nimport { objectEntries } from '@scalar/helpers/object/object-entries'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type {\n CallbackObject,\n OpenApiDocument,\n OperationObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport { useLocalization } from '@/features/localization'\nimport type { OperationProps } from '@/features/Operation/Operation.vue'\n\nimport Callback from './Callback.vue'\n\nconst { path, callbacks, options } = defineProps<{\n path: string\n callbacks: CallbackObject\n eventBus: WorkspaceEventBus | null\n /** The document the callbacks belong to, used to resolve schema references for display */\n document?: OpenApiDocument\n options: Pick<\n OperationProps['options'],\n | 'hideModels'\n | 'orderRequiredPropertiesFirst'\n | 'orderSchemaPropertiesBy'\n | 'expandAllSchemaProperties'\n >\n}>()\nconst { translate } = useLocalization()\n\ntype CallbackType = {\n name: string\n url: string\n method: HttpMethod\n callback: OperationObject\n}\n\n/** Extract the callbacks with method, url, and name */\nconst flattenedCallbacks = computed<CallbackType[]>(() => {\n const _callbacks: CallbackType[] = []\n\n // Loop over the name level\n objectEntries(callbacks).forEach(([name, pathItem]) => {\n // Loop over the url level\n objectEntries(getResolvedRef(pathItem)).forEach(([url, methods]) => {\n if (typeof methods !== 'object' || !methods) {\n return\n }\n\n // Loop over the method level\n objectEntries(methods).forEach(([callbackMethod, callback]) => {\n if (!isHttpMethod(callbackMethod)) {\n return\n }\n\n _callbacks.push({\n name,\n url,\n method: callbackMethod,\n callback: callback,\n })\n })\n })\n })\n\n return _callbacks\n})\n</script>\n\n<template>\n <div\n :aria-label=\"translate('operation.callbacks')\"\n class=\"callbacks-list gap-3\"\n role=\"group\">\n <div class=\"callbacks-title text-c-1 my-3 text-lg font-medium\">\n {{ translate('operation.callbacks') }}\n </div>\n <Callback\n v-for=\"{ callback, method, name, url } in flattenedCallbacks\"\n :key=\"`${name}-${url}-${method}`\"\n :callback\n :document\n :eventBus\n :method\n :name\n :options\n :path\n :url />\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;EAgCA,MAAM,EAAE,cAAc,iBAAgB;EAUtC,MAAM,qBAAqB,eAA+B;GACxD,MAAM,aAA6B,EAAC;AAGpC,iBAAc,QAAA,UAAU,CAAC,SAAS,CAAC,MAAM,cAAc;AAErD,kBAAc,eAAe,SAAS,CAAC,CAAC,SAAS,CAAC,KAAK,aAAa;AAClE,SAAI,OAAO,YAAY,YAAY,CAAC,QAClC;AAIF,mBAAc,QAAQ,CAAC,SAAS,CAAC,gBAAgB,cAAc;AAC7D,UAAI,CAAC,aAAa,eAAe,CAC/B;AAGF,iBAAW,KAAK;OACd;OACA;OACA,QAAQ;OACE;OACX,CAAA;OACF;MACF;KACF;AAED,UAAO;IACR;;uBAIC,mBAkBM,OAAA;IAjBH,cAAY,MAAA,UAAS,CAAA,sBAAA;IACtB,OAAM;IACN,MAAK;OACL,mBAEM,OAFN,YAEM,gBADD,MAAA,UAAS,CAAA,sBAAA,CAAA,EAAA,EAAA,GAAA,UAAA,KAAA,EAEd,mBAUS,UAAA,MAAA,WATmC,mBAAA,QAAkB,EAAnD,UAAU,QAAQ,MAAM,UAAG;wBADtC,YAUS,kBAAA;KARN,KAAG,GAAK,KAAI,GAAI,IAAG,GAAI;KACvB;KACA,UAAA,QAAA;KACA,UAAA,QAAA;KACA;KACA;KACA,SAAA,QAAA;KACA,MAAA,QAAA;KACA"}
1
+ {"version":3,"file":"Callbacks.vue.script.js","names":[],"sources":["../../../../../src/features/Operation/components/callbacks/Callbacks.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { HttpMethod } from '@scalar/helpers/http/http-methods'\nimport { isHttpMethod } from '@scalar/helpers/http/is-http-method'\nimport { objectEntries } from '@scalar/helpers/object/object-entries'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type {\n CallbackObject,\n OpenApiDocument,\n OperationObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport { useLocalization } from '@/features/localization'\nimport type { OperationProps } from '@/features/Operation/Operation.vue'\n\nimport Callback from './Callback.vue'\n\nconst { path, callbacks, options } = defineProps<{\n path: string\n callbacks: CallbackObject\n eventBus: WorkspaceEventBus | null\n /** The document the callbacks belong to, used to resolve schema references for display */\n document?: OpenApiDocument\n options: Pick<\n OperationProps['options'],\n | 'hideModels'\n | 'orderRequiredPropertiesFirst'\n | 'orderSchemaPropertiesBy'\n | 'expandAllSchemaProperties'\n >\n}>()\nconst { translate } = useLocalization()\n\ntype CallbackType = {\n name: string\n url: string\n method: HttpMethod\n callback: OperationObject\n}\n\n/** Extract the callbacks with method, url, and name */\nconst flattenedCallbacks = computed<CallbackType[]>(() => {\n const _callbacks: CallbackType[] = []\n\n // Loop over the name level\n objectEntries(callbacks).forEach(([name, pathItem]) => {\n // Loop over the url level\n objectEntries(getResolvedRef(pathItem)).forEach(([url, methods]) => {\n if (typeof methods !== 'object' || !methods) {\n return\n }\n\n // Loop over the method level\n objectEntries(methods).forEach(([callbackMethod, callback]) => {\n if (!isHttpMethod(callbackMethod)) {\n return\n }\n\n _callbacks.push({\n name,\n url,\n method: callbackMethod,\n callback: callback,\n })\n })\n })\n })\n\n return _callbacks\n})\n</script>\n\n<template>\n <div\n :aria-label=\"translate('operation.callbacks')\"\n class=\"callbacks-list gap-3\"\n role=\"group\">\n <div class=\"callbacks-title text-c-1 my-3 text-lg font-medium\">\n {{ translate('operation.callbacks') }}\n </div>\n <Callback\n v-for=\"{ callback, method, name, url } in flattenedCallbacks\"\n :key=\"`${name}-${url}-${method}`\"\n :callback\n :document\n :eventBus\n :method\n :name\n :options\n :path\n :url />\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;EAgCA,MAAM,EAAE,cAAc,gBAAgB;EAUtC,MAAM,qBAAqB,eAA+B;GACxD,MAAM,aAA6B,CAAC;GAGpC,cAAc,QAAA,SAAS,CAAC,CAAC,SAAS,CAAC,MAAM,cAAc;IAErD,cAAc,eAAe,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,aAAa;KAClE,IAAI,OAAO,YAAY,YAAY,CAAC,SAClC;KAIF,cAAc,OAAO,CAAC,CAAC,SAAS,CAAC,gBAAgB,cAAc;MAC7D,IAAI,CAAC,aAAa,cAAc,GAC9B;MAGF,WAAW,KAAK;OACd;OACA;OACA,QAAQ;OACE;MACZ,CAAC;KACH,CAAC;IACH,CAAC;GACH,CAAC;GAED,OAAO;EACT,CAAC;;uBAIC,mBAkBM,OAAA;IAjBH,cAAY,MAAA,SAAA,CAAS,CAAA,qBAAA;IACtB,OAAM;IACN,MAAK;OACL,mBAEM,OAFN,YAEM,gBADD,MAAA,SAAA,CAAS,CAAA,qBAAA,CAAA,GAAA,CAAA,IAAA,UAAA,IAAA,GAEd,mBAUS,UAAA,MAAA,WATmC,mBAAA,QAAkB,EAAnD,UAAU,QAAQ,MAAM,UAAG;wBADtC,YAUS,kBAAA;KARN,KAAG,GAAK,KAAI,GAAI,IAAG,GAAI;KACvB;KACA,UAAA,QAAA;KACA,UAAA,QAAA;KACA;KACA;KACA,SAAA,QAAA;KACA,MAAA,QAAA;KACA"}
@@ -1 +1 @@
1
- {"version":3,"file":"get-parameter-examples.js","names":[],"sources":["../../../../../src/features/Operation/components/helpers/get-parameter-examples.ts"],"sourcesContent":["import type { ParameterObject, ResponseObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { isObjectLike } from '@scalar/helpers/object/is-object'\n\nconst filterUndefined = (example: unknown): example is unknown => example !== undefined\n\ntype GetParameterExamplesArgs = {\n parameter: ParameterObject | ResponseObject\n schemaExamples?: unknown[]\n contentExamples?: unknown\n}\n\n/**\n * Build a normalized examples array from parameter/content/schema examples.\n * Undefined values are removed so the UI does not render \"undefined\" entries.\n */\nexport const getParameterExamples = ({\n parameter,\n schemaExamples,\n contentExamples,\n}: GetParameterExamplesArgs): unknown[] => {\n const paramExamples = 'examples' in parameter && isObjectLike(parameter.examples) ? parameter.examples : {}\n\n const recordExamples = Object.values({\n ...paramExamples,\n ...(isObjectLike(contentExamples) ? contentExamples : {}),\n }).filter(filterUndefined)\n\n const fallbackExample =\n recordExamples.length === 0 && 'example' in parameter && parameter.example !== undefined ? [parameter.example] : []\n\n const arrayExamples = (schemaExamples ?? fallbackExample).filter(filterUndefined)\n\n return [...recordExamples, ...arrayExamples]\n}\n"],"mappings":";;AAGA,IAAM,mBAAmB,YAAyC,YAAY,KAAA;;;;;AAY9E,IAAa,wBAAwB,EACnC,WACA,gBACA,sBACyC;CACzC,MAAM,gBAAgB,cAAc,aAAa,aAAa,UAAU,SAAS,GAAG,UAAU,WAAW,EAAE;CAE3G,MAAM,iBAAiB,OAAO,OAAO;EACnC,GAAG;EACH,GAAI,aAAa,gBAAgB,GAAG,kBAAkB,EAAE;EACzD,CAAC,CAAC,OAAO,gBAAgB;CAE1B,MAAM,kBACJ,eAAe,WAAW,KAAK,aAAa,aAAa,UAAU,YAAY,KAAA,IAAY,CAAC,UAAU,QAAQ,GAAG,EAAE;CAErH,MAAM,iBAAiB,kBAAkB,iBAAiB,OAAO,gBAAgB;AAEjF,QAAO,CAAC,GAAG,gBAAgB,GAAG,cAAc"}
1
+ {"version":3,"file":"get-parameter-examples.js","names":[],"sources":["../../../../../src/features/Operation/components/helpers/get-parameter-examples.ts"],"sourcesContent":["import type { ParameterObject, ResponseObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { isObjectLike } from '@scalar/helpers/object/is-object'\n\nconst filterUndefined = (example: unknown): example is unknown => example !== undefined\n\ntype GetParameterExamplesArgs = {\n parameter: ParameterObject | ResponseObject\n schemaExamples?: unknown[]\n contentExamples?: unknown\n}\n\n/**\n * Build a normalized examples array from parameter/content/schema examples.\n * Undefined values are removed so the UI does not render \"undefined\" entries.\n */\nexport const getParameterExamples = ({\n parameter,\n schemaExamples,\n contentExamples,\n}: GetParameterExamplesArgs): unknown[] => {\n const paramExamples = 'examples' in parameter && isObjectLike(parameter.examples) ? parameter.examples : {}\n\n const recordExamples = Object.values({\n ...paramExamples,\n ...(isObjectLike(contentExamples) ? contentExamples : {}),\n }).filter(filterUndefined)\n\n const fallbackExample =\n recordExamples.length === 0 && 'example' in parameter && parameter.example !== undefined ? [parameter.example] : []\n\n const arrayExamples = (schemaExamples ?? fallbackExample).filter(filterUndefined)\n\n return [...recordExamples, ...arrayExamples]\n}\n"],"mappings":";;AAGA,IAAM,mBAAmB,YAAyC,YAAY,KAAA;;;;;AAY9E,IAAa,wBAAwB,EACnC,WACA,gBACA,sBACyC;CACzC,MAAM,gBAAgB,cAAc,aAAa,aAAa,UAAU,QAAQ,IAAI,UAAU,WAAW,CAAC;CAE1G,MAAM,iBAAiB,OAAO,OAAO;EACnC,GAAG;EACH,GAAI,aAAa,eAAe,IAAI,kBAAkB,CAAC;CACzD,CAAC,CAAC,CAAC,OAAO,eAAe;CAEzB,MAAM,kBACJ,eAAe,WAAW,KAAK,aAAa,aAAa,UAAU,YAAY,KAAA,IAAY,CAAC,UAAU,OAAO,IAAI,CAAC;CAEpH,MAAM,iBAAiB,kBAAkB,gBAAA,CAAiB,OAAO,eAAe;CAEhF,OAAO,CAAC,GAAG,gBAAgB,GAAG,aAAa;AAC7C"}
@@ -1 +1 @@
1
- {"version":3,"file":"filter-selected-security.js","names":[],"sources":["../../../../src/features/Operation/helpers/filter-selected-security.ts"],"sourcesContent":["import type { SelectedSecurity } from '@scalar/workspace-store/entities/auth'\nimport type { SecuritySchemeObjectSecret } from '@scalar/workspace-store/request-example'\nimport {\n type MergedSecuritySchemes,\n getSecuritySchemes,\n getSelectedSecurity,\n} from '@scalar/workspace-store/request-example'\nimport type {\n OpenApiDocument,\n OperationObject,\n SecurityRequirementObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\n/** Builds a quick cache key from the sorted object keys */\nconst getKey = (requirement: SecurityRequirementObject) => Object.keys(requirement).sort().join(',')\n\n/**\n * Find the intersection between which security is selected on the document and what this operation requires\n *\n * If there is no overlap, we return the first requirement\n */\nexport const filterSelectedSecurity = (\n document: OpenApiDocument,\n operation: OperationObject | null,\n selectedSecurityDocument?: SelectedSecurity,\n selectedSecurityOperation?: SelectedSecurity,\n securitySchemes: MergedSecuritySchemes = {},\n): SecuritySchemeObjectSecret[] => {\n const securityRequirements = operation?.security ?? document.security ?? []\n\n /** The selected security keys for the document */\n const selectedSecurity = getSelectedSecurity(\n selectedSecurityDocument,\n selectedSecurityOperation,\n securityRequirements,\n )\n\n /** Build a set for O(1) lookup */\n const requirementSet = new Set(securityRequirements.map((r) => getKey(r)))\n\n // Lets check the selectedIndex first\n const selectedRequirement = selectedSecurity.selectedSchemes[selectedSecurity.selectedIndex]\n if (selectedRequirement && requirementSet.has(getKey(selectedRequirement))) {\n return getSecuritySchemes(securitySchemes, selectedRequirement)\n }\n\n // Otherwise lets loop over all selected\n for (const selected of selectedSecurity.selectedSchemes) {\n if (requirementSet.has(getKey(selected))) {\n return getSecuritySchemes(securitySchemes, selected)\n }\n }\n\n /**\n * If we are selected security on the document,\n * we should show the first requirement of the operation to show auth is required\n */\n if (operation?.security?.length) {\n return getSecuritySchemes(securitySchemes, securityRequirements[0] ?? {})\n }\n\n return []\n}\n"],"mappings":";;;AAcA,IAAM,UAAU,gBAA2C,OAAO,KAAK,YAAY,CAAC,MAAM,CAAC,KAAK,IAAI;;;;;;AAOpG,IAAa,0BACX,UACA,WACA,0BACA,2BACA,kBAAyC,EAAE,KACV;CACjC,MAAM,uBAAuB,WAAW,YAAY,SAAS,YAAY,EAAE;;CAG3E,MAAM,mBAAmB,oBACvB,0BACA,2BACA,qBACD;;CAGD,MAAM,iBAAiB,IAAI,IAAI,qBAAqB,KAAK,MAAM,OAAO,EAAE,CAAC,CAAC;CAG1E,MAAM,sBAAsB,iBAAiB,gBAAgB,iBAAiB;AAC9E,KAAI,uBAAuB,eAAe,IAAI,OAAO,oBAAoB,CAAC,CACxE,QAAO,mBAAmB,iBAAiB,oBAAoB;AAIjE,MAAK,MAAM,YAAY,iBAAiB,gBACtC,KAAI,eAAe,IAAI,OAAO,SAAS,CAAC,CACtC,QAAO,mBAAmB,iBAAiB,SAAS;;;;;AAQxD,KAAI,WAAW,UAAU,OACvB,QAAO,mBAAmB,iBAAiB,qBAAqB,MAAM,EAAE,CAAC;AAG3E,QAAO,EAAE"}
1
+ {"version":3,"file":"filter-selected-security.js","names":[],"sources":["../../../../src/features/Operation/helpers/filter-selected-security.ts"],"sourcesContent":["import type { SelectedSecurity } from '@scalar/workspace-store/entities/auth'\nimport type { SecuritySchemeObjectSecret } from '@scalar/workspace-store/request-example'\nimport {\n type MergedSecuritySchemes,\n getSecuritySchemes,\n getSelectedSecurity,\n} from '@scalar/workspace-store/request-example'\nimport type {\n OpenApiDocument,\n OperationObject,\n SecurityRequirementObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\n/** Builds a quick cache key from the sorted object keys */\nconst getKey = (requirement: SecurityRequirementObject) => Object.keys(requirement).sort().join(',')\n\n/**\n * Find the intersection between which security is selected on the document and what this operation requires\n *\n * If there is no overlap, we return the first requirement\n */\nexport const filterSelectedSecurity = (\n document: OpenApiDocument,\n operation: OperationObject | null,\n selectedSecurityDocument?: SelectedSecurity,\n selectedSecurityOperation?: SelectedSecurity,\n securitySchemes: MergedSecuritySchemes = {},\n): SecuritySchemeObjectSecret[] => {\n const securityRequirements = operation?.security ?? document.security ?? []\n\n /** The selected security keys for the document */\n const selectedSecurity = getSelectedSecurity(\n selectedSecurityDocument,\n selectedSecurityOperation,\n securityRequirements,\n )\n\n /** Build a set for O(1) lookup */\n const requirementSet = new Set(securityRequirements.map((r) => getKey(r)))\n\n // Lets check the selectedIndex first\n const selectedRequirement = selectedSecurity.selectedSchemes[selectedSecurity.selectedIndex]\n if (selectedRequirement && requirementSet.has(getKey(selectedRequirement))) {\n return getSecuritySchemes(securitySchemes, selectedRequirement)\n }\n\n // Otherwise lets loop over all selected\n for (const selected of selectedSecurity.selectedSchemes) {\n if (requirementSet.has(getKey(selected))) {\n return getSecuritySchemes(securitySchemes, selected)\n }\n }\n\n /**\n * If we are selected security on the document,\n * we should show the first requirement of the operation to show auth is required\n */\n if (operation?.security?.length) {\n return getSecuritySchemes(securitySchemes, securityRequirements[0] ?? {})\n }\n\n return []\n}\n"],"mappings":";;;AAcA,IAAM,UAAU,gBAA2C,OAAO,KAAK,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,GAAG;;;;;;AAOnG,IAAa,0BACX,UACA,WACA,0BACA,2BACA,kBAAyC,CAAC,MACT;CACjC,MAAM,uBAAuB,WAAW,YAAY,SAAS,YAAY,CAAC;;CAG1E,MAAM,mBAAmB,oBACvB,0BACA,2BACA,oBACF;;CAGA,MAAM,iBAAiB,IAAI,IAAI,qBAAqB,KAAK,MAAM,OAAO,CAAC,CAAC,CAAC;CAGzE,MAAM,sBAAsB,iBAAiB,gBAAgB,iBAAiB;CAC9E,IAAI,uBAAuB,eAAe,IAAI,OAAO,mBAAmB,CAAC,GACvE,OAAO,mBAAmB,iBAAiB,mBAAmB;CAIhE,KAAK,MAAM,YAAY,iBAAiB,iBACtC,IAAI,eAAe,IAAI,OAAO,QAAQ,CAAC,GACrC,OAAO,mBAAmB,iBAAiB,QAAQ;;;;;CAQvD,IAAI,WAAW,UAAU,QACvB,OAAO,mBAAmB,iBAAiB,qBAAqB,MAAM,CAAC,CAAC;CAG1E,OAAO,CAAC;AACV"}
@@ -1 +1 @@
1
- {"version":3,"file":"flatten-deep-object-query-parameter.js","names":[],"sources":["../../../../src/features/Operation/helpers/flatten-deep-object-query-parameter.ts"],"sourcesContent":["import { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type {\n ParameterObject,\n ParameterWithSchemaObject,\n ReferenceType,\n SchemaObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { isObjectSchema } from '@scalar/workspace-store/schemas/v3.1/strict/type-guards'\n\ntype ParameterWithRequiredSchema = ParameterWithSchemaObject & {\n schema: ReferenceType<SchemaObject>\n}\n\nconst isParameterWithSchema = (parameter: ParameterObject): parameter is ParameterWithRequiredSchema =>\n 'schema' in parameter && parameter.schema !== undefined\n\nconst resolveSchema = (schema: unknown): SchemaObject | undefined => {\n const resolvedSchema = getResolvedRef(schema as SchemaObject | { '$ref': string; '$ref-value': SchemaObject })\n\n return resolvedSchema as SchemaObject | undefined\n}\n\nconst toFlattenedDeepObjectParameter = (\n parameter: ParameterWithRequiredSchema,\n name: string,\n description: string | undefined,\n required: boolean,\n schema: SchemaObject,\n): ParameterWithRequiredSchema => {\n const { example: _example, examples: _examples, ...parameterWithoutExamples } = parameter\n\n return {\n ...parameterWithoutExamples,\n name,\n description,\n required,\n schema,\n }\n}\n\nconst flattenDeepObjectProperties = (\n parameter: ParameterWithRequiredSchema,\n schema: Extract<SchemaObject, { type: 'object' }>,\n namePrefix: string,\n): ParameterObject[] => {\n if (!schema.properties) {\n return [parameter]\n }\n\n const requiredProperties = new Set(schema.required ?? [])\n const flattenedParameters = Object.entries(schema.properties).flatMap(([propertyName, propertySchema]) => {\n const resolvedPropertySchema = resolveSchema(propertySchema)\n if (!resolvedPropertySchema) {\n return []\n }\n\n const nestedName = `${namePrefix}[${propertyName}]`\n const nestedParameter = toFlattenedDeepObjectParameter(\n parameter,\n nestedName,\n resolvedPropertySchema.description ?? parameter.description,\n requiredProperties.has(propertyName),\n resolvedPropertySchema,\n )\n\n if (isObjectSchema(resolvedPropertySchema) && resolvedPropertySchema.properties) {\n return flattenDeepObjectProperties(nestedParameter, resolvedPropertySchema, nestedName)\n }\n\n return [nestedParameter]\n })\n\n return flattenedParameters.length > 0 ? flattenedParameters : [parameter]\n}\n\n/**\n * Deep object query parameters serialize as name[prop] pairs in URLs.\n * Rendering the same shape keeps docs aligned with the request UI.\n */\nexport const flattenDeepObjectQueryParameter = (parameter: ParameterObject): ParameterObject[] => {\n if (parameter.in !== 'query' || !isParameterWithSchema(parameter) || parameter.style !== 'deepObject') {\n return [parameter]\n }\n\n const resolvedSchema = resolveSchema(parameter.schema)\n if (!resolvedSchema || !isObjectSchema(resolvedSchema)) {\n return [parameter]\n }\n\n return flattenDeepObjectProperties(parameter, resolvedSchema, parameter.name)\n}\n"],"mappings":";;;AAaA,IAAM,yBAAyB,cAC7B,YAAY,aAAa,UAAU,WAAW,KAAA;AAEhD,IAAM,iBAAiB,WAA8C;AAGnE,QAFuB,eAAe,OAAwE;;AAKhH,IAAM,kCACJ,WACA,MACA,aACA,UACA,WACgC;CAChC,MAAM,EAAE,SAAS,UAAU,UAAU,WAAW,GAAG,6BAA6B;AAEhF,QAAO;EACL,GAAG;EACH;EACA;EACA;EACA;EACD;;AAGH,IAAM,+BACJ,WACA,QACA,eACsB;AACtB,KAAI,CAAC,OAAO,WACV,QAAO,CAAC,UAAU;CAGpB,MAAM,qBAAqB,IAAI,IAAI,OAAO,YAAY,EAAE,CAAC;CACzD,MAAM,sBAAsB,OAAO,QAAQ,OAAO,WAAW,CAAC,SAAS,CAAC,cAAc,oBAAoB;EACxG,MAAM,yBAAyB,cAAc,eAAe;AAC5D,MAAI,CAAC,uBACH,QAAO,EAAE;EAGX,MAAM,aAAa,GAAG,WAAW,GAAG,aAAa;EACjD,MAAM,kBAAkB,+BACtB,WACA,YACA,uBAAuB,eAAe,UAAU,aAChD,mBAAmB,IAAI,aAAa,EACpC,uBACD;AAED,MAAI,eAAe,uBAAuB,IAAI,uBAAuB,WACnE,QAAO,4BAA4B,iBAAiB,wBAAwB,WAAW;AAGzF,SAAO,CAAC,gBAAgB;GACxB;AAEF,QAAO,oBAAoB,SAAS,IAAI,sBAAsB,CAAC,UAAU;;;;;;AAO3E,IAAa,mCAAmC,cAAkD;AAChG,KAAI,UAAU,OAAO,WAAW,CAAC,sBAAsB,UAAU,IAAI,UAAU,UAAU,aACvF,QAAO,CAAC,UAAU;CAGpB,MAAM,iBAAiB,cAAc,UAAU,OAAO;AACtD,KAAI,CAAC,kBAAkB,CAAC,eAAe,eAAe,CACpD,QAAO,CAAC,UAAU;AAGpB,QAAO,4BAA4B,WAAW,gBAAgB,UAAU,KAAK"}
1
+ {"version":3,"file":"flatten-deep-object-query-parameter.js","names":[],"sources":["../../../../src/features/Operation/helpers/flatten-deep-object-query-parameter.ts"],"sourcesContent":["import { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type {\n ParameterObject,\n ParameterWithSchemaObject,\n ReferenceType,\n SchemaObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { isObjectSchema } from '@scalar/workspace-store/schemas/v3.1/strict/type-guards'\n\ntype ParameterWithRequiredSchema = ParameterWithSchemaObject & {\n schema: ReferenceType<SchemaObject>\n}\n\nconst isParameterWithSchema = (parameter: ParameterObject): parameter is ParameterWithRequiredSchema =>\n 'schema' in parameter && parameter.schema !== undefined\n\nconst resolveSchema = (schema: unknown): SchemaObject | undefined => {\n const resolvedSchema = getResolvedRef(schema as SchemaObject | { '$ref': string; '$ref-value': SchemaObject })\n\n return resolvedSchema as SchemaObject | undefined\n}\n\nconst toFlattenedDeepObjectParameter = (\n parameter: ParameterWithRequiredSchema,\n name: string,\n description: string | undefined,\n required: boolean,\n schema: SchemaObject,\n): ParameterWithRequiredSchema => {\n const { example: _example, examples: _examples, ...parameterWithoutExamples } = parameter\n\n return {\n ...parameterWithoutExamples,\n name,\n description,\n required,\n schema,\n }\n}\n\nconst flattenDeepObjectProperties = (\n parameter: ParameterWithRequiredSchema,\n schema: Extract<SchemaObject, { type: 'object' }>,\n namePrefix: string,\n): ParameterObject[] => {\n if (!schema.properties) {\n return [parameter]\n }\n\n const requiredProperties = new Set(schema.required ?? [])\n const flattenedParameters = Object.entries(schema.properties).flatMap(([propertyName, propertySchema]) => {\n const resolvedPropertySchema = resolveSchema(propertySchema)\n if (!resolvedPropertySchema) {\n return []\n }\n\n const nestedName = `${namePrefix}[${propertyName}]`\n const nestedParameter = toFlattenedDeepObjectParameter(\n parameter,\n nestedName,\n resolvedPropertySchema.description ?? parameter.description,\n requiredProperties.has(propertyName),\n resolvedPropertySchema,\n )\n\n if (isObjectSchema(resolvedPropertySchema) && resolvedPropertySchema.properties) {\n return flattenDeepObjectProperties(nestedParameter, resolvedPropertySchema, nestedName)\n }\n\n return [nestedParameter]\n })\n\n return flattenedParameters.length > 0 ? flattenedParameters : [parameter]\n}\n\n/**\n * Deep object query parameters serialize as name[prop] pairs in URLs.\n * Rendering the same shape keeps docs aligned with the request UI.\n */\nexport const flattenDeepObjectQueryParameter = (parameter: ParameterObject): ParameterObject[] => {\n if (parameter.in !== 'query' || !isParameterWithSchema(parameter) || parameter.style !== 'deepObject') {\n return [parameter]\n }\n\n const resolvedSchema = resolveSchema(parameter.schema)\n if (!resolvedSchema || !isObjectSchema(resolvedSchema)) {\n return [parameter]\n }\n\n return flattenDeepObjectProperties(parameter, resolvedSchema, parameter.name)\n}\n"],"mappings":";;;AAaA,IAAM,yBAAyB,cAC7B,YAAY,aAAa,UAAU,WAAW,KAAA;AAEhD,IAAM,iBAAiB,WAA8C;CAGnE,OAFuB,eAAe,MAE/B;AACT;AAEA,IAAM,kCACJ,WACA,MACA,aACA,UACA,WACgC;CAChC,MAAM,EAAE,SAAS,UAAU,UAAU,WAAW,GAAG,6BAA6B;CAEhF,OAAO;EACL,GAAG;EACH;EACA;EACA;EACA;CACF;AACF;AAEA,IAAM,+BACJ,WACA,QACA,eACsB;CACtB,IAAI,CAAC,OAAO,YACV,OAAO,CAAC,SAAS;CAGnB,MAAM,qBAAqB,IAAI,IAAI,OAAO,YAAY,CAAC,CAAC;CACxD,MAAM,sBAAsB,OAAO,QAAQ,OAAO,UAAU,CAAC,CAAC,SAAS,CAAC,cAAc,oBAAoB;EACxG,MAAM,yBAAyB,cAAc,cAAc;EAC3D,IAAI,CAAC,wBACH,OAAO,CAAC;EAGV,MAAM,aAAa,GAAG,WAAW,GAAG,aAAa;EACjD,MAAM,kBAAkB,+BACtB,WACA,YACA,uBAAuB,eAAe,UAAU,aAChD,mBAAmB,IAAI,YAAY,GACnC,sBACF;EAEA,IAAI,eAAe,sBAAsB,KAAK,uBAAuB,YACnE,OAAO,4BAA4B,iBAAiB,wBAAwB,UAAU;EAGxF,OAAO,CAAC,eAAe;CACzB,CAAC;CAED,OAAO,oBAAoB,SAAS,IAAI,sBAAsB,CAAC,SAAS;AAC1E;;;;;AAMA,IAAa,mCAAmC,cAAkD;CAChG,IAAI,UAAU,OAAO,WAAW,CAAC,sBAAsB,SAAS,KAAK,UAAU,UAAU,cACvF,OAAO,CAAC,SAAS;CAGnB,MAAM,iBAAiB,cAAc,UAAU,MAAM;CACrD,IAAI,CAAC,kBAAkB,CAAC,eAAe,cAAc,GACnD,OAAO,CAAC,SAAS;CAGnB,OAAO,4BAA4B,WAAW,gBAAgB,UAAU,IAAI;AAC9E"}
@@ -38,4 +38,17 @@ export type RequiredSecurity = {
38
38
  * appears — whether alongside real requirements or as the only entry — auth is treated as optional (state: 'optional').
39
39
  */
40
40
  export declare const getRequiredSecurity: (operation: Pick<OperationObject, "security"> | null | undefined, document: Pick<OpenApiDocument, "security" | "components">) => RequiredSecurity;
41
+ /**
42
+ * Required OAuth scopes grouped by security alternative (OR).
43
+ *
44
+ * Each returned array is the de-duplicated set of scopes for one alternative, kept in
45
+ * declaration order. Scopes are only collected for OAuth2 / OpenID Connect schemes, so
46
+ * alternatives without any scopes (for example API-key-only auth) are omitted and the
47
+ * result is empty when the operation requires no OAuth scopes.
48
+ *
49
+ * Grouping is preserved intentionally: unioning scopes across alternatives would imply
50
+ * that mutually exclusive scope sets are all required at once, which misstates OpenAPI
51
+ * OR semantics.
52
+ */
53
+ export declare const getRequiredScopeGroups: (requiredSecurity: RequiredSecurity) => string[][];
41
54
  //# sourceMappingURL=get-required-security.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-required-security.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/helpers/get-required-security.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AACnG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uDAAuD,CAAA;AAC5F,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6DAA6D,CAAA;AAEvG,MAAM,MAAM,qBAAqB,GAAG,UAAU,GAAG,UAAU,GAAG,MAAM,CAAA;AAEpE,MAAM,MAAM,sBAAsB,GAAG;IACnC,8DAA8D;IAC9D,IAAI,EAAE,MAAM,CAAA;IACZ,kGAAkG;IAClG,MAAM,EAAE,oBAAoB,GAAG,SAAS,CAAA;IACxC,mGAAmG;IACnG,MAAM,EAAE,MAAM,EAAE,CAAA;CACjB,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,OAAO,EAAE,sBAAsB,EAAE,CAAA;CAClC,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,EAAE,qBAAqB,CAAA;IAC5B;;;;;;;OAOG;IACH,YAAY,EAAE,qBAAqB,EAAE,CAAA;CACtC,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,GAC9B,WAAW,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,GAAG,IAAI,GAAG,SAAS,EAC/D,UAAU,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,YAAY,CAAC,KACzD,gBAgCF,CAAA"}
1
+ {"version":3,"file":"get-required-security.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/helpers/get-required-security.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AACnG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uDAAuD,CAAA;AAC5F,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6DAA6D,CAAA;AAEvG,MAAM,MAAM,qBAAqB,GAAG,UAAU,GAAG,UAAU,GAAG,MAAM,CAAA;AAEpE,MAAM,MAAM,sBAAsB,GAAG;IACnC,8DAA8D;IAC9D,IAAI,EAAE,MAAM,CAAA;IACZ,kGAAkG;IAClG,MAAM,EAAE,oBAAoB,GAAG,SAAS,CAAA;IACxC,mGAAmG;IACnG,MAAM,EAAE,MAAM,EAAE,CAAA;CACjB,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,OAAO,EAAE,sBAAsB,EAAE,CAAA;CAClC,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,EAAE,qBAAqB,CAAA;IAC5B;;;;;;;OAOG;IACH,YAAY,EAAE,qBAAqB,EAAE,CAAA;CACtC,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,GAC9B,WAAW,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,GAAG,IAAI,GAAG,SAAS,EAC/D,UAAU,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,YAAY,CAAC,KACzD,gBAgCF,CAAA;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,sBAAsB,GAAI,kBAAkB,gBAAgB,KAAG,MAAM,EAAE,EAkBnF,CAAA"}
@@ -35,7 +35,28 @@ var getRequiredSecurity = (operation, document) => {
35
35
  requirements: groups
36
36
  };
37
37
  };
38
+ /**
39
+ * Required OAuth scopes grouped by security alternative (OR).
40
+ *
41
+ * Each returned array is the de-duplicated set of scopes for one alternative, kept in
42
+ * declaration order. Scopes are only collected for OAuth2 / OpenID Connect schemes, so
43
+ * alternatives without any scopes (for example API-key-only auth) are omitted and the
44
+ * result is empty when the operation requires no OAuth scopes.
45
+ *
46
+ * Grouping is preserved intentionally: unioning scopes across alternatives would imply
47
+ * that mutually exclusive scope sets are all required at once, which misstates OpenAPI
48
+ * OR semantics.
49
+ */
50
+ var getRequiredScopeGroups = (requiredSecurity) => {
51
+ const groups = [];
52
+ for (const group of requiredSecurity.requirements) {
53
+ const collected = /* @__PURE__ */ new Set();
54
+ for (const scheme of group.schemes) for (const scope of scheme.scopes) collected.add(scope);
55
+ if (collected.size > 0) groups.push([...collected]);
56
+ }
57
+ return groups;
58
+ };
38
59
  //#endregion
39
- export { getRequiredSecurity };
60
+ export { getRequiredScopeGroups, getRequiredSecurity };
40
61
 
41
62
  //# sourceMappingURL=get-required-security.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-required-security.js","names":[],"sources":["../../../../src/features/Operation/helpers/get-required-security.ts"],"sourcesContent":["import { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport { isNonOptionalSecurityRequirement } from '@scalar/workspace-store/helpers/is-non-optional-security-requirement'\nimport type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport type { OperationObject } from '@scalar/workspace-store/schemas/v3.1/strict/operation'\nimport type { SecuritySchemeObject } from '@scalar/workspace-store/schemas/v3.1/strict/security-scheme'\n\nexport type RequiredSecurityState = 'required' | 'optional' | 'none'\n\nexport type RequiredSecurityScheme = {\n /** Scheme key as declared in `components.securitySchemes`. */\n name: string\n /** Resolved scheme object. `undefined` if the referenced scheme isn't defined on the document. */\n scheme: SecuritySchemeObject | undefined\n /** Scopes required by the operation for this scheme (OAuth2 / OpenID Connect). Empty otherwise. */\n scopes: string[]\n}\n\n/**\n * One alternative in the security requirement list.\n * All schemes within a group must be satisfied simultaneously (AND semantics).\n */\nexport type RequiredSecurityGroup = {\n schemes: RequiredSecurityScheme[]\n}\n\nexport type RequiredSecurity = {\n state: RequiredSecurityState\n /**\n * Each element is one alternative (OR semantics). Within each group, all schemes\n * must be satisfied simultaneously (AND semantics). Empty when `state === 'none'`.\n *\n * Mirrors the OpenAPI `security` array structure:\n * - outer array → OR (satisfy any one group)\n * - inner object → AND (all schemes in a group are required together)\n */\n requirements: RequiredSecurityGroup[]\n}\n\n/**\n * Determine whether an operation requires authentication, using `operation.security ?? document.security`\n * as the source of truth. Operation-level `security` fully overrides document-level — including `security: []`,\n * which explicitly opts the operation out of auth.\n *\n * OpenAPI encodes \"auth is optional\" by including an empty requirement object `{}`. Whenever `{}`\n * appears — whether alongside real requirements or as the only entry — auth is treated as optional (state: 'optional').\n */\nexport const getRequiredSecurity = (\n operation: Pick<OperationObject, 'security'> | null | undefined,\n document: Pick<OpenApiDocument, 'security' | 'components'>,\n): RequiredSecurity => {\n const securityList = operation?.security ?? document.security ?? []\n const definedSchemes = document.components?.securitySchemes ?? {}\n\n let hasEmpty = false\n const groups: RequiredSecurityGroup[] = []\n\n for (const requirement of securityList) {\n if (!isNonOptionalSecurityRequirement(requirement)) {\n hasEmpty = true\n continue\n }\n\n const schemes: RequiredSecurityScheme[] = Object.entries(requirement).map(([name, scopes]) => ({\n name,\n scheme: getResolvedRef(definedSchemes[name]),\n scopes: scopes.filter((s) => s.length > 0),\n }))\n\n if (schemes.length > 0) {\n groups.push({ schemes })\n }\n }\n\n if (groups.length === 0) {\n return { state: hasEmpty ? 'optional' : 'none', requirements: [] }\n }\n\n return {\n state: hasEmpty ? 'optional' : 'required',\n requirements: groups,\n }\n}\n"],"mappings":";;;;;;;;;;;AA8CA,IAAa,uBACX,WACA,aACqB;CACrB,MAAM,eAAe,WAAW,YAAY,SAAS,YAAY,EAAE;CACnE,MAAM,iBAAiB,SAAS,YAAY,mBAAmB,EAAE;CAEjE,IAAI,WAAW;CACf,MAAM,SAAkC,EAAE;AAE1C,MAAK,MAAM,eAAe,cAAc;AACtC,MAAI,CAAC,iCAAiC,YAAY,EAAE;AAClD,cAAW;AACX;;EAGF,MAAM,UAAoC,OAAO,QAAQ,YAAY,CAAC,KAAK,CAAC,MAAM,aAAa;GAC7F;GACA,QAAQ,eAAe,eAAe,MAAM;GAC5C,QAAQ,OAAO,QAAQ,MAAM,EAAE,SAAS,EAAE;GAC3C,EAAE;AAEH,MAAI,QAAQ,SAAS,EACnB,QAAO,KAAK,EAAE,SAAS,CAAC;;AAI5B,KAAI,OAAO,WAAW,EACpB,QAAO;EAAE,OAAO,WAAW,aAAa;EAAQ,cAAc,EAAE;EAAE;AAGpE,QAAO;EACL,OAAO,WAAW,aAAa;EAC/B,cAAc;EACf"}
1
+ {"version":3,"file":"get-required-security.js","names":[],"sources":["../../../../src/features/Operation/helpers/get-required-security.ts"],"sourcesContent":["import { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport { isNonOptionalSecurityRequirement } from '@scalar/workspace-store/helpers/is-non-optional-security-requirement'\nimport type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport type { OperationObject } from '@scalar/workspace-store/schemas/v3.1/strict/operation'\nimport type { SecuritySchemeObject } from '@scalar/workspace-store/schemas/v3.1/strict/security-scheme'\n\nexport type RequiredSecurityState = 'required' | 'optional' | 'none'\n\nexport type RequiredSecurityScheme = {\n /** Scheme key as declared in `components.securitySchemes`. */\n name: string\n /** Resolved scheme object. `undefined` if the referenced scheme isn't defined on the document. */\n scheme: SecuritySchemeObject | undefined\n /** Scopes required by the operation for this scheme (OAuth2 / OpenID Connect). Empty otherwise. */\n scopes: string[]\n}\n\n/**\n * One alternative in the security requirement list.\n * All schemes within a group must be satisfied simultaneously (AND semantics).\n */\nexport type RequiredSecurityGroup = {\n schemes: RequiredSecurityScheme[]\n}\n\nexport type RequiredSecurity = {\n state: RequiredSecurityState\n /**\n * Each element is one alternative (OR semantics). Within each group, all schemes\n * must be satisfied simultaneously (AND semantics). Empty when `state === 'none'`.\n *\n * Mirrors the OpenAPI `security` array structure:\n * - outer array → OR (satisfy any one group)\n * - inner object → AND (all schemes in a group are required together)\n */\n requirements: RequiredSecurityGroup[]\n}\n\n/**\n * Determine whether an operation requires authentication, using `operation.security ?? document.security`\n * as the source of truth. Operation-level `security` fully overrides document-level — including `security: []`,\n * which explicitly opts the operation out of auth.\n *\n * OpenAPI encodes \"auth is optional\" by including an empty requirement object `{}`. Whenever `{}`\n * appears — whether alongside real requirements or as the only entry — auth is treated as optional (state: 'optional').\n */\nexport const getRequiredSecurity = (\n operation: Pick<OperationObject, 'security'> | null | undefined,\n document: Pick<OpenApiDocument, 'security' | 'components'>,\n): RequiredSecurity => {\n const securityList = operation?.security ?? document.security ?? []\n const definedSchemes = document.components?.securitySchemes ?? {}\n\n let hasEmpty = false\n const groups: RequiredSecurityGroup[] = []\n\n for (const requirement of securityList) {\n if (!isNonOptionalSecurityRequirement(requirement)) {\n hasEmpty = true\n continue\n }\n\n const schemes: RequiredSecurityScheme[] = Object.entries(requirement).map(([name, scopes]) => ({\n name,\n scheme: getResolvedRef(definedSchemes[name]),\n scopes: scopes.filter((s) => s.length > 0),\n }))\n\n if (schemes.length > 0) {\n groups.push({ schemes })\n }\n }\n\n if (groups.length === 0) {\n return { state: hasEmpty ? 'optional' : 'none', requirements: [] }\n }\n\n return {\n state: hasEmpty ? 'optional' : 'required',\n requirements: groups,\n }\n}\n\n/**\n * Required OAuth scopes grouped by security alternative (OR).\n *\n * Each returned array is the de-duplicated set of scopes for one alternative, kept in\n * declaration order. Scopes are only collected for OAuth2 / OpenID Connect schemes, so\n * alternatives without any scopes (for example API-key-only auth) are omitted and the\n * result is empty when the operation requires no OAuth scopes.\n *\n * Grouping is preserved intentionally: unioning scopes across alternatives would imply\n * that mutually exclusive scope sets are all required at once, which misstates OpenAPI\n * OR semantics.\n */\nexport const getRequiredScopeGroups = (requiredSecurity: RequiredSecurity): string[][] => {\n const groups: string[][] = []\n\n for (const group of requiredSecurity.requirements) {\n const collected = new Set<string>()\n\n for (const scheme of group.schemes) {\n for (const scope of scheme.scopes) {\n collected.add(scope)\n }\n }\n\n if (collected.size > 0) {\n groups.push([...collected])\n }\n }\n\n return groups\n}\n"],"mappings":";;;;;;;;;;;AA8CA,IAAa,uBACX,WACA,aACqB;CACrB,MAAM,eAAe,WAAW,YAAY,SAAS,YAAY,CAAC;CAClE,MAAM,iBAAiB,SAAS,YAAY,mBAAmB,CAAC;CAEhE,IAAI,WAAW;CACf,MAAM,SAAkC,CAAC;CAEzC,KAAK,MAAM,eAAe,cAAc;EACtC,IAAI,CAAC,iCAAiC,WAAW,GAAG;GAClD,WAAW;GACX;EACF;EAEA,MAAM,UAAoC,OAAO,QAAQ,WAAW,CAAC,CAAC,KAAK,CAAC,MAAM,aAAa;GAC7F;GACA,QAAQ,eAAe,eAAe,KAAK;GAC3C,QAAQ,OAAO,QAAQ,MAAM,EAAE,SAAS,CAAC;EAC3C,EAAE;EAEF,IAAI,QAAQ,SAAS,GACnB,OAAO,KAAK,EAAE,QAAQ,CAAC;CAE3B;CAEA,IAAI,OAAO,WAAW,GACpB,OAAO;EAAE,OAAO,WAAW,aAAa;EAAQ,cAAc,CAAC;CAAE;CAGnE,OAAO;EACL,OAAO,WAAW,aAAa;EAC/B,cAAc;CAChB;AACF;;;;;;;;;;;;;AAcA,IAAa,0BAA0B,qBAAmD;CACxF,MAAM,SAAqB,CAAC;CAE5B,KAAK,MAAM,SAAS,iBAAiB,cAAc;EACjD,MAAM,4BAAY,IAAI,IAAY;EAElC,KAAK,MAAM,UAAU,MAAM,SACzB,KAAK,MAAM,SAAS,OAAO,QACzB,UAAU,IAAI,KAAK;EAIvB,IAAI,UAAU,OAAO,GACnB,OAAO,KAAK,CAAC,GAAG,SAAS,CAAC;CAE9B;CAEA,OAAO;AACT"}