@scalar/api-reference 1.60.0 → 1.62.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (555) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/dist/blocks/scalar-asyncapi-server-selector-block/components/AsyncApiServerSelector.vue.d.ts.map +1 -1
  3. package/dist/blocks/scalar-asyncapi-server-selector-block/components/AsyncApiServerSelector.vue.js.map +1 -1
  4. package/dist/blocks/scalar-asyncapi-server-selector-block/components/AsyncApiServerSelector.vue.script.js +8 -5
  5. package/dist/blocks/scalar-asyncapi-server-selector-block/components/AsyncApiServerSelector.vue.script.js.map +1 -1
  6. package/dist/blocks/scalar-asyncapi-server-selector-block/components/Selector.vue.d.ts.map +1 -1
  7. package/dist/blocks/scalar-asyncapi-server-selector-block/components/Selector.vue.js.map +1 -1
  8. package/dist/blocks/scalar-asyncapi-server-selector-block/components/Selector.vue.script.js +11 -7
  9. package/dist/blocks/scalar-asyncapi-server-selector-block/components/Selector.vue.script.js.map +1 -1
  10. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/AsyncApiSidebarFilters.vue.d.ts +36 -0
  11. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/AsyncApiSidebarFilters.vue.d.ts.map +1 -0
  12. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/AsyncApiSidebarFilters.vue.js +7 -0
  13. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/AsyncApiSidebarFilters.vue.js.map +1 -0
  14. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/AsyncApiSidebarFilters.vue.script.js +69 -0
  15. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/AsyncApiSidebarFilters.vue.script.js.map +1 -0
  16. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/SidebarFilter.vue.d.ts +28 -0
  17. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/SidebarFilter.vue.d.ts.map +1 -0
  18. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/SidebarFilter.vue.js +7 -0
  19. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/SidebarFilter.vue.js.map +1 -0
  20. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/SidebarFilter.vue.script.js +62 -0
  21. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/SidebarFilter.vue.script.js.map +1 -0
  22. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/helpers/filter-async-api-navigation.d.ts +18 -0
  23. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/helpers/filter-async-api-navigation.d.ts.map +1 -0
  24. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/helpers/filter-async-api-navigation.js +59 -0
  25. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/helpers/filter-async-api-navigation.js.map +1 -0
  26. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/index.d.ts +3 -0
  27. package/dist/blocks/scalar-asyncapi-sidebar-filters-block/index.d.ts.map +1 -0
  28. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts +1 -1
  29. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts.map +1 -1
  30. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js +1 -1
  31. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js.map +1 -1
  32. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.script.js +6 -3
  33. package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.script.js.map +1 -1
  34. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.d.ts +2 -2
  35. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.d.ts.map +1 -1
  36. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.js +1 -1
  37. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.js.map +1 -1
  38. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.script.js +4 -2
  39. package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.script.js.map +1 -1
  40. package/dist/blocks/scalar-client-selector-block/helpers/featured-clients.d.ts +1 -1
  41. package/dist/blocks/scalar-client-selector-block/helpers/featured-clients.d.ts.map +1 -1
  42. package/dist/blocks/scalar-client-selector-block/helpers/featured-clients.js.map +1 -1
  43. package/dist/blocks/scalar-info-block/components/DownloadLink.vue.d.ts.map +1 -1
  44. package/dist/blocks/scalar-info-block/components/DownloadLink.vue.js +1 -1
  45. package/dist/blocks/scalar-info-block/components/DownloadLink.vue.js.map +1 -1
  46. package/dist/blocks/scalar-info-block/components/DownloadLink.vue.script.js +3 -1
  47. package/dist/blocks/scalar-info-block/components/DownloadLink.vue.script.js.map +1 -1
  48. package/dist/blocks/scalar-info-block/components/InfoLinks.vue.d.ts.map +1 -1
  49. package/dist/blocks/scalar-info-block/components/InfoLinks.vue.js.map +1 -1
  50. package/dist/blocks/scalar-info-block/components/InfoLinks.vue.script.js +17 -3
  51. package/dist/blocks/scalar-info-block/components/InfoLinks.vue.script.js.map +1 -1
  52. package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.d.ts.map +1 -1
  53. package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.js +1 -1
  54. package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.js.map +1 -1
  55. package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.script.js +4 -2
  56. package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.script.js.map +1 -1
  57. package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.d.ts.map +1 -1
  58. package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.js +1 -1
  59. package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.js.map +1 -1
  60. package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.script.js +16 -12
  61. package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.script.js.map +1 -1
  62. package/dist/blocks/scalar-server-selector-block/components/Selector.vue.d.ts.map +1 -1
  63. package/dist/blocks/scalar-server-selector-block/components/Selector.vue.js.map +1 -1
  64. package/dist/blocks/scalar-server-selector-block/components/Selector.vue.script.js +11 -7
  65. package/dist/blocks/scalar-server-selector-block/components/Selector.vue.script.js.map +1 -1
  66. package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.d.ts.map +1 -1
  67. package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.js.map +1 -1
  68. package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.script.js +7 -4
  69. package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.script.js.map +1 -1
  70. package/dist/browser/chunks/AgentScalarChatInterface-C3QiXv0S.js +27 -0
  71. package/dist/browser/chunks/ScalarTextInput.vue-CysYmeeN.js +27 -0
  72. package/dist/browser/chunks/basic-shape-diamond.svg-BTEOT1FL.js +1 -1
  73. package/dist/browser/chunks/basic-shape-hexagon.svg-BSPzaCgF.js +1 -1
  74. package/dist/browser/chunks/basic-shape-primary-circle-ellipse-round.svg-DKmZ8UUU.js +1 -1
  75. package/dist/browser/chunks/basic-shape-primary-square-rectangle.svg-n2YRykHD.js +1 -1
  76. package/dist/browser/chunks/basic-shape-shield.svg-Bec9cJDA.js +1 -1
  77. package/dist/browser/chunks/browser-67K6wmG9.js +1 -1
  78. package/dist/browser/chunks/computer-device-desktop-monitor.svg-m6j893Hb.js +1 -1
  79. package/dist/browser/chunks/computer-device-desktop.svg-Dk1VVO7k.js +1 -1
  80. package/dist/browser/chunks/computer-device-laptop.svg-BNGVUCYS.js +1 -1
  81. package/dist/browser/chunks/computer-device-mobile-phone-android-samsung-back.svg-CC4UUTFw.js +1 -1
  82. package/dist/browser/chunks/computer-device-mobile-phone-android-samsung.svg-D8ExpMpL.js +1 -1
  83. package/dist/browser/chunks/computer-device-mobile-phone-iphone-x-back.svg-CLm7sgMM.js +1 -1
  84. package/dist/browser/chunks/computer-device-mobile-phone-iphone-x.svg-Xrttg6_7.js +1 -1
  85. package/dist/browser/chunks/computer-device-mobile-tablet-touch.svg-DQ2oTvOG.js +1 -1
  86. package/dist/browser/chunks/computer-device-mobile-tablet.svg-DCr0XlRc.js +1 -1
  87. package/dist/browser/chunks/computer-device-network-ethernet-cat6.svg-AK9l0iOl.js +1 -1
  88. package/dist/browser/chunks/computer-device-network-lan-www.svg-gUIdFBlE.js +1 -1
  89. package/dist/browser/chunks/computer-device-network-wifi-connection.svg-Be-EMm4e.js +1 -1
  90. package/dist/browser/chunks/computer-device-network-wifi-router.svg-Dc2VzyqK.js +1 -1
  91. package/dist/browser/chunks/ecology-science-erlenmeyer-flask.svg-DHgy7Jfd.js +1 -1
  92. package/dist/browser/chunks/image-flash-lightning.svg-EETR_y1q.js +1 -1
  93. package/dist/browser/chunks/image-picture-flower.svg-DN1AYzJU.js +1 -1
  94. package/dist/browser/chunks/interface-alert-exclamation-diamond.svg-C5NozMV_.js +1 -1
  95. package/dist/browser/chunks/interface-alert-exclamation-triangle-warning.svg-DaAg2fF5.js +1 -1
  96. package/dist/browser/chunks/interface-alert-information-circle.svg-ckkkt9Mv.js +1 -1
  97. package/dist/browser/chunks/interface-award-crown.svg-pjvn9hY-.js +1 -1
  98. package/dist/browser/chunks/interface-bookmark-tag.svg-r2r-lQq4.js +1 -1
  99. package/dist/browser/chunks/interface-bookmark.svg-BK9HKQBT.js +1 -1
  100. package/dist/browser/chunks/interface-calendar-date-one.svg-DNnF0M1I.js +1 -1
  101. package/dist/browser/chunks/interface-content-book-open-pages.svg-CQj_w9Vp.js +1 -1
  102. package/dist/browser/chunks/interface-content-book-page.svg-DppoeJRe.js +1 -1
  103. package/dist/browser/chunks/interface-content-file.svg-CvcD7OiY.js +1 -1
  104. package/dist/browser/chunks/interface-content-folder.svg-BmtS5I9A.js +1 -1
  105. package/dist/browser/chunks/interface-copy-clipboard.svg-Be6EI50X.js +1 -1
  106. package/dist/browser/chunks/interface-edit-attachment.svg-G5TKzpWX.js +1 -1
  107. package/dist/browser/chunks/interface-edit-binocular.svg-jzL-DvGB.js +1 -1
  108. package/dist/browser/chunks/interface-edit-magic-wand.svg-BOTlymvp.js +1 -1
  109. package/dist/browser/chunks/interface-edit-tool-paint-roller.svg-s9dwryx7.js +1 -1
  110. package/dist/browser/chunks/interface-edit-tool-pencil.svg-C7v0dbB3.js +1 -1
  111. package/dist/browser/chunks/interface-favorite-award.svg-CYHUgUG0.js +1 -1
  112. package/dist/browser/chunks/interface-favorite-flag.svg-C10zlKOb.js +1 -1
  113. package/dist/browser/chunks/interface-favorite-heart.svg-eoduXxlz.js +1 -1
  114. package/dist/browser/chunks/interface-favorite-star.svg-BSmxJetr.js +1 -1
  115. package/dist/browser/chunks/interface-favorite-stars-sparkles.svg-JTFLj3Ls.js +1 -1
  116. package/dist/browser/chunks/interface-hierarchy-flowchart.svg-Cg_Wy0kN.js +1 -1
  117. package/dist/browser/chunks/interface-home-house.svg-DytoGRnv.js +1 -1
  118. package/dist/browser/chunks/interface-hyperlink.svg-CuEfmmQI.js +1 -1
  119. package/dist/browser/chunks/interface-lighting-brightness.svg-DSK0h_Pa.js +1 -1
  120. package/dist/browser/chunks/interface-lock-closed.svg-Cn6TaLYv.js +1 -1
  121. package/dist/browser/chunks/interface-lock-open-unlock.svg-CVkG5-9W.js +1 -1
  122. package/dist/browser/chunks/interface-login-key.svg-y-cwwXjN.js +1 -1
  123. package/dist/browser/chunks/interface-search.svg-S-puVFJB.js +1 -1
  124. package/dist/browser/chunks/interface-setting-cog.svg-CTH4_lLg.js +1 -1
  125. package/dist/browser/chunks/interface-share-megaphone-bullhorn.svg-Pbp39MyC.js +1 -1
  126. package/dist/browser/chunks/interface-share-rocket.svg-BgCsIRZO.js +1 -1
  127. package/dist/browser/chunks/interface-share-satellite.svg-DAMN9d5G.js +1 -1
  128. package/dist/browser/chunks/interface-share-space-ship.svg-Dt-Mejxk.js +1 -1
  129. package/dist/browser/chunks/interface-share.svg-vFYTXSti.js +1 -1
  130. package/dist/browser/chunks/interface-signal-square.svg-DNG4LpAe.js +1 -1
  131. package/dist/browser/chunks/interface-time-clock-circle.svg-Bpz-nLxo.js +1 -1
  132. package/dist/browser/chunks/interface-time-hour-glass.svg-D7agfKsH.js +1 -1
  133. package/dist/browser/chunks/interface-users-multiple.svg-CkPJBBnG.js +1 -1
  134. package/dist/browser/chunks/interface-weather-moon.svg-CaTZFMPO.js +1 -1
  135. package/dist/browser/chunks/mail-chat-bubble-square.svg-DC8RIihp.js +1 -1
  136. package/dist/browser/chunks/mail-send-email-paper-airplane.svg-D8OLs9jz.js +1 -1
  137. package/dist/browser/chunks/mail-send-envelope.svg-CV33h5Sx.js +1 -1
  138. package/dist/browser/chunks/{modal-LBDjZSmM.js → modal-CMytT4BZ.js} +2 -2
  139. package/dist/browser/chunks/modal-wI0tG53V.js +99 -0
  140. package/dist/browser/chunks/money-cashier-receipt.svg-CJL8C2gs.js +1 -1
  141. package/dist/browser/chunks/money-currency-dollar-pay.svg-VdBplCTx.js +1 -1
  142. package/dist/browser/chunks/money-graph-arrow-increase.svg-DcRov3zk.js +1 -1
  143. package/dist/browser/chunks/money-graph-bar-chart-increase.svg-Cc7KxjX-.js +1 -1
  144. package/dist/browser/chunks/nature-ecology-leaf.svg-DR3cTZxt.js +1 -1
  145. package/dist/browser/chunks/phone-telephone.svg-DyY0gUlk.js +1 -1
  146. package/dist/browser/chunks/programming-bug.svg-BHLT-Qhp.js +1 -1
  147. package/dist/browser/chunks/programming-cloud.svg-B6YW33ba.js +1 -1
  148. package/dist/browser/chunks/programming-computer-database-server.svg-B6o5Sdn-.js +1 -1
  149. package/dist/browser/chunks/programming-computer-database.svg-Cl7OVtpJ.js +1 -1
  150. package/dist/browser/chunks/programming-module-four-layout.svg-BQrerL1x.js +1 -1
  151. package/dist/browser/chunks/programming-module-three.svg-B2KTQzBM.js +1 -1
  152. package/dist/browser/chunks/programming-module.svg-CiID7kPm.js +1 -1
  153. package/dist/browser/chunks/programming-script-code.svg-D1M5rtkN.js +1 -1
  154. package/dist/browser/chunks/runtime-core.esm-bundler-Byrbbu5Q.js +1 -1
  155. package/dist/browser/chunks/shopping-cart.svg-BEegiIR9.js +1 -1
  156. package/dist/browser/chunks/shopping-gift-present.svg-BUHwuLix.js +1 -1
  157. package/dist/browser/chunks/shopping-shipping-box-parcel-package.svg-D6fxWdYx.js +1 -1
  158. package/dist/browser/chunks/tag-new-circle.svg-jsg1bGs0.js +1 -1
  159. package/dist/browser/chunks/travel-map-earth-globe.svg-ClbMiU-f.js +1 -1
  160. package/dist/browser/chunks/vendor-BPQqqkn-.js +306 -0
  161. package/dist/browser/standalone.esm.js +20 -20
  162. package/dist/browser/standalone.js +294 -294
  163. package/dist/components/AgentScalar/AgentScalarButton.vue.d.ts.map +1 -1
  164. package/dist/components/AgentScalar/AgentScalarButton.vue.js.map +1 -1
  165. package/dist/components/AgentScalar/AgentScalarButton.vue.script.js +4 -2
  166. package/dist/components/AgentScalar/AgentScalarButton.vue.script.js.map +1 -1
  167. package/dist/components/AgentScalar/AgentScalarDrawer.vue.d.ts.map +1 -1
  168. package/dist/components/AgentScalar/AgentScalarDrawer.vue.js +1 -1
  169. package/dist/components/AgentScalar/AgentScalarDrawer.vue.js.map +1 -1
  170. package/dist/components/AgentScalar/AgentScalarDrawer.vue.script.js +4 -2
  171. package/dist/components/AgentScalar/AgentScalarDrawer.vue.script.js.map +1 -1
  172. package/dist/components/AgentScalar/OpenMCPButton.vue.d.ts.map +1 -1
  173. package/dist/components/AgentScalar/OpenMCPButton.vue.js +1 -1
  174. package/dist/components/AgentScalar/OpenMCPButton.vue.js.map +1 -1
  175. package/dist/components/AgentScalar/OpenMCPButton.vue.script.js +8 -6
  176. package/dist/components/AgentScalar/OpenMCPButton.vue.script.js.map +1 -1
  177. package/dist/components/Anchor/Anchor.vue.d.ts.map +1 -1
  178. package/dist/components/Anchor/Anchor.vue.js.map +1 -1
  179. package/dist/components/Anchor/Anchor.vue.script.js +5 -3
  180. package/dist/components/Anchor/Anchor.vue.script.js.map +1 -1
  181. package/dist/components/Anchor/WithBreadcrumb.vue.d.ts +1 -3
  182. package/dist/components/Anchor/WithBreadcrumb.vue.d.ts.map +1 -1
  183. package/dist/components/Anchor/WithBreadcrumb.vue.js.map +1 -1
  184. package/dist/components/Anchor/WithBreadcrumb.vue.script.js +6 -2
  185. package/dist/components/Anchor/WithBreadcrumb.vue.script.js.map +1 -1
  186. package/dist/components/ApiReference.vue.d.ts.map +1 -1
  187. package/dist/components/ApiReference.vue.js +1 -1
  188. package/dist/components/ApiReference.vue.js.map +1 -1
  189. package/dist/components/ApiReference.vue.script.js +181 -46
  190. package/dist/components/ApiReference.vue.script.js.map +1 -1
  191. package/dist/components/Content/AsyncApi/AsyncApiLabels.vue.d.ts +10 -0
  192. package/dist/components/Content/AsyncApi/AsyncApiLabels.vue.d.ts.map +1 -0
  193. package/dist/components/Content/AsyncApi/AsyncApiLabels.vue.js +9 -0
  194. package/dist/components/Content/AsyncApi/AsyncApiLabels.vue.js.map +1 -0
  195. package/dist/components/Content/AsyncApi/AsyncApiLabels.vue.script.js +47 -0
  196. package/dist/components/Content/AsyncApi/AsyncApiLabels.vue.script.js.map +1 -0
  197. package/dist/components/Content/AsyncApi/AsyncApiTraversedEntry.vue.d.ts.map +1 -1
  198. package/dist/components/Content/AsyncApi/AsyncApiTraversedEntry.vue.js.map +1 -1
  199. package/dist/components/Content/AsyncApi/AsyncApiTraversedEntry.vue.script.js +2 -0
  200. package/dist/components/Content/AsyncApi/AsyncApiTraversedEntry.vue.script.js.map +1 -1
  201. package/dist/components/Content/AsyncApi/Channel.vue.d.ts +4 -1
  202. package/dist/components/Content/AsyncApi/Channel.vue.d.ts.map +1 -1
  203. package/dist/components/Content/AsyncApi/Channel.vue.js +1 -1
  204. package/dist/components/Content/AsyncApi/Channel.vue.js.map +1 -1
  205. package/dist/components/Content/AsyncApi/Channel.vue.script.js +98 -44
  206. package/dist/components/Content/AsyncApi/Channel.vue.script.js.map +1 -1
  207. package/dist/components/Content/AsyncApi/Message.vue.d.ts +18 -0
  208. package/dist/components/Content/AsyncApi/Message.vue.d.ts.map +1 -0
  209. package/dist/components/Content/AsyncApi/Message.vue.js +9 -0
  210. package/dist/components/Content/AsyncApi/Message.vue.js.map +1 -0
  211. package/dist/components/Content/AsyncApi/Message.vue.script.js +159 -0
  212. package/dist/components/Content/AsyncApi/Message.vue.script.js.map +1 -0
  213. package/dist/components/Content/AsyncApi/Operation.vue.d.ts +18 -0
  214. package/dist/components/Content/AsyncApi/Operation.vue.d.ts.map +1 -0
  215. package/dist/components/Content/AsyncApi/Operation.vue.js +9 -0
  216. package/dist/components/Content/AsyncApi/Operation.vue.js.map +1 -0
  217. package/dist/components/Content/AsyncApi/Operation.vue.script.js +84 -0
  218. package/dist/components/Content/AsyncApi/Operation.vue.script.js.map +1 -0
  219. package/dist/components/Content/AsyncApi/helpers/async-api-render-options.d.ts +14 -0
  220. package/dist/components/Content/AsyncApi/helpers/async-api-render-options.d.ts.map +1 -0
  221. package/dist/components/Content/AsyncApi/helpers/async-api-render-options.js +14 -0
  222. package/dist/components/Content/AsyncApi/helpers/async-api-render-options.js.map +1 -0
  223. package/dist/components/Content/AsyncApi/helpers/filter-children-by-type.d.ts +9 -0
  224. package/dist/components/Content/AsyncApi/helpers/filter-children-by-type.d.ts.map +1 -0
  225. package/dist/components/Content/AsyncApi/helpers/filter-children-by-type.js +12 -0
  226. package/dist/components/Content/AsyncApi/helpers/filter-children-by-type.js.map +1 -0
  227. package/dist/components/Content/AsyncApi/helpers/get-async-api-labels.d.ts +13 -0
  228. package/dist/components/Content/AsyncApi/helpers/get-async-api-labels.d.ts.map +1 -0
  229. package/dist/components/Content/AsyncApi/helpers/get-async-api-labels.js +23 -0
  230. package/dist/components/Content/AsyncApi/helpers/get-async-api-labels.js.map +1 -0
  231. package/dist/components/Content/AsyncApi/helpers/pick-heading.d.ts +10 -0
  232. package/dist/components/Content/AsyncApi/helpers/pick-heading.d.ts.map +1 -0
  233. package/dist/components/Content/AsyncApi/helpers/pick-heading.js +20 -0
  234. package/dist/components/Content/AsyncApi/helpers/pick-heading.js.map +1 -0
  235. package/dist/components/Content/AsyncApi/helpers/resolve-async-api-nodes.d.ts +21 -0
  236. package/dist/components/Content/AsyncApi/helpers/resolve-async-api-nodes.d.ts.map +1 -0
  237. package/dist/components/Content/AsyncApi/helpers/resolve-async-api-nodes.js +35 -0
  238. package/dist/components/Content/AsyncApi/helpers/resolve-async-api-nodes.js.map +1 -0
  239. package/dist/components/Content/Auth/Auth.vue.d.ts.map +1 -1
  240. package/dist/components/Content/Auth/Auth.vue.js.map +1 -1
  241. package/dist/components/Content/Auth/Auth.vue.script.js +5 -2
  242. package/dist/components/Content/Auth/Auth.vue.script.js.map +1 -1
  243. package/dist/components/Content/Content.vue.d.ts +1 -0
  244. package/dist/components/Content/Content.vue.d.ts.map +1 -1
  245. package/dist/components/Content/Content.vue.js.map +1 -1
  246. package/dist/components/Content/Content.vue.script.js +4 -1
  247. package/dist/components/Content/Content.vue.script.js.map +1 -1
  248. package/dist/components/Content/Operations/TraversedEntry.vue.d.ts +3 -1
  249. package/dist/components/Content/Operations/TraversedEntry.vue.d.ts.map +1 -1
  250. package/dist/components/Content/Operations/TraversedEntry.vue.js.map +1 -1
  251. package/dist/components/Content/Operations/TraversedEntry.vue.script.js +9 -0
  252. package/dist/components/Content/Operations/TraversedEntry.vue.script.js.map +1 -1
  253. package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
  254. package/dist/components/Content/Schema/Schema.vue.js +1 -1
  255. package/dist/components/Content/Schema/Schema.vue.js.map +1 -1
  256. package/dist/components/Content/Schema/Schema.vue.script.js +10 -6
  257. package/dist/components/Content/Schema/Schema.vue.script.js.map +1 -1
  258. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
  259. package/dist/components/Content/Schema/SchemaComposition.vue.js.map +1 -1
  260. package/dist/components/Content/Schema/SchemaComposition.vue.script.js +25 -12
  261. package/dist/components/Content/Schema/SchemaComposition.vue.script.js.map +1 -1
  262. package/dist/components/Content/Schema/SchemaEnums.vue.d.ts.map +1 -1
  263. package/dist/components/Content/Schema/SchemaEnums.vue.js +1 -1
  264. package/dist/components/Content/Schema/SchemaEnums.vue.js.map +1 -1
  265. package/dist/components/Content/Schema/SchemaEnums.vue.script.js +4 -2
  266. package/dist/components/Content/Schema/SchemaEnums.vue.script.js.map +1 -1
  267. package/dist/components/Content/Schema/SchemaHeading.vue.d.ts.map +1 -1
  268. package/dist/components/Content/Schema/SchemaHeading.vue.js +1 -1
  269. package/dist/components/Content/Schema/SchemaHeading.vue.js.map +1 -1
  270. package/dist/components/Content/Schema/SchemaHeading.vue.script.js +6 -4
  271. package/dist/components/Content/Schema/SchemaHeading.vue.script.js.map +1 -1
  272. package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.js.map +1 -1
  273. package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.script.js +1 -1
  274. package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.script.js.map +1 -1
  275. package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts.map +1 -1
  276. package/dist/components/Content/Schema/SchemaObjectProperties.vue.js.map +1 -1
  277. package/dist/components/Content/Schema/SchemaObjectProperties.vue.script.js +12 -0
  278. package/dist/components/Content/Schema/SchemaObjectProperties.vue.script.js.map +1 -1
  279. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +3 -1
  280. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  281. package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
  282. package/dist/components/Content/Schema/SchemaProperty.vue.js.map +1 -1
  283. package/dist/components/Content/Schema/SchemaProperty.vue.script.js +24 -6
  284. package/dist/components/Content/Schema/SchemaProperty.vue.script.js.map +1 -1
  285. package/dist/components/Content/Schema/SchemaPropertyDefault.vue.d.ts.map +1 -1
  286. package/dist/components/Content/Schema/SchemaPropertyDefault.vue.js +1 -1
  287. package/dist/components/Content/Schema/SchemaPropertyDefault.vue.js.map +1 -1
  288. package/dist/components/Content/Schema/SchemaPropertyDefault.vue.script.js +8 -5
  289. package/dist/components/Content/Schema/SchemaPropertyDefault.vue.script.js.map +1 -1
  290. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.d.ts.map +1 -1
  291. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js +1 -1
  292. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js.map +1 -1
  293. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.script.js +5 -3
  294. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.script.js.map +1 -1
  295. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts +3 -1
  296. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
  297. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +1 -1
  298. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js.map +1 -1
  299. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.script.js +47 -22
  300. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.script.js.map +1 -1
  301. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts.map +1 -1
  302. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +10 -9
  303. package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js.map +1 -1
  304. package/dist/components/Content/Tags/components/ModernLayout.vue.d.ts.map +1 -1
  305. package/dist/components/Content/Tags/components/ModernLayout.vue.js +1 -1
  306. package/dist/components/Content/Tags/components/ModernLayout.vue.js.map +1 -1
  307. package/dist/components/Content/Tags/components/ModernLayout.vue.script.js +3 -1
  308. package/dist/components/Content/Tags/components/ModernLayout.vue.script.js.map +1 -1
  309. package/dist/components/Content/Tags/components/TagSection.vue.d.ts.map +1 -1
  310. package/dist/components/Content/Tags/components/TagSection.vue.js.map +1 -1
  311. package/dist/components/Content/Tags/components/TagSection.vue.script.js +3 -1
  312. package/dist/components/Content/Tags/components/TagSection.vue.script.js.map +1 -1
  313. package/dist/components/GettingStarted.vue.d.ts.map +1 -1
  314. package/dist/components/GettingStarted.vue.js +1 -1
  315. package/dist/components/GettingStarted.vue.js.map +1 -1
  316. package/dist/components/GettingStarted.vue.script.js +58 -21
  317. package/dist/components/GettingStarted.vue.script.js.map +1 -1
  318. package/dist/components/MobileHeader.vue.d.ts.map +1 -1
  319. package/dist/components/MobileHeader.vue.js.map +1 -1
  320. package/dist/components/MobileHeader.vue.script.js +3 -1
  321. package/dist/components/MobileHeader.vue.script.js.map +1 -1
  322. package/dist/components/OperationsList/OperationsList.vue.d.ts.map +1 -1
  323. package/dist/components/OperationsList/OperationsList.vue.js +1 -1
  324. package/dist/components/OperationsList/OperationsList.vue.js.map +1 -1
  325. package/dist/components/OperationsList/OperationsList.vue.script.js +4 -2
  326. package/dist/components/OperationsList/OperationsList.vue.script.js.map +1 -1
  327. package/dist/components/ShowMoreButton.vue.d.ts.map +1 -1
  328. package/dist/components/ShowMoreButton.vue.js +1 -1
  329. package/dist/components/ShowMoreButton.vue.js.map +1 -1
  330. package/dist/components/ShowMoreButton.vue.script.js +4 -2
  331. package/dist/components/ShowMoreButton.vue.script.js.map +1 -1
  332. package/dist/features/Operation/Operation.vue.d.ts +3 -1
  333. package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
  334. package/dist/features/Operation/Operation.vue.js.map +1 -1
  335. package/dist/features/Operation/Operation.vue.script.js +6 -1
  336. package/dist/features/Operation/Operation.vue.script.js.map +1 -1
  337. package/dist/features/Operation/components/ContentTypeSelect.vue.d.ts.map +1 -1
  338. package/dist/features/Operation/components/ContentTypeSelect.vue.js.map +1 -1
  339. package/dist/features/Operation/components/ContentTypeSelect.vue.script.js +4 -2
  340. package/dist/features/Operation/components/ContentTypeSelect.vue.script.js.map +1 -1
  341. package/dist/features/Operation/components/Headers.vue.d.ts.map +1 -1
  342. package/dist/features/Operation/components/Headers.vue.js +1 -1
  343. package/dist/features/Operation/components/Headers.vue.js.map +1 -1
  344. package/dist/features/Operation/components/Headers.vue.script.js +8 -6
  345. package/dist/features/Operation/components/Headers.vue.script.js.map +1 -1
  346. package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
  347. package/dist/features/Operation/components/OperationParameters.vue.js.map +1 -1
  348. package/dist/features/Operation/components/OperationParameters.vue.script.js +8 -6
  349. package/dist/features/Operation/components/OperationParameters.vue.script.js.map +1 -1
  350. package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
  351. package/dist/features/Operation/components/OperationResponses.vue.js.map +1 -1
  352. package/dist/features/Operation/components/OperationResponses.vue.script.js +10 -7
  353. package/dist/features/Operation/components/OperationResponses.vue.script.js.map +1 -1
  354. package/dist/features/Operation/components/ParameterListItem.vue.script.js +1 -1
  355. package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
  356. package/dist/features/Operation/components/RequestBody.vue.js +1 -1
  357. package/dist/features/Operation/components/RequestBody.vue.js.map +1 -1
  358. package/dist/features/Operation/components/RequestBody.vue.script.js +18 -13
  359. package/dist/features/Operation/components/RequestBody.vue.script.js.map +1 -1
  360. package/dist/features/Operation/components/SecurityRequirementBadge.vue.d.ts.map +1 -1
  361. package/dist/features/Operation/components/SecurityRequirementBadge.vue.js.map +1 -1
  362. package/dist/features/Operation/components/SecurityRequirementBadge.vue.script.js +5 -3
  363. package/dist/features/Operation/components/SecurityRequirementBadge.vue.script.js.map +1 -1
  364. package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -1
  365. package/dist/features/Operation/components/callbacks/Callbacks.vue.js.map +1 -1
  366. package/dist/features/Operation/components/callbacks/Callbacks.vue.script.js +11 -8
  367. package/dist/features/Operation/components/callbacks/Callbacks.vue.script.js.map +1 -1
  368. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  369. package/dist/features/Operation/layouts/ClassicLayout.vue.js +1 -1
  370. package/dist/features/Operation/layouts/ClassicLayout.vue.js.map +1 -1
  371. package/dist/features/Operation/layouts/ClassicLayout.vue.script.js +37 -17
  372. package/dist/features/Operation/layouts/ClassicLayout.vue.script.js.map +1 -1
  373. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  374. package/dist/features/Operation/layouts/ModernLayout.vue.js +1 -1
  375. package/dist/features/Operation/layouts/ModernLayout.vue.js.map +1 -1
  376. package/dist/features/Operation/layouts/ModernLayout.vue.script.js +22 -7
  377. package/dist/features/Operation/layouts/ModernLayout.vue.script.js.map +1 -1
  378. package/dist/features/Search/components/SearchButton.vue.d.ts.map +1 -1
  379. package/dist/features/Search/components/SearchButton.vue.js.map +1 -1
  380. package/dist/features/Search/components/SearchButton.vue.script.js +15 -8
  381. package/dist/features/Search/components/SearchButton.vue.script.js.map +1 -1
  382. package/dist/features/Search/components/SearchModal.vue.d.ts.map +1 -1
  383. package/dist/features/Search/components/SearchModal.vue.js +1 -1
  384. package/dist/features/Search/components/SearchModal.vue.js.map +1 -1
  385. package/dist/features/Search/components/SearchModal.vue.script.js +29 -10
  386. package/dist/features/Search/components/SearchModal.vue.script.js.map +1 -1
  387. package/dist/features/Search/components/SearchResult.vue.d.ts.map +1 -1
  388. package/dist/features/Search/components/SearchResult.vue.js.map +1 -1
  389. package/dist/features/Search/components/SearchResult.vue.script.js +12 -8
  390. package/dist/features/Search/components/SearchResult.vue.script.js.map +1 -1
  391. package/dist/features/Search/helpers/create-search-index.d.ts +8 -0
  392. package/dist/features/Search/helpers/create-search-index.d.ts.map +1 -1
  393. package/dist/features/Search/helpers/create-search-index.js +18 -9
  394. package/dist/features/Search/helpers/create-search-index.js.map +1 -1
  395. package/dist/features/Search/hooks/useSearchIndex.d.ts +7 -1
  396. package/dist/features/Search/hooks/useSearchIndex.d.ts.map +1 -1
  397. package/dist/features/Search/hooks/useSearchIndex.js +11 -2
  398. package/dist/features/Search/hooks/useSearchIndex.js.map +1 -1
  399. package/dist/features/ask-agent-button/AskAgentButton.vue.d.ts.map +1 -1
  400. package/dist/features/ask-agent-button/AskAgentButton.vue.js +1 -1
  401. package/dist/features/ask-agent-button/AskAgentButton.vue.js.map +1 -1
  402. package/dist/features/ask-agent-button/AskAgentButton.vue.script.js +10 -6
  403. package/dist/features/ask-agent-button/AskAgentButton.vue.script.js.map +1 -1
  404. package/dist/features/developer-tools/DeveloperTools.vue.d.ts.map +1 -1
  405. package/dist/features/developer-tools/DeveloperTools.vue.js.map +1 -1
  406. package/dist/features/developer-tools/DeveloperTools.vue.script.js +10 -8
  407. package/dist/features/developer-tools/DeveloperTools.vue.script.js.map +1 -1
  408. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.d.ts.map +1 -1
  409. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.js.map +1 -1
  410. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.script.js +11 -11
  411. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.script.js.map +1 -1
  412. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.d.ts.map +1 -1
  413. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.js.map +1 -1
  414. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.script.js +15 -11
  415. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.script.js.map +1 -1
  416. package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.script.js +1 -1
  417. package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.d.ts +1 -3
  418. package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.d.ts.map +1 -1
  419. package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.js.map +1 -1
  420. package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.script.js +4 -6
  421. package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.script.js.map +1 -1
  422. package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.d.ts.map +1 -1
  423. package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.js.map +1 -1
  424. package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.script.js +6 -4
  425. package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.script.js.map +1 -1
  426. package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.d.ts.map +1 -1
  427. package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.js.map +1 -1
  428. package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.script.js +23 -22
  429. package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.script.js.map +1 -1
  430. package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.d.ts.map +1 -1
  431. package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.js.map +1 -1
  432. package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.script.js +7 -5
  433. package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.script.js.map +1 -1
  434. package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.d.ts.map +1 -1
  435. package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.js.map +1 -1
  436. package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.script.js +9 -7
  437. package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.script.js.map +1 -1
  438. package/dist/features/developer-tools/components/DeployApiReference.vue.d.ts.map +1 -1
  439. package/dist/features/developer-tools/components/DeployApiReference.vue.js.map +1 -1
  440. package/dist/features/developer-tools/components/DeployApiReference.vue.script.js +7 -4
  441. package/dist/features/developer-tools/components/DeployApiReference.vue.script.js.map +1 -1
  442. package/dist/features/developer-tools/components/ModifyConfiguration.vue.d.ts.map +1 -1
  443. package/dist/features/developer-tools/components/ModifyConfiguration.vue.js.map +1 -1
  444. package/dist/features/developer-tools/components/ModifyConfiguration.vue.script.js +8 -6
  445. package/dist/features/developer-tools/components/ModifyConfiguration.vue.script.js.map +1 -1
  446. package/dist/features/developer-tools/components/ShareApiReference.vue.d.ts.map +1 -1
  447. package/dist/features/developer-tools/components/ShareApiReference.vue.js.map +1 -1
  448. package/dist/features/developer-tools/components/ShareApiReference.vue.script.js +7 -4
  449. package/dist/features/developer-tools/components/ShareApiReference.vue.script.js.map +1 -1
  450. package/dist/features/example-responses/ExampleResponse.vue.d.ts.map +1 -1
  451. package/dist/features/example-responses/ExampleResponse.vue.js +1 -1
  452. package/dist/features/example-responses/ExampleResponse.vue.js.map +1 -1
  453. package/dist/features/example-responses/ExampleResponse.vue.script.js +5 -3
  454. package/dist/features/example-responses/ExampleResponse.vue.script.js.map +1 -1
  455. package/dist/features/example-responses/ExampleResponses.vue.d.ts +9 -0
  456. package/dist/features/example-responses/ExampleResponses.vue.d.ts.map +1 -1
  457. package/dist/features/example-responses/ExampleResponses.vue.js +1 -1
  458. package/dist/features/example-responses/ExampleResponses.vue.js.map +1 -1
  459. package/dist/features/example-responses/ExampleResponses.vue.script.js +42 -23
  460. package/dist/features/example-responses/ExampleResponses.vue.script.js.map +1 -1
  461. package/dist/features/example-responses/ExampleSchema.vue.js.map +1 -1
  462. package/dist/features/example-responses/ExampleSchema.vue.script.js +1 -1
  463. package/dist/features/example-responses/ExampleSchema.vue.script.js.map +1 -1
  464. package/dist/features/info-object/Contact.vue.d.ts.map +1 -1
  465. package/dist/features/info-object/Contact.vue.js.map +1 -1
  466. package/dist/features/info-object/Contact.vue.script.js +14 -11
  467. package/dist/features/info-object/Contact.vue.script.js.map +1 -1
  468. package/dist/features/info-object/InfoLink.vue.d.ts +8 -0
  469. package/dist/features/info-object/InfoLink.vue.d.ts.map +1 -0
  470. package/dist/features/info-object/InfoLink.vue.js +7 -0
  471. package/dist/features/info-object/InfoLink.vue.js.map +1 -0
  472. package/dist/features/info-object/InfoLink.vue.script.js +30 -0
  473. package/dist/features/info-object/InfoLink.vue.script.js.map +1 -0
  474. package/dist/features/info-object/TermsOfService.vue.d.ts.map +1 -1
  475. package/dist/features/info-object/TermsOfService.vue.js.map +1 -1
  476. package/dist/features/info-object/TermsOfService.vue.script.js +9 -6
  477. package/dist/features/info-object/TermsOfService.vue.script.js.map +1 -1
  478. package/dist/features/info-object/index.d.ts +1 -0
  479. package/dist/features/info-object/index.d.ts.map +1 -1
  480. package/dist/features/localization/index.d.ts +2 -0
  481. package/dist/features/localization/index.d.ts.map +1 -0
  482. package/dist/features/localization/locales/ar.d.ts +227 -0
  483. package/dist/features/localization/locales/ar.d.ts.map +1 -0
  484. package/dist/features/localization/locales/ar.js +225 -0
  485. package/dist/features/localization/locales/ar.js.map +1 -0
  486. package/dist/features/localization/locales/de.d.ts +227 -0
  487. package/dist/features/localization/locales/de.d.ts.map +1 -0
  488. package/dist/features/localization/locales/de.js +225 -0
  489. package/dist/features/localization/locales/de.js.map +1 -0
  490. package/dist/features/localization/locales/en.d.ts +227 -0
  491. package/dist/features/localization/locales/en.d.ts.map +1 -0
  492. package/dist/features/localization/locales/en.js +225 -0
  493. package/dist/features/localization/locales/en.js.map +1 -0
  494. package/dist/features/localization/locales/es.d.ts +227 -0
  495. package/dist/features/localization/locales/es.d.ts.map +1 -0
  496. package/dist/features/localization/locales/es.js +225 -0
  497. package/dist/features/localization/locales/es.js.map +1 -0
  498. package/dist/features/localization/locales/fr.d.ts +227 -0
  499. package/dist/features/localization/locales/fr.d.ts.map +1 -0
  500. package/dist/features/localization/locales/fr.js +225 -0
  501. package/dist/features/localization/locales/fr.js.map +1 -0
  502. package/dist/features/localization/locales/ru.d.ts +227 -0
  503. package/dist/features/localization/locales/ru.d.ts.map +1 -0
  504. package/dist/features/localization/locales/ru.js +225 -0
  505. package/dist/features/localization/locales/ru.js.map +1 -0
  506. package/dist/features/localization/locales/zh-cn.d.ts +227 -0
  507. package/dist/features/localization/locales/zh-cn.d.ts.map +1 -0
  508. package/dist/features/localization/locales/zh-cn.js +225 -0
  509. package/dist/features/localization/locales/zh-cn.js.map +1 -0
  510. package/dist/features/localization/translations.d.ts +1588 -0
  511. package/dist/features/localization/translations.d.ts.map +1 -0
  512. package/dist/features/localization/translations.js +27 -0
  513. package/dist/features/localization/translations.js.map +1 -0
  514. package/dist/features/localization/use-localization.d.ts +18 -0
  515. package/dist/features/localization/use-localization.d.ts.map +1 -0
  516. package/dist/features/localization/use-localization.js +58 -0
  517. package/dist/features/localization/use-localization.js.map +1 -0
  518. package/dist/features/multiple-documents/DocumentSelector.vue.script.js +1 -1
  519. package/dist/features/test-request-button/TestRequestButton.vue.d.ts.map +1 -1
  520. package/dist/features/test-request-button/TestRequestButton.vue.js +1 -1
  521. package/dist/features/test-request-button/TestRequestButton.vue.js.map +1 -1
  522. package/dist/features/test-request-button/TestRequestButton.vue.script.js +3 -1
  523. package/dist/features/test-request-button/TestRequestButton.vue.script.js.map +1 -1
  524. package/dist/helpers/get-async-api-message-payload-schema.d.ts +18 -0
  525. package/dist/helpers/get-async-api-message-payload-schema.d.ts.map +1 -0
  526. package/dist/helpers/get-async-api-message-payload-schema.js +33 -0
  527. package/dist/helpers/get-async-api-message-payload-schema.js.map +1 -0
  528. package/dist/helpers/get-async-api-model-schema.d.ts.map +1 -1
  529. package/dist/helpers/get-async-api-model-schema.js +2 -11
  530. package/dist/helpers/get-async-api-model-schema.js.map +1 -1
  531. package/dist/helpers/is-introduction-entry.d.ts +16 -0
  532. package/dist/helpers/is-introduction-entry.d.ts.map +1 -0
  533. package/dist/helpers/is-introduction-entry.js +17 -0
  534. package/dist/helpers/is-introduction-entry.js.map +1 -0
  535. package/dist/helpers/load-from-perssistance.js +1 -1
  536. package/dist/helpers/load-from-perssistance.js.map +1 -1
  537. package/dist/helpers/map-config-plugins.d.ts +8 -3
  538. package/dist/helpers/map-config-plugins.d.ts.map +1 -1
  539. package/dist/helpers/map-config-plugins.js +22 -4
  540. package/dist/helpers/map-config-plugins.js.map +1 -1
  541. package/dist/helpers/map-config-to-workspace-store.js +1 -1
  542. package/dist/helpers/map-config-to-workspace-store.js.map +1 -1
  543. package/dist/helpers/storage.d.ts +14 -14
  544. package/dist/style.css +783 -666
  545. package/dist/styles/tailwind.config.css +1 -0
  546. package/dist/vue-styles.css +700 -597
  547. package/package.json +18 -17
  548. package/dist/browser/chunks/AgentScalarChatInterface-CesFQ_Ax.js +0 -27
  549. package/dist/browser/chunks/ScalarTextInput.vue-C14zmVNI.js +0 -27
  550. package/dist/browser/chunks/modal-BZzcBkVp.js +0 -99
  551. package/dist/browser/chunks/vendor-wW8jg8wN.js +0 -306
  552. package/dist/features/Operation/helpers/get-first-server.d.ts +0 -9
  553. package/dist/features/Operation/helpers/get-first-server.d.ts.map +0 -1
  554. package/dist/features/Operation/helpers/get-first-server.js +0 -27
  555. package/dist/features/Operation/helpers/get-first-server.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaObjectProperties.vue.script.js","names":[],"sources":["../../../../src/components/Content/Schema/SchemaObjectProperties.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { resolve } from '@scalar/workspace-store/resolve'\nimport type {\n DiscriminatorObject,\n SchemaObject,\n SchemaReferenceType,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport { isTypeObject } from '@/components/Content/Schema/helpers/is-type-object'\nimport { getCycleKey } from '@/components/Content/Schema/helpers/schema-cycle'\nimport { sortPropertyNames } from '@/components/Content/Schema/helpers/sort-property-names'\nimport type { SchemaOptions } from '@/components/Content/Schema/types'\n\nimport SchemaProperty from './SchemaProperty.vue'\n\nconst { schema, discriminator, options, schemaContext, compositionPath } =\n defineProps<{\n schema: SchemaObject\n discriminator?: DiscriminatorObject\n compact?: boolean\n hideHeading?: boolean\n level?: number\n hideModelNames?: boolean\n breadcrumb?: string[]\n eventBus: WorkspaceEventBus | null\n options: SchemaOptions\n schemaContext?: string\n compositionPath?: string[]\n }>()\n\n/**\n * Sorts properties by required status first, then alphabetically.\n * Required properties appear first, followed by optional properties.\n */\nconst sortedProperties = computed(() =>\n sortPropertyNames(schema, discriminator, options),\n)\n\n/**\n * Get the display name for additional properties.\n *\n * Checks x-additionalPropertiesName extension first, then falls back to the\n * propertyNames schema title if available.\n */\nconst getAdditionalPropertiesName = (\n _additionalProperties: Extract<\n SchemaObject,\n { type: 'object' }\n >['additionalProperties'],\n _propertyNames?: Extract<SchemaObject, { type: 'object' }>['propertyNames'],\n) => {\n const additionalProperties =\n typeof _additionalProperties === 'boolean'\n ? _additionalProperties\n : resolve.schema(_additionalProperties)\n\n if (\n typeof additionalProperties === 'object' &&\n typeof additionalProperties['x-additionalPropertiesName'] === 'string' &&\n additionalProperties['x-additionalPropertiesName'].trim().length > 0\n ) {\n return `${additionalProperties['x-additionalPropertiesName'].trim()}`\n }\n\n // Fall back to the propertyNames title when available\n if (_propertyNames) {\n const resolved = resolve.schema(_propertyNames)\n if (resolved?.title) {\n return resolved.title\n }\n }\n\n return 'propertyName'\n}\n\n/**\n * Extract enum values from the propertyNames schema.\n *\n * JSON Schema's propertyNames keyword constrains which keys are valid\n * in an object with additionalProperties. When it contains an enum,\n * these are the allowed key names.\n */\nconst getPropertyNamesEnum = (\n _propertyNames?: Extract<SchemaObject, { type: 'object' }>['propertyNames'],\n): string[] | undefined => {\n if (!_propertyNames) {\n return undefined\n }\n\n const resolved = resolve.schema(_propertyNames)\n if (\n resolved &&\n 'enum' in resolved &&\n Array.isArray(resolved.enum) &&\n resolved.enum.length > 0\n ) {\n return resolved.enum as string[]\n }\n\n return undefined\n}\n\n/** Enum values for the property keys, derived from propertyNames if present. */\nconst additionalPropertiesEnum = computed(() => {\n if (!isTypeObject(schema) || !schema.additionalProperties) {\n return undefined\n }\n return getPropertyNamesEnum(schema.propertyNames)\n})\n\n/**\n * Keep sibling property descriptions separate from the referenced schema.\n *\n * This allows us to render both:\n * - the property-specific description written next to the $ref, and\n * - the referenced schema's own description (for example discriminator parent docs)\n */\nconst getPropertySchema = (\n property: SchemaReferenceType<SchemaObject> | undefined,\n): SchemaObject | undefined => {\n if (!property) {\n return undefined\n }\n return resolve.schema(property)\n}\n\nconst getPropertyDescription = (\n property: SchemaReferenceType<SchemaObject> | undefined,\n): string | undefined => {\n if (!property) {\n return undefined\n }\n\n return typeof property.description === 'string'\n ? property.description\n : undefined\n}\n\n/**\n * Get the value for additional properties.\n *\n * When additionalProperties is true or an empty object, it should render as { type: 'anything' }.\n * $ref values are resolved before the type check so the referenced schema is rendered correctly.\n */\nconst getAdditionalPropertiesValue = (\n additionalProperties: Extract<\n SchemaObject,\n { type: 'object' }\n >['additionalProperties'],\n): SchemaObject => {\n // Resolve $ref first so the type check below works on the actual schema\n const resolved =\n typeof additionalProperties === 'boolean'\n ? additionalProperties\n : resolve.schema(additionalProperties)\n\n if (\n resolved === true ||\n (typeof resolved === 'object' && Object.keys(resolved).length === 0) ||\n typeof resolved !== 'object' ||\n !('type' in resolved)\n ) {\n return {\n // @ts-expect-error - ask hans\n type: 'anything',\n ...(typeof resolved === 'object' ? resolved : {}),\n }\n }\n\n return resolved\n}\n</script>\n\n<template>\n <!-- Properties -->\n <template v-if=\"isTypeObject(schema) && schema.properties\">\n <SchemaProperty\n v-for=\"property in sortedProperties\"\n :key=\"property\"\n :breadcrumb\n :compact\n :compositionPath=\"compositionPath\"\n :compositionPathSegment=\"property\"\n :cycleKey=\"getCycleKey(schema.properties[property])\"\n :description=\"getPropertyDescription(schema.properties[property])\"\n :discriminator\n :eventBus=\"eventBus\"\n :hideHeading\n :hideModelNames\n :level\n :name=\"property\"\n :options=\"options\"\n :required=\"schema.required?.includes(property)\"\n :schema=\"getPropertySchema(schema.properties[property])\"\n :schemaContext=\"schemaContext\" />\n </template>\n\n <!-- patternProperties -->\n <template v-if=\"isTypeObject(schema) && schema.patternProperties\">\n <SchemaProperty\n v-for=\"[key, property] in Object.entries(schema.patternProperties)\"\n :key=\"key\"\n :breadcrumb\n :compact\n :compositionPath=\"compositionPath\"\n :compositionPathSegment=\"key\"\n :cycleKey=\"getCycleKey(property)\"\n :description=\"getPropertyDescription(property)\"\n :discriminator\n :eventBus=\"eventBus\"\n :hideHeading\n :hideModelNames=\"hideModelNames\"\n :level\n :name=\"key\"\n :options=\"options\"\n :schema=\"getPropertySchema(property)\"\n :schemaContext=\"schemaContext\" />\n </template>\n\n <!-- additionalProperties -->\n <template v-if=\"isTypeObject(schema) && schema.additionalProperties\">\n <SchemaProperty\n :breadcrumb\n :compact\n :compositionPath=\"compositionPath\"\n :compositionPathSegment=\"\n getAdditionalPropertiesName(\n schema.additionalProperties,\n schema.propertyNames,\n )\n \"\n :cycleKey=\"getCycleKey(schema.additionalProperties)\"\n :discriminator\n :eventBus=\"eventBus\"\n :hideHeading\n :hideModelNames\n :level\n :name=\"\n getAdditionalPropertiesName(\n schema.additionalProperties,\n schema.propertyNames,\n )\n \"\n noncollapsible\n :options=\"options\"\n :propertyNamesEnum=\"additionalPropertiesEnum\"\n :schema=\"getAdditionalPropertiesValue(schema.additionalProperties)\"\n :schemaContext=\"schemaContext\"\n variant=\"additionalProperties\" />\n </template>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;EAoCA,MAAM,mBAAmB,eACvB,kBAAkB,QAAA,QAAQ,QAAA,eAAe,QAAA,QAAQ,CACnD;;;;;;;EAQA,MAAM,+BACJ,uBAIA,mBACG;GACH,MAAM,uBACJ,OAAO,0BAA0B,YAC7B,wBACA,QAAQ,OAAO,sBAAqB;AAE1C,OACE,OAAO,yBAAyB,YAChC,OAAO,qBAAqB,kCAAkC,YAC9D,qBAAqB,8BAA8B,MAAM,CAAC,SAAS,EAEnE,QAAO,GAAG,qBAAqB,8BAA8B,MAAM;AAIrE,OAAI,gBAAgB;IAClB,MAAM,WAAW,QAAQ,OAAO,eAAc;AAC9C,QAAI,UAAU,MACZ,QAAO,SAAS;;AAIpB,UAAO;;;;;;;;;EAUT,MAAM,wBACJ,mBACyB;AACzB,OAAI,CAAC,eACH;GAGF,MAAM,WAAW,QAAQ,OAA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":["../../../../src/components/Content/Schema/SchemaObjectProperties.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { resolve } from '@scalar/workspace-store/resolve'\nimport type {\n DiscriminatorObject,\n SchemaObject,\n SchemaReferenceType,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport { isTypeObject } from '@/components/Content/Schema/helpers/is-type-object'\nimport { getCycleKey } from '@/components/Content/Schema/helpers/schema-cycle'\nimport { sortPropertyNames } from '@/components/Content/Schema/helpers/sort-property-names'\nimport type { SchemaOptions } from '@/components/Content/Schema/types'\n\nimport SchemaProperty from './SchemaProperty.vue'\n\nconst { schema, discriminator, options, schemaContext, compositionPath } =\n defineProps<{\n schema: SchemaObject\n discriminator?: DiscriminatorObject\n compact?: boolean\n hideHeading?: boolean\n level?: number\n hideModelNames?: boolean\n breadcrumb?: string[]\n eventBus: WorkspaceEventBus | null\n options: SchemaOptions\n schemaContext?: string\n compositionPath?: string[]\n }>()\n\n/**\n * Sorts properties by required status first, then alphabetically.\n * Required properties appear first, followed by optional properties.\n */\nconst sortedProperties = computed(() =>\n sortPropertyNames(schema, discriminator, options),\n)\n\n/**\n * Get the display name for additional properties.\n *\n * Checks x-additionalPropertiesName extension first, then falls back to the\n * propertyNames schema title if available.\n */\nconst getAdditionalPropertiesName = (\n _additionalProperties: Extract<\n SchemaObject,\n { type: 'object' }\n >['additionalProperties'],\n _propertyNames?: Extract<SchemaObject, { type: 'object' }>['propertyNames'],\n) => {\n const additionalProperties =\n typeof _additionalProperties === 'boolean'\n ? _additionalProperties\n : resolve.schema(_additionalProperties)\n\n if (\n typeof additionalProperties === 'object' &&\n typeof additionalProperties['x-additionalPropertiesName'] === 'string' &&\n additionalProperties['x-additionalPropertiesName'].trim().length > 0\n ) {\n return `${additionalProperties['x-additionalPropertiesName'].trim()}`\n }\n\n // Fall back to the propertyNames title when available\n if (_propertyNames) {\n const resolved = resolve.schema(_propertyNames)\n if (resolved?.title) {\n return resolved.title\n }\n }\n\n return 'propertyName'\n}\n\n/**\n * Extract enum values from the propertyNames schema.\n *\n * JSON Schema's propertyNames keyword constrains which keys are valid\n * in an object with additionalProperties. When it contains an enum,\n * these are the allowed key names.\n */\nconst getPropertyNamesEnum = (\n _propertyNames?: Extract<SchemaObject, { type: 'object' }>['propertyNames'],\n): string[] | undefined => {\n if (!_propertyNames) {\n return undefined\n }\n\n const resolved = resolve.schema(_propertyNames)\n if (\n resolved &&\n 'enum' in resolved &&\n Array.isArray(resolved.enum) &&\n resolved.enum.length > 0\n ) {\n return resolved.enum as string[]\n }\n\n return undefined\n}\n\n/** Enum values for the property keys, derived from propertyNames if present. */\nconst additionalPropertiesEnum = computed(() => {\n if (!isTypeObject(schema) || !schema.additionalProperties) {\n return undefined\n }\n return getPropertyNamesEnum(schema.propertyNames)\n})\n\n/**\n * The resolved propertyNames schema for the property keys.\n *\n * Surfaces key constraints such as `format` (for example `uuid`) so they are\n * not lost when rendering a map of additional properties.\n */\nconst additionalPropertiesKeySchema = computed(() => {\n if (!isTypeObject(schema) || !schema.additionalProperties) {\n return undefined\n }\n return schema.propertyNames ? resolve.schema(schema.propertyNames) : undefined\n})\n\n/**\n * Keep sibling property descriptions separate from the referenced schema.\n *\n * This allows us to render both:\n * - the property-specific description written next to the $ref, and\n * - the referenced schema's own description (for example discriminator parent docs)\n */\nconst getPropertySchema = (\n property: SchemaReferenceType<SchemaObject> | undefined,\n): SchemaObject | undefined => {\n if (!property) {\n return undefined\n }\n return resolve.schema(property)\n}\n\nconst getPropertyDescription = (\n property: SchemaReferenceType<SchemaObject> | undefined,\n): string | undefined => {\n if (!property) {\n return undefined\n }\n\n return typeof property.description === 'string'\n ? property.description\n : undefined\n}\n\n/**\n * Get the value for additional properties.\n *\n * When additionalProperties is true or an empty object, it should render as { type: 'anything' }.\n * $ref values are resolved before the type check so the referenced schema is rendered correctly.\n */\nconst getAdditionalPropertiesValue = (\n additionalProperties: Extract<\n SchemaObject,\n { type: 'object' }\n >['additionalProperties'],\n): SchemaObject => {\n // Resolve $ref first so the type check below works on the actual schema\n const resolved =\n typeof additionalProperties === 'boolean'\n ? additionalProperties\n : resolve.schema(additionalProperties)\n\n if (\n resolved === true ||\n (typeof resolved === 'object' && Object.keys(resolved).length === 0) ||\n typeof resolved !== 'object' ||\n !('type' in resolved)\n ) {\n return {\n // @ts-expect-error - ask hans\n type: 'anything',\n ...(typeof resolved === 'object' ? resolved : {}),\n }\n }\n\n return resolved\n}\n</script>\n\n<template>\n <!-- Properties -->\n <template v-if=\"isTypeObject(schema) && schema.properties\">\n <SchemaProperty\n v-for=\"property in sortedProperties\"\n :key=\"property\"\n :breadcrumb\n :compact\n :compositionPath=\"compositionPath\"\n :compositionPathSegment=\"property\"\n :cycleKey=\"getCycleKey(schema.properties[property])\"\n :description=\"getPropertyDescription(schema.properties[property])\"\n :discriminator\n :eventBus=\"eventBus\"\n :hideHeading\n :hideModelNames\n :level\n :name=\"property\"\n :options=\"options\"\n :required=\"schema.required?.includes(property)\"\n :schema=\"getPropertySchema(schema.properties[property])\"\n :schemaContext=\"schemaContext\" />\n </template>\n\n <!-- patternProperties -->\n <template v-if=\"isTypeObject(schema) && schema.patternProperties\">\n <SchemaProperty\n v-for=\"[key, property] in Object.entries(schema.patternProperties)\"\n :key=\"key\"\n :breadcrumb\n :compact\n :compositionPath=\"compositionPath\"\n :compositionPathSegment=\"key\"\n :cycleKey=\"getCycleKey(property)\"\n :description=\"getPropertyDescription(property)\"\n :discriminator\n :eventBus=\"eventBus\"\n :hideHeading\n :hideModelNames=\"hideModelNames\"\n :level\n :name=\"key\"\n :options=\"options\"\n :schema=\"getPropertySchema(property)\"\n :schemaContext=\"schemaContext\" />\n </template>\n\n <!-- additionalProperties -->\n <template v-if=\"isTypeObject(schema) && schema.additionalProperties\">\n <SchemaProperty\n :breadcrumb\n :compact\n :compositionPath=\"compositionPath\"\n :compositionPathSegment=\"\n getAdditionalPropertiesName(\n schema.additionalProperties,\n schema.propertyNames,\n )\n \"\n :cycleKey=\"getCycleKey(schema.additionalProperties)\"\n :discriminator\n :eventBus=\"eventBus\"\n :hideHeading\n :hideModelNames\n :level\n :name=\"\n getAdditionalPropertiesName(\n schema.additionalProperties,\n schema.propertyNames,\n )\n \"\n noncollapsible\n :options=\"options\"\n :propertyNamesEnum=\"additionalPropertiesEnum\"\n :propertyNamesSchema=\"additionalPropertiesKeySchema\"\n :schema=\"getAdditionalPropertiesValue(schema.additionalProperties)\"\n :schemaContext=\"schemaContext\"\n variant=\"additionalProperties\" />\n </template>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;EAoCA,MAAM,mBAAmB,eACvB,kBAAkB,QAAA,QAAQ,QAAA,eAAe,QAAA,QAAQ,CACnD;;;;;;;EAQA,MAAM,+BACJ,uBAIA,mBACG;GACH,MAAM,uBACJ,OAAO,0BAA0B,YAC7B,wBACA,QAAQ,OAAO,sBAAqB;AAE1C,OACE,OAAO,yBAAyB,YAChC,OAAO,qBAAqB,kCAAkC,YAC9D,qBAAqB,8BAA8B,MAAM,CAAC,SAAS,EAEnE,QAAO,GAAG,qBAAqB,8BAA8B,MAAM;AAIrE,OAAI,gBAAgB;IAClB,MAAM,WAAW,QAAQ,OAAO,eAAc;AAC9C,QAAI,UAAU,MACZ,QAAO,SAAS;;AAIpB,UAAO;;;;;;;;;EAUT,MAAM,wBACJ,mBACyB;AACzB,OAAI,CAAC,eACH;GAGF,MAAM,WAAW,QAAQ,OAAO,eAAc;AAC9C,OACE,YACA,UAAU,YACV,MAAM,QAAQ,SAAS,KAAK,IAC5B,SAAS,KAAK,SAAS,EAEvB,QAAO,SAAS;;;EAOpB,MAAM,2BAA2B,eAAe;AAC9C,OAAI,CAAC,aAAa,QAAA,OAAO,IAAI,CAAC,QAAA,OAAO,qBACnC;AAEF,UAAO,qBAAqB,QAAA,OAAO,cAAa;IACjD;;;;;;;EAQD,MAAM,gCAAgC,eAAe;AACn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;;;;;;;;IAIJ,MAAA,aAAY,CAAC,QAAA,OAAM,IAAK,QAAA,OAAO,qBAAA,UAAA,KAAA,EAC7C,mBAiBmC,UAAA,EAAA,KAAA,GAAA,EAAA,WAhBP,OAAO,QAAQ,QAAA,OAAO,kBAAiB,GAAA,CAAzD,KAAK,cAAQ;yBADvB,YAiBmC,wBAAA;MAf3B;MACL,YAAA,QAAA;MACA,SAAA,QAAA;MACA,iBAAiB,QAAA;MACjB,wBAAwB;MACxB,UAAU,MAAA,YAAW,CAAC,SAAQ;MAC9B,aAAa,uBAAuB,SAAQ;MAC5C,eAAA,QAAA;MACA,UAAU,QAAA;MACV,aAAA,QAAA;MACA,gBAAgB,QAAA;MAChB,OAAA,QAAA;MACA,MAAM;MACN,SAAS,QAAA;MACT,QAAQ,kBAAkB,SAAQ;MAClC,eAAe,QAAA;;;;;;;;;;;;;;;;;;;IAIJ,MAAA,aAAY,CAAC,QAAA,OAAM,IAAK,QAAA,OAAO,wBAAA,WAAA,EAC7C,YA4BmC,wBAAA;;KA3BhC,YAAA,QAAA;KACA,SAAA,QAAA;KACA,iBAAiB,QAAA;KACjB,wBAAiC,4BAAuC,QAAA,OAAO,sBAAgC,QAAA,OAAO,cAAA;KAMtH,UAAU,MAAA,YAAW,CAAC,QAAA,OAAO,qBAAoB;KACjD,eAAA,QAAA;KACA,UAAU,QAAA;KACV,aAAA,QAAA;KACA,gBAAA,QAAA;KACA,OAAA,QAAA;KACA,MAAe,4BAAuC,QAAA,OAAO,sBAAgC,QAAA,OAAO,cAAA;KAMrG,gBAAA;KACC,SAAS,QAAA;KACT,mBAAmB,yBAAA;KACnB,qBAAqB,8BAAA;KACrB,QAAQ,6BAA6B,QAAA,OAAO,qBAAoB;KAChE,eAAe,QAAA;KAChB,SAAQ"}
@@ -22,6 +22,8 @@ type __VLS_Props = {
22
22
  options: SchemaOptions;
23
23
  /** Enum values for property names (from JSON Schema propertyNames keyword). */
24
24
  propertyNamesEnum?: string[];
25
+ /** Resolved propertyNames schema, used to show key constraints like `format`. */
26
+ propertyNamesSchema?: SchemaObject;
25
27
  /** When "requestBody", composition selection is synced with the example snippet */
26
28
  schemaContext?: string;
27
29
  /** Internal path used to sync nested request body compositions with the code sample */
@@ -32,8 +34,8 @@ type __VLS_Props = {
32
34
  cycleKey?: unknown;
33
35
  };
34
36
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
35
- level: number;
36
37
  required: boolean;
38
+ level: number;
37
39
  compact: boolean;
38
40
  hideModelNames: boolean;
39
41
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaProperty.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaProperty.vue"],"names":[],"mappings":"AA0gBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EACV,mBAAmB,EACnB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAErE,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,KAAK,CAAA;AAK9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAA;AAyBtE,KAAK,WAAW,GAAG;IACf,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACvB,MAAM,EAAE,YAAY,GAAG,SAAS,CAAA;IAChC,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,aAAa,CAAC,EAAE,mBAAmB,CAAA;IACnC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,kGAAkG;IAClG,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,OAAO,CAAC,EAAE,sBAAsB,GAAG,mBAAmB,CAAA;IACtD,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,OAAO,EAAE,aAAa,CAAA;IACtB,+EAA+E;IAC/E,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC5B,mFAAmF;IACnF,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,uFAAuF;IACvF,eAAe,CAAC,EAAE,MAAM,EAAE,CAAA;IAC1B,oFAAoF;IACpF,sBAAsB,CAAC,EAAE,MAAM,CAAA;IAC/B,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAC;AAuiBJ,QAAA,MAAM,YAAY;WA/jBN,MAAM;cAEH,OAAO;aACR,OAAO;oBAGA,OAAO;6EA4jB1B,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"SchemaProperty.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaProperty.vue"],"names":[],"mappings":"AAmjBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EACV,mBAAmB,EACnB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAErE,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,KAAK,CAAA;AAK9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAA;AAyBtE,KAAK,WAAW,GAAG;IACf,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACvB,MAAM,EAAE,YAAY,GAAG,SAAS,CAAA;IAChC,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,aAAa,CAAC,EAAE,mBAAmB,CAAA;IACnC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,kGAAkG;IAClG,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,OAAO,CAAC,EAAE,sBAAsB,GAAG,mBAAmB,CAAA;IACtD,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,OAAO,EAAE,aAAa,CAAA;IACtB,+EAA+E;IAC/E,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC5B,iFAAiF;IACjF,mBAAmB,CAAC,EAAE,YAAY,CAAA;IAClC,mFAAmF;IACnF,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,uFAAuF;IACvF,eAAe,CAAC,EAAE,MAAM,EAAE,CAAA;IAC1B,oFAAoF;IACpF,sBAAsB,CAAC,EAAE,MAAM,CAAA;IAC/B,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAC;AA+kBJ,QAAA,MAAM,YAAY;cAvmBH,OAAO;WAFV,MAAM;aAGJ,OAAO;oBAGA,OAAO;6EAsmB1B,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -2,7 +2,7 @@ import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_exp
2
2
  import SchemaProperty_vue_vue_type_script_setup_true_lang_default from "./SchemaProperty.vue.script.js";
3
3
  /* empty css */
4
4
  //#region src/components/Content/Schema/SchemaProperty.vue
5
- var SchemaProperty_default = /* @__PURE__ */ _plugin_vue_export_helper_default(SchemaProperty_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-e16b102d"]]);
5
+ var SchemaProperty_default = /* @__PURE__ */ _plugin_vue_export_helper_default(SchemaProperty_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-f14a8d89"]]);
6
6
  //#endregion
7
7
  export { SchemaProperty_default as default };
8
8
 
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaProperty.vue.js","names":[],"sources":["../../../../src/components/Content/Schema/SchemaProperty.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport { ScalarWrappingText } from '@scalar/components/wrapping-text'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { resolve } from '@scalar/workspace-store/resolve'\nimport type {\n DiscriminatorObject,\n SchemaObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { isArraySchema } from '@scalar/workspace-store/schemas/v3.1/strict/type-guards'\nimport { computed, type Component } from 'vue'\n\nimport { WithBreadcrumb } from '@/components/Anchor'\nimport { isTypeObject } from '@/components/Content/Schema/helpers/is-type-object'\nimport { getCycleKey } from '@/components/Content/Schema/helpers/schema-cycle'\nimport type { SchemaOptions } from '@/components/Content/Schema/types'\nimport { SpecificationExtension } from '@/features/specification-extension'\n\nimport { getCompositionsToRender } from './helpers/get-compositions-to-render'\nimport { getEnumValues } from './helpers/get-enum-values'\nimport { getPropertyDescription } from './helpers/get-property-description'\nimport { hasComplexArrayItems } from './helpers/has-complex-array-items'\nimport { optimizeValueForDisplay } from './helpers/optimize-value-for-display'\nimport { shouldDisplayDescription } from './helpers/should-display-description'\nimport { shouldDisplayHeading } from './helpers/should-display-heading'\nimport Schema from './Schema.vue'\nimport SchemaComposition from './SchemaComposition.vue'\nimport SchemaEnums from './SchemaEnums.vue'\nimport SchemaPropertyHeading from './SchemaPropertyHeading.vue'\n\n/**\n * Note: We're taking in a prop called `value` which should be a JSON Schema.\n *\n * We're using `optimizeValueForDisplay` to merge null types in compositions (anyOf, allOf, oneOf, not).\n * So you should basically use the optimizedValue everywhere in the component.\n */\n\n/** Composition keywords that hold a list of schemas and can be flattened when they contain a single member. */\nconst SINGLE_ITEM_COMPOSITIONS = ['oneOf', 'anyOf', 'allOf'] as const\n\nconst props = withDefaults(\n defineProps<{\n is?: string | Component\n schema: SchemaObject | undefined\n noncollapsible?: boolean\n level?: number\n name?: string\n required?: boolean\n compact?: boolean\n discriminator?: DiscriminatorObject\n description?: string\n hideModelNames?: boolean\n hideHeading?: boolean\n /** When the root schema was resolved from a $ref, pass the ref name for display (e.g. \"Data\"). */\n modelName?: string | null\n variant?: 'additionalProperties' | 'patternProperties'\n breadcrumb?: string[]\n eventBus: WorkspaceEventBus | null\n options: SchemaOptions\n /** Enum values for property names (from JSON Schema propertyNames keyword). */\n propertyNamesEnum?: string[]\n /** When \"requestBody\", composition selection is synced with the example snippet */\n schemaContext?: string\n /** Internal path used to sync nested request body compositions with the code sample */\n compositionPath?: string[]\n /** Internal path segment for this property when building nested composition keys */\n compositionPathSegment?: string\n /** Stable identity of this property's schema, used for cycle detection. */\n cycleKey?: unknown\n }>(),\n {\n level: 0,\n required: false,\n compact: false,\n hideModelNames: false,\n },\n)\n\n/** Simplified composition with `null` type. */\nconst optimizedValue = computed(() => optimizeValueForDisplay(props.schema))\n\nconst childBreadcrumb = computed<string[] | undefined>(() =>\n props.breadcrumb && props.name\n ? [...props.breadcrumb, props.name]\n : undefined,\n)\n\nconst currentCompositionPath = computed<string[]>(() =>\n props.compositionPathSegment\n ? [...(props.compositionPath ?? []), props.compositionPathSegment]\n : (props.compositionPath ?? []),\n)\n\nconst arrayItemsCompositionPath = computed<string[]>(() => [\n ...currentCompositionPath.value,\n 'items',\n])\n\nconst shouldHaveLink = computed(() => props.level <= 2)\n\n/** Checks if array items have complex structure */\nconst hasComplexArrayItemsComputed = computed(() =>\n hasComplexArrayItems(optimizedValue.value),\n)\n\n/** Check if enum should be displayed (from value schema or from propertyNames) */\nconst hasEnum = computed(() => enumValues.value.length > 0)\n\n/** Determine if object properties should be displayed */\nconst shouldRenderObjectProperties = computed(() => {\n const value = optimizedValue.value\n if (!value) {\n return false\n }\n\n return (\n isTypeObject(value) &&\n ('properties' in value || 'additionalProperties' in value)\n )\n})\n\n/** Determine if array of objects should be rendered */\nconst shouldRenderArrayOfObjects = computed(() => {\n const value = optimizedValue.value\n if (!value || !isArraySchema(value) || typeof value.items !== 'object') {\n return false\n }\n\n return hasComplexArrayItemsComputed.value\n})\n\n/** Extract enum values from schema or array items */\nconst enumValues = computed(() => getEnumValues(optimizedValue.value))\n\n/** Generate property description from type/format */\nconst propertyDescription = computed(() =>\n getPropertyDescription(optimizedValue.value),\n)\n\n/** Determine if description should be displayed */\nconst displayDescription = computed(() =>\n shouldDisplayDescription(optimizedValue.value, props.description),\n)\n\n/**\n * When the property already renders the description, avoid repeating it in the nested object schema card.\n */\nconst objectSchemaForChildren = computed(() => {\n const value = optimizedValue.value\n if (!value || !displayDescription.value || !('description' in value)) {\n return value\n }\n\n const { description: _description, ...schemaWithoutDescription } = value\n return schemaWithoutDescription as SchemaObject\n})\n\n/** Determine if property heading should be displayed */\nconst shouldDisplayHeadingComputed = computed(() =>\n shouldDisplayHeading(optimizedValue.value, props.name, props.required),\n)\n\n/** Computes which compositions should be rendered and with which values */\nconst compositionsToRender = computed(() =>\n getCompositionsToRender(optimizedValue.value, props.options.document),\n)\n\n/**\n * Get resolved array items for rendering.\n *\n * When the items are wrapped in a single-item composition (e.g. `items: { allOf: [{ type: 'object', ... }] }`), we\n * flatten that wrapper into its plain form. A composition with a single member is equivalent to that member, so\n * keeping the composition keyword only makes the items render through an extra schema layer, which adds an\n * unnecessary level of nesting and duplicates the item description. See https://github.com/scalar/scalar/issues/5900\n */\nconst resolvedArrayItems = computed(() => {\n const value = optimizedValue.value\n if (!value || !isArraySchema(value) || typeof value.items !== 'object') {\n return undefined\n }\n\n const items = resolve.schema(value.items)\n const hasSingleItemComposition = SINGLE_ITEM_COMPOSITIONS.some(\n (keyword) =>\n Array.isArray(items?.[keyword]) && items[keyword]?.length === 1,\n )\n\n return hasSingleItemComposition ? optimizeValueForDisplay(items) : items\n})\n\n/**\n * Cycle key for the array items schema, derived from the raw (unresolved) items\n * so a self-referential array element is detected as a cycle.\n */\nconst arrayItemsCycleKey = computed(() => {\n const value = optimizedValue.value\n if (!value || !isArraySchema(value)) {\n return undefined\n }\n return getCycleKey(value.items)\n})\n\n/** Check if discriminator matches current property */\nconst isDiscriminatorProperty = computed(() =>\n Boolean(props.name && props.discriminator?.propertyName === props.name),\n)\n</script>\n<template>\n <component\n :is=\"is ?? 'li'\"\n class=\"property\"\n :class=\"[\n `property--level-${level}`,\n {\n 'property--compact': compact,\n 'property--deprecated': optimizedValue?.deprecated,\n },\n ]\">\n <SchemaPropertyHeading\n v-if=\"shouldDisplayHeadingComputed\"\n class=\"group\"\n :enum=\"hasEnum\"\n :eventBus=\"eventBus\"\n :hideModelNames\n :isDiscriminator=\"isDiscriminatorProperty\"\n :modelName=\"modelName\"\n :required\n :value=\"optimizedValue\">\n <template\n v-if=\"name\"\n #name>\n <WithBreadcrumb\n :breadcrumb=\"shouldHaveLink ? childBreadcrumb : undefined\"\n :eventBus=\"eventBus\">\n <span\n v-if=\"variant === 'patternProperties'\"\n class=\"property-name-pattern-properties\">\n <ScalarWrappingText\n preset=\"property\"\n :text=\"name\" />\n </span>\n <span\n v-else-if=\"variant === 'additionalProperties'\"\n class=\"property-name-additional-properties\">\n <ScalarWrappingText\n preset=\"property\"\n :text=\"name\" />\n </span>\n <ScalarWrappingText\n v-else\n preset=\"property\"\n :text=\"name\" />\n </WithBreadcrumb>\n </template>\n <template\n v-if=\"optimizedValue?.example !== undefined\"\n #example>\n Example:\n {{ optimizedValue.example }}\n </template>\n </SchemaPropertyHeading>\n\n <!-- Description -->\n <div\n v-if=\"displayDescription || propertyDescription\"\n class=\"property-description\">\n <ScalarMarkdown\n :value=\"displayDescription || propertyDescription || ''\" />\n </div>\n\n <!-- Enum for property names -->\n <SchemaEnums\n v-if=\"propertyNamesEnum && propertyNamesEnum.length > 0\"\n propertyNames\n :value=\"{ enum: propertyNamesEnum } as SchemaObject\" />\n\n <!-- Enum values -->\n <SchemaEnums\n v-if=\"enumValues.length > 0\"\n :value=\"optimizedValue\" />\n\n <!-- Object -->\n <div\n v-if=\"shouldRenderObjectProperties\"\n class=\"children\">\n <Schema\n :breadcrumb=\"childBreadcrumb\"\n :compact=\"compact\"\n :compositionPath=\"currentCompositionPath\"\n :cycleKey=\"cycleKey\"\n :eventBus=\"eventBus\"\n :hideModelNames\n :level=\"level + 1\"\n :name=\"name\"\n :noncollapsible=\"noncollapsible\"\n :options=\"options\"\n :schema=\"objectSchemaForChildren\"\n :schemaContext=\"schemaContext\" />\n </div>\n\n <!-- Array of objects or nested arrays -->\n <div\n v-if=\"shouldRenderArrayOfObjects && resolvedArrayItems\"\n class=\"children\">\n <Schema\n :compact=\"compact\"\n :compositionPath=\"arrayItemsCompositionPath\"\n :cycleKey=\"arrayItemsCycleKey\"\n :eventBus=\"eventBus\"\n :hideModelNames\n :level=\"level + 1\"\n :name=\"name\"\n :noncollapsible=\"noncollapsible\"\n :options=\"options\"\n :schema=\"resolve.schema(resolvedArrayItems)\"\n :schemaContext=\"schemaContext\" />\n </div>\n\n <!-- Compositions -->\n <SchemaComposition\n v-for=\"compositionData in compositionsToRender\"\n :key=\"compositionData.composition\"\n :breadcrumb=\"breadcrumb\"\n :compact=\"compact\"\n :composition=\"compositionData.composition\"\n :compositionPath=\"currentCompositionPath\"\n :discriminator=\"schema?.discriminator\"\n :eventBus=\"eventBus\"\n :hideHeading=\"hideHeading\"\n :hideModelNames\n :level=\"level\"\n :name=\"name\"\n :noncollapsible=\"noncollapsible\"\n :options=\"options\"\n :schema=\"compositionData.value\"\n :schemaContext=\"schemaContext\" />\n <SpecificationExtension :value=\"optimizedValue\" />\n </component>\n</template>\n\n<style scoped>\n.property {\n color: var(--scalar-color-1);\n display: flex;\n flex-direction: column;\n padding: 10px;\n font-size: var(--scalar-small);\n position: relative;\n}\n\n/** Remove top padding for top level schema card */\n.property.property--level-0:has(\n > .property-rule\n > .schema-card\n > .schema-properties.schema-properties-open\n > ul\n > li.property\n ) {\n padding-top: 0;\n}\n\n.property--compact.property--level-0,\n.property--compact.property--level-1 {\n padding: 10px 0;\n}\n\n.composition-panel .property.property.property.property--level-0 {\n padding: 0px;\n}\n\n.property--compact.property--level-0\n .composition-panel\n .property--compact.property--level-1 {\n padding: 8px;\n}\n\n/* if a property doesn't have a heading, remove the top padding */\n.property:has(> .property-rule:nth-of-type(1)):not(.property--compact) {\n padding-top: 8px;\n padding-bottom: 8px;\n}\n\n.property--deprecated {\n background: repeating-linear-gradient(\n -45deg,\n var(--scalar-background-2) 0,\n var(--scalar-background-2) 2px,\n transparent 2px,\n transparent 5px\n );\n background-size: 100%;\n}\n\n.property--deprecated > * {\n opacity: 0.75;\n}\n\n.property-description {\n margin-top: 6px;\n line-height: 1.4;\n font-size: var(--scalar-small);\n}\n\n.property-description:has(+ .property-rule) {\n margin-bottom: 9px;\n}\n\n:deep(.property-description) * {\n color: var(--scalar-color-2) !important;\n}\n\n.property:not(:last-of-type) {\n border-bottom: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n\n.property-description + .children,\n.children + .property-rule {\n margin-top: 9px;\n}\n\n.children {\n display: flex;\n flex-direction: column;\n}\n\n.children .property--compact.property--level-1 {\n padding: 12px;\n}\n\n.property-example-value {\n all: unset;\n font-family: var(--scalar-font-code);\n padding: 6px;\n border-top: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n\n.property-rule {\n border-radius: var(--scalar-radius-lg);\n display: flex;\n flex-direction: column;\n}\n\n.property--level-2 :deep(.relative > button) {\n left: -2rem;\n}\n\n.property-rule\n :deep(\n .composition-panel\n .schema-card--level-1\n > .schema-properties.schema-properties-open\n ) {\n border-radius: 0 0 var(--scalar-radius-lg) var(--scalar-radius-lg);\n}\n\n.property-rule\n :deep(.composition-panel > .schema-card > .schema-card-description) {\n padding: 10px;\n border-left: var(--scalar-border-width) solid var(--scalar-border-color);\n border-right: var(--scalar-border-width) solid var(--scalar-border-color);\n\n & + .schema-properties {\n margin-top: 0;\n }\n}\n\n.property-example {\n background: transparent;\n border: none;\n display: flex;\n flex-direction: row;\n gap: 8px;\n}\n\n.property-example-label,\n.property-example-value {\n padding: 3px 0 0 0;\n}\n\n.property-example-value {\n background: var(--scalar-background-2);\n border-top: 0;\n border-radius: var(--scalar-radius);\n padding: 3px 4px;\n}\n\n.property-name {\n font-family: var(--scalar-font-code);\n font-weight: var(--scalar-semibold);\n}\n\n.property-name-additional-properties::before,\n.property-name-pattern-properties::before {\n text-transform: uppercase;\n font-size: var(--scalar-micro);\n display: inline-block;\n padding: 2px 4px;\n border-radius: var(--scalar-radius);\n color: var(--scalar-color-1);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n background-color: var(--scalar-background-2);\n margin-right: 4px;\n}\n\n.property-name-pattern-properties::before {\n content: 'regex';\n}\n\n.property-name-additional-properties,\n.property-name-pattern-properties {\n border: 1px dashed var(--scalar-border-color);\n color: var(--scalar-color-accent);\n display: inline-block;\n padding: 2px;\n border-radius: var(--scalar-radius);\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"SchemaProperty.vue.js","names":[],"sources":["../../../../src/components/Content/Schema/SchemaProperty.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport { ScalarWrappingText } from '@scalar/components/wrapping-text'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { resolve } from '@scalar/workspace-store/resolve'\nimport type {\n DiscriminatorObject,\n SchemaObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { isArraySchema } from '@scalar/workspace-store/schemas/v3.1/strict/type-guards'\nimport { computed, type Component } from 'vue'\n\nimport { WithBreadcrumb } from '@/components/Anchor'\nimport { isTypeObject } from '@/components/Content/Schema/helpers/is-type-object'\nimport { getCycleKey } from '@/components/Content/Schema/helpers/schema-cycle'\nimport type { SchemaOptions } from '@/components/Content/Schema/types'\nimport { SpecificationExtension } from '@/features/specification-extension'\n\nimport { getCompositionsToRender } from './helpers/get-compositions-to-render'\nimport { getEnumValues } from './helpers/get-enum-values'\nimport { getPropertyDescription } from './helpers/get-property-description'\nimport { hasComplexArrayItems } from './helpers/has-complex-array-items'\nimport { optimizeValueForDisplay } from './helpers/optimize-value-for-display'\nimport { shouldDisplayDescription } from './helpers/should-display-description'\nimport { shouldDisplayHeading } from './helpers/should-display-heading'\nimport Schema from './Schema.vue'\nimport SchemaComposition from './SchemaComposition.vue'\nimport SchemaEnums from './SchemaEnums.vue'\nimport SchemaPropertyHeading from './SchemaPropertyHeading.vue'\n\n/**\n * Note: We're taking in a prop called `value` which should be a JSON Schema.\n *\n * We're using `optimizeValueForDisplay` to merge null types in compositions (anyOf, allOf, oneOf, not).\n * So you should basically use the optimizedValue everywhere in the component.\n */\n\n/** Composition keywords that hold a list of schemas and can be flattened when they contain a single member. */\nconst SINGLE_ITEM_COMPOSITIONS = ['oneOf', 'anyOf', 'allOf'] as const\n\nconst props = withDefaults(\n defineProps<{\n is?: string | Component\n schema: SchemaObject | undefined\n noncollapsible?: boolean\n level?: number\n name?: string\n required?: boolean\n compact?: boolean\n discriminator?: DiscriminatorObject\n description?: string\n hideModelNames?: boolean\n hideHeading?: boolean\n /** When the root schema was resolved from a $ref, pass the ref name for display (e.g. \"Data\"). */\n modelName?: string | null\n variant?: 'additionalProperties' | 'patternProperties'\n breadcrumb?: string[]\n eventBus: WorkspaceEventBus | null\n options: SchemaOptions\n /** Enum values for property names (from JSON Schema propertyNames keyword). */\n propertyNamesEnum?: string[]\n /** Resolved propertyNames schema, used to show key constraints like `format`. */\n propertyNamesSchema?: SchemaObject\n /** When \"requestBody\", composition selection is synced with the example snippet */\n schemaContext?: string\n /** Internal path used to sync nested request body compositions with the code sample */\n compositionPath?: string[]\n /** Internal path segment for this property when building nested composition keys */\n compositionPathSegment?: string\n /** Stable identity of this property's schema, used for cycle detection. */\n cycleKey?: unknown\n }>(),\n {\n level: 0,\n required: false,\n compact: false,\n hideModelNames: false,\n },\n)\n\n/** Simplified composition with `null` type. */\nconst optimizedValue = computed(() => optimizeValueForDisplay(props.schema))\n\nconst childBreadcrumb = computed<string[] | undefined>(() =>\n props.breadcrumb && props.name\n ? [...props.breadcrumb, props.name]\n : undefined,\n)\n\nconst currentCompositionPath = computed<string[]>(() =>\n props.compositionPathSegment\n ? [...(props.compositionPath ?? []), props.compositionPathSegment]\n : (props.compositionPath ?? []),\n)\n\nconst arrayItemsCompositionPath = computed<string[]>(() => [\n ...currentCompositionPath.value,\n 'items',\n])\n\nconst shouldHaveLink = computed(() => props.level <= 2)\n\n/** Checks if array items have complex structure */\nconst hasComplexArrayItemsComputed = computed(() =>\n hasComplexArrayItems(optimizedValue.value),\n)\n\n/** Check if enum should be displayed (from value schema or from propertyNames) */\nconst hasEnum = computed(() => enumValues.value.length > 0)\n\n/** Determine if object properties should be displayed */\nconst shouldRenderObjectProperties = computed(() => {\n const value = optimizedValue.value\n if (!value) {\n return false\n }\n\n if (!('properties' in value || 'additionalProperties' in value)) {\n return false\n }\n\n // `allOf` already merges the factored-out sibling `properties` into its\n // rendered result (see `mergeAllOfSchemas`), so rendering a separate object\n // block here would show those properties twice. Let the composition handle it.\n if ('allOf' in value) {\n return false\n }\n\n // A schema may factor its common `properties` out to the top level alongside\n // a composition keyword (anyOf/oneOf/not), as described in the JSON Schema\n // \"factoring schemas\" guide. `isTypeObject` deliberately rejects such schemas\n // so the composition is rendered, but the factored-out properties must still\n // show. Unlike `allOf`, these compositions do not merge sibling properties.\n // Render them unless the schema is an explicit non-object (scalar or array)\n // type. See https://github.com/scalar/scalar/issues/8593\n const type = (value as { type?: unknown }).type\n const isExplicitNonObject = typeof type === 'string' && type !== 'object'\n\n return isTypeObject(value) || !isExplicitNonObject\n})\n\n/** Determine if array of objects should be rendered */\nconst shouldRenderArrayOfObjects = computed(() => {\n const value = optimizedValue.value\n if (!value || !isArraySchema(value) || typeof value.items !== 'object') {\n return false\n }\n\n return hasComplexArrayItemsComputed.value\n})\n\n/** Extract enum values from schema or array items */\nconst enumValues = computed(() => getEnumValues(optimizedValue.value))\n\n/** Generate property description from type/format */\nconst propertyDescription = computed(() =>\n getPropertyDescription(optimizedValue.value),\n)\n\n/** Determine if description should be displayed */\nconst displayDescription = computed(() =>\n shouldDisplayDescription(optimizedValue.value, props.description),\n)\n\n/**\n * The schema used to render the object's own properties.\n *\n * Composition keywords are stripped so the nested object renders only its\n * properties. The compositions are rendered separately below; leaving them here\n * would route the nested `Schema` back through `SchemaProperty` and recurse.\n *\n * When the property already renders the description, we also drop it to avoid\n * repeating it in the nested object schema card.\n */\nconst objectSchemaForChildren = computed(() => {\n const value = optimizedValue.value\n if (!value) {\n return value\n }\n\n const {\n oneOf: _oneOf,\n anyOf: _anyOf,\n allOf: _allOf,\n not: _not,\n ...objectSchema\n } = value as Record<string, unknown>\n\n if (displayDescription.value && 'description' in objectSchema) {\n const { description: _description, ...schemaWithoutDescription } =\n objectSchema\n return schemaWithoutDescription as SchemaObject\n }\n\n return objectSchema as SchemaObject\n})\n\n/** Determine if property heading should be displayed */\nconst shouldDisplayHeadingComputed = computed(() =>\n shouldDisplayHeading(optimizedValue.value, props.name, props.required),\n)\n\n/** Computes which compositions should be rendered and with which values */\nconst compositionsToRender = computed(() =>\n getCompositionsToRender(optimizedValue.value, props.options.document),\n)\n\n/**\n * Get resolved array items for rendering.\n *\n * When the items are wrapped in a single-item composition (e.g. `items: { allOf: [{ type: 'object', ... }] }`), we\n * flatten that wrapper into its plain form. A composition with a single member is equivalent to that member, so\n * keeping the composition keyword only makes the items render through an extra schema layer, which adds an\n * unnecessary level of nesting and duplicates the item description. See https://github.com/scalar/scalar/issues/5900\n */\nconst resolvedArrayItems = computed(() => {\n const value = optimizedValue.value\n if (!value || !isArraySchema(value) || typeof value.items !== 'object') {\n return undefined\n }\n\n const items = resolve.schema(value.items)\n const hasSingleItemComposition = SINGLE_ITEM_COMPOSITIONS.some(\n (keyword) =>\n Array.isArray(items?.[keyword]) && items[keyword]?.length === 1,\n )\n\n return hasSingleItemComposition ? optimizeValueForDisplay(items) : items\n})\n\n/**\n * Cycle key for the array items schema, derived from the raw (unresolved) items\n * so a self-referential array element is detected as a cycle.\n */\nconst arrayItemsCycleKey = computed(() => {\n const value = optimizedValue.value\n if (!value || !isArraySchema(value)) {\n return undefined\n }\n return getCycleKey(value.items)\n})\n\n/** Check if discriminator matches current property */\nconst isDiscriminatorProperty = computed(() =>\n Boolean(props.name && props.discriminator?.propertyName === props.name),\n)\n</script>\n<template>\n <component\n :is=\"is ?? 'li'\"\n class=\"property\"\n :class=\"[\n `property--level-${level}`,\n {\n 'property--compact': compact,\n 'property--deprecated': optimizedValue?.deprecated,\n },\n ]\">\n <SchemaPropertyHeading\n v-if=\"shouldDisplayHeadingComputed\"\n class=\"group\"\n :enum=\"hasEnum\"\n :eventBus=\"eventBus\"\n :hideModelNames\n :isDiscriminator=\"isDiscriminatorProperty\"\n :modelName=\"modelName\"\n :propertyNames=\"propertyNamesSchema\"\n :required\n :value=\"optimizedValue\">\n <template\n v-if=\"name\"\n #name>\n <WithBreadcrumb\n :breadcrumb=\"shouldHaveLink ? childBreadcrumb : undefined\"\n :eventBus=\"eventBus\">\n <span\n v-if=\"variant === 'patternProperties'\"\n class=\"property-name-pattern-properties\">\n <ScalarWrappingText\n preset=\"property\"\n :text=\"name\" />\n </span>\n <span\n v-else-if=\"variant === 'additionalProperties'\"\n class=\"property-name-additional-properties\">\n <ScalarWrappingText\n preset=\"property\"\n :text=\"name\" />\n </span>\n <ScalarWrappingText\n v-else\n preset=\"property\"\n :text=\"name\" />\n </WithBreadcrumb>\n </template>\n <template\n v-if=\"optimizedValue?.example !== undefined\"\n #example>\n Example:\n {{ optimizedValue.example }}\n </template>\n </SchemaPropertyHeading>\n\n <!-- Description -->\n <div\n v-if=\"displayDescription || propertyDescription\"\n class=\"property-description\">\n <ScalarMarkdown\n :value=\"displayDescription || propertyDescription || ''\" />\n </div>\n\n <!-- Enum for property names -->\n <SchemaEnums\n v-if=\"propertyNamesEnum && propertyNamesEnum.length > 0\"\n propertyNames\n :value=\"{ enum: propertyNamesEnum } as SchemaObject\" />\n\n <!-- Enum values -->\n <SchemaEnums\n v-if=\"enumValues.length > 0\"\n :value=\"optimizedValue\" />\n\n <!-- Object -->\n <div\n v-if=\"shouldRenderObjectProperties\"\n class=\"children\">\n <Schema\n :breadcrumb=\"childBreadcrumb\"\n :compact=\"compact\"\n :compositionPath=\"currentCompositionPath\"\n :cycleKey=\"cycleKey\"\n :eventBus=\"eventBus\"\n :hideModelNames\n :level=\"level + 1\"\n :name=\"name\"\n :noncollapsible=\"noncollapsible\"\n :options=\"options\"\n :schema=\"objectSchemaForChildren\"\n :schemaContext=\"schemaContext\" />\n </div>\n\n <!-- Array of objects or nested arrays -->\n <div\n v-if=\"shouldRenderArrayOfObjects && resolvedArrayItems\"\n class=\"children\">\n <Schema\n :compact=\"compact\"\n :compositionPath=\"arrayItemsCompositionPath\"\n :cycleKey=\"arrayItemsCycleKey\"\n :eventBus=\"eventBus\"\n :hideModelNames\n :level=\"level + 1\"\n :name=\"name\"\n :noncollapsible=\"noncollapsible\"\n :options=\"options\"\n :schema=\"resolve.schema(resolvedArrayItems)\"\n :schemaContext=\"schemaContext\" />\n </div>\n\n <!-- Compositions -->\n <SchemaComposition\n v-for=\"compositionData in compositionsToRender\"\n :key=\"compositionData.composition\"\n :breadcrumb=\"breadcrumb\"\n :compact=\"compact\"\n :composition=\"compositionData.composition\"\n :compositionPath=\"currentCompositionPath\"\n :discriminator=\"schema?.discriminator\"\n :eventBus=\"eventBus\"\n :hideHeading=\"hideHeading\"\n :hideModelNames\n :level=\"level\"\n :name=\"name\"\n :noncollapsible=\"noncollapsible\"\n :options=\"options\"\n :schema=\"compositionData.value\"\n :schemaContext=\"schemaContext\" />\n <SpecificationExtension :value=\"optimizedValue\" />\n </component>\n</template>\n\n<style scoped>\n.property {\n color: var(--scalar-color-1);\n display: flex;\n flex-direction: column;\n padding: 10px;\n font-size: var(--scalar-small);\n position: relative;\n}\n\n/** Remove top padding for top level schema card */\n.property.property--level-0:has(\n > .property-rule\n > .schema-card\n > .schema-properties.schema-properties-open\n > ul\n > li.property\n ) {\n padding-top: 0;\n}\n\n.property--compact.property--level-0,\n.property--compact.property--level-1 {\n padding: 10px 0;\n}\n\n.composition-panel .property.property.property.property--level-0 {\n padding: 0px;\n}\n\n.property--compact.property--level-0\n .composition-panel\n .property--compact.property--level-1 {\n padding: 8px;\n}\n\n/* if a property doesn't have a heading, remove the top padding */\n.property:has(> .property-rule:nth-of-type(1)):not(.property--compact) {\n padding-top: 8px;\n padding-bottom: 8px;\n}\n\n.property--deprecated {\n background: repeating-linear-gradient(\n -45deg,\n var(--scalar-background-2) 0,\n var(--scalar-background-2) 2px,\n transparent 2px,\n transparent 5px\n );\n background-size: 100%;\n}\n\n.property--deprecated > * {\n opacity: 0.75;\n}\n\n.property-description {\n margin-top: 6px;\n line-height: 1.4;\n font-size: var(--scalar-small);\n}\n\n.property-description:has(+ .property-rule) {\n margin-bottom: 9px;\n}\n\n:deep(.property-description) * {\n color: var(--scalar-color-2) !important;\n}\n\n.property:not(:last-of-type) {\n border-bottom: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n\n.property-description + .children,\n.children + .property-rule {\n margin-top: 9px;\n}\n\n.children {\n display: flex;\n flex-direction: column;\n}\n\n.children .property--compact.property--level-1 {\n padding: 12px;\n}\n\n.property-example-value {\n all: unset;\n font-family: var(--scalar-font-code);\n padding: 6px;\n border-top: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n\n.property-rule {\n border-radius: var(--scalar-radius-lg);\n display: flex;\n flex-direction: column;\n}\n\n.property--level-2 :deep(.relative > button) {\n left: -2rem;\n}\n\n.property-rule\n :deep(\n .composition-panel\n .schema-card--level-1\n > .schema-properties.schema-properties-open\n ) {\n border-radius: 0 0 var(--scalar-radius-lg) var(--scalar-radius-lg);\n}\n\n.property-rule\n :deep(.composition-panel > .schema-card > .schema-card-description) {\n padding: 10px;\n border-left: var(--scalar-border-width) solid var(--scalar-border-color);\n border-right: var(--scalar-border-width) solid var(--scalar-border-color);\n\n & + .schema-properties {\n margin-top: 0;\n }\n}\n\n.property-example {\n background: transparent;\n border: none;\n display: flex;\n flex-direction: row;\n gap: 8px;\n}\n\n.property-example-label,\n.property-example-value {\n padding: 3px 0 0 0;\n}\n\n.property-example-value {\n background: var(--scalar-background-2);\n border-top: 0;\n border-radius: var(--scalar-radius);\n padding: 3px 4px;\n}\n\n.property-name {\n font-family: var(--scalar-font-code);\n font-weight: var(--scalar-semibold);\n}\n\n.property-name-additional-properties::before,\n.property-name-pattern-properties::before {\n text-transform: uppercase;\n font-size: var(--scalar-micro);\n display: inline-block;\n padding: 2px 4px;\n border-radius: var(--scalar-radius);\n color: var(--scalar-color-1);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n background-color: var(--scalar-background-2);\n margin-right: 4px;\n}\n\n.property-name-pattern-properties::before {\n content: 'regex';\n}\n\n.property-name-additional-properties,\n.property-name-pattern-properties {\n border: 1px dashed var(--scalar-border-color);\n color: var(--scalar-color-accent);\n display: inline-block;\n padding: 2px;\n border-radius: var(--scalar-radius);\n}\n</style>\n"],"mappings":""}
@@ -16,8 +16,8 @@ import Schema_default from "./Schema.vue.js";
16
16
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createSlots, createTextVNode, createVNode, defineComponent, normalizeClass, openBlock, renderList, resolveDynamicComponent, toDisplayString, unref, withCtx } from "vue";
17
17
  import { ScalarMarkdown } from "@scalar/components/markdown";
18
18
  import { resolve } from "@scalar/workspace-store/resolve";
19
- import { ScalarWrappingText } from "@scalar/components/wrapping-text";
20
19
  import { isArraySchema } from "@scalar/workspace-store/schemas/v3.1/strict/type-guards";
20
+ import { ScalarWrappingText } from "@scalar/components/wrapping-text";
21
21
  //#region src/components/Content/Schema/SchemaProperty.vue?vue&type=script&setup=true&lang.ts
22
22
  var _hoisted_1 = {
23
23
  key: 0,
@@ -75,6 +75,7 @@ var SchemaProperty_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
75
75
  eventBus: {},
76
76
  options: {},
77
77
  propertyNamesEnum: {},
78
+ propertyNamesSchema: {},
78
79
  schemaContext: {},
79
80
  compositionPath: {},
80
81
  compositionPathSegment: {},
@@ -101,7 +102,11 @@ var SchemaProperty_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
101
102
  const shouldRenderObjectProperties = computed(() => {
102
103
  const value = optimizedValue.value;
103
104
  if (!value) return false;
104
- return isTypeObject(value) && ("properties" in value || "additionalProperties" in value);
105
+ if (!("properties" in value || "additionalProperties" in value)) return false;
106
+ if ("allOf" in value) return false;
107
+ const type = value.type;
108
+ const isExplicitNonObject = typeof type === "string" && type !== "object";
109
+ return isTypeObject(value) || !isExplicitNonObject;
105
110
  });
106
111
  /** Determine if array of objects should be rendered */
107
112
  const shouldRenderArrayOfObjects = computed(() => {
@@ -116,13 +121,24 @@ var SchemaProperty_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
116
121
  /** Determine if description should be displayed */
117
122
  const displayDescription = computed(() => shouldDisplayDescription(optimizedValue.value, props.description));
118
123
  /**
119
- * When the property already renders the description, avoid repeating it in the nested object schema card.
124
+ * The schema used to render the object's own properties.
125
+ *
126
+ * Composition keywords are stripped so the nested object renders only its
127
+ * properties. The compositions are rendered separately below; leaving them here
128
+ * would route the nested `Schema` back through `SchemaProperty` and recurse.
129
+ *
130
+ * When the property already renders the description, we also drop it to avoid
131
+ * repeating it in the nested object schema card.
120
132
  */
121
133
  const objectSchemaForChildren = computed(() => {
122
134
  const value = optimizedValue.value;
123
- if (!value || !displayDescription.value || !("description" in value)) return value;
124
- const { description: _description, ...schemaWithoutDescription } = value;
125
- return schemaWithoutDescription;
135
+ if (!value) return value;
136
+ const { oneOf: _oneOf, anyOf: _anyOf, allOf: _allOf, not: _not, ...objectSchema } = value;
137
+ if (displayDescription.value && "description" in objectSchema) {
138
+ const { description: _description, ...schemaWithoutDescription } = objectSchema;
139
+ return schemaWithoutDescription;
140
+ }
141
+ return objectSchema;
126
142
  });
127
143
  /** Determine if property heading should be displayed */
128
144
  const shouldDisplayHeadingComputed = computed(() => shouldDisplayHeading(optimizedValue.value, props.name, props.required));
@@ -167,6 +183,7 @@ var SchemaProperty_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
167
183
  hideModelNames: __props.hideModelNames,
168
184
  isDiscriminator: isDiscriminatorProperty.value,
169
185
  modelName: __props.modelName,
186
+ propertyNames: __props.propertyNamesSchema,
170
187
  required: __props.required,
171
188
  value: optimizedValue.value
172
189
  }, createSlots({ _: 2 }, [__props.name ? {
@@ -199,6 +216,7 @@ var SchemaProperty_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
199
216
  "hideModelNames",
200
217
  "isDiscriminator",
201
218
  "modelName",
219
+ "propertyNames",
202
220
  "required",
203
221
  "value"
204
222
  ])) : createCommentVNode("", true),
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaProperty.vue.script.js","names":[],"sources":["../../../../src/components/Content/Schema/SchemaProperty.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport { ScalarWrappingText } from '@scalar/components/wrapping-text'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { resolve } from '@scalar/workspace-store/resolve'\nimport type {\n DiscriminatorObject,\n SchemaObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { isArraySchema } from '@scalar/workspace-store/schemas/v3.1/strict/type-guards'\nimport { computed, type Component } from 'vue'\n\nimport { WithBreadcrumb } from '@/components/Anchor'\nimport { isTypeObject } from '@/components/Content/Schema/helpers/is-type-object'\nimport { getCycleKey } from '@/components/Content/Schema/helpers/schema-cycle'\nimport type { SchemaOptions } from '@/components/Content/Schema/types'\nimport { SpecificationExtension } from '@/features/specification-extension'\n\nimport { getCompositionsToRender } from './helpers/get-compositions-to-render'\nimport { getEnumValues } from './helpers/get-enum-values'\nimport { getPropertyDescription } from './helpers/get-property-description'\nimport { hasComplexArrayItems } from './helpers/has-complex-array-items'\nimport { optimizeValueForDisplay } from './helpers/optimize-value-for-display'\nimport { shouldDisplayDescription } from './helpers/should-display-description'\nimport { shouldDisplayHeading } from './helpers/should-display-heading'\nimport Schema from './Schema.vue'\nimport SchemaComposition from './SchemaComposition.vue'\nimport SchemaEnums from './SchemaEnums.vue'\nimport SchemaPropertyHeading from './SchemaPropertyHeading.vue'\n\n/**\n * Note: We're taking in a prop called `value` which should be a JSON Schema.\n *\n * We're using `optimizeValueForDisplay` to merge null types in compositions (anyOf, allOf, oneOf, not).\n * So you should basically use the optimizedValue everywhere in the component.\n */\n\n/** Composition keywords that hold a list of schemas and can be flattened when they contain a single member. */\nconst SINGLE_ITEM_COMPOSITIONS = ['oneOf', 'anyOf', 'allOf'] as const\n\nconst props = withDefaults(\n defineProps<{\n is?: string | Component\n schema: SchemaObject | undefined\n noncollapsible?: boolean\n level?: number\n name?: string\n required?: boolean\n compact?: boolean\n discriminator?: DiscriminatorObject\n description?: string\n hideModelNames?: boolean\n hideHeading?: boolean\n /** When the root schema was resolved from a $ref, pass the ref name for display (e.g. \"Data\"). */\n modelName?: string | null\n variant?: 'additionalProperties' | 'patternProperties'\n breadcrumb?: string[]\n eventBus: WorkspaceEventBus | null\n options: SchemaOptions\n /** Enum values for property names (from JSON Schema propertyNames keyword). */\n propertyNamesEnum?: string[]\n /** When \"requestBody\", composition selection is synced with the example snippet */\n schemaContext?: string\n /** Internal path used to sync nested request body compositions with the code sample */\n compositionPath?: string[]\n /** Internal path segment for this property when building nested composition keys */\n compositionPathSegment?: string\n /** Stable identity of this property's schema, used for cycle detection. */\n cycleKey?: unknown\n }>(),\n {\n level: 0,\n required: false,\n compact: false,\n hideModelNames: false,\n },\n)\n\n/** Simplified composition with `null` type. */\nconst optimizedValue = computed(() => optimizeValueForDisplay(props.schema))\n\nconst childBreadcrumb = computed<string[] | undefined>(() =>\n props.breadcrumb && props.name\n ? [...props.breadcrumb, props.name]\n : undefined,\n)\n\nconst currentCompositionPath = computed<string[]>(() =>\n props.compositionPathSegment\n ? [...(props.compositionPath ?? []), props.compositionPathSegment]\n : (props.compositionPath ?? []),\n)\n\nconst arrayItemsCompositionPath = computed<string[]>(() => [\n ...currentCompositionPath.value,\n 'items',\n])\n\nconst shouldHaveLink = computed(() => props.level <= 2)\n\n/** Checks if array items have complex structure */\nconst hasComplexArrayItemsComputed = computed(() =>\n hasComplexArrayItems(optimizedValue.value),\n)\n\n/** Check if enum should be displayed (from value schema or from propertyNames) */\nconst hasEnum = computed(() => enumValues.value.length > 0)\n\n/** Determine if object properties should be displayed */\nconst shouldRenderObjectProperties = computed(() => {\n const value = optimizedValue.value\n if (!value) {\n return false\n }\n\n return (\n isTypeObject(value) &&\n ('properties' in value || 'additionalProperties' in value)\n )\n})\n\n/** Determine if array of objects should be rendered */\nconst shouldRenderArrayOfObjects = computed(() => {\n const value = optimizedValue.value\n if (!value || !isArraySchema(value) || typeof value.items !== 'object') {\n return false\n }\n\n return hasComplexArrayItemsComputed.value\n})\n\n/** Extract enum values from schema or array items */\nconst enumValues = computed(() => getEnumValues(optimizedValue.value))\n\n/** Generate property description from type/format */\nconst propertyDescription = computed(() =>\n getPropertyDescription(optimizedValue.value),\n)\n\n/** Determine if description should be displayed */\nconst displayDescription = computed(() =>\n shouldDisplayDescription(optimizedValue.value, props.description),\n)\n\n/**\n * When the property already renders the description, avoid repeating it in the nested object schema card.\n */\nconst objectSchemaForChildren = computed(() => {\n const value = optimizedValue.value\n if (!value || !displayDescription.value || !('description' in value)) {\n return value\n }\n\n const { description: _description, ...schemaWithoutDescription } = value\n return schemaWithoutDescription as SchemaObject\n})\n\n/** Determine if property heading should be displayed */\nconst shouldDisplayHeadingComputed = computed(() =>\n shouldDisplayHeading(optimizedValue.value, props.name, props.required),\n)\n\n/** Computes which compositions should be rendered and with which values */\nconst compositionsToRender = computed(() =>\n getCompositionsToRender(optimizedValue.value, props.options.document),\n)\n\n/**\n * Get resolved array items for rendering.\n *\n * When the items are wrapped in a single-item composition (e.g. `items: { allOf: [{ type: 'object', ... }] }`), we\n * flatten that wrapper into its plain form. A composition with a single member is equivalent to that member, so\n * keeping the composition keyword only makes the items render through an extra schema layer, which adds an\n * unnecessary level of nesting and duplicates the item description. See https://github.com/scalar/scalar/issues/5900\n */\nconst resolvedArrayItems = computed(() => {\n const value = optimizedValue.value\n if (!value || !isArraySchema(value) || typeof value.items !== 'object') {\n return undefined\n }\n\n const items = resolve.schema(value.items)\n const hasSingleItemComposition = SINGLE_ITEM_COMPOSITIONS.some(\n (keyword) =>\n Array.isArray(items?.[keyword]) && items[keyword]?.length === 1,\n )\n\n return hasSingleItemComposition ? optimizeValueForDisplay(items) : items\n})\n\n/**\n * Cycle key for the array items schema, derived from the raw (unresolved) items\n * so a self-referential array element is detected as a cycle.\n */\nconst arrayItemsCycleKey = computed(() => {\n const value = optimizedValue.value\n if (!value || !isArraySchema(value)) {\n return undefined\n }\n return getCycleKey(value.items)\n})\n\n/** Check if discriminator matches current property */\nconst isDiscriminatorProperty = computed(() =>\n Boolean(props.name && props.discriminator?.propertyName === props.name),\n)\n</script>\n<template>\n <component\n :is=\"is ?? 'li'\"\n class=\"property\"\n :class=\"[\n `property--level-${level}`,\n {\n 'property--compact': compact,\n 'property--deprecated': optimizedValue?.deprecated,\n },\n ]\">\n <SchemaPropertyHeading\n v-if=\"shouldDisplayHeadingComputed\"\n class=\"group\"\n :enum=\"hasEnum\"\n :eventBus=\"eventBus\"\n :hideModelNames\n :isDiscriminator=\"isDiscriminatorProperty\"\n :modelName=\"modelName\"\n :required\n :value=\"optimizedValue\">\n <template\n v-if=\"name\"\n #name>\n <WithBreadcrumb\n :breadcrumb=\"shouldHaveLink ? childBreadcrumb : undefined\"\n :eventBus=\"eventBus\">\n <span\n v-if=\"variant === 'patternProperties'\"\n class=\"property-name-pattern-properties\">\n <ScalarWrappingText\n preset=\"property\"\n :text=\"name\" />\n </span>\n <span\n v-else-if=\"variant === 'additionalProperties'\"\n class=\"property-name-additional-properties\">\n <ScalarWrappingText\n preset=\"property\"\n :text=\"name\" />\n </span>\n <ScalarWrappingText\n v-else\n preset=\"property\"\n :text=\"name\" />\n </WithBreadcrumb>\n </template>\n <template\n v-if=\"optimizedValue?.example !== undefined\"\n #example>\n Example:\n {{ optimizedValue.example }}\n </template>\n </SchemaPropertyHeading>\n\n <!-- Description -->\n <div\n v-if=\"displayDescription || propertyDescription\"\n class=\"property-description\">\n <ScalarMarkdown\n :value=\"displayDescription || propertyDescription || ''\" />\n </div>\n\n <!-- Enum for property names -->\n <SchemaEnums\n v-if=\"propertyNamesEnum && propertyNamesEnum.length > 0\"\n propertyNames\n :value=\"{ enum: propertyNamesEnum } as SchemaObject\" />\n\n <!-- Enum values -->\n <SchemaEnums\n v-if=\"enumValues.length > 0\"\n :value=\"optimizedValue\" />\n\n <!-- Object -->\n <div\n v-if=\"shouldRenderObjectProperties\"\n class=\"children\">\n <Schema\n :breadcrumb=\"childBreadcrumb\"\n :compact=\"compact\"\n :compositionPath=\"currentCompositionPath\"\n :cycleKey=\"cycleKey\"\n :eventBus=\"eventBus\"\n :hideModelNames\n :level=\"level + 1\"\n :name=\"name\"\n :noncollapsible=\"noncollapsible\"\n :options=\"options\"\n :schema=\"objectSchemaForChildren\"\n :schemaContext=\"schemaContext\" />\n </div>\n\n <!-- Array of objects or nested arrays -->\n <div\n v-if=\"shouldRenderArrayOfObjects && resolvedArrayItems\"\n class=\"children\">\n <Schema\n :compact=\"compact\"\n :compositionPath=\"arrayItemsCompositionPath\"\n :cycleKey=\"arrayItemsCycleKey\"\n :eventBus=\"eventBus\"\n :hideModelNames\n :level=\"level + 1\"\n :name=\"name\"\n :noncollapsible=\"noncollapsible\"\n :options=\"options\"\n :schema=\"resolve.schema(resolvedArrayItems)\"\n :schemaContext=\"schemaContext\" />\n </div>\n\n <!-- Compositions -->\n <SchemaComposition\n v-for=\"compositionData in compositionsToRender\"\n :key=\"compositionData.composition\"\n :breadcrumb=\"breadcrumb\"\n :compact=\"compact\"\n :composition=\"compositionData.composition\"\n :compositionPath=\"currentCompositionPath\"\n :discriminator=\"schema?.discriminator\"\n :eventBus=\"eventBus\"\n :hideHeading=\"hideHeading\"\n :hideModelNames\n :level=\"level\"\n :name=\"name\"\n :noncollapsible=\"noncollapsible\"\n :options=\"options\"\n :schema=\"compositionData.value\"\n :schemaContext=\"schemaContext\" />\n <SpecificationExtension :value=\"optimizedValue\" />\n </component>\n</template>\n\n<style scoped>\n.property {\n color: var(--scalar-color-1);\n display: flex;\n flex-direction: column;\n padding: 10px;\n font-size: var(--scalar-small);\n position: relative;\n}\n\n/** Remove top padding for top level schema card */\n.property.property--level-0:has(\n > .property-rule\n > .schema-card\n > .schema-properties.schema-properties-open\n > ul\n > li.property\n ) {\n padding-top: 0;\n}\n\n.property--compact.property--level-0,\n.property--compact.property--level-1 {\n padding: 10px 0;\n}\n\n.composition-panel .property.property.property.property--level-0 {\n padding: 0px;\n}\n\n.property--compact.property--level-0\n .composition-panel\n .property--compact.property--level-1 {\n padding: 8px;\n}\n\n/* if a property doesn't have a heading, remove the top padding */\n.property:has(> .property-rule:nth-of-type(1)):not(.property--compact) {\n padding-top: 8px;\n padding-bottom: 8px;\n}\n\n.property--deprecated {\n background: repeating-linear-gradient(\n -45deg,\n var(--scalar-background-2) 0,\n var(--scalar-background-2) 2px,\n transparent 2px,\n transparent 5px\n );\n background-size: 100%;\n}\n\n.property--deprecated > * {\n opacity: 0.75;\n}\n\n.property-description {\n margin-top: 6px;\n line-height: 1.4;\n font-size: var(--scalar-small);\n}\n\n.property-description:has(+ .property-rule) {\n margin-bottom: 9px;\n}\n\n:deep(.property-description) * {\n color: var(--scalar-color-2) !important;\n}\n\n.property:not(:last-of-type) {\n border-bottom: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n\n.property-description + .children,\n.children + .property-rule {\n margin-top: 9px;\n}\n\n.children {\n display: flex;\n flex-direction: column;\n}\n\n.children .property--compact.property--level-1 {\n padding: 12px;\n}\n\n.property-example-value {\n all: unset;\n font-family: var(--scalar-font-code);\n padding: 6px;\n border-top: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n\n.property-rule {\n border-radius: var(--scalar-radius-lg);\n display: flex;\n flex-direction: column;\n}\n\n.property--level-2 :deep(.relative > button) {\n left: -2rem;\n}\n\n.property-rule\n :deep(\n .composition-panel\n .schema-card--level-1\n > .schema-properties.schema-properties-open\n ) {\n border-radius: 0 0 var(--scalar-radius-lg) var(--scalar-radius-lg);\n}\n\n.property-rule\n :deep(.composition-panel > .schema-card > .schema-card-description) {\n padding: 10px;\n border-left: var(--scalar-border-width) solid var(--scalar-border-color);\n border-right: var(--scalar-border-width) solid var(--scalar-border-color);\n\n & + .schema-properties {\n margin-top: 0;\n }\n}\n\n.property-example {\n background: transparent;\n border: none;\n display: flex;\n flex-direction: row;\n gap: 8px;\n}\n\n.property-example-label,\n.property-example-value {\n padding: 3px 0 0 0;\n}\n\n.property-example-value {\n background: var(--scalar-background-2);\n border-top: 0;\n border-radius: var(--scalar-radius);\n padding: 3px 4px;\n}\n\n.property-name {\n font-family: var(--scalar-font-code);\n font-weight: var(--scalar-semibold);\n}\n\n.property-name-additional-properties::before,\n.property-name-pattern-properties::before {\n text-transform: uppercase;\n font-size: var(--scalar-micro);\n display: inline-block;\n padding: 2px 4px;\n border-radius: var(--scalar-radius);\n color: var(--scalar-color-1);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n background-color: var(--scalar-background-2);\n margin-right: 4px;\n}\n\n.property-name-pattern-properties::before {\n content: 'regex';\n}\n\n.property-name-additional-properties,\n.property-name-pattern-properties {\n border: 1px dashed var(--scalar-border-color);\n color: var(--scalar-color-accent);\n display: inline-block;\n padding: 2px;\n border-radius: var(--scalar-radius);\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,YAWmC,gBAAA;MAVhC,SAAS,QAAA;MACT,iBAAiB,0BAAA;MACjB,UAAU,mBAAA;MACV,UAAU,QAAA;MACV,gBAAA,QAAA;MACA,OAAO,QAAA,QAAK;MACZ,MAAM,QAAA;MACN,gBAAgB,QAAA;MAChB,SAAS,QAAA;MACT,QAAQ,MAAA,QAAO,CAAC,OAAO,mBAAA,MAAkB;MACzC,eAAe,QAAA;;;;;;;;;;;;;;uBAIpB,mBAgBmC,UAAA,MAAA,WAfP,qBAAA,QAAnB,oBAAe;0BADxB,YAgBmC,2BAAA;OAdhC,KAAK,gBAAgB;OACrB,YAAY,QAAA;OACZ,SAAS,QAAA;OACT,aAAa,gBAAgB;OAC7B,iBAAiB,uBAAA;OACjB,eAAe,QAAA,QAAQ;OACvB,UAAU,QAAA;OACV,aAAa,QAAA;OACb,gBAAA,QAAA;OACA,OAAO,QAAA;OACP,MAAM,QAAA;OACN,gBAAgB,QAAA;OAChB,SAAS,QAAA;OACT,QAAQ,gBAAgB;OACxB,eAAe,QAAA;;;;;;;;;;;;;;;;;;KAClB,YAAkD,MAAA,+BAAA,EAAA,EAAzB,OAAO,eAAA,OAAc,EAAA,MAAA,GAAA,CAAA,QAAA,CAAA"}
1
+ {"version":3,"file":"SchemaProperty.vue.script.js","names":[],"sources":["../../../../src/components/Content/Schema/SchemaProperty.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport { ScalarWrappingText } from '@scalar/components/wrapping-text'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { resolve } from '@scalar/workspace-store/resolve'\nimport type {\n DiscriminatorObject,\n SchemaObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { isArraySchema } from '@scalar/workspace-store/schemas/v3.1/strict/type-guards'\nimport { computed, type Component } from 'vue'\n\nimport { WithBreadcrumb } from '@/components/Anchor'\nimport { isTypeObject } from '@/components/Content/Schema/helpers/is-type-object'\nimport { getCycleKey } from '@/components/Content/Schema/helpers/schema-cycle'\nimport type { SchemaOptions } from '@/components/Content/Schema/types'\nimport { SpecificationExtension } from '@/features/specification-extension'\n\nimport { getCompositionsToRender } from './helpers/get-compositions-to-render'\nimport { getEnumValues } from './helpers/get-enum-values'\nimport { getPropertyDescription } from './helpers/get-property-description'\nimport { hasComplexArrayItems } from './helpers/has-complex-array-items'\nimport { optimizeValueForDisplay } from './helpers/optimize-value-for-display'\nimport { shouldDisplayDescription } from './helpers/should-display-description'\nimport { shouldDisplayHeading } from './helpers/should-display-heading'\nimport Schema from './Schema.vue'\nimport SchemaComposition from './SchemaComposition.vue'\nimport SchemaEnums from './SchemaEnums.vue'\nimport SchemaPropertyHeading from './SchemaPropertyHeading.vue'\n\n/**\n * Note: We're taking in a prop called `value` which should be a JSON Schema.\n *\n * We're using `optimizeValueForDisplay` to merge null types in compositions (anyOf, allOf, oneOf, not).\n * So you should basically use the optimizedValue everywhere in the component.\n */\n\n/** Composition keywords that hold a list of schemas and can be flattened when they contain a single member. */\nconst SINGLE_ITEM_COMPOSITIONS = ['oneOf', 'anyOf', 'allOf'] as const\n\nconst props = withDefaults(\n defineProps<{\n is?: string | Component\n schema: SchemaObject | undefined\n noncollapsible?: boolean\n level?: number\n name?: string\n required?: boolean\n compact?: boolean\n discriminator?: DiscriminatorObject\n description?: string\n hideModelNames?: boolean\n hideHeading?: boolean\n /** When the root schema was resolved from a $ref, pass the ref name for display (e.g. \"Data\"). */\n modelName?: string | null\n variant?: 'additionalProperties' | 'patternProperties'\n breadcrumb?: string[]\n eventBus: WorkspaceEventBus | null\n options: SchemaOptions\n /** Enum values for property names (from JSON Schema propertyNames keyword). */\n propertyNamesEnum?: string[]\n /** Resolved propertyNames schema, used to show key constraints like `format`. */\n propertyNamesSchema?: SchemaObject\n /** When \"requestBody\", composition selection is synced with the example snippet */\n schemaContext?: string\n /** Internal path used to sync nested request body compositions with the code sample */\n compositionPath?: string[]\n /** Internal path segment for this property when building nested composition keys */\n compositionPathSegment?: string\n /** Stable identity of this property's schema, used for cycle detection. */\n cycleKey?: unknown\n }>(),\n {\n level: 0,\n required: false,\n compact: false,\n hideModelNames: false,\n },\n)\n\n/** Simplified composition with `null` type. */\nconst optimizedValue = computed(() => optimizeValueForDisplay(props.schema))\n\nconst childBreadcrumb = computed<string[] | undefined>(() =>\n props.breadcrumb && props.name\n ? [...props.breadcrumb, props.name]\n : undefined,\n)\n\nconst currentCompositionPath = computed<string[]>(() =>\n props.compositionPathSegment\n ? [...(props.compositionPath ?? []), props.compositionPathSegment]\n : (props.compositionPath ?? []),\n)\n\nconst arrayItemsCompositionPath = computed<string[]>(() => [\n ...currentCompositionPath.value,\n 'items',\n])\n\nconst shouldHaveLink = computed(() => props.level <= 2)\n\n/** Checks if array items have complex structure */\nconst hasComplexArrayItemsComputed = computed(() =>\n hasComplexArrayItems(optimizedValue.value),\n)\n\n/** Check if enum should be displayed (from value schema or from propertyNames) */\nconst hasEnum = computed(() => enumValues.value.length > 0)\n\n/** Determine if object properties should be displayed */\nconst shouldRenderObjectProperties = computed(() => {\n const value = optimizedValue.value\n if (!value) {\n return false\n }\n\n if (!('properties' in value || 'additionalProperties' in value)) {\n return false\n }\n\n // `allOf` already merges the factored-out sibling `properties` into its\n // rendered result (see `mergeAllOfSchemas`), so rendering a separate object\n // block here would show those properties twice. Let the composition handle it.\n if ('allOf' in value) {\n return false\n }\n\n // A schema may factor its common `properties` out to the top level alongside\n // a composition keyword (anyOf/oneOf/not), as described in the JSON Schema\n // \"factoring schemas\" guide. `isTypeObject` deliberately rejects such schemas\n // so the composition is rendered, but the factored-out properties must still\n // show. Unlike `allOf`, these compositions do not merge sibling properties.\n // Render them unless the schema is an explicit non-object (scalar or array)\n // type. See https://github.com/scalar/scalar/issues/8593\n const type = (value as { type?: unknown }).type\n const isExplicitNonObject = typeof type === 'string' && type !== 'object'\n\n return isTypeObject(value) || !isExplicitNonObject\n})\n\n/** Determine if array of objects should be rendered */\nconst shouldRenderArrayOfObjects = computed(() => {\n const value = optimizedValue.value\n if (!value || !isArraySchema(value) || typeof value.items !== 'object') {\n return false\n }\n\n return hasComplexArrayItemsComputed.value\n})\n\n/** Extract enum values from schema or array items */\nconst enumValues = computed(() => getEnumValues(optimizedValue.value))\n\n/** Generate property description from type/format */\nconst propertyDescription = computed(() =>\n getPropertyDescription(optimizedValue.value),\n)\n\n/** Determine if description should be displayed */\nconst displayDescription = computed(() =>\n shouldDisplayDescription(optimizedValue.value, props.description),\n)\n\n/**\n * The schema used to render the object's own properties.\n *\n * Composition keywords are stripped so the nested object renders only its\n * properties. The compositions are rendered separately below; leaving them here\n * would route the nested `Schema` back through `SchemaProperty` and recurse.\n *\n * When the property already renders the description, we also drop it to avoid\n * repeating it in the nested object schema card.\n */\nconst objectSchemaForChildren = computed(() => {\n const value = optimizedValue.value\n if (!value) {\n return value\n }\n\n const {\n oneOf: _oneOf,\n anyOf: _anyOf,\n allOf: _allOf,\n not: _not,\n ...objectSchema\n } = value as Record<string, unknown>\n\n if (displayDescription.value && 'description' in objectSchema) {\n const { description: _description, ...schemaWithoutDescription } =\n objectSchema\n return schemaWithoutDescription as SchemaObject\n }\n\n return objectSchema as SchemaObject\n})\n\n/** Determine if property heading should be displayed */\nconst shouldDisplayHeadingComputed = computed(() =>\n shouldDisplayHeading(optimizedValue.value, props.name, props.required),\n)\n\n/** Computes which compositions should be rendered and with which values */\nconst compositionsToRender = computed(() =>\n getCompositionsToRender(optimizedValue.value, props.options.document),\n)\n\n/**\n * Get resolved array items for rendering.\n *\n * When the items are wrapped in a single-item composition (e.g. `items: { allOf: [{ type: 'object', ... }] }`), we\n * flatten that wrapper into its plain form. A composition with a single member is equivalent to that member, so\n * keeping the composition keyword only makes the items render through an extra schema layer, which adds an\n * unnecessary level of nesting and duplicates the item description. See https://github.com/scalar/scalar/issues/5900\n */\nconst resolvedArrayItems = computed(() => {\n const value = optimizedValue.value\n if (!value || !isArraySchema(value) || typeof value.items !== 'object') {\n return undefined\n }\n\n const items = resolve.schema(value.items)\n const hasSingleItemComposition = SINGLE_ITEM_COMPOSITIONS.some(\n (keyword) =>\n Array.isArray(items?.[keyword]) && items[keyword]?.length === 1,\n )\n\n return hasSingleItemComposition ? optimizeValueForDisplay(items) : items\n})\n\n/**\n * Cycle key for the array items schema, derived from the raw (unresolved) items\n * so a self-referential array element is detected as a cycle.\n */\nconst arrayItemsCycleKey = computed(() => {\n const value = optimizedValue.value\n if (!value || !isArraySchema(value)) {\n return undefined\n }\n return getCycleKey(value.items)\n})\n\n/** Check if discriminator matches current property */\nconst isDiscriminatorProperty = computed(() =>\n Boolean(props.name && props.discriminator?.propertyName === props.name),\n)\n</script>\n<template>\n <component\n :is=\"is ?? 'li'\"\n class=\"property\"\n :class=\"[\n `property--level-${level}`,\n {\n 'property--compact': compact,\n 'property--deprecated': optimizedValue?.deprecated,\n },\n ]\">\n <SchemaPropertyHeading\n v-if=\"shouldDisplayHeadingComputed\"\n class=\"group\"\n :enum=\"hasEnum\"\n :eventBus=\"eventBus\"\n :hideModelNames\n :isDiscriminator=\"isDiscriminatorProperty\"\n :modelName=\"modelName\"\n :propertyNames=\"propertyNamesSchema\"\n :required\n :value=\"optimizedValue\">\n <template\n v-if=\"name\"\n #name>\n <WithBreadcrumb\n :breadcrumb=\"shouldHaveLink ? childBreadcrumb : undefined\"\n :eventBus=\"eventBus\">\n <span\n v-if=\"variant === 'patternProperties'\"\n class=\"property-name-pattern-properties\">\n <ScalarWrappingText\n preset=\"property\"\n :text=\"name\" />\n </span>\n <span\n v-else-if=\"variant === 'additionalProperties'\"\n class=\"property-name-additional-properties\">\n <ScalarWrappingText\n preset=\"property\"\n :text=\"name\" />\n </span>\n <ScalarWrappingText\n v-else\n preset=\"property\"\n :text=\"name\" />\n </WithBreadcrumb>\n </template>\n <template\n v-if=\"optimizedValue?.example !== undefined\"\n #example>\n Example:\n {{ optimizedValue.example }}\n </template>\n </SchemaPropertyHeading>\n\n <!-- Description -->\n <div\n v-if=\"displayDescription || propertyDescription\"\n class=\"property-description\">\n <ScalarMarkdown\n :value=\"displayDescription || propertyDescription || ''\" />\n </div>\n\n <!-- Enum for property names -->\n <SchemaEnums\n v-if=\"propertyNamesEnum && propertyNamesEnum.length > 0\"\n propertyNames\n :value=\"{ enum: propertyNamesEnum } as SchemaObject\" />\n\n <!-- Enum values -->\n <SchemaEnums\n v-if=\"enumValues.length > 0\"\n :value=\"optimizedValue\" />\n\n <!-- Object -->\n <div\n v-if=\"shouldRenderObjectProperties\"\n class=\"children\">\n <Schema\n :breadcrumb=\"childBreadcrumb\"\n :compact=\"compact\"\n :compositionPath=\"currentCompositionPath\"\n :cycleKey=\"cycleKey\"\n :eventBus=\"eventBus\"\n :hideModelNames\n :level=\"level + 1\"\n :name=\"name\"\n :noncollapsible=\"noncollapsible\"\n :options=\"options\"\n :schema=\"objectSchemaForChildren\"\n :schemaContext=\"schemaContext\" />\n </div>\n\n <!-- Array of objects or nested arrays -->\n <div\n v-if=\"shouldRenderArrayOfObjects && resolvedArrayItems\"\n class=\"children\">\n <Schema\n :compact=\"compact\"\n :compositionPath=\"arrayItemsCompositionPath\"\n :cycleKey=\"arrayItemsCycleKey\"\n :eventBus=\"eventBus\"\n :hideModelNames\n :level=\"level + 1\"\n :name=\"name\"\n :noncollapsible=\"noncollapsible\"\n :options=\"options\"\n :schema=\"resolve.schema(resolvedArrayItems)\"\n :schemaContext=\"schemaContext\" />\n </div>\n\n <!-- Compositions -->\n <SchemaComposition\n v-for=\"compositionData in compositionsToRender\"\n :key=\"compositionData.composition\"\n :breadcrumb=\"breadcrumb\"\n :compact=\"compact\"\n :composition=\"compositionData.composition\"\n :compositionPath=\"currentCompositionPath\"\n :discriminator=\"schema?.discriminator\"\n :eventBus=\"eventBus\"\n :hideHeading=\"hideHeading\"\n :hideModelNames\n :level=\"level\"\n :name=\"name\"\n :noncollapsible=\"noncollapsible\"\n :options=\"options\"\n :schema=\"compositionData.value\"\n :schemaContext=\"schemaContext\" />\n <SpecificationExtension :value=\"optimizedValue\" />\n </component>\n</template>\n\n<style scoped>\n.property {\n color: var(--scalar-color-1);\n display: flex;\n flex-direction: column;\n padding: 10px;\n font-size: var(--scalar-small);\n position: relative;\n}\n\n/** Remove top padding for top level schema card */\n.property.property--level-0:has(\n > .property-rule\n > .schema-card\n > .schema-properties.schema-properties-open\n > ul\n > li.property\n ) {\n padding-top: 0;\n}\n\n.property--compact.property--level-0,\n.property--compact.property--level-1 {\n padding: 10px 0;\n}\n\n.composition-panel .property.property.property.property--level-0 {\n padding: 0px;\n}\n\n.property--compact.property--level-0\n .composition-panel\n .property--compact.property--level-1 {\n padding: 8px;\n}\n\n/* if a property doesn't have a heading, remove the top padding */\n.property:has(> .property-rule:nth-of-type(1)):not(.property--compact) {\n padding-top: 8px;\n padding-bottom: 8px;\n}\n\n.property--deprecated {\n background: repeating-linear-gradient(\n -45deg,\n var(--scalar-background-2) 0,\n var(--scalar-background-2) 2px,\n transparent 2px,\n transparent 5px\n );\n background-size: 100%;\n}\n\n.property--deprecated > * {\n opacity: 0.75;\n}\n\n.property-description {\n margin-top: 6px;\n line-height: 1.4;\n font-size: var(--scalar-small);\n}\n\n.property-description:has(+ .property-rule) {\n margin-bottom: 9px;\n}\n\n:deep(.property-description) * {\n color: var(--scalar-color-2) !important;\n}\n\n.property:not(:last-of-type) {\n border-bottom: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n\n.property-description + .children,\n.children + .property-rule {\n margin-top: 9px;\n}\n\n.children {\n display: flex;\n flex-direction: column;\n}\n\n.children .property--compact.property--level-1 {\n padding: 12px;\n}\n\n.property-example-value {\n all: unset;\n font-family: var(--scalar-font-code);\n padding: 6px;\n border-top: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n\n.property-rule {\n border-radius: var(--scalar-radius-lg);\n display: flex;\n flex-direction: column;\n}\n\n.property--level-2 :deep(.relative > button) {\n left: -2rem;\n}\n\n.property-rule\n :deep(\n .composition-panel\n .schema-card--level-1\n > .schema-properties.schema-properties-open\n ) {\n border-radius: 0 0 var(--scalar-radius-lg) var(--scalar-radius-lg);\n}\n\n.property-rule\n :deep(.composition-panel > .schema-card > .schema-card-description) {\n padding: 10px;\n border-left: var(--scalar-border-width) solid var(--scalar-border-color);\n border-right: var(--scalar-border-width) solid var(--scalar-border-color);\n\n & + .schema-properties {\n margin-top: 0;\n }\n}\n\n.property-example {\n background: transparent;\n border: none;\n display: flex;\n flex-direction: row;\n gap: 8px;\n}\n\n.property-example-label,\n.property-example-value {\n padding: 3px 0 0 0;\n}\n\n.property-example-value {\n background: var(--scalar-background-2);\n border-top: 0;\n border-radius: var(--scalar-radius);\n padding: 3px 4px;\n}\n\n.property-name {\n font-family: var(--scalar-font-code);\n font-weight: var(--scalar-semibold);\n}\n\n.property-name-additional-properties::before,\n.property-name-pattern-properties::before {\n text-transform: uppercase;\n font-size: var(--scalar-micro);\n display: inline-block;\n padding: 2px 4px;\n border-radius: var(--scalar-radius);\n color: var(--scalar-color-1);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n background-color: var(--scalar-background-2);\n margin-right: 4px;\n}\n\n.property-name-pattern-properties::before {\n content: 'regex';\n}\n\n.property-name-additional-properties,\n.property-name-pattern-properties {\n border: 1px dashed var(--scalar-border-color);\n color: var(--scalar-color-accent);\n display: inline-block;\n padding: 2px;\n border-radius: var(--scalar-radius);\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsCA,MAAM,2BAA2B;GAAC;GAAS;GAAS;GAAQ;EAE5D,MAAM,QAAQ;;EAyCd,MAAM,iBAAiB,eAAe,wBAAwB,MAAM,OAAO,CAAA;EAE3E,MAAM,kBAAkB,eACtB,MAAM,cAAc,MAAM,OACtB,CAAC,GAAG,MAAM,YAAY,MAAM,KAAI,GAChC,KAAA,EACN;EAEA,MAAM,yBAAyB,eAC7B,MAAM,yBACF,CAAC,GAAI,MAAM,mBA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A;MACV,gBAAA,QAAA;MACA,OAAO,QAAA,QAAK;MACZ,MAAM,QAAA;MACN,gBAAgB,QAAA;MAChB,SAAS,QAAA;MACT,QAAQ,MAAA,QAAO,CAAC,OAAO,mBAAA,MAAkB;MACzC,eAAe,QAAA;;;;;;;;;;;;;;uBAIpB,mBAgBmC,UAAA,MAAA,WAfP,qBAAA,QAAnB,oBAAe;0BADxB,YAgBmC,2BAAA;OAdhC,KAAK,gBAAgB;OACrB,YAAY,QAAA;OACZ,SAAS,QAAA;OACT,aAAa,gBAAgB;OAC7B,iBAAiB,uBAAA;OACjB,eAAe,QAAA,QAAQ;OACvB,UAAU,QAAA;OACV,aAAa,QAAA;OACb,gBAAA,QAAA;OACA,OAAO,QAAA;OACP,MAAM,QAAA;OACN,gBAAgB,QAAA;OAChB,SAAS,QAAA;OACT,QAAQ,gBAAgB;OACxB,eAAe,QAAA;;;;;;;;;;;;;;;;;;KAClB,YAAkD,MAAA,+BAAA,EAAA,EAAzB,OAAO,eAAA,OAAc,EAAA,MAAA,GAAA,CAAA,QAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaPropertyDefault.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaPropertyDefault.vue"],"names":[],"mappings":"AAwHA,KAAK,WAAW,GAAG;IACjB,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,CAAC;AA+FF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"SchemaPropertyDefault.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaPropertyDefault.vue"],"names":[],"mappings":"AA6HA,KAAK,WAAW,GAAG;IACjB,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,CAAC;AAkGF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -2,7 +2,7 @@ import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_exp
2
2
  import SchemaPropertyDefault_vue_vue_type_script_setup_true_lang_default from "./SchemaPropertyDefault.vue.script.js";
3
3
  /* empty css */
4
4
  //#region src/components/Content/Schema/SchemaPropertyDefault.vue
5
- var SchemaPropertyDefault_default = /* @__PURE__ */ _plugin_vue_export_helper_default(SchemaPropertyDefault_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-5f65dcf4"]]);
5
+ var SchemaPropertyDefault_default = /* @__PURE__ */ _plugin_vue_export_helper_default(SchemaPropertyDefault_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-cc878a44"]]);
6
6
  //#endregion
7
7
  export { SchemaPropertyDefault_default as default };
8
8
 
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaPropertyDefault.vue.js","names":[],"sources":["../../../../src/components/Content/Schema/SchemaPropertyDefault.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarIcon } from '@scalar/components/icon'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\n\nimport { formatValue } from './helpers/format-value'\n\ndefineProps<{\n value?: unknown\n}>()\n\nconst { copyToClipboard } = useClipboard()\n</script>\n<template>\n <template v-if=\"value !== undefined\">\n <div class=\"property-default\">\n <button\n class=\"property-default-label\"\n type=\"button\">\n <span>Default</span>\n </button>\n <div class=\"property-default-value-list\">\n <button\n class=\"property-default-value group\"\n type=\"button\"\n @click=\"copyToClipboard(formatValue(value))\">\n <span>\n {{ formatValue(value) }}\n </span>\n <ScalarIcon\n class=\"group-hover:text-c-1 text-c-3 ml-auto min-h-3 min-w-3\"\n icon=\"Clipboard\"\n size=\"xs\" />\n </button>\n </div>\n </div>\n </template>\n</template>\n\n<style scoped>\n.property-default {\n display: flex;\n flex-direction: column;\n font-size: var(--scalar-mini);\n position: relative;\n}\n.property-default:hover:before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 20px;\n border-radius: var(--scalar-radius);\n}\n.property-default:hover .property-default-label span {\n color: var(--scalar-color-1);\n}\n.property-default-label span {\n color: var(--scalar-color-3);\n position: relative;\n border-bottom: var(--scalar-border-width) dotted currentColor;\n}\n.property-default-value {\n font-family: var(--scalar-font-code);\n display: flex;\n gap: 8px;\n align-items: center;\n width: 100%;\n padding: 6px;\n}\n.property-default-value span {\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.property-default-value :deep(svg) {\n color: var(--scalar-color-3);\n}\n\n.property-default-value:hover :deep(svg) {\n color: var(--scalar-color-1);\n}\n\n.property-default-value {\n background: var(--scalar-background-2);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n border-radius: var(--scalar-radius);\n}\n.property-default-value-list {\n position: absolute;\n top: 18px;\n left: 50%;\n transform: translate3d(-50%, 0, 0);\n overflow: auto;\n background-color: var(--scalar-background-1);\n box-shadow: var(--scalar-shadow-1);\n border-radius: var(--scalar-radius-lg);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n padding: 9px;\n min-width: 200px;\n max-width: 300px;\n flex-direction: column;\n gap: 3px;\n display: none;\n z-index: 2;\n}\n.property-default:hover .property-default-value-list,\n.property-default:focus-within .property-default-value-list {\n display: flex;\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"SchemaPropertyDefault.vue.js","names":[],"sources":["../../../../src/components/Content/Schema/SchemaPropertyDefault.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarIcon } from '@scalar/components/icon'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\n\nimport { useLocalization } from '@/features/localization'\n\nimport { formatValue } from './helpers/format-value'\n\ndefineProps<{\n value?: unknown\n}>()\n\nconst { copyToClipboard } = useClipboard()\nconst { translate } = useLocalization()\n</script>\n<template>\n <template v-if=\"value !== undefined\">\n <div class=\"property-default\">\n <button\n class=\"property-default-label\"\n type=\"button\">\n <span>{{ translate('schema.default') }}</span>\n </button>\n <div class=\"property-default-value-list\">\n <button\n class=\"property-default-value group\"\n type=\"button\"\n @click=\"copyToClipboard(formatValue(value))\">\n <span>\n {{ formatValue(value) }}\n </span>\n <ScalarIcon\n class=\"group-hover:text-c-1 text-c-3 ml-auto min-h-3 min-w-3\"\n icon=\"Clipboard\"\n size=\"xs\" />\n </button>\n </div>\n </div>\n </template>\n</template>\n\n<style scoped>\n.property-default {\n display: flex;\n flex-direction: column;\n font-size: var(--scalar-mini);\n position: relative;\n}\n.property-default:hover:before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 20px;\n border-radius: var(--scalar-radius);\n}\n.property-default:hover .property-default-label span {\n color: var(--scalar-color-1);\n}\n.property-default-label span {\n color: var(--scalar-color-3);\n position: relative;\n border-bottom: var(--scalar-border-width) dotted currentColor;\n}\n.property-default-value {\n font-family: var(--scalar-font-code);\n display: flex;\n gap: 8px;\n align-items: center;\n width: 100%;\n padding: 6px;\n}\n.property-default-value span {\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.property-default-value :deep(svg) {\n color: var(--scalar-color-3);\n}\n\n.property-default-value:hover :deep(svg) {\n color: var(--scalar-color-1);\n}\n\n.property-default-value {\n background: var(--scalar-background-2);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n border-radius: var(--scalar-radius);\n}\n.property-default-value-list {\n position: absolute;\n top: 18px;\n left: 50%;\n transform: translate3d(-50%, 0, 0);\n overflow: auto;\n background-color: var(--scalar-background-1);\n box-shadow: var(--scalar-shadow-1);\n border-radius: var(--scalar-radius-lg);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n padding: 9px;\n min-width: 200px;\n max-width: 300px;\n flex-direction: column;\n gap: 3px;\n display: none;\n z-index: 2;\n}\n.property-default:hover .property-default-value-list,\n.property-default:focus-within .property-default-value-list {\n display: flex;\n}\n</style>\n"],"mappings":""}
@@ -1,3 +1,4 @@
1
+ import { useLocalization } from "../../../features/localization/use-localization.js";
1
2
  import { formatValue } from "./helpers/format-value.js";
2
3
  import { createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, openBlock, toDisplayString, unref } from "vue";
3
4
  import { useClipboard } from "@scalar/use-hooks/useClipboard";
@@ -7,17 +8,19 @@ var _hoisted_1 = {
7
8
  key: 0,
8
9
  class: "property-default"
9
10
  };
10
- var _hoisted_2 = { class: "property-default-value-list" };
11
+ var _hoisted_2 = {
12
+ class: "property-default-label",
13
+ type: "button"
14
+ };
15
+ var _hoisted_3 = { class: "property-default-value-list" };
11
16
  var SchemaPropertyDefault_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
12
17
  __name: "SchemaPropertyDefault",
13
18
  props: { value: {} },
14
19
  setup(__props) {
15
20
  const { copyToClipboard } = useClipboard();
21
+ const { translate } = useLocalization();
16
22
  return (_ctx, _cache) => {
17
- return __props.value !== void 0 ? (openBlock(), createElementBlock("div", _hoisted_1, [_cache[1] || (_cache[1] = createElementVNode("button", {
18
- class: "property-default-label",
19
- type: "button"
20
- }, [createElementVNode("span", null, "Default")], -1)), createElementVNode("div", _hoisted_2, [createElementVNode("button", {
23
+ return __props.value !== void 0 ? (openBlock(), createElementBlock("div", _hoisted_1, [createElementVNode("button", _hoisted_2, [createElementVNode("span", null, toDisplayString(unref(translate)("schema.default")), 1)]), createElementVNode("div", _hoisted_3, [createElementVNode("button", {
21
24
  class: "property-default-value group",
22
25
  type: "button",
23
26
  onClick: _cache[0] || (_cache[0] = ($event) => unref(copyToClipboard)(unref(formatValue)(__props.value)))
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaPropertyDefault.vue.script.js","names":[],"sources":["../../../../src/components/Content/Schema/SchemaPropertyDefault.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarIcon } from '@scalar/components/icon'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\n\nimport { formatValue } from './helpers/format-value'\n\ndefineProps<{\n value?: unknown\n}>()\n\nconst { copyToClipboard } = useClipboard()\n</script>\n<template>\n <template v-if=\"value !== undefined\">\n <div class=\"property-default\">\n <button\n class=\"property-default-label\"\n type=\"button\">\n <span>Default</span>\n </button>\n <div class=\"property-default-value-list\">\n <button\n class=\"property-default-value group\"\n type=\"button\"\n @click=\"copyToClipboard(formatValue(value))\">\n <span>\n {{ formatValue(value) }}\n </span>\n <ScalarIcon\n class=\"group-hover:text-c-1 text-c-3 ml-auto min-h-3 min-w-3\"\n icon=\"Clipboard\"\n size=\"xs\" />\n </button>\n </div>\n </div>\n </template>\n</template>\n\n<style scoped>\n.property-default {\n display: flex;\n flex-direction: column;\n font-size: var(--scalar-mini);\n position: relative;\n}\n.property-default:hover:before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 20px;\n border-radius: var(--scalar-radius);\n}\n.property-default:hover .property-default-label span {\n color: var(--scalar-color-1);\n}\n.property-default-label span {\n color: var(--scalar-color-3);\n position: relative;\n border-bottom: var(--scalar-border-width) dotted currentColor;\n}\n.property-default-value {\n font-family: var(--scalar-font-code);\n display: flex;\n gap: 8px;\n align-items: center;\n width: 100%;\n padding: 6px;\n}\n.property-default-value span {\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.property-default-value :deep(svg) {\n color: var(--scalar-color-3);\n}\n\n.property-default-value:hover :deep(svg) {\n color: var(--scalar-color-1);\n}\n\n.property-default-value {\n background: var(--scalar-background-2);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n border-radius: var(--scalar-radius);\n}\n.property-default-value-list {\n position: absolute;\n top: 18px;\n left: 50%;\n transform: translate3d(-50%, 0, 0);\n overflow: auto;\n background-color: var(--scalar-background-1);\n box-shadow: var(--scalar-shadow-1);\n border-radius: var(--scalar-radius-lg);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n padding: 9px;\n min-width: 200px;\n max-width: 300px;\n flex-direction: column;\n gap: 3px;\n display: none;\n z-index: 2;\n}\n.property-default:hover .property-default-value-list,\n.property-default:focus-within .property-default-value-list {\n display: flex;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;EAUA,MAAM,EAAE,oBAAoB,cAAa;;UAGvB,QAAA,UAAU,KAAA,KAAA,WAAA,EACxB,mBAoBM,OApBN,YAoBM,CAAA,OAAA,OAAA,OAAA,KAnBJ,mBAIS,UAAA;IAHP,OAAM;IACN,MAAK;OACL,mBAAoB,QAAA,MAAd,UAAO,CAAA,EAAA,GAAA,GAEf,mBAaM,OAbN,YAaM,CAZJ,mBAWS,UAAA;IAVP,OAAM;IACN,MAAK;IACJ,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,MAAA,gBAAe,CAAC,MAAA,YAAW,CAAC,QAAA,MAAK,CAAA;OACzC,mBAEO,QAAA,MAAA,gBADF,MAAA,YAAW,CAAC,QAAA,MAAK,CAAA,EAAA,EAAA,EAEtB,YAGc,MAAA,WAAA,EAAA;IAFZ,OAAM;IACN,MAAK;IACL,MAAK"}
1
+ {"version":3,"file":"SchemaPropertyDefault.vue.script.js","names":[],"sources":["../../../../src/components/Content/Schema/SchemaPropertyDefault.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarIcon } from '@scalar/components/icon'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\n\nimport { useLocalization } from '@/features/localization'\n\nimport { formatValue } from './helpers/format-value'\n\ndefineProps<{\n value?: unknown\n}>()\n\nconst { copyToClipboard } = useClipboard()\nconst { translate } = useLocalization()\n</script>\n<template>\n <template v-if=\"value !== undefined\">\n <div class=\"property-default\">\n <button\n class=\"property-default-label\"\n type=\"button\">\n <span>{{ translate('schema.default') }}</span>\n </button>\n <div class=\"property-default-value-list\">\n <button\n class=\"property-default-value group\"\n type=\"button\"\n @click=\"copyToClipboard(formatValue(value))\">\n <span>\n {{ formatValue(value) }}\n </span>\n <ScalarIcon\n class=\"group-hover:text-c-1 text-c-3 ml-auto min-h-3 min-w-3\"\n icon=\"Clipboard\"\n size=\"xs\" />\n </button>\n </div>\n </div>\n </template>\n</template>\n\n<style scoped>\n.property-default {\n display: flex;\n flex-direction: column;\n font-size: var(--scalar-mini);\n position: relative;\n}\n.property-default:hover:before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 20px;\n border-radius: var(--scalar-radius);\n}\n.property-default:hover .property-default-label span {\n color: var(--scalar-color-1);\n}\n.property-default-label span {\n color: var(--scalar-color-3);\n position: relative;\n border-bottom: var(--scalar-border-width) dotted currentColor;\n}\n.property-default-value {\n font-family: var(--scalar-font-code);\n display: flex;\n gap: 8px;\n align-items: center;\n width: 100%;\n padding: 6px;\n}\n.property-default-value span {\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.property-default-value :deep(svg) {\n color: var(--scalar-color-3);\n}\n\n.property-default-value:hover :deep(svg) {\n color: var(--scalar-color-1);\n}\n\n.property-default-value {\n background: var(--scalar-background-2);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n border-radius: var(--scalar-radius);\n}\n.property-default-value-list {\n position: absolute;\n top: 18px;\n left: 50%;\n transform: translate3d(-50%, 0, 0);\n overflow: auto;\n background-color: var(--scalar-background-1);\n box-shadow: var(--scalar-shadow-1);\n border-radius: var(--scalar-radius-lg);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n padding: 9px;\n min-width: 200px;\n max-width: 300px;\n flex-direction: column;\n gap: 3px;\n display: none;\n z-index: 2;\n}\n.property-default:hover .property-default-value-list,\n.property-default:focus-within .property-default-value-list {\n display: flex;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;EAYA,MAAM,EAAE,oBAAoB,cAAa;EACzC,MAAM,EAAE,cAAc,iBAAgB;;UAGpB,QAAA,UAAU,KAAA,KAAA,WAAA,EACxB,mBAoBM,OApBN,YAoBM,CAnBJ,mBAIS,UAJT,YAIS,CADP,mBAA8C,QAAA,MAAA,gBAArC,MAAA,UAAS,CAAA,iBAAA,CAAA,EAAA,EAAA,CAAA,CAAA,EAEpB,mBAaM,OAbN,YAaM,CAZJ,mBAWS,UAAA;IAVP,OAAM;IACN,MAAK;IACJ,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,MAAA,gBAAe,CAAC,MAAA,YAAW,CAAC,QAAA,MAAK,CAAA;OACzC,mBAEO,QAAA,MAAA,gBADF,MAAA,YAAW,CAAC,QAAA,MAAK,CAAA,EAAA,EAAA,EAEtB,YAGc,MAAA,WAAA,EAAA;IAFZ,OAAM;IACN,MAAK;IACL,MAAK"}
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaPropertyExamples.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaPropertyExamples.vue"],"names":[],"mappings":"AAmLA,KAAK,WAAW,GAAG;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAC;AAyMF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"SchemaPropertyExamples.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaPropertyExamples.vue"],"names":[],"mappings":"AA0LA,KAAK,WAAW,GAAG;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAC;AA8MF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -2,7 +2,7 @@ import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_exp
2
2
  import SchemaPropertyExamples_vue_vue_type_script_setup_true_lang_default from "./SchemaPropertyExamples.vue.script.js";
3
3
  /* empty css */
4
4
  //#region src/components/Content/Schema/SchemaPropertyExamples.vue
5
- var SchemaPropertyExamples_default = /* @__PURE__ */ _plugin_vue_export_helper_default(SchemaPropertyExamples_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-6952a15a"]]);
5
+ var SchemaPropertyExamples_default = /* @__PURE__ */ _plugin_vue_export_helper_default(SchemaPropertyExamples_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-370db0bd"]]);
6
6
  //#endregion
7
7
  export { SchemaPropertyExamples_default as default };
8
8
 
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaPropertyExamples.vue.js","names":[],"sources":["../../../../src/components/Content/Schema/SchemaPropertyExamples.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarIcon } from '@scalar/components/icon'\nimport { isObject } from '@scalar/helpers/object/is-object'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\nimport { computed } from 'vue'\n\nimport LinkButton from '@/components/Content/Schema/LinkButton.vue'\n\nimport { formatExample } from './helpers/format-example'\n\nconst { examples, example } = defineProps<{\n examples?: unknown\n example?: unknown\n}>()\n\nconst { copyToClipboard } = useClipboard()\n\n// `null` is a meaningful example value for nullable schemas, so only treat\n// `undefined` as \"not provided\".\nconst hasSingleExample = computed(() => example !== undefined)\n\nconst normalizedExamples = computed<Record<string, unknown>>(() => {\n if (examples && typeof examples === 'object') {\n return examples as Record<string, unknown>\n }\n\n return {}\n})\n\nconst hasMultipleExamples = computed(\n () => Object.keys(normalizedExamples.value).length > 0,\n)\n\nconst multipleExamplesLabel = computed(() =>\n Object.keys(normalizedExamples.value).length === 1 ? 'Example' : 'Examples',\n)\n\n/**\n * Unwrap an OpenAPI 3 Example Object (`{ value, externalValue, summary, description }`)\n * to the actual sample. Plain values pass through untouched.\n */\nfunction unwrapExampleObject(value: unknown): unknown {\n if (isObject(value)) {\n if ('value' in value) {\n return value.value\n }\n if ('externalValue' in value) {\n return (value as { externalValue: unknown }).externalValue\n }\n }\n return value\n}\n</script>\n<template>\n <!-- single example (deprecated) -->\n <template v-if=\"hasSingleExample\">\n <div class=\"property-example\">\n <LinkButton class=\"decoration-dotted\">Example</LinkButton>\n <div class=\"property-example-value-list\">\n <button\n class=\"property-example-value group\"\n type=\"button\"\n @click=\"copyToClipboard(formatExample(example))\">\n <span>\n {{ formatExample(example) }}\n </span>\n <ScalarIcon\n class=\"group-hover:text-c-1 text-c-3 ml-auto min-h-3 min-w-3\"\n icon=\"Clipboard\"\n size=\"xs\" />\n </button>\n </div>\n </div>\n </template>\n\n <!-- multiple examples -->\n <template v-if=\"hasMultipleExamples\">\n <div class=\"property-example\">\n <LinkButton class=\"decoration-dotted\">\n {{ multipleExamplesLabel }}\n </LinkButton>\n <div class=\"property-example-value-list\">\n <button\n v-for=\"(ex, key) in normalizedExamples\"\n :key=\"key\"\n class=\"property-example-value group\"\n type=\"button\"\n @click=\"copyToClipboard(formatExample(unwrapExampleObject(ex)))\">\n <span>{{ formatExample(unwrapExampleObject(ex)) }} </span>\n <ScalarIcon\n class=\"text-c-3 group-hover:text-c-1 ml-auto min-h-3 min-w-3\"\n icon=\"Clipboard\"\n size=\"xs\" />\n </button>\n </div>\n </div>\n </template>\n</template>\n\n<style scoped>\n@reference \"../../../style.css\";\n\n.property-example {\n display: flex;\n flex-direction: column;\n font-size: var(--scalar-mini);\n position: relative;\n}\n.property-example:hover:before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 20px;\n border-radius: var(--scalar-radius);\n}\n.property-example-value {\n font-family: var(--scalar-font-code);\n display: flex;\n gap: 8px;\n align-items: center;\n width: 100%;\n padding: 6px;\n}\n.property-example-value span {\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.property-example-value :deep(svg) {\n color: var(--scalar-color-3);\n}\n\n.property-example-value:hover :deep(svg) {\n color: var(--scalar-color-1);\n}\n\n.property-example-value {\n background: var(--scalar-background-2);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n border-radius: var(--scalar-radius);\n}\n.property-example-value-list {\n position: absolute;\n top: 18px;\n left: 50%;\n transform: translate3d(-50%, 0, 0);\n overflow: auto;\n background-color: var(--scalar-background-1);\n box-shadow: var(--scalar-shadow-1);\n border-radius: var(--scalar-radius-lg);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n padding: 9px;\n min-width: 200px;\n max-width: 300px;\n flex-direction: column;\n gap: 3px;\n display: none;\n @apply z-context;\n}\n.property-example:hover .property-example-value-list,\n.property-example:focus-within .property-example-value-list {\n display: flex;\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"SchemaPropertyExamples.vue.js","names":[],"sources":["../../../../src/components/Content/Schema/SchemaPropertyExamples.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarIcon } from '@scalar/components/icon'\nimport { isObject } from '@scalar/helpers/object/is-object'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\nimport { computed } from 'vue'\n\nimport LinkButton from '@/components/Content/Schema/LinkButton.vue'\nimport { useLocalization } from '@/features/localization'\n\nimport { formatExample } from './helpers/format-example'\n\nconst { examples, example } = defineProps<{\n examples?: unknown\n example?: unknown\n}>()\n\nconst { copyToClipboard } = useClipboard()\nconst { translate } = useLocalization()\n\n// `null` is a meaningful example value for nullable schemas, so only treat\n// `undefined` as \"not provided\".\nconst hasSingleExample = computed(() => example !== undefined)\n\nconst normalizedExamples = computed<Record<string, unknown>>(() => {\n if (examples && typeof examples === 'object') {\n return examples as Record<string, unknown>\n }\n\n return {}\n})\n\nconst hasMultipleExamples = computed(\n () => Object.keys(normalizedExamples.value).length > 0,\n)\n\nconst multipleExamplesLabel = computed(() =>\n Object.keys(normalizedExamples.value).length === 1\n ? translate('schema.example')\n : translate('schema.examples'),\n)\n\n/**\n * Unwrap an OpenAPI 3 Example Object (`{ value, externalValue, summary, description }`)\n * to the actual sample. Plain values pass through untouched.\n */\nfunction unwrapExampleObject(value: unknown): unknown {\n if (isObject(value)) {\n if ('value' in value) {\n return value.value\n }\n if ('externalValue' in value) {\n return (value as { externalValue: unknown }).externalValue\n }\n }\n return value\n}\n</script>\n<template>\n <!-- single example (deprecated) -->\n <template v-if=\"hasSingleExample\">\n <div class=\"property-example\">\n <LinkButton class=\"decoration-dotted\">\n {{ translate('schema.example') }}\n </LinkButton>\n <div class=\"property-example-value-list\">\n <button\n class=\"property-example-value group\"\n type=\"button\"\n @click=\"copyToClipboard(formatExample(example))\">\n <span>\n {{ formatExample(example) }}\n </span>\n <ScalarIcon\n class=\"group-hover:text-c-1 text-c-3 ml-auto min-h-3 min-w-3\"\n icon=\"Clipboard\"\n size=\"xs\" />\n </button>\n </div>\n </div>\n </template>\n\n <!-- multiple examples -->\n <template v-if=\"hasMultipleExamples\">\n <div class=\"property-example\">\n <LinkButton class=\"decoration-dotted\">\n {{ multipleExamplesLabel }}\n </LinkButton>\n <div class=\"property-example-value-list\">\n <button\n v-for=\"(ex, key) in normalizedExamples\"\n :key=\"key\"\n class=\"property-example-value group\"\n type=\"button\"\n @click=\"copyToClipboard(formatExample(unwrapExampleObject(ex)))\">\n <span>{{ formatExample(unwrapExampleObject(ex)) }} </span>\n <ScalarIcon\n class=\"text-c-3 group-hover:text-c-1 ml-auto min-h-3 min-w-3\"\n icon=\"Clipboard\"\n size=\"xs\" />\n </button>\n </div>\n </div>\n </template>\n</template>\n\n<style scoped>\n@reference \"../../../style.css\";\n\n.property-example {\n display: flex;\n flex-direction: column;\n font-size: var(--scalar-mini);\n position: relative;\n}\n.property-example:hover:before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 20px;\n border-radius: var(--scalar-radius);\n}\n.property-example-value {\n font-family: var(--scalar-font-code);\n display: flex;\n gap: 8px;\n align-items: center;\n width: 100%;\n padding: 6px;\n}\n.property-example-value span {\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.property-example-value :deep(svg) {\n color: var(--scalar-color-3);\n}\n\n.property-example-value:hover :deep(svg) {\n color: var(--scalar-color-1);\n}\n\n.property-example-value {\n background: var(--scalar-background-2);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n border-radius: var(--scalar-radius);\n}\n.property-example-value-list {\n position: absolute;\n top: 18px;\n left: 50%;\n transform: translate3d(-50%, 0, 0);\n overflow: auto;\n background-color: var(--scalar-background-1);\n box-shadow: var(--scalar-shadow-1);\n border-radius: var(--scalar-radius-lg);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n padding: 9px;\n min-width: 200px;\n max-width: 300px;\n flex-direction: column;\n gap: 3px;\n display: none;\n @apply z-context;\n}\n.property-example:hover .property-example-value-list,\n.property-example:focus-within .property-example-value-list {\n display: flex;\n}\n</style>\n"],"mappings":""}
@@ -1,9 +1,10 @@
1
+ import { useLocalization } from "../../../features/localization/use-localization.js";
1
2
  import LinkButton_default from "./LinkButton.vue.js";
2
3
  import { formatExample } from "./helpers/format-example.js";
3
4
  import { Fragment, computed, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, openBlock, renderList, toDisplayString, unref, withCtx } from "vue";
4
5
  import { useClipboard } from "@scalar/use-hooks/useClipboard";
5
- import { ScalarIcon } from "@scalar/components/icon";
6
6
  import { isObject } from "@scalar/helpers/object/is-object";
7
+ import { ScalarIcon } from "@scalar/components/icon";
7
8
  //#region src/components/Content/Schema/SchemaPropertyExamples.vue?vue&type=script&setup=true&lang.ts
8
9
  var _hoisted_1 = {
9
10
  key: 0,
@@ -24,13 +25,14 @@ var SchemaPropertyExamples_vue_vue_type_script_setup_true_lang_default = /* @__P
24
25
  },
25
26
  setup(__props) {
26
27
  const { copyToClipboard } = useClipboard();
28
+ const { translate } = useLocalization();
27
29
  const hasSingleExample = computed(() => __props.example !== void 0);
28
30
  const normalizedExamples = computed(() => {
29
31
  if (__props.examples && typeof __props.examples === "object") return __props.examples;
30
32
  return {};
31
33
  });
32
34
  const hasMultipleExamples = computed(() => Object.keys(normalizedExamples.value).length > 0);
33
- const multipleExamplesLabel = computed(() => Object.keys(normalizedExamples.value).length === 1 ? "Example" : "Examples");
35
+ const multipleExamplesLabel = computed(() => Object.keys(normalizedExamples.value).length === 1 ? translate("schema.example") : translate("schema.examples"));
34
36
  /**
35
37
  * Unwrap an OpenAPI 3 Example Object (`{ value, externalValue, summary, description }`)
36
38
  * to the actual sample. Plain values pass through untouched.
@@ -44,7 +46,7 @@ var SchemaPropertyExamples_vue_vue_type_script_setup_true_lang_default = /* @__P
44
46
  }
45
47
  return (_ctx, _cache) => {
46
48
  return openBlock(), createElementBlock(Fragment, null, [hasSingleExample.value ? (openBlock(), createElementBlock("div", _hoisted_1, [createVNode(LinkButton_default, { class: "decoration-dotted" }, {
47
- default: withCtx(() => [..._cache[1] || (_cache[1] = [createTextVNode("Example", -1)])]),
49
+ default: withCtx(() => [createTextVNode(toDisplayString(unref(translate)("schema.example")), 1)]),
48
50
  _: 1
49
51
  }), createElementVNode("div", _hoisted_2, [createElementVNode("button", {
50
52
  class: "property-example-value group",
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaPropertyExamples.vue.script.js","names":[],"sources":["../../../../src/components/Content/Schema/SchemaPropertyExamples.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarIcon } from '@scalar/components/icon'\nimport { isObject } from '@scalar/helpers/object/is-object'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\nimport { computed } from 'vue'\n\nimport LinkButton from '@/components/Content/Schema/LinkButton.vue'\n\nimport { formatExample } from './helpers/format-example'\n\nconst { examples, example } = defineProps<{\n examples?: unknown\n example?: unknown\n}>()\n\nconst { copyToClipboard } = useClipboard()\n\n// `null` is a meaningful example value for nullable schemas, so only treat\n// `undefined` as \"not provided\".\nconst hasSingleExample = computed(() => example !== undefined)\n\nconst normalizedExamples = computed<Record<string, unknown>>(() => {\n if (examples && typeof examples === 'object') {\n return examples as Record<string, unknown>\n }\n\n return {}\n})\n\nconst hasMultipleExamples = computed(\n () => Object.keys(normalizedExamples.value).length > 0,\n)\n\nconst multipleExamplesLabel = computed(() =>\n Object.keys(normalizedExamples.value).length === 1 ? 'Example' : 'Examples',\n)\n\n/**\n * Unwrap an OpenAPI 3 Example Object (`{ value, externalValue, summary, description }`)\n * to the actual sample. Plain values pass through untouched.\n */\nfunction unwrapExampleObject(value: unknown): unknown {\n if (isObject(value)) {\n if ('value' in value) {\n return value.value\n }\n if ('externalValue' in value) {\n return (value as { externalValue: unknown }).externalValue\n }\n }\n return value\n}\n</script>\n<template>\n <!-- single example (deprecated) -->\n <template v-if=\"hasSingleExample\">\n <div class=\"property-example\">\n <LinkButton class=\"decoration-dotted\">Example</LinkButton>\n <div class=\"property-example-value-list\">\n <button\n class=\"property-example-value group\"\n type=\"button\"\n @click=\"copyToClipboard(formatExample(example))\">\n <span>\n {{ formatExample(example) }}\n </span>\n <ScalarIcon\n class=\"group-hover:text-c-1 text-c-3 ml-auto min-h-3 min-w-3\"\n icon=\"Clipboard\"\n size=\"xs\" />\n </button>\n </div>\n </div>\n </template>\n\n <!-- multiple examples -->\n <template v-if=\"hasMultipleExamples\">\n <div class=\"property-example\">\n <LinkButton class=\"decoration-dotted\">\n {{ multipleExamplesLabel }}\n </LinkButton>\n <div class=\"property-example-value-list\">\n <button\n v-for=\"(ex, key) in normalizedExamples\"\n :key=\"key\"\n class=\"property-example-value group\"\n type=\"button\"\n @click=\"copyToClipboard(formatExample(unwrapExampleObject(ex)))\">\n <span>{{ formatExample(unwrapExampleObject(ex)) }} </span>\n <ScalarIcon\n class=\"text-c-3 group-hover:text-c-1 ml-auto min-h-3 min-w-3\"\n icon=\"Clipboard\"\n size=\"xs\" />\n </button>\n </div>\n </div>\n </template>\n</template>\n\n<style scoped>\n@reference \"../../../style.css\";\n\n.property-example {\n display: flex;\n flex-direction: column;\n font-size: var(--scalar-mini);\n position: relative;\n}\n.property-example:hover:before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 20px;\n border-radius: var(--scalar-radius);\n}\n.property-example-value {\n font-family: var(--scalar-font-code);\n display: flex;\n gap: 8px;\n align-items: center;\n width: 100%;\n padding: 6px;\n}\n.property-example-value span {\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.property-example-value :deep(svg) {\n color: var(--scalar-color-3);\n}\n\n.property-example-value:hover :deep(svg) {\n color: var(--scalar-color-1);\n}\n\n.property-example-value {\n background: var(--scalar-background-2);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n border-radius: var(--scalar-radius);\n}\n.property-example-value-list {\n position: absolute;\n top: 18px;\n left: 50%;\n transform: translate3d(-50%, 0, 0);\n overflow: auto;\n background-color: var(--scalar-background-1);\n box-shadow: var(--scalar-shadow-1);\n border-radius: var(--scalar-radius-lg);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n padding: 9px;\n min-width: 200px;\n max-width: 300px;\n flex-direction: column;\n gap: 3px;\n display: none;\n @apply z-context;\n}\n.property-example:hover .property-example-value-list,\n.property-example:focus-within .property-example-value-list {\n display: flex;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;EAeA,MAAM,EAAE,oBAAoB,cAAa;EAIzC,MAAM,mBAAmB,eAAe,QAAA,YAAY,KAAA,EAAS;EAE7D,MAAM,qBAAqB,eAAwC;AACjE,OAAI,QAAA,YAAY,OAAO,QAAA,aAAa,SAClC,QAAO,QAAA;AAGT,UAAO,EAAC;IACT;EAED,MAAM,sBAAsB,eACpB,OAAO,KAAK,mBAAmB,MAAM,CAAC,SAAS,EACvD;EAEA,MAAM,wBAAwB,eAC5B,OAAO,KAAK,mBAAmB,MAAM,CAAC,WAAW,IAAI,YAAY,WACnE;;;;;EAMA,SAAS,oBAAoB,OAAyB;AACpD,OAAI,SAAS,MAAM,EAAE;AACnB,QAAI,WAAW,MACb,QAAO,MAAM;AAEf,QAAI,mBAAmB,MACrB,QAAQ,MAAqC;;AAGjD,UAAO;;;2DAKS,iBAAA,SAAA,WAAA,EACd,mBAgBM,OAhBN,YAgBM,CAfJ,YAA0D,oBAAA,EAA9C,OAAM,qBAAmB,EAAA;2BAAQ,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAAP,WAAO,GAAA,CAAA,EAAA,CAAA;;OAC7C,mBAaM,OAbN,YAaM,CAZJ,mBAWS,UAAA;IAVP,OAAM;IACN,MAAK;IACJ,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,MAAA,gBAAe,CAAC,MAAA,cAAa,CAAC,QAAA,QAAO,CAAA;OAC7C,mBAEO,QAAA,MAAA,gBADF,MAAA,cAAa,CAAC,QAAA,QAAO,CAAA,EAAA,EAAA,EAE1B,YAGc,MAAA,WAAA,EAAA;IAFZ,OAAM;IACN,MAAK;IACL,MAAK;6CAOC,oBAAA,SAAA,WAAA,EACd,mBAkBM,OAlBN,YAkBM,CAjBJ,YAEa,oBAAA,EAFD,OAAM,qBAAmB,EAAA;2BACR,CAAA,gBAAA,gBAAxB,sBAAA,MAAqB,EAAA,EAAA,CAAA,CAAA;;OAE1B,mBAaM,OAbN,YAaM,EAAA,UAAA,KAAA,EAZJ,mBAWS,UAAA,MAAA,WAVa,mBAAA,QAAZ,IAAI,QAAG;wBADjB,mBAWS,UAAA;KATD;KACN,OAAM;KACN,MAAK;KACJ,UAAK,WAAE,MAAA,gBAAe,CAAC,MAAA,cAAa,CAAC,oBAAoB,GAAE,CAAA,CAAA;QAC5D,mBAA0D,QAAA,MAAA,gBAAjD,MAAA,cAAa,CAAC,oBAAoB,GAAE,CAAA,CAAA,EAAA,EAAA,EAC7C,YAGc,MAAA,WAAA,EAAA;KAFZ,OAAM;KACN,MAAK;KACL,MAAK"}
1
+ {"version":3,"file":"SchemaPropertyExamples.vue.script.js","names":[],"sources":["../../../../src/components/Content/Schema/SchemaPropertyExamples.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarIcon } from '@scalar/components/icon'\nimport { isObject } from '@scalar/helpers/object/is-object'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\nimport { computed } from 'vue'\n\nimport LinkButton from '@/components/Content/Schema/LinkButton.vue'\nimport { useLocalization } from '@/features/localization'\n\nimport { formatExample } from './helpers/format-example'\n\nconst { examples, example } = defineProps<{\n examples?: unknown\n example?: unknown\n}>()\n\nconst { copyToClipboard } = useClipboard()\nconst { translate } = useLocalization()\n\n// `null` is a meaningful example value for nullable schemas, so only treat\n// `undefined` as \"not provided\".\nconst hasSingleExample = computed(() => example !== undefined)\n\nconst normalizedExamples = computed<Record<string, unknown>>(() => {\n if (examples && typeof examples === 'object') {\n return examples as Record<string, unknown>\n }\n\n return {}\n})\n\nconst hasMultipleExamples = computed(\n () => Object.keys(normalizedExamples.value).length > 0,\n)\n\nconst multipleExamplesLabel = computed(() =>\n Object.keys(normalizedExamples.value).length === 1\n ? translate('schema.example')\n : translate('schema.examples'),\n)\n\n/**\n * Unwrap an OpenAPI 3 Example Object (`{ value, externalValue, summary, description }`)\n * to the actual sample. Plain values pass through untouched.\n */\nfunction unwrapExampleObject(value: unknown): unknown {\n if (isObject(value)) {\n if ('value' in value) {\n return value.value\n }\n if ('externalValue' in value) {\n return (value as { externalValue: unknown }).externalValue\n }\n }\n return value\n}\n</script>\n<template>\n <!-- single example (deprecated) -->\n <template v-if=\"hasSingleExample\">\n <div class=\"property-example\">\n <LinkButton class=\"decoration-dotted\">\n {{ translate('schema.example') }}\n </LinkButton>\n <div class=\"property-example-value-list\">\n <button\n class=\"property-example-value group\"\n type=\"button\"\n @click=\"copyToClipboard(formatExample(example))\">\n <span>\n {{ formatExample(example) }}\n </span>\n <ScalarIcon\n class=\"group-hover:text-c-1 text-c-3 ml-auto min-h-3 min-w-3\"\n icon=\"Clipboard\"\n size=\"xs\" />\n </button>\n </div>\n </div>\n </template>\n\n <!-- multiple examples -->\n <template v-if=\"hasMultipleExamples\">\n <div class=\"property-example\">\n <LinkButton class=\"decoration-dotted\">\n {{ multipleExamplesLabel }}\n </LinkButton>\n <div class=\"property-example-value-list\">\n <button\n v-for=\"(ex, key) in normalizedExamples\"\n :key=\"key\"\n class=\"property-example-value group\"\n type=\"button\"\n @click=\"copyToClipboard(formatExample(unwrapExampleObject(ex)))\">\n <span>{{ formatExample(unwrapExampleObject(ex)) }} </span>\n <ScalarIcon\n class=\"text-c-3 group-hover:text-c-1 ml-auto min-h-3 min-w-3\"\n icon=\"Clipboard\"\n size=\"xs\" />\n </button>\n </div>\n </div>\n </template>\n</template>\n\n<style scoped>\n@reference \"../../../style.css\";\n\n.property-example {\n display: flex;\n flex-direction: column;\n font-size: var(--scalar-mini);\n position: relative;\n}\n.property-example:hover:before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 20px;\n border-radius: var(--scalar-radius);\n}\n.property-example-value {\n font-family: var(--scalar-font-code);\n display: flex;\n gap: 8px;\n align-items: center;\n width: 100%;\n padding: 6px;\n}\n.property-example-value span {\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.property-example-value :deep(svg) {\n color: var(--scalar-color-3);\n}\n\n.property-example-value:hover :deep(svg) {\n color: var(--scalar-color-1);\n}\n\n.property-example-value {\n background: var(--scalar-background-2);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n border-radius: var(--scalar-radius);\n}\n.property-example-value-list {\n position: absolute;\n top: 18px;\n left: 50%;\n transform: translate3d(-50%, 0, 0);\n overflow: auto;\n background-color: var(--scalar-background-1);\n box-shadow: var(--scalar-shadow-1);\n border-radius: var(--scalar-radius-lg);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n padding: 9px;\n min-width: 200px;\n max-width: 300px;\n flex-direction: column;\n gap: 3px;\n display: none;\n @apply z-context;\n}\n.property-example:hover .property-example-value-list,\n.property-example:focus-within .property-example-value-list {\n display: flex;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;EAgBA,MAAM,EAAE,oBAAoB,cAAa;EACzC,MAAM,EAAE,cAAc,iBAAgB;EAItC,MAAM,mBAAmB,eAAe,QAAA,YAAY,KAAA,EAAS;EAE7D,MAAM,qBAAqB,eAAwC;AACjE,OAAI,QAAA,YAAY,OAAO,QAAA,aAAa,SAClC,QAAO,QAAA;AAGT,UAAO,EAAC;IACT;EAED,MAAM,sBAAsB,eACpB,OAAO,KAAK,mBAAmB,MAAM,CAAC,SAAS,EACvD;EAEA,MAAM,wBAAwB,eAC5B,OAAO,KAAK,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