@scalar/api-reference 1.57.5 → 1.59.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +112 -0
- package/dist/blocks/index.d.ts +1 -0
- package/dist/blocks/index.d.ts.map +1 -1
- package/dist/blocks/index.js +2 -1
- package/dist/blocks/scalar-asyncapi-server-selector-block/components/AsyncApiServerSelector.vue.d.ts +24 -0
- package/dist/blocks/scalar-asyncapi-server-selector-block/components/AsyncApiServerSelector.vue.d.ts.map +1 -0
- package/dist/blocks/scalar-asyncapi-server-selector-block/components/AsyncApiServerSelector.vue.js +7 -0
- package/dist/blocks/scalar-asyncapi-server-selector-block/components/AsyncApiServerSelector.vue.js.map +1 -0
- package/dist/blocks/scalar-asyncapi-server-selector-block/components/AsyncApiServerSelector.vue.script.js +80 -0
- package/dist/blocks/scalar-asyncapi-server-selector-block/components/AsyncApiServerSelector.vue.script.js.map +1 -0
- package/dist/blocks/scalar-asyncapi-server-selector-block/components/Selector.vue.d.ts +25 -0
- package/dist/blocks/scalar-asyncapi-server-selector-block/components/Selector.vue.d.ts.map +1 -0
- package/dist/blocks/scalar-asyncapi-server-selector-block/components/Selector.vue.js +7 -0
- package/dist/blocks/scalar-asyncapi-server-selector-block/components/Selector.vue.js.map +1 -0
- package/dist/blocks/scalar-asyncapi-server-selector-block/components/Selector.vue.script.js +76 -0
- package/dist/blocks/scalar-asyncapi-server-selector-block/components/Selector.vue.script.js.map +1 -0
- package/dist/blocks/scalar-asyncapi-server-selector-block/index.d.ts +2 -0
- package/dist/blocks/scalar-asyncapi-server-selector-block/index.d.ts.map +1 -0
- package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts +2 -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.map +1 -1
- package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.d.ts +2 -6
- 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 +26 -36
- 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.d.ts +1 -1
- package/dist/blocks/scalar-client-selector-block/helpers/featured-clients.d.ts.map +1 -1
- package/dist/blocks/scalar-client-selector-block/helpers/featured-clients.js.map +1 -1
- package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.d.ts +9 -0
- package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.d.ts.map +1 -0
- package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.js +9 -0
- package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.js.map +1 -0
- package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.script.js +225 -0
- package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.script.js.map +1 -0
- package/dist/blocks/scalar-sdk-installation-instructions/helpers/language-icon.d.ts +4 -0
- package/dist/blocks/scalar-sdk-installation-instructions/helpers/language-icon.d.ts.map +1 -0
- package/dist/blocks/scalar-sdk-installation-instructions/helpers/language-icon.js +59 -0
- package/dist/blocks/scalar-sdk-installation-instructions/helpers/language-icon.js.map +1 -0
- package/dist/blocks/scalar-sdk-installation-instructions/helpers/renderable-sdks.d.ts +19 -0
- package/dist/blocks/scalar-sdk-installation-instructions/helpers/renderable-sdks.d.ts.map +1 -0
- package/dist/blocks/scalar-sdk-installation-instructions/helpers/renderable-sdks.js +19 -0
- package/dist/blocks/scalar-sdk-installation-instructions/helpers/renderable-sdks.js.map +1 -0
- package/dist/blocks/scalar-sdk-installation-instructions/helpers/visible-tab-count.d.ts +16 -0
- package/dist/blocks/scalar-sdk-installation-instructions/helpers/visible-tab-count.d.ts.map +1 -0
- package/dist/blocks/scalar-sdk-installation-instructions/helpers/visible-tab-count.js +29 -0
- package/dist/blocks/scalar-sdk-installation-instructions/helpers/visible-tab-count.js.map +1 -0
- package/dist/blocks/scalar-sdk-installation-instructions/index.d.ts +3 -0
- package/dist/blocks/scalar-sdk-installation-instructions/index.d.ts.map +1 -0
- package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.script.js +1 -1
- package/dist/browser/chunks/AgentScalarChatInterface-BXB1nZKJ.js +27 -0
- package/dist/browser/chunks/ScalarTextInput.vue-XkIzhvc0.js +27 -0
- package/dist/browser/chunks/basic-shape-diamond.svg-BTEOT1FL.js +15 -0
- package/dist/browser/chunks/basic-shape-hexagon.svg-BSPzaCgF.js +15 -0
- package/dist/browser/chunks/basic-shape-primary-circle-ellipse-round.svg-DKmZ8UUU.js +15 -0
- package/dist/browser/chunks/basic-shape-primary-square-rectangle.svg-n2YRykHD.js +15 -0
- package/dist/browser/chunks/basic-shape-shield.svg-Bec9cJDA.js +15 -0
- package/dist/browser/chunks/browser-67K6wmG9.js +129 -0
- package/dist/browser/chunks/computer-device-desktop-monitor.svg-m6j893Hb.js +15 -0
- package/dist/browser/chunks/computer-device-desktop.svg-Dk1VVO7k.js +15 -0
- package/dist/browser/chunks/computer-device-laptop.svg-BNGVUCYS.js +15 -0
- package/dist/browser/chunks/computer-device-mobile-phone-android-samsung-back.svg-CC4UUTFw.js +15 -0
- package/dist/browser/chunks/computer-device-mobile-phone-android-samsung.svg-D8ExpMpL.js +15 -0
- package/dist/browser/chunks/computer-device-mobile-phone-iphone-x-back.svg-CLm7sgMM.js +15 -0
- package/dist/browser/chunks/computer-device-mobile-phone-iphone-x.svg-Xrttg6_7.js +15 -0
- package/dist/browser/chunks/computer-device-mobile-tablet-touch.svg-DQ2oTvOG.js +15 -0
- package/dist/browser/chunks/computer-device-mobile-tablet.svg-DCr0XlRc.js +15 -0
- package/dist/browser/chunks/computer-device-network-ethernet-cat6.svg-AK9l0iOl.js +15 -0
- package/dist/browser/chunks/computer-device-network-lan-www.svg-gUIdFBlE.js +15 -0
- package/dist/browser/chunks/computer-device-network-wifi-connection.svg-Be-EMm4e.js +15 -0
- package/dist/browser/chunks/computer-device-network-wifi-router.svg-Dc2VzyqK.js +15 -0
- package/dist/browser/chunks/ecology-science-erlenmeyer-flask.svg-DHgy7Jfd.js +15 -0
- package/dist/browser/chunks/image-flash-lightning.svg-EETR_y1q.js +15 -0
- package/dist/browser/chunks/image-picture-flower.svg-DN1AYzJU.js +15 -0
- package/dist/browser/chunks/interface-alert-exclamation-diamond.svg-C5NozMV_.js +15 -0
- package/dist/browser/chunks/interface-alert-exclamation-triangle-warning.svg-DaAg2fF5.js +15 -0
- package/dist/browser/chunks/interface-alert-information-circle.svg-ckkkt9Mv.js +15 -0
- package/dist/browser/chunks/interface-award-crown.svg-pjvn9hY-.js +15 -0
- package/dist/browser/chunks/interface-bookmark-tag.svg-r2r-lQq4.js +15 -0
- package/dist/browser/chunks/interface-bookmark.svg-BK9HKQBT.js +15 -0
- package/dist/browser/chunks/interface-calendar-date-one.svg-DNnF0M1I.js +15 -0
- package/dist/browser/chunks/interface-content-book-open-pages.svg-CQj_w9Vp.js +15 -0
- package/dist/browser/chunks/interface-content-book-page.svg-DppoeJRe.js +15 -0
- package/dist/browser/chunks/interface-content-file.svg-CvcD7OiY.js +15 -0
- package/dist/browser/chunks/interface-content-folder.svg-BmtS5I9A.js +15 -0
- package/dist/browser/chunks/interface-copy-clipboard.svg-Be6EI50X.js +15 -0
- package/dist/browser/chunks/interface-edit-attachment.svg-G5TKzpWX.js +15 -0
- package/dist/browser/chunks/interface-edit-binocular.svg-jzL-DvGB.js +15 -0
- package/dist/browser/chunks/interface-edit-magic-wand.svg-BOTlymvp.js +15 -0
- package/dist/browser/chunks/interface-edit-tool-paint-roller.svg-s9dwryx7.js +15 -0
- package/dist/browser/chunks/interface-edit-tool-pencil.svg-C7v0dbB3.js +15 -0
- package/dist/browser/chunks/interface-favorite-award.svg-CYHUgUG0.js +15 -0
- package/dist/browser/chunks/interface-favorite-flag.svg-C10zlKOb.js +15 -0
- package/dist/browser/chunks/interface-favorite-heart.svg-eoduXxlz.js +15 -0
- package/dist/browser/chunks/interface-favorite-star.svg-BSmxJetr.js +15 -0
- package/dist/browser/chunks/interface-favorite-stars-sparkles.svg-JTFLj3Ls.js +15 -0
- package/dist/browser/chunks/interface-hierarchy-flowchart.svg-Cg_Wy0kN.js +15 -0
- package/dist/browser/chunks/interface-home-house.svg-DytoGRnv.js +15 -0
- package/dist/browser/chunks/interface-hyperlink.svg-CuEfmmQI.js +15 -0
- package/dist/browser/chunks/interface-lighting-brightness.svg-DSK0h_Pa.js +15 -0
- package/dist/browser/chunks/interface-lock-closed.svg-Cn6TaLYv.js +15 -0
- package/dist/browser/chunks/interface-lock-open-unlock.svg-CVkG5-9W.js +15 -0
- package/dist/browser/chunks/interface-login-key.svg-y-cwwXjN.js +15 -0
- package/dist/browser/chunks/interface-search.svg-S-puVFJB.js +15 -0
- package/dist/browser/chunks/interface-setting-cog.svg-CTH4_lLg.js +15 -0
- package/dist/browser/chunks/interface-share-megaphone-bullhorn.svg-Pbp39MyC.js +15 -0
- package/dist/browser/chunks/interface-share-rocket.svg-BgCsIRZO.js +15 -0
- package/dist/browser/chunks/interface-share-satellite.svg-DAMN9d5G.js +15 -0
- package/dist/browser/chunks/interface-share-space-ship.svg-Dt-Mejxk.js +15 -0
- package/dist/browser/chunks/interface-share.svg-vFYTXSti.js +15 -0
- package/dist/browser/chunks/interface-signal-square.svg-DNG4LpAe.js +15 -0
- package/dist/browser/chunks/interface-time-clock-circle.svg-Bpz-nLxo.js +15 -0
- package/dist/browser/chunks/interface-time-hour-glass.svg-D7agfKsH.js +15 -0
- package/dist/browser/chunks/interface-users-multiple.svg-CkPJBBnG.js +15 -0
- package/dist/browser/chunks/interface-weather-moon.svg-CaTZFMPO.js +15 -0
- package/dist/browser/chunks/mail-chat-bubble-square.svg-DC8RIihp.js +15 -0
- package/dist/browser/chunks/mail-send-email-paper-airplane.svg-D8OLs9jz.js +15 -0
- package/dist/browser/chunks/mail-send-envelope.svg-CV33h5Sx.js +15 -0
- package/dist/browser/chunks/modal-Bp9V4D2s.js +66 -0
- package/dist/browser/chunks/modal-CtAiwzwH.js +15 -0
- package/dist/browser/chunks/money-cashier-receipt.svg-CJL8C2gs.js +15 -0
- package/dist/browser/chunks/money-currency-dollar-pay.svg-VdBplCTx.js +15 -0
- package/dist/browser/chunks/money-graph-arrow-increase.svg-DcRov3zk.js +15 -0
- package/dist/browser/chunks/money-graph-bar-chart-increase.svg-Cc7KxjX-.js +15 -0
- package/dist/browser/chunks/nature-ecology-leaf.svg-DR3cTZxt.js +15 -0
- package/dist/browser/chunks/phone-telephone.svg-DyY0gUlk.js +15 -0
- package/dist/browser/chunks/programming-bug.svg-BHLT-Qhp.js +15 -0
- package/dist/browser/chunks/programming-cloud.svg-B6YW33ba.js +15 -0
- package/dist/browser/chunks/programming-computer-database-server.svg-B6o5Sdn-.js +15 -0
- package/dist/browser/chunks/programming-computer-database.svg-Cl7OVtpJ.js +15 -0
- package/dist/browser/chunks/programming-module-four-layout.svg-BQrerL1x.js +15 -0
- package/dist/browser/chunks/programming-module-three.svg-B2KTQzBM.js +15 -0
- package/dist/browser/chunks/programming-module.svg-CiID7kPm.js +15 -0
- package/dist/browser/chunks/programming-script-code.svg-D1M5rtkN.js +15 -0
- package/dist/browser/chunks/runtime-core.esm-bundler-Byrbbu5Q.js +17 -0
- package/dist/browser/chunks/shopping-cart.svg-BEegiIR9.js +15 -0
- package/dist/browser/chunks/shopping-gift-present.svg-BUHwuLix.js +15 -0
- package/dist/browser/chunks/shopping-shipping-box-parcel-package.svg-D6fxWdYx.js +15 -0
- package/dist/browser/chunks/tag-new-circle.svg-jsg1bGs0.js +15 -0
- package/dist/browser/chunks/travel-map-earth-globe.svg-ClbMiU-f.js +15 -0
- package/dist/browser/chunks/vendor-nugWm4eq.js +337 -0
- package/dist/browser/standalone.esm.js +1853 -0
- package/dist/browser/standalone.js +258 -255
- 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 +79 -28
- package/dist/components/ApiReference.vue.script.js.map +1 -1
- package/dist/components/Content/AsyncApi/AsyncApiTraversedEntry.vue.d.ts +16 -0
- package/dist/components/Content/AsyncApi/AsyncApiTraversedEntry.vue.d.ts.map +1 -0
- package/dist/components/Content/AsyncApi/AsyncApiTraversedEntry.vue.js +7 -0
- package/dist/components/Content/AsyncApi/AsyncApiTraversedEntry.vue.js.map +1 -0
- package/dist/components/Content/AsyncApi/AsyncApiTraversedEntry.vue.script.js +166 -0
- package/dist/components/Content/AsyncApi/AsyncApiTraversedEntry.vue.script.js.map +1 -0
- package/dist/components/Content/AsyncApi/Channel.vue.d.ts +18 -0
- package/dist/components/Content/AsyncApi/Channel.vue.d.ts.map +1 -0
- package/dist/components/Content/AsyncApi/Channel.vue.js +9 -0
- package/dist/components/Content/AsyncApi/Channel.vue.js.map +1 -0
- package/dist/components/Content/AsyncApi/Channel.vue.script.js +148 -0
- package/dist/components/Content/AsyncApi/Channel.vue.script.js.map +1 -0
- package/dist/components/Content/AsyncApi/helpers/adapt-async-api-parameters.d.ts +14 -0
- package/dist/components/Content/AsyncApi/helpers/adapt-async-api-parameters.d.ts.map +1 -0
- package/dist/components/Content/AsyncApi/helpers/adapt-async-api-parameters.js +34 -0
- package/dist/components/Content/AsyncApi/helpers/adapt-async-api-parameters.js.map +1 -0
- package/dist/components/Content/AsyncApi/index.d.ts +2 -0
- package/dist/components/Content/AsyncApi/index.d.ts.map +1 -0
- package/dist/components/Content/Auth/Auth.vue.d.ts +1 -1
- package/dist/components/Content/Auth/Auth.vue.d.ts.map +1 -1
- package/dist/components/Content/Auth/Auth.vue.js.map +1 -1
- package/dist/components/Content/Auth/Auth.vue.script.js +2 -0
- package/dist/components/Content/Auth/Auth.vue.script.js.map +1 -1
- package/dist/components/Content/Content.vue.d.ts +3 -3
- package/dist/components/Content/Content.vue.d.ts.map +1 -1
- package/dist/components/Content/Content.vue.js.map +1 -1
- package/dist/components/Content/Content.vue.script.js +69 -9
- package/dist/components/Content/Content.vue.script.js.map +1 -1
- package/dist/components/Content/Models/Model.vue.d.ts +4 -2
- package/dist/components/Content/Models/Model.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/Model.vue.js.map +1 -1
- package/dist/components/Content/Models/Model.vue.script.js +6 -1
- package/dist/components/Content/Models/Model.vue.script.js.map +1 -1
- package/dist/components/Content/Models/ModelTag.vue.d.ts +2 -0
- package/dist/components/Content/Models/ModelTag.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/ModelTag.vue.js.map +1 -1
- package/dist/components/Content/Models/ModelTag.vue.script.js +11 -12
- package/dist/components/Content/Models/ModelTag.vue.script.js.map +1 -1
- package/dist/components/Content/Models/components/ClassicLayout.vue.d.ts +4 -2
- 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.js.map +1 -1
- package/dist/components/Content/Models/components/ClassicLayout.vue.script.js +9 -2
- package/dist/components/Content/Models/components/ClassicLayout.vue.script.js.map +1 -1
- package/dist/components/Content/Models/components/ModernLayout.vue.d.ts +4 -1
- package/dist/components/Content/Models/components/ModernLayout.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/components/ModernLayout.vue.js.map +1 -1
- package/dist/components/Content/Models/components/ModernLayout.vue.script.js +5 -1
- package/dist/components/Content/Models/components/ModernLayout.vue.script.js.map +1 -1
- package/dist/components/Content/Operations/TraversedEntry.vue.d.ts +1 -1
- package/dist/components/Content/Operations/TraversedEntry.vue.d.ts.map +1 -1
- package/dist/components/Content/Operations/TraversedEntry.vue.js.map +1 -1
- package/dist/components/Content/Operations/TraversedEntry.vue.script.js +11 -4
- package/dist/components/Content/Operations/TraversedEntry.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.d.ts +6 -0
- 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 +32 -7
- 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 +16 -3
- package/dist/components/Content/Schema/SchemaComposition.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.script.js +1 -1
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.js.map +1 -1
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.script.js +11 -6
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +2 -0
- 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 +17 -2
- package/dist/components/Content/Schema/SchemaProperty.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/helpers/get-compositions-to-render.d.ts +3 -2
- package/dist/components/Content/Schema/helpers/get-compositions-to-render.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/get-compositions-to-render.js +26 -1
- package/dist/components/Content/Schema/helpers/get-compositions-to-render.js.map +1 -1
- package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts +2 -1
- package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +40 -25
- package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js.map +1 -1
- package/dist/components/Content/Schema/helpers/schema-cycle.d.ts +31 -0
- package/dist/components/Content/Schema/helpers/schema-cycle.d.ts.map +1 -0
- package/dist/components/Content/Schema/helpers/schema-cycle.js +39 -0
- package/dist/components/Content/Schema/helpers/schema-cycle.js.map +1 -0
- package/dist/components/Content/Schema/types.d.ts +10 -0
- package/dist/components/Content/Schema/types.d.ts.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/features/Operation/Operation.vue.d.ts +1 -1
- package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
- package/dist/features/Operation/Operation.vue.js.map +1 -1
- package/dist/features/Operation/Operation.vue.script.js +4 -0
- package/dist/features/Operation/Operation.vue.script.js.map +1 -1
- package/dist/features/Operation/components/ContentTypeSelect.vue.script.js +1 -1
- package/dist/features/Operation/components/Header.vue.d.ts +4 -1
- package/dist/features/Operation/components/Header.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/Header.vue.js.map +1 -1
- package/dist/features/Operation/components/Header.vue.script.js +6 -2
- package/dist/features/Operation/components/Header.vue.script.js.map +1 -1
- package/dist/features/Operation/components/Headers.vue.d.ts +4 -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.js.map +1 -1
- package/dist/features/Operation/components/Headers.vue.script.js +10 -4
- package/dist/features/Operation/components/Headers.vue.script.js.map +1 -1
- package/dist/features/Operation/components/OperationParameters.vue.d.ts +4 -2
- package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationParameters.vue.js.map +1 -1
- package/dist/features/Operation/components/OperationParameters.vue.script.js +12 -1
- package/dist/features/Operation/components/OperationParameters.vue.script.js.map +1 -1
- package/dist/features/Operation/components/OperationResponses.vue.d.ts +4 -2
- package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationResponses.vue.js.map +1 -1
- package/dist/features/Operation/components/OperationResponses.vue.script.js +3 -0
- package/dist/features/Operation/components/OperationResponses.vue.script.js.map +1 -1
- package/dist/features/Operation/components/ParameterList.vue.d.ts +4 -2
- package/dist/features/Operation/components/ParameterList.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterList.vue.js.map +1 -1
- package/dist/features/Operation/components/ParameterList.vue.script.js +3 -0
- package/dist/features/Operation/components/ParameterList.vue.script.js.map +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts +4 -2
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.js +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.js.map +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.script.js +8 -1
- package/dist/features/Operation/components/ParameterListItem.vue.script.js.map +1 -1
- package/dist/features/Operation/components/RequestBody.vue.d.ts +4 -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.js.map +1 -1
- package/dist/features/Operation/components/RequestBody.vue.script.js +10 -3
- package/dist/features/Operation/components/RequestBody.vue.script.js.map +1 -1
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +4 -2
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/callbacks/Callback.vue.js +1 -1
- package/dist/features/Operation/components/callbacks/Callback.vue.js.map +1 -1
- package/dist/features/Operation/components/callbacks/Callback.vue.script.js +5 -0
- package/dist/features/Operation/components/callbacks/Callback.vue.script.js.map +1 -1
- package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts +4 -2
- package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/callbacks/Callbacks.vue.js.map +1 -1
- package/dist/features/Operation/components/callbacks/Callbacks.vue.script.js +3 -0
- package/dist/features/Operation/components/callbacks/Callbacks.vue.script.js.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +3 -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 +8 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.script.js.map +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +3 -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 +170 -176
- package/dist/features/Operation/layouts/ModernLayout.vue.script.js.map +1 -1
- package/dist/features/Search/components/SearchButton.vue.d.ts +4 -1
- package/dist/features/Search/components/SearchButton.vue.d.ts.map +1 -1
- package/dist/features/Search/components/SearchButton.vue.js.map +1 -1
- package/dist/features/Search/components/SearchButton.vue.script.js +20 -9
- package/dist/features/Search/components/SearchButton.vue.script.js.map +1 -1
- package/dist/features/Search/components/SearchModal.vue.d.ts +4 -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.js.map +1 -1
- package/dist/features/Search/components/SearchModal.vue.script.js +7 -5
- package/dist/features/Search/components/SearchModal.vue.script.js.map +1 -1
- package/dist/features/Search/components/SearchResult.vue.d.ts +2 -0
- package/dist/features/Search/components/SearchResult.vue.d.ts.map +1 -1
- package/dist/features/Search/components/SearchResult.vue.js.map +1 -1
- package/dist/features/Search/components/SearchResult.vue.script.js +8 -6
- package/dist/features/Search/components/SearchResult.vue.script.js.map +1 -1
- package/dist/features/Search/helpers/create-search-index.d.ts +9 -1
- package/dist/features/Search/helpers/create-search-index.d.ts.map +1 -1
- package/dist/features/Search/helpers/create-search-index.js +27 -8
- package/dist/features/Search/helpers/create-search-index.js.map +1 -1
- package/dist/features/Search/hooks/useSearchIndex.d.ts +4 -2
- package/dist/features/Search/hooks/useSearchIndex.d.ts.map +1 -1
- package/dist/features/Search/hooks/useSearchIndex.js +4 -3
- package/dist/features/Search/hooks/useSearchIndex.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.d.ts +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 +11 -9
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.script.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.script.js +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 +9 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.script.js.map +1 -1
- package/dist/features/example-responses/ExampleResponse.vue.d.ts.map +1 -1
- package/dist/features/example-responses/ExampleResponse.vue.js +1 -1
- package/dist/features/example-responses/ExampleResponse.vue.js.map +1 -1
- package/dist/features/example-responses/ExampleResponse.vue.script.js +6 -7
- package/dist/features/example-responses/ExampleResponse.vue.script.js.map +1 -1
- package/dist/features/example-responses/ExampleResponses.vue.script.js +1 -1
- package/dist/features/example-responses/ExampleSchema.vue.d.ts.map +1 -1
- package/dist/features/example-responses/ExampleSchema.vue.js.map +1 -1
- package/dist/features/example-responses/ExampleSchema.vue.script.js +6 -7
- package/dist/features/example-responses/ExampleSchema.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 +15 -4
- package/dist/features/info-object/Contact.vue.script.js.map +1 -1
- package/dist/helpers/get-async-api-model-schema.d.ts +15 -0
- package/dist/helpers/get-async-api-model-schema.d.ts.map +1 -0
- package/dist/helpers/get-async-api-model-schema.js +32 -0
- package/dist/helpers/get-async-api-model-schema.js.map +1 -0
- package/dist/helpers/id-routing.d.ts +18 -0
- package/dist/helpers/id-routing.d.ts.map +1 -1
- package/dist/helpers/id-routing.js +41 -1
- package/dist/helpers/id-routing.js.map +1 -1
- package/dist/helpers/load-from-perssistance.d.ts +2 -1
- package/dist/helpers/load-from-perssistance.d.ts.map +1 -1
- package/dist/helpers/load-from-perssistance.js +4 -3
- package/dist/helpers/load-from-perssistance.js.map +1 -1
- package/dist/plugins/index.d.ts +1 -1
- package/dist/plugins/index.js +1 -1
- package/dist/plugins/{persistance-plugin.d.ts → persistence-plugin.d.ts} +2 -8
- package/dist/plugins/persistence-plugin.d.ts.map +1 -0
- package/dist/plugins/{persistance-plugin.js → persistence-plugin.js} +4 -13
- package/dist/plugins/persistence-plugin.js.map +1 -0
- package/dist/standalone/lib/html-api.d.ts.map +1 -1
- package/dist/standalone/lib/html-api.js +60 -2
- package/dist/standalone/lib/html-api.js.map +1 -1
- package/dist/standalone.esm.d.ts +4 -0
- package/dist/standalone.esm.d.ts.map +1 -0
- package/dist/style.css +665 -470
- package/dist/vue-styles.css +661 -463
- package/package.json +21 -19
- package/dist/browser/webpack-stats.json +0 -1
- package/dist/plugins/persistance-plugin.d.ts.map +0 -1
- package/dist/plugins/persistance-plugin.js.map +0 -1
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import Badge_default from "../../../components/Badge/Badge.vue.js";
|
|
2
2
|
import Section_default from "../../../components/Section/Section.vue.js";
|
|
3
|
-
import SectionColumn_default from "../../../components/Section/SectionColumn.vue.js";
|
|
4
|
-
import SectionColumns_default from "../../../components/Section/SectionColumns.vue.js";
|
|
5
3
|
import SectionContent_default from "../../../components/Section/SectionContent.vue.js";
|
|
6
|
-
import SectionHeader_default from "../../../components/Section/SectionHeader.vue.js";
|
|
7
4
|
import SectionHeaderTag_default from "../../../components/Section/SectionHeaderTag.vue.js";
|
|
8
5
|
import Anchor_default from "../../../components/Anchor/Anchor.vue.js";
|
|
9
6
|
import { getXKeysFromObject } from "../../specification-extension/helpers.js";
|
|
@@ -31,10 +28,12 @@ import { getResolvedRef } from "@scalar/workspace-store/helpers/get-resolved-ref
|
|
|
31
28
|
var _hoisted_1 = { class: "flex flex-row justify-between gap-1" };
|
|
32
29
|
var _hoisted_2 = { class: "flex gap-1" };
|
|
33
30
|
var _hoisted_3 = { class: "flex gap-1" };
|
|
34
|
-
var _hoisted_4 = { class: "operation-
|
|
35
|
-
var _hoisted_5 = { class: "operation-
|
|
36
|
-
var _hoisted_6 = { class: "
|
|
37
|
-
var _hoisted_7 = { class: "
|
|
31
|
+
var _hoisted_4 = { class: "operation-layout" };
|
|
32
|
+
var _hoisted_5 = { class: "operation-auth" };
|
|
33
|
+
var _hoisted_6 = { class: "operation-description" };
|
|
34
|
+
var _hoisted_7 = { class: "operation-details" };
|
|
35
|
+
var _hoisted_8 = { class: "examples" };
|
|
36
|
+
var _hoisted_9 = { class: "flex" };
|
|
38
37
|
var ModernLayout_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
39
38
|
__name: "ModernLayout",
|
|
40
39
|
props: {
|
|
@@ -49,7 +48,8 @@ var ModernLayout_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ d
|
|
|
49
48
|
operation: {},
|
|
50
49
|
selectedServer: {},
|
|
51
50
|
selectedSecuritySchemes: {},
|
|
52
|
-
requiredSecurity: {}
|
|
51
|
+
requiredSecurity: {},
|
|
52
|
+
document: {}
|
|
53
53
|
},
|
|
54
54
|
setup(__props) {
|
|
55
55
|
const operationTitle = computed(() => __props.operation.summary || __props.path || "");
|
|
@@ -71,183 +71,177 @@ var ModernLayout_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ d
|
|
|
71
71
|
onIntersecting: _cache[2] || (_cache[2] = () => __props.eventBus?.emit("intersecting:nav-item", { id: __props.id }))
|
|
72
72
|
}, {
|
|
73
73
|
default: withCtx(() => [createVNode(unref(SectionContent_default), null, {
|
|
74
|
-
default: withCtx(() => [
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
74
|
+
default: withCtx(() => [createElementVNode("div", _hoisted_1, [createElementVNode("div", _hoisted_2, [
|
|
75
|
+
__props.options?.showOperationId && __props.operation.operationId ? (openBlock(), createBlock(unref(Badge_default), { key: 0 }, {
|
|
76
|
+
default: withCtx(() => [createTextVNode(toDisplayString(__props.operation.operationId), 1)]),
|
|
77
|
+
_: 1
|
|
78
|
+
})) : createCommentVNode("", true),
|
|
79
|
+
unref(getOperationStability)(__props.operation) ? (openBlock(), createBlock(unref(Badge_default), {
|
|
80
|
+
key: 1,
|
|
81
|
+
class: normalizeClass(["capitalize", unref(getOperationStabilityColor)(__props.operation)])
|
|
82
|
+
}, {
|
|
83
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(getOperationStability)(__props.operation)), 1)]),
|
|
84
|
+
_: 1
|
|
85
|
+
}, 8, ["class"])) : createCommentVNode("", true),
|
|
86
|
+
__props.isWebhook ? (openBlock(), createBlock(unref(Badge_default), {
|
|
87
|
+
key: 2,
|
|
88
|
+
class: "font-code text-green flex w-fit items-center justify-center gap-1"
|
|
89
|
+
}, {
|
|
90
|
+
default: withCtx(() => [createVNode(unref(ScalarIconWebhooksLogo), { weight: "bold" }), _cache[3] || (_cache[3] = createTextVNode("Webhook ", -1))]),
|
|
91
|
+
_: 1
|
|
92
|
+
})) : createCommentVNode("", true),
|
|
93
|
+
createVNode(unref(XBadges_default), {
|
|
94
|
+
badges: __props.operation["x-badges"],
|
|
95
|
+
position: "before"
|
|
96
|
+
}, null, 8, ["badges"])
|
|
97
|
+
]), createElementVNode("div", _hoisted_3, [createVNode(unref(XBadges_default), {
|
|
98
|
+
badges: __props.operation["x-badges"],
|
|
99
|
+
position: "after"
|
|
100
|
+
}, null, 8, ["badges"])])]), createElementVNode("div", _hoisted_4, [
|
|
101
|
+
createElementVNode("div", { class: normalizeClass(["operation-title", unref(isOperationDeprecated)(__props.operation) && "deprecated"]) }, [createVNode(unref(Anchor_default), { onCopyAnchorUrl: _cache[0] || (_cache[0] = () => __props.eventBus?.emit("copy-url:nav-item", { id: __props.id })) }, {
|
|
102
|
+
default: withCtx(() => [createVNode(unref(SectionHeaderTag_default), {
|
|
103
|
+
id: unref(labelId),
|
|
104
|
+
level: 3
|
|
83
105
|
}, {
|
|
84
|
-
default: withCtx(() => [createTextVNode(toDisplayString(
|
|
106
|
+
default: withCtx(() => [createTextVNode(toDisplayString(operationTitle.value), 1)]),
|
|
85
107
|
_: 1
|
|
86
|
-
}, 8, ["
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
108
|
+
}, 8, ["id"])]),
|
|
109
|
+
_: 1
|
|
110
|
+
})], 2),
|
|
111
|
+
createElementVNode("div", _hoisted_5, [createVNode(SecurityRequirementBadge_default, { requiredSecurity: __props.requiredSecurity }, null, 8, ["requiredSecurity"])]),
|
|
112
|
+
createElementVNode("div", _hoisted_6, [createVNode(SpecificationExtension_default, { value: operationExtensions.value }, null, 8, ["value"]), createVNode(unref(ScalarMarkdown), {
|
|
113
|
+
anchorPrefix: __props.id,
|
|
114
|
+
"aria-label": "Operation Description",
|
|
115
|
+
role: "group",
|
|
116
|
+
transformType: "heading",
|
|
117
|
+
value: __props.operation.description,
|
|
118
|
+
withAnchors: "",
|
|
119
|
+
withImages: ""
|
|
120
|
+
}, null, 8, ["anchorPrefix", "value"])]),
|
|
121
|
+
createElementVNode("div", _hoisted_7, [
|
|
122
|
+
createVNode(OperationParameters_default, {
|
|
123
|
+
selectedContentType: selectedRequestBodyContentType.value,
|
|
124
|
+
"onUpdate:selectedContentType": _cache[1] || (_cache[1] = ($event) => selectedRequestBodyContentType.value = $event),
|
|
125
|
+
breadcrumb: [__props.id],
|
|
126
|
+
document: __props.document,
|
|
127
|
+
eventBus: __props.eventBus,
|
|
128
|
+
options: __props.options,
|
|
129
|
+
parameters: __props.operation.parameters,
|
|
130
|
+
requestBody: unref(getResolvedRef)(__props.operation.requestBody)
|
|
131
|
+
}, null, 8, [
|
|
132
|
+
"selectedContentType",
|
|
133
|
+
"breadcrumb",
|
|
134
|
+
"document",
|
|
135
|
+
"eventBus",
|
|
136
|
+
"options",
|
|
137
|
+
"parameters",
|
|
138
|
+
"requestBody"
|
|
139
|
+
]),
|
|
140
|
+
createVNode(OperationResponses_default, {
|
|
141
|
+
breadcrumb: [__props.id],
|
|
142
|
+
collapsableItems: !__props.options.expandAllResponses,
|
|
143
|
+
document: __props.document,
|
|
144
|
+
eventBus: __props.eventBus,
|
|
145
|
+
options: __props.options,
|
|
146
|
+
responses: __props.operation.responses
|
|
147
|
+
}, null, 8, [
|
|
148
|
+
"breadcrumb",
|
|
149
|
+
"collapsableItems",
|
|
150
|
+
"document",
|
|
151
|
+
"eventBus",
|
|
152
|
+
"options",
|
|
153
|
+
"responses"
|
|
154
|
+
]),
|
|
155
|
+
createVNode(unref(ScalarErrorBoundary), null, {
|
|
156
|
+
default: withCtx(() => [__props.operation.callbacks ? (openBlock(), createBlock(Callbacks_default, {
|
|
157
|
+
key: 0,
|
|
158
|
+
callbacks: __props.operation.callbacks,
|
|
159
|
+
class: "mt-6",
|
|
160
|
+
document: __props.document,
|
|
161
|
+
eventBus: __props.eventBus,
|
|
162
|
+
options: __props.options,
|
|
163
|
+
path: __props.path
|
|
164
|
+
}, null, 8, [
|
|
165
|
+
"callbacks",
|
|
166
|
+
"document",
|
|
167
|
+
"eventBus",
|
|
168
|
+
"options",
|
|
169
|
+
"path"
|
|
170
|
+
])) : createCommentVNode("", true)]),
|
|
92
171
|
_: 1
|
|
93
|
-
})
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
]), createElementVNode("div", _hoisted_3, [createVNode(unref(XBadges_default), {
|
|
99
|
-
badges: __props.operation["x-badges"],
|
|
100
|
-
position: "after"
|
|
101
|
-
}, null, 8, ["badges"])])]),
|
|
102
|
-
createElementVNode("div", _hoisted_4, [createElementVNode("div", { class: normalizeClass(unref(isOperationDeprecated)(__props.operation) && "deprecated") }, [createVNode(unref(SectionHeader_default), { removeMargin: "" }, {
|
|
103
|
-
default: withCtx(() => [createVNode(unref(Anchor_default), { onCopyAnchorUrl: _cache[0] || (_cache[0] = () => __props.eventBus?.emit("copy-url:nav-item", { id: __props.id })) }, {
|
|
104
|
-
default: withCtx(() => [createVNode(unref(SectionHeaderTag_default), {
|
|
105
|
-
id: unref(labelId),
|
|
106
|
-
level: 3
|
|
107
|
-
}, {
|
|
108
|
-
default: withCtx(() => [createTextVNode(toDisplayString(operationTitle.value), 1)]),
|
|
109
|
-
_: 1
|
|
110
|
-
}, 8, ["id"])]),
|
|
172
|
+
})
|
|
173
|
+
]),
|
|
174
|
+
createElementVNode("div", _hoisted_8, [
|
|
175
|
+
__props.operation.externalDocs ? (openBlock(), createBlock(unref(LinkList_default), { key: 0 }, {
|
|
176
|
+
default: withCtx(() => [createVNode(unref(ExternalDocs_default), { value: __props.operation.externalDocs }, null, 8, ["value"])]),
|
|
111
177
|
_: 1
|
|
112
|
-
})
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
"options",
|
|
141
|
-
"parameters",
|
|
142
|
-
"requestBody"
|
|
143
|
-
]),
|
|
144
|
-
createVNode(OperationResponses_default, {
|
|
145
|
-
breadcrumb: [__props.id],
|
|
146
|
-
collapsableItems: !__props.options.expandAllResponses,
|
|
178
|
+
})) : createCommentVNode("", true),
|
|
179
|
+
createVNode(unref(ScalarErrorBoundary), null, {
|
|
180
|
+
default: withCtx(() => [(openBlock(), createBlock(unref(OperationCodeSample), {
|
|
181
|
+
key: requestBodyCompositionSelectionKey.value,
|
|
182
|
+
clientOptions: __props.clientOptions,
|
|
183
|
+
eventBus: __props.eventBus,
|
|
184
|
+
fallback: "",
|
|
185
|
+
isWebhook: __props.isWebhook,
|
|
186
|
+
method: __props.method,
|
|
187
|
+
operation: __props.operation,
|
|
188
|
+
path: __props.path,
|
|
189
|
+
requestBodyCompositionSelection: requestBodyCompositionSelectionForCodeSample.value,
|
|
190
|
+
securitySchemes: __props.selectedSecuritySchemes,
|
|
191
|
+
selectedClient: __props.selectedClient,
|
|
192
|
+
selectedContentType: selectedRequestBodyContentType.value,
|
|
193
|
+
selectedServer: __props.selectedServer
|
|
194
|
+
}, createSlots({
|
|
195
|
+
header: withCtx(() => [createVNode(OperationPath_default, {
|
|
196
|
+
class: "font-code text-c-2 [&_em]:text-c-1 min-w-0 [&_em]:not-italic",
|
|
197
|
+
deprecated: __props.operation?.deprecated,
|
|
198
|
+
path: __props.path
|
|
199
|
+
}, null, 8, ["deprecated", "path"])]),
|
|
200
|
+
_: 2
|
|
201
|
+
}, [!__props.isWebhook ? {
|
|
202
|
+
name: "footer",
|
|
203
|
+
fn: withCtx(({ exampleName }) => [createElementVNode("div", _hoisted_9, [createVNode(AskAgentButton_default), !__props.options.hideTestRequestButton ? (openBlock(), createBlock(unref(TestRequestButton_default), {
|
|
204
|
+
key: 0,
|
|
205
|
+
id: __props.id,
|
|
147
206
|
eventBus: __props.eventBus,
|
|
148
|
-
|
|
149
|
-
|
|
207
|
+
exampleName,
|
|
208
|
+
method: __props.method,
|
|
209
|
+
path: __props.path,
|
|
210
|
+
requestBodyCompositionSelection: requestBodyCompositionSelectionForCodeSample.value
|
|
150
211
|
}, null, 8, [
|
|
151
|
-
"
|
|
152
|
-
"collapsableItems",
|
|
212
|
+
"id",
|
|
153
213
|
"eventBus",
|
|
154
|
-
"
|
|
155
|
-
"
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
])]),
|
|
214
|
+
"exampleName",
|
|
215
|
+
"method",
|
|
216
|
+
"path",
|
|
217
|
+
"requestBodyCompositionSelection"
|
|
218
|
+
])) : createCommentVNode("", true)])]),
|
|
219
|
+
key: "0"
|
|
220
|
+
} : void 0]), 1032, [
|
|
221
|
+
"clientOptions",
|
|
222
|
+
"eventBus",
|
|
223
|
+
"isWebhook",
|
|
224
|
+
"method",
|
|
225
|
+
"operation",
|
|
226
|
+
"path",
|
|
227
|
+
"requestBodyCompositionSelection",
|
|
228
|
+
"securitySchemes",
|
|
229
|
+
"selectedClient",
|
|
230
|
+
"selectedContentType",
|
|
231
|
+
"selectedServer"
|
|
232
|
+
]))]),
|
|
174
233
|
_: 1
|
|
175
|
-
}),
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
default: withCtx(() => [(openBlock(), createBlock(unref(OperationCodeSample), {
|
|
183
|
-
key: requestBodyCompositionSelectionKey.value,
|
|
184
|
-
clientOptions: __props.clientOptions,
|
|
185
|
-
eventBus: __props.eventBus,
|
|
186
|
-
fallback: "",
|
|
187
|
-
isWebhook: __props.isWebhook,
|
|
188
|
-
method: __props.method,
|
|
189
|
-
operation: __props.operation,
|
|
190
|
-
path: __props.path,
|
|
191
|
-
requestBodyCompositionSelection: requestBodyCompositionSelectionForCodeSample.value,
|
|
192
|
-
securitySchemes: __props.selectedSecuritySchemes,
|
|
193
|
-
selectedClient: __props.selectedClient,
|
|
194
|
-
selectedContentType: selectedRequestBodyContentType.value,
|
|
195
|
-
selectedServer: __props.selectedServer
|
|
196
|
-
}, createSlots({
|
|
197
|
-
header: withCtx(() => [createVNode(OperationPath_default, {
|
|
198
|
-
class: "font-code text-c-2 [&_em]:text-c-1 min-w-0 [&_em]:not-italic",
|
|
199
|
-
deprecated: __props.operation?.deprecated,
|
|
200
|
-
path: __props.path
|
|
201
|
-
}, null, 8, ["deprecated", "path"])]),
|
|
202
|
-
_: 2
|
|
203
|
-
}, [!__props.isWebhook ? {
|
|
204
|
-
name: "footer",
|
|
205
|
-
fn: withCtx(({ exampleName }) => [createElementVNode("div", _hoisted_7, [createVNode(AskAgentButton_default), !__props.options.hideTestRequestButton ? (openBlock(), createBlock(unref(TestRequestButton_default), {
|
|
206
|
-
key: 0,
|
|
207
|
-
id: __props.id,
|
|
208
|
-
eventBus: __props.eventBus,
|
|
209
|
-
exampleName,
|
|
210
|
-
method: __props.method,
|
|
211
|
-
path: __props.path,
|
|
212
|
-
requestBodyCompositionSelection: requestBodyCompositionSelectionForCodeSample.value
|
|
213
|
-
}, null, 8, [
|
|
214
|
-
"id",
|
|
215
|
-
"eventBus",
|
|
216
|
-
"exampleName",
|
|
217
|
-
"method",
|
|
218
|
-
"path",
|
|
219
|
-
"requestBodyCompositionSelection"
|
|
220
|
-
])) : createCommentVNode("", true)])]),
|
|
221
|
-
key: "0"
|
|
222
|
-
} : void 0]), 1032, [
|
|
223
|
-
"clientOptions",
|
|
224
|
-
"eventBus",
|
|
225
|
-
"isWebhook",
|
|
226
|
-
"method",
|
|
227
|
-
"operation",
|
|
228
|
-
"path",
|
|
229
|
-
"requestBodyCompositionSelection",
|
|
230
|
-
"securitySchemes",
|
|
231
|
-
"selectedClient",
|
|
232
|
-
"selectedContentType",
|
|
233
|
-
"selectedServer"
|
|
234
|
-
]))]),
|
|
235
|
-
_: 1
|
|
236
|
-
}),
|
|
237
|
-
createVNode(unref(ScalarErrorBoundary), null, {
|
|
238
|
-
default: withCtx(() => [__props.operation.responses ? (openBlock(), createBlock(unref(ExampleResponses_default), {
|
|
239
|
-
key: 0,
|
|
240
|
-
responses: __props.operation.responses,
|
|
241
|
-
style: { "margin-top": "12px" }
|
|
242
|
-
}, null, 8, ["responses"])) : createCommentVNode("", true)]),
|
|
243
|
-
_: 1
|
|
244
|
-
})
|
|
245
|
-
])]),
|
|
234
|
+
}),
|
|
235
|
+
createVNode(unref(ScalarErrorBoundary), null, {
|
|
236
|
+
default: withCtx(() => [__props.operation.responses ? (openBlock(), createBlock(unref(ExampleResponses_default), {
|
|
237
|
+
key: 0,
|
|
238
|
+
responses: __props.operation.responses,
|
|
239
|
+
style: { "margin-top": "12px" }
|
|
240
|
+
}, null, 8, ["responses"])) : createCommentVNode("", true)]),
|
|
246
241
|
_: 1
|
|
247
|
-
})
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
]),
|
|
242
|
+
})
|
|
243
|
+
])
|
|
244
|
+
])]),
|
|
251
245
|
_: 1
|
|
252
246
|
})]),
|
|
253
247
|
_: 1
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModernLayout.vue.script.js","names":[],"sources":["../../../../src/features/Operation/layouts/ModernLayout.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { OperationCodeSample } from '@scalar/api-client/blocks/operation-code-sample'\nimport { ScalarErrorBoundary } from '@scalar/components/error-boundary'\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport { ScalarIconWebhooksLogo } from '@scalar/icons'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type { SecuritySchemeObjectSecret } from '@scalar/workspace-store/request-example'\nimport type {\n OperationObject,\n ServerObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed, provide, ref, useId } from 'vue'\n\nimport { Anchor } from '@/components/Anchor'\nimport { Badge } from '@/components/Badge'\nimport { LinkList } from '@/components/LinkList'\nimport OperationPath from '@/components/OperationPath.vue'\nimport {\n Section,\n SectionColumn,\n SectionColumns,\n SectionContent,\n SectionHeader,\n SectionHeaderTag,\n} from '@/components/Section'\nimport AskAgentButton from '@/features/ask-agent-button/AskAgentButton.vue'\nimport { ExampleResponses } from '@/features/example-responses'\nimport { ExternalDocs } from '@/features/external-docs'\nimport Callbacks from '@/features/Operation/components/callbacks/Callbacks.vue'\nimport OperationParameters from '@/features/Operation/components/OperationParameters.vue'\nimport OperationResponses from '@/features/Operation/components/OperationResponses.vue'\nimport SecurityRequirementBadge from '@/features/Operation/components/SecurityRequirementBadge.vue'\nimport type { RequiredSecurity } from '@/features/Operation/helpers/get-required-security'\nimport {\n getOperationStability,\n getOperationStabilityColor,\n isOperationDeprecated,\n} from '@/features/Operation/helpers/operation-stability'\nimport type { OperationProps } from '@/features/Operation/Operation.vue'\nimport {\n REQUEST_BODY_COMPOSITION_INDEX_SYMBOL,\n type RequestBodyCompositionSelection,\n} from '@/features/Operation/request-body-composition-index'\nimport { getXKeysFromObject } from '@/features/specification-extension'\nimport SpecificationExtension from '@/features/specification-extension/SpecificationExtension.vue'\nimport { TestRequestButton } from '@/features/test-request-button'\nimport { XBadges } from '@/features/x-badges'\n\nconst {\n clientOptions,\n eventBus,\n isWebhook,\n method,\n operation,\n options,\n path,\n requiredSecurity,\n selectedServer,\n selectedSecuritySchemes,\n selectedClient,\n} = defineProps<\n Omit<\n OperationProps,\n | 'document'\n | 'pathValue'\n | 'server'\n | 'isCollapsed'\n | 'securitySchemes'\n | 'authStore'\n > & {\n /** Operation object with path params */\n operation: OperationObject\n /** The selected server for the operation */\n selectedServer: ServerObject | null\n /** The selected security schemes for the operation */\n selectedSecuritySchemes: SecuritySchemeObjectSecret[]\n /** Required/optional security state for the badge next to the path */\n requiredSecurity: RequiredSecurity\n }\n>()\n\nconst operationTitle = computed(() => operation.summary || path || '')\n\nconst labelId = useId()\n\nconst operationExtensions = computed(() => getXKeysFromObject(operation))\n\n/** Track the selected request body content type so the code sample stays in sync */\nconst selectedRequestBodyContentType = ref<string | undefined>()\n\n/** Selected request body oneOf/anyOf variants; synced with schema dropdowns and code sample */\nconst requestBodyCompositionSelection = ref<RequestBodyCompositionSelection>({})\n\nconst requestBodyCompositionSelectionForCodeSample = computed(\n (): RequestBodyCompositionSelection => ({\n ...requestBodyCompositionSelection.value,\n }),\n)\n\nconst requestBodyCompositionSelectionKey = computed(() =>\n JSON.stringify(requestBodyCompositionSelectionForCodeSample.value),\n)\n\nprovide(REQUEST_BODY_COMPOSITION_INDEX_SYMBOL, requestBodyCompositionSelection)\n</script>\n\n<template>\n <Section\n :id=\"id\"\n :aria-labelledby=\"labelId\"\n :label=\"operationTitle\"\n tabindex=\"-1\"\n @intersecting=\"() => eventBus?.emit('intersecting:nav-item', { id })\">\n <SectionContent>\n <!-- Badges -->\n <div class=\"flex flex-row justify-between gap-1\">\n <!-- Left -->\n <div class=\"flex gap-1\">\n <!-- Operation ID -->\n <Badge v-if=\"options?.showOperationId && operation.operationId\">\n {{ operation.operationId }}\n </Badge>\n <!-- Stability badge -->\n <Badge\n v-if=\"getOperationStability(operation)\"\n class=\"capitalize\"\n :class=\"getOperationStabilityColor(operation)\">\n {{ getOperationStability(operation) }}\n </Badge>\n <!-- Webhook badge -->\n <Badge\n v-if=\"isWebhook\"\n class=\"font-code text-green flex w-fit items-center justify-center gap-1\">\n <ScalarIconWebhooksLogo weight=\"bold\" />Webhook\n </Badge>\n <!-- x-badges before -->\n <XBadges\n :badges=\"operation['x-badges']\"\n position=\"before\" />\n </div>\n <!-- Right -->\n <div class=\"flex gap-1\">\n <!-- x-badges after -->\n <XBadges\n :badges=\"operation['x-badges']\"\n position=\"after\" />\n </div>\n </div>\n <div class=\"operation-header\">\n <div :class=\"isOperationDeprecated(operation) && 'deprecated'\">\n <SectionHeader removeMargin>\n <Anchor\n @copyAnchorUrl=\"\n () => eventBus?.emit('copy-url:nav-item', { id })\n \">\n <SectionHeaderTag\n :id=\"labelId\"\n :level=\"3\">\n {{ operationTitle }}\n </SectionHeaderTag>\n </Anchor>\n </SectionHeader>\n </div>\n\n <!-- Required auth badge -->\n <SecurityRequirementBadge :requiredSecurity />\n </div>\n\n <SectionColumns>\n <SectionColumn>\n <div class=\"operation-details\">\n <SpecificationExtension :value=\"operationExtensions\" />\n <ScalarMarkdown\n :anchorPrefix=\"id\"\n aria-label=\"Operation Description\"\n role=\"group\"\n transformType=\"heading\"\n :value=\"operation.description\"\n withAnchors\n withImages />\n <OperationParameters\n v-model:selectedContentType=\"selectedRequestBodyContentType\"\n :breadcrumb=\"[id]\"\n :eventBus\n :options\n :parameters=\"operation.parameters\"\n :requestBody=\"getResolvedRef(operation.requestBody)\" />\n <OperationResponses\n :breadcrumb=\"[id]\"\n :collapsableItems=\"!options.expandAllResponses\"\n :eventBus\n :options\n :responses=\"operation.responses\" />\n\n <!-- Callbacks -->\n <ScalarErrorBoundary>\n <Callbacks\n v-if=\"operation.callbacks\"\n :callbacks=\"operation.callbacks\"\n class=\"mt-6\"\n :eventBus\n :options\n :path />\n </ScalarErrorBoundary>\n </div>\n </SectionColumn>\n <SectionColumn>\n <div class=\"examples\">\n <!-- External Docs -->\n <LinkList v-if=\"operation.externalDocs\">\n <ExternalDocs :value=\"operation.externalDocs\" />\n </LinkList>\n\n <!-- New Example Request -->\n <ScalarErrorBoundary>\n <OperationCodeSample\n :key=\"requestBodyCompositionSelectionKey\"\n :clientOptions\n :eventBus\n fallback\n :isWebhook\n :method\n :operation\n :path\n :requestBodyCompositionSelection=\"\n requestBodyCompositionSelectionForCodeSample\n \"\n :securitySchemes=\"selectedSecuritySchemes\"\n :selectedClient\n :selectedContentType=\"selectedRequestBodyContentType\"\n :selectedServer>\n <template #header>\n <OperationPath\n class=\"font-code text-c-2 [&_em]:text-c-1 min-w-0 [&_em]:not-italic\"\n :deprecated=\"operation?.deprecated\"\n :path=\"path\" />\n </template>\n <template\n v-if=\"!isWebhook\"\n #footer=\"{ exampleName }\">\n <div class=\"flex\">\n <AskAgentButton />\n <TestRequestButton\n v-if=\"!options.hideTestRequestButton\"\n :id\n :eventBus\n :exampleName\n :method\n :path\n :requestBodyCompositionSelection=\"\n requestBodyCompositionSelectionForCodeSample\n \" />\n </div>\n </template>\n </OperationCodeSample>\n </ScalarErrorBoundary>\n\n <ScalarErrorBoundary>\n <ExampleResponses\n v-if=\"operation.responses\"\n :responses=\"operation.responses\"\n style=\"margin-top: 12px\" />\n </ScalarErrorBoundary>\n </div>\n </SectionColumn>\n </SectionColumns>\n </SectionContent>\n </Section>\n</template>\n\n<style scoped>\n.examples {\n position: sticky;\n top: calc(var(--refs-viewport-offset) + 24px);\n}\n\n.examples > * {\n max-height: calc((var(--refs-viewport-height) - 60px) / 2);\n position: relative;\n}\n\n.examples > *:first-of-type:last-of-type {\n max-height: calc((var(--refs-viewport-height) - 60px));\n}\n\n/*\n * Don't constrain card height on mobile\n * (or zoomed in screens)\n */\n@media (max-width: 600px) {\n .examples > * {\n max-height: unset;\n }\n}\n.deprecated * {\n text-decoration: line-through;\n}\n\n.operation-header {\n margin-bottom: 12px;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n justify-content: space-between;\n gap: 4px;\n\n @media (min-width: 600px) {\n flex-direction: row;\n align-items: center;\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;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,QAAA,YAAA;iBACN;wBAaK,EAbK,kBAAW,CACtB,mBAYM,OAZN,YAYM,CAXJ,YAAkB,uBAAA,EAAA,CAET,QAAA,QAAQ,yBAAA,WAAA,EADjB,YASM,MAAA,0BAAA,EAAA;;YAPH,IAAA,QAAA;YACA,UAAA,QAAA;YACA;YACA,QAAA,QAAA;YACA,MAAA,QAAA;YACA,iCAA0D,6CAAA;;;;;;;;;;;;;;;;;;;;;;;;;SAQrE,YAKsB,MAAA,oBAAA,EAAA,MAAA;kCAHZ,QAAA,UAAU,aAAA,WAAA,EADlB,YAG6B,MAAA,yBAAA,EAAA;;WAD1B,WAAW,QAAA,UAAU;WACtB,OAAA,EAAA,cAAA,QAAwB"}
|
|
1
|
+
{"version":3,"file":"ModernLayout.vue.script.js","names":[],"sources":["../../../../src/features/Operation/layouts/ModernLayout.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { OperationCodeSample } from '@scalar/api-client/blocks/operation-code-sample'\nimport { ScalarErrorBoundary } from '@scalar/components/error-boundary'\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport { ScalarIconWebhooksLogo } from '@scalar/icons'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type { SecuritySchemeObjectSecret } from '@scalar/workspace-store/request-example'\nimport type {\n OpenApiDocument,\n OperationObject,\n ServerObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed, provide, ref, useId } from 'vue'\n\nimport { Anchor } from '@/components/Anchor'\nimport { Badge } from '@/components/Badge'\nimport { LinkList } from '@/components/LinkList'\nimport OperationPath from '@/components/OperationPath.vue'\nimport { Section, SectionContent, SectionHeaderTag } from '@/components/Section'\nimport AskAgentButton from '@/features/ask-agent-button/AskAgentButton.vue'\nimport { ExampleResponses } from '@/features/example-responses'\nimport { ExternalDocs } from '@/features/external-docs'\nimport Callbacks from '@/features/Operation/components/callbacks/Callbacks.vue'\nimport OperationParameters from '@/features/Operation/components/OperationParameters.vue'\nimport OperationResponses from '@/features/Operation/components/OperationResponses.vue'\nimport SecurityRequirementBadge from '@/features/Operation/components/SecurityRequirementBadge.vue'\nimport type { RequiredSecurity } from '@/features/Operation/helpers/get-required-security'\nimport {\n getOperationStability,\n getOperationStabilityColor,\n isOperationDeprecated,\n} from '@/features/Operation/helpers/operation-stability'\nimport type { OperationProps } from '@/features/Operation/Operation.vue'\nimport {\n REQUEST_BODY_COMPOSITION_INDEX_SYMBOL,\n type RequestBodyCompositionSelection,\n} from '@/features/Operation/request-body-composition-index'\nimport { getXKeysFromObject } from '@/features/specification-extension'\nimport SpecificationExtension from '@/features/specification-extension/SpecificationExtension.vue'\nimport { TestRequestButton } from '@/features/test-request-button'\nimport { XBadges } from '@/features/x-badges'\n\nconst {\n clientOptions,\n document,\n eventBus,\n isWebhook,\n method,\n operation,\n options,\n path,\n requiredSecurity,\n selectedServer,\n selectedSecuritySchemes,\n selectedClient,\n} = defineProps<\n Omit<\n OperationProps,\n | 'document'\n | 'pathValue'\n | 'server'\n | 'isCollapsed'\n | 'securitySchemes'\n | 'authStore'\n > & {\n /** Operation object with path params */\n operation: OperationObject\n /** The selected server for the operation */\n selectedServer: ServerObject | null\n /** The selected security schemes for the operation */\n selectedSecuritySchemes: SecuritySchemeObjectSecret[]\n /** Required/optional security state for the badge next to the path */\n requiredSecurity: RequiredSecurity\n /** The document the operation belongs to, used to resolve schema references for display */\n document?: OpenApiDocument\n }\n>()\n\nconst operationTitle = computed(() => operation.summary || path || '')\n\nconst labelId = useId()\n\nconst operationExtensions = computed(() => getXKeysFromObject(operation))\n\n/** Track the selected request body content type so the code sample stays in sync */\nconst selectedRequestBodyContentType = ref<string | undefined>()\n\n/** Selected request body oneOf/anyOf variants; synced with schema dropdowns and code sample */\nconst requestBodyCompositionSelection = ref<RequestBodyCompositionSelection>({})\n\nconst requestBodyCompositionSelectionForCodeSample = computed(\n (): RequestBodyCompositionSelection => ({\n ...requestBodyCompositionSelection.value,\n }),\n)\n\nconst requestBodyCompositionSelectionKey = computed(() =>\n JSON.stringify(requestBodyCompositionSelectionForCodeSample.value),\n)\n\nprovide(REQUEST_BODY_COMPOSITION_INDEX_SYMBOL, requestBodyCompositionSelection)\n</script>\n\n<template>\n <Section\n :id=\"id\"\n :aria-labelledby=\"labelId\"\n :label=\"operationTitle\"\n tabindex=\"-1\"\n @intersecting=\"() => eventBus?.emit('intersecting:nav-item', { id })\">\n <SectionContent>\n <!-- Badges -->\n <div class=\"flex flex-row justify-between gap-1\">\n <!-- Left -->\n <div class=\"flex gap-1\">\n <!-- Operation ID -->\n <Badge v-if=\"options?.showOperationId && operation.operationId\">\n {{ operation.operationId }}\n </Badge>\n <!-- Stability badge -->\n <Badge\n v-if=\"getOperationStability(operation)\"\n class=\"capitalize\"\n :class=\"getOperationStabilityColor(operation)\">\n {{ getOperationStability(operation) }}\n </Badge>\n <!-- Webhook badge -->\n <Badge\n v-if=\"isWebhook\"\n class=\"font-code text-green flex w-fit items-center justify-center gap-1\">\n <ScalarIconWebhooksLogo weight=\"bold\" />Webhook\n </Badge>\n <!-- x-badges before -->\n <XBadges\n :badges=\"operation['x-badges']\"\n position=\"before\" />\n </div>\n <!-- Right -->\n <div class=\"flex gap-1\">\n <!-- x-badges after -->\n <XBadges\n :badges=\"operation['x-badges']\"\n position=\"after\" />\n </div>\n </div>\n <div class=\"operation-layout\">\n <!-- Title -->\n <div\n class=\"operation-title\"\n :class=\"isOperationDeprecated(operation) && 'deprecated'\">\n <Anchor\n @copyAnchorUrl=\"() => eventBus?.emit('copy-url:nav-item', { id })\">\n <SectionHeaderTag\n :id=\"labelId\"\n :level=\"3\">\n {{ operationTitle }}\n </SectionHeaderTag>\n </Anchor>\n </div>\n\n <!-- Required auth badge -->\n <div class=\"operation-auth\">\n <SecurityRequirementBadge :requiredSecurity />\n </div>\n\n <!-- Description -->\n <div class=\"operation-description\">\n <SpecificationExtension :value=\"operationExtensions\" />\n <ScalarMarkdown\n :anchorPrefix=\"id\"\n aria-label=\"Operation Description\"\n role=\"group\"\n transformType=\"heading\"\n :value=\"operation.description\"\n withAnchors\n withImages />\n </div>\n\n <!--\n Parameters, request body, responses and callbacks.\n\n This block is kept before the examples in source order on purpose: the\n request body schema (via SchemaComposition) seeds the shared\n requestBodyCompositionSelection on mount, which drives the\n OperationCodeSample's :key. Mounting the details first means the code\n sample reads the final key on its first render and is never remounted —\n a remount would reset the selected client and tear down an open client\n picker. The grid (see grid-template-areas below) still paints the\n examples on the right, independent of this source order.\n -->\n <div class=\"operation-details\">\n <OperationParameters\n v-model:selectedContentType=\"selectedRequestBodyContentType\"\n :breadcrumb=\"[id]\"\n :document\n :eventBus\n :options\n :parameters=\"operation.parameters\"\n :requestBody=\"getResolvedRef(operation.requestBody)\" />\n <OperationResponses\n :breadcrumb=\"[id]\"\n :collapsableItems=\"!options.expandAllResponses\"\n :document\n :eventBus\n :options\n :responses=\"operation.responses\" />\n\n <!-- Callbacks -->\n <ScalarErrorBoundary>\n <Callbacks\n v-if=\"operation.callbacks\"\n :callbacks=\"operation.callbacks\"\n class=\"mt-6\"\n :document\n :eventBus\n :options\n :path />\n </ScalarErrorBoundary>\n </div>\n\n <!-- Example request and responses -->\n <div class=\"examples\">\n <!-- External Docs -->\n <LinkList v-if=\"operation.externalDocs\">\n <ExternalDocs :value=\"operation.externalDocs\" />\n </LinkList>\n\n <!-- New Example Request -->\n <ScalarErrorBoundary>\n <OperationCodeSample\n :key=\"requestBodyCompositionSelectionKey\"\n :clientOptions\n :eventBus\n fallback\n :isWebhook\n :method\n :operation\n :path\n :requestBodyCompositionSelection=\"\n requestBodyCompositionSelectionForCodeSample\n \"\n :securitySchemes=\"selectedSecuritySchemes\"\n :selectedClient\n :selectedContentType=\"selectedRequestBodyContentType\"\n :selectedServer>\n <template #header>\n <OperationPath\n class=\"font-code text-c-2 [&_em]:text-c-1 min-w-0 [&_em]:not-italic\"\n :deprecated=\"operation?.deprecated\"\n :path=\"path\" />\n </template>\n <template\n v-if=\"!isWebhook\"\n #footer=\"{ exampleName }\">\n <div class=\"flex\">\n <AskAgentButton />\n <TestRequestButton\n v-if=\"!options.hideTestRequestButton\"\n :id\n :eventBus\n :exampleName\n :method\n :path\n :requestBodyCompositionSelection=\"\n requestBodyCompositionSelectionForCodeSample\n \" />\n </div>\n </template>\n </OperationCodeSample>\n </ScalarErrorBoundary>\n\n <ScalarErrorBoundary>\n <ExampleResponses\n v-if=\"operation.responses\"\n :responses=\"operation.responses\"\n style=\"margin-top: 12px\" />\n </ScalarErrorBoundary>\n </div>\n </div>\n </SectionContent>\n </Section>\n</template>\n\n<style scoped>\n/*\n * The operation is a single grid so the request example can sit beside the\n * details on wide screens, then be lifted directly under the description when\n * the layout collapses (see the container query below). Vertical rhythm comes\n * from element margins rather than row-gap, because the details block carries\n * its own leading margin (mt-6) that already spaces it from whatever precedes\n * it — a row-gap would double that gap.\n */\n.operation-layout {\n display: grid;\n grid-template-columns: 1fr 1fr;\n grid-template-areas:\n 'heading badge'\n 'description examples'\n 'details examples';\n column-gap: 48px;\n row-gap: 0;\n}\n\n.operation-title {\n grid-area: heading;\n margin-bottom: 12px;\n\n /* Mirror the shared section header typography (see SectionHeader.vue) */\n font-size: var(--font-size, var(--scalar-heading-1));\n font-weight: var(--font-weight, var(--scalar-bold));\n color: var(--scalar-color-1);\n line-height: 1.45;\n}\n\n.operation-auth {\n grid-area: badge;\n justify-self: end;\n align-self: start;\n}\n\n.operation-description {\n grid-area: description;\n min-width: 0;\n}\n\n.operation-details {\n grid-area: details;\n min-width: 0;\n}\n\n.examples {\n grid-area: examples;\n min-width: 0;\n\n position: sticky;\n top: calc(var(--refs-viewport-offset) + 24px);\n}\n\n.examples > * {\n max-height: calc((var(--refs-viewport-height) - 60px) / 2);\n position: relative;\n}\n\n.examples > *:first-of-type:last-of-type {\n max-height: calc((var(--refs-viewport-height) - 60px));\n}\n\n/*\n * Don't constrain card height on mobile\n * (or zoomed in screens)\n */\n@media (max-width: 600px) {\n .examples > * {\n max-height: unset;\n }\n}\n\n.deprecated * {\n text-decoration: line-through;\n}\n\n/*\n * On narrow containers the layout collapses to a single column: the request\n * example is lifted directly under the description, and the auth badge becomes\n * an eyebrow above the title.\n */\n@container narrow-references-container (max-width: 900px) {\n .operation-layout {\n grid-template-columns: 1fr;\n grid-template-areas:\n 'badge'\n 'heading'\n 'description'\n 'examples'\n 'details';\n column-gap: 0;\n }\n\n .operation-auth {\n justify-self: start;\n margin-bottom: 4px;\n }\n\n .operation-title {\n margin-bottom: 24px;\n }\n\n .operation-description {\n margin-bottom: 24px;\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8EA,MAAM,iBAAiB,eAAe,QAAA,UAAU,WAAW,QAAA,QAAQ,GAAE;EAErE,MAAM,UAAU,OAAM;EAEtB,MAAM,sBAAsB,eAAe,mBAAmB,QAAA,UAAU,CAAA;;EAGxE,MAAM,iCAAiC,KAAwB;;EAG/D,MAAM,kCAAkC,IAAqC,EAAE,CAAA;EAE/E,MAAM,+CAA+C,gBACX,EACtC,GAAG,gCAAgC,OACpC,EACH;EAEA,MAAM,qCAAqC,eACzC,KAAK,UAAU,6CAA6C,MAAM,CACpE;AAEA,UAAQ,uCAAuC,gCAA+B;;uBAI5E,YAgLU,MAAA,gBAAA,EAAA;IA/KP,IAAI,QAAA;IACJ,mBAAiB,MAAA,QAAO;IACxB,OAAO,eAAA;IACR,UAAS;IACR,gBAAY,OAAA,OAAA,OAAA,WAAQ,QAAA,UAAU,KAAI,yBAAA,EAAA,IAA4B,QAAA,IAAE,CAAA;;2BA0KhD,CAzKjB,YAyKiB,MAAA,uBAAA,EAAA,MAAA;4BAvIT,CAhCN,mBAgCM,OAhCN,YAgCM,CA9BJ,mBAsBM,OAtBN,YAsBM;MApBS,QAAA,SAAS,mBAAmB,QAAA,UAAU,eAAA,WAAA,EAAnD,YAEQ,MAAA,cAAA,EAAA,EAAA,KAAA,GAAA,EAAA;8BADqB,CAAA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A,QAAA;SACA,UAAA,QAAA;SACD,UAAA;SACC,WAAA,QAAA;SACA,QAAA,QAAA;SACA,WAAA,QAAA;SACA,MAAA,QAAA;SACA,iCAAkD,6CAAA;SAGlD,iBAAiB,QAAA;SACjB,gBAAA,QAAA;SACA,qBAAqB,+BAAA;SACrB,gBAAA,QAAA;;SACU,QAAM,cAIE,CAHjB,YAGiB,uBAAA;UAFf,OAAM;UACL,YAAY,QAAA,WAAW;UACvB,MAAM,QAAA;;;aAGF,QAAA,YAAA;eACN;sBAaK,EAbK,kBAAW,CACtB,mBAYM,OAZN,YAYM,CAXJ,YAAkB,uBAAA,EAAA,CAET,QAAA,QAAQ,yBAAA,WAAA,EADjB,YASM,MAAA,0BAAA,EAAA;;UAPH,IAAA,QAAA;UACA,UAAA,QAAA;UACA;UACA,QAAA,QAAA;UACA,MAAA,QAAA;UACA,iCAAwD,6CAAA;;;;;;;;;;;;;;;;;;;;;;;;;OAQnE,YAKsB,MAAA,oBAAA,EAAA,MAAA;gCAHZ,QAAA,UAAU,aAAA,WAAA,EADlB,YAG6B,MAAA,yBAAA,EAAA;;SAD1B,WAAW,QAAA,UAAU;SACtB,OAAA,EAAA,cAAA,QAAwB"}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
import { type ModelsSectionLabel } from '@scalar/types/api-reference';
|
|
2
|
+
import type { AsyncApiDocument } from '@scalar/types/asyncapi/3.1';
|
|
1
3
|
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
2
4
|
import type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
3
5
|
type __VLS_Props = {
|
|
4
6
|
forceIcon?: boolean;
|
|
5
7
|
searchHotKey?: string;
|
|
6
8
|
hideModels?: boolean;
|
|
7
|
-
|
|
9
|
+
modelsSectionLabel?: ModelsSectionLabel;
|
|
10
|
+
document?: OpenApiDocument | AsyncApiDocument;
|
|
8
11
|
eventBus: WorkspaceEventBus;
|
|
9
12
|
};
|
|
10
13
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchButton.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Search/components/SearchButton.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SearchButton.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Search/components/SearchButton.vue"],"names":[],"mappings":"AA4HA,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,6BAA6B,CAAA;AACpC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAClE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAKnG,KAAK,WAAW,GAAG;IACjB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,kBAAkB,CAAC,EAAE,kBAAkB,CAAA;IACvC,QAAQ,CAAC,EAAE,eAAe,GAAG,gBAAgB,CAAA;IAC7C,QAAQ,EAAE,iBAAiB,CAAA;CAC5B,CAAC;AAuLF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchButton.vue.js","names":[],"sources":["../../../../src/features/Search/components/SearchButton.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarIconButton } from '@scalar/components/icon-button'\nimport { useModal } from '@scalar/components/modal'\nimport { ScalarSidebarSearchButton } from '@scalar/components/sidebar'\nimport { isMacOS } from '@scalar/helpers/general/is-mac-os'\nimport { ScalarIconMagnifyingGlass } from '@scalar/icons'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue'\n\nimport SearchModal from './SearchModal.vue'\n\nconst {
|
|
1
|
+
{"version":3,"file":"SearchButton.vue.js","names":[],"sources":["../../../../src/features/Search/components/SearchButton.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarIconButton } from '@scalar/components/icon-button'\nimport { useModal } from '@scalar/components/modal'\nimport { ScalarSidebarSearchButton } from '@scalar/components/sidebar'\nimport { isMacOS } from '@scalar/helpers/general/is-mac-os'\nimport { ScalarIconMagnifyingGlass } from '@scalar/icons'\nimport {\n DEFAULT_MODELS_SECTION_LABEL,\n type ModelsSectionLabel,\n} from '@scalar/types/api-reference'\nimport type { AsyncApiDocument } from '@scalar/types/asyncapi/3.1'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue'\n\nimport SearchModal from './SearchModal.vue'\n\nconst {\n searchHotKey = 'k',\n modelsSectionLabel = DEFAULT_MODELS_SECTION_LABEL,\n} = defineProps<{\n forceIcon?: boolean\n searchHotKey?: string\n hideModels?: boolean\n modelsSectionLabel?: ModelsSectionLabel\n document?: OpenApiDocument | AsyncApiDocument\n eventBus: WorkspaceEventBus\n}>()\n\nconst button = ref<InstanceType<typeof ScalarSidebarSearchButton>>()\nconst modalState = useModal()\n\n/**\n * Whether the user is on macOS, used to show the correct shortcut symbol.\n *\n * This must default to `false` so the server-rendered markup and the first\n * client render agree. Detecting the platform relies on `navigator`, which is\n * unavailable during SSR, so we resolve it after mount to avoid a hydration\n * mismatch.\n */\nconst isMac = ref(false)\nonMounted(() => {\n isMac.value = isMacOS()\n})\n\nconst handleHotKey = (e: KeyboardEvent) => {\n if ((isMacOS() ? e.metaKey : e.ctrlKey) && e.key === searchHotKey) {\n e.preventDefault()\n e.stopPropagation()\n\n if (modalState.open) {\n modalState.hide()\n } else {\n modalState.show()\n }\n }\n}\n\nwatch(\n () => modalState.open,\n async (next, prev) => {\n // Return focus to the button when the modal is closed\n if (!next && prev) {\n await nextTick()\n button.value?.$el.focus()\n }\n },\n)\n\n// Handle keyboard shortcuts\n// TODO: we can move this to the hotkey event bus but we would need to set up a custom key from the searchHotKey config\n// and make sure it works correctly inside the references first\nonMounted(() => window.addEventListener('keydown', handleHotKey))\nonBeforeUnmount(() => window.removeEventListener('keydown', handleHotKey))\n\nfunction handleClick() {\n modalState.show()\n}\n</script>\n<template>\n <ScalarIconButton\n v-if=\"forceIcon\"\n :icon=\"ScalarIconMagnifyingGlass\"\n label=\"Search\"\n @click=\"handleClick\" />\n <ScalarSidebarSearchButton\n v-else\n ref=\"button\"\n class=\"w-full\"\n :class=\"$attrs.class\"\n @click=\"handleClick\">\n <span class=\"sr-only\">Open Search</span>\n <span\n aria-hidden=\"true\"\n class=\"sidebar-search-placeholder\">\n Search\n </span>\n <template #shortcut>\n <template v-if=\"isMac\">\n <span class=\"sr-only\">Command</span>\n <span aria-hidden=\"true\">⌘</span>\n </template>\n <template v-else>\n <span class=\"sr-only\">CTRL</span>\n <span aria-hidden=\"true\">⌃</span>\n </template>\n {{ searchHotKey }}\n </template>\n </ScalarSidebarSearchButton>\n\n <SearchModal\n :document\n :eventBus=\"eventBus\"\n :modalState=\"modalState\"\n :modelsSectionLabel=\"modelsSectionLabel\" />\n</template>\n"],"mappings":""}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import SearchModal_default from "./SearchModal.vue.js";
|
|
2
2
|
import { Fragment, createBlock, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, nextTick, normalizeClass, onBeforeUnmount, onMounted, openBlock, ref, toDisplayString, unref, watch, withCtx } from "vue";
|
|
3
3
|
import { ScalarSidebarSearchButton } from "@scalar/components/sidebar";
|
|
4
|
+
import { DEFAULT_MODELS_SECTION_LABEL } from "@scalar/types/api-reference";
|
|
4
5
|
import { ScalarIconMagnifyingGlass } from "@scalar/icons";
|
|
5
6
|
import { ScalarIconButton } from "@scalar/components/icon-button";
|
|
6
7
|
import { useModal } from "@scalar/components/modal";
|
|
@@ -11,16 +12,26 @@ var SearchButton_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ d
|
|
|
11
12
|
props: {
|
|
12
13
|
forceIcon: { type: Boolean },
|
|
13
14
|
searchHotKey: { default: "k" },
|
|
14
|
-
hideModels: {
|
|
15
|
-
|
|
16
|
-
default: false
|
|
17
|
-
},
|
|
15
|
+
hideModels: { type: Boolean },
|
|
16
|
+
modelsSectionLabel: { default: () => DEFAULT_MODELS_SECTION_LABEL },
|
|
18
17
|
document: {},
|
|
19
18
|
eventBus: {}
|
|
20
19
|
},
|
|
21
20
|
setup(__props) {
|
|
22
21
|
const button = ref();
|
|
23
22
|
const modalState = useModal();
|
|
23
|
+
/**
|
|
24
|
+
* Whether the user is on macOS, used to show the correct shortcut symbol.
|
|
25
|
+
*
|
|
26
|
+
* This must default to `false` so the server-rendered markup and the first
|
|
27
|
+
* client render agree. Detecting the platform relies on `navigator`, which is
|
|
28
|
+
* unavailable during SSR, so we resolve it after mount to avoid a hydration
|
|
29
|
+
* mismatch.
|
|
30
|
+
*/
|
|
31
|
+
const isMac = ref(false);
|
|
32
|
+
onMounted(() => {
|
|
33
|
+
isMac.value = isMacOS();
|
|
34
|
+
});
|
|
24
35
|
const handleHotKey = (e) => {
|
|
25
36
|
if ((isMacOS() ? e.metaKey : e.ctrlKey) && e.key === __props.searchHotKey) {
|
|
26
37
|
e.preventDefault();
|
|
@@ -53,7 +64,7 @@ var SearchButton_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ d
|
|
|
53
64
|
class: normalizeClass(["w-full", _ctx.$attrs.class]),
|
|
54
65
|
onClick: handleClick
|
|
55
66
|
}, {
|
|
56
|
-
shortcut: withCtx(() => [
|
|
67
|
+
shortcut: withCtx(() => [isMac.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [_cache[0] || (_cache[0] = createElementVNode("span", { class: "sr-only" }, "Command", -1)), _cache[1] || (_cache[1] = createElementVNode("span", { "aria-hidden": "true" }, "⌘", -1))], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [_cache[2] || (_cache[2] = createElementVNode("span", { class: "sr-only" }, "CTRL", -1)), _cache[3] || (_cache[3] = createElementVNode("span", { "aria-hidden": "true" }, "⌃", -1))], 64)), createTextVNode(" " + toDisplayString(__props.searchHotKey), 1)]),
|
|
57
68
|
default: withCtx(() => [_cache[4] || (_cache[4] = createElementVNode("span", { class: "sr-only" }, "Open Search", -1)), _cache[5] || (_cache[5] = createElementVNode("span", {
|
|
58
69
|
"aria-hidden": "true",
|
|
59
70
|
class: "sidebar-search-placeholder"
|
|
@@ -62,13 +73,13 @@ var SearchButton_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ d
|
|
|
62
73
|
}, 8, ["class"])), createVNode(SearchModal_default, {
|
|
63
74
|
document: __props.document,
|
|
64
75
|
eventBus: __props.eventBus,
|
|
65
|
-
|
|
66
|
-
|
|
76
|
+
modalState: unref(modalState),
|
|
77
|
+
modelsSectionLabel: __props.modelsSectionLabel
|
|
67
78
|
}, null, 8, [
|
|
68
79
|
"document",
|
|
69
80
|
"eventBus",
|
|
70
|
-
"
|
|
71
|
-
"
|
|
81
|
+
"modalState",
|
|
82
|
+
"modelsSectionLabel"
|
|
72
83
|
])], 64);
|
|
73
84
|
};
|
|
74
85
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchButton.vue.script.js","names":["$attrs"],"sources":["../../../../src/features/Search/components/SearchButton.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarIconButton } from '@scalar/components/icon-button'\nimport { useModal } from '@scalar/components/modal'\nimport { ScalarSidebarSearchButton } from '@scalar/components/sidebar'\nimport { isMacOS } from '@scalar/helpers/general/is-mac-os'\nimport { ScalarIconMagnifyingGlass } from '@scalar/icons'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue'\n\nimport SearchModal from './SearchModal.vue'\n\nconst {
|
|
1
|
+
{"version":3,"file":"SearchButton.vue.script.js","names":["$attrs"],"sources":["../../../../src/features/Search/components/SearchButton.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarIconButton } from '@scalar/components/icon-button'\nimport { useModal } from '@scalar/components/modal'\nimport { ScalarSidebarSearchButton } from '@scalar/components/sidebar'\nimport { isMacOS } from '@scalar/helpers/general/is-mac-os'\nimport { ScalarIconMagnifyingGlass } from '@scalar/icons'\nimport {\n DEFAULT_MODELS_SECTION_LABEL,\n type ModelsSectionLabel,\n} from '@scalar/types/api-reference'\nimport type { AsyncApiDocument } from '@scalar/types/asyncapi/3.1'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue'\n\nimport SearchModal from './SearchModal.vue'\n\nconst {\n searchHotKey = 'k',\n modelsSectionLabel = DEFAULT_MODELS_SECTION_LABEL,\n} = defineProps<{\n forceIcon?: boolean\n searchHotKey?: string\n hideModels?: boolean\n modelsSectionLabel?: ModelsSectionLabel\n document?: OpenApiDocument | AsyncApiDocument\n eventBus: WorkspaceEventBus\n}>()\n\nconst button = ref<InstanceType<typeof ScalarSidebarSearchButton>>()\nconst modalState = useModal()\n\n/**\n * Whether the user is on macOS, used to show the correct shortcut symbol.\n *\n * This must default to `false` so the server-rendered markup and the first\n * client render agree. Detecting the platform relies on `navigator`, which is\n * unavailable during SSR, so we resolve it after mount to avoid a hydration\n * mismatch.\n */\nconst isMac = ref(false)\nonMounted(() => {\n isMac.value = isMacOS()\n})\n\nconst handleHotKey = (e: KeyboardEvent) => {\n if ((isMacOS() ? e.metaKey : e.ctrlKey) && e.key === searchHotKey) {\n e.preventDefault()\n e.stopPropagation()\n\n if (modalState.open) {\n modalState.hide()\n } else {\n modalState.show()\n }\n }\n}\n\nwatch(\n () => modalState.open,\n async (next, prev) => {\n // Return focus to the button when the modal is closed\n if (!next && prev) {\n await nextTick()\n button.value?.$el.focus()\n }\n },\n)\n\n// Handle keyboard shortcuts\n// TODO: we can move this to the hotkey event bus but we would need to set up a custom key from the searchHotKey config\n// and make sure it works correctly inside the references first\nonMounted(() => window.addEventListener('keydown', handleHotKey))\nonBeforeUnmount(() => window.removeEventListener('keydown', handleHotKey))\n\nfunction handleClick() {\n modalState.show()\n}\n</script>\n<template>\n <ScalarIconButton\n v-if=\"forceIcon\"\n :icon=\"ScalarIconMagnifyingGlass\"\n label=\"Search\"\n @click=\"handleClick\" />\n <ScalarSidebarSearchButton\n v-else\n ref=\"button\"\n class=\"w-full\"\n :class=\"$attrs.class\"\n @click=\"handleClick\">\n <span class=\"sr-only\">Open Search</span>\n <span\n aria-hidden=\"true\"\n class=\"sidebar-search-placeholder\">\n Search\n </span>\n <template #shortcut>\n <template v-if=\"isMac\">\n <span class=\"sr-only\">Command</span>\n <span aria-hidden=\"true\">⌘</span>\n </template>\n <template v-else>\n <span class=\"sr-only\">CTRL</span>\n <span aria-hidden=\"true\">⌃</span>\n </template>\n {{ searchHotKey }}\n </template>\n </ScalarSidebarSearchButton>\n\n <SearchModal\n :document\n :eventBus=\"eventBus\"\n :modalState=\"modalState\"\n :modelsSectionLabel=\"modelsSectionLabel\" />\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;EA6BA,MAAM,SAAS,KAAoD;EACnE,MAAM,aAAa,UAAS;;;;;;;;;EAU5B,MAAM,QAAQ,IAAI,MAAK;AACvB,kBAAg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AAA,GAAA,gBACjB,MACX,gBAAG,QAAA,aAAY,EAAA,EAAA,CAAA,CAAA;2BAfuB,CAAA,OAAA,OAAA,OAAA,KAAxC,mBAAwC,QAAA,EAAlC,OAAM,WAAS,EAAC,eAAW,GAAA,GAAA,OAAA,OAAA,OAAA,KACjC,mBAIO,QAAA;KAHL,eAAY;KACZ,OAAM;OAA6B,YAErC,GAAA,EAAA,CAAA;;sBAcF,YAI6C,qBAAA;IAH1C,UAAA,QAAA;IACA,UAAU,QAAA;IACV,YAAY,MAAA,WAAU;IACtB,oBAAoB,QAAA"}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { type ModalState } from '@scalar/components/modal';
|
|
2
|
+
import type { ModelsSectionLabel } from '@scalar/types/api-reference';
|
|
3
|
+
import type { AsyncApiDocument } from '@scalar/types/asyncapi/3.1';
|
|
2
4
|
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
3
5
|
import type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
4
6
|
type __VLS_Props = {
|
|
5
7
|
modalState: ModalState;
|
|
6
|
-
document: OpenApiDocument | undefined;
|
|
8
|
+
document: OpenApiDocument | AsyncApiDocument | undefined;
|
|
7
9
|
eventBus: WorkspaceEventBus;
|
|
10
|
+
modelsSectionLabel?: ModelsSectionLabel;
|
|
8
11
|
};
|
|
9
12
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
13
|
declare const _default: typeof __VLS_export;
|