@scalar/api-reference 1.63.0 → 1.64.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +90 -0
- package/dist/blocks/scalar-asyncapi-server-selector-block/components/AsyncApiServerSelector.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-asyncapi-server-selector-block/components/AsyncApiServerSelector.vue.script.js +1 -1
- package/dist/blocks/scalar-asyncapi-server-selector-block/components/AsyncApiServerSelector.vue.script.js.map +1 -1
- package/dist/blocks/scalar-asyncapi-server-selector-block/components/Selector.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-asyncapi-server-selector-block/components/Selector.vue.script.js +1 -1
- package/dist/blocks/scalar-asyncapi-server-selector-block/components/Selector.vue.script.js.map +1 -1
- package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/AsyncApiSidebarFilters.vue.script.js +2 -2
- package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/AsyncApiSidebarFilters.vue.script.js.map +1 -1
- package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/SidebarFilter.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/SidebarFilter.vue.script.js +1 -1
- package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/SidebarFilter.vue.script.js.map +1 -1
- package/dist/blocks/scalar-asyncapi-sidebar-filters-block/helpers/filter-async-api-navigation.js.map +1 -1
- package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts +1 -3
- package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js +1 -1
- package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js.map +1 -1
- package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.script.js +13 -27
- package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.script.js.map +1 -1
- package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.js +1 -1
- package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.js.map +1 -1
- package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.script.js +37 -25
- package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.script.js.map +1 -1
- package/dist/blocks/scalar-client-selector-block/helpers/featured-clients.js.map +1 -1
- package/dist/blocks/scalar-info-block/components/DownloadLink.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-info-block/components/DownloadLink.vue.js +1 -1
- package/dist/blocks/scalar-info-block/components/DownloadLink.vue.js.map +1 -1
- package/dist/blocks/scalar-info-block/components/DownloadLink.vue.script.js +10 -4
- package/dist/blocks/scalar-info-block/components/DownloadLink.vue.script.js.map +1 -1
- package/dist/blocks/scalar-info-block/components/InfoBlock.vue.script.js +1 -1
- package/dist/blocks/scalar-info-block/components/InfoBlock.vue.script.js.map +1 -1
- package/dist/blocks/scalar-info-block/components/InfoDescription.vue.js +1 -1
- package/dist/blocks/scalar-info-block/components/InfoDescription.vue.script.js +1 -1
- package/dist/blocks/scalar-info-block/components/InfoDescription.vue.script.js.map +1 -1
- package/dist/blocks/scalar-info-block/components/InfoLinks.vue.script.js +1 -1
- package/dist/blocks/scalar-info-block/components/InfoLinks.vue.script.js.map +1 -1
- package/dist/blocks/scalar-info-block/components/InfoMarkdownSection.vue.script.js +1 -1
- package/dist/blocks/scalar-info-block/components/InfoMarkdownSection.vue.script.js.map +1 -1
- package/dist/blocks/scalar-info-block/components/InfoVersion.vue.script.js +1 -1
- package/dist/blocks/scalar-info-block/components/InfoVersion.vue.script.js.map +1 -1
- package/dist/blocks/scalar-info-block/components/IntroductionCard.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-info-block/components/IntroductionCard.vue.js +1 -1
- package/dist/blocks/scalar-info-block/components/IntroductionCard.vue.js.map +1 -1
- package/dist/blocks/scalar-info-block/components/IntroductionCard.vue.script.js +1 -1
- package/dist/blocks/scalar-info-block/components/IntroductionCard.vue.script.js.map +1 -1
- package/dist/blocks/scalar-info-block/components/IntroductionCardItem.vue.js +1 -1
- package/dist/blocks/scalar-info-block/components/IntroductionCardItem.vue.js.map +1 -1
- package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.js +1 -1
- package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.script.js +1 -1
- package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.script.js.map +1 -1
- package/dist/blocks/scalar-info-block/components/IntroductionLoading.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-info-block/components/IntroductionLoading.vue.js +1 -1
- package/dist/blocks/scalar-info-block/components/IntroductionLoading.vue.js.map +1 -1
- package/dist/blocks/scalar-info-block/components/IntroductionLoading.vue.script.js +5 -5
- package/dist/blocks/scalar-info-block/components/IntroductionLoading.vue.script.js.map +1 -1
- package/dist/blocks/scalar-info-block/components/SpecificationVersion.vue.script.js +1 -1
- package/dist/blocks/scalar-info-block/components/SpecificationVersion.vue.script.js.map +1 -1
- package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.js +1 -1
- package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.js.map +1 -1
- package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.script.js +16 -9
- package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.script.js.map +1 -1
- package/dist/blocks/scalar-sdk-installation-instructions/helpers/language-icon.js.map +1 -1
- package/dist/blocks/scalar-sdk-installation-instructions/helpers/renderable-sdks.js.map +1 -1
- package/dist/blocks/scalar-sdk-installation-instructions/helpers/visible-tab-count.js.map +1 -1
- package/dist/blocks/scalar-server-selector-block/components/Selector.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-server-selector-block/components/Selector.vue.script.js +1 -1
- package/dist/blocks/scalar-server-selector-block/components/Selector.vue.script.js.map +1 -1
- package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.script.js +1 -1
- package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.script.js.map +1 -1
- package/dist/browser/chunks/AgentScalarChatInterface-D1mzA447.js +27 -0
- package/dist/browser/chunks/ScalarTextInput.vue-OfiA6SHf.js +27 -0
- package/dist/browser/chunks/{basic-shape-diamond.svg-BTEOT1FL.js → basic-shape-diamond.svg-o5eiY2I7.js} +2 -2
- package/dist/browser/chunks/{basic-shape-hexagon.svg-BSPzaCgF.js → basic-shape-hexagon.svg-CGuS7mbd.js} +2 -2
- package/dist/browser/chunks/{basic-shape-primary-circle-ellipse-round.svg-DKmZ8UUU.js → basic-shape-primary-circle-ellipse-round.svg-DDIpXiBm.js} +2 -2
- package/dist/browser/chunks/{basic-shape-primary-square-rectangle.svg-n2YRykHD.js → basic-shape-primary-square-rectangle.svg-DzVEJHMB.js} +2 -2
- package/dist/browser/chunks/{basic-shape-shield.svg-Bec9cJDA.js → basic-shape-shield.svg-BZzapRqv.js} +2 -2
- package/dist/browser/chunks/browser-CTPPEMEL.js +129 -0
- package/dist/browser/chunks/{computer-device-desktop-monitor.svg-m6j893Hb.js → computer-device-desktop-monitor.svg-OSM05r1I.js} +2 -2
- package/dist/browser/chunks/{computer-device-desktop.svg-Dk1VVO7k.js → computer-device-desktop.svg-BMFzGZ27.js} +2 -2
- package/dist/browser/chunks/{computer-device-laptop.svg-BNGVUCYS.js → computer-device-laptop.svg-CMAjzuB-.js} +2 -2
- package/dist/browser/chunks/{computer-device-mobile-phone-android-samsung-back.svg-CC4UUTFw.js → computer-device-mobile-phone-android-samsung-back.svg-D4xBONmL.js} +2 -2
- package/dist/browser/chunks/{computer-device-mobile-phone-android-samsung.svg-D8ExpMpL.js → computer-device-mobile-phone-android-samsung.svg-gbMJLjJw.js} +2 -2
- package/dist/browser/chunks/{computer-device-mobile-phone-iphone-x-back.svg-CLm7sgMM.js → computer-device-mobile-phone-iphone-x-back.svg-Bl1rmdKA.js} +2 -2
- package/dist/browser/chunks/{computer-device-mobile-phone-iphone-x.svg-Xrttg6_7.js → computer-device-mobile-phone-iphone-x.svg-DVetP0aa.js} +2 -2
- package/dist/browser/chunks/{computer-device-mobile-tablet-touch.svg-DQ2oTvOG.js → computer-device-mobile-tablet-touch.svg-Zi88BP4L.js} +2 -2
- package/dist/browser/chunks/{computer-device-mobile-tablet.svg-DCr0XlRc.js → computer-device-mobile-tablet.svg-C1ggisWP.js} +2 -2
- package/dist/browser/chunks/{computer-device-network-ethernet-cat6.svg-AK9l0iOl.js → computer-device-network-ethernet-cat6.svg-BIUymdC1.js} +2 -2
- package/dist/browser/chunks/{computer-device-network-lan-www.svg-gUIdFBlE.js → computer-device-network-lan-www.svg-CoFUlIVO.js} +2 -2
- package/dist/browser/chunks/{computer-device-network-wifi-connection.svg-Be-EMm4e.js → computer-device-network-wifi-connection.svg-DeWsacxI.js} +2 -2
- package/dist/browser/chunks/{computer-device-network-wifi-router.svg-Dc2VzyqK.js → computer-device-network-wifi-router.svg-BjpZEot4.js} +2 -2
- package/dist/browser/chunks/{ecology-science-erlenmeyer-flask.svg-DHgy7Jfd.js → ecology-science-erlenmeyer-flask.svg-ftjGGirE.js} +2 -2
- package/dist/browser/chunks/{image-flash-lightning.svg-EETR_y1q.js → image-flash-lightning.svg-DYQ0W4Fi.js} +2 -2
- package/dist/browser/chunks/{image-picture-flower.svg-DN1AYzJU.js → image-picture-flower.svg-Bfe5SVDf.js} +2 -2
- package/dist/browser/chunks/{interface-alert-exclamation-diamond.svg-C5NozMV_.js → interface-alert-exclamation-diamond.svg-D1HePDNM.js} +2 -2
- package/dist/browser/chunks/{interface-alert-exclamation-triangle-warning.svg-DaAg2fF5.js → interface-alert-exclamation-triangle-warning.svg-CILUsxBC.js} +2 -2
- package/dist/browser/chunks/{interface-alert-information-circle.svg-ckkkt9Mv.js → interface-alert-information-circle.svg-9LrbJM5J.js} +2 -2
- package/dist/browser/chunks/{interface-award-crown.svg-pjvn9hY-.js → interface-award-crown.svg-DllWgiU1.js} +2 -2
- package/dist/browser/chunks/{interface-bookmark.svg-BK9HKQBT.js → interface-bookmark-tag.svg-Dc-JL-Kc.js} +2 -2
- package/dist/browser/chunks/{interface-bookmark-tag.svg-r2r-lQq4.js → interface-bookmark.svg-Dc-JL-Kc.js} +2 -2
- package/dist/browser/chunks/{interface-calendar-date-one.svg-DNnF0M1I.js → interface-calendar-date-one.svg-DO2jelhF.js} +2 -2
- package/dist/browser/chunks/{interface-content-book-open-pages.svg-CQj_w9Vp.js → interface-content-book-open-pages.svg-BJjMjIgA.js} +2 -2
- package/dist/browser/chunks/{interface-content-book-page.svg-DppoeJRe.js → interface-content-book-page.svg-C6rKB2fs.js} +2 -2
- package/dist/browser/chunks/{interface-content-file.svg-CvcD7OiY.js → interface-content-file.svg-CS0q2FKx.js} +2 -2
- package/dist/browser/chunks/{interface-content-folder.svg-BmtS5I9A.js → interface-content-folder.svg-CThTWsJX.js} +2 -2
- package/dist/browser/chunks/{interface-copy-clipboard.svg-Be6EI50X.js → interface-copy-clipboard.svg-DdN67cLv.js} +2 -2
- package/dist/browser/chunks/{interface-edit-attachment.svg-G5TKzpWX.js → interface-edit-attachment.svg-Ciizphuh.js} +2 -2
- package/dist/browser/chunks/{interface-edit-binocular.svg-jzL-DvGB.js → interface-edit-binocular.svg-Dw1nDqmL.js} +2 -2
- package/dist/browser/chunks/{interface-edit-magic-wand.svg-BOTlymvp.js → interface-edit-magic-wand.svg-BYS0jm_E.js} +2 -2
- package/dist/browser/chunks/{interface-edit-tool-paint-roller.svg-s9dwryx7.js → interface-edit-tool-paint-roller.svg-NioSHZC2.js} +2 -2
- package/dist/browser/chunks/{interface-edit-tool-pencil.svg-C7v0dbB3.js → interface-edit-tool-pencil.svg-P87QFlat.js} +2 -2
- package/dist/browser/chunks/{interface-favorite-award.svg-CYHUgUG0.js → interface-favorite-award.svg-DBBAChSi.js} +2 -2
- package/dist/browser/chunks/{interface-favorite-flag.svg-C10zlKOb.js → interface-favorite-flag.svg-HlhPomHY.js} +2 -2
- package/dist/browser/chunks/{interface-favorite-heart.svg-eoduXxlz.js → interface-favorite-heart.svg-Cqu2GYDo.js} +2 -2
- package/dist/browser/chunks/{interface-favorite-star.svg-BSmxJetr.js → interface-favorite-star.svg-BD4JY_J2.js} +2 -2
- package/dist/browser/chunks/{interface-favorite-stars-sparkles.svg-JTFLj3Ls.js → interface-favorite-stars-sparkles.svg-BXi6aO8q.js} +2 -2
- package/dist/browser/chunks/{interface-hierarchy-flowchart.svg-Cg_Wy0kN.js → interface-hierarchy-flowchart.svg-CDEVSsD4.js} +2 -2
- package/dist/browser/chunks/{interface-home-house.svg-DytoGRnv.js → interface-home-house.svg-DJetUjwj.js} +2 -2
- package/dist/browser/chunks/{interface-hyperlink.svg-CuEfmmQI.js → interface-hyperlink.svg-DJ1LREmz.js} +2 -2
- package/dist/browser/chunks/{interface-lighting-brightness.svg-DSK0h_Pa.js → interface-lighting-brightness.svg-TGKAaHYV.js} +2 -2
- package/dist/browser/chunks/{interface-lock-closed.svg-Cn6TaLYv.js → interface-lock-closed.svg-3hehWr3i.js} +2 -2
- package/dist/browser/chunks/{interface-lock-open-unlock.svg-CVkG5-9W.js → interface-lock-open-unlock.svg-CuXKcv1m.js} +2 -2
- package/dist/browser/chunks/{interface-login-key.svg-y-cwwXjN.js → interface-login-key.svg-Chwvvywd.js} +2 -2
- package/dist/browser/chunks/{interface-search.svg-S-puVFJB.js → interface-search.svg-JDE3fk0u.js} +2 -2
- package/dist/browser/chunks/{interface-setting-cog.svg-CTH4_lLg.js → interface-setting-cog.svg-BBCkeh4K.js} +2 -2
- package/dist/browser/chunks/{interface-share-megaphone-bullhorn.svg-Pbp39MyC.js → interface-share-megaphone-bullhorn.svg-CDdxF-4y.js} +2 -2
- package/dist/browser/chunks/{interface-share-rocket.svg-BgCsIRZO.js → interface-share-rocket.svg-DSbdn_o7.js} +2 -2
- package/dist/browser/chunks/{interface-share-satellite.svg-DAMN9d5G.js → interface-share-satellite.svg-CefBVZvY.js} +2 -2
- package/dist/browser/chunks/{interface-share-space-ship.svg-Dt-Mejxk.js → interface-share-space-ship.svg-tFA2dsSU.js} +2 -2
- package/dist/browser/chunks/{interface-share.svg-vFYTXSti.js → interface-share.svg-BpOGopyv.js} +2 -2
- package/dist/browser/chunks/{interface-signal-square.svg-DNG4LpAe.js → interface-signal-square.svg-BcX_BoaC.js} +2 -2
- package/dist/browser/chunks/{interface-time-clock-circle.svg-Bpz-nLxo.js → interface-time-clock-circle.svg-C8B_L_RM.js} +2 -2
- package/dist/browser/chunks/{interface-time-hour-glass.svg-D7agfKsH.js → interface-time-hour-glass.svg-qw-oeoVn.js} +2 -2
- package/dist/browser/chunks/{interface-users-multiple.svg-CkPJBBnG.js → interface-users-multiple.svg-Cs13Eewq.js} +2 -2
- package/dist/browser/chunks/{interface-weather-moon.svg-CaTZFMPO.js → interface-weather-moon.svg-CV-oDTae.js} +2 -2
- package/dist/browser/chunks/{mail-chat-bubble-square.svg-DC8RIihp.js → mail-chat-bubble-square.svg-dpauJhin.js} +2 -2
- package/dist/browser/chunks/{mail-send-email-paper-airplane.svg-D8OLs9jz.js → mail-send-email-paper-airplane.svg-BBofxojL.js} +2 -2
- package/dist/browser/chunks/{mail-send-envelope.svg-CV33h5Sx.js → mail-send-envelope.svg-DyENgYOI.js} +2 -2
- package/dist/browser/chunks/modal-BS4e2gew.js +99 -0
- package/dist/browser/chunks/{money-cashier-receipt.svg-CJL8C2gs.js → money-cashier-receipt.svg-dNTr5aio.js} +2 -2
- package/dist/browser/chunks/{money-currency-dollar-pay.svg-VdBplCTx.js → money-currency-dollar-pay.svg-1ZESPtFY.js} +2 -2
- package/dist/browser/chunks/{money-graph-arrow-increase.svg-DcRov3zk.js → money-graph-arrow-increase.svg-kEZ2u2z2.js} +2 -2
- package/dist/browser/chunks/{money-graph-bar-chart-increase.svg-Cc7KxjX-.js → money-graph-bar-chart-increase.svg-B-t2UWB3.js} +2 -2
- package/dist/browser/chunks/{nature-ecology-leaf.svg-DR3cTZxt.js → nature-ecology-leaf.svg-DZ2GJV8m.js} +2 -2
- package/dist/browser/chunks/{phone-telephone.svg-DyY0gUlk.js → phone-telephone.svg-C12QjpN7.js} +2 -2
- package/dist/browser/chunks/{programming-bug.svg-BHLT-Qhp.js → programming-bug.svg-wLTsruN9.js} +2 -2
- package/dist/browser/chunks/{programming-cloud.svg-B6YW33ba.js → programming-cloud.svg-3XU6dNUg.js} +2 -2
- package/dist/browser/chunks/{programming-computer-database-server.svg-B6o5Sdn-.js → programming-computer-database-server.svg-B1JrHSPd.js} +2 -2
- package/dist/browser/chunks/{programming-computer-database.svg-Cl7OVtpJ.js → programming-computer-database.svg-BxHSuFl7.js} +2 -2
- package/dist/browser/chunks/{programming-module-four-layout.svg-BQrerL1x.js → programming-module-four-layout.svg-CeV35q45.js} +2 -2
- package/dist/browser/chunks/{programming-module-three.svg-B2KTQzBM.js → programming-module-three.svg-YIBpLt45.js} +2 -2
- package/dist/browser/chunks/{programming-module.svg-CiID7kPm.js → programming-module.svg-CU_pEibI.js} +2 -2
- package/dist/browser/chunks/{programming-script-code.svg-D1M5rtkN.js → programming-script-code.svg-CLzinmHT.js} +2 -2
- package/dist/browser/chunks/runtime-core.esm-bundler-CqqEw5ds.js +17 -0
- package/dist/browser/chunks/{shopping-cart.svg-BEegiIR9.js → shopping-cart.svg-Brzddu3K.js} +2 -2
- package/dist/browser/chunks/{shopping-gift-present.svg-BUHwuLix.js → shopping-gift-present.svg-l2K48g7L.js} +2 -2
- package/dist/browser/chunks/{shopping-shipping-box-parcel-package.svg-D6fxWdYx.js → shopping-shipping-box-parcel-package.svg-DesGopPo.js} +2 -2
- package/dist/browser/chunks/{tag-new-circle.svg-jsg1bGs0.js → tag-new-circle.svg-DE-VaLZU.js} +2 -2
- package/dist/browser/chunks/{travel-map-earth-globe.svg-ClbMiU-f.js → travel-map-earth-globe.svg-DLaOMzx6.js} +2 -2
- package/dist/browser/chunks/vendor-DWZAEyBy.js +306 -0
- package/dist/browser/standalone.esm.js +26 -24
- package/dist/browser/standalone.js +310 -311
- package/dist/components/AgentScalar/AgentScalarButton.vue.script.js +1 -1
- package/dist/components/AgentScalar/AgentScalarButton.vue.script.js.map +1 -1
- package/dist/components/AgentScalar/AgentScalarChatInterface.vue.script.js +1 -1
- package/dist/components/AgentScalar/AgentScalarChatInterface.vue.script.js.map +1 -1
- package/dist/components/AgentScalar/AgentScalarDrawer.vue.d.ts.map +1 -1
- package/dist/components/AgentScalar/AgentScalarDrawer.vue.js +1 -1
- package/dist/components/AgentScalar/AgentScalarDrawer.vue.script.js +1 -1
- package/dist/components/AgentScalar/AgentScalarDrawer.vue.script.js.map +1 -1
- package/dist/components/AgentScalar/OpenMCPButton.vue.d.ts.map +1 -1
- package/dist/components/AgentScalar/OpenMCPButton.vue.js +1 -1
- package/dist/components/AgentScalar/OpenMCPButton.vue.js.map +1 -1
- package/dist/components/AgentScalar/OpenMCPButton.vue.script.js +47 -32
- package/dist/components/AgentScalar/OpenMCPButton.vue.script.js.map +1 -1
- package/dist/components/Anchor/Anchor.vue.d.ts.map +1 -1
- package/dist/components/Anchor/Anchor.vue.script.js +1 -1
- package/dist/components/Anchor/Anchor.vue.script.js.map +1 -1
- package/dist/components/Anchor/WithBreadcrumb.vue.script.js +2 -2
- package/dist/components/Anchor/WithBreadcrumb.vue.script.js.map +1 -1
- package/dist/components/ApiReference.vue.d.ts.map +1 -1
- package/dist/components/ApiReference.vue.js +1 -1
- package/dist/components/ApiReference.vue.js.map +1 -1
- package/dist/components/ApiReference.vue.script.js +141 -33
- package/dist/components/ApiReference.vue.script.js.map +1 -1
- package/dist/components/Badge/Badge.vue.d.ts.map +1 -1
- package/dist/components/Badge/Badge.vue.js +1 -1
- package/dist/components/Badge/Badge.vue.js.map +1 -1
- package/dist/components/Badge/Badge.vue.script.js +9 -9
- package/dist/components/Badge/Badge.vue.script.js.map +1 -1
- package/dist/components/ClassicHeader.vue.js +1 -1
- package/dist/components/ClassicHeader.vue.js.map +1 -1
- package/dist/components/Content/AsyncApi/AsyncApiLabels.vue.js +1 -1
- package/dist/components/Content/AsyncApi/AsyncApiLabels.vue.script.js +1 -1
- package/dist/components/Content/AsyncApi/AsyncApiLabels.vue.script.js.map +1 -1
- package/dist/components/Content/AsyncApi/AsyncApiTraversedEntry.vue.script.js +1 -1
- package/dist/components/Content/AsyncApi/AsyncApiTraversedEntry.vue.script.js.map +1 -1
- package/dist/components/Content/AsyncApi/Channel.vue.d.ts.map +1 -1
- package/dist/components/Content/AsyncApi/Channel.vue.js +1 -1
- package/dist/components/Content/AsyncApi/Channel.vue.script.js +1 -1
- package/dist/components/Content/AsyncApi/Channel.vue.script.js.map +1 -1
- package/dist/components/Content/AsyncApi/ChannelsList.vue.js +1 -1
- package/dist/components/Content/AsyncApi/ChannelsList.vue.script.js +1 -1
- package/dist/components/Content/AsyncApi/ChannelsList.vue.script.js.map +1 -1
- package/dist/components/Content/AsyncApi/Message.vue.d.ts.map +1 -1
- package/dist/components/Content/AsyncApi/Message.vue.js +1 -1
- package/dist/components/Content/AsyncApi/Message.vue.script.js +2 -2
- package/dist/components/Content/AsyncApi/Message.vue.script.js.map +1 -1
- package/dist/components/Content/AsyncApi/Operation.vue.d.ts.map +1 -1
- package/dist/components/Content/AsyncApi/Operation.vue.js +1 -1
- package/dist/components/Content/AsyncApi/Operation.vue.js.map +1 -1
- package/dist/components/Content/AsyncApi/Operation.vue.script.js +6 -1
- package/dist/components/Content/AsyncApi/Operation.vue.script.js.map +1 -1
- package/dist/components/Content/AsyncApi/helpers/adapt-async-api-parameters.js.map +1 -1
- package/dist/components/Content/AsyncApi/helpers/async-api-render-options.js.map +1 -1
- package/dist/components/Content/AsyncApi/helpers/filter-children-by-type.js.map +1 -1
- package/dist/components/Content/AsyncApi/helpers/get-async-api-labels.js.map +1 -1
- package/dist/components/Content/AsyncApi/helpers/get-async-api-required-security.d.ts +17 -0
- package/dist/components/Content/AsyncApi/helpers/get-async-api-required-security.d.ts.map +1 -0
- package/dist/components/Content/AsyncApi/helpers/get-async-api-required-security.js +21 -0
- package/dist/components/Content/AsyncApi/helpers/get-async-api-required-security.js.map +1 -0
- package/dist/components/Content/AsyncApi/helpers/pick-heading.js.map +1 -1
- package/dist/components/Content/AsyncApi/helpers/resolve-async-api-nodes.js.map +1 -1
- package/dist/components/Content/Auth/Auth.vue.script.js +1 -1
- package/dist/components/Content/Auth/Auth.vue.script.js.map +1 -1
- package/dist/components/Content/Content.vue.script.js +1 -1
- package/dist/components/Content/Content.vue.script.js.map +1 -1
- package/dist/components/Content/Models/Model.vue.script.js +1 -1
- package/dist/components/Content/Models/Model.vue.script.js.map +1 -1
- package/dist/components/Content/Models/ModelTag.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/ModelTag.vue.script.js +2 -2
- package/dist/components/Content/Models/ModelTag.vue.script.js.map +1 -1
- package/dist/components/Content/Models/components/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/components/ClassicLayout.vue.js +1 -1
- package/dist/components/Content/Models/components/ClassicLayout.vue.script.js +1 -1
- package/dist/components/Content/Models/components/ClassicLayout.vue.script.js.map +1 -1
- package/dist/components/Content/Models/components/ModernLayout.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/components/ModernLayout.vue.script.js +1 -1
- package/dist/components/Content/Models/components/ModernLayout.vue.script.js.map +1 -1
- package/dist/components/Content/Operations/TraversedEntry.vue.script.js +1 -1
- package/dist/components/Content/Operations/TraversedEntry.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/LinkButton.vue.js +1 -1
- package/dist/components/Content/Schema/LinkButton.vue.js.map +1 -1
- package/dist/components/Content/Schema/RenderString.vue.script.js +1 -1
- package/dist/components/Content/Schema/RenderString.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.js +1 -1
- package/dist/components/Content/Schema/Schema.vue.js.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.script.js +5 -13
- package/dist/components/Content/Schema/Schema.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaComposition.vue.js.map +1 -1
- package/dist/components/Content/Schema/SchemaComposition.vue.script.js +69 -34
- package/dist/components/Content/Schema/SchemaComposition.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.script.js +1 -1
- package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/SchemaEnums.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaEnums.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaEnums.vue.js.map +1 -1
- package/dist/components/Content/Schema/SchemaEnums.vue.script.js +16 -8
- package/dist/components/Content/Schema/SchemaEnums.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/SchemaHeading.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaHeading.vue.script.js +1 -1
- package/dist/components/Content/Schema/SchemaHeading.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.script.js +1 -1
- package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.script.js +1 -1
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.js.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.script.js +4 -3
- package/dist/components/Content/Schema/SchemaProperty.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyDefault.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaPropertyDefault.vue.script.js +1 -1
- package/dist/components/Content/Schema/SchemaPropertyDefault.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyDetail.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaPropertyDetail.vue.script.js +1 -1
- package/dist/components/Content/Schema/SchemaPropertyDetail.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.script.js +1 -1
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.script.js +31 -21
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/helpers/dynamic-scope.js.map +1 -1
- package/dist/components/Content/Schema/helpers/format-example.js.map +1 -1
- package/dist/components/Content/Schema/helpers/format-value.js.map +1 -1
- package/dist/components/Content/Schema/helpers/get-compositions-to-render.js.map +1 -1
- package/dist/components/Content/Schema/helpers/get-enum-values.js.map +1 -1
- package/dist/components/Content/Schema/helpers/get-property-description.js.map +1 -1
- package/dist/components/Content/Schema/helpers/get-ref-name.js.map +1 -1
- package/dist/components/Content/Schema/helpers/get-schema-type.js.map +1 -1
- package/dist/components/Content/Schema/helpers/has-complex-array-items.js.map +1 -1
- package/dist/components/Content/Schema/helpers/is-empty-schema-object.js.map +1 -1
- package/dist/components/Content/Schema/helpers/is-type-object.js.map +1 -1
- package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +3 -3
- package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js.map +1 -1
- package/dist/components/Content/Schema/helpers/optimize-value-for-display.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/optimize-value-for-display.js +1 -4
- package/dist/components/Content/Schema/helpers/optimize-value-for-display.js.map +1 -1
- package/dist/components/Content/Schema/helpers/partition-all-of-compositions.d.ts +32 -0
- package/dist/components/Content/Schema/helpers/partition-all-of-compositions.d.ts.map +1 -0
- package/dist/components/Content/Schema/helpers/partition-all-of-compositions.js +97 -0
- package/dist/components/Content/Schema/helpers/partition-all-of-compositions.js.map +1 -0
- package/dist/components/Content/Schema/helpers/schema-composition.js.map +1 -1
- package/dist/components/Content/Schema/helpers/schema-cycle.js.map +1 -1
- package/dist/components/Content/Schema/helpers/schema-name.js.map +1 -1
- package/dist/components/Content/Schema/helpers/should-display-description.js.map +1 -1
- package/dist/components/Content/Schema/helpers/should-display-heading.js.map +1 -1
- package/dist/components/Content/Schema/helpers/should-render-array-item-composition.js.map +1 -1
- package/dist/components/Content/Schema/helpers/sort-property-names.js.map +1 -1
- package/dist/components/Content/Tags/Tag.vue.script.js +1 -1
- package/dist/components/Content/Tags/Tag.vue.script.js.map +1 -1
- package/dist/components/Content/Tags/components/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/components/Content/Tags/components/ClassicLayout.vue.js +1 -1
- package/dist/components/Content/Tags/components/ClassicLayout.vue.script.js +1 -1
- package/dist/components/Content/Tags/components/ClassicLayout.vue.script.js.map +1 -1
- package/dist/components/Content/Tags/components/ModernLayout.vue.d.ts.map +1 -1
- package/dist/components/Content/Tags/components/ModernLayout.vue.js +1 -1
- package/dist/components/Content/Tags/components/ModernLayout.vue.script.js +1 -1
- package/dist/components/Content/Tags/components/ModernLayout.vue.script.js.map +1 -1
- package/dist/components/Content/Tags/components/TagSection.vue.d.ts.map +1 -1
- package/dist/components/Content/Tags/components/TagSection.vue.script.js +1 -1
- package/dist/components/Content/Tags/components/TagSection.vue.script.js.map +1 -1
- package/dist/components/GettingStarted.vue.d.ts.map +1 -1
- package/dist/components/GettingStarted.vue.js +1 -1
- package/dist/components/GettingStarted.vue.js.map +1 -1
- package/dist/components/GettingStarted.vue.script.js +4 -3
- package/dist/components/GettingStarted.vue.script.js.map +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.script.js +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.script.js.map +1 -1
- package/dist/components/IntersectionObserver.vue.script.js +10 -7
- package/dist/components/IntersectionObserver.vue.script.js.map +1 -1
- package/dist/components/Lazy/Lazy.vue.script.js +2 -2
- package/dist/components/Lazy/Lazy.vue.script.js.map +1 -1
- package/dist/components/LinkList/LinkList.vue.js +1 -1
- package/dist/components/LinkList/LinkList.vue.js.map +1 -1
- package/dist/components/LinkList/LinkList.vue.script.js +2 -2
- package/dist/components/LinkList/LinkList.vue.script.js.map +1 -1
- package/dist/components/MobileHeader.vue.d.ts.map +1 -1
- package/dist/components/MobileHeader.vue.script.js +4 -4
- package/dist/components/MobileHeader.vue.script.js.map +1 -1
- package/dist/components/OperationPath.vue.d.ts.map +1 -1
- package/dist/components/OperationPath.vue.js +1 -1
- package/dist/components/OperationPath.vue.script.js +1 -1
- package/dist/components/OperationPath.vue.script.js.map +1 -1
- package/dist/components/OperationsList/OperationsList.vue.js +1 -1
- package/dist/components/OperationsList/OperationsList.vue.script.js +1 -1
- package/dist/components/OperationsList/OperationsList.vue.script.js.map +1 -1
- package/dist/components/OperationsList/OperationsListItem.vue.js +1 -1
- package/dist/components/OperationsList/OperationsListItem.vue.script.js +1 -1
- package/dist/components/OperationsList/OperationsListItem.vue.script.js.map +1 -1
- package/dist/components/RenderPlugins/RenderPluginView.vue.script.js +1 -1
- package/dist/components/RenderPlugins/RenderPluginView.vue.script.js.map +1 -1
- package/dist/components/RenderPlugins/RenderPlugins.vue.script.js +1 -1
- package/dist/components/RenderPlugins/RenderPlugins.vue.script.js.map +1 -1
- package/dist/components/ScreenReader.vue.js +1 -1
- package/dist/components/ScreenReader.vue.script.js +2 -2
- package/dist/components/ScreenReader.vue.script.js.map +1 -1
- package/dist/components/Section/CompactSection.vue.d.ts.map +1 -1
- package/dist/components/Section/CompactSection.vue.js +1 -1
- package/dist/components/Section/CompactSection.vue.js.map +1 -1
- package/dist/components/Section/CompactSection.vue.script.js +22 -6
- package/dist/components/Section/CompactSection.vue.script.js.map +1 -1
- package/dist/components/Section/Section.vue.js +1 -1
- package/dist/components/Section/Section.vue.script.js +1 -1
- package/dist/components/Section/Section.vue.script.js.map +1 -1
- package/dist/components/Section/SectionAccordion.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionAccordion.vue.js +1 -1
- package/dist/components/Section/SectionAccordion.vue.script.js +1 -1
- package/dist/components/Section/SectionAccordion.vue.script.js.map +1 -1
- package/dist/components/Section/SectionColumn.vue.js +1 -1
- package/dist/components/Section/SectionColumn.vue.js.map +1 -1
- package/dist/components/Section/SectionColumns.vue.js +1 -1
- package/dist/components/Section/SectionColumns.vue.js.map +1 -1
- package/dist/components/Section/SectionContainer.vue.js +1 -1
- package/dist/components/Section/SectionContainer.vue.script.js +2 -2
- package/dist/components/Section/SectionContainer.vue.script.js.map +1 -1
- package/dist/components/Section/SectionContainerAccordion.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionContainerAccordion.vue.js +1 -1
- package/dist/components/Section/SectionContainerAccordion.vue.script.js +1 -1
- package/dist/components/Section/SectionContainerAccordion.vue.script.js.map +1 -1
- package/dist/components/Section/SectionContent.vue.js +1 -1
- package/dist/components/Section/SectionContent.vue.js.map +1 -1
- package/dist/components/Section/SectionHeader.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionHeader.vue.js +1 -1
- package/dist/components/Section/SectionHeader.vue.js.map +1 -1
- package/dist/components/Section/SectionHeader.vue.script.js +3 -3
- package/dist/components/Section/SectionHeader.vue.script.js.map +1 -1
- package/dist/components/Section/SectionHeaderTag.vue.js +1 -1
- package/dist/components/Section/SectionHeaderTag.vue.script.js +1 -1
- package/dist/components/Section/SectionHeaderTag.vue.script.js.map +1 -1
- package/dist/components/SectionFlare/SectionFlare.vue.js +1 -1
- package/dist/components/SectionFlare/SectionFlare.vue.js.map +1 -1
- package/dist/components/ShowMoreButton.vue.js +1 -1
- package/dist/components/ShowMoreButton.vue.script.js +1 -1
- package/dist/components/ShowMoreButton.vue.script.js.map +1 -1
- package/dist/features/Operation/Operation.vue.script.js +2 -2
- package/dist/features/Operation/Operation.vue.script.js.map +1 -1
- package/dist/features/Operation/components/ContentTypeSelect.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ContentTypeSelect.vue.script.js +2 -2
- package/dist/features/Operation/components/ContentTypeSelect.vue.script.js.map +1 -1
- package/dist/features/Operation/components/Header.vue.script.js +1 -1
- package/dist/features/Operation/components/Header.vue.script.js.map +1 -1
- package/dist/features/Operation/components/Headers.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/Headers.vue.js +1 -1
- package/dist/features/Operation/components/Headers.vue.script.js +1 -1
- package/dist/features/Operation/components/Headers.vue.script.js.map +1 -1
- package/dist/features/Operation/components/OperationParameters.vue.script.js +2 -2
- package/dist/features/Operation/components/OperationParameters.vue.script.js.map +1 -1
- package/dist/features/Operation/components/OperationResponses.vue.script.js +1 -1
- package/dist/features/Operation/components/OperationResponses.vue.script.js.map +1 -1
- package/dist/features/Operation/components/OperationScopes.vue.d.ts +8 -0
- package/dist/features/Operation/components/OperationScopes.vue.d.ts.map +1 -0
- package/dist/features/Operation/components/OperationScopes.vue.js +7 -0
- package/dist/features/Operation/components/OperationScopes.vue.js.map +1 -0
- package/dist/features/Operation/components/OperationScopes.vue.script.js +60 -0
- package/dist/features/Operation/components/OperationScopes.vue.script.js.map +1 -0
- package/dist/features/Operation/components/ParameterList.vue.script.js +1 -1
- package/dist/features/Operation/components/ParameterList.vue.script.js.map +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.js +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.script.js +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.script.js.map +1 -1
- package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/RequestBody.vue.js +1 -1
- package/dist/features/Operation/components/RequestBody.vue.script.js +2 -2
- package/dist/features/Operation/components/RequestBody.vue.script.js.map +1 -1
- package/dist/features/Operation/components/SecurityRequirementBadge.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/SecurityRequirementBadge.vue.js.map +1 -1
- package/dist/features/Operation/components/SecurityRequirementBadge.vue.script.js +90 -17
- package/dist/features/Operation/components/SecurityRequirementBadge.vue.script.js.map +1 -1
- package/dist/features/Operation/components/SecurityRequirementBadgeScheme.vue.script.js +1 -1
- package/dist/features/Operation/components/SecurityRequirementBadgeScheme.vue.script.js.map +1 -1
- package/dist/features/Operation/components/callbacks/Callback.vue.js +1 -1
- package/dist/features/Operation/components/callbacks/Callback.vue.script.js +1 -1
- package/dist/features/Operation/components/callbacks/Callback.vue.script.js.map +1 -1
- package/dist/features/Operation/components/callbacks/Callbacks.vue.script.js +1 -1
- package/dist/features/Operation/components/callbacks/Callbacks.vue.script.js.map +1 -1
- package/dist/features/Operation/components/helpers/get-parameter-examples.js.map +1 -1
- package/dist/features/Operation/helpers/filter-selected-security.js.map +1 -1
- package/dist/features/Operation/helpers/flatten-deep-object-query-parameter.js.map +1 -1
- package/dist/features/Operation/helpers/get-required-security.d.ts +13 -0
- package/dist/features/Operation/helpers/get-required-security.d.ts.map +1 -1
- package/dist/features/Operation/helpers/get-required-security.js +22 -1
- package/dist/features/Operation/helpers/get-required-security.js.map +1 -1
- package/dist/features/Operation/helpers/operation-stability.js.map +1 -1
- package/dist/features/Operation/helpers/should-ignore-entity.js.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.js +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.js.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.script.js +16 -7
- package/dist/features/Operation/layouts/ClassicLayout.vue.script.js.map +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.js +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.js.map +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.script.js +3 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.script.js.map +1 -1
- package/dist/features/Operation/request-body-composition-index.js.map +1 -1
- package/dist/features/Search/components/SearchButton.vue.d.ts.map +1 -1
- package/dist/features/Search/components/SearchButton.vue.script.js +1 -1
- package/dist/features/Search/components/SearchButton.vue.script.js.map +1 -1
- package/dist/features/Search/components/SearchModal.vue.d.ts.map +1 -1
- package/dist/features/Search/components/SearchModal.vue.js +1 -1
- package/dist/features/Search/components/SearchModal.vue.script.js +1 -1
- package/dist/features/Search/components/SearchModal.vue.script.js.map +1 -1
- package/dist/features/Search/components/SearchResult.vue.d.ts.map +1 -1
- package/dist/features/Search/components/SearchResult.vue.script.js +1 -1
- package/dist/features/Search/components/SearchResult.vue.script.js.map +1 -1
- package/dist/features/Search/helpers/create-fuse-instance.js.map +1 -1
- package/dist/features/Search/helpers/create-search-index.js.map +1 -1
- package/dist/features/Search/hooks/useSearchIndex.js.map +1 -1
- package/dist/features/ask-agent-button/AskAgentButton.vue.js +1 -1
- package/dist/features/ask-agent-button/AskAgentButton.vue.script.js +1 -1
- package/dist/features/ask-agent-button/AskAgentButton.vue.script.js.map +1 -1
- package/dist/features/developer-tools/DeveloperTools.vue.script.js +2 -2
- package/dist/features/developer-tools/DeveloperTools.vue.script.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarBlurb.vue.js +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarBlurb.vue.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.script.js +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue.script.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.d.ts.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.script.js +3 -3
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.script.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.d.ts +2 -2
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.script.js +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.script.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.script.js +2 -2
- package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.script.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.d.ts.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.script.js +4 -3
- package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.script.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.d.ts.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.script.js +2 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.script.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.d.ts.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.script.js +4 -3
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.script.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.d.ts.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.script.js +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarTitle.vue.script.js.map +1 -1
- package/dist/features/developer-tools/components/DeployApiReference.vue.script.js +1 -1
- package/dist/features/developer-tools/components/DeployApiReference.vue.script.js.map +1 -1
- package/dist/features/developer-tools/components/ModifyConfiguration.vue.script.js +2 -2
- package/dist/features/developer-tools/components/ModifyConfiguration.vue.script.js.map +1 -1
- package/dist/features/developer-tools/components/ShareApiReference.vue.script.js +1 -1
- package/dist/features/developer-tools/components/ShareApiReference.vue.script.js.map +1 -1
- package/dist/features/example-responses/ExampleResponse.vue.js +1 -1
- package/dist/features/example-responses/ExampleResponse.vue.script.js +1 -1
- package/dist/features/example-responses/ExampleResponse.vue.script.js.map +1 -1
- package/dist/features/example-responses/ExampleResponseTab.vue.js +1 -1
- package/dist/features/example-responses/ExampleResponseTab.vue.script.js +1 -1
- package/dist/features/example-responses/ExampleResponseTab.vue.script.js.map +1 -1
- package/dist/features/example-responses/ExampleResponseTabList.vue.d.ts.map +1 -1
- package/dist/features/example-responses/ExampleResponseTabList.vue.js +1 -1
- package/dist/features/example-responses/ExampleResponseTabList.vue.script.js +1 -1
- package/dist/features/example-responses/ExampleResponseTabList.vue.script.js.map +1 -1
- package/dist/features/example-responses/ExampleResponses.vue.d.ts.map +1 -1
- package/dist/features/example-responses/ExampleResponses.vue.js +1 -1
- package/dist/features/example-responses/ExampleResponses.vue.script.js +1 -1
- package/dist/features/example-responses/ExampleResponses.vue.script.js.map +1 -1
- package/dist/features/example-responses/ExampleSchema.vue.script.js +1 -1
- package/dist/features/example-responses/ExampleSchema.vue.script.js.map +1 -1
- package/dist/features/example-responses/helpers/has-response-content.js.map +1 -1
- package/dist/features/example-responses/helpers/normalize-mime-type-object.js.map +1 -1
- package/dist/features/example-responses/helpers/normalize-mime-type.js.map +1 -1
- package/dist/features/external-docs/ExternalDocs.vue.d.ts.map +1 -1
- package/dist/features/external-docs/ExternalDocs.vue.js.map +1 -1
- package/dist/features/external-docs/ExternalDocs.vue.script.js +27 -15
- package/dist/features/external-docs/ExternalDocs.vue.script.js.map +1 -1
- package/dist/features/info-object/Contact.vue.d.ts.map +1 -1
- package/dist/features/info-object/Contact.vue.js.map +1 -1
- package/dist/features/info-object/Contact.vue.script.js +18 -12
- package/dist/features/info-object/Contact.vue.script.js.map +1 -1
- package/dist/features/info-object/InfoLink.vue.d.ts.map +1 -1
- package/dist/features/info-object/InfoLink.vue.js.map +1 -1
- package/dist/features/info-object/InfoLink.vue.script.js +23 -11
- package/dist/features/info-object/InfoLink.vue.script.js.map +1 -1
- package/dist/features/info-object/License.vue.d.ts.map +1 -1
- package/dist/features/info-object/License.vue.js.map +1 -1
- package/dist/features/info-object/License.vue.script.js +13 -7
- package/dist/features/info-object/License.vue.script.js.map +1 -1
- package/dist/features/info-object/TermsOfService.vue.d.ts.map +1 -1
- package/dist/features/info-object/TermsOfService.vue.js.map +1 -1
- package/dist/features/info-object/TermsOfService.vue.script.js +12 -6
- package/dist/features/info-object/TermsOfService.vue.script.js.map +1 -1
- package/dist/features/localization/locales/ar.d.ts +1 -0
- package/dist/features/localization/locales/ar.d.ts.map +1 -1
- package/dist/features/localization/locales/ar.js +2 -1
- package/dist/features/localization/locales/ar.js.map +1 -1
- package/dist/features/localization/locales/de.d.ts +1 -0
- package/dist/features/localization/locales/de.d.ts.map +1 -1
- package/dist/features/localization/locales/de.js +2 -1
- package/dist/features/localization/locales/de.js.map +1 -1
- package/dist/features/localization/locales/en.d.ts +1 -0
- package/dist/features/localization/locales/en.d.ts.map +1 -1
- package/dist/features/localization/locales/en.js +2 -1
- package/dist/features/localization/locales/en.js.map +1 -1
- package/dist/features/localization/locales/es.d.ts +1 -0
- package/dist/features/localization/locales/es.d.ts.map +1 -1
- package/dist/features/localization/locales/es.js +2 -1
- package/dist/features/localization/locales/es.js.map +1 -1
- package/dist/features/localization/locales/fr.d.ts +1 -0
- package/dist/features/localization/locales/fr.d.ts.map +1 -1
- package/dist/features/localization/locales/fr.js +2 -1
- package/dist/features/localization/locales/fr.js.map +1 -1
- package/dist/features/localization/locales/pt.d.ts +229 -0
- package/dist/features/localization/locales/pt.d.ts.map +1 -0
- package/dist/features/localization/locales/pt.js +227 -0
- package/dist/features/localization/locales/pt.js.map +1 -0
- package/dist/features/localization/locales/ru.d.ts +1 -0
- package/dist/features/localization/locales/ru.d.ts.map +1 -1
- package/dist/features/localization/locales/ru.js +2 -1
- package/dist/features/localization/locales/ru.js.map +1 -1
- package/dist/features/localization/locales/zh-cn.d.ts +1 -0
- package/dist/features/localization/locales/zh-cn.d.ts.map +1 -1
- package/dist/features/localization/locales/zh-cn.js +2 -1
- package/dist/features/localization/locales/zh-cn.js.map +1 -1
- package/dist/features/localization/translations.d.ts +235 -0
- package/dist/features/localization/translations.d.ts.map +1 -1
- package/dist/features/localization/translations.js +4 -2
- package/dist/features/localization/translations.js.map +1 -1
- package/dist/features/localization/use-localization.js.map +1 -1
- package/dist/features/multiple-documents/DocumentSelector.vue.d.ts.map +1 -1
- package/dist/features/multiple-documents/DocumentSelector.vue.script.js +1 -1
- package/dist/features/multiple-documents/DocumentSelector.vue.script.js.map +1 -1
- package/dist/features/specification-extension/SpecificationExtension.vue.script.js +1 -1
- package/dist/features/specification-extension/SpecificationExtension.vue.script.js.map +1 -1
- package/dist/features/specification-extension/helpers.js.map +1 -1
- package/dist/features/test-request-button/TestRequestButton.vue.js +1 -1
- package/dist/features/test-request-button/TestRequestButton.vue.script.js +1 -1
- package/dist/features/test-request-button/TestRequestButton.vue.script.js.map +1 -1
- package/dist/features/x-badges/XBadges.vue.d.ts.map +1 -1
- package/dist/features/x-badges/XBadges.vue.script.js +1 -1
- package/dist/features/x-badges/XBadges.vue.script.js.map +1 -1
- package/dist/helpers/color-mode.js.map +1 -1
- package/dist/helpers/download.js.map +1 -1
- package/dist/helpers/get-async-api-message-payload-schema.js.map +1 -1
- package/dist/helpers/get-async-api-model-schema.js.map +1 -1
- package/dist/helpers/id-routing.d.ts +18 -4
- package/dist/helpers/id-routing.d.ts.map +1 -1
- package/dist/helpers/id-routing.js +67 -20
- package/dist/helpers/id-routing.js.map +1 -1
- package/dist/helpers/is-introduction-entry.js.map +1 -1
- package/dist/helpers/lazy-bus.js.map +1 -1
- package/dist/helpers/load-from-perssistance.js.map +1 -1
- package/dist/helpers/map-config-plugins.js.map +1 -1
- package/dist/helpers/map-config-to-workspace-store.js.map +1 -1
- package/dist/helpers/normalize-configurations.js +1 -1
- package/dist/helpers/normalize-configurations.js.map +1 -1
- package/dist/helpers/openapi.d.ts +6 -1
- package/dist/helpers/openapi.d.ts.map +1 -1
- package/dist/helpers/openapi.js +37 -6
- package/dist/helpers/openapi.js.map +1 -1
- package/dist/helpers/safe-deep-clone.js.map +1 -1
- package/dist/helpers/storage.d.ts +21 -2
- package/dist/helpers/storage.d.ts.map +1 -1
- package/dist/helpers/storage.js +14 -0
- package/dist/helpers/storage.js.map +1 -1
- package/dist/helpers/upload-temp-document.js.map +1 -1
- package/dist/hooks/use-agent.js.map +1 -1
- package/dist/hooks/use-intersection.js.map +1 -1
- package/dist/plugins/hooks/usePluginManager.js.map +1 -1
- package/dist/plugins/persistence-plugin.js +6 -1
- package/dist/plugins/persistence-plugin.js.map +1 -1
- package/dist/plugins/plugin-manager.js +35 -0
- package/dist/plugins/plugin-manager.js.map +1 -1
- package/dist/plugins/posthog/index.js.map +1 -1
- package/dist/standalone/lib/html-api.d.ts.map +1 -1
- package/dist/standalone/lib/html-api.js +11 -4
- package/dist/standalone/lib/html-api.js.map +1 -1
- package/dist/standalone/lib/load-plugins-from-urls.d.ts +13 -0
- package/dist/standalone/lib/load-plugins-from-urls.d.ts.map +1 -0
- package/dist/standalone/lib/load-plugins-from-urls.js +60 -0
- package/dist/standalone/lib/load-plugins-from-urls.js.map +1 -0
- package/dist/style.css +1637 -1505
- package/dist/styles/print.css +118 -0
- package/dist/styles/tailwind.config.css +16 -0
- package/dist/vue-styles.css +1102 -1050
- package/package.json +29 -29
- package/dist/browser/chunks/AgentScalarChatInterface-YU9KKgvZ.js +0 -27
- package/dist/browser/chunks/ScalarTextInput.vue-B-Nhpn0q.js +0 -27
- package/dist/browser/chunks/browser-67K6wmG9.js +0 -129
- package/dist/browser/chunks/modal-BVUfMpuv.js +0 -15
- package/dist/browser/chunks/modal-WJ4Gcv8N.js +0 -99
- package/dist/browser/chunks/runtime-core.esm-bundler-Byrbbu5Q.js +0 -17
- package/dist/browser/chunks/vendor-BqFs9NIb.js +0 -306
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,95 @@
|
|
|
1
1
|
# @scalar/api-reference
|
|
2
2
|
|
|
3
|
+
## 1.64.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#9828](https://github.com/scalar/scalar/pull/9828): Bump shared build and runtime dependencies to their latest compatible versions
|
|
8
|
+
(fuse.js, vite, vitest, tailwindcss, @vitejs/plugin-vue, @vue/test-utils,
|
|
9
|
+
posthog-js, yaml, and the CSS injection plugin). The fuse.js 7.5.0 upgrade
|
|
10
|
+
tightened generic inference, so the empty `new Fuse([])` search instances now
|
|
11
|
+
pass an explicit `FuseData` type argument.
|
|
12
|
+
- [#9837](https://github.com/scalar/scalar/pull/9837): Keep the selected server when the configuration is updated. Pushing a config update to a mounted reference (for example a refreshed auth token via `updateConfiguration`) rebases the document in the store, which previously reset the server selector back to the first server. The user's selected server is now preserved across configuration updates.
|
|
13
|
+
- [#9783](https://github.com/scalar/scalar/pull/9783): fix: resolve axe-core ARIA violations in the API reference sidebar and client tabs
|
|
14
|
+
|
|
15
|
+
Sidebar items used `aria-selected` on links/buttons (invalid for those roles) and the search trigger used `role="search"` on a button. Selected items now use `aria-current="page"`, the search control is a plain named button, and the sidebar no longer sets an invalid `role="navigation"` on `<aside>` (it keeps the default complementary landmark).
|
|
16
|
+
|
|
17
|
+
Client library and SDK installation "More" comboboxes sat inside `role="tablist"`, which fails `aria-required-children`. They now sit beside the tablist. MCP install controls without a target URL render as buttons instead of empty `a[href=""]` links.
|
|
18
|
+
|
|
19
|
+
- [#9791](https://github.com/scalar/scalar/pull/9791): Stop recursive schema rendering when a discriminator variant `allOf`s back to its base type. The selected child now inherits the parent's discriminator context so the mapping is not re-inferred on every nest.
|
|
20
|
+
- [#9830](https://github.com/scalar/scalar/pull/9830): Stop listing enum values twice for an array parameter whose `items` is a `$ref`
|
|
21
|
+
to an enum schema. The values are now listed only in the array items card, which
|
|
22
|
+
also shows the item schema's title and description.
|
|
23
|
+
- [#9839](https://github.com/scalar/scalar/pull/9839): Harden the API reference against untrusted OpenAPI documents:
|
|
24
|
+
- Link targets taken from the document (`info.license.url`, `info.termsOfService`,
|
|
25
|
+
`info.contact.url`, `externalDocs.url`, `x-scalar-links`) and the direct download link are now
|
|
26
|
+
checked against an allow list of protocols, so a document can no longer render a `javascript:`
|
|
27
|
+
link that runs script when a reader clicks it. Unsafe values fall back to plain text.
|
|
28
|
+
- `deepMerge` (used by the exported `createEmptySpecification`) no longer writes through the
|
|
29
|
+
prototype chain, so a document can no longer add properties to `Object.prototype` via `__proto__`,
|
|
30
|
+
`constructor`, or `prototype`. Keys with those names are kept as plain data instead of being
|
|
31
|
+
dropped, so a schema is still free to describe a property named `constructor`.
|
|
32
|
+
- `customCss` can no longer close the injected `<style>` tag, which mattered during server
|
|
33
|
+
rendering where the value lands in the HTML stream verbatim.
|
|
34
|
+
- Added `rel="noopener noreferrer"` to the remaining `target="_blank"` links.
|
|
35
|
+
|
|
36
|
+
Adds `isSafeUrl` and `sanitizeUrl` to `@scalar/helpers/url/is-safe-url`.
|
|
37
|
+
|
|
38
|
+
- [#9829](https://github.com/scalar/scalar/pull/9829): Update Vue to 3.5.40. Vue 3.5.36 tightened `defineModel` default validation, so
|
|
39
|
+
models with array or object defaults now use the factory form
|
|
40
|
+
(`defineModel<T[]>({ default: () => [] })`) as Vue already requires for regular
|
|
41
|
+
props. Behaviour is unchanged.
|
|
42
|
+
- [#9790](https://github.com/scalar/scalar/pull/9790): fix: keep dots in webhook navigation deep links
|
|
43
|
+
|
|
44
|
+
Webhook event names that use dots (for example `account_holder.created`) had the
|
|
45
|
+
dot dropped when building the navigation id, joining adjacent words into
|
|
46
|
+
`account-holdercreated`. Dots are now kept, producing `account-holder.created`.
|
|
47
|
+
|
|
48
|
+
Old deep links using the dropped-dot slug are redirected to the new slug, so
|
|
49
|
+
existing bookmarks keep resolving.
|
|
50
|
+
|
|
51
|
+
## 1.64.0
|
|
52
|
+
|
|
53
|
+
### Minor Changes
|
|
54
|
+
|
|
55
|
+
- [#9683](https://github.com/scalar/scalar/pull/9683): Surface the required OAuth scopes for an operation as a dedicated "OAuth scopes" section below the description (above parameters), instead of only inside the "Auth Required" badge popover. Scopes are de-duplicated across security alternatives and shown in both the modern and classic layouts, as well as on AsyncAPI operations.
|
|
56
|
+
- [#9711](https://github.com/scalar/scalar/pull/9711): feat: add `pluginUrls` configuration option to load API Reference plugins from URLs
|
|
57
|
+
|
|
58
|
+
Each entry must point to an ESM module that exports a plugin (the same shape as the `plugins` entries) as its default export. The standalone build (`Scalar.createApiReference`) imports the modules before the API reference mounts and registers their default exports alongside the plugins passed directly. Unlike `plugins`, the new option is JSON-serializable, so integrations that pass their configuration as JSON (for example the Docker container or Scalar for Aspire) can load plugins without replacing the whole bundle.
|
|
59
|
+
|
|
60
|
+
### Patch Changes
|
|
61
|
+
|
|
62
|
+
- [#9732](https://github.com/scalar/scalar/pull/9732): Render every `oneOf`/`anyOf` group of an `allOf` in place. Previously, when one object composed several mutually-exclusive choices as sibling `oneOf`/`anyOf` under `allOf`, only the first group was shown and the rest were silently dropped. Each choice group now renders its own selector in the position it was declared, and the generated request example stays in sync per group.
|
|
63
|
+
- [#9794](https://github.com/scalar/scalar/pull/9794): Keep sibling `properties` when flattening a single-member `allOf`. Previously, a schema declaring its own `properties` next to an `allOf` holding a single `$ref` lost those sibling properties: the referenced schema's `properties` overwrote them instead of being combined, and the referenced schema's `title`/`description` replaced the parent's. Sibling and inherited properties now render together, `required` lists are unioned, and the parent schema's own annotations win over the base it extends.
|
|
64
|
+
- [#9757](https://github.com/scalar/scalar/pull/9757): fix: read enum metadata from array items
|
|
65
|
+
|
|
66
|
+
When an enum is defined inside an array schema's `items`, the enum values were resolved from `items` but their `x-enum-varnames`, `x-enumNames`, and `x-enumDescriptions` were still read from the outer schema, so the metadata was dropped. Both the values and their metadata are now read from the same schema.
|
|
67
|
+
|
|
68
|
+
- [#9681](https://github.com/scalar/scalar/pull/9681): The "Auth Required" / "Auth Optional" badge on operations now opens on hover, not just on click
|
|
69
|
+
- [#9753](https://github.com/scalar/scalar/pull/9753): fix: badge base styles no longer rely on zero specificity
|
|
70
|
+
|
|
71
|
+
The badge base rule was written with `:where(.badge)`, which the scoped-style compiler collapsed to zero specificity, letting any late-loading reset clobber the badge font size, padding, and colors. The base styles now carry real specificity, and consumers that intentionally override them (the download-link json/yaml badges and the webhook badge) keep winning through tailwind-merge and higher-specificity variant rules.
|
|
72
|
+
|
|
73
|
+
- [#9766](https://github.com/scalar/scalar/pull/9766): fix: give the collapsible section trigger an accessible name and a valid `aria-controls` target
|
|
74
|
+
|
|
75
|
+
The trigger button rendered by `CompactSection` carried `aria-controls` set to its own `id`, so it declared that it controls itself, and it exposed no accessible name of its own. Screen reader users heard an unnamed button, and axe-core reported `button-name` and `aria-allowed-attr` on every model section.
|
|
76
|
+
|
|
77
|
+
The trigger now points `aria-controls` at the collapsible region, which carries its own id. While the section is collapsed the attribute is dropped entirely rather than left pointing at an element that is not rendered.
|
|
78
|
+
|
|
79
|
+
The accessible name now comes from `aria-labelledby` pointing at the heading the trigger already renders, so the name is always the visible text. Referencing the heading rather than copying it into an `aria-label` means the name cannot drift out of sync with what is on screen, which is the WCAG 2.5.3 (Label in Name) failure a duplicated string would risk.
|
|
80
|
+
|
|
81
|
+
- [#9754](https://github.com/scalar/scalar/pull/9754): fix: adapt the info links to the rendered width of the reference instead of the viewport
|
|
82
|
+
|
|
83
|
+
The introduction's info links (contact, license, terms of service, external docs, and `x-scalar-links`), the section header grid, and the classic-layout selector cards switched their layout based on viewport media queries, while the rest of the reference adapts to the rendered width of the reference through the `narrow-references-container` container query. They now restyle based on the container as well, through a new `narrow:` Tailwind variant.
|
|
84
|
+
|
|
85
|
+
- [#9751](https://github.com/scalar/scalar/pull/9751): fix: keep even heading-to-description spacing on the operation title in narrow layouts
|
|
86
|
+
|
|
87
|
+
The narrow (single-column) operation layout bumped the operation title's bottom margin to 24px, so the gap between the heading and its description no longer matched the 12px used on wider screens. The override is removed so the title keeps the shared 12px spacing at every width.
|
|
88
|
+
|
|
89
|
+
- [#9676](https://github.com/scalar/scalar/pull/9676): Preload additional documents in a multi-document setup while the browser is idle, so switching between them is instant.
|
|
90
|
+
- [#9788](https://github.com/scalar/scalar/pull/9788): Add print styles so printing (or saving to PDF) no longer renders expanded content over the text that follows it. The reference lays itself out as a fixed-viewport application, and its sticky columns were pinned to a screen measurement that is meaningless on paper. Printing now flattens that shell into ordinary document flow: navigation and floating chrome are hidden, sticky positioning and viewport-derived height caps are dropped so long examples are no longer truncated, and small units such as properties and cards avoid breaking across pages.
|
|
91
|
+
- [#9691](https://github.com/scalar/scalar/pull/9691): Show the `format` of primitive array items (e.g. an array of `uuid` strings) in the schema property heading
|
|
92
|
+
|
|
3
93
|
## 1.63.0
|
|
4
94
|
|
|
5
95
|
### Minor Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AsyncApiServerSelector.vue.d.ts","sourceRoot":"","sources":["../../../../src/blocks/scalar-asyncapi-server-selector-block/components/AsyncApiServerSelector.vue"],"names":[],"mappings":"AAsHA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAA;AAClF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AASvE,KAAK,aAAa,GAAG;IACnB,+CAA+C;IAC/C,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,oCAAoC;IACpC,cAAc,EAAE,mBAAmB,GAAG,IAAI,CAAA;IAC1C,wBAAwB;IACxB,OAAO,EAAE,mBAAmB,EAAE,CAAA;CAC/B,CAAA;AAED;;;;;;;;;GASG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAGzC,QAAA,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"AsyncApiServerSelector.vue.d.ts","sourceRoot":"","sources":["../../../../src/blocks/scalar-asyncapi-server-selector-block/components/AsyncApiServerSelector.vue"],"names":[],"mappings":"AAsHA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAA;AAClF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AASvE,KAAK,aAAa,GAAG;IACnB,+CAA+C;IAC/C,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,oCAAoC;IACpC,cAAc,EAAE,mBAAmB,GAAG,IAAI,CAAA;IAC1C,wBAAwB;IACxB,OAAO,EAAE,mBAAmB,EAAE,CAAA;CAC/B,CAAA;AAED;;;;;;;;;GASG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAGzC,QAAA,MAAM,YAAY,sSAsKd,CAAC"}
|
|
@@ -7,7 +7,7 @@ import { ScalarMarkdown } from "@scalar/components/markdown";
|
|
|
7
7
|
//#region src/blocks/scalar-asyncapi-server-selector-block/components/AsyncApiServerSelector.vue?vue&type=script&setup=true&lang.ts
|
|
8
8
|
var _hoisted_1 = { class: "bg-b-2 flex h-8 items-center rounded-t-xl border-x border-t px-3 py-2.5 font-medium" };
|
|
9
9
|
var _hoisted_2 = ["id"];
|
|
10
|
-
var AsyncApiServerSelector_vue_vue_type_script_setup_true_lang_default =
|
|
10
|
+
var AsyncApiServerSelector_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
11
11
|
__name: "AsyncApiServerSelector",
|
|
12
12
|
props: {
|
|
13
13
|
eventBus: {},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AsyncApiServerSelector.vue.script.js","names":[],"sources":["../../../../src/blocks/scalar-asyncapi-server-selector-block/components/AsyncApiServerSelector.vue"],"sourcesContent":["<script lang=\"ts\">\ntype SelectorProps = {\n /** The event bus to use for emitting events */\n eventBus: WorkspaceEventBus\n /** The currently selected server */\n selectedServer: AsyncApiServerEntry | null\n /** Available servers */\n servers: AsyncApiServerEntry[]\n}\n\n/**\n * AsyncApiServerSelector\n *\n * Core component for rendering an AsyncAPI server selector block. It mirrors the\n * OpenAPI ServerSelector, but works with the AsyncAPI server shape (a named map\n * of `host`/`protocol`/`pathname` rather than an array of `url`).\n *\n * @event asyncapi-server:update:selected - Emitted when the selected server changes\n * @event asyncapi-server:update:variables - Emitted when a server variable changes\n */\nexport default {}\n</script>\n\n<script lang=\"ts\" setup>\nimport { ServerVariablesForm } from '@scalar/api-client/components/Server'\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport type { AsyncApiServerEntry } from '@scalar/workspace-store/channel-example'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport { computed, useId } from 'vue'\n\nimport { useLocalization } from '@/features/localization'\n\nimport Selector from './Selector.vue'\n\nconst { eventBus, servers, selectedServer } = defineProps<SelectorProps>()\n\nconst id = useId()\nconst { translate } = useLocalization()\n\n/**\n * Normalize AsyncAPI server variables into the shape the shared\n * ServerVariablesForm expects (resolving references and defaulting `default`).\n */\nconst serverVariables = computed(() => {\n const variables = selectedServer?.server.variables\n if (!variables) {\n return undefined\n }\n\n return Object.fromEntries(\n Object.entries(variables).map(([name, variable]) => {\n const resolved = getResolvedRef(variable)\n return [\n name,\n {\n default: resolved.default ?? '',\n enum: resolved.enum,\n description: resolved.description,\n },\n ]\n }),\n )\n})\n\n/** Update the selected server */\nconst updateServer = (name: string) => {\n eventBus.emit('asyncapi-server:update:selected', { name })\n}\n\n/** Update a server variable on the selected server */\nconst updateServerVariable = (key: string, value: string) => {\n if (!selectedServer) {\n return\n }\n\n eventBus.emit('asyncapi-server:update:variables', {\n name: selectedServer.name,\n key,\n value,\n })\n}\n</script>\n\n<template>\n <label\n class=\"bg-b-2 flex h-8 items-center rounded-t-xl border-x border-t px-3 py-2.5 font-medium\">\n {{ translate('server.label') }}\n </label>\n <div\n :id=\"id\"\n class=\"border\"\n :class=\"{\n 'rounded-b-xl': !selectedServer?.description && !serverVariables,\n }\">\n <Selector\n v-if=\"servers.length\"\n :selectedServer\n :servers=\"servers\"\n :target=\"id\"\n @update:modelValue=\"updateServer\" />\n </div>\n <ServerVariablesForm\n layout=\"reference\"\n :variables=\"serverVariables\"\n @update:variable=\"updateServerVariable\" />\n\n <!-- Description -->\n <ScalarMarkdown\n v-if=\"selectedServer?.description\"\n class=\"text-c-3 rounded-b-xl border-x border-b px-3 py-1.5\"\n :value=\"selectedServer.description\" />\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;EAqCA,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"AsyncApiServerSelector.vue.script.js","names":[],"sources":["../../../../src/blocks/scalar-asyncapi-server-selector-block/components/AsyncApiServerSelector.vue"],"sourcesContent":["<script lang=\"ts\">\ntype SelectorProps = {\n /** The event bus to use for emitting events */\n eventBus: WorkspaceEventBus\n /** The currently selected server */\n selectedServer: AsyncApiServerEntry | null\n /** Available servers */\n servers: AsyncApiServerEntry[]\n}\n\n/**\n * AsyncApiServerSelector\n *\n * Core component for rendering an AsyncAPI server selector block. It mirrors the\n * OpenAPI ServerSelector, but works with the AsyncAPI server shape (a named map\n * of `host`/`protocol`/`pathname` rather than an array of `url`).\n *\n * @event asyncapi-server:update:selected - Emitted when the selected server changes\n * @event asyncapi-server:update:variables - Emitted when a server variable changes\n */\nexport default {}\n</script>\n\n<script lang=\"ts\" setup>\nimport { ServerVariablesForm } from '@scalar/api-client/components/Server'\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport type { AsyncApiServerEntry } from '@scalar/workspace-store/channel-example'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport { computed, useId } from 'vue'\n\nimport { useLocalization } from '@/features/localization'\n\nimport Selector from './Selector.vue'\n\nconst { eventBus, servers, selectedServer } = defineProps<SelectorProps>()\n\nconst id = useId()\nconst { translate } = useLocalization()\n\n/**\n * Normalize AsyncAPI server variables into the shape the shared\n * ServerVariablesForm expects (resolving references and defaulting `default`).\n */\nconst serverVariables = computed(() => {\n const variables = selectedServer?.server.variables\n if (!variables) {\n return undefined\n }\n\n return Object.fromEntries(\n Object.entries(variables).map(([name, variable]) => {\n const resolved = getResolvedRef(variable)\n return [\n name,\n {\n default: resolved.default ?? '',\n enum: resolved.enum,\n description: resolved.description,\n },\n ]\n }),\n )\n})\n\n/** Update the selected server */\nconst updateServer = (name: string) => {\n eventBus.emit('asyncapi-server:update:selected', { name })\n}\n\n/** Update a server variable on the selected server */\nconst updateServerVariable = (key: string, value: string) => {\n if (!selectedServer) {\n return\n }\n\n eventBus.emit('asyncapi-server:update:variables', {\n name: selectedServer.name,\n key,\n value,\n })\n}\n</script>\n\n<template>\n <label\n class=\"bg-b-2 flex h-8 items-center rounded-t-xl border-x border-t px-3 py-2.5 font-medium\">\n {{ translate('server.label') }}\n </label>\n <div\n :id=\"id\"\n class=\"border\"\n :class=\"{\n 'rounded-b-xl': !selectedServer?.description && !serverVariables,\n }\">\n <Selector\n v-if=\"servers.length\"\n :selectedServer\n :servers=\"servers\"\n :target=\"id\"\n @update:modelValue=\"updateServer\" />\n </div>\n <ServerVariablesForm\n layout=\"reference\"\n :variables=\"serverVariables\"\n @update:variable=\"updateServerVariable\" />\n\n <!-- Description -->\n <ScalarMarkdown\n v-if=\"selectedServer?.description\"\n class=\"text-c-3 rounded-b-xl border-x border-b px-3 py-1.5\"\n :value=\"selectedServer.description\" />\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;EAqCA,MAAM,KAAK,MAAM;EACjB,MAAM,EAAE,cAAc,gBAAgB;;;;;EAMtC,MAAM,kBAAkB,eAAe;GACrC,MAAM,YAAY,QAAA,gBAAgB,OAAO;GACzC,IAAI,CAAC,WACH;GAGF,OAAO,OAAO,YACZ,OAAO,QAAQ,SAAS,CAAC,CAAC,KAAK,CAAC,MAAM,cAAc;IAClD,MAAM,WAAW,eAAe,QAAQ;IACxC,OAAO,CACL,MACA;KACE,SAAS,SAAS,WAAW;KAC7B,MAAM,SAAS;KACf,aAAa,SAAS;IACxB,CACF;GACF,CAAC,CACH;EACF,CAAC;;EAGD,MAAM,gBAAgB,SAAiB;GACrC,QAAA,SAAS,KAAK,mCAAmC,EAAE,KAAK,CAAC;EAC3D;;EAGA,MAAM,wBAAwB,KAAa,UAAkB;GAC3D,IAAI,CAAC,QAAA,gBACH;GAGF,QAAA,SAAS,KAAK,oCAAoC;IAChD,MAAM,QAAA,eAAe;IACrB;IACA;GACF,CAAC;EACH;;;IAIE,mBAGQ,SAHR,YAGQ,gBADH,MAAA,SAAA,CAAS,CAAA,cAAA,CAAA,GAAA,CAAA;IAEd,mBAYM,OAAA;KAXH,IAAI,MAAA,EAAA;KACL,OAAK,eAAA,CAAC,UAAQ,EAAA,gBAAA,CACmB,QAAA,gBAAgB,eAAW,CAAK,gBAAA,MAAA,CAAA,CAAA;QAIzD,QAAA,QAAQ,UAAA,UAAA,GADhB,YAKsC,kBAAA;;KAHnC,gBAAA,QAAA;KACA,SAAS,QAAA;KACT,QAAQ,MAAA,EAAA;KACR,uBAAmB;;;;;;IAExB,YAG4C,MAAA,mBAAA,GAAA;KAF1C,QAAO;KACN,WAAW,gBAAA;KACX,qBAAiB;;IAIZ,QAAA,gBAAgB,eAAA,UAAA,GADxB,YAGwC,MAAA,cAAA,GAAA;;KADtC,OAAM;KACL,OAAO,QAAA,eAAe"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Selector.vue.d.ts","sourceRoot":"","sources":["../../../../src/blocks/scalar-asyncapi-server-selector-block/components/Selector.vue"],"names":[],"mappings":"AAwFA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAA;AAKlF,KAAK,WAAW,GAAG;IACjB,0BAA0B;IAC1B,cAAc,EAAE,mBAAmB,GAAG,IAAI,CAAA;IAC1C,wBAAwB;IACxB,OAAO,EAAE,mBAAmB,EAAE,CAAA;IAC9B,qEAAqE;IACrE,MAAM,EAAE,MAAM,CAAA;CACf,CAAC;
|
|
1
|
+
{"version":3,"file":"Selector.vue.d.ts","sourceRoot":"","sources":["../../../../src/blocks/scalar-asyncapi-server-selector-block/components/Selector.vue"],"names":[],"mappings":"AAwFA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAA;AAKlF,KAAK,WAAW,GAAG;IACjB,0BAA0B;IAC1B,cAAc,EAAE,mBAAmB,GAAG,IAAI,CAAA;IAC1C,wBAAwB;IACxB,OAAO,EAAE,mBAAmB,EAAE,CAAA;IAC9B,qEAAqE;IACrE,MAAM,EAAE,MAAM,CAAA;CACf,CAAC;AAuMF,QAAA,MAAM,YAAY;;;;;;;;;;;;kFAIhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -12,7 +12,7 @@ var _hoisted_3 = {
|
|
|
12
12
|
};
|
|
13
13
|
var _hoisted_4 = { class: "sr-only" };
|
|
14
14
|
var _hoisted_5 = { class: "overflow-x-auto" };
|
|
15
|
-
var Selector_vue_vue_type_script_setup_true_lang_default =
|
|
15
|
+
var Selector_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
16
16
|
__name: "Selector",
|
|
17
17
|
props: {
|
|
18
18
|
selectedServer: {},
|
package/dist/blocks/scalar-asyncapi-server-selector-block/components/Selector.vue.script.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Selector.vue.script.js","names":[],"sources":["../../../../src/blocks/scalar-asyncapi-server-selector-block/components/Selector.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components/button'\nimport { ScalarListbox } from '@scalar/components/listbox'\nimport { ScalarIconCaretDown } from '@scalar/icons'\nimport type { AsyncApiServerEntry } from '@scalar/workspace-store/channel-example'\nimport { computed } from 'vue'\n\nimport { useLocalization } from '@/features/localization'\n\nconst { target, servers, selectedServer } = defineProps<{\n /** The selected server */\n selectedServer: AsyncApiServerEntry | null\n /** Available servers */\n servers: AsyncApiServerEntry[]\n /** The id of the target to use for the popover (e.g. address bar) */\n target: string\n}>()\n\nconst emit = defineEmits<{\n /** Emitted with the server name when the selected server changes */\n (e: 'update:modelValue', value: string): void\n}>()\n\nconst { translate } = useLocalization()\n\n/**\n * AsyncAPI servers are a named map without a single `url`, so we key options by\n * the server name and label them with the constructed connection URL.\n */\nconst serverOptions = computed(() =>\n servers.map((server) => ({\n id: server.name,\n label: server.url,\n })),\n)\n\nconst serverUrlWithoutTrailingSlash = computed(\n () => selectedServer?.url?.replace(/\\/$/, '') || '',\n)\n\nconst selectedServerOption = computed(() =>\n serverOptions.value.find((opt) => opt.id === selectedServer?.name),\n)\n\n// For testing\ndefineExpose({\n servers,\n serverUrlWithoutTrailingSlash,\n serverOptions,\n selectedServer,\n})\n</script>\n<template>\n <ScalarListbox\n v-if=\"serverOptions.length > 1\"\n ref=\"elem\"\n class=\"group\"\n :modelValue=\"selectedServerOption\"\n :options=\"serverOptions\"\n placement=\"bottom-start\"\n resize\n :target=\"target\"\n @update:modelValue=\"(e) => emit('update:modelValue', e.id)\">\n <ScalarButton\n class=\"bg-b-1 text-c-1 h-auto w-full justify-start gap-1.5 overflow-x-auto rounded-t-none !rounded-b-xl px-3 py-1.5 text-base/5.25 font-normal whitespace-nowrap -outline-offset-1\"\n variant=\"ghost\">\n <span class=\"sr-only\">{{ translate('server.label') }}:</span>\n <span class=\"overflow-x-auto\">\n {{ serverUrlWithoutTrailingSlash || translate('server.select') }}\n </span>\n <ScalarIconCaretDown\n class=\"text-c-2 ui-open:rotate-180 mt-0.25 size-3 transition-transform duration-100\"\n weight=\"bold\" />\n </ScalarButton>\n </ScalarListbox>\n <div\n v-else\n class=\"text-c-1 flex h-auto w-full items-center gap-0.75 !rounded-b-xl px-3 py-1.5 text-base leading-[20px] whitespace-nowrap\">\n <span class=\"sr-only\">{{ translate('server.label') }}:</span>\n <span class=\"overflow-x-auto\">{{ serverUrlWithoutTrailingSlash }}</span>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;EAkBA,MAAM,OAAO;EAKb,MAAM,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"Selector.vue.script.js","names":[],"sources":["../../../../src/blocks/scalar-asyncapi-server-selector-block/components/Selector.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components/button'\nimport { ScalarListbox } from '@scalar/components/listbox'\nimport { ScalarIconCaretDown } from '@scalar/icons'\nimport type { AsyncApiServerEntry } from '@scalar/workspace-store/channel-example'\nimport { computed } from 'vue'\n\nimport { useLocalization } from '@/features/localization'\n\nconst { target, servers, selectedServer } = defineProps<{\n /** The selected server */\n selectedServer: AsyncApiServerEntry | null\n /** Available servers */\n servers: AsyncApiServerEntry[]\n /** The id of the target to use for the popover (e.g. address bar) */\n target: string\n}>()\n\nconst emit = defineEmits<{\n /** Emitted with the server name when the selected server changes */\n (e: 'update:modelValue', value: string): void\n}>()\n\nconst { translate } = useLocalization()\n\n/**\n * AsyncAPI servers are a named map without a single `url`, so we key options by\n * the server name and label them with the constructed connection URL.\n */\nconst serverOptions = computed(() =>\n servers.map((server) => ({\n id: server.name,\n label: server.url,\n })),\n)\n\nconst serverUrlWithoutTrailingSlash = computed(\n () => selectedServer?.url?.replace(/\\/$/, '') || '',\n)\n\nconst selectedServerOption = computed(() =>\n serverOptions.value.find((opt) => opt.id === selectedServer?.name),\n)\n\n// For testing\ndefineExpose({\n servers,\n serverUrlWithoutTrailingSlash,\n serverOptions,\n selectedServer,\n})\n</script>\n<template>\n <ScalarListbox\n v-if=\"serverOptions.length > 1\"\n ref=\"elem\"\n class=\"group\"\n :modelValue=\"selectedServerOption\"\n :options=\"serverOptions\"\n placement=\"bottom-start\"\n resize\n :target=\"target\"\n @update:modelValue=\"(e) => emit('update:modelValue', e.id)\">\n <ScalarButton\n class=\"bg-b-1 text-c-1 h-auto w-full justify-start gap-1.5 overflow-x-auto rounded-t-none !rounded-b-xl px-3 py-1.5 text-base/5.25 font-normal whitespace-nowrap -outline-offset-1\"\n variant=\"ghost\">\n <span class=\"sr-only\">{{ translate('server.label') }}:</span>\n <span class=\"overflow-x-auto\">\n {{ serverUrlWithoutTrailingSlash || translate('server.select') }}\n </span>\n <ScalarIconCaretDown\n class=\"text-c-2 ui-open:rotate-180 mt-0.25 size-3 transition-transform duration-100\"\n weight=\"bold\" />\n </ScalarButton>\n </ScalarListbox>\n <div\n v-else\n class=\"text-c-1 flex h-auto w-full items-center gap-0.75 !rounded-b-xl px-3 py-1.5 text-base leading-[20px] whitespace-nowrap\">\n <span class=\"sr-only\">{{ translate('server.label') }}:</span>\n <span class=\"overflow-x-auto\">{{ serverUrlWithoutTrailingSlash }}</span>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;EAkBA,MAAM,OAAO;EAKb,MAAM,EAAE,cAAc,gBAAgB;;;;;EAMtC,MAAM,gBAAgB,eACpB,QAAA,QAAQ,KAAK,YAAY;GACvB,IAAI,OAAO;GACX,OAAO,OAAO;EAChB,EAAE,CACJ;EAEA,MAAM,gCAAgC,eAC9B,QAAA,gBAAgB,KAAK,QAAQ,OAAO,EAAE,KAAK,EACnD;EAEA,MAAM,uBAAuB,eAC3B,cAAc,MAAM,MAAM,QAAQ,IAAI,OAAO,QAAA,gBAAgB,IAAI,CACnE;EAGA,SAAa;GACX,SAAM,QAAA;GACN;GACA;GACA,gBAAa,QAAA;EACf,CAAC;;UAIS,cAAA,MAAc,SAAM,KAAA,UAAA,GAD5B,YAqBgB,MAAA,aAAA,GAAA;;IAnBd,KAAI;IACJ,OAAM;IACL,YAAY,qBAAA;IACZ,SAAS,cAAA;IACV,WAAU;IACV,QAAA;IACC,QAAQ,QAAA;IACR,uBAAiB,OAAA,OAAA,OAAA,MAAG,MAAM,KAAI,qBAAsB,EAAE,EAAE;;2BAW1C,CAVf,YAUe,MAAA,YAAA,GAAA;KATb,OAAM;KACN,SAAQ;;4BACqD;MAA7D,mBAA6D,QAA7D,YAA6D,gBAApC,MAAA,SAAA,CAAS,CAAA,cAAA,CAAA,IAAmB,KAAC,CAAA;MACtD,mBAEO,QAFP,YAEO,gBADF,8BAAA,SAAiC,MAAA,SAAA,CAAS,CAAA,eAAA,CAAA,GAAA,CAAA;MAE/C,YAEkB,MAAA,mBAAA,GAAA;OADhB,OAAM;OACN,QAAO;;;;;;;;;;uBAGb,mBAKM,OALN,YAKM,CAFJ,mBAA6D,QAA7D,YAA6D,gBAApC,MAAA,SAAA,CAAS,CAAA,cAAA,CAAA,IAAmB,KAAC,CAAA,GACtD,mBAAwE,QAAxE,YAAwE,gBAAvC,8BAAA,KAA6B,GAAA,CAAA,CAAA,CAAA"}
|
|
@@ -14,9 +14,9 @@ import { getAsyncApiProtocols, getAsyncApiServerOptions } from "@scalar/workspac
|
|
|
14
14
|
* section hides when neither picker has a real choice — so passing an OpenAPI
|
|
15
15
|
* document (or `null`) renders nothing.
|
|
16
16
|
*/
|
|
17
|
-
var AsyncApiSidebarFilters_vue_vue_type_script_setup_true_lang_default =
|
|
17
|
+
var AsyncApiSidebarFilters_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
18
18
|
__name: "AsyncApiSidebarFilters",
|
|
19
|
-
props:
|
|
19
|
+
props: /*@__PURE__*/ mergeModels({
|
|
20
20
|
document: {},
|
|
21
21
|
is: { default: "li" }
|
|
22
22
|
}, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AsyncApiSidebarFilters.vue.script.js","names":[],"sources":["../../../../src/blocks/scalar-asyncapi-sidebar-filters-block/components/AsyncApiSidebarFilters.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarSidebarSection } from '@scalar/components/sidebar'\nimport type { AsyncApiDocument } from '@scalar/types/asyncapi/3.1'\nimport {\n getAsyncApiProtocols,\n getAsyncApiServerOptions,\n} from '@scalar/workspace-store/channel-example'\nimport { computed, type Component } from 'vue'\n\nimport SidebarFilter from './SidebarFilter.vue'\n\n/**\n * AsyncApiSidebarFilters\n *\n * The \"Filters\" sidebar section shown for AsyncAPI documents. Bundling the\n * native sidebar title and picker pair here keeps the two sidebar layouts\n * (modern and classic) from each repeating the option-building logic.\n *\n * Each picker hides itself when there is nothing to choose from, and the whole\n * section hides when neither picker has a real choice — so passing an OpenAPI\n * document (or `null`) renders nothing.\n */\nconst { document, is = 'li' } = defineProps<{\n /** The active document, or `null` for OpenAPI documents (renders nothing). */\n document: AsyncApiDocument | null\n /** Render element for the sidebar section wrapper. */\n is?: Component | string\n}>()\n\n/** Selected protocol id; empty string clears the filter. */\nconst protocol = defineModel<string>('protocol', { default: '' })\n\n/** Selected server name; empty string clears the filter. */\nconst server = defineModel<string>('server', { default: '' })\n\n/** Protocol picker options, including the leading \"All protocols\" entry. */\nconst protocolOptions = computed(() =>\n document ? getAsyncApiProtocols(document) : [],\n)\n\n/** Server picker options, including the leading \"All servers\" entry. */\nconst serverOptions = computed(() =>\n document ? getAsyncApiServerOptions(document) : [],\n)\n\n/** Each picker is only worth showing when there is a choice beyond \"All …\". */\nconst showProtocol = computed(() => protocolOptions.value.length > 2)\nconst showServer = computed(() => serverOptions.value.length > 2)\n</script>\n\n<template>\n <ScalarSidebarSection\n :is\n v-if=\"showProtocol || showServer\"\n class=\"asyncapi-sidebar-filters\">\n Filters\n <template #items>\n <SidebarFilter\n v-if=\"showProtocol\"\n v-model=\"protocol\"\n label=\"Protocol\"\n :options=\"protocolOptions\" />\n <SidebarFilter\n v-if=\"showServer\"\n v-model=\"server\"\n label=\"Server\"\n :options=\"serverOptions\" />\n </template>\n </ScalarSidebarSection>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8BA,MAAM,WAAW,SAAmB,SAAC,
|
|
1
|
+
{"version":3,"file":"AsyncApiSidebarFilters.vue.script.js","names":[],"sources":["../../../../src/blocks/scalar-asyncapi-sidebar-filters-block/components/AsyncApiSidebarFilters.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarSidebarSection } from '@scalar/components/sidebar'\nimport type { AsyncApiDocument } from '@scalar/types/asyncapi/3.1'\nimport {\n getAsyncApiProtocols,\n getAsyncApiServerOptions,\n} from '@scalar/workspace-store/channel-example'\nimport { computed, type Component } from 'vue'\n\nimport SidebarFilter from './SidebarFilter.vue'\n\n/**\n * AsyncApiSidebarFilters\n *\n * The \"Filters\" sidebar section shown for AsyncAPI documents. Bundling the\n * native sidebar title and picker pair here keeps the two sidebar layouts\n * (modern and classic) from each repeating the option-building logic.\n *\n * Each picker hides itself when there is nothing to choose from, and the whole\n * section hides when neither picker has a real choice — so passing an OpenAPI\n * document (or `null`) renders nothing.\n */\nconst { document, is = 'li' } = defineProps<{\n /** The active document, or `null` for OpenAPI documents (renders nothing). */\n document: AsyncApiDocument | null\n /** Render element for the sidebar section wrapper. */\n is?: Component | string\n}>()\n\n/** Selected protocol id; empty string clears the filter. */\nconst protocol = defineModel<string>('protocol', { default: '' })\n\n/** Selected server name; empty string clears the filter. */\nconst server = defineModel<string>('server', { default: '' })\n\n/** Protocol picker options, including the leading \"All protocols\" entry. */\nconst protocolOptions = computed(() =>\n document ? getAsyncApiProtocols(document) : [],\n)\n\n/** Server picker options, including the leading \"All servers\" entry. */\nconst serverOptions = computed(() =>\n document ? getAsyncApiServerOptions(document) : [],\n)\n\n/** Each picker is only worth showing when there is a choice beyond \"All …\". */\nconst showProtocol = computed(() => protocolOptions.value.length > 2)\nconst showServer = computed(() => serverOptions.value.length > 2)\n</script>\n\n<template>\n <ScalarSidebarSection\n :is\n v-if=\"showProtocol || showServer\"\n class=\"asyncapi-sidebar-filters\">\n Filters\n <template #items>\n <SidebarFilter\n v-if=\"showProtocol\"\n v-model=\"protocol\"\n label=\"Protocol\"\n :options=\"protocolOptions\" />\n <SidebarFilter\n v-if=\"showServer\"\n v-model=\"server\"\n label=\"Server\"\n :options=\"serverOptions\" />\n </template>\n </ScalarSidebarSection>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8BA,MAAM,WAAW,SAAmB,SAAC,UAA2B;;EAGhE,MAAM,SAAS,SAAmB,SAAC,QAAyB;;EAG5D,MAAM,kBAAkB,eACtB,QAAA,WAAW,qBAAqB,QAAA,QAAQ,IAAI,CAAC,CAC/C;;EAGA,MAAM,gBAAgB,eACpB,QAAA,WAAW,yBAAyB,QAAA,QAAQ,IAAI,CAAC,CACnD;;EAGA,MAAM,eAAe,eAAe,gBAAgB,MAAM,SAAS,CAAC;EACpE,MAAM,aAAa,eAAe,cAAc,MAAM,SAAS,CAAC;;UAMtD,aAAA,SAAgB,WAAA,SAAA,UAAA,GAFxB,YAiBuB,MAAA,oBAAA,GAAA;;IAhBpB,IAAA,QAAA;IAED,OAAM;;IAEK,OAAK,cAKiB,CAHvB,aAAA,SAAA,UAAA,GADR,YAI+B,uBAAA;;iBAFpB,SAAA;2EAAQ,QAAA;KACjB,OAAM;KACL,SAAS,gBAAA;4EAEJ,WAAA,SAAA,UAAA,GADR,YAI6B,uBAAA;;iBAFlB,OAAA;yEAAM,QAAA;KACf,OAAM;KACL,SAAS,cAAA;;2BAVd,CAAA,OAAA,OAAA,OAAA,KAAA,gBAFiC,aAEjC,EAAA,EAAA,CAAA"}
|
package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/SidebarFilter.vue.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidebarFilter.vue.d.ts","sourceRoot":"","sources":["../../../../src/blocks/scalar-asyncapi-sidebar-filters-block/components/SidebarFilter.vue"],"names":[],"mappings":"AAmEA;;;;;;;;GAQG;AACH,KAAK,WAAW,GAAG;IACjB,qEAAqE;IACrE,KAAK,EAAE,MAAM,CAAA;IACb,6EAA6E;IAC7E,OAAO,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;IACxC,wCAAwC;IACxC,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,CAAC;
|
|
1
|
+
{"version":3,"file":"SidebarFilter.vue.d.ts","sourceRoot":"","sources":["../../../../src/blocks/scalar-asyncapi-sidebar-filters-block/components/SidebarFilter.vue"],"names":[],"mappings":"AAmEA;;;;;;;;GAQG;AACH,KAAK,WAAW,GAAG;IACjB,qEAAqE;IACrE,KAAK,EAAE,MAAM,CAAA;IACb,6EAA6E;IAC7E,OAAO,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;IACxC,wCAAwC;IACxC,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,CAAC;AA2HF,QAAA,MAAM,YAAY;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/SidebarFilter.vue.script.js
CHANGED
|
@@ -14,7 +14,7 @@ var _hoisted_2 = { class: "text-c-1 truncate" };
|
|
|
14
14
|
* `options` is expected to lead with an "All …" entry, which is also used as the
|
|
15
15
|
* fallback selection — so the first option doubles as the cleared state.
|
|
16
16
|
*/
|
|
17
|
-
var SidebarFilter_vue_vue_type_script_setup_true_lang_default =
|
|
17
|
+
var SidebarFilter_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
18
18
|
__name: "SidebarFilter",
|
|
19
19
|
props: {
|
|
20
20
|
label: {},
|
package/dist/blocks/scalar-asyncapi-sidebar-filters-block/components/SidebarFilter.vue.script.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidebarFilter.vue.script.js","names":[],"sources":["../../../../src/blocks/scalar-asyncapi-sidebar-filters-block/components/SidebarFilter.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarListbox } from '@scalar/components/listbox'\nimport { ScalarSidebarButton } from '@scalar/components/sidebar'\nimport { ScalarIconCaretUpDown } from '@scalar/icons'\nimport { computed } from 'vue'\n\n/**\n * SidebarFilter\n *\n * A compact picker inside the AsyncAPI sidebar filters section. Reused for the\n * stacked protocol and server filters.\n *\n * `options` is expected to lead with an \"All …\" entry, which is also used as the\n * fallback selection — so the first option doubles as the cleared state.\n */\nconst props = defineProps<{\n /** Row label shown to the left of the dropdown (e.g. \"Protocol\"). */\n label: string\n /** Filter options, leading with the \"All …\" entry that clears the filter. */\n options: { id: string; label: string }[]\n /** The currently selected option id. */\n modelValue?: string\n}>()\n\nconst emit = defineEmits<{\n (e: 'update:modelValue', id: string): void\n}>()\n\n/** Falls back to the first (\"All …\") option when nothing matches. */\nconst selected = computed(\n () =>\n props.options.find((o) => o.id === props.modelValue) ?? props.options[0],\n)\n</script>\n\n<template>\n <li class=\"asyncapi-sidebar-filter min-w-0\">\n <ScalarListbox\n :label=\"label\"\n :modelValue=\"selected\"\n :options=\"options\"\n resize\n teleport\n @update:modelValue=\"(e) => emit('update:modelValue', e.id)\">\n <ScalarSidebarButton\n is=\"button\"\n class=\"w-full items-center text-left\">\n <span class=\"text-c-1 truncate\">\n {{ selected?.label }}\n </span>\n <template #aside>\n <ScalarIconCaretUpDown\n class=\"text-c-1 ml-1 size-3 shrink-0 self-center\"\n weight=\"bold\" />\n </template>\n </ScalarSidebarButton>\n </ScalarListbox>\n </li>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;EAeA,MAAM,QAAQ;EASd,MAAM,OAAO;;EAKb,MAAM,WAAW,eAEb,MAAM,QAAQ,MAAM,MAAM,EAAE,OAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"SidebarFilter.vue.script.js","names":[],"sources":["../../../../src/blocks/scalar-asyncapi-sidebar-filters-block/components/SidebarFilter.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarListbox } from '@scalar/components/listbox'\nimport { ScalarSidebarButton } from '@scalar/components/sidebar'\nimport { ScalarIconCaretUpDown } from '@scalar/icons'\nimport { computed } from 'vue'\n\n/**\n * SidebarFilter\n *\n * A compact picker inside the AsyncAPI sidebar filters section. Reused for the\n * stacked protocol and server filters.\n *\n * `options` is expected to lead with an \"All …\" entry, which is also used as the\n * fallback selection — so the first option doubles as the cleared state.\n */\nconst props = defineProps<{\n /** Row label shown to the left of the dropdown (e.g. \"Protocol\"). */\n label: string\n /** Filter options, leading with the \"All …\" entry that clears the filter. */\n options: { id: string; label: string }[]\n /** The currently selected option id. */\n modelValue?: string\n}>()\n\nconst emit = defineEmits<{\n (e: 'update:modelValue', id: string): void\n}>()\n\n/** Falls back to the first (\"All …\") option when nothing matches. */\nconst selected = computed(\n () =>\n props.options.find((o) => o.id === props.modelValue) ?? props.options[0],\n)\n</script>\n\n<template>\n <li class=\"asyncapi-sidebar-filter min-w-0\">\n <ScalarListbox\n :label=\"label\"\n :modelValue=\"selected\"\n :options=\"options\"\n resize\n teleport\n @update:modelValue=\"(e) => emit('update:modelValue', e.id)\">\n <ScalarSidebarButton\n is=\"button\"\n class=\"w-full items-center text-left\">\n <span class=\"text-c-1 truncate\">\n {{ selected?.label }}\n </span>\n <template #aside>\n <ScalarIconCaretUpDown\n class=\"text-c-1 ml-1 size-3 shrink-0 self-center\"\n weight=\"bold\" />\n </template>\n </ScalarSidebarButton>\n </ScalarListbox>\n </li>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;EAeA,MAAM,QAAQ;EASd,MAAM,OAAO;;EAKb,MAAM,WAAW,eAEb,MAAM,QAAQ,MAAM,MAAM,EAAE,OAAO,MAAM,UAAU,KAAK,MAAM,QAAQ,EAC1E;;uBAIE,mBAqBK,MArBL,YAqBK,CApBH,YAmBgB,MAAA,aAAA,GAAA;IAlBb,OAAO,QAAA;IACP,YAAY,SAAA;IACZ,SAAS,QAAA;IACV,QAAA;IACA,UAAA;IACC,uBAAiB,OAAA,OAAA,OAAA,MAAG,MAAM,KAAI,qBAAsB,EAAE,EAAE;;2BAYnC,CAXtB,YAWsB,MAAA,mBAAA,GAAA;KAVpB,IAAG;KACH,OAAM;;KAIK,OAAK,cAGI,CAFlB,YAEkB,MAAA,qBAAA,GAAA;MADhB,OAAM;MACN,QAAO;;4BAJJ,CAFP,mBAEO,QAFP,YAEO,gBADF,SAAA,OAAU,KAAK,GAAA,CAAA,CAAA,CAAA"}
|
package/dist/blocks/scalar-asyncapi-sidebar-filters-block/helpers/filter-async-api-navigation.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter-async-api-navigation.js","names":[],"sources":["../../../../src/blocks/scalar-asyncapi-sidebar-filters-block/helpers/filter-async-api-navigation.ts"],"sourcesContent":["import type { AsyncApiDocument } from '@scalar/types/asyncapi/3.1'\nimport {\n ALL,\n type AsyncApiReachabilityContext,\n createReachabilityContext,\n getOperationReachability,\n} from '@scalar/workspace-store/channel-example'\nimport { getResolvedRef, mergeSiblingReferences } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type { TraversedEntry } from '@scalar/workspace-store/schemas/navigation'\n\n/** The currently selected sidebar filters. Empty / sentinel values disable a filter. */\ntype AsyncApiNavigationFilter = {\n /** Selected protocol id, or {@link ALL} / undefined for no protocol filter. */\n protocol?: string\n /** Selected server name, or {@link ALL} / undefined for no server filter. */\n server?: string\n}\n\n/** Whether the filter would keep every entry, so the tree can be returned untouched. */\nconst isNoopFilter = ({ protocol, server }: AsyncApiNavigationFilter): boolean =>\n (!protocol || protocol === ALL) && (!server || server === ALL)\n\n/** Whether a selection (protocol or server) keeps an operation, given the set it is reachable through. */\nconst selectionMatches = (reachable: Set<string>, selected: string | undefined): boolean =>\n !selected || selected === ALL || reachable.has(selected)\n\n/**\n * Filters one navigation entry against the selected protocol/server.\n *\n * - `asyncapi-operation` — kept only when the operation matches both filters.\n * - `asyncapi-channel` / `tag` — recursed into, then dropped when they have no\n * children left (so empty channels and tags disappear from the sidebar).\n * - Everything else (description, models, schemas) passes through unchanged.\n *\n * `context` carries the document-level lookups so they are built once per filter\n * pass rather than recomputed for every operation.\n *\n * Returns `null` when the entry should be removed.\n */\nconst filterEntry = (\n entry: TraversedEntry,\n document: AsyncApiDocument,\n filter: AsyncApiNavigationFilter,\n context: AsyncApiReachabilityContext,\n): TraversedEntry | null => {\n if (entry.type === 'asyncapi-operation') {\n const operationNode = document.operations?.[entry.operationName]\n // If the operation can't be resolved we keep it rather than hide it by accident.\n if (!operationNode) {\n return entry\n }\n\n // Resolve the same way the navigation traversal did, so sibling overrides\n // (e.g. an inline `channel` alongside a `$ref`) are honored consistently.\n const operation = getResolvedRef(operationNode, mergeSiblingReferences)\n\n // Resolve the operation's reachability once, then test both selections against it.\n const { protocols, serverNames } = getOperationReachability(document, operation, context)\n const keep = selectionMatches(protocols, filter.protocol) && selectionMatches(serverNames, filter.server)\n\n return keep ? entry : null\n }\n\n if (entry.type === 'asyncapi-channel' || entry.type === 'tag') {\n const originalChildren = entry.children ?? []\n const children = originalChildren.flatMap((child) => {\n const filtered = filterEntry(child, document, filter, context)\n return filtered ? [filtered] : []\n })\n\n // Drop a container that had children but lost them all to the filter.\n if (originalChildren.length > 0 && children.length === 0) {\n return null\n }\n\n return { ...entry, children }\n }\n\n return entry\n}\n\n/**\n * Filters the AsyncAPI sidebar tree by the selected protocol and/or server.\n *\n * Returns the original entries untouched when no filter is active, so OpenAPI\n * documents and the unfiltered AsyncAPI case pay no cost.\n */\nexport const filterAsyncApiNavigation = (\n entries: TraversedEntry[],\n document: AsyncApiDocument,\n filter: AsyncApiNavigationFilter,\n): TraversedEntry[] => {\n if (isNoopFilter(filter)) {\n return entries\n }\n\n // Build the document-level reachability lookups once for the whole pass.\n const context = createReachabilityContext(document)\n\n return entries.flatMap((entry) => {\n const filtered = filterEntry(entry, document, filter, context)\n return filtered ? [filtered] : []\n })\n}\n"],"mappings":";;;;AAmBA,IAAM,gBAAgB,EAAE,UAAU,cAC/B,CAAC,YAAY,aAAa,SAAS,CAAC,UAAU,WAAW;;AAG5D,IAAM,oBAAoB,WAAwB,aAChD,CAAC,YAAY,aAAa,OAAO,UAAU,IAAI,
|
|
1
|
+
{"version":3,"file":"filter-async-api-navigation.js","names":[],"sources":["../../../../src/blocks/scalar-asyncapi-sidebar-filters-block/helpers/filter-async-api-navigation.ts"],"sourcesContent":["import type { AsyncApiDocument } from '@scalar/types/asyncapi/3.1'\nimport {\n ALL,\n type AsyncApiReachabilityContext,\n createReachabilityContext,\n getOperationReachability,\n} from '@scalar/workspace-store/channel-example'\nimport { getResolvedRef, mergeSiblingReferences } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type { TraversedEntry } from '@scalar/workspace-store/schemas/navigation'\n\n/** The currently selected sidebar filters. Empty / sentinel values disable a filter. */\ntype AsyncApiNavigationFilter = {\n /** Selected protocol id, or {@link ALL} / undefined for no protocol filter. */\n protocol?: string\n /** Selected server name, or {@link ALL} / undefined for no server filter. */\n server?: string\n}\n\n/** Whether the filter would keep every entry, so the tree can be returned untouched. */\nconst isNoopFilter = ({ protocol, server }: AsyncApiNavigationFilter): boolean =>\n (!protocol || protocol === ALL) && (!server || server === ALL)\n\n/** Whether a selection (protocol or server) keeps an operation, given the set it is reachable through. */\nconst selectionMatches = (reachable: Set<string>, selected: string | undefined): boolean =>\n !selected || selected === ALL || reachable.has(selected)\n\n/**\n * Filters one navigation entry against the selected protocol/server.\n *\n * - `asyncapi-operation` — kept only when the operation matches both filters.\n * - `asyncapi-channel` / `tag` — recursed into, then dropped when they have no\n * children left (so empty channels and tags disappear from the sidebar).\n * - Everything else (description, models, schemas) passes through unchanged.\n *\n * `context` carries the document-level lookups so they are built once per filter\n * pass rather than recomputed for every operation.\n *\n * Returns `null` when the entry should be removed.\n */\nconst filterEntry = (\n entry: TraversedEntry,\n document: AsyncApiDocument,\n filter: AsyncApiNavigationFilter,\n context: AsyncApiReachabilityContext,\n): TraversedEntry | null => {\n if (entry.type === 'asyncapi-operation') {\n const operationNode = document.operations?.[entry.operationName]\n // If the operation can't be resolved we keep it rather than hide it by accident.\n if (!operationNode) {\n return entry\n }\n\n // Resolve the same way the navigation traversal did, so sibling overrides\n // (e.g. an inline `channel` alongside a `$ref`) are honored consistently.\n const operation = getResolvedRef(operationNode, mergeSiblingReferences)\n\n // Resolve the operation's reachability once, then test both selections against it.\n const { protocols, serverNames } = getOperationReachability(document, operation, context)\n const keep = selectionMatches(protocols, filter.protocol) && selectionMatches(serverNames, filter.server)\n\n return keep ? entry : null\n }\n\n if (entry.type === 'asyncapi-channel' || entry.type === 'tag') {\n const originalChildren = entry.children ?? []\n const children = originalChildren.flatMap((child) => {\n const filtered = filterEntry(child, document, filter, context)\n return filtered ? [filtered] : []\n })\n\n // Drop a container that had children but lost them all to the filter.\n if (originalChildren.length > 0 && children.length === 0) {\n return null\n }\n\n return { ...entry, children }\n }\n\n return entry\n}\n\n/**\n * Filters the AsyncAPI sidebar tree by the selected protocol and/or server.\n *\n * Returns the original entries untouched when no filter is active, so OpenAPI\n * documents and the unfiltered AsyncAPI case pay no cost.\n */\nexport const filterAsyncApiNavigation = (\n entries: TraversedEntry[],\n document: AsyncApiDocument,\n filter: AsyncApiNavigationFilter,\n): TraversedEntry[] => {\n if (isNoopFilter(filter)) {\n return entries\n }\n\n // Build the document-level reachability lookups once for the whole pass.\n const context = createReachabilityContext(document)\n\n return entries.flatMap((entry) => {\n const filtered = filterEntry(entry, document, filter, context)\n return filtered ? [filtered] : []\n })\n}\n"],"mappings":";;;;AAmBA,IAAM,gBAAgB,EAAE,UAAU,cAC/B,CAAC,YAAY,aAAa,SAAS,CAAC,UAAU,WAAW;;AAG5D,IAAM,oBAAoB,WAAwB,aAChD,CAAC,YAAY,aAAa,OAAO,UAAU,IAAI,QAAQ;;;;;;;;;;;;;;AAezD,IAAM,eACJ,OACA,UACA,QACA,YAC0B;CAC1B,IAAI,MAAM,SAAS,sBAAsB;EACvC,MAAM,gBAAgB,SAAS,aAAa,MAAM;EAElD,IAAI,CAAC,eACH,OAAO;EAQT,MAAM,EAAE,WAAW,gBAAgB,yBAAyB,UAH1C,eAAe,eAAe,sBAGsB,GAAW,OAAO;EAGxF,OAFa,iBAAiB,WAAW,OAAO,QAAQ,KAAK,iBAAiB,aAAa,OAAO,MAAM,IAE1F,QAAQ;CACxB;CAEA,IAAI,MAAM,SAAS,sBAAsB,MAAM,SAAS,OAAO;EAC7D,MAAM,mBAAmB,MAAM,YAAY,CAAC;EAC5C,MAAM,WAAW,iBAAiB,SAAS,UAAU;GACnD,MAAM,WAAW,YAAY,OAAO,UAAU,QAAQ,OAAO;GAC7D,OAAO,WAAW,CAAC,QAAQ,IAAI,CAAC;EAClC,CAAC;EAGD,IAAI,iBAAiB,SAAS,KAAK,SAAS,WAAW,GACrD,OAAO;EAGT,OAAO;GAAE,GAAG;GAAO;EAAS;CAC9B;CAEA,OAAO;AACT;;;;;;;AAQA,IAAa,4BACX,SACA,UACA,WACqB;CACrB,IAAI,aAAa,MAAM,GACrB,OAAO;CAIT,MAAM,UAAU,0BAA0B,QAAQ;CAElD,OAAO,QAAQ,SAAS,UAAU;EAChC,MAAM,WAAW,YAAY,OAAO,UAAU,QAAQ,OAAO;EAC7D,OAAO,WAAW,CAAC,QAAQ,IAAI,CAAC;CAClC,CAAC;AACH"}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ClientOptionGroup } from '@scalar/blocks/code-example';
|
|
2
2
|
import { type WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
3
3
|
type __VLS_Props = {
|
|
4
4
|
/** Client options */
|
|
5
5
|
clientOptions: ClientOptionGroup[];
|
|
6
6
|
/** The currently selected Http Client (a built-in client id or a custom sample id) */
|
|
7
7
|
selectedClient?: string;
|
|
8
|
-
/** List of featured clients */
|
|
9
|
-
featuredClients: ClientOption[];
|
|
10
8
|
/** Event bus */
|
|
11
9
|
eventBus: WorkspaceEventBus;
|
|
12
10
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClientDropdown.vue.d.ts","sourceRoot":"","sources":["../../../../src/blocks/scalar-client-selector-block/components/ClientDropdown.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ClientDropdown.vue.d.ts","sourceRoot":"","sources":["../../../../src/blocks/scalar-client-selector-block/components/ClientDropdown.vue"],"names":[],"mappings":"AAqNA,OAAO,EAIL,KAAK,iBAAiB,EAEvB,MAAM,6BAA6B,CAAA;AAKpC,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAMvE,KAAK,WAAW,GAAG;IACjB,qBAAqB;IACrB,aAAa,EAAE,iBAAiB,EAAE,CAAA;IAClC,sFAAsF;IACtF,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,gBAAgB;IAChB,QAAQ,EAAE,iBAAiB,CAAA;CAC5B,CAAC;AAiMF,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 ClientDropdown_vue_vue_type_script_setup_true_lang_default from "./ClientDropdown.vue.script.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
//#region src/blocks/scalar-client-selector-block/components/ClientDropdown.vue
|
|
5
|
-
var ClientDropdown_default =
|
|
5
|
+
var ClientDropdown_default = /*#__PURE__*/ _plugin_vue_export_helper_default(ClientDropdown_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-da3e3bd2"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { ClientDropdown_default as default };
|
|
8
8
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClientDropdown.vue.js","names":[],"sources":["../../../../src/blocks/scalar-client-selector-block/components/ClientDropdown.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {
|
|
1
|
+
{"version":3,"file":"ClientDropdown.vue.js","names":[],"sources":["../../../../src/blocks/scalar-client-selector-block/components/ClientDropdown.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n filterClientsByQuery,\n findClient,\n type ClientOption,\n type ClientOptionGroup,\n type CustomClientOption,\n} from '@scalar/blocks/code-example'\nimport { ScalarCombobox } from '@scalar/components/combobox'\nimport { ScalarIcon } from '@scalar/components/icon'\nimport { freezeElement } from '@scalar/helpers/dom/freeze-element'\nimport type { TargetId } from '@scalar/types/snippetz'\nimport { type WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { computed, ref } from 'vue'\n\nimport { isFeaturedClient } from '@/blocks/scalar-client-selector-block/helpers/featured-clients'\nimport { useLocalization } from '@/features/localization'\n\nconst { clientOptions, eventBus, selectedClient } = defineProps<{\n /** Client options */\n clientOptions: ClientOptionGroup[]\n /** The currently selected Http Client (a built-in client id or a custom sample id) */\n selectedClient?: string\n /** Event bus */\n eventBus: WorkspaceEventBus\n}>()\n\nconst containerRef = ref<HTMLElement>()\nconst { translate } = useLocalization()\n\n/**\n * Icons have longer names to appear in icon searches, e.g. \"javascript-js\" instead of just \"javascript\". This function\n * maps the language key to the icon name.\n */\nconst getIconByLanguageKey = (targetKey: TargetId) =>\n `programming-language-${targetKey === 'js' ? 'javascript' : targetKey}` as const\n\n/** Set custom example, or update the selected HTTP client globally */\nconst selectClient = (option: ClientOption | CustomClientOption) => {\n if (!containerRef.value) {\n return\n }\n\n // We need to freeze the ui to prevent scrolling as the clients change\n const unfreeze = freezeElement(containerRef.value)\n setTimeout(() => {\n unfreeze()\n }, 300)\n\n // Update the store\n if (option.clientKey !== 'custom') {\n eventBus.emit('workspace:update:selected-client', option.id)\n }\n}\n\n/** Calculates the targetKey from the selected client id */\nconst selectedTargetKey = computed(\n () => selectedClient?.split('/')[0] as TargetId | undefined,\n)\n</script>\n<template>\n <!--\n Lives beside the TabList (not inside it). A combobox button is not a tab,\n so placing it in role=\"tablist\" fails aria-required-children.\n -->\n <div\n ref=\"containerRef\"\n class=\"client-libraries-more\">\n <ScalarCombobox\n :filterFn=\"filterClientsByQuery\"\n :modelValue=\"findClient(clientOptions, selectedClient)\"\n :options=\"clientOptions\"\n placement=\"bottom-end\"\n teleport\n @update:modelValue=\"selectClient($event as ClientOption)\">\n <button\n class=\"client-libraries client-libraries__select\"\n :class=\"{\n 'client-libraries__active':\n selectedClient && !isFeaturedClient(selectedClient),\n }\"\n type=\"button\">\n <div\n aria-hidden=\"true\"\n class=\"client-libraries-icon__more\">\n <template v-if=\"selectedClient && !isFeaturedClient(selectedClient)\">\n <div :class=\"`client-libraries-icon__${selectedTargetKey}`\">\n <ScalarIcon\n v-if=\"selectedTargetKey\"\n class=\"client-libraries-icon\"\n :icon=\"getIconByLanguageKey(selectedTargetKey)\" />\n </div>\n </template>\n <template v-else>\n <svg\n class=\"client-libraries-icon\"\n height=\"50\"\n role=\"presentation\"\n viewBox=\"0 0 50 50\"\n width=\"50\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <g\n fill=\"currentColor\"\n fill-rule=\"nonzero\">\n <path\n d=\"M10.71 25.3a3.87 3.87 0 1 0 7.74 0 3.87 3.87 0 0 0-7.74 0M21.13 25.3a3.87 3.87 0 1 0 7.74 0 3.87 3.87 0 0 0-7.74 0M31.55 25.3a3.87 3.87 0 1 0 7.74 0 3.87 3.87 0 0 0-7.74 0\" />\n </g>\n </svg>\n </template>\n </div>\n <span\n v-if=\"clientOptions.length\"\n class=\"client-libraries-text client-libraries-text-more\">\n {{ translate('clientLibraries.more') }}\n </span>\n <span class=\"sr-only\">\n {{ translate('clientLibraries.selectAll') }}\n </span>\n </button>\n </ScalarCombobox>\n </div>\n</template>\n<style scoped>\n/* One even column, the same width as each tab beside it */\n.client-libraries-more {\n display: flex;\n flex: 1 1 0;\n min-width: 0;\n}\n.client-libraries {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n position: relative;\n cursor: pointer;\n white-space: nowrap;\n padding: 8px 2px;\n gap: 6px;\n color: var(--scalar-color-3);\n border-bottom: 1px solid transparent;\n user-select: none;\n}\n\n.client-libraries:not(.client-libraries__active):hover:before {\n content: '';\n position: absolute;\n width: calc(100% - 4px);\n height: calc(100% - 4px);\n background: var(--scalar-background-2);\n left: 2px;\n top: 2px;\n z-index: 0;\n border-radius: var(--scalar-radius);\n}\n.client-libraries:active {\n color: var(--scalar-color-1);\n}\n.client-libraries:focus-visible {\n outline: none;\n box-shadow: inset 0 0 0 1px var(--scalar-color-accent);\n}\n.client-libraries-icon {\n max-width: 14px;\n max-height: 14px;\n min-width: 14px;\n width: 100%;\n aspect-ratio: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n box-sizing: border-box;\n color: currentColor;\n}\n.client-libraries-icon__more svg {\n height: initial;\n}\n.client-libraries__active {\n color: var(--scalar-color-1);\n border-bottom: 1px solid var(--scalar-color-1);\n}\n.client-libraries .client-libraries-text {\n font-size: var(--scalar-small);\n position: relative;\n display: flex;\n align-items: center;\n}\n.client-libraries__active .client-libraries-text {\n color: var(--scalar-color-1);\n font-weight: var(--scalar-semibold);\n}\n@media screen and (max-width: 600px) {\n .references-classic .client-libraries {\n flex-direction: column;\n }\n}\n@container client-libraries-list (width < 400px) {\n .client-libraries-more {\n flex: 0 0 auto;\n }\n .client-libraries__select {\n width: fit-content;\n\n .client-libraries-icon__more + span {\n display: none;\n }\n }\n}\n</style>\n"],"mappings":""}
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
import { useLocalization } from "../../../features/localization/use-localization.js";
|
|
2
2
|
import { isFeaturedClient } from "../helpers/featured-clients.js";
|
|
3
|
-
import {
|
|
4
|
-
import { Tab } from "@headlessui/vue";
|
|
3
|
+
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, normalizeClass, openBlock, ref, toDisplayString, unref, withCtx } from "vue";
|
|
5
4
|
import { filterClientsByQuery, findClient } from "@scalar/blocks/code-example";
|
|
6
|
-
import { ScalarCombobox } from "@scalar/components/combobox";
|
|
7
5
|
import { ScalarIcon } from "@scalar/components/icon";
|
|
6
|
+
import { ScalarCombobox } from "@scalar/components/combobox";
|
|
8
7
|
import { freezeElement } from "@scalar/helpers/dom/freeze-element";
|
|
9
8
|
//#region src/blocks/scalar-client-selector-block/components/ClientDropdown.vue?vue&type=script&setup=true&lang.ts
|
|
10
|
-
var _hoisted_1 = {
|
|
11
|
-
var _hoisted_2 = {
|
|
9
|
+
var _hoisted_1 = {
|
|
12
10
|
"aria-hidden": "true",
|
|
13
11
|
class: "client-libraries-icon__more"
|
|
14
12
|
};
|
|
15
|
-
var
|
|
13
|
+
var _hoisted_2 = {
|
|
16
14
|
key: 1,
|
|
17
15
|
class: "client-libraries-icon",
|
|
18
16
|
height: "50",
|
|
@@ -21,17 +19,16 @@ var _hoisted_3 = {
|
|
|
21
19
|
width: "50",
|
|
22
20
|
xmlns: "http://www.w3.org/2000/svg"
|
|
23
21
|
};
|
|
24
|
-
var
|
|
22
|
+
var _hoisted_3 = {
|
|
25
23
|
key: 0,
|
|
26
24
|
class: "client-libraries-text client-libraries-text-more"
|
|
27
25
|
};
|
|
28
|
-
var
|
|
29
|
-
var ClientDropdown_vue_vue_type_script_setup_true_lang_default =
|
|
26
|
+
var _hoisted_4 = { class: "sr-only" };
|
|
27
|
+
var ClientDropdown_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
30
28
|
__name: "ClientDropdown",
|
|
31
29
|
props: {
|
|
32
30
|
clientOptions: {},
|
|
33
31
|
selectedClient: {},
|
|
34
|
-
featuredClients: {},
|
|
35
32
|
eventBus: {}
|
|
36
33
|
},
|
|
37
34
|
setup(__props) {
|
|
@@ -57,19 +54,8 @@ var ClientDropdown_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
|
|
|
57
54
|
return openBlock(), createElementBlock("div", {
|
|
58
55
|
ref_key: "containerRef",
|
|
59
56
|
ref: containerRef,
|
|
60
|
-
class: "client-libraries-
|
|
61
|
-
}, [(
|
|
62
|
-
return openBlock(), createBlock(unref(Tab), {
|
|
63
|
-
key: featuredClient.clientKey,
|
|
64
|
-
class: normalizeClass(["client-libraries rendered-code-sdks", { "client-libraries__active": featuredClient.id === __props.selectedClient }])
|
|
65
|
-
}, {
|
|
66
|
-
default: withCtx(() => [createElementVNode("div", { class: normalizeClass(`client-libraries-icon__${featuredClient.targetKey}`) }, [createVNode(unref(ScalarIcon), {
|
|
67
|
-
class: "client-libraries-icon",
|
|
68
|
-
icon: getIconByLanguageKey(featuredClient.targetKey)
|
|
69
|
-
}, null, 8, ["icon"])], 2), createElementVNode("span", _hoisted_1, toDisplayString(featuredClient.targetTitle), 1)]),
|
|
70
|
-
_: 2
|
|
71
|
-
}, 1032, ["class"]);
|
|
72
|
-
}), 128)), createVNode(unref(ScalarCombobox), {
|
|
57
|
+
class: "client-libraries-more"
|
|
58
|
+
}, [createVNode(unref(ScalarCombobox), {
|
|
73
59
|
filterFn: unref(filterClientsByQuery),
|
|
74
60
|
modelValue: unref(findClient)(__props.clientOptions, __props.selectedClient),
|
|
75
61
|
options: __props.clientOptions,
|
|
@@ -81,19 +67,19 @@ var ClientDropdown_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
|
|
|
81
67
|
class: normalizeClass(["client-libraries client-libraries__select", { "client-libraries__active": __props.selectedClient && !unref(isFeaturedClient)(__props.selectedClient) }]),
|
|
82
68
|
type: "button"
|
|
83
69
|
}, [
|
|
84
|
-
createElementVNode("div",
|
|
70
|
+
createElementVNode("div", _hoisted_1, [__props.selectedClient && !unref(isFeaturedClient)(__props.selectedClient) ? (openBlock(), createElementBlock("div", {
|
|
85
71
|
key: 0,
|
|
86
72
|
class: normalizeClass(`client-libraries-icon__${selectedTargetKey.value}`)
|
|
87
73
|
}, [selectedTargetKey.value ? (openBlock(), createBlock(unref(ScalarIcon), {
|
|
88
74
|
key: 0,
|
|
89
75
|
class: "client-libraries-icon",
|
|
90
76
|
icon: getIconByLanguageKey(selectedTargetKey.value)
|
|
91
|
-
}, null, 8, ["icon"])) : createCommentVNode("", true)], 2)) : (openBlock(), createElementBlock("svg",
|
|
77
|
+
}, null, 8, ["icon"])) : createCommentVNode("", true)], 2)) : (openBlock(), createElementBlock("svg", _hoisted_2, [..._cache[1] || (_cache[1] = [createElementVNode("g", {
|
|
92
78
|
fill: "currentColor",
|
|
93
79
|
"fill-rule": "nonzero"
|
|
94
80
|
}, [createElementVNode("path", { d: "M10.71 25.3a3.87 3.87 0 1 0 7.74 0 3.87 3.87 0 0 0-7.74 0M21.13 25.3a3.87 3.87 0 1 0 7.74 0 3.87 3.87 0 0 0-7.74 0M31.55 25.3a3.87 3.87 0 1 0 7.74 0 3.87 3.87 0 0 0-7.74 0" })], -1)])]))]),
|
|
95
|
-
__props.clientOptions.length ? (openBlock(), createElementBlock("span",
|
|
96
|
-
createElementVNode("span",
|
|
81
|
+
__props.clientOptions.length ? (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(unref(translate)("clientLibraries.more")), 1)) : createCommentVNode("", true),
|
|
82
|
+
createElementVNode("span", _hoisted_4, toDisplayString(unref(translate)("clientLibraries.selectAll")), 1)
|
|
97
83
|
], 2)]),
|
|
98
84
|
_: 1
|
|
99
85
|
}, 8, [
|
package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.script.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClientDropdown.vue.script.js","names":[],"sources":["../../../../src/blocks/scalar-client-selector-block/components/ClientDropdown.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {
|
|
1
|
+
{"version":3,"file":"ClientDropdown.vue.script.js","names":[],"sources":["../../../../src/blocks/scalar-client-selector-block/components/ClientDropdown.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n filterClientsByQuery,\n findClient,\n type ClientOption,\n type ClientOptionGroup,\n type CustomClientOption,\n} from '@scalar/blocks/code-example'\nimport { ScalarCombobox } from '@scalar/components/combobox'\nimport { ScalarIcon } from '@scalar/components/icon'\nimport { freezeElement } from '@scalar/helpers/dom/freeze-element'\nimport type { TargetId } from '@scalar/types/snippetz'\nimport { type WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { computed, ref } from 'vue'\n\nimport { isFeaturedClient } from '@/blocks/scalar-client-selector-block/helpers/featured-clients'\nimport { useLocalization } from '@/features/localization'\n\nconst { clientOptions, eventBus, selectedClient } = defineProps<{\n /** Client options */\n clientOptions: ClientOptionGroup[]\n /** The currently selected Http Client (a built-in client id or a custom sample id) */\n selectedClient?: string\n /** Event bus */\n eventBus: WorkspaceEventBus\n}>()\n\nconst containerRef = ref<HTMLElement>()\nconst { translate } = useLocalization()\n\n/**\n * Icons have longer names to appear in icon searches, e.g. \"javascript-js\" instead of just \"javascript\". This function\n * maps the language key to the icon name.\n */\nconst getIconByLanguageKey = (targetKey: TargetId) =>\n `programming-language-${targetKey === 'js' ? 'javascript' : targetKey}` as const\n\n/** Set custom example, or update the selected HTTP client globally */\nconst selectClient = (option: ClientOption | CustomClientOption) => {\n if (!containerRef.value) {\n return\n }\n\n // We need to freeze the ui to prevent scrolling as the clients change\n const unfreeze = freezeElement(containerRef.value)\n setTimeout(() => {\n unfreeze()\n }, 300)\n\n // Update the store\n if (option.clientKey !== 'custom') {\n eventBus.emit('workspace:update:selected-client', option.id)\n }\n}\n\n/** Calculates the targetKey from the selected client id */\nconst selectedTargetKey = computed(\n () => selectedClient?.split('/')[0] as TargetId | undefined,\n)\n</script>\n<template>\n <!--\n Lives beside the TabList (not inside it). A combobox button is not a tab,\n so placing it in role=\"tablist\" fails aria-required-children.\n -->\n <div\n ref=\"containerRef\"\n class=\"client-libraries-more\">\n <ScalarCombobox\n :filterFn=\"filterClientsByQuery\"\n :modelValue=\"findClient(clientOptions, selectedClient)\"\n :options=\"clientOptions\"\n placement=\"bottom-end\"\n teleport\n @update:modelValue=\"selectClient($event as ClientOption)\">\n <button\n class=\"client-libraries client-libraries__select\"\n :class=\"{\n 'client-libraries__active':\n selectedClient && !isFeaturedClient(selectedClient),\n }\"\n type=\"button\">\n <div\n aria-hidden=\"true\"\n class=\"client-libraries-icon__more\">\n <template v-if=\"selectedClient && !isFeaturedClient(selectedClient)\">\n <div :class=\"`client-libraries-icon__${selectedTargetKey}`\">\n <ScalarIcon\n v-if=\"selectedTargetKey\"\n class=\"client-libraries-icon\"\n :icon=\"getIconByLanguageKey(selectedTargetKey)\" />\n </div>\n </template>\n <template v-else>\n <svg\n class=\"client-libraries-icon\"\n height=\"50\"\n role=\"presentation\"\n viewBox=\"0 0 50 50\"\n width=\"50\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <g\n fill=\"currentColor\"\n fill-rule=\"nonzero\">\n <path\n d=\"M10.71 25.3a3.87 3.87 0 1 0 7.74 0 3.87 3.87 0 0 0-7.74 0M21.13 25.3a3.87 3.87 0 1 0 7.74 0 3.87 3.87 0 0 0-7.74 0M31.55 25.3a3.87 3.87 0 1 0 7.74 0 3.87 3.87 0 0 0-7.74 0\" />\n </g>\n </svg>\n </template>\n </div>\n <span\n v-if=\"clientOptions.length\"\n class=\"client-libraries-text client-libraries-text-more\">\n {{ translate('clientLibraries.more') }}\n </span>\n <span class=\"sr-only\">\n {{ translate('clientLibraries.selectAll') }}\n </span>\n </button>\n </ScalarCombobox>\n </div>\n</template>\n<style scoped>\n/* One even column, the same width as each tab beside it */\n.client-libraries-more {\n display: flex;\n flex: 1 1 0;\n min-width: 0;\n}\n.client-libraries {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n position: relative;\n cursor: pointer;\n white-space: nowrap;\n padding: 8px 2px;\n gap: 6px;\n color: var(--scalar-color-3);\n border-bottom: 1px solid transparent;\n user-select: none;\n}\n\n.client-libraries:not(.client-libraries__active):hover:before {\n content: '';\n position: absolute;\n width: calc(100% - 4px);\n height: calc(100% - 4px);\n background: var(--scalar-background-2);\n left: 2px;\n top: 2px;\n z-index: 0;\n border-radius: var(--scalar-radius);\n}\n.client-libraries:active {\n color: var(--scalar-color-1);\n}\n.client-libraries:focus-visible {\n outline: none;\n box-shadow: inset 0 0 0 1px var(--scalar-color-accent);\n}\n.client-libraries-icon {\n max-width: 14px;\n max-height: 14px;\n min-width: 14px;\n width: 100%;\n aspect-ratio: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n box-sizing: border-box;\n color: currentColor;\n}\n.client-libraries-icon__more svg {\n height: initial;\n}\n.client-libraries__active {\n color: var(--scalar-color-1);\n border-bottom: 1px solid var(--scalar-color-1);\n}\n.client-libraries .client-libraries-text {\n font-size: var(--scalar-small);\n position: relative;\n display: flex;\n align-items: center;\n}\n.client-libraries__active .client-libraries-text {\n color: var(--scalar-color-1);\n font-weight: var(--scalar-semibold);\n}\n@media screen and (max-width: 600px) {\n .references-classic .client-libraries {\n flex-direction: column;\n }\n}\n@container client-libraries-list (width < 400px) {\n .client-libraries-more {\n flex: 0 0 auto;\n }\n .client-libraries__select {\n width: fit-content;\n\n .client-libraries-icon__more + span {\n display: none;\n }\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2BA,MAAM,eAAe,IAAiB;EACtC,MAAM,EAAE,cAAc,gBAAgB;;;;;EAMtC,MAAM,wBAAwB,cAC5B,wBAAwB,cAAc,OAAO,eAAe;;EAG9D,MAAM,gBAAgB,WAA8C;GAClE,IAAI,CAAC,aAAa,OAChB;GAIF,MAAM,WAAW,cAAc,aAAa,KAAK;GACjD,iBAAiB;IACf,SAAS;GACX,GAAG,GAAG;GAGN,IAAI,OAAO,cAAc,UACvB,QAAA,SAAS,KAAK,oCAAoC,OAAO,EAAE;EAE/D;;EAGA,MAAM,oBAAoB,eAClB,QAAA,gBAAgB,MAAM,GAAG,CAAC,CAAC,EACnC;;uBAOE,mBAuDM,OAAA;aAtDA;IAAJ,KAAI;IACJ,OAAM;OACN,YAmDiB,MAAA,cAAA,GAAA;IAlDd,UAAU,MAAA,oBAAA;IACV,YAAY,MAAA,UAAA,CAAU,CAAC,QAAA,eAAe,QAAA,cAAc;IACpD,SAAS,QAAA;IACV,WAAU;IACV,UAAA;IACC,uBAAiB,OAAA,OAAA,OAAA,MAAA,WAAE,aAAa,MAAM;;2BA4C9B,CA3CT,mBA2CS,UAAA;KA1CP,OAAK,eAAA,CAAC,6CAA2C,EAAA,4BACW,QAAA,kBAAc,CAAK,MAAA,gBAAA,CAAgB,CAAC,QAAA,cAAc,EAAA,CAAA,CAAA;KAI9G,MAAK;;KACL,mBA2BM,OA3BN,YA2BM,CAxBY,QAAA,kBAAc,CAAK,MAAA,gBAAA,CAAgB,CAAC,QAAA,cAAc,KAAA,UAAA,GAChE,mBAKM,OAAA;;MALA,OAAK,eAAA,0BAA4B,kBAAA,OAAiB;SAE9C,kBAAA,SAAA,UAAA,GADR,YAGoD,MAAA,UAAA,GAAA;;MADlD,OAAM;MACL,MAAM,qBAAqB,kBAAA,KAAiB;iFAIjD,mBAaM,OAbN,YAaM,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CANJ,mBAKI,KAAA;MAJF,MAAK;MACL,aAAU;SACV,mBACoL,QAAA,EAAlL,GAAE,8KAA6K,CAAA,CAAA,GAAA,EAAA,CAAA,EAAA,CAAA,EAAA,CAAA;KAMjL,QAAA,cAAc,UAAA,UAAA,GADtB,mBAIO,QAJP,YAIO,gBADF,MAAA,SAAA,CAAS,CAAA,sBAAA,CAAA,GAAA,CAAA,KAAA,mBAAA,IAAA,IAAA;KAEd,mBAEO,QAFP,YAEO,gBADF,MAAA,SAAA,CAAS,CAAA,2BAAA,CAAA,GAAA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClientSelector.vue.d.ts","sourceRoot":"","sources":["../../../../src/blocks/scalar-client-selector-block/components/ClientSelector.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ClientSelector.vue.d.ts","sourceRoot":"","sources":["../../../../src/blocks/scalar-client-selector-block/components/ClientSelector.vue"],"names":[],"mappings":"AA+SA,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,6BAA6B,CAAA;AAGpC,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAWvE,KAAK,WAAW,GAAG;IACjB,yDAAyD;IACzD,aAAa,EAAE,iBAAiB,EAAE,CAAA;IAClC,sFAAsF;IACtF,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,gBAAgB;IAChB,QAAQ,EAAE,iBAAiB,CAAA;CAC5B,CAAC;AAyTF,QAAA,MAAM,YAAY;;oPAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -2,7 +2,7 @@ import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_exp
|
|
|
2
2
|
import ClientSelector_vue_vue_type_script_setup_true_lang_default from "./ClientSelector.vue.script.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
//#region src/blocks/scalar-client-selector-block/components/ClientSelector.vue
|
|
5
|
-
var ClientSelector_default =
|
|
5
|
+
var ClientSelector_default = /*#__PURE__*/ _plugin_vue_export_helper_default(ClientSelector_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-34beffcc"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { ClientSelector_default as default };
|
|
8
8
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClientSelector.vue.js","names":[],"sources":["../../../../src/blocks/scalar-client-selector-block/components/ClientSelector.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { TabGroup, TabList, TabPanel, TabPanels } from '@headlessui/vue'\nimport {\n DEFAULT_CLIENT,\n type ClientOptionGroup,\n} from '@scalar/blocks/code-example'\nimport { type WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { computed, ref, useId, useTemplateRef, watch } from 'vue'\n\nimport {\n getFeaturedClients,\n isFeaturedClient,\n} from '@/blocks/scalar-client-selector-block/helpers/featured-clients'\nimport { useLocalization } from '@/features/localization'\n\nimport ClientDropdown from './ClientDropdown.vue'\n\nconst {\n clientOptions,\n eventBus,\n selectedClient = DEFAULT_CLIENT,\n} = defineProps<{\n /** Computed list of all available Http Client options */\n clientOptions: ClientOptionGroup[]\n /** The currently selected Http Client (a built-in client id or a custom sample id) */\n selectedClient?: string\n /** Event bus */\n eventBus: WorkspaceEventBus\n}>()\n\nconst headingId = useId()\nconst morePanel = useId()\nconst { translate } = useLocalization()\n\n/**\n * Whether a selection is a custom code sample (e.g. `custom/python`) rather than\n * a built-in client. Custom samples are matched by the `custom/` id prefix, which\n * mirrors the `^custom/` pattern enforced on the stored default client.\n */\nconst isCustomSelection = (client: string | undefined) =>\n Boolean(client?.startsWith('custom/'))\n\n/**\n * The generic client this selector actually displays.\n *\n * The introduction selector only represents the built-in HTTP clients. Custom\n * code samples are operation-specific and \"always just have the generic\n * clients\", so when one is selected globally we keep showing the last generic\n * client here instead of switching to (and failing to render) a custom sample.\n */\nconst activeClient = ref(\n isCustomSelection(selectedClient) ? DEFAULT_CLIENT : selectedClient,\n)\n\nwatch(\n () => selectedClient,\n (newClient) => {\n if (!isCustomSelection(newClient)) {\n activeClient.value = newClient\n }\n },\n)\n\n/** Grab the option for the currently selected Http Client */\nconst selectedClientOption = computed(\n () =>\n clientOptions.flatMap(\n (optionGroup) =>\n optionGroup.options.find(\n (option) => option.id === activeClient.value,\n ) ?? [],\n )[0],\n)\n\n/** List of featured clients */\nconst featuredClients = computed(() => getFeaturedClients(clientOptions))\n\n/** Currently selected tab index */\nconst tabIndex = computed(() =>\n featuredClients.value.findIndex(
|
|
1
|
+
{"version":3,"file":"ClientSelector.vue.js","names":[],"sources":["../../../../src/blocks/scalar-client-selector-block/components/ClientSelector.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { Tab, TabGroup, TabList, TabPanel, TabPanels } from '@headlessui/vue'\nimport {\n DEFAULT_CLIENT,\n type ClientOptionGroup,\n} from '@scalar/blocks/code-example'\nimport { ScalarIcon } from '@scalar/components/icon'\nimport type { TargetId } from '@scalar/types/snippetz'\nimport { type WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { computed, ref, useId, useTemplateRef, watch } from 'vue'\n\nimport {\n getFeaturedClients,\n isFeaturedClient,\n} from '@/blocks/scalar-client-selector-block/helpers/featured-clients'\nimport { useLocalization } from '@/features/localization'\n\nimport ClientDropdown from './ClientDropdown.vue'\n\nconst {\n clientOptions,\n eventBus,\n selectedClient = DEFAULT_CLIENT,\n} = defineProps<{\n /** Computed list of all available Http Client options */\n clientOptions: ClientOptionGroup[]\n /** The currently selected Http Client (a built-in client id or a custom sample id) */\n selectedClient?: string\n /** Event bus */\n eventBus: WorkspaceEventBus\n}>()\n\nconst headingId = useId()\nconst morePanel = useId()\nconst { translate } = useLocalization()\n\n/**\n * Whether a selection is a custom code sample (e.g. `custom/python`) rather than\n * a built-in client. Custom samples are matched by the `custom/` id prefix, which\n * mirrors the `^custom/` pattern enforced on the stored default client.\n */\nconst isCustomSelection = (client: string | undefined) =>\n Boolean(client?.startsWith('custom/'))\n\n/**\n * The generic client this selector actually displays.\n *\n * The introduction selector only represents the built-in HTTP clients. Custom\n * code samples are operation-specific and \"always just have the generic\n * clients\", so when one is selected globally we keep showing the last generic\n * client here instead of switching to (and failing to render) a custom sample.\n */\nconst activeClient = ref(\n isCustomSelection(selectedClient) ? DEFAULT_CLIENT : selectedClient,\n)\n\nwatch(\n () => selectedClient,\n (newClient) => {\n if (!isCustomSelection(newClient)) {\n activeClient.value = newClient\n }\n },\n)\n\n/** Grab the option for the currently selected Http Client */\nconst selectedClientOption = computed(\n () =>\n clientOptions.flatMap(\n (optionGroup) =>\n optionGroup.options.find(\n (option) => option.id === activeClient.value,\n ) ?? [],\n )[0],\n)\n\n/** List of featured clients */\nconst featuredClients = computed(() => getFeaturedClients(clientOptions))\n\n/** Currently selected tab index */\nconst tabIndex = computed(() =>\n featuredClients.value.findIndex((client) => client.id === activeClient.value),\n)\n\nconst wrapper = useTemplateRef('wrapper-ref')\n\nconst getIconByLanguageKey = (targetKey: TargetId) =>\n `programming-language-${targetKey === 'js' ? 'javascript' : targetKey}` as const\n\n/** Handle tab selection */\nconst onTabSelect = (index: number) => {\n const client = featuredClients.value[index]\n\n if (!client || !wrapper.value) {\n return\n }\n\n eventBus.emit('workspace:update:selected-client', client.id)\n}\n\ndefineExpose({\n selectedClientOption,\n})\n</script>\n<template>\n <div\n v-if=\"clientOptions.length\"\n ref=\"wrapper-ref\">\n <TabGroup\n manual\n :selectedIndex=\"tabIndex\"\n @change=\"onTabSelect\">\n <div\n :id=\"headingId\"\n class=\"client-libraries-heading\">\n {{ translate('clientLibraries.heading') }}\n </div>\n\n <!--\n TabList may only contain Tab children (aria-required-children).\n The \"More\" combobox sits beside it in the same visual row.\n -->\n <div class=\"client-libraries-list\">\n <TabList\n :aria-labelledby=\"headingId\"\n class=\"client-libraries-tabs\"\n :style=\"{ flexGrow: featuredClients.length }\">\n <Tab\n v-for=\"featuredClient in featuredClients\"\n :key=\"featuredClient.clientKey\"\n class=\"client-libraries rendered-code-sdks\"\n :class=\"{\n 'client-libraries__active': featuredClient.id === activeClient,\n }\">\n <div :class=\"`client-libraries-icon__${featuredClient.targetKey}`\">\n <ScalarIcon\n class=\"client-libraries-icon\"\n :icon=\"getIconByLanguageKey(featuredClient.targetKey)\" />\n </div>\n <span class=\"client-libraries-text\">{{\n featuredClient.targetTitle\n }}</span>\n </Tab>\n </TabList>\n\n <ClientDropdown\n :clientOptions\n :eventBus\n :selectedClient=\"activeClient\" />\n </div>\n\n <!-- Content -->\n <TabPanels>\n <template v-if=\"isFeaturedClient(activeClient)\">\n <TabPanel\n v-for=\"client in featuredClients\"\n :key=\"client.id\"\n class=\"selected-client card-footer -outline-offset-2\">\n {{ client.title }}\n </TabPanel>\n </template>\n <div\n v-else\n :id=\"morePanel\"\n class=\"selected-client card-footer -outline-offset-2\"\n role=\"tabpanel\"\n tabindex=\"0\">\n {{ selectedClientOption?.title }}\n </div>\n </TabPanels>\n </TabGroup>\n </div>\n</template>\n<style scoped>\n.selected-client {\n color: var(--scalar-color-1);\n font-size: var(--scalar-small);\n font-family: var(--scalar-font-code);\n padding: 9px 12px;\n border-top: none;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n background: var(--scalar-background-1);\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n border-bottom-left-radius: var(--scalar-radius-xl);\n border-bottom-right-radius: var(--scalar-radius-xl);\n min-height: fit-content;\n}\n.client-libraries-heading {\n font-size: var(--scalar-small);\n font-weight: var(--scalar-font-medium);\n color: var(--scalar-color-1);\n padding: 9px 12px;\n background-color: var(--scalar-background-2);\n display: flex;\n align-items: center;\n max-height: 32px;\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n border-top-left-radius: var(--scalar-radius-xl);\n border-top-right-radius: var(--scalar-radius-xl);\n}\n.client-libraries-list {\n container: client-libraries-list / inline-size;\n display: flex;\n justify-content: center;\n overflow: hidden;\n padding: 0 12px;\n background-color: var(--scalar-background-1);\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/* Grows once per tab it holds, so tabs and the \"More\" trigger stay even */\n.client-libraries-tabs {\n display: flex;\n flex: 1 1 0;\n min-width: 0;\n}\n.client-libraries {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n position: relative;\n cursor: pointer;\n white-space: nowrap;\n padding: 8px 2px;\n gap: 6px;\n color: var(--scalar-color-3);\n border-bottom: 1px solid transparent;\n user-select: none;\n}\n\n.client-libraries:not(.client-libraries__active):hover:before {\n content: '';\n position: absolute;\n width: calc(100% - 4px);\n height: calc(100% - 4px);\n background: var(--scalar-background-2);\n left: 2px;\n top: 2px;\n z-index: 0;\n border-radius: var(--scalar-radius);\n}\n.client-libraries:active {\n color: var(--scalar-color-1);\n}\n.client-libraries:focus-visible {\n outline: none;\n box-shadow: inset 0 0 0 1px var(--scalar-color-accent);\n}\n/* remove php and c on mobile */\n@media screen and (max-width: 450px) {\n .client-libraries:nth-of-type(4),\n .client-libraries:nth-of-type(5) {\n display: none;\n }\n}\n.client-libraries-icon {\n max-width: 14px;\n max-height: 14px;\n min-width: 14px;\n width: 100%;\n aspect-ratio: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n box-sizing: border-box;\n color: currentColor;\n}\n.client-libraries__active {\n color: var(--scalar-color-1);\n border-bottom: 1px solid var(--scalar-color-1);\n}\n.client-libraries .client-libraries-text {\n font-size: var(--scalar-small);\n position: relative;\n display: flex;\n align-items: center;\n}\n.client-libraries__active .client-libraries-text {\n color: var(--scalar-color-1);\n font-weight: var(--scalar-semibold);\n}\n@media screen and (max-width: 600px) {\n .references-classic .client-libraries {\n flex-direction: column;\n }\n}\n@container client-libraries-list (width < 380px) {\n .client-libraries {\n width: 100%;\n }\n .client-libraries span {\n display: none;\n }\n}\n</style>\n"],"mappings":""}
|