@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":"SchemaPropertyHeading.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaPropertyHeading.vue"],"names":[],"mappings":"AAifA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAoBhG,KAAK,WAAW,GAAG;IACf,KAAK,EAAE,YAAY,GAAG,SAAS,CAAA;IAC/B,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,qHAAqH;IACrH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,8GAA8G;IAC9G,aAAa,CAAC,EAAE,YAAY,CAAA;IAC5B,QAAQ,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAA;CACpC,CAAC;AA8lBJ,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAK5C,QAAA,MAAM,UAAU;cA9mBD,OAAO;cAQP,iBAAiB,GAAG,IAAI;oBALlB,OAAO;qBAJN,OAAO;kBAGV,OAAO;6EA+mBxB,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AAWzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"SchemaPropertyHeading.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaPropertyHeading.vue"],"names":[],"mappings":"AAugBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAoBhG,KAAK,WAAW,GAAG;IACf,KAAK,EAAE,YAAY,GAAG,SAAS,CAAA;IAC/B,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,qHAAqH;IACrH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,8GAA8G;IAC9G,aAAa,CAAC,EAAE,YAAY,CAAA;IAC5B,QAAQ,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAA;CACpC,CAAC;AAqnBJ,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAK5C,QAAA,MAAM,UAAU;cAroBD,OAAO;cAQP,iBAAiB,GAAG,IAAI;oBALlB,OAAO;qBAJN,OAAO;kBAGV,OAAO;6EAsoBxB,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AAWzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -2,7 +2,7 @@ import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_exp
2
2
  import SchemaPropertyHeading_vue_vue_type_script_setup_true_lang_default from "./SchemaPropertyHeading.vue.script.js";
3
3
  /* empty css */
4
4
  //#region src/components/Content/Schema/SchemaPropertyHeading.vue
5
- var SchemaPropertyHeading_default = /* @__PURE__ */ _plugin_vue_export_helper_default(SchemaPropertyHeading_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-18714eaa"]]);
5
+ var SchemaPropertyHeading_default = /*#__PURE__*/ _plugin_vue_export_helper_default(SchemaPropertyHeading_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-74d321d3"]]);
6
6
  //#endregion
7
7
  export { SchemaPropertyHeading_default as default };
8
8
 
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaPropertyHeading.vue.js","names":[],"sources":["../../../../src/components/Content/Schema/SchemaPropertyHeading.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { isDefined } from '@scalar/helpers/array/is-defined'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { resolve } from '@scalar/workspace-store/resolve'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport {\n isArraySchema,\n isNumberSchema,\n isStringSchema,\n} from '@scalar/workspace-store/schemas/v3.1/strict/type-guards'\nimport { computed, toRef } from 'vue'\n\nimport { Badge } from '@/components/Badge'\nimport LinkButton from '@/components/Content/Schema/LinkButton.vue'\nimport ScreenReader from '@/components/ScreenReader.vue'\nimport { useLocalization } from '@/features/localization'\n\nimport { getSchemaType } from './helpers/get-schema-type'\nimport { getModelNameFromSchema } from './helpers/schema-name'\nimport RenderString from './RenderString.vue'\nimport SchemaPropertyDefault from './SchemaPropertyDefault.vue'\nimport SchemaPropertyDetail from './SchemaPropertyDetail.vue'\nimport SchemaPropertyExamples from './SchemaPropertyExamples.vue'\n\nconst props = withDefaults(\n defineProps<{\n value: SchemaObject | undefined\n enum?: boolean\n isDiscriminator?: boolean\n required?: boolean\n additional?: boolean\n withExamples?: boolean\n hideModelNames?: boolean\n /** When the schema was resolved from a $ref, pass the ref name so it displays as e.g. \"Data\" instead of \"object\". */\n modelName?: string | null\n /** Resolved propertyNames schema, used to surface key constraints like `format` for additional properties. */\n propertyNames?: SchemaObject\n eventBus?: WorkspaceEventBus | null\n }>(),\n {\n isDiscriminator: false,\n required: false,\n withExamples: true,\n hideModelNames: false,\n eventBus: null,\n },\n)\nconst { translate } = useLocalization()\n\n// Convert to reactive refs for composables\nconst valueRef = toRef(props, 'value')\n\nconst constValue = computed(() => {\n if (!valueRef.value) {\n return undefined\n }\n\n const schema = valueRef.value\n\n // Direct const value\n if (schema.const !== undefined) {\n return schema.const\n }\n\n // Single-item enum acts as const\n if (schema.enum?.length === 1) {\n return schema.enum[0]\n }\n\n // Check items for const values (for arrays)\n if (isArraySchema(schema) && schema.items) {\n const items = resolve.schema(schema.items)\n\n if (isDefined(items.const)) {\n return items.const\n }\n\n if (items.enum?.length === 1) {\n return items.enum[0]\n }\n }\n\n return undefined\n})\n\nconst validationProperties = computed(() => {\n if (!valueRef.value) {\n return []\n }\n\n const schema = valueRef.value\n const properties = []\n\n // Array validation properties\n if (isArraySchema(schema)) {\n if (schema.minItems || schema.maxItems) {\n properties.push({\n key: 'array-range',\n value: `${schema.minItems || ''}…${schema.maxItems || ''}`,\n })\n }\n\n // Unique items\n if (schema.uniqueItems) {\n properties.push({\n key: 'unique-items',\n value: `${translate('common.unique')}!`,\n })\n }\n }\n\n // String length properties\n if (isStringSchema(schema)) {\n if (schema.minLength) {\n properties.push({\n key: 'min-length',\n prefix: `${translate('common.minLength')}: `,\n value: schema.minLength,\n })\n }\n\n if (schema.maxLength) {\n properties.push({\n key: 'max-length',\n prefix: `${translate('common.maxLength')}: `,\n value: schema.maxLength,\n })\n }\n\n // Pattern\n if (schema.pattern) {\n properties.push({\n key: 'pattern',\n value: schema.pattern,\n code: true,\n truncate: true,\n })\n }\n }\n\n // Format\n if (isStringSchema(schema) || isNumberSchema(schema)) {\n if (schema.format) {\n properties.push({\n key: 'format',\n value: schema.format,\n truncate: true,\n })\n }\n }\n\n // Numeric validation properties\n if (isNumberSchema(schema)) {\n if (isDefined(schema.exclusiveMinimum)) {\n properties.push({\n key: 'exclusive-minimum',\n prefix: `${translate('common.greaterThan')}: `,\n value: schema.exclusiveMinimum,\n })\n }\n\n if (isDefined(schema.minimum)) {\n properties.push({\n key: 'minimum',\n prefix: `${translate('common.min')}: `,\n value: schema.minimum,\n })\n }\n\n if (isDefined(schema.exclusiveMaximum)) {\n properties.push({\n key: 'exclusive-maximum',\n prefix: `${translate('common.lessThan')}: `,\n value: schema.exclusiveMaximum,\n })\n }\n\n if (isDefined(schema.maximum)) {\n properties.push({\n key: 'maximum',\n prefix: `${translate('common.max')}: `,\n value: schema.maximum,\n })\n }\n\n if (isDefined(schema.multipleOf)) {\n properties.push({\n key: 'multiple-of',\n prefix: `${translate('common.multipleOf')}: `,\n value: schema.multipleOf,\n })\n }\n }\n\n return properties\n})\n\n/** Link data for navigating to the referenced model in the sidebar. */\nconst modelLink = computed(() => {\n if (!props.value) {\n return null\n }\n\n if (props.hideModelNames) {\n return null\n }\n\n if (props.modelName) {\n return { schemaKey: props.modelName, label: props.modelName }\n }\n\n const modelName = getModelNameFromSchema(props.value)\n if (modelName) {\n return { schemaKey: modelName.schemaKey, label: modelName.label }\n }\n\n if (isArraySchema(props.value) && props.value.items) {\n const itemName = getModelNameFromSchema(props.value.items)\n return itemName\n ? { schemaKey: itemName.schemaKey, label: `${itemName.label}[]` }\n : null\n }\n\n return null\n})\n\n/** Check if we should show the type information */\nconst shouldShowType = computed(() => {\n if (!props.value || !('type' in props.value)) {\n return false\n }\n\n // Always show type for arrays, even when items have const values\n if (props.value.type === 'array') {\n return true\n }\n\n // For non-arrays, only show if no const value at the schema level\n return !constValue.value\n})\n\n/** Get the display type */\nconst displayType = computed(() => {\n if (!props.value) {\n return ''\n }\n return getSchemaType(props.value)\n})\n\n/**\n * Type and format of the property keys, derived from the propertyNames schema.\n *\n * For a map keyed by UUIDs this renders e.g. \"string · uuid\" so the key\n * constraints are not lost. Returns undefined when there is nothing to show.\n */\nconst propertyNamesDetail = computed(() => {\n const schema = props.propertyNames\n if (!schema) {\n return undefined\n }\n\n const parts = [getSchemaType(schema)]\n if ('format' in schema && typeof schema.format === 'string') {\n parts.push(schema.format)\n }\n\n const detail = parts.filter(Boolean).join(' · ')\n return detail.length > 0 ? detail : undefined\n})\n\nconst exampleValue = computed(() => {\n // Treat only `undefined` as \"not set\" — `null` is a valid example value on a nullable schema.\n if (\n props.value &&\n 'example' in props.value &&\n props.value.example !== undefined\n ) {\n return props.value.example\n }\n\n if (props.value && isArraySchema(props.value)) {\n const itemsSchema = resolve.schema(props.value.items)\n if (\n itemsSchema &&\n 'example' in itemsSchema &&\n itemsSchema.example !== undefined\n ) {\n return itemsSchema.example\n }\n }\n\n return undefined\n})\n</script>\n<template>\n <div class=\"property-heading\">\n <div\n v-if=\"$slots.name\"\n class=\"property-name\"\n :class=\"{ deprecated: props.value?.deprecated }\">\n <slot name=\"name\" />\n </div>\n <div\n v-if=\"props.isDiscriminator\"\n class=\"property-discriminator\">\n {{ translate('common.discriminator') }}\n </div>\n <template v-if=\"props.value\">\n <!-- Type information -->\n <SchemaPropertyDetail\n v-if=\"shouldShowType\"\n truncate>\n <ScreenReader>{{ translate('common.type') }}:</ScreenReader>\n {{ displayType }}\n <template v-if=\"modelLink\">\n ·\n <LinkButton\n v-if=\"props.eventBus && modelLink.schemaKey\"\n @click=\"\n props.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 </template>\n </SchemaPropertyDetail>\n\n <!-- Key constraints from propertyNames (e.g. \"keys: string · uuid\") -->\n <SchemaPropertyDetail\n v-if=\"propertyNamesDetail\"\n truncate>\n <template #prefix>{{ translate('common.keys') }}:</template>\n {{ propertyNamesDetail }}\n </SchemaPropertyDetail>\n\n <!-- Dynamic validation properties from composable -->\n <SchemaPropertyDetail\n v-for=\"property in validationProperties\"\n :key=\"property.key\"\n :code=\"property.code\"\n :truncate=\"property.truncate\">\n <ScreenReader v-if=\"property.key === 'format'\">\n {{ translate('common.format') }}:\n </ScreenReader>\n <ScreenReader v-else-if=\"property.key === 'pattern'\">\n {{ translate('common.pattern') }}:\n </ScreenReader>\n <template\n v-if=\"property.prefix\"\n #prefix>\n {{ property.prefix }}\n </template>\n {{ property.value }}\n </SchemaPropertyDetail>\n\n <!-- Enum indicator -->\n <SchemaPropertyDetail v-if=\"props.enum\">\n {{ translate('common.enum') }}\n </SchemaPropertyDetail>\n </template>\n <div\n v-if=\"props.additional\"\n class=\"property-additional\">\n <template v-if=\"props.value?.['x-additionalPropertiesName']\">\n {{ props.value['x-additionalPropertiesName'] }}\n </template>\n <template v-else>{{ translate('common.additionalProperties') }}</template>\n </div>\n <div\n v-if=\"props.value?.deprecated\"\n class=\"property-deprecated\">\n <Badge>{{ translate('common.deprecated') }}</Badge>\n </div>\n <!-- Don't use `isDefined` here, we want to show `const` when the value is `null` -->\n <div\n v-if=\"constValue !== undefined\"\n class=\"property-const\">\n <SchemaPropertyDetail truncate>\n <template #prefix>{{ translate('common.const') }}: </template>\n <RenderString :value=\"constValue\" />\n </SchemaPropertyDetail>\n </div>\n <template v-else>\n <!-- Shows only when a composition is used (so props.value?.type is undefined) -->\n <SchemaPropertyDetail v-if=\"(props.value as any)?.nullable === true\">\n {{ translate('common.nullable') }}\n </SchemaPropertyDetail>\n </template>\n <div\n v-if=\"props.value?.writeOnly\"\n class=\"property-write-only\">\n {{ translate('common.writeOnly') }}\n </div>\n <div\n v-else-if=\"props.value?.readOnly\"\n class=\"property-read-only\">\n {{ translate('common.readOnly') }}\n </div>\n <div\n v-if=\"props.required\"\n class=\"property-required\">\n {{ translate('common.required') }}\n </div>\n <SchemaPropertyDefault :value=\"props.value?.default\" />\n <SchemaPropertyExamples\n v-if=\"props.withExamples\"\n :example=\"exampleValue\"\n :examples=\"props.value?.examples\" />\n </div>\n</template>\n<style scoped>\n.property-heading {\n display: flex;\n flex-wrap: wrap;\n align-items: baseline;\n row-gap: 9px;\n white-space: nowrap;\n}\n\n.property-heading:has(+ .children),\n.property-heading:has(+ .property-rule) {\n margin-bottom: 9px;\n}\n\n.property-heading > * {\n margin-right: 9px;\n}\n\n.property-heading:last-child {\n margin-right: 0;\n}\n\n.property-heading > .property-detail:not(:last-of-type) {\n margin-right: 0;\n}\n\n.property-name {\n max-width: 100%;\n font-family: var(--scalar-font-code);\n font-weight: var(--scalar-bold);\n font-size: var(--scalar-font-size-4);\n white-space: normal;\n overflow-wrap: break-word;\n}\n\n.property-additional {\n font-family: var(--scalar-font-code);\n}\n\n.property-required,\n.property-optional {\n color: var(--scalar-color-2);\n}\n\n.property-required {\n font-size: var(--scalar-mini);\n color: var(--scalar-color-orange);\n}\n\n.property-read-only {\n font-size: var(--scalar-mini);\n color: var(--scalar-color-blue);\n}\n\n.property-write-only {\n font-size: var(--scalar-mini);\n color: var(--scalar-color-green);\n}\n\n.property-discriminator {\n font-size: var(--scalar-mini);\n color: var(--scalar-color-purple);\n}\n\n.property-detail {\n font-size: var(--scalar-mini);\n color: var(--scalar-color-2);\n display: flex;\n align-items: center;\n\n min-width: 0;\n}\n\n.property-const {\n color: var(--scalar-color-1);\n}\n\n.deprecated {\n text-decoration: line-through;\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"SchemaPropertyHeading.vue.js","names":[],"sources":["../../../../src/components/Content/Schema/SchemaPropertyHeading.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { isDefined } from '@scalar/helpers/array/is-defined'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { resolve } from '@scalar/workspace-store/resolve'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport {\n isArraySchema,\n isNumberSchema,\n isStringSchema,\n} from '@scalar/workspace-store/schemas/v3.1/strict/type-guards'\nimport { computed, toRef } from 'vue'\n\nimport { Badge } from '@/components/Badge'\nimport LinkButton from '@/components/Content/Schema/LinkButton.vue'\nimport ScreenReader from '@/components/ScreenReader.vue'\nimport { useLocalization } from '@/features/localization'\n\nimport { getSchemaType } from './helpers/get-schema-type'\nimport { getModelNameFromSchema } from './helpers/schema-name'\nimport RenderString from './RenderString.vue'\nimport SchemaPropertyDefault from './SchemaPropertyDefault.vue'\nimport SchemaPropertyDetail from './SchemaPropertyDetail.vue'\nimport SchemaPropertyExamples from './SchemaPropertyExamples.vue'\n\nconst props = withDefaults(\n defineProps<{\n value: SchemaObject | undefined\n enum?: boolean\n isDiscriminator?: boolean\n required?: boolean\n additional?: boolean\n withExamples?: boolean\n hideModelNames?: boolean\n /** When the schema was resolved from a $ref, pass the ref name so it displays as e.g. \"Data\" instead of \"object\". */\n modelName?: string | null\n /** Resolved propertyNames schema, used to surface key constraints like `format` for additional properties. */\n propertyNames?: SchemaObject\n eventBus?: WorkspaceEventBus | null\n }>(),\n {\n isDiscriminator: false,\n required: false,\n withExamples: true,\n hideModelNames: false,\n eventBus: null,\n },\n)\nconst { translate } = useLocalization()\n\n// Convert to reactive refs for composables\nconst valueRef = toRef(props, 'value')\n\nconst constValue = computed(() => {\n if (!valueRef.value) {\n return undefined\n }\n\n const schema = valueRef.value\n\n // Direct const value\n if (schema.const !== undefined) {\n return schema.const\n }\n\n // Single-item enum acts as const\n if (schema.enum?.length === 1) {\n return schema.enum[0]\n }\n\n // Check items for const values (for arrays)\n if (isArraySchema(schema) && schema.items) {\n const items = resolve.schema(schema.items)\n\n if (isDefined(items.const)) {\n return items.const\n }\n\n if (items.enum?.length === 1) {\n return items.enum[0]\n }\n }\n\n return undefined\n})\n\ntype ValidationProperty = {\n key: string\n value: string | number\n prefix?: string\n code?: boolean\n truncate?: boolean\n}\n\n/**\n * Constraints that live on a leaf (string or number) schema: length, pattern,\n * format and numeric ranges. Extracted so they can be surfaced for a primitive\n * schema as well as for a primitive array's items, which are not rendered on\n * their own. See https://github.com/scalar/scalar/issues/9690\n */\nconst getLeafConstraints = (schema: SchemaObject) => {\n const properties: ValidationProperty[] = []\n\n if (isStringSchema(schema)) {\n if (schema.minLength) {\n properties.push({\n key: 'min-length',\n prefix: `${translate('common.minLength')}: `,\n value: schema.minLength,\n })\n }\n\n if (schema.maxLength) {\n properties.push({\n key: 'max-length',\n prefix: `${translate('common.maxLength')}: `,\n value: schema.maxLength,\n })\n }\n\n if (schema.pattern) {\n properties.push({\n key: 'pattern',\n value: schema.pattern,\n code: true,\n truncate: true,\n })\n }\n }\n\n if ((isStringSchema(schema) || isNumberSchema(schema)) && schema.format) {\n properties.push({\n key: 'format',\n value: schema.format,\n truncate: true,\n })\n }\n\n if (isNumberSchema(schema)) {\n if (isDefined(schema.exclusiveMinimum)) {\n properties.push({\n key: 'exclusive-minimum',\n prefix: `${translate('common.greaterThan')}: `,\n value: schema.exclusiveMinimum,\n })\n }\n\n if (isDefined(schema.minimum)) {\n properties.push({\n key: 'minimum',\n prefix: `${translate('common.min')}: `,\n value: schema.minimum,\n })\n }\n\n if (isDefined(schema.exclusiveMaximum)) {\n properties.push({\n key: 'exclusive-maximum',\n prefix: `${translate('common.lessThan')}: `,\n value: schema.exclusiveMaximum,\n })\n }\n\n if (isDefined(schema.maximum)) {\n properties.push({\n key: 'maximum',\n prefix: `${translate('common.max')}: `,\n value: schema.maximum,\n })\n }\n\n if (isDefined(schema.multipleOf)) {\n properties.push({\n key: 'multiple-of',\n prefix: `${translate('common.multipleOf')}: `,\n value: schema.multipleOf,\n })\n }\n }\n\n return properties\n}\n\nconst validationProperties = computed(() => {\n if (!valueRef.value) {\n return []\n }\n\n const schema = valueRef.value\n const properties: ValidationProperty[] = []\n\n // Array validation properties\n if (isArraySchema(schema)) {\n if (schema.minItems || schema.maxItems) {\n properties.push({\n key: 'array-range',\n value: `${schema.minItems || ''}…${schema.maxItems || ''}`,\n })\n }\n\n // Unique items\n if (schema.uniqueItems) {\n properties.push({\n key: 'unique-items',\n value: `${translate('common.unique')}!`,\n })\n }\n }\n\n properties.push(...getLeafConstraints(schema))\n\n // Primitive array items carry their own constraints (e.g. an array of `uuid`\n // strings) but are not rendered separately, so surface them here.\n if (isArraySchema(schema) && schema.items) {\n properties.push(...getLeafConstraints(resolve.schema(schema.items)))\n }\n\n return properties\n})\n\n/** Link data for navigating to the referenced model in the sidebar. */\nconst modelLink = computed(() => {\n if (!props.value) {\n return null\n }\n\n if (props.hideModelNames) {\n return null\n }\n\n if (props.modelName) {\n return { schemaKey: props.modelName, label: props.modelName }\n }\n\n const modelName = getModelNameFromSchema(props.value)\n if (modelName) {\n return { schemaKey: modelName.schemaKey, label: modelName.label }\n }\n\n if (isArraySchema(props.value) && props.value.items) {\n const itemName = getModelNameFromSchema(props.value.items)\n return itemName\n ? { schemaKey: itemName.schemaKey, label: `${itemName.label}[]` }\n : null\n }\n\n return null\n})\n\n/** Check if we should show the type information */\nconst shouldShowType = computed(() => {\n if (!props.value || !('type' in props.value)) {\n return false\n }\n\n // Always show type for arrays, even when items have const values\n if (props.value.type === 'array') {\n return true\n }\n\n // For non-arrays, only show if no const value at the schema level\n return !constValue.value\n})\n\n/** Get the display type */\nconst displayType = computed(() => {\n if (!props.value) {\n return ''\n }\n return getSchemaType(props.value)\n})\n\n/**\n * Type and format of the property keys, derived from the propertyNames schema.\n *\n * For a map keyed by UUIDs this renders e.g. \"string · uuid\" so the key\n * constraints are not lost. Returns undefined when there is nothing to show.\n */\nconst propertyNamesDetail = computed(() => {\n const schema = props.propertyNames\n if (!schema) {\n return undefined\n }\n\n const parts = [getSchemaType(schema)]\n if ('format' in schema && typeof schema.format === 'string') {\n parts.push(schema.format)\n }\n\n const detail = parts.filter(Boolean).join(' · ')\n return detail.length > 0 ? detail : undefined\n})\n\nconst exampleValue = computed(() => {\n // Treat only `undefined` as \"not set\" — `null` is a valid example value on a nullable schema.\n if (\n props.value &&\n 'example' in props.value &&\n props.value.example !== undefined\n ) {\n return props.value.example\n }\n\n if (props.value && isArraySchema(props.value)) {\n const itemsSchema = resolve.schema(props.value.items)\n if (\n itemsSchema &&\n 'example' in itemsSchema &&\n itemsSchema.example !== undefined\n ) {\n return itemsSchema.example\n }\n }\n\n return undefined\n})\n</script>\n<template>\n <div class=\"property-heading\">\n <div\n v-if=\"$slots.name\"\n class=\"property-name\"\n :class=\"{ deprecated: props.value?.deprecated }\">\n <slot name=\"name\" />\n </div>\n <div\n v-if=\"props.isDiscriminator\"\n class=\"property-discriminator\">\n {{ translate('common.discriminator') }}\n </div>\n <template v-if=\"props.value\">\n <!-- Type information -->\n <SchemaPropertyDetail\n v-if=\"shouldShowType\"\n truncate>\n <ScreenReader>{{ translate('common.type') }}:</ScreenReader>\n {{ displayType }}\n <template v-if=\"modelLink\">\n ·\n <LinkButton\n v-if=\"props.eventBus && modelLink.schemaKey\"\n @click=\"\n props.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 </template>\n </SchemaPropertyDetail>\n\n <!-- Key constraints from propertyNames (e.g. \"keys: string · uuid\") -->\n <SchemaPropertyDetail\n v-if=\"propertyNamesDetail\"\n truncate>\n <template #prefix>{{ translate('common.keys') }}:</template>\n {{ propertyNamesDetail }}\n </SchemaPropertyDetail>\n\n <!-- Dynamic validation properties from composable -->\n <SchemaPropertyDetail\n v-for=\"property in validationProperties\"\n :key=\"property.key\"\n :code=\"property.code\"\n :truncate=\"property.truncate\">\n <ScreenReader v-if=\"property.key === 'format'\">\n {{ translate('common.format') }}:\n </ScreenReader>\n <ScreenReader v-else-if=\"property.key === 'pattern'\">\n {{ translate('common.pattern') }}:\n </ScreenReader>\n <template\n v-if=\"property.prefix\"\n #prefix>\n {{ property.prefix }}\n </template>\n {{ property.value }}\n </SchemaPropertyDetail>\n\n <!-- Enum indicator -->\n <SchemaPropertyDetail v-if=\"props.enum\">\n {{ translate('common.enum') }}\n </SchemaPropertyDetail>\n </template>\n <div\n v-if=\"props.additional\"\n class=\"property-additional\">\n <template v-if=\"props.value?.['x-additionalPropertiesName']\">\n {{ props.value['x-additionalPropertiesName'] }}\n </template>\n <template v-else>{{ translate('common.additionalProperties') }}</template>\n </div>\n <div\n v-if=\"props.value?.deprecated\"\n class=\"property-deprecated\">\n <Badge>{{ translate('common.deprecated') }}</Badge>\n </div>\n <!-- Don't use `isDefined` here, we want to show `const` when the value is `null` -->\n <div\n v-if=\"constValue !== undefined\"\n class=\"property-const\">\n <SchemaPropertyDetail truncate>\n <template #prefix>{{ translate('common.const') }}: </template>\n <RenderString :value=\"constValue\" />\n </SchemaPropertyDetail>\n </div>\n <template v-else>\n <!-- Shows only when a composition is used (so props.value?.type is undefined) -->\n <SchemaPropertyDetail v-if=\"(props.value as any)?.nullable === true\">\n {{ translate('common.nullable') }}\n </SchemaPropertyDetail>\n </template>\n <div\n v-if=\"props.value?.writeOnly\"\n class=\"property-write-only\">\n {{ translate('common.writeOnly') }}\n </div>\n <div\n v-else-if=\"props.value?.readOnly\"\n class=\"property-read-only\">\n {{ translate('common.readOnly') }}\n </div>\n <div\n v-if=\"props.required\"\n class=\"property-required\">\n {{ translate('common.required') }}\n </div>\n <SchemaPropertyDefault :value=\"props.value?.default\" />\n <SchemaPropertyExamples\n v-if=\"props.withExamples\"\n :example=\"exampleValue\"\n :examples=\"props.value?.examples\" />\n </div>\n</template>\n<style scoped>\n.property-heading {\n display: flex;\n flex-wrap: wrap;\n align-items: baseline;\n row-gap: 9px;\n white-space: nowrap;\n}\n\n.property-heading:has(+ .children),\n.property-heading:has(+ .property-rule) {\n margin-bottom: 9px;\n}\n\n.property-heading > * {\n margin-right: 9px;\n}\n\n.property-heading:last-child {\n margin-right: 0;\n}\n\n.property-heading > .property-detail:not(:last-of-type) {\n margin-right: 0;\n}\n\n.property-name {\n max-width: 100%;\n font-family: var(--scalar-font-code);\n font-weight: var(--scalar-bold);\n font-size: var(--scalar-font-size-4);\n white-space: normal;\n overflow-wrap: break-word;\n}\n\n.property-additional {\n font-family: var(--scalar-font-code);\n}\n\n.property-required,\n.property-optional {\n color: var(--scalar-color-2);\n}\n\n.property-required {\n font-size: var(--scalar-mini);\n color: var(--scalar-color-orange);\n}\n\n.property-read-only {\n font-size: var(--scalar-mini);\n color: var(--scalar-color-blue);\n}\n\n.property-write-only {\n font-size: var(--scalar-mini);\n color: var(--scalar-color-green);\n}\n\n.property-discriminator {\n font-size: var(--scalar-mini);\n color: var(--scalar-color-purple);\n}\n\n.property-detail {\n font-size: var(--scalar-mini);\n color: var(--scalar-color-2);\n display: flex;\n align-items: center;\n\n min-width: 0;\n}\n\n.property-const {\n color: var(--scalar-color-1);\n}\n\n.deprecated {\n text-decoration: line-through;\n}\n</style>\n"],"mappings":""}
@@ -42,7 +42,13 @@ var _hoisted_8 = {
42
42
  key: 9,
43
43
  class: "property-required"
44
44
  };
45
- var SchemaPropertyHeading_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
45
+ /**
46
+ * Constraints that live on a leaf (string or number) schema: length, pattern,
47
+ * format and numeric ranges. Extracted so they can be surfaced for a primitive
48
+ * schema as well as for a primitive array's items, which are not rendered on
49
+ * their own. See https://github.com/scalar/scalar/issues/9690
50
+ */
51
+ var SchemaPropertyHeading_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
46
52
  __name: "SchemaPropertyHeading",
47
53
  props: {
48
54
  value: {},
@@ -83,20 +89,8 @@ var SchemaPropertyHeading_vue_vue_type_script_setup_true_lang_default = /* @__PU
83
89
  if (items.enum?.length === 1) return items.enum[0];
84
90
  }
85
91
  });
86
- const validationProperties = computed(() => {
87
- if (!valueRef.value) return [];
88
- const schema = valueRef.value;
92
+ const getLeafConstraints = (schema) => {
89
93
  const properties = [];
90
- if (isArraySchema(schema)) {
91
- if (schema.minItems || schema.maxItems) properties.push({
92
- key: "array-range",
93
- value: `${schema.minItems || ""}…${schema.maxItems || ""}`
94
- });
95
- if (schema.uniqueItems) properties.push({
96
- key: "unique-items",
97
- value: `${translate("common.unique")}!`
98
- });
99
- }
100
94
  if (isStringSchema(schema)) {
101
95
  if (schema.minLength) properties.push({
102
96
  key: "min-length",
@@ -115,13 +109,11 @@ var SchemaPropertyHeading_vue_vue_type_script_setup_true_lang_default = /* @__PU
115
109
  truncate: true
116
110
  });
117
111
  }
118
- if (isStringSchema(schema) || isNumberSchema(schema)) {
119
- if (schema.format) properties.push({
120
- key: "format",
121
- value: schema.format,
122
- truncate: true
123
- });
124
- }
112
+ if ((isStringSchema(schema) || isNumberSchema(schema)) && schema.format) properties.push({
113
+ key: "format",
114
+ value: schema.format,
115
+ truncate: true
116
+ });
125
117
  if (isNumberSchema(schema)) {
126
118
  if (isDefined(schema.exclusiveMinimum)) properties.push({
127
119
  key: "exclusive-minimum",
@@ -150,6 +142,24 @@ var SchemaPropertyHeading_vue_vue_type_script_setup_true_lang_default = /* @__PU
150
142
  });
151
143
  }
152
144
  return properties;
145
+ };
146
+ const validationProperties = computed(() => {
147
+ if (!valueRef.value) return [];
148
+ const schema = valueRef.value;
149
+ const properties = [];
150
+ if (isArraySchema(schema)) {
151
+ if (schema.minItems || schema.maxItems) properties.push({
152
+ key: "array-range",
153
+ value: `${schema.minItems || ""}…${schema.maxItems || ""}`
154
+ });
155
+ if (schema.uniqueItems) properties.push({
156
+ key: "unique-items",
157
+ value: `${translate("common.unique")}!`
158
+ });
159
+ }
160
+ properties.push(...getLeafConstraints(schema));
161
+ if (isArraySchema(schema) && schema.items) properties.push(...getLeafConstraints(resolve.schema(schema.items)));
162
+ return properties;
153
163
  });
154
164
  /** Link data for navigating to the referenced model in the sidebar. */
155
165
  const modelLink = computed(() => {
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaPropertyHeading.vue.script.js","names":["$slots"],"sources":["../../../../src/components/Content/Schema/SchemaPropertyHeading.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { isDefined } from '@scalar/helpers/array/is-defined'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { resolve } from '@scalar/workspace-store/resolve'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport {\n isArraySchema,\n isNumberSchema,\n isStringSchema,\n} from '@scalar/workspace-store/schemas/v3.1/strict/type-guards'\nimport { computed, toRef } from 'vue'\n\nimport { Badge } from '@/components/Badge'\nimport LinkButton from '@/components/Content/Schema/LinkButton.vue'\nimport ScreenReader from '@/components/ScreenReader.vue'\nimport { useLocalization } from '@/features/localization'\n\nimport { getSchemaType } from './helpers/get-schema-type'\nimport { getModelNameFromSchema } from './helpers/schema-name'\nimport RenderString from './RenderString.vue'\nimport SchemaPropertyDefault from './SchemaPropertyDefault.vue'\nimport SchemaPropertyDetail from './SchemaPropertyDetail.vue'\nimport SchemaPropertyExamples from './SchemaPropertyExamples.vue'\n\nconst props = withDefaults(\n defineProps<{\n value: SchemaObject | undefined\n enum?: boolean\n isDiscriminator?: boolean\n required?: boolean\n additional?: boolean\n withExamples?: boolean\n hideModelNames?: boolean\n /** When the schema was resolved from a $ref, pass the ref name so it displays as e.g. \"Data\" instead of \"object\". */\n modelName?: string | null\n /** Resolved propertyNames schema, used to surface key constraints like `format` for additional properties. */\n propertyNames?: SchemaObject\n eventBus?: WorkspaceEventBus | null\n }>(),\n {\n isDiscriminator: false,\n required: false,\n withExamples: true,\n hideModelNames: false,\n eventBus: null,\n },\n)\nconst { translate } = useLocalization()\n\n// Convert to reactive refs for composables\nconst valueRef = toRef(props, 'value')\n\nconst constValue = computed(() => {\n if (!valueRef.value) {\n return undefined\n }\n\n const schema = valueRef.value\n\n // Direct const value\n if (schema.const !== undefined) {\n return schema.const\n }\n\n // Single-item enum acts as const\n if (schema.enum?.length === 1) {\n return schema.enum[0]\n }\n\n // Check items for const values (for arrays)\n if (isArraySchema(schema) && schema.items) {\n const items = resolve.schema(schema.items)\n\n if (isDefined(items.const)) {\n return items.const\n }\n\n if (items.enum?.length === 1) {\n return items.enum[0]\n }\n }\n\n return undefined\n})\n\nconst validationProperties = computed(() => {\n if (!valueRef.value) {\n return []\n }\n\n const schema = valueRef.value\n const properties = []\n\n // Array validation properties\n if (isArraySchema(schema)) {\n if (schema.minItems || schema.maxItems) {\n properties.push({\n key: 'array-range',\n value: `${schema.minItems || ''}…${schema.maxItems || ''}`,\n })\n }\n\n // Unique items\n if (schema.uniqueItems) {\n properties.push({\n key: 'unique-items',\n value: `${translate('common.unique')}!`,\n })\n }\n }\n\n // String length properties\n if (isStringSchema(schema)) {\n if (schema.minLength) {\n properties.push({\n key: 'min-length',\n prefix: `${translate('common.minLength')}: `,\n value: schema.minLength,\n })\n }\n\n if (schema.maxLength) {\n properties.push({\n key: 'max-length',\n prefix: `${translate('common.maxLength')}: `,\n value: schema.maxLength,\n })\n }\n\n // Pattern\n if (schema.pattern) {\n properties.push({\n key: 'pattern',\n value: schema.pattern,\n code: true,\n truncate: true,\n })\n }\n }\n\n // Format\n if (isStringSchema(schema) || isNumberSchema(schema)) {\n if (schema.format) {\n properties.push({\n key: 'format',\n value: schema.format,\n truncate: true,\n })\n }\n }\n\n // Numeric validation properties\n if (isNumberSchema(schema)) {\n if (isDefined(schema.exclusiveMinimum)) {\n properties.push({\n key: 'exclusive-minimum',\n prefix: `${translate('common.greaterThan')}: `,\n value: schema.exclusiveMinimum,\n })\n }\n\n if (isDefined(schema.minimum)) {\n properties.push({\n key: 'minimum',\n prefix: `${translate('common.min')}: `,\n value: schema.minimum,\n })\n }\n\n if (isDefined(schema.exclusiveMaximum)) {\n properties.push({\n key: 'exclusive-maximum',\n prefix: `${translate('common.lessThan')}: `,\n value: schema.exclusiveMaximum,\n })\n }\n\n if (isDefined(schema.maximum)) {\n properties.push({\n key: 'maximum',\n prefix: `${translate('common.max')}: `,\n value: schema.maximum,\n })\n }\n\n if (isDefined(schema.multipleOf)) {\n properties.push({\n key: 'multiple-of',\n prefix: `${translate('common.multipleOf')}: `,\n value: schema.multipleOf,\n })\n }\n }\n\n return properties\n})\n\n/** Link data for navigating to the referenced model in the sidebar. */\nconst modelLink = computed(() => {\n if (!props.value) {\n return null\n }\n\n if (props.hideModelNames) {\n return null\n }\n\n if (props.modelName) {\n return { schemaKey: props.modelName, label: props.modelName }\n }\n\n const modelName = getModelNameFromSchema(props.value)\n if (modelName) {\n return { schemaKey: modelName.schemaKey, label: modelName.label }\n }\n\n if (isArraySchema(props.value) && props.value.items) {\n const itemName = getModelNameFromSchema(props.value.items)\n return itemName\n ? { schemaKey: itemName.schemaKey, label: `${itemName.label}[]` }\n : null\n }\n\n return null\n})\n\n/** Check if we should show the type information */\nconst shouldShowType = computed(() => {\n if (!props.value || !('type' in props.value)) {\n return false\n }\n\n // Always show type for arrays, even when items have const values\n if (props.value.type === 'array') {\n return true\n }\n\n // For non-arrays, only show if no const value at the schema level\n return !constValue.value\n})\n\n/** Get the display type */\nconst displayType = computed(() => {\n if (!props.value) {\n return ''\n }\n return getSchemaType(props.value)\n})\n\n/**\n * Type and format of the property keys, derived from the propertyNames schema.\n *\n * For a map keyed by UUIDs this renders e.g. \"string · uuid\" so the key\n * constraints are not lost. Returns undefined when there is nothing to show.\n */\nconst propertyNamesDetail = computed(() => {\n const schema = props.propertyNames\n if (!schema) {\n return undefined\n }\n\n const parts = [getSchemaType(schema)]\n if ('format' in schema && typeof schema.format === 'string') {\n parts.push(schema.format)\n }\n\n const detail = parts.filter(Boolean).join(' · ')\n return detail.length > 0 ? detail : undefined\n})\n\nconst exampleValue = computed(() => {\n // Treat only `undefined` as \"not set\" — `null` is a valid example value on a nullable schema.\n if (\n props.value &&\n 'example' in props.value &&\n props.value.example !== undefined\n ) {\n return props.value.example\n }\n\n if (props.value && isArraySchema(props.value)) {\n const itemsSchema = resolve.schema(props.value.items)\n if (\n itemsSchema &&\n 'example' in itemsSchema &&\n itemsSchema.example !== undefined\n ) {\n return itemsSchema.example\n }\n }\n\n return undefined\n})\n</script>\n<template>\n <div class=\"property-heading\">\n <div\n v-if=\"$slots.name\"\n class=\"property-name\"\n :class=\"{ deprecated: props.value?.deprecated }\">\n <slot name=\"name\" />\n </div>\n <div\n v-if=\"props.isDiscriminator\"\n class=\"property-discriminator\">\n {{ translate('common.discriminator') }}\n </div>\n <template v-if=\"props.value\">\n <!-- Type information -->\n <SchemaPropertyDetail\n v-if=\"shouldShowType\"\n truncate>\n <ScreenReader>{{ translate('common.type') }}:</ScreenReader>\n {{ displayType }}\n <template v-if=\"modelLink\">\n ·\n <LinkButton\n v-if=\"props.eventBus && modelLink.schemaKey\"\n @click=\"\n props.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 </template>\n </SchemaPropertyDetail>\n\n <!-- Key constraints from propertyNames (e.g. \"keys: string · uuid\") -->\n <SchemaPropertyDetail\n v-if=\"propertyNamesDetail\"\n truncate>\n <template #prefix>{{ translate('common.keys') }}:</template>\n {{ propertyNamesDetail }}\n </SchemaPropertyDetail>\n\n <!-- Dynamic validation properties from composable -->\n <SchemaPropertyDetail\n v-for=\"property in validationProperties\"\n :key=\"property.key\"\n :code=\"property.code\"\n :truncate=\"property.truncate\">\n <ScreenReader v-if=\"property.key === 'format'\">\n {{ translate('common.format') }}:\n </ScreenReader>\n <ScreenReader v-else-if=\"property.key === 'pattern'\">\n {{ translate('common.pattern') }}:\n </ScreenReader>\n <template\n v-if=\"property.prefix\"\n #prefix>\n {{ property.prefix }}\n </template>\n {{ property.value }}\n </SchemaPropertyDetail>\n\n <!-- Enum indicator -->\n <SchemaPropertyDetail v-if=\"props.enum\">\n {{ translate('common.enum') }}\n </SchemaPropertyDetail>\n </template>\n <div\n v-if=\"props.additional\"\n class=\"property-additional\">\n <template v-if=\"props.value?.['x-additionalPropertiesName']\">\n {{ props.value['x-additionalPropertiesName'] }}\n </template>\n <template v-else>{{ translate('common.additionalProperties') }}</template>\n </div>\n <div\n v-if=\"props.value?.deprecated\"\n class=\"property-deprecated\">\n <Badge>{{ translate('common.deprecated') }}</Badge>\n </div>\n <!-- Don't use `isDefined` here, we want to show `const` when the value is `null` -->\n <div\n v-if=\"constValue !== undefined\"\n class=\"property-const\">\n <SchemaPropertyDetail truncate>\n <template #prefix>{{ translate('common.const') }}: </template>\n <RenderString :value=\"constValue\" />\n </SchemaPropertyDetail>\n </div>\n <template v-else>\n <!-- Shows only when a composition is used (so props.value?.type is undefined) -->\n <SchemaPropertyDetail v-if=\"(props.value as any)?.nullable === true\">\n {{ translate('common.nullable') }}\n </SchemaPropertyDetail>\n </template>\n <div\n v-if=\"props.value?.writeOnly\"\n class=\"property-write-only\">\n {{ translate('common.writeOnly') }}\n </div>\n <div\n v-else-if=\"props.value?.readOnly\"\n class=\"property-read-only\">\n {{ translate('common.readOnly') }}\n </div>\n <div\n v-if=\"props.required\"\n class=\"property-required\">\n {{ translate('common.required') }}\n </div>\n <SchemaPropertyDefault :value=\"props.value?.default\" />\n <SchemaPropertyExamples\n v-if=\"props.withExamples\"\n :example=\"exampleValue\"\n :examples=\"props.value?.examples\" />\n </div>\n</template>\n<style scoped>\n.property-heading {\n display: flex;\n flex-wrap: wrap;\n align-items: baseline;\n row-gap: 9px;\n white-space: nowrap;\n}\n\n.property-heading:has(+ .children),\n.property-heading:has(+ .property-rule) {\n margin-bottom: 9px;\n}\n\n.property-heading > * {\n margin-right: 9px;\n}\n\n.property-heading:last-child {\n margin-right: 0;\n}\n\n.property-heading > .property-detail:not(:last-of-type) {\n margin-right: 0;\n}\n\n.property-name {\n max-width: 100%;\n font-family: var(--scalar-font-code);\n font-weight: var(--scalar-bold);\n font-size: var(--scalar-font-size-4);\n white-space: normal;\n overflow-wrap: break-word;\n}\n\n.property-additional {\n font-family: var(--scalar-font-code);\n}\n\n.property-required,\n.property-optional {\n color: var(--scalar-color-2);\n}\n\n.property-required {\n font-size: var(--scalar-mini);\n color: var(--scalar-color-orange);\n}\n\n.property-read-only {\n font-size: var(--scalar-mini);\n color: var(--scalar-color-blue);\n}\n\n.property-write-only {\n font-size: var(--scalar-mini);\n color: var(--scalar-color-green);\n}\n\n.property-discriminator {\n font-size: var(--scalar-mini);\n color: var(--scalar-color-purple);\n}\n\n.property-detail {\n font-size: var(--scalar-mini);\n color: var(--scalar-color-2);\n display: flex;\n align-items: center;\n\n min-width: 0;\n}\n\n.property-const {\n color: var(--scalar-color-1);\n}\n\n.deprecated {\n text-decoration: line-through;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwBA,MAAM,QAAQ;EAuBd,MAAM,EAAE,cAAc,iBAAgB;EAGtC,MAAM,WAAW,MAAM,OAAO,QAAO;EAErC,MAAM,aAAa,eAAe;AAChC,OAAI,CAAC,SAAS,MACZ;GAGF,MAAM,SAAS,SAAS;AAGxB,OAAI,OAAO,UAAU,KAAA,EACnB,QAAO,OAAO;AAIhB,OAAI,OAAO,MAA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AAA,CAAA,CAAA;;0BAGpC,mBAKW,UAAA,EAAA,KAAA,GAAA,EAAA,CAHoB,MAAM,OAAe,aAAQ,QAAA,WAAA,EAA1D,YAEuB,8BAAA,EAAA,KAAA,GAAA,EAAA;4BADa,CAAA,gBAAA,gBAA/B,MAAA,UAAS,CAAA,kBAAA,CAAA,EAAA,EAAA,CAAA,CAAA;;;IAIR,MAAM,OAAO,aAAA,WAAA,EADrB,mBAIM,OAJN,YAIM,gBADD,MAAA,UAAS,CAAA,mBAAA,CAAA,EAAA,EAAA,IAGD,MAAM,OAAO,YAAA,WAAA,EAD1B,mBAIM,OAJN,YAIM,gBADD,MAAA,UAAS,CAAA,kBAAA,CAAA,EAAA,EAAA,IAAA,mBAAA,IAAA,KAAA;IAGN,MAAM,YAAA,WAAA,EADd,mBAIM,OAJN,YAIM,gBADD,MAAA,UAAS,CAAA,kBAAA,CAAA,EAAA,EAAA,IAAA,mBAAA,IAAA,KAAA;IAEd,YAAuD,+BAAA,EAA/B,OAAO,MAAM,OAAO,SAAA,EAAA,MAAA,GAAA,CAAA,QAAA,CAAA;IAEpC,MAAM,gBAAA,WAAA,EADd,YAGsC,gCAAA;;KADnC,SAAS,aAAA;KACT,UAAU,MAAM,OAAO"}
1
+ {"version":3,"file":"SchemaPropertyHeading.vue.script.js","names":["$slots"],"sources":["../../../../src/components/Content/Schema/SchemaPropertyHeading.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { isDefined } from '@scalar/helpers/array/is-defined'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { resolve } from '@scalar/workspace-store/resolve'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport {\n isArraySchema,\n isNumberSchema,\n isStringSchema,\n} from '@scalar/workspace-store/schemas/v3.1/strict/type-guards'\nimport { computed, toRef } from 'vue'\n\nimport { Badge } from '@/components/Badge'\nimport LinkButton from '@/components/Content/Schema/LinkButton.vue'\nimport ScreenReader from '@/components/ScreenReader.vue'\nimport { useLocalization } from '@/features/localization'\n\nimport { getSchemaType } from './helpers/get-schema-type'\nimport { getModelNameFromSchema } from './helpers/schema-name'\nimport RenderString from './RenderString.vue'\nimport SchemaPropertyDefault from './SchemaPropertyDefault.vue'\nimport SchemaPropertyDetail from './SchemaPropertyDetail.vue'\nimport SchemaPropertyExamples from './SchemaPropertyExamples.vue'\n\nconst props = withDefaults(\n defineProps<{\n value: SchemaObject | undefined\n enum?: boolean\n isDiscriminator?: boolean\n required?: boolean\n additional?: boolean\n withExamples?: boolean\n hideModelNames?: boolean\n /** When the schema was resolved from a $ref, pass the ref name so it displays as e.g. \"Data\" instead of \"object\". */\n modelName?: string | null\n /** Resolved propertyNames schema, used to surface key constraints like `format` for additional properties. */\n propertyNames?: SchemaObject\n eventBus?: WorkspaceEventBus | null\n }>(),\n {\n isDiscriminator: false,\n required: false,\n withExamples: true,\n hideModelNames: false,\n eventBus: null,\n },\n)\nconst { translate } = useLocalization()\n\n// Convert to reactive refs for composables\nconst valueRef = toRef(props, 'value')\n\nconst constValue = computed(() => {\n if (!valueRef.value) {\n return undefined\n }\n\n const schema = valueRef.value\n\n // Direct const value\n if (schema.const !== undefined) {\n return schema.const\n }\n\n // Single-item enum acts as const\n if (schema.enum?.length === 1) {\n return schema.enum[0]\n }\n\n // Check items for const values (for arrays)\n if (isArraySchema(schema) && schema.items) {\n const items = resolve.schema(schema.items)\n\n if (isDefined(items.const)) {\n return items.const\n }\n\n if (items.enum?.length === 1) {\n return items.enum[0]\n }\n }\n\n return undefined\n})\n\ntype ValidationProperty = {\n key: string\n value: string | number\n prefix?: string\n code?: boolean\n truncate?: boolean\n}\n\n/**\n * Constraints that live on a leaf (string or number) schema: length, pattern,\n * format and numeric ranges. Extracted so they can be surfaced for a primitive\n * schema as well as for a primitive array's items, which are not rendered on\n * their own. See https://github.com/scalar/scalar/issues/9690\n */\nconst getLeafConstraints = (schema: SchemaObject) => {\n const properties: ValidationProperty[] = []\n\n if (isStringSchema(schema)) {\n if (schema.minLength) {\n properties.push({\n key: 'min-length',\n prefix: `${translate('common.minLength')}: `,\n value: schema.minLength,\n })\n }\n\n if (schema.maxLength) {\n properties.push({\n key: 'max-length',\n prefix: `${translate('common.maxLength')}: `,\n value: schema.maxLength,\n })\n }\n\n if (schema.pattern) {\n properties.push({\n key: 'pattern',\n value: schema.pattern,\n code: true,\n truncate: true,\n })\n }\n }\n\n if ((isStringSchema(schema) || isNumberSchema(schema)) && schema.format) {\n properties.push({\n key: 'format',\n value: schema.format,\n truncate: true,\n })\n }\n\n if (isNumberSchema(schema)) {\n if (isDefined(schema.exclusiveMinimum)) {\n properties.push({\n key: 'exclusive-minimum',\n prefix: `${translate('common.greaterThan')}: `,\n value: schema.exclusiveMinimum,\n })\n }\n\n if (isDefined(schema.minimum)) {\n properties.push({\n key: 'minimum',\n prefix: `${translate('common.min')}: `,\n value: schema.minimum,\n })\n }\n\n if (isDefined(schema.exclusiveMaximum)) {\n properties.push({\n key: 'exclusive-maximum',\n prefix: `${translate('common.lessThan')}: `,\n value: schema.exclusiveMaximum,\n })\n }\n\n if (isDefined(schema.maximum)) {\n properties.push({\n key: 'maximum',\n prefix: `${translate('common.max')}: `,\n value: schema.maximum,\n })\n }\n\n if (isDefined(schema.multipleOf)) {\n properties.push({\n key: 'multiple-of',\n prefix: `${translate('common.multipleOf')}: `,\n value: schema.multipleOf,\n })\n }\n }\n\n return properties\n}\n\nconst validationProperties = computed(() => {\n if (!valueRef.value) {\n return []\n }\n\n const schema = valueRef.value\n const properties: ValidationProperty[] = []\n\n // Array validation properties\n if (isArraySchema(schema)) {\n if (schema.minItems || schema.maxItems) {\n properties.push({\n key: 'array-range',\n value: `${schema.minItems || ''}…${schema.maxItems || ''}`,\n })\n }\n\n // Unique items\n if (schema.uniqueItems) {\n properties.push({\n key: 'unique-items',\n value: `${translate('common.unique')}!`,\n })\n }\n }\n\n properties.push(...getLeafConstraints(schema))\n\n // Primitive array items carry their own constraints (e.g. an array of `uuid`\n // strings) but are not rendered separately, so surface them here.\n if (isArraySchema(schema) && schema.items) {\n properties.push(...getLeafConstraints(resolve.schema(schema.items)))\n }\n\n return properties\n})\n\n/** Link data for navigating to the referenced model in the sidebar. */\nconst modelLink = computed(() => {\n if (!props.value) {\n return null\n }\n\n if (props.hideModelNames) {\n return null\n }\n\n if (props.modelName) {\n return { schemaKey: props.modelName, label: props.modelName }\n }\n\n const modelName = getModelNameFromSchema(props.value)\n if (modelName) {\n return { schemaKey: modelName.schemaKey, label: modelName.label }\n }\n\n if (isArraySchema(props.value) && props.value.items) {\n const itemName = getModelNameFromSchema(props.value.items)\n return itemName\n ? { schemaKey: itemName.schemaKey, label: `${itemName.label}[]` }\n : null\n }\n\n return null\n})\n\n/** Check if we should show the type information */\nconst shouldShowType = computed(() => {\n if (!props.value || !('type' in props.value)) {\n return false\n }\n\n // Always show type for arrays, even when items have const values\n if (props.value.type === 'array') {\n return true\n }\n\n // For non-arrays, only show if no const value at the schema level\n return !constValue.value\n})\n\n/** Get the display type */\nconst displayType = computed(() => {\n if (!props.value) {\n return ''\n }\n return getSchemaType(props.value)\n})\n\n/**\n * Type and format of the property keys, derived from the propertyNames schema.\n *\n * For a map keyed by UUIDs this renders e.g. \"string · uuid\" so the key\n * constraints are not lost. Returns undefined when there is nothing to show.\n */\nconst propertyNamesDetail = computed(() => {\n const schema = props.propertyNames\n if (!schema) {\n return undefined\n }\n\n const parts = [getSchemaType(schema)]\n if ('format' in schema && typeof schema.format === 'string') {\n parts.push(schema.format)\n }\n\n const detail = parts.filter(Boolean).join(' · ')\n return detail.length > 0 ? detail : undefined\n})\n\nconst exampleValue = computed(() => {\n // Treat only `undefined` as \"not set\" — `null` is a valid example value on a nullable schema.\n if (\n props.value &&\n 'example' in props.value &&\n props.value.example !== undefined\n ) {\n return props.value.example\n }\n\n if (props.value && isArraySchema(props.value)) {\n const itemsSchema = resolve.schema(props.value.items)\n if (\n itemsSchema &&\n 'example' in itemsSchema &&\n itemsSchema.example !== undefined\n ) {\n return itemsSchema.example\n }\n }\n\n return undefined\n})\n</script>\n<template>\n <div class=\"property-heading\">\n <div\n v-if=\"$slots.name\"\n class=\"property-name\"\n :class=\"{ deprecated: props.value?.deprecated }\">\n <slot name=\"name\" />\n </div>\n <div\n v-if=\"props.isDiscriminator\"\n class=\"property-discriminator\">\n {{ translate('common.discriminator') }}\n </div>\n <template v-if=\"props.value\">\n <!-- Type information -->\n <SchemaPropertyDetail\n v-if=\"shouldShowType\"\n truncate>\n <ScreenReader>{{ translate('common.type') }}:</ScreenReader>\n {{ displayType }}\n <template v-if=\"modelLink\">\n ·\n <LinkButton\n v-if=\"props.eventBus && modelLink.schemaKey\"\n @click=\"\n props.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 </template>\n </SchemaPropertyDetail>\n\n <!-- Key constraints from propertyNames (e.g. \"keys: string · uuid\") -->\n <SchemaPropertyDetail\n v-if=\"propertyNamesDetail\"\n truncate>\n <template #prefix>{{ translate('common.keys') }}:</template>\n {{ propertyNamesDetail }}\n </SchemaPropertyDetail>\n\n <!-- Dynamic validation properties from composable -->\n <SchemaPropertyDetail\n v-for=\"property in validationProperties\"\n :key=\"property.key\"\n :code=\"property.code\"\n :truncate=\"property.truncate\">\n <ScreenReader v-if=\"property.key === 'format'\">\n {{ translate('common.format') }}:\n </ScreenReader>\n <ScreenReader v-else-if=\"property.key === 'pattern'\">\n {{ translate('common.pattern') }}:\n </ScreenReader>\n <template\n v-if=\"property.prefix\"\n #prefix>\n {{ property.prefix }}\n </template>\n {{ property.value }}\n </SchemaPropertyDetail>\n\n <!-- Enum indicator -->\n <SchemaPropertyDetail v-if=\"props.enum\">\n {{ translate('common.enum') }}\n </SchemaPropertyDetail>\n </template>\n <div\n v-if=\"props.additional\"\n class=\"property-additional\">\n <template v-if=\"props.value?.['x-additionalPropertiesName']\">\n {{ props.value['x-additionalPropertiesName'] }}\n </template>\n <template v-else>{{ translate('common.additionalProperties') }}</template>\n </div>\n <div\n v-if=\"props.value?.deprecated\"\n class=\"property-deprecated\">\n <Badge>{{ translate('common.deprecated') }}</Badge>\n </div>\n <!-- Don't use `isDefined` here, we want to show `const` when the value is `null` -->\n <div\n v-if=\"constValue !== undefined\"\n class=\"property-const\">\n <SchemaPropertyDetail truncate>\n <template #prefix>{{ translate('common.const') }}: </template>\n <RenderString :value=\"constValue\" />\n </SchemaPropertyDetail>\n </div>\n <template v-else>\n <!-- Shows only when a composition is used (so props.value?.type is undefined) -->\n <SchemaPropertyDetail v-if=\"(props.value as any)?.nullable === true\">\n {{ translate('common.nullable') }}\n </SchemaPropertyDetail>\n </template>\n <div\n v-if=\"props.value?.writeOnly\"\n class=\"property-write-only\">\n {{ translate('common.writeOnly') }}\n </div>\n <div\n v-else-if=\"props.value?.readOnly\"\n class=\"property-read-only\">\n {{ translate('common.readOnly') }}\n </div>\n <div\n v-if=\"props.required\"\n class=\"property-required\">\n {{ translate('common.required') }}\n </div>\n <SchemaPropertyDefault :value=\"props.value?.default\" />\n <SchemaPropertyExamples\n v-if=\"props.withExamples\"\n :example=\"exampleValue\"\n :examples=\"props.value?.examples\" />\n </div>\n</template>\n<style scoped>\n.property-heading {\n display: flex;\n flex-wrap: wrap;\n align-items: baseline;\n row-gap: 9px;\n white-space: nowrap;\n}\n\n.property-heading:has(+ .children),\n.property-heading:has(+ .property-rule) {\n margin-bottom: 9px;\n}\n\n.property-heading > * {\n margin-right: 9px;\n}\n\n.property-heading:last-child {\n margin-right: 0;\n}\n\n.property-heading > .property-detail:not(:last-of-type) {\n margin-right: 0;\n}\n\n.property-name {\n max-width: 100%;\n font-family: var(--scalar-font-code);\n font-weight: var(--scalar-bold);\n font-size: var(--scalar-font-size-4);\n white-space: normal;\n overflow-wrap: break-word;\n}\n\n.property-additional {\n font-family: var(--scalar-font-code);\n}\n\n.property-required,\n.property-optional {\n color: var(--scalar-color-2);\n}\n\n.property-required {\n font-size: var(--scalar-mini);\n color: var(--scalar-color-orange);\n}\n\n.property-read-only {\n font-size: var(--scalar-mini);\n color: var(--scalar-color-blue);\n}\n\n.property-write-only {\n font-size: var(--scalar-mini);\n color: var(--scalar-color-green);\n}\n\n.property-discriminator {\n font-size: var(--scalar-mini);\n color: var(--scalar-color-purple);\n}\n\n.property-detail {\n font-size: var(--scalar-mini);\n color: var(--scalar-color-2);\n display: flex;\n align-items: center;\n\n min-width: 0;\n}\n\n.property-const {\n color: var(--scalar-color-1);\n}\n\n.deprecated {\n text-decoration: line-through;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwBA,MAAM,QAAQ;EAuBd,MAAM,EAAE,cAAc,gBAAgB;EAGtC,MAAM,WAAW,MAAM,OAAO,OAAO;EAErC,MAAM,aAAa,eAAe;GAChC,IAAI,CAAC,SAAS,OACZ;GAGF,MAAM,SAAS,SAAS;GAGxB,IAAI,OAAO,UAAU,KAAA,GACnB,OAAO,OAAO;GAIhB,IAAI,OAAO,MAAM,WAAW,GAC1B,OAAO,OAAO,KAAK;GAIrB,IAAI,cAAc,MAAM,KAAK,OAAO,OAAO;IACzC,MAAM,QAAQ,QAAQ,OAAO,OAAO,KAAK;IAEzC,IAAI,UAAU,MAAM,KAAK,GACvB,OAAO,MAAM;IAGf,IAAI,MAAM,MAAM,WAAW,GACzB,OAAO,MAAM,KAAK;GAEtB;EAGF,CAAC;EAgBD,MAAM,sBAAsB,WAAyB;GACnD,MAAM,aAAmC,CAAC;GAE1C,IAAI,eAAe,MAAM,GAAG;IAC1B,IAAI,OAAO,WACT,WAAW,KAAK;KACd,KAAK;KACL,QAAQ,GAAG,UAAU,kBAAkB,EAAE;KACzC,OAAO,OAAO;IAChB,CAAC;IAGH,IAAI,OAAO,WACT,WAAW,KAAK;KACd,KAAK;KACL,QAAQ,GAAG,UAAU,kBAAkB,EAA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A,gBAA/B,MAAA,SAAA,CAAS,CAAA,iBAAA,CAAA,GAAA,CAAA,CAAA,CAAA;;;IAIR,MAAM,OAAO,aAAA,UAAA,GADrB,mBAIM,OAJN,YAIM,gBADD,MAAA,SAAA,CAAS,CAAA,kBAAA,CAAA,GAAA,CAAA,KAGD,MAAM,OAAO,YAAA,UAAA,GAD1B,mBAIM,OAJN,YAIM,gBADD,MAAA,SAAA,CAAS,CAAA,iBAAA,CAAA,GAAA,CAAA,KAAA,mBAAA,IAAA,IAAA;IAGN,MAAM,YAAA,UAAA,GADd,mBAIM,OAJN,YAIM,gBADD,MAAA,SAAA,CAAS,CAAA,iBAAA,CAAA,GAAA,CAAA,KAAA,mBAAA,IAAA,IAAA;IAEd,YAAuD,+BAAA,EAA/B,OAAO,MAAM,OAAO,QAAA,GAAA,MAAA,GAAA,CAAA,OAAA,CAAA;IAEpC,MAAM,gBAAA,UAAA,GADd,YAGsC,gCAAA;;KADnC,SAAS,aAAA;KACT,UAAU,MAAM,OAAO"}
@@ -1 +1 @@
1
- {"version":3,"file":"dynamic-scope.js","names":[],"sources":["../../../../../src/components/Content/Schema/helpers/dynamic-scope.ts"],"sourcesContent":["import { type DynamicScope, isDynamicRef, resolveDynamicRef } from '@scalar/workspace-store/helpers/dynamic-ref'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { type InjectionKey, inject } from 'vue'\n\n/**\n * The dynamic scope — the outermost-first chain of schema resources on the current render path.\n *\n * JSON Schema 2020-12 `$dynamicRef` does not resolve to a fixed location. It binds to the active\n * `$dynamicAnchor` in the chain of resources entered to reach it, so the same\n * `{ \"$dynamicRef\": \"#itemType\" }` inside a shared generic template resolves to a different concrete\n * type depending on the path taken (e.g. `User` via a user page, `Group` via a group page).\n *\n * Each object `Schema` node injects this scope, appends its own resource, and re-provides it to its\n * descendants. `SchemaProperty` reads it to bind a `$dynamicRef` property or array item to the\n * concrete schema while walking the tree. See https://github.com/scalar/scalar/issues/9414.\n */\nexport const SCHEMA_DYNAMIC_SCOPE_SYMBOL: InjectionKey<DynamicScope> = Symbol('schema-dynamic-scope')\n\n/** Shared empty scope used as the inject default at the root, where nothing has been entered yet. */\nconst EMPTY_SCOPE: DynamicScope = []\n\n/** Read the dynamic scope provided by ancestor schema nodes (empty at the root of the tree). */\nexport const useDynamicScope = (): DynamicScope => inject(SCHEMA_DYNAMIC_SCOPE_SYMBOL, EMPTY_SCOPE)\n\n/**\n * Resolve a schema that may be a `$dynamicRef` against the active dynamic scope.\n *\n * Returns the bound concrete schema when the reference matches a `$dynamicAnchor` in scope. When\n * nothing matches (or the schema is not a `$dynamicRef`) the input is returned unchanged, so\n * rendering falls back to its prior behavior with no regression.\n */\nexport const resolveDynamicSchema = <T extends SchemaObject | undefined>(schema: T, scope: DynamicScope): T => {\n if (isDynamicRef(schema)) {\n return (resolveDynamicRef(schema.$dynamicRef, scope) as T) ?? schema\n }\n\n return schema\n}\n"],"mappings":";;;;;;;;;;;;;;;AAgBA,IAAa,8BAA0D,OAAO,uBAAuB;;AAGrG,IAAM,cAA4B,EAAE;;AAGpC,IAAa,wBAAsC,OAAO,6BAA6B,YAAY;;;;;;;;AASnG,IAAa,wBAA4D,QAAW,UAA2B;AAC7G,KAAI,aAAa,OAAO,CACtB,QAAQ,kBAAkB,OAAO,aAAa,MAAM,IAAU;AAGhE,QAAO"}
1
+ {"version":3,"file":"dynamic-scope.js","names":[],"sources":["../../../../../src/components/Content/Schema/helpers/dynamic-scope.ts"],"sourcesContent":["import { type DynamicScope, isDynamicRef, resolveDynamicRef } from '@scalar/workspace-store/helpers/dynamic-ref'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { type InjectionKey, inject } from 'vue'\n\n/**\n * The dynamic scope — the outermost-first chain of schema resources on the current render path.\n *\n * JSON Schema 2020-12 `$dynamicRef` does not resolve to a fixed location. It binds to the active\n * `$dynamicAnchor` in the chain of resources entered to reach it, so the same\n * `{ \"$dynamicRef\": \"#itemType\" }` inside a shared generic template resolves to a different concrete\n * type depending on the path taken (e.g. `User` via a user page, `Group` via a group page).\n *\n * Each object `Schema` node injects this scope, appends its own resource, and re-provides it to its\n * descendants. `SchemaProperty` reads it to bind a `$dynamicRef` property or array item to the\n * concrete schema while walking the tree. See https://github.com/scalar/scalar/issues/9414.\n */\nexport const SCHEMA_DYNAMIC_SCOPE_SYMBOL: InjectionKey<DynamicScope> = Symbol('schema-dynamic-scope')\n\n/** Shared empty scope used as the inject default at the root, where nothing has been entered yet. */\nconst EMPTY_SCOPE: DynamicScope = []\n\n/** Read the dynamic scope provided by ancestor schema nodes (empty at the root of the tree). */\nexport const useDynamicScope = (): DynamicScope => inject(SCHEMA_DYNAMIC_SCOPE_SYMBOL, EMPTY_SCOPE)\n\n/**\n * Resolve a schema that may be a `$dynamicRef` against the active dynamic scope.\n *\n * Returns the bound concrete schema when the reference matches a `$dynamicAnchor` in scope. When\n * nothing matches (or the schema is not a `$dynamicRef`) the input is returned unchanged, so\n * rendering falls back to its prior behavior with no regression.\n */\nexport const resolveDynamicSchema = <T extends SchemaObject | undefined>(schema: T, scope: DynamicScope): T => {\n if (isDynamicRef(schema)) {\n return (resolveDynamicRef(schema.$dynamicRef, scope) as T) ?? schema\n }\n\n return schema\n}\n"],"mappings":";;;;;;;;;;;;;;;AAgBA,IAAa,8BAA0D,OAAO,sBAAsB;;AAGpG,IAAM,cAA4B,CAAC;;AAGnC,IAAa,wBAAsC,OAAO,6BAA6B,WAAW;;;;;;;;AASlG,IAAa,wBAA4D,QAAW,UAA2B;CAC7G,IAAI,aAAa,MAAM,GACrB,OAAQ,kBAAkB,OAAO,aAAa,KAAK,KAAW;CAGhE,OAAO;AACT"}
@@ -1 +1 @@
1
- {"version":3,"file":"format-example.js","names":[],"sources":["../../../../../src/components/Content/Schema/helpers/format-example.ts"],"sourcesContent":["/**\n * Trims surrounding whitespace, but keeps the original string when trimming would empty it\n * (so an intentional \" \" example is not silently turned into \"\").\n */\nfunction preserveOrTrim(value: string): string {\n const trimmed = value.trim()\n return trimmed === '' ? value : trimmed\n}\n\n/**\n * Converts an example value to a string that can be displayed in the UI.\n */\nexport function formatExample(example: unknown): string | number {\n if (Array.isArray(example)) {\n return `[${example\n .map((item) => {\n if (typeof item === 'string') {\n return `\"${preserveOrTrim(item)}\"`\n }\n\n if (typeof item === 'object') {\n return JSON.stringify(item)\n }\n\n if (item === undefined) {\n return 'undefined'\n }\n\n if (item === null) {\n return 'null'\n }\n\n return item\n })\n .join(', ')}]`\n }\n\n if (example === null) {\n return 'null'\n }\n\n if (typeof example === 'object') {\n return JSON.stringify(example)\n }\n\n if (example === undefined) {\n return 'undefined'\n }\n\n if (typeof example === 'string') {\n return preserveOrTrim(example)\n }\n\n return preserveOrTrim(example.toString())\n}\n"],"mappings":";;;;;AAIA,SAAS,eAAe,OAAuB;CAC7C,MAAM,UAAU,MAAM,MAAM;AAC5B,QAAO,YAAY,KAAK,QAAQ;;;;;AAMlC,SAAgB,cAAc,SAAmC;AAC/D,KAAI,MAAM,QAAQ,QAAQ,CACxB,QAAO,IAAI,QACR,KAAK,SAAS;AACb,MAAI,OAAO,SAAS,SAClB,QAAO,IAAI,eAAe,KAAK,CAAC;AAGlC,MAAI,OAAO,SAAS,SAClB,QAAO,KAAK,UAAU,KAAK;AAG7B,MAAI,SAAS,KAAA,EACX,QAAO;AAGT,MAAI,SAAS,KACX,QAAO;AAGT,SAAO;GACP,CACD,KAAK,KAAK,CAAC;AAGhB,KAAI,YAAY,KACd,QAAO;AAGT,KAAI,OAAO,YAAY,SACrB,QAAO,KAAK,UAAU,QAAQ;AAGhC,KAAI,YAAY,KAAA,EACd,QAAO;AAGT,KAAI,OAAO,YAAY,SACrB,QAAO,eAAe,QAAQ;AAGhC,QAAO,eAAe,QAAQ,UAAU,CAAC"}
1
+ {"version":3,"file":"format-example.js","names":[],"sources":["../../../../../src/components/Content/Schema/helpers/format-example.ts"],"sourcesContent":["/**\n * Trims surrounding whitespace, but keeps the original string when trimming would empty it\n * (so an intentional \" \" example is not silently turned into \"\").\n */\nfunction preserveOrTrim(value: string): string {\n const trimmed = value.trim()\n return trimmed === '' ? value : trimmed\n}\n\n/**\n * Converts an example value to a string that can be displayed in the UI.\n */\nexport function formatExample(example: unknown): string | number {\n if (Array.isArray(example)) {\n return `[${example\n .map((item) => {\n if (typeof item === 'string') {\n return `\"${preserveOrTrim(item)}\"`\n }\n\n if (typeof item === 'object') {\n return JSON.stringify(item)\n }\n\n if (item === undefined) {\n return 'undefined'\n }\n\n if (item === null) {\n return 'null'\n }\n\n return item\n })\n .join(', ')}]`\n }\n\n if (example === null) {\n return 'null'\n }\n\n if (typeof example === 'object') {\n return JSON.stringify(example)\n }\n\n if (example === undefined) {\n return 'undefined'\n }\n\n if (typeof example === 'string') {\n return preserveOrTrim(example)\n }\n\n return preserveOrTrim(example.toString())\n}\n"],"mappings":";;;;;AAIA,SAAS,eAAe,OAAuB;CAC7C,MAAM,UAAU,MAAM,KAAK;CAC3B,OAAO,YAAY,KAAK,QAAQ;AAClC;;;;AAKA,SAAgB,cAAc,SAAmC;CAC/D,IAAI,MAAM,QAAQ,OAAO,GACvB,OAAO,IAAI,QACR,KAAK,SAAS;EACb,IAAI,OAAO,SAAS,UAClB,OAAO,IAAI,eAAe,IAAI,EAAE;EAGlC,IAAI,OAAO,SAAS,UAClB,OAAO,KAAK,UAAU,IAAI;EAG5B,IAAI,SAAS,KAAA,GACX,OAAO;EAGT,IAAI,SAAS,MACX,OAAO;EAGT,OAAO;CACT,CAAC,CAAC,CACD,KAAK,IAAI,EAAE;CAGhB,IAAI,YAAY,MACd,OAAO;CAGT,IAAI,OAAO,YAAY,UACrB,OAAO,KAAK,UAAU,OAAO;CAG/B,IAAI,YAAY,KAAA,GACd,OAAO;CAGT,IAAI,OAAO,YAAY,UACrB,OAAO,eAAe,OAAO;CAG/B,OAAO,eAAe,QAAQ,SAAS,CAAC;AAC1C"}
@@ -1 +1 @@
1
- {"version":3,"file":"format-value.js","names":[],"sources":["../../../../../src/components/Content/Schema/helpers/format-value.ts"],"sourcesContent":["/**\n * Converts a value to a string that can be displayed in the UI.\n */\nexport function formatValue(value: unknown): string | number {\n if (Array.isArray(value)) {\n return `[${value\n .map((item) => {\n if (typeof item === 'string') {\n return `\"${item.toString().trim()}\"`\n }\n\n if (typeof item === 'object') {\n return JSON.stringify(item)\n }\n\n if (item === undefined) {\n return 'undefined'\n }\n\n if (item === null) {\n return 'null'\n }\n\n return item\n })\n .join(', ')}]`\n }\n\n if (value === null) {\n return 'null'\n }\n\n if (typeof value === 'object') {\n return JSON.stringify(value)\n }\n\n if (value === undefined) {\n return 'undefined'\n }\n\n if (typeof value === 'string') {\n return value.trim()\n }\n\n return value.toString().trim()\n}\n"],"mappings":";;;;AAGA,SAAgB,YAAY,OAAiC;AAC3D,KAAI,MAAM,QAAQ,MAAM,CACtB,QAAO,IAAI,MACR,KAAK,SAAS;AACb,MAAI,OAAO,SAAS,SAClB,QAAO,IAAI,KAAK,UAAU,CAAC,MAAM,CAAC;AAGpC,MAAI,OAAO,SAAS,SAClB,QAAO,KAAK,UAAU,KAAK;AAG7B,MAAI,SAAS,KAAA,EACX,QAAO;AAGT,MAAI,SAAS,KACX,QAAO;AAGT,SAAO;GACP,CACD,KAAK,KAAK,CAAC;AAGhB,KAAI,UAAU,KACZ,QAAO;AAGT,KAAI,OAAO,UAAU,SACnB,QAAO,KAAK,UAAU,MAAM;AAG9B,KAAI,UAAU,KAAA,EACZ,QAAO;AAGT,KAAI,OAAO,UAAU,SACnB,QAAO,MAAM,MAAM;AAGrB,QAAO,MAAM,UAAU,CAAC,MAAM"}
1
+ {"version":3,"file":"format-value.js","names":[],"sources":["../../../../../src/components/Content/Schema/helpers/format-value.ts"],"sourcesContent":["/**\n * Converts a value to a string that can be displayed in the UI.\n */\nexport function formatValue(value: unknown): string | number {\n if (Array.isArray(value)) {\n return `[${value\n .map((item) => {\n if (typeof item === 'string') {\n return `\"${item.toString().trim()}\"`\n }\n\n if (typeof item === 'object') {\n return JSON.stringify(item)\n }\n\n if (item === undefined) {\n return 'undefined'\n }\n\n if (item === null) {\n return 'null'\n }\n\n return item\n })\n .join(', ')}]`\n }\n\n if (value === null) {\n return 'null'\n }\n\n if (typeof value === 'object') {\n return JSON.stringify(value)\n }\n\n if (value === undefined) {\n return 'undefined'\n }\n\n if (typeof value === 'string') {\n return value.trim()\n }\n\n return value.toString().trim()\n}\n"],"mappings":";;;;AAGA,SAAgB,YAAY,OAAiC;CAC3D,IAAI,MAAM,QAAQ,KAAK,GACrB,OAAO,IAAI,MACR,KAAK,SAAS;EACb,IAAI,OAAO,SAAS,UAClB,OAAO,IAAI,KAAK,SAAS,CAAC,CAAC,KAAK,EAAE;EAGpC,IAAI,OAAO,SAAS,UAClB,OAAO,KAAK,UAAU,IAAI;EAG5B,IAAI,SAAS,KAAA,GACX,OAAO;EAGT,IAAI,SAAS,MACX,OAAO;EAGT,OAAO;CACT,CAAC,CAAC,CACD,KAAK,IAAI,EAAE;CAGhB,IAAI,UAAU,MACZ,OAAO;CAGT,IAAI,OAAO,UAAU,UACnB,OAAO,KAAK,UAAU,KAAK;CAG7B,IAAI,UAAU,KAAA,GACZ,OAAO;CAGT,IAAI,OAAO,UAAU,UACnB,OAAO,MAAM,KAAK;CAGpB,OAAO,MAAM,SAAS,CAAC,CAAC,KAAK;AAC/B"}
@@ -1 +1 @@
1
- {"version":3,"file":"get-compositions-to-render.js","names":[],"sources":["../../../../../src/components/Content/Schema/helpers/get-compositions-to-render.ts"],"sourcesContent":["import { isDefined } from '@scalar/helpers/array/is-defined'\nimport { resolve } from '@scalar/workspace-store/resolve'\nimport type { OpenApiDocument, SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { isArraySchema } from '@scalar/workspace-store/schemas/v3.1/strict/type-guards'\n\nimport { getRefName } from './get-ref-name'\nimport { type CompositionKeyword, compositions } from './schema-composition'\nimport { shouldRenderArrayItemComposition } from './should-render-array-item-composition'\n\ntype CompositionToRender = {\n composition: CompositionKeyword\n value: SchemaObject\n}\n\ntype DocumentSchemaLookup = Pick<OpenApiDocument, 'components'>\n\nconst normalizeDiscriminatorMappingRef = (value: string) =>\n value.startsWith('#/') || value.includes('/') ? value : `#/components/schemas/${value}`\n\n/**\n * Builds a synthetic `oneOf` composition from a `discriminator.mapping` when the\n * schema declares a mapping but no explicit `oneOf`/`anyOf`. This is the shape\n * NSwag emits for polymorphic types, where the base type is a plain object with\n * a discriminator mapping pointing at the concrete variants.\n *\n * Returns `null` when there is nothing to infer (an explicit composition is\n * already present, no document to resolve refs against, or no resolvable refs).\n */\nexport const inferDiscriminatorMappingComposition = (\n value: SchemaObject,\n document?: DocumentSchemaLookup,\n): SchemaObject | null => {\n if (value.oneOf || value.anyOf || !document?.components?.schemas) {\n return null\n }\n\n const refs = Object.values(value.discriminator?.mapping ?? {})\n .filter((mappingValue): mappingValue is string => typeof mappingValue === 'string')\n .map((mappingValue) => {\n const ref = normalizeDiscriminatorMappingRef(mappingValue)\n const refName = getRefName(ref)\n const refValue = refName ? resolve.schema(document.components?.schemas?.[refName]) : undefined\n\n if (!refValue) {\n return undefined\n }\n\n return {\n $ref: ref,\n '$ref-value': refValue,\n }\n })\n .filter(isDefined)\n\n if (refs.length === 0) {\n return null\n }\n\n return {\n ...resolve.schema(value),\n oneOf: refs as NonNullable<SchemaObject['oneOf']>,\n }\n}\n\n/**\n * Computes which compositions should be rendered and with which values\n *\n * @param value - The schema object to check for compositions\n * @returns Array of compositions to render with their values\n */\nexport const getCompositionsToRender = (\n value: SchemaObject | undefined,\n document?: DocumentSchemaLookup,\n): CompositionToRender[] => {\n if (!value) {\n return []\n }\n\n const inferredDiscriminatorComposition = inferDiscriminatorMappingComposition(value, document)\n\n return compositions\n .map((composition) => {\n if (composition === 'oneOf' && inferredDiscriminatorComposition) {\n return {\n composition,\n value: inferredDiscriminatorComposition,\n }\n }\n\n // Check for array item-level composition first (more specific case)\n if (shouldRenderArrayItemComposition(value, composition) && isArraySchema(value) && value.items) {\n return {\n composition,\n value: resolve.schema(value.items),\n }\n }\n\n // Check for property-level composition\n if (value[composition]) {\n // Skip if array items have this composition (even if complex/not rendered)\n const hasArrayItemComposition =\n isArraySchema(value) && value.items && typeof value.items === 'object' && composition in value.items\n\n if (!hasArrayItemComposition) {\n return {\n composition,\n value: resolve.schema(value),\n }\n }\n }\n\n return null\n })\n .filter(isDefined)\n}\n"],"mappings":";;;;;;;AAgBA,IAAM,oCAAoC,UACxC,MAAM,WAAW,KAAK,IAAI,MAAM,SAAS,IAAI,GAAG,QAAQ,wBAAwB;;;;;;;;;;AAWlF,IAAa,wCACX,OACA,aACwB;AACxB,KAAI,MAAM,SAAS,MAAM,SAAS,CAAC,UAAU,YAAY,QACvD,QAAO;CAGT,MAAM,OAAO,OAAO,OAAO,MAAM,eAAe,WAAW,EAAE,CAAC,CAC3D,QAAQ,iBAAyC,OAAO,iBAAiB,SAAS,CAClF,KAAK,iBAAiB;EACrB,MAAM,MAAM,iCAAiC,aAAa;EAC1D,MAAM,UAAU,WAAW,IAAI;EAC/B,MAAM,WAAW,UAAU,QAAQ,OAAO,SAAS,YAAY,UAAU,SAAS,GAAG,KAAA;AAErF,MAAI,CAAC,SACH;AAGF,SAAO;GACL,MAAM;GACN,cAAc;GACf;GACD,CACD,OAAO,UAAU;AAEpB,KAAI,KAAK,WAAW,EAClB,QAAO;AAGT,QAAO;EACL,GAAG,QAAQ,OAAO,MAAM;EACxB,OAAO;EACR;;;;;;;;AASH,IAAa,2BACX,OACA,aAC0B;AAC1B,KAAI,CAAC,MACH,QAAO,EAAE;CAGX,MAAM,mCAAmC,qCAAqC,OAAO,SAAS;AAE9F,QAAO,aACJ,KAAK,gBAAgB;AACpB,MAAI,gBAAgB,WAAW,iCAC7B,QAAO;GACL;GACA,OAAO;GACR;AAIH,MAAI,iCAAiC,OAAO,YAAY,IAAI,cAAc,MAAM,IAAI,MAAM,MACxF,QAAO;GACL;GACA,OAAO,QAAQ,OAAO,MAAM,MAAM;GACnC;AAIH,MAAI,MAAM;OAKJ,EAFF,cAAc,MAAM,IAAI,MAAM,SAAS,OAAO,MAAM,UAAU,YAAY,eAAe,MAAM,OAG/F,QAAO;IACL;IACA,OAAO,QAAQ,OAAO,MAAM;IAC7B;;AAIL,SAAO;GACP,CACD,OAAO,UAAU"}
1
+ {"version":3,"file":"get-compositions-to-render.js","names":[],"sources":["../../../../../src/components/Content/Schema/helpers/get-compositions-to-render.ts"],"sourcesContent":["import { isDefined } from '@scalar/helpers/array/is-defined'\nimport { resolve } from '@scalar/workspace-store/resolve'\nimport type { OpenApiDocument, SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { isArraySchema } from '@scalar/workspace-store/schemas/v3.1/strict/type-guards'\n\nimport { getRefName } from './get-ref-name'\nimport { type CompositionKeyword, compositions } from './schema-composition'\nimport { shouldRenderArrayItemComposition } from './should-render-array-item-composition'\n\ntype CompositionToRender = {\n composition: CompositionKeyword\n value: SchemaObject\n}\n\ntype DocumentSchemaLookup = Pick<OpenApiDocument, 'components'>\n\nconst normalizeDiscriminatorMappingRef = (value: string) =>\n value.startsWith('#/') || value.includes('/') ? value : `#/components/schemas/${value}`\n\n/**\n * Builds a synthetic `oneOf` composition from a `discriminator.mapping` when the\n * schema declares a mapping but no explicit `oneOf`/`anyOf`. This is the shape\n * NSwag emits for polymorphic types, where the base type is a plain object with\n * a discriminator mapping pointing at the concrete variants.\n *\n * Returns `null` when there is nothing to infer (an explicit composition is\n * already present, no document to resolve refs against, or no resolvable refs).\n */\nexport const inferDiscriminatorMappingComposition = (\n value: SchemaObject,\n document?: DocumentSchemaLookup,\n): SchemaObject | null => {\n if (value.oneOf || value.anyOf || !document?.components?.schemas) {\n return null\n }\n\n const refs = Object.values(value.discriminator?.mapping ?? {})\n .filter((mappingValue): mappingValue is string => typeof mappingValue === 'string')\n .map((mappingValue) => {\n const ref = normalizeDiscriminatorMappingRef(mappingValue)\n const refName = getRefName(ref)\n const refValue = refName ? resolve.schema(document.components?.schemas?.[refName]) : undefined\n\n if (!refValue) {\n return undefined\n }\n\n return {\n $ref: ref,\n '$ref-value': refValue,\n }\n })\n .filter(isDefined)\n\n if (refs.length === 0) {\n return null\n }\n\n return {\n ...resolve.schema(value),\n oneOf: refs as NonNullable<SchemaObject['oneOf']>,\n }\n}\n\n/**\n * Computes which compositions should be rendered and with which values\n *\n * @param value - The schema object to check for compositions\n * @returns Array of compositions to render with their values\n */\nexport const getCompositionsToRender = (\n value: SchemaObject | undefined,\n document?: DocumentSchemaLookup,\n): CompositionToRender[] => {\n if (!value) {\n return []\n }\n\n const inferredDiscriminatorComposition = inferDiscriminatorMappingComposition(value, document)\n\n return compositions\n .map((composition) => {\n if (composition === 'oneOf' && inferredDiscriminatorComposition) {\n return {\n composition,\n value: inferredDiscriminatorComposition,\n }\n }\n\n // Check for array item-level composition first (more specific case)\n if (shouldRenderArrayItemComposition(value, composition) && isArraySchema(value) && value.items) {\n return {\n composition,\n value: resolve.schema(value.items),\n }\n }\n\n // Check for property-level composition\n if (value[composition]) {\n // Skip if array items have this composition (even if complex/not rendered)\n const hasArrayItemComposition =\n isArraySchema(value) && value.items && typeof value.items === 'object' && composition in value.items\n\n if (!hasArrayItemComposition) {\n return {\n composition,\n value: resolve.schema(value),\n }\n }\n }\n\n return null\n })\n .filter(isDefined)\n}\n"],"mappings":";;;;;;;AAgBA,IAAM,oCAAoC,UACxC,MAAM,WAAW,IAAI,KAAK,MAAM,SAAS,GAAG,IAAI,QAAQ,wBAAwB;;;;;;;;;;AAWlF,IAAa,wCACX,OACA,aACwB;CACxB,IAAI,MAAM,SAAS,MAAM,SAAS,CAAC,UAAU,YAAY,SACvD,OAAO;CAGT,MAAM,OAAO,OAAO,OAAO,MAAM,eAAe,WAAW,CAAC,CAAC,CAAC,CAC3D,QAAQ,iBAAyC,OAAO,iBAAiB,QAAQ,CAAC,CAClF,KAAK,iBAAiB;EACrB,MAAM,MAAM,iCAAiC,YAAY;EACzD,MAAM,UAAU,WAAW,GAAG;EAC9B,MAAM,WAAW,UAAU,QAAQ,OAAO,SAAS,YAAY,UAAU,QAAQ,IAAI,KAAA;EAErF,IAAI,CAAC,UACH;EAGF,OAAO;GACL,MAAM;GACN,cAAc;EAChB;CACF,CAAC,CAAC,CACD,OAAO,SAAS;CAEnB,IAAI,KAAK,WAAW,GAClB,OAAO;CAGT,OAAO;EACL,GAAG,QAAQ,OAAO,KAAK;EACvB,OAAO;CACT;AACF;;;;;;;AAQA,IAAa,2BACX,OACA,aAC0B;CAC1B,IAAI,CAAC,OACH,OAAO,CAAC;CAGV,MAAM,mCAAmC,qCAAqC,OAAO,QAAQ;CAE7F,OAAO,aACJ,KAAK,gBAAgB;EACpB,IAAI,gBAAgB,WAAW,kCAC7B,OAAO;GACL;GACA,OAAO;EACT;EAIF,IAAI,iCAAiC,OAAO,WAAW,KAAK,cAAc,KAAK,KAAK,MAAM,OACxF,OAAO;GACL;GACA,OAAO,QAAQ,OAAO,MAAM,KAAK;EACnC;EAIF,IAAI,MAAM;OAKJ,EAFF,cAAc,KAAK,KAAK,MAAM,SAAS,OAAO,MAAM,UAAU,YAAY,eAAe,MAAM,QAG/F,OAAO;IACL;IACA,OAAO,QAAQ,OAAO,KAAK;GAC7B;EAAA;EAIJ,OAAO;CACT,CAAC,CAAC,CACD,OAAO,SAAS;AACrB"}
@@ -1 +1 @@
1
- {"version":3,"file":"get-enum-values.js","names":[],"sources":["../../../../../src/components/Content/Schema/helpers/get-enum-values.ts"],"sourcesContent":["import { resolve } from '@scalar/workspace-store/resolve'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { isArraySchema } from '@scalar/workspace-store/schemas/v3.1/strict/type-guards'\n\n/**\n * Extract enum values from schema or array items\n *\n * @param value - The schema object to extract enum values from\n * @returns Array of enum values, or empty array if no enum found\n */\nexport const getEnumValues = (value: SchemaObject | undefined): unknown[] => {\n if (!value) {\n return []\n }\n\n // Check for enum directly on the schema\n if (value.enum) {\n return value.enum\n }\n\n // Check for enum in array items (resolving $ref if present)\n if (isArraySchema(value) && typeof value.items === 'object') {\n const resolvedItems = resolve.schema(value.items)\n if (resolvedItems && 'enum' in resolvedItems && resolvedItems.enum) {\n return resolvedItems.enum\n }\n }\n\n return []\n}\n"],"mappings":";;;;;;;;;AAUA,IAAa,iBAAiB,UAA+C;AAC3E,KAAI,CAAC,MACH,QAAO,EAAE;AAIX,KAAI,MAAM,KACR,QAAO,MAAM;AAIf,KAAI,cAAc,MAAM,IAAI,OAAO,MAAM,UAAU,UAAU;EAC3D,MAAM,gBAAgB,QAAQ,OAAO,MAAM,MAAM;AACjD,MAAI,iBAAiB,UAAU,iBAAiB,cAAc,KAC5D,QAAO,cAAc;;AAIzB,QAAO,EAAE"}
1
+ {"version":3,"file":"get-enum-values.js","names":[],"sources":["../../../../../src/components/Content/Schema/helpers/get-enum-values.ts"],"sourcesContent":["import { resolve } from '@scalar/workspace-store/resolve'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { isArraySchema } from '@scalar/workspace-store/schemas/v3.1/strict/type-guards'\n\n/**\n * Extract enum values from schema or array items\n *\n * @param value - The schema object to extract enum values from\n * @returns Array of enum values, or empty array if no enum found\n */\nexport const getEnumValues = (value: SchemaObject | undefined): unknown[] => {\n if (!value) {\n return []\n }\n\n // Check for enum directly on the schema\n if (value.enum) {\n return value.enum\n }\n\n // Check for enum in array items (resolving $ref if present)\n if (isArraySchema(value) && typeof value.items === 'object') {\n const resolvedItems = resolve.schema(value.items)\n if (resolvedItems && 'enum' in resolvedItems && resolvedItems.enum) {\n return resolvedItems.enum\n }\n }\n\n return []\n}\n"],"mappings":";;;;;;;;;AAUA,IAAa,iBAAiB,UAA+C;CAC3E,IAAI,CAAC,OACH,OAAO,CAAC;CAIV,IAAI,MAAM,MACR,OAAO,MAAM;CAIf,IAAI,cAAc,KAAK,KAAK,OAAO,MAAM,UAAU,UAAU;EAC3D,MAAM,gBAAgB,QAAQ,OAAO,MAAM,KAAK;EAChD,IAAI,iBAAiB,UAAU,iBAAiB,cAAc,MAC5D,OAAO,cAAc;CAEzB;CAEA,OAAO,CAAC;AACV"}
@@ -1 +1 @@
1
- {"version":3,"file":"get-property-description.js","names":[],"sources":["../../../../../src/components/Content/Schema/helpers/get-property-description.ts"],"sourcesContent":["import type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { isSchema } from '@scalar/workspace-store/schemas/v3.1/strict/type-guards'\n\n// Type descriptions for built-in types\nconst TYPE_DESCRIPTIONS: Record<string, Record<string, string>> = {\n integer: {\n _default: 'Integer numbers.',\n int32: 'Signed 32-bit integers (commonly used integer type).',\n int64: 'Signed 64-bit integers (long type).',\n },\n string: {\n 'date': 'full-date notation as defined by RFC 3339, section 5.6, for example, 2017-07-21',\n 'date-time': 'the date-time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z',\n 'password': 'a hint to UIs to mask the input',\n 'base64': 'base64-encoded characters, for example, U3dhZ2dlciByb2Nrcw==',\n 'byte': 'base64-encoded characters, for example, U3dhZ2dlciByb2Nrcw==',\n 'binary': 'binary data, used to describe files',\n },\n} as const\n\n/**\n * Generate property description from type/format\n *\n * @param value - The schema object to generate description from\n * @returns Description string or null if no description available\n */\nexport const getPropertyDescription = (value: SchemaObject | undefined): string | null => {\n if (!isSchema(value)) {\n return null\n }\n /** Just grab the first type from the array if it's an array */\n const type = Array.isArray(value.type) ? value.type[0] : value.type\n if (!type) {\n return null\n }\n\n const typeDescriptions = TYPE_DESCRIPTIONS[type]\n if (!typeDescriptions) {\n return null\n }\n\n const format =\n ('format' in value && value.format) || ('contentEncoding' in value && value.contentEncoding) || '_default'\n return typeDescriptions[format] ?? null\n}\n"],"mappings":";;AAIA,IAAM,oBAA4D;CAChE,SAAS;EACP,UAAU;EACV,OAAO;EACP,OAAO;EACR;CACD,QAAQ;EACN,QAAQ;EACR,aAAa;EACb,YAAY;EACZ,UAAU;EACV,QAAQ;EACR,UAAU;EACX;CACF;;;;;;;AAQD,IAAa,0BAA0B,UAAmD;AACxF,KAAI,CAAC,SAAS,MAAM,CAClB,QAAO;;CAGT,MAAM,OAAO,MAAM,QAAQ,MAAM,KAAK,GAAG,MAAM,KAAK,KAAK,MAAM;AAC/D,KAAI,CAAC,KACH,QAAO;CAGT,MAAM,mBAAmB,kBAAkB;AAC3C,KAAI,CAAC,iBACH,QAAO;AAKT,QAAO,iBADJ,YAAY,SAAS,MAAM,UAAY,qBAAqB,SAAS,MAAM,mBAAoB,eAC/D"}
1
+ {"version":3,"file":"get-property-description.js","names":[],"sources":["../../../../../src/components/Content/Schema/helpers/get-property-description.ts"],"sourcesContent":["import type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { isSchema } from '@scalar/workspace-store/schemas/v3.1/strict/type-guards'\n\n// Type descriptions for built-in types\nconst TYPE_DESCRIPTIONS: Record<string, Record<string, string>> = {\n integer: {\n _default: 'Integer numbers.',\n int32: 'Signed 32-bit integers (commonly used integer type).',\n int64: 'Signed 64-bit integers (long type).',\n },\n string: {\n 'date': 'full-date notation as defined by RFC 3339, section 5.6, for example, 2017-07-21',\n 'date-time': 'the date-time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z',\n 'password': 'a hint to UIs to mask the input',\n 'base64': 'base64-encoded characters, for example, U3dhZ2dlciByb2Nrcw==',\n 'byte': 'base64-encoded characters, for example, U3dhZ2dlciByb2Nrcw==',\n 'binary': 'binary data, used to describe files',\n },\n} as const\n\n/**\n * Generate property description from type/format\n *\n * @param value - The schema object to generate description from\n * @returns Description string or null if no description available\n */\nexport const getPropertyDescription = (value: SchemaObject | undefined): string | null => {\n if (!isSchema(value)) {\n return null\n }\n /** Just grab the first type from the array if it's an array */\n const type = Array.isArray(value.type) ? value.type[0] : value.type\n if (!type) {\n return null\n }\n\n const typeDescriptions = TYPE_DESCRIPTIONS[type]\n if (!typeDescriptions) {\n return null\n }\n\n const format =\n ('format' in value && value.format) || ('contentEncoding' in value && value.contentEncoding) || '_default'\n return typeDescriptions[format] ?? null\n}\n"],"mappings":";;AAIA,IAAM,oBAA4D;CAChE,SAAS;EACP,UAAU;EACV,OAAO;EACP,OAAO;CACT;CACA,QAAQ;EACN,QAAQ;EACR,aAAa;EACb,YAAY;EACZ,UAAU;EACV,QAAQ;EACR,UAAU;CACZ;AACF;;;;;;;AAQA,IAAa,0BAA0B,UAAmD;CACxF,IAAI,CAAC,SAAS,KAAK,GACjB,OAAO;;CAGT,MAAM,OAAO,MAAM,QAAQ,MAAM,IAAI,IAAI,MAAM,KAAK,KAAK,MAAM;CAC/D,IAAI,CAAC,MACH,OAAO;CAGT,MAAM,mBAAmB,kBAAkB;CAC3C,IAAI,CAAC,kBACH,OAAO;CAKT,OAAO,iBADJ,YAAY,SAAS,MAAM,UAAY,qBAAqB,SAAS,MAAM,mBAAoB,eAC/D;AACrC"}
@@ -1 +1 @@
1
- {"version":3,"file":"get-ref-name.js","names":[],"sources":["../../../../../src/components/Content/Schema/helpers/get-ref-name.ts"],"sourcesContent":["import { REGEX } from '@scalar/helpers/regex/regex-helpers'\n\n/**\n * Gets the \"name\" of the schema from the ref path\n * TODO: this will change so fix it when the new refs are out\n * Then add tests\n *\n * @example SchemaName from #/components/schemas/SchemaName\n */\nexport const getRefName = (ref: string) => {\n if (!ref) {\n return null\n }\n\n const match = ref.match(REGEX.REF_NAME)\n if (match) {\n return match[1]\n }\n\n return null\n}\n"],"mappings":";;;;;;;;;AASA,IAAa,cAAc,QAAgB;AACzC,KAAI,CAAC,IACH,QAAO;CAGT,MAAM,QAAQ,IAAI,MAAM,MAAM,SAAS;AACvC,KAAI,MACF,QAAO,MAAM;AAGf,QAAO"}
1
+ {"version":3,"file":"get-ref-name.js","names":[],"sources":["../../../../../src/components/Content/Schema/helpers/get-ref-name.ts"],"sourcesContent":["import { REGEX } from '@scalar/helpers/regex/regex-helpers'\n\n/**\n * Gets the \"name\" of the schema from the ref path\n * TODO: this will change so fix it when the new refs are out\n * Then add tests\n *\n * @example SchemaName from #/components/schemas/SchemaName\n */\nexport const getRefName = (ref: string) => {\n if (!ref) {\n return null\n }\n\n const match = ref.match(REGEX.REF_NAME)\n if (match) {\n return match[1]\n }\n\n return null\n}\n"],"mappings":";;;;;;;;;AASA,IAAa,cAAc,QAAgB;CACzC,IAAI,CAAC,KACH,OAAO;CAGT,MAAM,QAAQ,IAAI,MAAM,MAAM,QAAQ;CACtC,IAAI,OACF,OAAO,MAAM;CAGf,OAAO;AACT"}
@@ -1 +1 @@
1
- {"version":3,"file":"get-schema-type.js","names":[],"sources":["../../../../../src/components/Content/Schema/helpers/get-schema-type.ts"],"sourcesContent":["import { resolve } from '@scalar/workspace-store/resolve'\nimport type { ReferenceType, SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { isArraySchema } from '@scalar/workspace-store/schemas/v3.1/strict/type-guards'\n\n/**\n * Formats an array type string with proper wrapping for union types.\n */\nconst formatArrayType = (itemType: string): string => {\n if (!itemType) {\n return 'array'\n }\n\n const wrappedItemType = itemType.includes(' | ') ? `(${itemType})` : itemType\n return `array ${wrappedItemType}[]`\n}\n\n/**\n * Handles array type processing for both single array types and union types containing array.\n */\nconst processArrayType = (value: Extract<SchemaObject, { type: 'array' }>, isUnionType: boolean = false): string => {\n if (!value.items) {\n return 'array'\n }\n\n const itemType = getSchemaType(resolve.schema(value.items))\n const baseType = formatArrayType(itemType)\n\n if (isUnionType) {\n return baseType\n }\n\n // Handle nullable arrays for non-union types\n return (value as any).nullable ? `${baseType} | null` : baseType\n}\n\n/**\n * Computes the structural type for a schema.\n * This helper always returns type information, never schema titles or ref names.\n *\n * Priority order:\n * 1. const values\n * 2. Array types (with special handling for items)\n * 3. type with contentEncoding\n * 4. raw type\n */\nexport const getSchemaType = (valueOrRef: SchemaObject | ReferenceType<SchemaObject>): string => {\n // Early return for falsy values\n if (!valueOrRef) {\n return ''\n }\n\n const value = resolve.schema(valueOrRef)\n\n // Handle const values first (highest priority)\n if (value.const !== undefined) {\n return 'const'\n }\n\n // Handle union types (array of types)\n if ('type' in value && Array.isArray(value.type)) {\n // Special case: union types containing 'array'\n // TODO: Correctly type array of types in SchemaObject\n if (value.type.includes('array') && (value as Extract<SchemaObject, { type: 'array' }>).items) {\n const arrayType = processArrayType(value as Extract<SchemaObject, { type: 'array' }>, true)\n const otherTypes = value.type.filter((t) => t !== 'array')\n\n return otherTypes.length > 0 ? `${arrayType} | ${otherTypes.join(' | ')}` : arrayType\n }\n\n // Regular union types\n return value.type.join(' | ')\n }\n\n // Handle single array type\n if (isArraySchema(value)) {\n return processArrayType(value, false)\n }\n\n // Handle type with content encoding\n if ('type' in value && value.type && value.contentEncoding) {\n return `${value.type} • ${value.contentEncoding}`\n }\n\n // Fallback to raw type\n return 'type' in value ? (value.type as string) : ''\n}\n"],"mappings":";;;;;;AAOA,IAAM,mBAAmB,aAA6B;AACpD,KAAI,CAAC,SACH,QAAO;AAIT,QAAO,SADiB,SAAS,SAAS,MAAM,GAAG,IAAI,SAAS,KAAK,SACrC;;;;;AAMlC,IAAM,oBAAoB,OAAiD,cAAuB,UAAkB;AAClH,KAAI,CAAC,MAAM,MACT,QAAO;CAIT,MAAM,WAAW,gBADA,cAAc,QAAQ,OAAO,MAAM,MAAM,CAAC,CACjB;AAE1C,KAAI,YACF,QAAO;AAIT,QAAQ,MAAc,WAAW,GAAG,SAAS,WAAW;;;;;;;;;;;;AAa1D,IAAa,iBAAiB,eAAmE;AAE/F,KAAI,CAAC,WACH,QAAO;CAGT,MAAM,QAAQ,QAAQ,OAAO,WAAW;AAGxC,KAAI,MAAM,UAAU,KAAA,EAClB,QAAO;AAIT,KAAI,UAAU,SAAS,MAAM,QAAQ,MAAM,KAAK,EAAE;AAGhD,MAAI,MAAM,KAAK,SAAS,QAAQ,IAAK,MAAmD,OAAO;GAC7F,MAAM,YAAY,iBAAiB,OAAmD,KAAK;GAC3F,MAAM,aAAa,MAAM,KAAK,QAAQ,MAAM,MAAM,QAAQ;AAE1D,UAAO,WAAW,SAAS,IAAI,GAAG,UAAU,KAAK,WAAW,KAAK,MAAM,KAAK;;AAI9E,SAAO,MAAM,KAAK,KAAK,MAAM;;AAI/B,KAAI,cAAc,MAAM,CACtB,QAAO,iBAAiB,OAAO,MAAM;AAIvC,KAAI,UAAU,SAAS,MAAM,QAAQ,MAAM,gBACzC,QAAO,GAAG,MAAM,KAAK,KAAK,MAAM;AAIlC,QAAO,UAAU,QAAS,MAAM,OAAkB"}
1
+ {"version":3,"file":"get-schema-type.js","names":[],"sources":["../../../../../src/components/Content/Schema/helpers/get-schema-type.ts"],"sourcesContent":["import { resolve } from '@scalar/workspace-store/resolve'\nimport type { ReferenceType, SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { isArraySchema } from '@scalar/workspace-store/schemas/v3.1/strict/type-guards'\n\n/**\n * Formats an array type string with proper wrapping for union types.\n */\nconst formatArrayType = (itemType: string): string => {\n if (!itemType) {\n return 'array'\n }\n\n const wrappedItemType = itemType.includes(' | ') ? `(${itemType})` : itemType\n return `array ${wrappedItemType}[]`\n}\n\n/**\n * Handles array type processing for both single array types and union types containing array.\n */\nconst processArrayType = (value: Extract<SchemaObject, { type: 'array' }>, isUnionType: boolean = false): string => {\n if (!value.items) {\n return 'array'\n }\n\n const itemType = getSchemaType(resolve.schema(value.items))\n const baseType = formatArrayType(itemType)\n\n if (isUnionType) {\n return baseType\n }\n\n // Handle nullable arrays for non-union types\n return (value as any).nullable ? `${baseType} | null` : baseType\n}\n\n/**\n * Computes the structural type for a schema.\n * This helper always returns type information, never schema titles or ref names.\n *\n * Priority order:\n * 1. const values\n * 2. Array types (with special handling for items)\n * 3. type with contentEncoding\n * 4. raw type\n */\nexport const getSchemaType = (valueOrRef: SchemaObject | ReferenceType<SchemaObject>): string => {\n // Early return for falsy values\n if (!valueOrRef) {\n return ''\n }\n\n const value = resolve.schema(valueOrRef)\n\n // Handle const values first (highest priority)\n if (value.const !== undefined) {\n return 'const'\n }\n\n // Handle union types (array of types)\n if ('type' in value && Array.isArray(value.type)) {\n // Special case: union types containing 'array'\n // TODO: Correctly type array of types in SchemaObject\n if (value.type.includes('array') && (value as Extract<SchemaObject, { type: 'array' }>).items) {\n const arrayType = processArrayType(value as Extract<SchemaObject, { type: 'array' }>, true)\n const otherTypes = value.type.filter((t) => t !== 'array')\n\n return otherTypes.length > 0 ? `${arrayType} | ${otherTypes.join(' | ')}` : arrayType\n }\n\n // Regular union types\n return value.type.join(' | ')\n }\n\n // Handle single array type\n if (isArraySchema(value)) {\n return processArrayType(value, false)\n }\n\n // Handle type with content encoding\n if ('type' in value && value.type && value.contentEncoding) {\n return `${value.type} • ${value.contentEncoding}`\n }\n\n // Fallback to raw type\n return 'type' in value ? (value.type as string) : ''\n}\n"],"mappings":";;;;;;AAOA,IAAM,mBAAmB,aAA6B;CACpD,IAAI,CAAC,UACH,OAAO;CAIT,OAAO,SADiB,SAAS,SAAS,KAAK,IAAI,IAAI,SAAS,KAAK,SACrC;AAClC;;;;AAKA,IAAM,oBAAoB,OAAiD,cAAuB,UAAkB;CAClH,IAAI,CAAC,MAAM,OACT,OAAO;CAIT,MAAM,WAAW,gBADA,cAAc,QAAQ,OAAO,MAAM,KAAK,CACxB,CAAQ;CAEzC,IAAI,aACF,OAAO;CAIT,OAAQ,MAAc,WAAW,GAAG,SAAS,WAAW;AAC1D;;;;;;;;;;;AAYA,IAAa,iBAAiB,eAAmE;CAE/F,IAAI,CAAC,YACH,OAAO;CAGT,MAAM,QAAQ,QAAQ,OAAO,UAAU;CAGvC,IAAI,MAAM,UAAU,KAAA,GAClB,OAAO;CAIT,IAAI,UAAU,SAAS,MAAM,QAAQ,MAAM,IAAI,GAAG;EAGhD,IAAI,MAAM,KAAK,SAAS,OAAO,KAAM,MAAmD,OAAO;GAC7F,MAAM,YAAY,iBAAiB,OAAmD,IAAI;GAC1F,MAAM,aAAa,MAAM,KAAK,QAAQ,MAAM,MAAM,OAAO;GAEzD,OAAO,WAAW,SAAS,IAAI,GAAG,UAAU,KAAK,WAAW,KAAK,KAAK,MAAM;EAC9E;EAGA,OAAO,MAAM,KAAK,KAAK,KAAK;CAC9B;CAGA,IAAI,cAAc,KAAK,GACrB,OAAO,iBAAiB,OAAO,KAAK;CAItC,IAAI,UAAU,SAAS,MAAM,QAAQ,MAAM,iBACzC,OAAO,GAAG,MAAM,KAAK,KAAK,MAAM;CAIlC,OAAO,UAAU,QAAS,MAAM,OAAkB;AACpD"}
@@ -1 +1 @@
1
- {"version":3,"file":"has-complex-array-items.js","names":[],"sources":["../../../../../src/components/Content/Schema/helpers/has-complex-array-items.ts"],"sourcesContent":["import { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { isArraySchema } from '@scalar/workspace-store/schemas/v3.1/strict/type-guards'\n\n/** Composition keywords that indicate complex schema structure */\nconst COMPOSITION_KEYWORDS = ['allOf', 'oneOf', 'anyOf'] as const\n\n/**\n * Checks if a schema has object type (either explicit type: 'object' or has properties)\n */\nconst isObjectType = (schema: SchemaObject): boolean => {\n // Check for explicit object type\n if ('type' in schema && schema.type) {\n if (Array.isArray(schema.type)) {\n return schema.type.includes('object')\n }\n return schema.type === 'object'\n }\n\n // Check for properties (implicit object type)\n return 'properties' in schema\n}\n\n/**\n * Checks if a schema has complex features (refs, compositions, discriminators)\n */\nconst hasComplexFeatures = (schema: SchemaObject): boolean =>\n '$ref' in schema || 'discriminator' in schema || COMPOSITION_KEYWORDS.some((keyword) => keyword in schema)\n\n/**\n * Checks if nested array items are complex\n */\nconst hasComplexNestedArrayItems = (items: SchemaObject): boolean => {\n if (!isArraySchema(items) || typeof items.items !== 'object') {\n return false\n }\n\n // Check for $ref in original nested items before resolving\n if ('$ref' in items.items) {\n return true\n }\n\n const nestedItems = getResolvedRef(items.items)\n if (!nestedItems) {\n return false\n }\n\n // Check if nested items are complex (objects, refs, compositions, or further nested arrays)\n return isObjectType(nestedItems) || hasComplexFeatures(nestedItems) || isArraySchema(nestedItems)\n}\n\n/**\n * Checks if array items have complex structure\n * like: objects, references, discriminators, compositions, or nested arrays with complex items\n *\n * @param value - The schema object to check\n * @returns true if the array has complex items, false otherwise\n */\nexport const hasComplexArrayItems = (value: SchemaObject | undefined): boolean => {\n // Early return for invalid inputs\n if (!value || !isArraySchema(value) || typeof value.items !== 'object') {\n return false\n }\n\n // Check for $ref in original items before resolving (in case ref can't be resolved)\n if ('$ref' in value.items) {\n return true\n }\n\n const items = getResolvedRef(value.items)\n if (!items) {\n return false\n }\n\n // Check for complex features (refs, compositions, discriminators)\n if (hasComplexFeatures(items)) {\n return true\n }\n\n // Check if items are objects\n if (isObjectType(items)) {\n return true\n }\n\n // Check if items are nested arrays with complex items\n return hasComplexNestedArrayItems(items)\n}\n"],"mappings":";;;;AAKA,IAAM,uBAAuB;CAAC;CAAS;CAAS;CAAQ;;;;AAKxD,IAAM,gBAAgB,WAAkC;AAEtD,KAAI,UAAU,UAAU,OAAO,MAAM;AACnC,MAAI,MAAM,QAAQ,OAAO,KAAK,CAC5B,QAAO,OAAO,KAAK,SAAS,SAAS;AAEvC,SAAO,OAAO,SAAS;;AAIzB,QAAO,gBAAgB;;;;;AAMzB,IAAM,sBAAsB,WAC1B,UAAU,UAAU,mBAAmB,UAAU,qBAAqB,MAAM,YAAY,WAAW,OAAO;;;;AAK5G,IAAM,8BAA8B,UAAiC;AACnE,KAAI,CAAC,cAAc,MAAM,IAAI,OAAO,MAAM,UAAU,SAClD,QAAO;AAIT,KAAI,UAAU,MAAM,MAClB,QAAO;CAGT,MAAM,cAAc,eAAe,MAAM,MAAM;AAC/C,KAAI,CAAC,YACH,QAAO;AAIT,QAAO,aAAa,YAAY,IAAI,mBAAmB,YAAY,IAAI,cAAc,YAAY;;;;;;;;;AAUnG,IAAa,wBAAwB,UAA6C;AAEhF,KAAI,CAAC,SAAS,CAAC,cAAc,MAAM,IAAI,OAAO,MAAM,UAAU,SAC5D,QAAO;AAIT,KAAI,UAAU,MAAM,MAClB,QAAO;CAGT,MAAM,QAAQ,eAAe,MAAM,MAAM;AACzC,KAAI,CAAC,MACH,QAAO;AAIT,KAAI,mBAAmB,MAAM,CAC3B,QAAO;AAIT,KAAI,aAAa,MAAM,CACrB,QAAO;AAIT,QAAO,2BAA2B,MAAM"}
1
+ {"version":3,"file":"has-complex-array-items.js","names":[],"sources":["../../../../../src/components/Content/Schema/helpers/has-complex-array-items.ts"],"sourcesContent":["import { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { isArraySchema } from '@scalar/workspace-store/schemas/v3.1/strict/type-guards'\n\n/** Composition keywords that indicate complex schema structure */\nconst COMPOSITION_KEYWORDS = ['allOf', 'oneOf', 'anyOf'] as const\n\n/**\n * Checks if a schema has object type (either explicit type: 'object' or has properties)\n */\nconst isObjectType = (schema: SchemaObject): boolean => {\n // Check for explicit object type\n if ('type' in schema && schema.type) {\n if (Array.isArray(schema.type)) {\n return schema.type.includes('object')\n }\n return schema.type === 'object'\n }\n\n // Check for properties (implicit object type)\n return 'properties' in schema\n}\n\n/**\n * Checks if a schema has complex features (refs, compositions, discriminators)\n */\nconst hasComplexFeatures = (schema: SchemaObject): boolean =>\n '$ref' in schema || 'discriminator' in schema || COMPOSITION_KEYWORDS.some((keyword) => keyword in schema)\n\n/**\n * Checks if nested array items are complex\n */\nconst hasComplexNestedArrayItems = (items: SchemaObject): boolean => {\n if (!isArraySchema(items) || typeof items.items !== 'object') {\n return false\n }\n\n // Check for $ref in original nested items before resolving\n if ('$ref' in items.items) {\n return true\n }\n\n const nestedItems = getResolvedRef(items.items)\n if (!nestedItems) {\n return false\n }\n\n // Check if nested items are complex (objects, refs, compositions, or further nested arrays)\n return isObjectType(nestedItems) || hasComplexFeatures(nestedItems) || isArraySchema(nestedItems)\n}\n\n/**\n * Checks if array items have complex structure\n * like: objects, references, discriminators, compositions, or nested arrays with complex items\n *\n * @param value - The schema object to check\n * @returns true if the array has complex items, false otherwise\n */\nexport const hasComplexArrayItems = (value: SchemaObject | undefined): boolean => {\n // Early return for invalid inputs\n if (!value || !isArraySchema(value) || typeof value.items !== 'object') {\n return false\n }\n\n // Check for $ref in original items before resolving (in case ref can't be resolved)\n if ('$ref' in value.items) {\n return true\n }\n\n const items = getResolvedRef(value.items)\n if (!items) {\n return false\n }\n\n // Check for complex features (refs, compositions, discriminators)\n if (hasComplexFeatures(items)) {\n return true\n }\n\n // Check if items are objects\n if (isObjectType(items)) {\n return true\n }\n\n // Check if items are nested arrays with complex items\n return hasComplexNestedArrayItems(items)\n}\n"],"mappings":";;;;AAKA,IAAM,uBAAuB;CAAC;CAAS;CAAS;AAAO;;;;AAKvD,IAAM,gBAAgB,WAAkC;CAEtD,IAAI,UAAU,UAAU,OAAO,MAAM;EACnC,IAAI,MAAM,QAAQ,OAAO,IAAI,GAC3B,OAAO,OAAO,KAAK,SAAS,QAAQ;EAEtC,OAAO,OAAO,SAAS;CACzB;CAGA,OAAO,gBAAgB;AACzB;;;;AAKA,IAAM,sBAAsB,WAC1B,UAAU,UAAU,mBAAmB,UAAU,qBAAqB,MAAM,YAAY,WAAW,MAAM;;;;AAK3G,IAAM,8BAA8B,UAAiC;CACnE,IAAI,CAAC,cAAc,KAAK,KAAK,OAAO,MAAM,UAAU,UAClD,OAAO;CAIT,IAAI,UAAU,MAAM,OAClB,OAAO;CAGT,MAAM,cAAc,eAAe,MAAM,KAAK;CAC9C,IAAI,CAAC,aACH,OAAO;CAIT,OAAO,aAAa,WAAW,KAAK,mBAAmB,WAAW,KAAK,cAAc,WAAW;AAClG;;;;;;;;AASA,IAAa,wBAAwB,UAA6C;CAEhF,IAAI,CAAC,SAAS,CAAC,cAAc,KAAK,KAAK,OAAO,MAAM,UAAU,UAC5D,OAAO;CAIT,IAAI,UAAU,MAAM,OAClB,OAAO;CAGT,MAAM,QAAQ,eAAe,MAAM,KAAK;CACxC,IAAI,CAAC,OACH,OAAO;CAIT,IAAI,mBAAmB,KAAK,GAC1B,OAAO;CAIT,IAAI,aAAa,KAAK,GACpB,OAAO;CAIT,OAAO,2BAA2B,KAAK;AACzC"}
@@ -1 +1 @@
1
- {"version":3,"file":"is-empty-schema-object.js","names":[],"sources":["../../../../../src/components/Content/Schema/helpers/is-empty-schema-object.ts"],"sourcesContent":["import type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nimport { isTypeObject } from '@/components/Content/Schema/helpers/is-type-object'\n\n/**\n * Determines if the given schema is an empty object schema.\n * An empty object schema is defined as a schema with type 'object'\n * and no defined properties, no additionalProperties (or set to false), and no patternProperties.\n */\nexport const isEmptySchemaObject = (schema: SchemaObject | undefined): boolean => {\n if (!isTypeObject(schema)) {\n return false\n }\n\n const hasNoProperties = Object.keys(schema.properties ?? {}).length === 0\n const hasNoAdditionalProperties = schema.additionalProperties === undefined || schema.additionalProperties === false\n const hasNoPatternProperties = Object.keys(schema.patternProperties ?? {}).length === 0\n\n return hasNoProperties && hasNoAdditionalProperties && hasNoPatternProperties\n}\n"],"mappings":";;;;;;;AASA,IAAa,uBAAuB,WAA8C;AAChF,KAAI,CAAC,aAAa,OAAO,CACvB,QAAO;CAGT,MAAM,kBAAkB,OAAO,KAAK,OAAO,cAAc,EAAE,CAAC,CAAC,WAAW;CACxE,MAAM,4BAA4B,OAAO,yBAAyB,KAAA,KAAa,OAAO,yBAAyB;CAC/G,MAAM,yBAAyB,OAAO,KAAK,OAAO,qBAAqB,EAAE,CAAC,CAAC,WAAW;AAEtF,QAAO,mBAAmB,6BAA6B"}
1
+ {"version":3,"file":"is-empty-schema-object.js","names":[],"sources":["../../../../../src/components/Content/Schema/helpers/is-empty-schema-object.ts"],"sourcesContent":["import type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nimport { isTypeObject } from '@/components/Content/Schema/helpers/is-type-object'\n\n/**\n * Determines if the given schema is an empty object schema.\n * An empty object schema is defined as a schema with type 'object'\n * and no defined properties, no additionalProperties (or set to false), and no patternProperties.\n */\nexport const isEmptySchemaObject = (schema: SchemaObject | undefined): boolean => {\n if (!isTypeObject(schema)) {\n return false\n }\n\n const hasNoProperties = Object.keys(schema.properties ?? {}).length === 0\n const hasNoAdditionalProperties = schema.additionalProperties === undefined || schema.additionalProperties === false\n const hasNoPatternProperties = Object.keys(schema.patternProperties ?? {}).length === 0\n\n return hasNoProperties && hasNoAdditionalProperties && hasNoPatternProperties\n}\n"],"mappings":";;;;;;;AASA,IAAa,uBAAuB,WAA8C;CAChF,IAAI,CAAC,aAAa,MAAM,GACtB,OAAO;CAGT,MAAM,kBAAkB,OAAO,KAAK,OAAO,cAAc,CAAC,CAAC,CAAC,CAAC,WAAW;CACxE,MAAM,4BAA4B,OAAO,yBAAyB,KAAA,KAAa,OAAO,yBAAyB;CAC/G,MAAM,yBAAyB,OAAO,KAAK,OAAO,qBAAqB,CAAC,CAAC,CAAC,CAAC,WAAW;CAEtF,OAAO,mBAAmB,6BAA6B;AACzD"}
@@ -1 +1 @@
1
- {"version":3,"file":"is-type-object.js","names":[],"sources":["../../../../../src/components/Content/Schema/helpers/is-type-object.ts"],"sourcesContent":["import type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\n/*\n * Checks whether a JSON schema is of type object\n */\nexport const isTypeObject = (schema: unknown): schema is Extract<SchemaObject, { type: 'object' }> => {\n // null, primitive types, arrays\n if (schema === null || typeof schema !== 'object' || Array.isArray(schema)) {\n return false\n }\n\n // Check for composition keywords - if present, this should be handled by composition logic\n const hasComposition = 'oneOf' in schema || 'anyOf' in schema || 'allOf' in schema || 'not' in schema\n\n // If it has composition keywords, it should not be treated as a simple object schema\n if (hasComposition) {\n return false\n }\n\n const hasType = 'type' in schema\n\n // Handle union types (type: ['object', 'null'])\n if (hasType && Array.isArray(schema.type)) {\n return schema.type.includes('object')\n }\n\n const hasTypeObject = hasType && schema.type === 'object'\n\n // type: object\n if (hasTypeObject) {\n return true\n }\n\n // type: string, number, boolean, array, etc.\n if (hasType && !hasTypeObject) {\n return false\n }\n\n const hasProperties = 'properties' in schema\n const hasAdditionalProperties = 'additionalProperties' in schema\n const hasPatternProperties = 'patternProperties' in schema\n\n return hasProperties || hasAdditionalProperties || hasPatternProperties\n}\n"],"mappings":";AAKA,IAAa,gBAAgB,WAAyE;AAEpG,KAAI,WAAW,QAAQ,OAAO,WAAW,YAAY,MAAM,QAAQ,OAAO,CACxE,QAAO;AAOT,KAHuB,WAAW,UAAU,WAAW,UAAU,WAAW,UAAU,SAAS,OAI7F,QAAO;CAGT,MAAM,UAAU,UAAU;AAG1B,KAAI,WAAW,MAAM,QAAQ,OAAO,KAAK,CACvC,QAAO,OAAO,KAAK,SAAS,SAAS;CAGvC,MAAM,gBAAgB,WAAW,OAAO,SAAS;AAGjD,KAAI,cACF,QAAO;AAIT,KAAI,WAAW,CAAC,cACd,QAAO;CAGT,MAAM,gBAAgB,gBAAgB;CACtC,MAAM,0BAA0B,0BAA0B;CAC1D,MAAM,uBAAuB,uBAAuB;AAEpD,QAAO,iBAAiB,2BAA2B"}
1
+ {"version":3,"file":"is-type-object.js","names":[],"sources":["../../../../../src/components/Content/Schema/helpers/is-type-object.ts"],"sourcesContent":["import type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\n/*\n * Checks whether a JSON schema is of type object\n */\nexport const isTypeObject = (schema: unknown): schema is Extract<SchemaObject, { type: 'object' }> => {\n // null, primitive types, arrays\n if (schema === null || typeof schema !== 'object' || Array.isArray(schema)) {\n return false\n }\n\n // Check for composition keywords - if present, this should be handled by composition logic\n const hasComposition = 'oneOf' in schema || 'anyOf' in schema || 'allOf' in schema || 'not' in schema\n\n // If it has composition keywords, it should not be treated as a simple object schema\n if (hasComposition) {\n return false\n }\n\n const hasType = 'type' in schema\n\n // Handle union types (type: ['object', 'null'])\n if (hasType && Array.isArray(schema.type)) {\n return schema.type.includes('object')\n }\n\n const hasTypeObject = hasType && schema.type === 'object'\n\n // type: object\n if (hasTypeObject) {\n return true\n }\n\n // type: string, number, boolean, array, etc.\n if (hasType && !hasTypeObject) {\n return false\n }\n\n const hasProperties = 'properties' in schema\n const hasAdditionalProperties = 'additionalProperties' in schema\n const hasPatternProperties = 'patternProperties' in schema\n\n return hasProperties || hasAdditionalProperties || hasPatternProperties\n}\n"],"mappings":";AAKA,IAAa,gBAAgB,WAAyE;CAEpG,IAAI,WAAW,QAAQ,OAAO,WAAW,YAAY,MAAM,QAAQ,MAAM,GACvE,OAAO;CAOT,IAHuB,WAAW,UAAU,WAAW,UAAU,WAAW,UAAU,SAAS,QAI7F,OAAO;CAGT,MAAM,UAAU,UAAU;CAG1B,IAAI,WAAW,MAAM,QAAQ,OAAO,IAAI,GACtC,OAAO,OAAO,KAAK,SAAS,QAAQ;CAGtC,MAAM,gBAAgB,WAAW,OAAO,SAAS;CAGjD,IAAI,eACF,OAAO;CAIT,IAAI,WAAW,CAAC,eACd,OAAO;CAGT,MAAM,gBAAgB,gBAAgB;CACtC,MAAM,0BAA0B,0BAA0B;CAC1D,MAAM,uBAAuB,uBAAuB;CAEpD,OAAO,iBAAiB,2BAA2B;AACrD"}
@@ -9,7 +9,7 @@ import { objectKeys } from "@scalar/helpers/object/object-keys";
9
9
  * annotations a later subschema is expected to override an earlier one — matching
10
10
  * OpenAPI/JSON Schema tooling like Swagger UI.
11
11
  */
12
- var LAST_WINS_KEYS = new Set(["description", "title"]);
12
+ var LAST_WINS_KEYS = /* @__PURE__ */ new Set(["description", "title"]);
13
13
  /**
14
14
  * Merges multiple OpenAPI schema objects into a single schema object.
15
15
  * Handles nested allOf compositions and merges properties recursively.
@@ -52,7 +52,7 @@ var mergeSchemaIntoResult = (result, schema, override = false, seenRefs = /* @__
52
52
  const value = getResolvedRef(schema[key]);
53
53
  if (value === void 0) continue;
54
54
  if (key === "required") {
55
- if (Array.isArray(value) && value.length > 0) if (result.required?.length) result.required = [...new Set([...result.required, ...value])];
55
+ if (Array.isArray(value) && value.length > 0) if (result.required?.length) result.required = [.../* @__PURE__ */ new Set([...result.required, ...value])];
56
56
  else result.required = value.slice();
57
57
  } else if (key === "properties") {
58
58
  if (value && typeof value === "object") {
@@ -77,7 +77,7 @@ var mergeSchemaIntoResult = (result, schema, override = false, seenRefs = /* @__
77
77
  } else if (!("items" in result)) result.items = items;
78
78
  }
79
79
  } else if (key === "enum") {
80
- if (Array.isArray(value) && value.length > 0) result.enum = [...new Set([...result.enum || [], ...value])];
80
+ if (Array.isArray(value) && value.length > 0) result.enum = [.../* @__PURE__ */ new Set([...result.enum || [], ...value])];
81
81
  } else if (key === "oneOf" || key === "anyOf") {
82
82
  if (Array.isArray(value) && value.length > 0 && (override || result[key] === void 0)) result[key] = value;
83
83
  } else if (key === "allOf") continue;