@scalar/api-reference 1.58.0 → 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 +75 -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-DIIVMX31.js → AgentScalarChatInterface-BXB1nZKJ.js} +4 -4
- package/dist/browser/chunks/ScalarTextInput.vue-XkIzhvc0.js +27 -0
- package/dist/browser/chunks/basic-shape-diamond.svg-BTEOT1FL.js +1 -1
- package/dist/browser/chunks/basic-shape-hexagon.svg-BSPzaCgF.js +1 -1
- package/dist/browser/chunks/basic-shape-primary-circle-ellipse-round.svg-DKmZ8UUU.js +1 -1
- package/dist/browser/chunks/basic-shape-primary-square-rectangle.svg-n2YRykHD.js +1 -1
- package/dist/browser/chunks/basic-shape-shield.svg-Bec9cJDA.js +1 -1
- package/dist/browser/chunks/browser-67K6wmG9.js +1 -1
- package/dist/browser/chunks/computer-device-desktop-monitor.svg-m6j893Hb.js +1 -1
- package/dist/browser/chunks/computer-device-desktop.svg-Dk1VVO7k.js +1 -1
- package/dist/browser/chunks/computer-device-laptop.svg-BNGVUCYS.js +1 -1
- package/dist/browser/chunks/computer-device-mobile-phone-android-samsung-back.svg-CC4UUTFw.js +1 -1
- package/dist/browser/chunks/computer-device-mobile-phone-android-samsung.svg-D8ExpMpL.js +1 -1
- package/dist/browser/chunks/computer-device-mobile-phone-iphone-x-back.svg-CLm7sgMM.js +1 -1
- package/dist/browser/chunks/computer-device-mobile-phone-iphone-x.svg-Xrttg6_7.js +1 -1
- package/dist/browser/chunks/computer-device-mobile-tablet-touch.svg-DQ2oTvOG.js +1 -1
- package/dist/browser/chunks/computer-device-mobile-tablet.svg-DCr0XlRc.js +1 -1
- package/dist/browser/chunks/computer-device-network-ethernet-cat6.svg-AK9l0iOl.js +1 -1
- package/dist/browser/chunks/computer-device-network-lan-www.svg-gUIdFBlE.js +1 -1
- package/dist/browser/chunks/computer-device-network-wifi-connection.svg-Be-EMm4e.js +1 -1
- package/dist/browser/chunks/computer-device-network-wifi-router.svg-Dc2VzyqK.js +1 -1
- package/dist/browser/chunks/ecology-science-erlenmeyer-flask.svg-DHgy7Jfd.js +1 -1
- package/dist/browser/chunks/image-flash-lightning.svg-EETR_y1q.js +1 -1
- package/dist/browser/chunks/image-picture-flower.svg-DN1AYzJU.js +1 -1
- package/dist/browser/chunks/interface-alert-exclamation-diamond.svg-C5NozMV_.js +1 -1
- package/dist/browser/chunks/interface-alert-exclamation-triangle-warning.svg-DaAg2fF5.js +1 -1
- package/dist/browser/chunks/interface-alert-information-circle.svg-ckkkt9Mv.js +1 -1
- package/dist/browser/chunks/interface-award-crown.svg-pjvn9hY-.js +1 -1
- package/dist/browser/chunks/interface-bookmark-tag.svg-r2r-lQq4.js +1 -1
- package/dist/browser/chunks/interface-bookmark.svg-BK9HKQBT.js +1 -1
- package/dist/browser/chunks/interface-calendar-date-one.svg-DNnF0M1I.js +1 -1
- package/dist/browser/chunks/interface-content-book-open-pages.svg-CQj_w9Vp.js +1 -1
- package/dist/browser/chunks/interface-content-book-page.svg-DppoeJRe.js +1 -1
- package/dist/browser/chunks/interface-content-file.svg-CvcD7OiY.js +1 -1
- package/dist/browser/chunks/interface-content-folder.svg-BmtS5I9A.js +1 -1
- package/dist/browser/chunks/interface-copy-clipboard.svg-Be6EI50X.js +1 -1
- package/dist/browser/chunks/interface-edit-attachment.svg-G5TKzpWX.js +1 -1
- package/dist/browser/chunks/interface-edit-binocular.svg-jzL-DvGB.js +1 -1
- package/dist/browser/chunks/interface-edit-magic-wand.svg-BOTlymvp.js +1 -1
- package/dist/browser/chunks/interface-edit-tool-paint-roller.svg-s9dwryx7.js +1 -1
- package/dist/browser/chunks/interface-edit-tool-pencil.svg-C7v0dbB3.js +1 -1
- package/dist/browser/chunks/interface-favorite-award.svg-CYHUgUG0.js +1 -1
- package/dist/browser/chunks/interface-favorite-flag.svg-C10zlKOb.js +1 -1
- package/dist/browser/chunks/interface-favorite-heart.svg-eoduXxlz.js +1 -1
- package/dist/browser/chunks/interface-favorite-star.svg-BSmxJetr.js +1 -1
- package/dist/browser/chunks/interface-favorite-stars-sparkles.svg-JTFLj3Ls.js +1 -1
- package/dist/browser/chunks/interface-hierarchy-flowchart.svg-Cg_Wy0kN.js +1 -1
- package/dist/browser/chunks/interface-home-house.svg-DytoGRnv.js +1 -1
- package/dist/browser/chunks/interface-hyperlink.svg-CuEfmmQI.js +1 -1
- package/dist/browser/chunks/interface-lighting-brightness.svg-DSK0h_Pa.js +1 -1
- package/dist/browser/chunks/interface-lock-closed.svg-Cn6TaLYv.js +1 -1
- package/dist/browser/chunks/interface-lock-open-unlock.svg-CVkG5-9W.js +1 -1
- package/dist/browser/chunks/interface-login-key.svg-y-cwwXjN.js +1 -1
- package/dist/browser/chunks/interface-search.svg-S-puVFJB.js +1 -1
- package/dist/browser/chunks/interface-setting-cog.svg-CTH4_lLg.js +1 -1
- package/dist/browser/chunks/interface-share-megaphone-bullhorn.svg-Pbp39MyC.js +1 -1
- package/dist/browser/chunks/interface-share-rocket.svg-BgCsIRZO.js +1 -1
- package/dist/browser/chunks/interface-share-satellite.svg-DAMN9d5G.js +1 -1
- package/dist/browser/chunks/interface-share-space-ship.svg-Dt-Mejxk.js +1 -1
- package/dist/browser/chunks/interface-share.svg-vFYTXSti.js +1 -1
- package/dist/browser/chunks/interface-signal-square.svg-DNG4LpAe.js +1 -1
- package/dist/browser/chunks/interface-time-clock-circle.svg-Bpz-nLxo.js +1 -1
- package/dist/browser/chunks/interface-time-hour-glass.svg-D7agfKsH.js +1 -1
- package/dist/browser/chunks/interface-users-multiple.svg-CkPJBBnG.js +1 -1
- package/dist/browser/chunks/interface-weather-moon.svg-CaTZFMPO.js +1 -1
- package/dist/browser/chunks/mail-chat-bubble-square.svg-DC8RIihp.js +1 -1
- package/dist/browser/chunks/mail-send-email-paper-airplane.svg-D8OLs9jz.js +1 -1
- package/dist/browser/chunks/mail-send-envelope.svg-CV33h5Sx.js +1 -1
- package/dist/browser/chunks/modal-Bp9V4D2s.js +66 -0
- package/dist/browser/chunks/{modal-BA6EnLMO.js → modal-CtAiwzwH.js} +2 -2
- package/dist/browser/chunks/money-cashier-receipt.svg-CJL8C2gs.js +1 -1
- package/dist/browser/chunks/money-currency-dollar-pay.svg-VdBplCTx.js +1 -1
- package/dist/browser/chunks/money-graph-arrow-increase.svg-DcRov3zk.js +1 -1
- package/dist/browser/chunks/money-graph-bar-chart-increase.svg-Cc7KxjX-.js +1 -1
- package/dist/browser/chunks/nature-ecology-leaf.svg-DR3cTZxt.js +1 -1
- package/dist/browser/chunks/phone-telephone.svg-DyY0gUlk.js +1 -1
- package/dist/browser/chunks/programming-bug.svg-BHLT-Qhp.js +1 -1
- package/dist/browser/chunks/programming-cloud.svg-B6YW33ba.js +1 -1
- package/dist/browser/chunks/programming-computer-database-server.svg-B6o5Sdn-.js +1 -1
- package/dist/browser/chunks/programming-computer-database.svg-Cl7OVtpJ.js +1 -1
- package/dist/browser/chunks/programming-module-four-layout.svg-BQrerL1x.js +1 -1
- package/dist/browser/chunks/programming-module-three.svg-B2KTQzBM.js +1 -1
- package/dist/browser/chunks/programming-module.svg-CiID7kPm.js +1 -1
- package/dist/browser/chunks/programming-script-code.svg-D1M5rtkN.js +1 -1
- package/dist/browser/chunks/runtime-core.esm-bundler-Byrbbu5Q.js +1 -1
- package/dist/browser/chunks/shopping-cart.svg-BEegiIR9.js +1 -1
- package/dist/browser/chunks/shopping-gift-present.svg-BUHwuLix.js +1 -1
- package/dist/browser/chunks/shopping-shipping-box-parcel-package.svg-D6fxWdYx.js +1 -1
- package/dist/browser/chunks/tag-new-circle.svg-jsg1bGs0.js +1 -1
- package/dist/browser/chunks/travel-map-earth-globe.svg-ClbMiU-f.js +1 -1
- package/dist/browser/chunks/vendor-nugWm4eq.js +337 -0
- package/dist/browser/standalone.esm.js +19 -18
- package/dist/browser/standalone.js +245 -240
- 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 +19 -3
- package/dist/components/ApiReference.vue.script.js.map +1 -1
- package/dist/components/Content/AsyncApi/AsyncApiTraversedEntry.vue.d.ts +1 -1
- package/dist/components/Content/AsyncApi/AsyncApiTraversedEntry.vue.d.ts.map +1 -1
- package/dist/components/Content/AsyncApi/AsyncApiTraversedEntry.vue.js.map +1 -1
- package/dist/components/Content/AsyncApi/AsyncApiTraversedEntry.vue.script.js +4 -2
- package/dist/components/Content/AsyncApi/AsyncApiTraversedEntry.vue.script.js.map +1 -1
- package/dist/components/Content/AsyncApi/Channel.vue.d.ts +4 -0
- 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.js.map +1 -1
- package/dist/components/Content/AsyncApi/Channel.vue.script.js +43 -3
- package/dist/components/Content/AsyncApi/Channel.vue.script.js.map +1 -1
- 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/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 +50 -6
- 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/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 +7 -2
- 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 +7 -0
- 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/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/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.map +1 -1
- package/dist/features/Search/components/SearchButton.vue.js.map +1 -1
- package/dist/features/Search/components/SearchButton.vue.script.js +13 -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.js.map +1 -1
- package/dist/features/Search/components/SearchModal.vue.script.js +2 -3
- package/dist/features/Search/components/SearchModal.vue.script.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.script.js +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/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/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/style.css +557 -374
- package/dist/vue-styles.css +547 -357
- package/package.json +16 -16
- package/dist/browser/chunks/ScalarTextInput.vue-DDsQgpOo.js +0 -27
- package/dist/browser/chunks/modal-DW-P3H1k.js +0 -66
- package/dist/browser/chunks/vendor-Ad2vN5Ro.js +0 -333
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiReference.vue.script.js","names":["$attrs","$slots"],"sources":["../../src/components/ApiReference.vue"],"sourcesContent":["<script lang=\"ts\">\n// Injected by Vite at build time (see vite.config.ts and vite.standalone.config.ts).\n// Read via process.env so the constant is replaced inline without pulling package.json\n// into the TypeScript program — that would expand rootDir and emit declarations under dist/src/.\nconst version = PACKAGE_VERSION\n\nif (version && typeof window !== 'undefined') {\n console.info(`@scalar/api-reference@${version}`)\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { provideUseId } from '@headlessui/vue'\nimport { OpenApiClientButton } from '@scalar/api-client/blocks/operation-block'\nimport type { ApiClientModal } from '@scalar/api-client/modal'\nimport {\n ScalarColorModeToggleButton,\n ScalarColorModeToggleIcon,\n} from '@scalar/components/color-mode-toggle'\nimport { addScalarClassesToHeadless } from '@scalar/components/helpers'\nimport { ScalarSidebarFooter } from '@scalar/components/sidebar'\nimport { slugify } from '@scalar/helpers/string/slugify'\nimport { isLocalUrl } from '@scalar/helpers/url/is-local-url'\nimport { apiReferenceConfigurationSchema } from '@scalar/schemas/api-reference'\nimport {\n createSidebarState,\n ScalarSidebar,\n scrollSidebarToTop,\n} from '@scalar/sidebar'\nimport { getThemeStyles, hasObtrusiveScrollbars } from '@scalar/themes'\nimport {\n DEFAULT_MODELS_SECTION_LABEL,\n type AnyApiReferenceConfiguration,\n type ApiReferenceConfiguration,\n type ApiReferenceConfigurationRaw,\n} from '@scalar/types/api-reference'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\nimport { useColorMode } from '@scalar/use-hooks/useColorMode'\nimport { ScalarToasts } from '@scalar/use-toasts'\nimport { coerce } from '@scalar/validation'\nimport { createWorkspaceStore } from '@scalar/workspace-store/client'\nimport { createWorkspaceEventBus } from '@scalar/workspace-store/events'\nimport {\n getActiveEnvironment,\n getServers,\n} from '@scalar/workspace-store/request-example'\nimport type {\n TraversedEntry,\n TraversedTag,\n} from '@scalar/workspace-store/schemas/navigation'\nimport { isOpenApiDocument } from '@scalar/workspace-store/schemas/type-guards'\nimport { useScrollLock } from '@vueuse/core'\nimport diff from 'microdiff'\nimport {\n computed,\n onBeforeMount,\n onBeforeUnmount,\n onMounted,\n onServerPrefetch,\n provide,\n ref,\n useId,\n useTemplateRef,\n watch,\n} from 'vue'\n\nimport {\n AgentScalarButton,\n AgentScalarDrawer,\n OpenMCPButton,\n} from '@/components/AgentScalar'\nimport ClassicHeader from '@/components/ClassicHeader.vue'\nimport Content from '@/components/Content/Content.vue'\nimport MobileHeader from '@/components/MobileHeader.vue'\nimport { DeveloperTools } from '@/features/developer-tools'\nimport DocumentSelector from '@/features/multiple-documents/DocumentSelector.vue'\nimport SearchButton from '@/features/Search/components/SearchButton.vue'\nimport { getSystemModePreference } from '@/helpers/color-mode'\nimport { downloadDocument } from '@/helpers/download'\nimport {\n getIdFromUrl,\n makeUrlFromId,\n matchesBasePath,\n redirectLegacyModelUrl,\n} from '@/helpers/id-routing'\nimport {\n scrollToLazy as _scrollToLazy,\n addToPriorityQueue,\n blockIntersection,\n intersectionEnabled,\n} from '@/helpers/lazy-bus'\nimport {\n loadAuthFromStorage,\n loadClientFromStorage,\n} from '@/helpers/load-from-perssistance'\nimport { mapConfigPlugins } from '@/helpers/map-config-plugins'\nimport { mapConfigToWorkspaceStore } from '@/helpers/map-config-to-workspace-store'\nimport {\n normalizeConfigurations,\n type NormalizedConfiguration,\n} from '@/helpers/normalize-configurations'\nimport { safeDeepClone } from '@/helpers/safe-deep-clone'\nimport { AGENT_CONTEXT_SYMBOL, useAgent } from '@/hooks/use-agent'\nimport { useIntersection } from '@/hooks/use-intersection'\nimport { createPluginManager, PLUGIN_MANAGER_SYMBOL } from '@/plugins'\nimport { persistencePlugin } from '@/plugins/persistence-plugin'\n\nconst props = defineProps<{\n /**\n * Configuration for the API reference.\n * Can be a single configuration or an array of configurations for multiple documents.\n */\n configuration?: AnyApiReferenceConfiguration\n}>()\n\ndefineSlots<{\n 'content-start'?(): { breadcrumb: string }\n 'content-end'?(): { breadcrumb: string }\n 'sidebar-start'?(): { breadcrumb: string }\n 'sidebar-end'?(): { breadcrumb: string }\n 'editor-placeholder'?(): { breadcrumb: string }\n footer?(): { breadcrumb: string }\n}>()\n\nconst { copyToClipboard } = useClipboard()\n\n/**\n * Used to inject the environment into built packages\n *\n * Primary use case is the open-in-client button\n */\nconst isDevelopment = import.meta.env.DEV\n\nconst obtrusiveScrollbars = computed(hasObtrusiveScrollbars)\n\nconst eventBus = createWorkspaceEventBus({ debug: isDevelopment })\nconst isSidebarOpen = ref(false)\n\n/**\n * Due to a bug in headless UI, we need to set an ID here that can be shared across server/client\n * TODO remove this once the bug is fixed\n *\n * @see https://github.com/tailwindlabs/headlessui/issues/2979\n */\nprovideUseId(() => useId())\n\n// ---------------------------------------------------------------------------\n/**\n * Configuration Handling\n *\n * We will normalize the configurations and store them in a computed property.\n * The active configuration will be associated with the active document.\n */\nconst configList = computed(() => normalizeConfigurations(props.configuration))\n\nconst isMultiDocument = computed(() => Object.keys(configList.value).length > 1)\n\n/** Search for the source with a default attribute or use the first one */\nconst activeSlug = ref<string>(\n Object.values(configList.value).find((c) => c.default)?.slug ??\n configList.value[Object.keys(configList.value)?.[0] ?? '']?.slug ??\n '',\n)\n\n/**\n * On initial page load we need to determine if there is a valid document slug in the URL\n *\n * If there is we set the active slug to the document slug\n */\nif (typeof window !== 'undefined') {\n const url = new URL(window.location.href)\n\n // To handle legacy query parameter multi-document support we redirect\n // to the new path routing format\n const apiParam = url.searchParams.get('api')\n if (apiParam && configList.value[apiParam]) {\n activeSlug.value = apiParam\n const idFromUrl = getIdFromUrl(\n url,\n configList.value[apiParam].config.pathRouting?.basePath,\n apiParam,\n )\n const newUrl = makeUrlFromId(\n idFromUrl,\n configList.value[apiParam].config.pathRouting?.basePath,\n isMultiDocument.value,\n )\n if (newUrl) {\n newUrl.searchParams.delete('api')\n window.history.replaceState({}, '', newUrl.toString())\n }\n }\n\n /**\n * For path routing on initial load we do not know which basePath to check for\n * we need to search the configs to see if any of the base paths match the URL\n * and then use that basePath to get the initial id\n *\n * With this approach we cannot support multi-document mode with one of configs having\n * an empty basePath\n *\n * Other conflicts are possible.\n */\n const basePaths = Object.values(configList.value).map(\n (c) => c.config.pathRouting?.basePath,\n )\n\n const initialId = getIdFromUrl(\n url,\n basePaths.find((p) => (p ? matchesBasePath(url, p) : false)),\n isMultiDocument.value ? undefined : activeSlug.value,\n )\n const documentSlug = initialId.split('/')[0]\n\n if (documentSlug && configList.value[documentSlug]) {\n activeSlug.value = documentSlug\n }\n}\n\n/** Computed document options list for the selector logic */\nconst documentOptionList = computed(() =>\n Object.values(configList.value).map((c) => ({\n label: c.title,\n id: c.slug,\n })),\n)\n\n/** Configuration overrides to apply to the selected document (from the localhost toolbar) */\nconst configurationOverrides = ref<\n Partial<Omit<ApiReferenceConfiguration, 'slug' | 'title' | ''>>\n>({})\n\n/** Any dev toolbar modifications are merged with the active configuration */\nconst mergedConfig = computed<ApiReferenceConfiguration>(() => {\n const merged = {\n // Provides a default set of values when the lookup fails\n ...coerce(apiReferenceConfigurationSchema, {}),\n // The active configuration based on the slug\n ...configList.value[activeSlug.value]?.config,\n // Any overrides from the localhost toolbar\n ...configurationOverrides.value,\n }\n\n return {\n ...merged,\n modelsSectionLabel:\n merged.modelsSectionLabel ?? DEFAULT_MODELS_SECTION_LABEL,\n }\n})\n\n/** Convenience break out var to determine which routing mode we are using */\nconst basePath = computed(() => mergedConfig.value.pathRouting?.basePath)\n\nconst themeStyle = computed(() =>\n getThemeStyles(mergedConfig.value.theme, {\n fonts: mergedConfig.value.withDefaultFonts,\n }),\n)\n\n/** Plugin injection is not reactive. All plugins must be provided at first render */\nconst pluginManager = createPluginManager({\n plugins: Object.values(configList.value).flatMap(\n (c) => c.config.plugins ?? [],\n ),\n})\nprovide(PLUGIN_MANAGER_SYMBOL, pluginManager)\n\npluginManager.notifyInit(mergedConfig.value)\n\nwatch(mergedConfig, (config) => pluginManager.notifyConfigChange(config))\n// ---------------------------------------------------------------------------\n/** Navigation State Handling */\n\n// Redirect legacy `/model/<name>` URLs to the current section's plural slug\n// so bookmarks from before the slug streamline keep resolving.\nif (typeof window !== 'undefined') {\n const canonical = redirectLegacyModelUrl(\n window.location.href,\n slugify(\n mergedConfig.value.modelsSectionLabel ?? DEFAULT_MODELS_SECTION_LABEL,\n ),\n activeSlug.value,\n isMultiDocument.value,\n mergedConfig.value.pathRouting?.basePath,\n )\n if (canonical) {\n window.history.replaceState({}, '', canonical.toString())\n }\n}\n\n// Front-end redirect\nif (mergedConfig.value.redirect && typeof window !== 'undefined') {\n const newPath = mergedConfig.value.redirect(\n (mergedConfig.value.pathRouting ? window.location.pathname : '') +\n window.location.hash,\n )\n if (newPath) {\n window.history.replaceState({}, '', newPath)\n }\n}\n\n/**\n * Sets the active slug and updates the URL with the selected document slug\n *\n * If an element ID is passed in we will configure the path or hash routing\n */\nfunction syncSlugAndUrlWithDocument(\n slug: string,\n elementId: string | undefined,\n config: ApiReferenceConfigurationRaw,\n) {\n // We create a new URL and go to the root element if an ID is not provided\n const url = makeUrlFromId(\n elementId || slug,\n config.pathRouting?.basePath,\n isMultiDocument.value,\n )\n\n if (url) {\n window.history.replaceState({}, '', url.toString())\n }\n\n // Update the active slug\n activeSlug.value = slug\n}\n\n// ---------------------------------------------------------------------------\n/** Workspace Store Initialization */\n\n/**\n * Initializes the new client workspace store.\n */\nconst workspaceStore = createWorkspaceStore({\n verbose: isDevelopment,\n})\n\n/**\n * We need to keep the client store separate from the workspace store\n * This is because we want the client store to be a playground where users can test out their requests without affecting the references store\n */\nconst clientStore = createWorkspaceStore({\n verbose: isDevelopment,\n plugins: [\n persistencePlugin({\n persistAuth: () => mergedConfig.value.persistAuth ?? false,\n }),\n ],\n})\n\n// TODO: persistence should be hoisted into standalone\n// Client side integrations will want to handle dark mode externally\nconst { toggleColorMode, isDarkMode } = useColorMode({\n initialColorMode: {\n true: 'dark' as const,\n false: 'light' as const,\n undefined: 'system' as const,\n }[String(mergedConfig.value.darkMode)],\n overrideColorMode: mergedConfig.value.forceDarkModeState,\n})\n\n/**\n * The active document passed to the search modal. Both OpenAPI and AsyncAPI\n * documents are surfaced so the search index can pick up info.description\n * headings from either spec; AsyncAPI-specific entries (channels, operations,\n * messages) are not indexed yet.\n */\nconst activeSearchableDocument = computed(\n () => workspaceStore.workspace.activeDocument,\n)\n\n/**\n * Create top level sidebar entries for each document\n * This allows sharing a single sidebar state for across the workspace\n */\nconst itemsFromWorkspace = computed<TraversedEntry[]>(() => {\n return Object.entries(workspaceStore.workspace.documents).map(\n ([slug, document]) => ({\n id: slug,\n type: 'document',\n description: document.info.description,\n name: document.info.title ?? slug,\n title: document.info.title ?? slug,\n // Both OpenAPI and AsyncAPI documents carry an `x-scalar-navigation` tree.\n children: document['x-scalar-navigation']?.children ?? [],\n }),\n )\n})\n\n/** Initialize the sidebar */\nconst sidebarState = createSidebarState<TraversedEntry>(itemsFromWorkspace, {\n hooks: {},\n})\n\n/** Recursively set all children of the given items to open */\nconst setChildrenOpen = (items: TraversedEntry[]): void => {\n items.forEach((item) => {\n if (item.type === 'tag' || item.type === 'models') {\n sidebarState.setExpanded(item.id, true)\n }\n if ('children' in item && item.children) {\n setChildrenOpen(item.children)\n }\n })\n}\n\n/** We get the sub items for the sidebar based on the configuration/document slug */\nconst sidebarItems = computed<TraversedEntry[]>(() => {\n const config = mergedConfig.value\n\n if (!config) {\n return []\n }\n\n const docItems =\n sidebarState.items.value.find(\n (item): item is TraversedTag => item.id === activeSlug.value,\n )?.children ?? []\n\n // When the default open all tags configuration is enabled we open all the children of the document\n if (config.defaultOpenAllTags) {\n setChildrenOpen(docItems)\n }\n\n // When the expand all model sections configuration is enabled we open all the children of the models tag\n if (config.expandAllModelSections) {\n const models = docItems.find(\n (item): item is TraversedTag => item.type === 'models',\n )\n if (models) {\n sidebarState.setExpanded(models.id, true)\n models.children?.forEach((child) => {\n sidebarState.setExpanded(child.id, true)\n })\n }\n }\n\n return docItems\n})\n\n/** Find the sidebar entry that represents the introduction section */\nconst infoSectionId = computed(\n () =>\n sidebarItems.value.find(\n (item) => item.type === 'text' && item.title === 'Introduction',\n )?.id ?? `${activeSlug.value}/description/introduction`,\n)\n\n/** User for mobile navigation */\nconst breadcrumb = ref('')\n\nconst slotProps = computed(() => ({\n breadcrumb: breadcrumb.value,\n}))\n\nconst setBreadcrumb = (id: string) => {\n const item = sidebarState.getEntryById(id)\n\n if (!item || item.type === 'document') {\n breadcrumb.value = ''\n } else {\n breadcrumb.value = item.title\n }\n}\n\nconst scrollToLazyElement = (id: string) => {\n setBreadcrumb(id)\n sidebarState.setSelected(id)\n _scrollToLazy(id, sidebarState.setExpanded, sidebarState.getEntryById)\n}\n\n/**\n * Updates the browser tab title via the user-provided `setPageTitle` callback.\n *\n * Called whenever the section in view changes — on sidebar clicks, on scroll, and\n * when switching documents — so the tab title always reflects what the reader sees.\n */\nconst updatePageTitle = (id: string) => {\n const setPageTitle = mergedConfig.value?.setPageTitle\n const entry = sidebarState.getEntryById(id)\n\n if (!setPageTitle || typeof document === 'undefined' || !entry?.title) {\n return\n }\n\n const activeDocument = workspaceStore.workspace.activeDocument\n\n document.title = setPageTitle({\n title: entry.title,\n document: {\n title: activeDocument?.info?.title ?? activeSlug.value,\n slug: activeSlug.value,\n },\n })\n}\n\n/** Maps some config values to the workspace store to keep it reactive */\nmapConfigToWorkspaceStore({\n config: () => mergedConfig.value,\n store: workspaceStore,\n isDarkMode,\n})\n\nmapConfigToWorkspaceStore({\n config: () => mergedConfig.value,\n store: clientStore,\n isDarkMode,\n})\n\n/** Merged environment variables from workspace and document levels */\nconst environment = computed(\n () =>\n getActiveEnvironment(\n workspaceStore,\n workspaceStore.workspace.activeDocument ?? null,\n ).environment,\n)\n\nif (typeof window !== 'undefined') {\n // @ts-expect-error - For debugging purposes expose the store\n window.dataDumpWorkspace = () => workspaceStore\n}\n\n// For testing\ndefineExpose({\n eventBus,\n workspaceStore,\n sidebarItems,\n})\n\n/**\n * Computes a mapping from model names to their sidebar entry IDs.\n * This is used for quick lookups and navigation within the sidebar.\n */\nconst modelsIndex = computed(() => {\n return sidebarItems.value\n .filter((item) => item.type === 'models')\n .flatMap((item) => item.children ?? [])\n .filter((item) => item.type === 'model')\n .reduce(\n (acc, item) => {\n acc[item.name] = item.id\n return acc\n },\n {} as Record<string, string>,\n )\n})\n\neventBus.on('scroll-to:model-by-name', ({ name }) => {\n /** Find the model in the models index */\n const model = modelsIndex.value[name]\n\n if (model) {\n scrollToLazyElement(model)\n }\n})\n\nconst addDocument: typeof workspaceStore.addDocument = async (\n input,\n navigationOptions,\n) => {\n const result = await workspaceStore.addDocument(input, navigationOptions)\n // Now add it to the client store\n const state = workspaceStore.exportWorkspace()\n clientStore.loadWorkspace({\n auth: {},\n documents: {\n [input.name]: safeDeepClone(state.documents[input.name]) ?? {\n 'openapi': '3.1.0',\n 'info': {\n title: '',\n version: '',\n },\n 'x-scalar-original-document-hash': '',\n },\n },\n intermediateDocuments: {},\n originalDocuments: {},\n overrides: {},\n history: {},\n meta: {},\n })\n return result\n}\n\n// ---------------------------------------------------------------------------\n// Document Management\n\n/**\n * Handle changing the active document\n *\n * 1. If the document has not be loaded to the workspace store we set it to empty and asynchronously load it\n * 2. If the document has been loaded to the workspace store we just set it to active\n * 3. If the content from the configuration has changes we need to update the document in the workspace store\n */\nconst changeSelectedDocument = async (\n slug: string,\n elementId?: string | undefined,\n) => {\n const normalized = configList.value[slug]\n\n if (!normalized) {\n console.warn(`Document ${slug} not found in configList`)\n return\n }\n\n const config = {\n ...normalized.config,\n ...configurationOverrides.value,\n }\n\n // Store `onDocumentSelect` result to await its execution later, before calling `onLoaded`\n const onDocumentSelectPromise = config.onDocumentSelect?.()\n\n // Set the active slug and update any routing\n syncSlugAndUrlWithDocument(slug, elementId, config)\n\n // Update the document on the route as well, the method and path don't matter as we update them before opening\n apiClient.value?.route({\n documentSlug: slug,\n method: 'get',\n path: '/',\n })\n\n const isFirstLoad = !workspaceStore.workspace.documents[slug]\n\n // If the document is not in the store, we asynchronously load it\n if (isFirstLoad) {\n const result = await addDocument(\n normalized.source.url\n ? {\n name: slug,\n url: normalized.source.url,\n fetch: config.customFetch,\n }\n : {\n name: slug,\n document: normalized.source.content ?? {},\n },\n config,\n )\n\n const document = clientStore.workspace.documents[slug]\n\n // If the document does not have a selected server we set it to the first server\n if (\n result === true &&\n isOpenApiDocument(document) &&\n document['x-scalar-selected-server'] === undefined\n ) {\n // Set the active server if the document is loaded successfully\n const servers = getServers(\n normalized.config.servers ?? document.servers,\n {\n baseServerUrl: mergedConfig.value.baseServerURL,\n documentUrl: normalized.source.url,\n },\n )\n if (servers.length > 0) {\n clientStore.updateDocument(\n slug,\n 'x-scalar-selected-server',\n servers[0]!.url,\n )\n }\n }\n }\n\n // Always set it to active; if the document is null we show a loading state\n workspaceStore.update('x-scalar-active-document', slug)\n clientStore.update('x-scalar-active-document', slug)\n\n // If the document has persistence enabled we load the auth schemes from storage\n if (config.persistAuth) {\n loadAuthFromStorage(clientStore, slug)\n }\n\n // ensure that `onLoaded` hook doesn't block execution but is executed after `onDocumentSelect`\n void (async () => {\n await onDocumentSelectPromise\n void config.onLoaded?.(slug)\n })()\n\n // When loading to a specified element we need to freeze and scroll\n if (elementId && elementId !== slug) {\n scrollToLazyElement(elementId)\n }\n // If there is no child element of the document specified and defaultOpenFirstTag is enabled, we expand the first tag\n else if (config.defaultOpenFirstTag) {\n const firstTag = sidebarItems.value.find((item) => item.type === 'tag')\n if (firstTag) {\n sidebarState.setExpanded(firstTag.id, true)\n }\n }\n\n // Reflect the freshly selected document in the browser tab title\n updatePageTitle(elementId && elementId !== slug ? elementId : slug)\n}\n\n/**\n * TODO:Move this to a dedicated updateDocument function in the future and\n * away from vue-reactivity based updates\n */\nwatch(\n () => Object.values(configList.value),\n async (newConfigList, oldConfigList) => {\n /**\n * Handles replacing and updating documents within the workspace store\n * when we detect configuration changes.\n */\n const updateSource = async (\n updated: NormalizedConfiguration,\n previous: NormalizedConfiguration | undefined,\n ) => {\n /** If we have not loaded the document previously we don't need to handle any updates to store */\n if (!workspaceStore.workspace.documents[updated.slug]) {\n return\n }\n /** If the URL has changed we fetch and rebase */\n if (updated.source.url && updated.source.url !== previous?.source.url) {\n await addDocument(\n {\n name: updated.slug,\n url: updated.source.url,\n fetch: updated.config.customFetch,\n },\n updated.config,\n )\n\n return\n }\n\n // If the was not a URL change then we require a document to continue\n if (!updated.source.content) {\n return\n }\n\n /**\n * We need to deeply check for document changes. Parse documents and then only rebase\n * if we detect deep changes in the two sources\n */\n if (\n diff(\n updated.source.content,\n previous && 'content' in previous.source\n ? (previous.source.content ?? {})\n : {},\n ).length\n ) {\n await addDocument(\n {\n name: updated.slug,\n document: updated.source.content,\n },\n updated.config,\n )\n }\n }\n\n newConfigList.forEach((newConfig, index) =>\n updateSource(newConfig, oldConfigList[index]),\n )\n\n const newSlugs = newConfigList.map((c) => c.slug)\n const oldSlugs = oldConfigList.map((c) => c.slug)\n\n // If the slugs have changed, we need to update the active document and the URL query param\n if (\n newSlugs.length !== oldSlugs.length ||\n !newSlugs.every((slug, index) => slug === oldSlugs[index])\n ) {\n await changeSelectedDocument(newSlugs[0] ?? '')\n }\n },\n {\n deep: true,\n },\n)\n\n/** Preload the first document during SSR */\nonServerPrefetch(() => changeSelectedDocument(activeSlug.value))\n\n/** Load the first document on page load */\nonBeforeMount(async () => {\n // We read the client from the client store so we need to set it to the client store\n loadClientFromStorage(clientStore)\n\n await changeSelectedDocument(\n activeSlug.value,\n getIdFromUrl(\n window.location.href,\n configList.value[activeSlug.value]?.config.pathRouting?.basePath,\n isMultiDocument.value ? undefined : activeSlug.value,\n ),\n )\n})\n\nconst documentUrl = computed(() => {\n return configList.value[activeSlug.value]?.source?.url\n})\n\n// --------------------------------------------------------------------------- */\n// Agent Scalar\n\n/**\n * Determines if Agent Scalar should be enabled based on the configuration and the current URL\n *\n * - If the agent is disabled in the configuration, it should not be enabled\n * - If the current URL is a local URL, it should be enabled\n * - If the agent key is set, it should be enabled\n */\nconst agent = useAgent({\n agentEnabled: computed(() => {\n const currentConfiguration = configList.value[activeSlug.value]\n\n if (currentConfiguration?.agent?.disabled) {\n return false\n }\n\n if (typeof window !== 'undefined' && isLocalUrl(window.location.href)) {\n return true\n }\n\n return Boolean(configList.value[activeSlug.value]?.agent?.key)\n }),\n})\nprovide(AGENT_CONTEXT_SYMBOL, agent)\n\n// --------------------------------------------------------------------------- */\n// Api Client Modal\n\n// Setup the ApiClient on mount.\n// The modal is dynamic-imported so its dependency graph (CodeMirror, the request\n// editor, the response viewer, etc.) becomes a separate chunk that loads\n// asynchronously after the API reference paints.\nconst modal = useTemplateRef<HTMLElement>('modal')\nconst apiClient = ref<ApiClientModal | null>(null)\nonMounted(async () => {\n if (!modal.value) {\n return\n }\n\n const { createApiClientModal } = await import('@scalar/api-client/modal')\n\n // Bail if the component unmounted while the chunk was loading.\n if (!modal.value) {\n return\n }\n\n apiClient.value = createApiClientModal({\n el: modal.value,\n eventBus,\n workspaceStore: clientStore,\n options: mergedConfig,\n plugins: [\n ...pluginManager.getApiClientPlugins(),\n ...mapConfigPlugins(mergedConfig, environment),\n ],\n })\n})\nonBeforeUnmount(() => {\n pluginManager.notifyDestroy()\n apiClient.value?.app.unmount()\n})\n\n// ---------------------------------------------------------------------------\n// Top level event handlers and user specified callbacks\n\n/** Ensure we call the onServerChange callback */\neventBus.on('server:update:selected', ({ url }) =>\n mergedConfig.value.onServerChange?.(url),\n)\n\n/** Download the document from the store */\neventBus.on('ui:download:document', ({ format }) => {\n const document = workspaceStore.exportActiveDocument(format)\n\n if (!document) {\n console.error('No document found to download')\n return\n }\n\n void downloadDocument(document, activeSlug.value ?? 'openapi', format)\n})\n\n// ---------------------------------------------------------------------------\n// Local event and scroll handling\n\n/**\n * Handler for a direct navigation event such as a sidebar or search click\n *\n * Depending on the item type we handle a selection event differently:\n *\n * - Tag: If a tag is closed we open it and all its parents and scroll to it\n * If a tag is open we just close the tag\n * - Operation:\n * Open all parents and scroll to the operation\n */\nconst handleSelectSidebarEntry = (id: string, caller?: 'sidebar') => {\n const item = sidebarState.getEntryById(id)\n\n updatePageTitle(id)\n\n if (\n (item?.type === 'tag' ||\n item?.type === 'models' ||\n item?.type === 'text') &&\n sidebarState.isExpanded(id) && // Only close if the item is expanded\n sidebarState.selectedItem.value === id // Only close if the item is not the currently selected item\n ) {\n // hack until we fix intersection logic\n const unblock = blockIntersection()\n\n sidebarState.setExpanded(id, false)\n\n unblock()\n\n return\n }\n\n // Close the mobile menu upon selecting any item that's not a tag or model\n if (item?.type !== 'tag' && item?.type !== 'models') {\n isSidebarOpen.value = false\n }\n\n scrollToLazyElement(id)\n\n const url = makeUrlFromId(id, basePath.value, isMultiDocument.value)\n if (url) {\n window.history.pushState({}, '', url)\n\n // Trigger the onSidebarClick callback if the caller is sidebar\n if (caller === 'sidebar') {\n mergedConfig.value.onSidebarClick?.(url.toString())\n }\n }\n\n if (agent.showAgent.value) {\n agent.closeAgent()\n }\n}\n\n/** Handle a navigation item selection event */\neventBus.on('select:nav-item', ({ id }) => handleSelectSidebarEntry(id))\n\n/** Handle a scroll to navigation item event */\neventBus.on('scroll-to:nav-item', ({ id }) => handleSelectSidebarEntry(id))\n\n/** Handle an intersecting navigation item event */\neventBus.on('intersecting:nav-item', ({ id }) => {\n if (!intersectionEnabled.value) {\n return\n }\n\n sidebarState.setSelected(id)\n setBreadcrumb(id)\n\n // Keep the browser tab title in sync with the section scrolled into view\n updatePageTitle(id)\n\n // Scroll the sidebar to keep the selected element near the top\n scrollSidebarToTop(id)\n\n const url = makeUrlFromId(id, basePath.value, isMultiDocument.value)\n if (url && workspaceStore.workspace.activeDocument) {\n window.history.replaceState({}, '', url.toString())\n }\n})\n\neventBus.on('toggle:nav-item', ({ id, open }) => {\n if (open) {\n mergedConfig.value.onShowMore?.(id)\n\n // Pre-queue first child so it renders immediately when the tag expands\n const entry = sidebarState.getEntryById(id)\n if (entry && 'children' in entry && entry.children) {\n const first = entry.children[0]\n\n if (first) {\n addToPriorityQueue(first.id)\n }\n }\n }\n sidebarState.setExpanded(id, open ?? !sidebarState.isExpanded(id))\n})\n\neventBus.on('copy-url:nav-item', ({ id }) => {\n const url = makeUrlFromId(\n id,\n basePath.value,\n isMultiDocument.value,\n )?.toString()\n return url && copyToClipboard(url)\n})\n\n// ---------------------------------------------------------------------------\n// History and scroll restoration\n\nonBeforeMount(() => {\n window.history.scrollRestoration = 'manual'\n // Ensure we add our scalar wrapper class to the headless ui root, mounted is too late\n addScalarClassesToHeadless()\n\n // When we detect a back button press we scroll to the new id\n window.addEventListener('popstate', () => {\n const id = getIdFromUrl(\n window.location.href,\n mergedConfig.value.pathRouting?.basePath,\n isMultiDocument.value ? undefined : activeSlug.value,\n )\n if (id) {\n scrollToLazyElement(id)\n }\n })\n})\n\n// ---------------------------------------------------------------------------\n// Document start intersection observer\n\nconst documentStartRef = useTemplateRef<HTMLElement>('documentStartRef')\n\n/**\n * Uses `immediate` so the sentinel fires as soon as it enters the viewport (not just at the center strip).\n * When the user scrolls away from the top, both this observer and the first section's center-strip\n * observer are intersecting simultaneously, so the section observer does not re-fire on its own.\n * The `onExit` callback bridges that gap by finding whichever section is at the viewport center\n * and re-emitting the nav event for it.\n */\nuseIntersection(\n documentStartRef,\n () => {\n eventBus.emit('intersecting:nav-item', { id: activeSlug.value })\n },\n {\n onExit: () => {\n const centerY = window.innerHeight / 2\n const section = document\n .elementsFromPoint(window.innerWidth / 2, centerY)\n .find((el) => el.tagName === 'SECTION' && el.id)\n\n if (section?.id) {\n eventBus.emit('intersecting:nav-item', { id: section.id })\n }\n },\n immediate: true,\n },\n)\n\nconst colorMode = computed(() => {\n const mode = workspaceStore.workspace['x-scalar-color-mode']\n\n if (mode === 'system') {\n return getSystemModePreference()\n }\n\n return mode\n})\n\nconst bodyScrollLocked = useScrollLock(\n typeof document !== 'undefined' ? document.body : null,\n)\n\nwatch(agent.showAgent, () => (bodyScrollLocked.value = agent.showAgent.value))\n\nconst showMCPButton = computed(() => {\n if (mergedConfig.value.mcp?.disabled) {\n return false\n }\n\n if (typeof window !== 'undefined' && isLocalUrl(window.location.href)) {\n return true\n }\n\n if (mergedConfig.value.mcp) {\n return true\n }\n\n return false\n})\n</script>\n\n<template>\n <!-- SingleApiReference -->\n <div>\n <!-- Inject any custom CSS directly into a style tag -->\n <component :is=\"'style'\">\n {{ mergedConfig.customCss }}\n {{ themeStyle }}\n </component>\n <div\n ref=\"documentEl\"\n class=\"scalar-app scalar-api-reference references-layout\"\n :class=\"[\n {\n 'scalar-api-references-standalone-mobile': mergedConfig.showSidebar,\n 'scalar-scrollbars-obtrusive': obtrusiveScrollbars,\n 'references-editable': mergedConfig.isEditable,\n 'references-sidebar': mergedConfig.showSidebar,\n 'references-sidebar-mobile-open': isSidebarOpen,\n 'references-classic': mergedConfig.layout === 'classic',\n },\n $attrs.class,\n ]\">\n <!-- Agent Scalar -->\n <AgentScalarDrawer\n v-if=\"agent.agentEnabled.value\"\n :agentScalarConfiguration=\"configList[activeSlug]?.agent\"\n :externalUrls=\"mergedConfig.externalUrls\"\n :workspaceStore />\n\n <!-- Mobile Header and Sidebar when in modern layout -->\n\n <MobileHeader\n v-if=\"mergedConfig.layout === 'modern'\"\n :breadcrumb=\"breadcrumb\"\n :isSidebarOpen=\"isSidebarOpen\"\n :showSidebar=\"mergedConfig.showSidebar\"\n @toggleSidebar=\"() => (isSidebarOpen = !isSidebarOpen)\">\n <template #search>\n <SearchButton\n v-if=\"!mergedConfig.hideSearch\"\n class=\"my-2\"\n :document=\"activeSearchableDocument\"\n :eventBus=\"eventBus\"\n :hideModels=\"mergedConfig.hideModels\"\n :modelsSectionLabel=\"mergedConfig.modelsSectionLabel\"\n :searchHotKey=\"mergedConfig.searchHotKey\"\n :showSidebar=\"mergedConfig.showSidebar\" />\n </template>\n <template #sidebar=\"{ sidebarClasses }\">\n <ScalarSidebar\n v-if=\"mergedConfig.showSidebar && mergedConfig.layout === 'modern'\"\n :aria-label=\"`Sidebar for ${workspaceStore.workspace.activeDocument?.info?.title}`\"\n class=\"t-doc__sidebar\"\n :class=\"sidebarClasses\"\n :isExpanded=\"sidebarState.isExpanded\"\n :isSelected=\"sidebarState.isSelected\"\n :items=\"sidebarItems\"\n layout=\"reference\"\n :options=\"mergedConfig\"\n role=\"navigation\"\n @selectItem=\"(id) => handleSelectSidebarEntry(id, 'sidebar')\"\n @toggleGroup=\"\n (id: string) =>\n sidebarState.setExpanded(id, !sidebarState.isExpanded(id))\n \">\n <template #header>\n <!-- Wrap in a div when slot is filled -->\n <DocumentSelector\n v-if=\"documentOptionList.length > 1\"\n :modelValue=\"activeSlug\"\n :options=\"documentOptionList\"\n @update:modelValue=\"changeSelectedDocument\" />\n\n <!-- Search -->\n <div\n v-if=\"!mergedConfig.hideSearch\"\n class=\"flex gap-1.5 px-3 pt-3\">\n <SearchButton\n :document=\"activeSearchableDocument\"\n :eventBus=\"eventBus\"\n :hideModels=\"mergedConfig.hideModels\"\n :modelsSectionLabel=\"mergedConfig.modelsSectionLabel\"\n :searchHotKey=\"mergedConfig.searchHotKey\" />\n\n <AgentScalarButton v-if=\"agent.agentEnabled.value\" />\n </div>\n <!-- Sidebar Start -->\n <slot\n name=\"sidebar-start\"\n v-bind=\"slotProps\" />\n </template>\n <template #footer>\n <slot\n name=\"sidebar-end\"\n v-bind=\"slotProps\">\n <!-- We default the sidebar footer to the standard scalar elements -->\n <ScalarSidebarFooter class=\"darklight-reference\">\n <OpenApiClientButton\n v-if=\"!mergedConfig.hideClientButton && !showMCPButton\"\n buttonSource=\"sidebar\"\n :integration=\"mergedConfig._integration\"\n :isDevelopment=\"isDevelopment\"\n :url=\"documentUrl\" />\n <OpenMCPButton\n v-if=\"showMCPButton\"\n :config=\"mergedConfig.mcp\"\n :externalUrls=\"mergedConfig.externalUrls\"\n :isDevelopment=\"isDevelopment\"\n :url=\"documentUrl\"\n :workspace=\"workspaceStore\" />\n <!-- Override the dark mode toggle slot to hide it -->\n <template #toggle>\n <ScalarColorModeToggleButton\n v-if=\"\n !mergedConfig.hideDarkModeToggle &&\n !mergedConfig.forceDarkModeState\n \"\n :modelValue=\"colorMode === 'dark'\"\n @update:modelValue=\"() => toggleColorMode()\" />\n <span v-else />\n </template>\n </ScalarSidebarFooter>\n </slot>\n </template>\n </ScalarSidebar>\n </template>\n </MobileHeader>\n\n <!-- Primary Content -->\n <main\n :aria-label=\"`Open API Documentation for ${workspaceStore.workspace.activeDocument?.info?.title}`\"\n class=\"references-rendered\"\n :inert=\"agent.showAgent.value\">\n <Content\n :authStore=\"clientStore.auth\"\n :clientDocument=\"clientStore.workspace.activeDocument\"\n :document=\"workspaceStore.workspace.activeDocument\"\n :environment\n :eventBus\n :expandedItems=\"sidebarState.expandedItems.value\"\n :headingSlugGenerator=\"\n mergedConfig.generateHeadingSlug ??\n ((heading) => `${activeSlug}/description/${heading.slug}`)\n \"\n :infoSectionId\n :items=\"sidebarItems\"\n :options=\"mergedConfig\"\n :xScalarDefaultClient=\"\n clientStore.workspace['x-scalar-default-client']\n \">\n <template #start>\n <!-- Placeholder intersection observer that emits an empty string to clear the hash when scrolled to the top -->\n <div ref=\"documentStartRef\" />\n\n <DeveloperTools\n v-if=\"workspaceStore.workspace.activeDocument\"\n v-model:overrides=\"configurationOverrides\"\n class=\"references-developer-tools\"\n :configuration=\"mergedConfig\"\n :externalUrls=\"mergedConfig.externalUrls\"\n :workspace=\"workspaceStore\" />\n\n <ClassicHeader v-if=\"mergedConfig.layout === 'classic'\">\n <div class=\"w-64 empty:hidden\">\n <DocumentSelector\n v-if=\"documentOptionList.length > 1\"\n :modelValue=\"activeSlug\"\n :options=\"documentOptionList\"\n @update:modelValue=\"changeSelectedDocument\" />\n </div>\n <SearchButton\n v-if=\"!mergedConfig.hideSearch\"\n class=\"t-doc__sidebar max-w-64\"\n :document=\"activeSearchableDocument\"\n :eventBus=\"eventBus\"\n :hideModels=\"mergedConfig.hideModels\"\n :modelsSectionLabel=\"mergedConfig.modelsSectionLabel\"\n :searchHotKey=\"mergedConfig.searchHotKey\" />\n <template #dark-mode-toggle>\n <ScalarColorModeToggleIcon\n v-if=\"\n !mergedConfig.hideDarkModeToggle &&\n !mergedConfig.forceDarkModeState\n \"\n class=\"text-c-2 hover:text-c-1\"\n :mode=\"colorMode\"\n style=\"transform: scale(1.4)\"\n variant=\"icon\"\n @click=\"() => toggleColorMode()\" />\n </template>\n </ClassicHeader>\n <slot\n name=\"content-start\"\n v-bind=\"slotProps\" />\n </template>\n <!-- TODO: Remove this; we no longer directly support an inline editor -->\n <template\n v-if=\"mergedConfig.isEditable\"\n #empty-state>\n <slot\n name=\"editor-placeholder\"\n v-bind=\"slotProps\" />\n </template>\n <template #end>\n <slot\n name=\"content-end\"\n v-bind=\"slotProps\" />\n </template>\n </Content>\n </main>\n <!-- Optional Footer -->\n <div\n v-if=\"$slots.footer\"\n class=\"references-footer\">\n <slot\n name=\"footer\"\n v-bind=\"slotProps\" />\n </div>\n <!-- Client Modal mount point -->\n <div ref=\"modal\" />\n </div>\n <ScalarToasts />\n </div>\n</template>\n\n<style>\n/* Add base styles to the body. Removed browser default margins for a better experience. */\n@layer scalar-base {\n body {\n margin: 0;\n background-color: var(--scalar-background-1);\n }\n}\n/** Used to check if css is loaded */\n:root {\n --scalar-loaded-api-reference: true;\n}\n</style>\n<style scoped>\n/* Configurable Layout Variables */\n@layer scalar-config {\n .scalar-api-reference {\n /* The header height */\n --refs-header-height: calc(\n var(--scalar-custom-header-height, 0px) + var(--scalar-header-height, 0px)\n );\n /* The offset of visible references content (minus headers) */\n --refs-viewport-offset: calc(\n var(--refs-header-height, 0px) + var(--refs-content-offset, 0px)\n );\n /* The calculated height of visible references content (minus headers) */\n --refs-viewport-height: calc(\n var(--full-height, 100dvh) - var(--refs-viewport-offset, 0px)\n );\n /* The width of the sidebar */\n --refs-sidebar-width: var(--scalar-sidebar-width, 0px);\n /* The height of the sidebar */\n --refs-sidebar-height: calc(\n var(--full-height, 100dvh) - var(--refs-header-height, 0px)\n );\n /* The maximum width of the content column */\n --refs-content-max-width: var(--scalar-content-max-width, 1540px);\n }\n\n .scalar-api-reference.references-classic {\n /* Classic layout is wider */\n --refs-content-max-width: var(--scalar-content-max-width, 1420px);\n min-height: 100dvh;\n --refs-sidebar-width: 0;\n }\n}\n.t-doc__sidebar {\n z-index: 10;\n}\n\n/* ----------------------------------------------------- */\n/* References Layout */\n.references-layout {\n /* Try to fill the container */\n min-height: 100dvh;\n min-width: 100%;\n max-width: 100%;\n flex: 1;\n\n /*\n Calculated by a resize observer and set in the style attribute\n Falls back to the viewport height\n */\n --full-height: 100dvh;\n\n /* Grid layout */\n display: grid;\n grid-template-rows: var(--scalar-header-height, 0px) repeat(2, auto);\n grid-template-columns: auto 1fr;\n grid-template-areas:\n 'header header'\n 'navigation rendered'\n 'footer footer';\n\n background: var(--scalar-background-1);\n}\n\n.references-editor {\n grid-area: editor;\n display: flex;\n min-width: 0;\n background: var(--scalar-background-1);\n}\n\n.references-rendered {\n position: relative;\n grid-area: rendered;\n min-width: 0;\n background: var(--scalar-background-1);\n}\n.scalar-api-reference.references-classic,\n.references-classic .references-rendered {\n height: initial !important;\n max-height: initial !important;\n}\n\n@layer scalar-config {\n .references-sidebar {\n /* Set a default width if references are enabled */\n --refs-sidebar-width: var(--scalar-sidebar-width, 288px);\n }\n}\n\n/* Footer */\n.references-footer {\n grid-area: footer;\n}\n/* ----------------------------------------------------- */\n/* Responsive / Mobile Layout */\n\n@media (max-width: 1000px) {\n /* Keep toolbar hidden on mobile without forcing desktop display mode. */\n .references-developer-tools {\n display: none;\n }\n\n /* Stack view on mobile */\n .references-layout {\n /* Adjust the sidebar height to the viewport height minus the header height */\n --refs-sidebar-height: calc(\n var(--full-height, 100dvh) - var(--scalar-custom-header-height, 0px)\n );\n\n grid-template-columns: 100%;\n grid-template-rows: var(--scalar-header-height, 0px) 0px auto auto;\n\n grid-template-areas:\n 'header'\n 'navigation'\n 'rendered'\n 'footer';\n }\n .references-editable {\n grid-template-areas:\n 'header'\n 'navigation'\n 'editor';\n }\n\n .references-rendered {\n position: static;\n }\n}\n</style>\n<style scoped>\n/**\n* Sidebar CSS for standalone\n* TODO: @brynn move this to the sidebar block OR the ApiReferenceStandalone component\n* when the new elements are available\n*/\n@media (max-width: 1000px) {\n .scalar-api-references-standalone-mobile:not(.references-classic) {\n --scalar-header-height: 50px;\n }\n}\n</style>\n<style scoped>\n.darklight-reference {\n width: 100%;\n margin-top: auto;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAM,UAAA;AAEN,IAAe,OAAO,WAAW,YAC/B,SAAQ,KAAK,yBAAyB,UAAS;;;;;EAoGjD,MAAM,QAAQ;EAiBd,MAAM,EAAE,oBAAoB,cAAa;;;;;;EAOzC,MAAM,gBAAA;EAEN,MAAM,sBAAsB,SAAS,uBAAsB;EAE3D,MAAM,WAAW,wBAAwB,EAAE,OAAO,eAAe,CAAA;EACjE,MAAM,gBAAgB,IAAI,MAAK;;;;;;;AAQ/B,qBAAmB,OAAO,CAAA;;;;;;;EAS1B,MAAM,aAAa,eAAe,wBAAwB,MAAM,cAAc,CAAA;EAE9E,MAAM,kBAAkB,eAAe,OAAO,KAAK,WAAW,MAAM,CAAC,SAAS,EAA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AGsB,CAFvB,WAEuB,KAAA,QAAA,sBAAA,eAAA,mBAAb,UAAA,MAAS,CAAA,EAAA,KAAA,GAAA,KAAA,CAAA,CAAA;;;;;;;;;;;;;;;KAWjBC,KAAAA,OAAO,UAAA,WAAA,EADf,mBAMM,OANN,YAMM,CAHJ,WAEuB,KAAA,QAAA,UAAA,eAAA,mBAAb,UAAA,MAAS,CAAA,EAAA,KAAA,GAAA,KAAA,CAAA,CAAA,IAAA,mBAAA,IAAA,KAAA;KAGrB,mBAAmB,OAAA;eAAV;MAAJ,KAAI;;;IAEX,YAAgB,MAAA,aAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"ApiReference.vue.script.js","names":["$attrs","$slots"],"sources":["../../src/components/ApiReference.vue"],"sourcesContent":["<script lang=\"ts\">\n// Injected by Vite at build time (see vite.config.ts and vite.standalone.config.ts).\n// Read via process.env so the constant is replaced inline without pulling package.json\n// into the TypeScript program — that would expand rootDir and emit declarations under dist/src/.\nconst version = PACKAGE_VERSION\n\nif (version && typeof window !== 'undefined') {\n console.info(`@scalar/api-reference@${version}`)\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { provideUseId } from '@headlessui/vue'\nimport { OpenApiClientButton } from '@scalar/api-client/blocks/operation-block'\nimport type { ApiClientModal } from '@scalar/api-client/modal'\nimport {\n ScalarColorModeToggleButton,\n ScalarColorModeToggleIcon,\n} from '@scalar/components/color-mode-toggle'\nimport { addScalarClassesToHeadless } from '@scalar/components/helpers'\nimport { ScalarSidebarFooter } from '@scalar/components/sidebar'\nimport { slugify } from '@scalar/helpers/string/slugify'\nimport { isLocalUrl } from '@scalar/helpers/url/is-local-url'\nimport { apiReferenceConfigurationSchema } from '@scalar/schemas/api-reference'\nimport {\n createSidebarState,\n ScalarSidebar,\n scrollSidebarToTop,\n} from '@scalar/sidebar'\nimport { getThemeStyles, hasObtrusiveScrollbars } from '@scalar/themes'\nimport {\n DEFAULT_MODELS_SECTION_LABEL,\n type AnyApiReferenceConfiguration,\n type ApiReferenceConfiguration,\n type ApiReferenceConfigurationRaw,\n} from '@scalar/types/api-reference'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\nimport { useColorMode } from '@scalar/use-hooks/useColorMode'\nimport { ScalarToasts } from '@scalar/use-toasts'\nimport { coerce } from '@scalar/validation'\nimport { getAsyncApiServers } from '@scalar/workspace-store/channel-example'\nimport { createWorkspaceStore } from '@scalar/workspace-store/client'\nimport { createWorkspaceEventBus } from '@scalar/workspace-store/events'\nimport {\n getActiveEnvironment,\n getServers,\n} from '@scalar/workspace-store/request-example'\nimport type {\n TraversedEntry,\n TraversedTag,\n} from '@scalar/workspace-store/schemas/navigation'\nimport {\n isAsyncApiDocument,\n isOpenApiDocument,\n} from '@scalar/workspace-store/schemas/type-guards'\nimport { useScrollLock } from '@vueuse/core'\nimport diff from 'microdiff'\nimport {\n computed,\n onBeforeMount,\n onBeforeUnmount,\n onMounted,\n onServerPrefetch,\n provide,\n ref,\n useId,\n useTemplateRef,\n watch,\n} from 'vue'\n\nimport {\n AgentScalarButton,\n AgentScalarDrawer,\n OpenMCPButton,\n} from '@/components/AgentScalar'\nimport ClassicHeader from '@/components/ClassicHeader.vue'\nimport Content from '@/components/Content/Content.vue'\nimport MobileHeader from '@/components/MobileHeader.vue'\nimport { DeveloperTools } from '@/features/developer-tools'\nimport DocumentSelector from '@/features/multiple-documents/DocumentSelector.vue'\nimport SearchButton from '@/features/Search/components/SearchButton.vue'\nimport { getSystemModePreference } from '@/helpers/color-mode'\nimport { downloadDocument } from '@/helpers/download'\nimport {\n getIdFromUrl,\n makeUrlFromId,\n matchesBasePath,\n redirectLegacyModelUrl,\n} from '@/helpers/id-routing'\nimport {\n scrollToLazy as _scrollToLazy,\n addToPriorityQueue,\n blockIntersection,\n intersectionEnabled,\n} from '@/helpers/lazy-bus'\nimport {\n loadAuthFromStorage,\n loadClientFromStorage,\n} from '@/helpers/load-from-perssistance'\nimport { mapConfigPlugins } from '@/helpers/map-config-plugins'\nimport { mapConfigToWorkspaceStore } from '@/helpers/map-config-to-workspace-store'\nimport {\n normalizeConfigurations,\n type NormalizedConfiguration,\n} from '@/helpers/normalize-configurations'\nimport { safeDeepClone } from '@/helpers/safe-deep-clone'\nimport { AGENT_CONTEXT_SYMBOL, useAgent } from '@/hooks/use-agent'\nimport { useIntersection } from '@/hooks/use-intersection'\nimport { createPluginManager, PLUGIN_MANAGER_SYMBOL } from '@/plugins'\nimport { persistencePlugin } from '@/plugins/persistence-plugin'\n\nconst props = defineProps<{\n /**\n * Configuration for the API reference.\n * Can be a single configuration or an array of configurations for multiple documents.\n */\n configuration?: AnyApiReferenceConfiguration\n}>()\n\ndefineSlots<{\n 'content-start'?(): { breadcrumb: string }\n 'content-end'?(): { breadcrumb: string }\n 'sidebar-start'?(): { breadcrumb: string }\n 'sidebar-end'?(): { breadcrumb: string }\n 'editor-placeholder'?(): { breadcrumb: string }\n footer?(): { breadcrumb: string }\n}>()\n\nconst { copyToClipboard } = useClipboard()\n\n/**\n * Used to inject the environment into built packages\n *\n * Primary use case is the open-in-client button\n */\nconst isDevelopment = import.meta.env.DEV\n\nconst obtrusiveScrollbars = computed(hasObtrusiveScrollbars)\n\nconst eventBus = createWorkspaceEventBus({ debug: isDevelopment })\nconst isSidebarOpen = ref(false)\n\n/**\n * Due to a bug in headless UI, we need to set an ID here that can be shared across server/client\n * TODO remove this once the bug is fixed\n *\n * @see https://github.com/tailwindlabs/headlessui/issues/2979\n */\nprovideUseId(() => useId())\n\n// ---------------------------------------------------------------------------\n/**\n * Configuration Handling\n *\n * We will normalize the configurations and store them in a computed property.\n * The active configuration will be associated with the active document.\n */\nconst configList = computed(() => normalizeConfigurations(props.configuration))\n\nconst isMultiDocument = computed(() => Object.keys(configList.value).length > 1)\n\n/** Search for the source with a default attribute or use the first one */\nconst activeSlug = ref<string>(\n Object.values(configList.value).find((c) => c.default)?.slug ??\n configList.value[Object.keys(configList.value)?.[0] ?? '']?.slug ??\n '',\n)\n\n/**\n * On initial page load we need to determine if there is a valid document slug in the URL\n *\n * If there is we set the active slug to the document slug\n */\nif (typeof window !== 'undefined') {\n const url = new URL(window.location.href)\n\n // To handle legacy query parameter multi-document support we redirect\n // to the new path routing format\n const apiParam = url.searchParams.get('api')\n if (apiParam && configList.value[apiParam]) {\n activeSlug.value = apiParam\n const idFromUrl = getIdFromUrl(\n url,\n configList.value[apiParam].config.pathRouting?.basePath,\n apiParam,\n )\n const newUrl = makeUrlFromId(\n idFromUrl,\n configList.value[apiParam].config.pathRouting?.basePath,\n isMultiDocument.value,\n )\n if (newUrl) {\n newUrl.searchParams.delete('api')\n window.history.replaceState({}, '', newUrl.toString())\n }\n }\n\n /**\n * For path routing on initial load we do not know which basePath to check for\n * we need to search the configs to see if any of the base paths match the URL\n * and then use that basePath to get the initial id\n *\n * With this approach we cannot support multi-document mode with one of configs having\n * an empty basePath\n *\n * Other conflicts are possible.\n */\n const basePaths = Object.values(configList.value).map(\n (c) => c.config.pathRouting?.basePath,\n )\n\n const initialId = getIdFromUrl(\n url,\n basePaths.find((p) => (p ? matchesBasePath(url, p) : false)),\n isMultiDocument.value ? undefined : activeSlug.value,\n )\n const documentSlug = initialId.split('/')[0]\n\n if (documentSlug && configList.value[documentSlug]) {\n activeSlug.value = documentSlug\n }\n}\n\n/** Computed document options list for the selector logic */\nconst documentOptionList = computed(() =>\n Object.values(configList.value).map((c) => ({\n label: c.title,\n id: c.slug,\n })),\n)\n\n/** Configuration overrides to apply to the selected document (from the localhost toolbar) */\nconst configurationOverrides = ref<\n Partial<Omit<ApiReferenceConfiguration, 'slug' | 'title' | ''>>\n>({})\n\n/** Any dev toolbar modifications are merged with the active configuration */\nconst mergedConfig = computed<ApiReferenceConfiguration>(() => {\n const merged = {\n // Provides a default set of values when the lookup fails\n ...coerce(apiReferenceConfigurationSchema, {}),\n // The active configuration based on the slug\n ...configList.value[activeSlug.value]?.config,\n // Any overrides from the localhost toolbar\n ...configurationOverrides.value,\n }\n\n return {\n ...merged,\n modelsSectionLabel:\n merged.modelsSectionLabel ?? DEFAULT_MODELS_SECTION_LABEL,\n }\n})\n\n/** Convenience break out var to determine which routing mode we are using */\nconst basePath = computed(() => mergedConfig.value.pathRouting?.basePath)\n\nconst themeStyle = computed(() =>\n getThemeStyles(mergedConfig.value.theme, {\n fonts: mergedConfig.value.withDefaultFonts,\n }),\n)\n\n/** Plugin injection is not reactive. All plugins must be provided at first render */\nconst pluginManager = createPluginManager({\n plugins: Object.values(configList.value).flatMap(\n (c) => c.config.plugins ?? [],\n ),\n})\nprovide(PLUGIN_MANAGER_SYMBOL, pluginManager)\n\npluginManager.notifyInit(mergedConfig.value)\n\nwatch(mergedConfig, (config) => pluginManager.notifyConfigChange(config))\n// ---------------------------------------------------------------------------\n/** Navigation State Handling */\n\n// Redirect legacy `/model/<name>` URLs to the current section's plural slug\n// so bookmarks from before the slug streamline keep resolving.\nif (typeof window !== 'undefined') {\n const canonical = redirectLegacyModelUrl(\n window.location.href,\n slugify(\n mergedConfig.value.modelsSectionLabel ?? DEFAULT_MODELS_SECTION_LABEL,\n ),\n activeSlug.value,\n isMultiDocument.value,\n mergedConfig.value.pathRouting?.basePath,\n )\n if (canonical) {\n window.history.replaceState({}, '', canonical.toString())\n }\n}\n\n// Front-end redirect\nif (mergedConfig.value.redirect && typeof window !== 'undefined') {\n const newPath = mergedConfig.value.redirect(\n (mergedConfig.value.pathRouting ? window.location.pathname : '') +\n window.location.hash,\n )\n if (newPath) {\n window.history.replaceState({}, '', newPath)\n }\n}\n\n/**\n * Sets the active slug and updates the URL with the selected document slug\n *\n * If an element ID is passed in we will configure the path or hash routing\n */\nfunction syncSlugAndUrlWithDocument(\n slug: string,\n elementId: string | undefined,\n config: ApiReferenceConfigurationRaw,\n) {\n // We create a new URL and go to the root element if an ID is not provided\n const url = makeUrlFromId(\n elementId || slug,\n config.pathRouting?.basePath,\n isMultiDocument.value,\n )\n\n if (url) {\n window.history.replaceState({}, '', url.toString())\n }\n\n // Update the active slug\n activeSlug.value = slug\n}\n\n// ---------------------------------------------------------------------------\n/** Workspace Store Initialization */\n\n/**\n * Initializes the new client workspace store.\n */\nconst workspaceStore = createWorkspaceStore({\n verbose: isDevelopment,\n})\n\n/**\n * We need to keep the client store separate from the workspace store\n * This is because we want the client store to be a playground where users can test out their requests without affecting the references store\n */\nconst clientStore = createWorkspaceStore({\n verbose: isDevelopment,\n plugins: [\n persistencePlugin({\n persistAuth: () => mergedConfig.value.persistAuth ?? false,\n }),\n ],\n})\n\n// TODO: persistence should be hoisted into standalone\n// Client side integrations will want to handle dark mode externally\nconst { toggleColorMode, isDarkMode } = useColorMode({\n initialColorMode: {\n true: 'dark' as const,\n false: 'light' as const,\n undefined: 'system' as const,\n }[String(mergedConfig.value.darkMode)],\n overrideColorMode: mergedConfig.value.forceDarkModeState,\n})\n\n/**\n * The active document passed to the search modal. Both OpenAPI and AsyncAPI\n * documents are surfaced so the search index can pick up info.description\n * headings from either spec; AsyncAPI-specific entries (channels, operations,\n * messages) are not indexed yet.\n */\nconst activeSearchableDocument = computed(\n () => workspaceStore.workspace.activeDocument,\n)\n\n/**\n * Create top level sidebar entries for each document\n * This allows sharing a single sidebar state for across the workspace\n */\nconst itemsFromWorkspace = computed<TraversedEntry[]>(() => {\n return Object.entries(workspaceStore.workspace.documents).map(\n ([slug, document]) => ({\n id: slug,\n type: 'document',\n description: document.info.description,\n name: document.info.title ?? slug,\n title: document.info.title ?? slug,\n // Both OpenAPI and AsyncAPI documents carry an `x-scalar-navigation` tree.\n children: document['x-scalar-navigation']?.children ?? [],\n }),\n )\n})\n\n/** Initialize the sidebar */\nconst sidebarState = createSidebarState<TraversedEntry>(itemsFromWorkspace, {\n hooks: {},\n})\n\n/** Recursively set all children of the given items to open */\nconst setChildrenOpen = (items: TraversedEntry[]): void => {\n items.forEach((item) => {\n if (item.type === 'tag' || item.type === 'models') {\n sidebarState.setExpanded(item.id, true)\n }\n if ('children' in item && item.children) {\n setChildrenOpen(item.children)\n }\n })\n}\n\n/** We get the sub items for the sidebar based on the configuration/document slug */\nconst sidebarItems = computed<TraversedEntry[]>(() => {\n const config = mergedConfig.value\n\n if (!config) {\n return []\n }\n\n const docItems =\n sidebarState.items.value.find(\n (item): item is TraversedTag => item.id === activeSlug.value,\n )?.children ?? []\n\n // When the default open all tags configuration is enabled we open all the children of the document\n if (config.defaultOpenAllTags) {\n setChildrenOpen(docItems)\n }\n\n // When the expand all model sections configuration is enabled we open all the children of the models tag\n if (config.expandAllModelSections) {\n const models = docItems.find(\n (item): item is TraversedTag => item.type === 'models',\n )\n if (models) {\n sidebarState.setExpanded(models.id, true)\n models.children?.forEach((child) => {\n sidebarState.setExpanded(child.id, true)\n })\n }\n }\n\n return docItems\n})\n\n/** Find the sidebar entry that represents the introduction section */\nconst infoSectionId = computed(\n () =>\n sidebarItems.value.find(\n (item) => item.type === 'text' && item.title === 'Introduction',\n )?.id ?? `${activeSlug.value}/description/introduction`,\n)\n\n/** User for mobile navigation */\nconst breadcrumb = ref('')\n\nconst slotProps = computed(() => ({\n breadcrumb: breadcrumb.value,\n}))\n\nconst setBreadcrumb = (id: string) => {\n const item = sidebarState.getEntryById(id)\n\n if (!item || item.type === 'document') {\n breadcrumb.value = ''\n } else {\n breadcrumb.value = item.title\n }\n}\n\nconst scrollToLazyElement = (id: string) => {\n setBreadcrumb(id)\n sidebarState.setSelected(id)\n _scrollToLazy(id, sidebarState.setExpanded, sidebarState.getEntryById)\n}\n\n/**\n * Updates the browser tab title via the user-provided `setPageTitle` callback.\n *\n * Called whenever the section in view changes — on sidebar clicks, on scroll, and\n * when switching documents — so the tab title always reflects what the reader sees.\n */\nconst updatePageTitle = (id: string) => {\n const setPageTitle = mergedConfig.value?.setPageTitle\n const entry = sidebarState.getEntryById(id)\n\n if (!setPageTitle || typeof document === 'undefined' || !entry?.title) {\n return\n }\n\n const activeDocument = workspaceStore.workspace.activeDocument\n\n document.title = setPageTitle({\n title: entry.title,\n document: {\n title: activeDocument?.info?.title ?? activeSlug.value,\n slug: activeSlug.value,\n },\n })\n}\n\n/** Maps some config values to the workspace store to keep it reactive */\nmapConfigToWorkspaceStore({\n config: () => mergedConfig.value,\n store: workspaceStore,\n isDarkMode,\n})\n\nmapConfigToWorkspaceStore({\n config: () => mergedConfig.value,\n store: clientStore,\n isDarkMode,\n})\n\n/** Merged environment variables from workspace and document levels */\nconst environment = computed(\n () =>\n getActiveEnvironment(\n workspaceStore,\n workspaceStore.workspace.activeDocument ?? null,\n ).environment,\n)\n\nif (typeof window !== 'undefined') {\n // @ts-expect-error - For debugging purposes expose the store\n window.dataDumpWorkspace = () => workspaceStore\n}\n\n// For testing\ndefineExpose({\n eventBus,\n workspaceStore,\n sidebarItems,\n})\n\n/**\n * Computes a mapping from model names to their sidebar entry IDs.\n * This is used for quick lookups and navigation within the sidebar.\n */\nconst modelsIndex = computed(() => {\n return sidebarItems.value\n .filter((item) => item.type === 'models')\n .flatMap((item) => item.children ?? [])\n .filter((item) => item.type === 'model')\n .reduce(\n (acc, item) => {\n acc[item.name] = item.id\n return acc\n },\n {} as Record<string, string>,\n )\n})\n\neventBus.on('scroll-to:model-by-name', ({ name }) => {\n /** Find the model in the models index */\n const model = modelsIndex.value[name]\n\n if (model) {\n scrollToLazyElement(model)\n }\n})\n\nconst addDocument: typeof workspaceStore.addDocument = async (\n input,\n navigationOptions,\n) => {\n const result = await workspaceStore.addDocument(input, navigationOptions)\n // Now add it to the client store\n const state = workspaceStore.exportWorkspace()\n clientStore.loadWorkspace({\n auth: {},\n documents: {\n [input.name]: safeDeepClone(state.documents[input.name]) ?? {\n 'openapi': '3.1.0',\n 'info': {\n title: '',\n version: '',\n },\n 'x-scalar-original-document-hash': '',\n },\n },\n intermediateDocuments: {},\n originalDocuments: {},\n overrides: {},\n history: {},\n meta: {},\n })\n return result\n}\n\n// ---------------------------------------------------------------------------\n// Document Management\n\n/**\n * Handle changing the active document\n *\n * 1. If the document has not be loaded to the workspace store we set it to empty and asynchronously load it\n * 2. If the document has been loaded to the workspace store we just set it to active\n * 3. If the content from the configuration has changes we need to update the document in the workspace store\n */\nconst changeSelectedDocument = async (\n slug: string,\n elementId?: string | undefined,\n) => {\n const normalized = configList.value[slug]\n\n if (!normalized) {\n console.warn(`Document ${slug} not found in configList`)\n return\n }\n\n const config = {\n ...normalized.config,\n ...configurationOverrides.value,\n }\n\n // Store `onDocumentSelect` result to await its execution later, before calling `onLoaded`\n const onDocumentSelectPromise = config.onDocumentSelect?.()\n\n // Set the active slug and update any routing\n syncSlugAndUrlWithDocument(slug, elementId, config)\n\n // Update the document on the route as well, the method and path don't matter as we update them before opening\n apiClient.value?.route({\n documentSlug: slug,\n method: 'get',\n path: '/',\n })\n\n const isFirstLoad = !workspaceStore.workspace.documents[slug]\n\n // If the document is not in the store, we asynchronously load it\n if (isFirstLoad) {\n const result = await addDocument(\n normalized.source.url\n ? {\n name: slug,\n url: normalized.source.url,\n fetch: config.customFetch,\n }\n : {\n name: slug,\n document: normalized.source.content ?? {},\n },\n config,\n )\n\n const document = clientStore.workspace.documents[slug]\n\n // If the document does not have a selected server we set it to the first server\n if (\n result === true &&\n isOpenApiDocument(document) &&\n document['x-scalar-selected-server'] === undefined\n ) {\n // Set the active server if the document is loaded successfully\n const servers = getServers(\n normalized.config.servers ?? document.servers,\n {\n baseServerUrl: mergedConfig.value.baseServerURL,\n documentUrl: normalized.source.url,\n },\n )\n if (servers.length > 0) {\n clientStore.updateDocument(\n slug,\n 'x-scalar-selected-server',\n servers[0]!.url,\n )\n }\n }\n }\n\n // Always set it to active; if the document is null we show a loading state\n workspaceStore.update('x-scalar-active-document', slug)\n clientStore.update('x-scalar-active-document', slug)\n\n // If the document has persistence enabled we load the auth schemes from storage\n if (config.persistAuth) {\n loadAuthFromStorage(clientStore, slug)\n }\n\n // ensure that `onLoaded` hook doesn't block execution but is executed after `onDocumentSelect`\n void (async () => {\n await onDocumentSelectPromise\n void config.onLoaded?.(slug)\n })()\n\n // When loading to a specified element we need to freeze and scroll\n if (elementId && elementId !== slug) {\n scrollToLazyElement(elementId)\n }\n // If there is no child element of the document specified and defaultOpenFirstTag is enabled, we expand the first tag\n else if (config.defaultOpenFirstTag) {\n const firstTag = sidebarItems.value.find((item) => item.type === 'tag')\n if (firstTag) {\n sidebarState.setExpanded(firstTag.id, true)\n }\n }\n\n // Reflect the freshly selected document in the browser tab title\n updatePageTitle(elementId && elementId !== slug ? elementId : slug)\n}\n\n/**\n * TODO:Move this to a dedicated updateDocument function in the future and\n * away from vue-reactivity based updates\n */\nwatch(\n () => Object.values(configList.value),\n async (newConfigList, oldConfigList) => {\n /**\n * Handles replacing and updating documents within the workspace store\n * when we detect configuration changes.\n */\n const updateSource = async (\n updated: NormalizedConfiguration,\n previous: NormalizedConfiguration | undefined,\n ) => {\n /** If we have not loaded the document previously we don't need to handle any updates to store */\n if (!workspaceStore.workspace.documents[updated.slug]) {\n return\n }\n /** If the URL has changed we fetch and rebase */\n if (updated.source.url && updated.source.url !== previous?.source.url) {\n await addDocument(\n {\n name: updated.slug,\n url: updated.source.url,\n fetch: updated.config.customFetch,\n },\n updated.config,\n )\n\n return\n }\n\n // If the was not a URL change then we require a document to continue\n if (!updated.source.content) {\n return\n }\n\n /**\n * We need to deeply check for document changes. Parse documents and then only rebase\n * if we detect deep changes in the two sources\n */\n if (\n diff(\n updated.source.content,\n previous && 'content' in previous.source\n ? (previous.source.content ?? {})\n : {},\n ).length\n ) {\n await addDocument(\n {\n name: updated.slug,\n document: updated.source.content,\n },\n updated.config,\n )\n }\n }\n\n newConfigList.forEach((newConfig, index) =>\n updateSource(newConfig, oldConfigList[index]),\n )\n\n const newSlugs = newConfigList.map((c) => c.slug)\n const oldSlugs = oldConfigList.map((c) => c.slug)\n\n // If the slugs have changed, we need to update the active document and the URL query param\n if (\n newSlugs.length !== oldSlugs.length ||\n !newSlugs.every((slug, index) => slug === oldSlugs[index])\n ) {\n await changeSelectedDocument(newSlugs[0] ?? '')\n }\n },\n {\n deep: true,\n },\n)\n\n/** Preload the first document during SSR */\nonServerPrefetch(() => changeSelectedDocument(activeSlug.value))\n\n/** Load the first document on page load */\nonBeforeMount(async () => {\n // We read the client from the client store so we need to set it to the client store\n loadClientFromStorage(clientStore)\n\n await changeSelectedDocument(\n activeSlug.value,\n getIdFromUrl(\n window.location.href,\n configList.value[activeSlug.value]?.config.pathRouting?.basePath,\n isMultiDocument.value ? undefined : activeSlug.value,\n ),\n )\n})\n\nconst documentUrl = computed(() => {\n return configList.value[activeSlug.value]?.source?.url\n})\n\n// --------------------------------------------------------------------------- */\n// Agent Scalar\n\n/**\n * Determines if Agent Scalar should be enabled based on the configuration and the current URL\n *\n * - If the agent is disabled in the configuration, it should not be enabled\n * - If the current URL is a local URL, it should be enabled\n * - If the agent key is set, it should be enabled\n */\nconst agent = useAgent({\n agentEnabled: computed(() => {\n const currentConfiguration = configList.value[activeSlug.value]\n\n if (currentConfiguration?.agent?.disabled) {\n return false\n }\n\n if (typeof window !== 'undefined' && isLocalUrl(window.location.href)) {\n return true\n }\n\n return Boolean(configList.value[activeSlug.value]?.agent?.key)\n }),\n})\nprovide(AGENT_CONTEXT_SYMBOL, agent)\n\n// --------------------------------------------------------------------------- */\n// Api Client Modal\n\n// Setup the ApiClient on mount.\n// The modal is dynamic-imported so its dependency graph (CodeMirror, the request\n// editor, the response viewer, etc.) becomes a separate chunk that loads\n// asynchronously after the API reference paints.\nconst modal = useTemplateRef<HTMLElement>('modal')\nconst apiClient = ref<ApiClientModal | null>(null)\nonMounted(async () => {\n if (!modal.value) {\n return\n }\n\n const { createApiClientModal } = await import('@scalar/api-client/modal')\n\n // Bail if the component unmounted while the chunk was loading.\n if (!modal.value) {\n return\n }\n\n apiClient.value = createApiClientModal({\n el: modal.value,\n eventBus,\n workspaceStore: clientStore,\n options: mergedConfig,\n plugins: [\n ...pluginManager.getApiClientPlugins(),\n ...mapConfigPlugins(mergedConfig, environment),\n ],\n })\n})\nonBeforeUnmount(() => {\n pluginManager.notifyDestroy()\n apiClient.value?.app.unmount()\n})\n\n// ---------------------------------------------------------------------------\n// Top level event handlers and user specified callbacks\n\n/** Ensure we call the onServerChange callback */\neventBus.on('server:update:selected', ({ url }) =>\n mergedConfig.value.onServerChange?.(url),\n)\n\n/**\n * AsyncAPI servers are keyed by name, so resolve the selected name to its\n * constructed connection URL before firing onServerChange, keeping the callback\n * payload consistent with OpenAPI (a URL string).\n */\neventBus.on('asyncapi-server:update:selected', ({ name }) => {\n const document = clientStore.workspace.activeDocument\n if (!isAsyncApiDocument(document)) {\n return\n }\n\n const server = getAsyncApiServers(document, { webSocketOnly: false }).find(\n (s) => s.name === name,\n )\n mergedConfig.value.onServerChange?.(server?.url ?? name)\n})\n\n/** Download the document from the store */\neventBus.on('ui:download:document', ({ format }) => {\n const document = workspaceStore.exportActiveDocument(format)\n\n if (!document) {\n console.error('No document found to download')\n return\n }\n\n void downloadDocument(document, activeSlug.value ?? 'openapi', format)\n})\n\n// ---------------------------------------------------------------------------\n// Local event and scroll handling\n\n/**\n * Handler for a direct navigation event such as a sidebar or search click\n *\n * Depending on the item type we handle a selection event differently:\n *\n * - Tag: If a tag is closed we open it and all its parents and scroll to it\n * If a tag is open we just close the tag\n * - Operation:\n * Open all parents and scroll to the operation\n */\nconst handleSelectSidebarEntry = (id: string, caller?: 'sidebar') => {\n const item = sidebarState.getEntryById(id)\n\n updatePageTitle(id)\n\n if (\n (item?.type === 'tag' ||\n item?.type === 'models' ||\n item?.type === 'text') &&\n sidebarState.isExpanded(id) && // Only close if the item is expanded\n sidebarState.selectedItem.value === id // Only close if the item is not the currently selected item\n ) {\n // hack until we fix intersection logic\n const unblock = blockIntersection()\n\n sidebarState.setExpanded(id, false)\n\n unblock()\n\n return\n }\n\n // Close the mobile menu upon selecting any item that's not a tag or model\n if (item?.type !== 'tag' && item?.type !== 'models') {\n isSidebarOpen.value = false\n }\n\n scrollToLazyElement(id)\n\n const url = makeUrlFromId(id, basePath.value, isMultiDocument.value)\n if (url) {\n window.history.pushState({}, '', url)\n\n // Trigger the onSidebarClick callback if the caller is sidebar\n if (caller === 'sidebar') {\n mergedConfig.value.onSidebarClick?.(url.toString())\n }\n }\n\n if (agent.showAgent.value) {\n agent.closeAgent()\n }\n}\n\n/** Handle a navigation item selection event */\neventBus.on('select:nav-item', ({ id }) => handleSelectSidebarEntry(id))\n\n/** Handle a scroll to navigation item event */\neventBus.on('scroll-to:nav-item', ({ id }) => handleSelectSidebarEntry(id))\n\n/** Handle an intersecting navigation item event */\neventBus.on('intersecting:nav-item', ({ id }) => {\n if (!intersectionEnabled.value) {\n return\n }\n\n sidebarState.setSelected(id)\n setBreadcrumb(id)\n\n // Keep the browser tab title in sync with the section scrolled into view\n updatePageTitle(id)\n\n // Scroll the sidebar to keep the selected element near the top\n scrollSidebarToTop(id)\n\n const url = makeUrlFromId(id, basePath.value, isMultiDocument.value)\n if (url && workspaceStore.workspace.activeDocument) {\n window.history.replaceState({}, '', url.toString())\n }\n})\n\neventBus.on('toggle:nav-item', ({ id, open }) => {\n if (open) {\n mergedConfig.value.onShowMore?.(id)\n\n // Pre-queue first child so it renders immediately when the tag expands\n const entry = sidebarState.getEntryById(id)\n if (entry && 'children' in entry && entry.children) {\n const first = entry.children[0]\n\n if (first) {\n addToPriorityQueue(first.id)\n }\n }\n }\n sidebarState.setExpanded(id, open ?? !sidebarState.isExpanded(id))\n})\n\neventBus.on('copy-url:nav-item', ({ id }) => {\n const url = makeUrlFromId(\n id,\n basePath.value,\n isMultiDocument.value,\n )?.toString()\n return url && copyToClipboard(url)\n})\n\n// ---------------------------------------------------------------------------\n// History and scroll restoration\n\nonBeforeMount(() => {\n window.history.scrollRestoration = 'manual'\n // Ensure we add our scalar wrapper class to the headless ui root, mounted is too late\n addScalarClassesToHeadless()\n\n // When we detect a back button press we scroll to the new id\n window.addEventListener('popstate', () => {\n const id = getIdFromUrl(\n window.location.href,\n mergedConfig.value.pathRouting?.basePath,\n isMultiDocument.value ? undefined : activeSlug.value,\n )\n if (id) {\n scrollToLazyElement(id)\n }\n })\n})\n\n// ---------------------------------------------------------------------------\n// Document start intersection observer\n\nconst documentStartRef = useTemplateRef<HTMLElement>('documentStartRef')\n\n/**\n * Uses `immediate` so the sentinel fires as soon as it enters the viewport (not just at the center strip).\n * When the user scrolls away from the top, both this observer and the first section's center-strip\n * observer are intersecting simultaneously, so the section observer does not re-fire on its own.\n * The `onExit` callback bridges that gap by finding whichever section is at the viewport center\n * and re-emitting the nav event for it.\n *\n * We emit the Introduction entry rather than the document slug so this sentinel and the Introduction\n * section's own intersection observer resolve to the same entry. Otherwise the two race at the top of\n * the document and the tab title flickers between the section title and the document title.\n */\nuseIntersection(\n documentStartRef,\n () => {\n eventBus.emit('intersecting:nav-item', { id: infoSectionId.value })\n },\n {\n onExit: () => {\n const centerY = window.innerHeight / 2\n const section = document\n .elementsFromPoint(window.innerWidth / 2, centerY)\n .find((el) => el.tagName === 'SECTION' && el.id)\n\n if (section?.id) {\n eventBus.emit('intersecting:nav-item', { id: section.id })\n }\n },\n immediate: true,\n },\n)\n\nconst colorMode = computed(() => {\n const mode = workspaceStore.workspace['x-scalar-color-mode']\n\n if (mode === 'system') {\n return getSystemModePreference()\n }\n\n return mode\n})\n\nconst bodyScrollLocked = useScrollLock(\n typeof document !== 'undefined' ? document.body : null,\n)\n\nwatch(agent.showAgent, () => (bodyScrollLocked.value = agent.showAgent.value))\n\nconst showMCPButton = computed(() => {\n if (mergedConfig.value.mcp?.disabled) {\n return false\n }\n\n if (typeof window !== 'undefined' && isLocalUrl(window.location.href)) {\n return true\n }\n\n if (mergedConfig.value.mcp) {\n return true\n }\n\n return false\n})\n</script>\n\n<template>\n <!-- SingleApiReference -->\n <div>\n <!-- Inject any custom CSS directly into a style tag -->\n <component :is=\"'style'\">\n {{ mergedConfig.customCss }}\n {{ themeStyle }}\n </component>\n <div\n ref=\"documentEl\"\n class=\"scalar-app scalar-api-reference references-layout\"\n :class=\"[\n {\n 'scalar-api-references-standalone-mobile': mergedConfig.showSidebar,\n 'scalar-scrollbars-obtrusive': obtrusiveScrollbars,\n 'references-editable': mergedConfig.isEditable,\n 'references-sidebar': mergedConfig.showSidebar,\n 'references-sidebar-mobile-open': isSidebarOpen,\n 'references-classic': mergedConfig.layout === 'classic',\n },\n $attrs.class,\n ]\">\n <!-- Agent Scalar -->\n <AgentScalarDrawer\n v-if=\"agent.agentEnabled.value\"\n :agentScalarConfiguration=\"configList[activeSlug]?.agent\"\n :externalUrls=\"mergedConfig.externalUrls\"\n :workspaceStore />\n\n <!-- Mobile Header and Sidebar when in modern layout -->\n\n <MobileHeader\n v-if=\"mergedConfig.layout === 'modern'\"\n :breadcrumb=\"breadcrumb\"\n :isSidebarOpen=\"isSidebarOpen\"\n :showSidebar=\"mergedConfig.showSidebar\"\n @toggleSidebar=\"() => (isSidebarOpen = !isSidebarOpen)\">\n <template #search>\n <SearchButton\n v-if=\"!mergedConfig.hideSearch\"\n class=\"my-2\"\n :document=\"activeSearchableDocument\"\n :eventBus=\"eventBus\"\n :hideModels=\"mergedConfig.hideModels\"\n :modelsSectionLabel=\"mergedConfig.modelsSectionLabel\"\n :searchHotKey=\"mergedConfig.searchHotKey\"\n :showSidebar=\"mergedConfig.showSidebar\" />\n </template>\n <template #sidebar=\"{ sidebarClasses }\">\n <ScalarSidebar\n v-if=\"mergedConfig.showSidebar && mergedConfig.layout === 'modern'\"\n :aria-label=\"`Sidebar for ${workspaceStore.workspace.activeDocument?.info?.title}`\"\n class=\"t-doc__sidebar\"\n :class=\"sidebarClasses\"\n :isExpanded=\"sidebarState.isExpanded\"\n :isSelected=\"sidebarState.isSelected\"\n :items=\"sidebarItems\"\n layout=\"reference\"\n :options=\"mergedConfig\"\n role=\"navigation\"\n @selectItem=\"(id) => handleSelectSidebarEntry(id, 'sidebar')\"\n @toggleGroup=\"\n (id: string) =>\n sidebarState.setExpanded(id, !sidebarState.isExpanded(id))\n \">\n <template #header>\n <!-- Wrap in a div when slot is filled -->\n <DocumentSelector\n v-if=\"documentOptionList.length > 1\"\n :modelValue=\"activeSlug\"\n :options=\"documentOptionList\"\n @update:modelValue=\"changeSelectedDocument\" />\n\n <!-- Search -->\n <div\n v-if=\"!mergedConfig.hideSearch\"\n class=\"flex gap-1.5 px-3 pt-3\">\n <SearchButton\n :document=\"activeSearchableDocument\"\n :eventBus=\"eventBus\"\n :hideModels=\"mergedConfig.hideModels\"\n :modelsSectionLabel=\"mergedConfig.modelsSectionLabel\"\n :searchHotKey=\"mergedConfig.searchHotKey\" />\n\n <AgentScalarButton v-if=\"agent.agentEnabled.value\" />\n </div>\n <!-- Sidebar Start -->\n <slot\n name=\"sidebar-start\"\n v-bind=\"slotProps\" />\n </template>\n <template #footer>\n <slot\n name=\"sidebar-end\"\n v-bind=\"slotProps\">\n <!-- We default the sidebar footer to the standard scalar elements -->\n <ScalarSidebarFooter class=\"darklight-reference\">\n <OpenApiClientButton\n v-if=\"!mergedConfig.hideClientButton && !showMCPButton\"\n buttonSource=\"sidebar\"\n :integration=\"mergedConfig._integration\"\n :isDevelopment=\"isDevelopment\"\n :url=\"documentUrl\" />\n <OpenMCPButton\n v-if=\"showMCPButton\"\n :config=\"mergedConfig.mcp\"\n :externalUrls=\"mergedConfig.externalUrls\"\n :isDevelopment=\"isDevelopment\"\n :url=\"documentUrl\"\n :workspace=\"workspaceStore\" />\n <!-- Override the dark mode toggle slot to hide it -->\n <template #toggle>\n <ScalarColorModeToggleButton\n v-if=\"\n !mergedConfig.hideDarkModeToggle &&\n !mergedConfig.forceDarkModeState\n \"\n :modelValue=\"colorMode === 'dark'\"\n @update:modelValue=\"() => toggleColorMode()\" />\n <span v-else />\n </template>\n </ScalarSidebarFooter>\n </slot>\n </template>\n </ScalarSidebar>\n </template>\n </MobileHeader>\n\n <!-- Primary Content -->\n <main\n :aria-label=\"`Open API Documentation for ${workspaceStore.workspace.activeDocument?.info?.title}`\"\n class=\"references-rendered\"\n :inert=\"agent.showAgent.value\">\n <Content\n :authStore=\"clientStore.auth\"\n :clientDocument=\"clientStore.workspace.activeDocument\"\n :document=\"workspaceStore.workspace.activeDocument\"\n :environment\n :eventBus\n :expandedItems=\"sidebarState.expandedItems.value\"\n :headingSlugGenerator=\"\n mergedConfig.generateHeadingSlug ??\n ((heading) => `${activeSlug}/description/${heading.slug}`)\n \"\n :infoSectionId\n :items=\"sidebarItems\"\n :options=\"mergedConfig\"\n :xScalarDefaultClient=\"\n clientStore.workspace['x-scalar-default-client']\n \">\n <template #start>\n <!-- Placeholder intersection observer that emits an empty string to clear the hash when scrolled to the top -->\n <div ref=\"documentStartRef\" />\n\n <DeveloperTools\n v-if=\"workspaceStore.workspace.activeDocument\"\n v-model:overrides=\"configurationOverrides\"\n class=\"references-developer-tools\"\n :configuration=\"mergedConfig\"\n :externalUrls=\"mergedConfig.externalUrls\"\n :workspace=\"workspaceStore\" />\n\n <ClassicHeader v-if=\"mergedConfig.layout === 'classic'\">\n <div class=\"w-64 empty:hidden\">\n <DocumentSelector\n v-if=\"documentOptionList.length > 1\"\n :modelValue=\"activeSlug\"\n :options=\"documentOptionList\"\n @update:modelValue=\"changeSelectedDocument\" />\n </div>\n <SearchButton\n v-if=\"!mergedConfig.hideSearch\"\n class=\"t-doc__sidebar max-w-64\"\n :document=\"activeSearchableDocument\"\n :eventBus=\"eventBus\"\n :hideModels=\"mergedConfig.hideModels\"\n :modelsSectionLabel=\"mergedConfig.modelsSectionLabel\"\n :searchHotKey=\"mergedConfig.searchHotKey\" />\n <template #dark-mode-toggle>\n <ScalarColorModeToggleIcon\n v-if=\"\n !mergedConfig.hideDarkModeToggle &&\n !mergedConfig.forceDarkModeState\n \"\n class=\"text-c-2 hover:text-c-1\"\n :mode=\"colorMode\"\n style=\"transform: scale(1.4)\"\n variant=\"icon\"\n @click=\"() => toggleColorMode()\" />\n </template>\n </ClassicHeader>\n <slot\n name=\"content-start\"\n v-bind=\"slotProps\" />\n </template>\n <!-- TODO: Remove this; we no longer directly support an inline editor -->\n <template\n v-if=\"mergedConfig.isEditable\"\n #empty-state>\n <slot\n name=\"editor-placeholder\"\n v-bind=\"slotProps\" />\n </template>\n <template #end>\n <slot\n name=\"content-end\"\n v-bind=\"slotProps\" />\n </template>\n </Content>\n </main>\n <!-- Optional Footer -->\n <div\n v-if=\"$slots.footer\"\n class=\"references-footer\">\n <slot\n name=\"footer\"\n v-bind=\"slotProps\" />\n </div>\n <!-- Client Modal mount point -->\n <div ref=\"modal\" />\n </div>\n <ScalarToasts />\n </div>\n</template>\n\n<style>\n/* Add base styles to the body. Removed browser default margins for a better experience. */\n@layer scalar-base {\n body {\n margin: 0;\n background-color: var(--scalar-background-1);\n }\n}\n/** Used to check if css is loaded */\n:root {\n --scalar-loaded-api-reference: true;\n}\n</style>\n<style scoped>\n/* Configurable Layout Variables */\n@layer scalar-config {\n .scalar-api-reference {\n /* The header height */\n --refs-header-height: calc(\n var(--scalar-custom-header-height, 0px) + var(--scalar-header-height, 0px)\n );\n /* The offset of visible references content (minus headers) */\n --refs-viewport-offset: calc(\n var(--refs-header-height, 0px) + var(--refs-content-offset, 0px)\n );\n /* The calculated height of visible references content (minus headers) */\n --refs-viewport-height: calc(\n var(--full-height, 100dvh) - var(--refs-viewport-offset, 0px)\n );\n /* The width of the sidebar */\n --refs-sidebar-width: var(--scalar-sidebar-width, 0px);\n /* The height of the sidebar */\n --refs-sidebar-height: calc(\n var(--full-height, 100dvh) - var(--refs-header-height, 0px)\n );\n /* The maximum width of the content column */\n --refs-content-max-width: var(--scalar-content-max-width, 1540px);\n }\n\n .scalar-api-reference.references-classic {\n /* Classic layout is wider */\n --refs-content-max-width: var(--scalar-content-max-width, 1420px);\n min-height: 100dvh;\n --refs-sidebar-width: 0;\n }\n}\n.t-doc__sidebar {\n z-index: 10;\n}\n\n/* ----------------------------------------------------- */\n/* References Layout */\n.references-layout {\n /* Try to fill the container */\n min-height: 100dvh;\n min-width: 100%;\n max-width: 100%;\n flex: 1;\n\n /*\n Calculated by a resize observer and set in the style attribute\n Falls back to the viewport height\n */\n --full-height: 100dvh;\n\n /* Grid layout */\n display: grid;\n grid-template-rows: var(--scalar-header-height, 0px) repeat(2, auto);\n grid-template-columns: auto 1fr;\n grid-template-areas:\n 'header header'\n 'navigation rendered'\n 'footer footer';\n\n background: var(--scalar-background-1);\n}\n\n.references-editor {\n grid-area: editor;\n display: flex;\n min-width: 0;\n background: var(--scalar-background-1);\n}\n\n.references-rendered {\n position: relative;\n grid-area: rendered;\n min-width: 0;\n background: var(--scalar-background-1);\n}\n.scalar-api-reference.references-classic,\n.references-classic .references-rendered {\n height: initial !important;\n max-height: initial !important;\n}\n\n@layer scalar-config {\n .references-sidebar {\n /* Set a default width if references are enabled */\n --refs-sidebar-width: var(--scalar-sidebar-width, 288px);\n }\n}\n\n/* Footer */\n.references-footer {\n grid-area: footer;\n}\n/* ----------------------------------------------------- */\n/* Responsive / Mobile Layout */\n\n@media (max-width: 1000px) {\n /* Keep toolbar hidden on mobile without forcing desktop display mode. */\n .references-developer-tools {\n display: none;\n }\n\n /* Stack view on mobile */\n .references-layout {\n /* Adjust the sidebar height to the viewport height minus the header height */\n --refs-sidebar-height: calc(\n var(--full-height, 100dvh) - var(--scalar-custom-header-height, 0px)\n );\n\n grid-template-columns: 100%;\n grid-template-rows: var(--scalar-header-height, 0px) 0px auto auto;\n\n grid-template-areas:\n 'header'\n 'navigation'\n 'rendered'\n 'footer';\n }\n .references-editable {\n grid-template-areas:\n 'header'\n 'navigation'\n 'editor';\n }\n\n .references-rendered {\n position: static;\n }\n}\n</style>\n<style scoped>\n/**\n* Sidebar CSS for standalone\n* TODO: @brynn move this to the sidebar block OR the ApiReferenceStandalone component\n* when the new elements are available\n*/\n@media (max-width: 1000px) {\n .scalar-api-references-standalone-mobile:not(.references-classic) {\n --scalar-header-height: 50px;\n }\n}\n</style>\n<style scoped>\n.darklight-reference {\n width: 100%;\n margin-top: auto;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAM,UAAA;AAEN,IAAe,OAAO,WAAW,YAC/B,SAAQ,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A6B;SAC7B,SAAQ;SACP,SAAK,OAAA,OAAA,OAAA,WAAQ,MAAA,gBAAe,EAAA;;+BAnB3B,CANN,mBAMM,OANN,YAMM,CAJI,mBAAA,MAAmB,SAAM,KAAA,WAAA,EADjC,YAIgD,0BAAA;;SAF7C,YAAY,WAAA;SACZ,SAAS,mBAAA;SACT,uBAAmB;mFAGf,aAAA,MAAa,cAAA,WAAA,EADtB,YAO8C,sBAAA;;SAL5C,OAAM;SACL,UAAU,yBAAA;SACV,UAAU,MAAA,SAAQ;SAClB,YAAY,aAAA,MAAa;SACzB,oBAAoB,aAAA,MAAa;SACjC,cAAc,aAAA,MAAa;;;;;;;;;;OAchC,WAEuB,KAAA,QAAA,iBAAA,eAAA,mBAAb,UAAA,MAAS,CAAA,EAAA,KAAA,GAAA,KAAA;;MAUV,KAAG,cAGW,CAFvB,WAEuB,KAAA,QAAA,eAAA,eAAA,mBAAb,UAAA,MAAS,CAAA,EAAA,KAAA,GAAA,KAAA,CAAA,CAAA;;SATb,aAAA,MAAa,aAAA;YAClB;wBAGsB,CAFvB,WAEuB,KAAA,QAAA,sBAAA,eAAA,mBAAb,UAAA,MAAS,CAAA,EAAA,KAAA,GAAA,KAAA,CAAA,CAAA;;;;;;;;;;;;;;;KAWjBC,KAAAA,OAAO,UAAA,WAAA,EADf,mBAMM,OANN,YAMM,CAHJ,WAEuB,KAAA,QAAA,UAAA,eAAA,mBAAb,UAAA,MAAS,CAAA,EAAA,KAAA,GAAA,KAAA,CAAA,CAAA,IAAA,mBAAA,IAAA,KAAA;KAGrB,mBAAmB,OAAA;eAAV;MAAJ,KAAI;;;IAEX,YAAgB,MAAA,aAAA,CAAA"}
|
|
@@ -6,7 +6,7 @@ type __VLS_Props = {
|
|
|
6
6
|
entries: TraversedEntry[];
|
|
7
7
|
document: AsyncApiDocument;
|
|
8
8
|
expandedItems: Record<string, boolean>;
|
|
9
|
-
options: Pick<ApiReferenceConfigurationRaw, 'layout' | 'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy' | 'hideModels' | 'modelsSectionLabel'>;
|
|
9
|
+
options: Pick<ApiReferenceConfigurationRaw, 'layout' | 'expandAllSchemaProperties' | 'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy' | 'hideModels' | 'modelsSectionLabel'>;
|
|
10
10
|
eventBus: WorkspaceEventBus;
|
|
11
11
|
level?: number;
|
|
12
12
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AsyncApiTraversedEntry.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/AsyncApi/AsyncApiTraversedEntry.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AsyncApiTraversedEntry.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/AsyncApi/AsyncApiTraversedEntry.vue"],"names":[],"mappings":"AAmKA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAA;AAC/E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAClE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAKvE,OAAO,KAAK,EAEV,cAAc,EAIf,MAAM,4CAA4C,CAAA;AAWnD,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,cAAc,EAAE,CAAA;IACzB,QAAQ,EAAE,gBAAgB,CAAA;IAC1B,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACtC,OAAO,EAAE,IAAI,CACX,4BAA4B,EAC1B,QAAQ,GACR,2BAA2B,GAC3B,8BAA8B,GAC9B,yBAAyB,GACzB,YAAY,GACZ,oBAAoB,CACvB,CAAA;IACD,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAC;AAyPF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AsyncApiTraversedEntry.vue.js","names":[],"sources":["../../../../src/components/Content/AsyncApi/AsyncApiTraversedEntry.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference'\nimport type { AsyncApiDocument } from '@scalar/types/asyncapi/3.1'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport {\n getResolvedRef,\n mergeSiblingReferences,\n} from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type {\n TraversedAsyncApiChannel,\n TraversedEntry,\n TraversedModels,\n TraversedSchema,\n TraversedTag,\n} from '@scalar/workspace-store/schemas/navigation'\nimport { computed } from 'vue'\n\nimport Model from '@/components/Content/Models/Model.vue'\nimport ModelTag from '@/components/Content/Models/ModelTag.vue'\nimport { Tag } from '@/components/Content/Tags'\nimport Lazy from '@/components/Lazy/Lazy.vue'\nimport { getAsyncApiModelSchema } from '@/helpers/get-async-api-model-schema'\n\nimport Channel from './Channel.vue'\n\nconst {\n entries,\n document,\n expandedItems,\n options,\n eventBus,\n level = 0,\n} = defineProps<{\n entries: TraversedEntry[]\n document: AsyncApiDocument\n expandedItems: Record<string, boolean>\n options: Pick<\n ApiReferenceConfigurationRaw,\n | 'layout'\n | 'orderRequiredPropertiesFirst'\n | 'orderSchemaPropertiesBy'\n | 'hideModels'\n | 'modelsSectionLabel'\n >\n eventBus: WorkspaceEventBus\n level?: number\n}>()\n\nconst isTagGroup = (\n entry: TraversedEntry,\n): entry is TraversedTag & { isGroup: true } =>\n entry.type === 'tag' && entry.isGroup === true\n/**\n * Narrow to a regular (non-group) tag. Tag groups go through a separate branch\n * and must not inflate the sibling-tag count used for `moreThanOneTag`,\n * otherwise `ModernLayout` shows a \"Show more\" button for a lone tag whenever\n * it sits next to a tag group.\n */\nconst isTag = (\n entry: TraversedEntry,\n): entry is TraversedTag & { isGroup: false } =>\n entry.type === 'tag' && !isTagGroup(entry)\nconst isChannel = (entry: TraversedEntry): entry is TraversedAsyncApiChannel =>\n entry.type === 'asyncapi-channel'\n\n/** The top-level \"Models\" container that wraps individual schema entries. */\nconst isModelsTag = (entry: TraversedEntry): entry is TraversedModels =>\n entry.type === 'models'\n\n/** A single schema rendered as a model. */\nconst isModel = (entry: TraversedEntry): entry is TraversedSchema =>\n entry.type === 'model'\n\n/**\n * Reusable schemas live under `components.schemas`, the same place OpenAPI keeps them.\n * Resolve the wrapper once (merging `$ref` siblings) so the template can gate the Models section.\n */\nconst componentSchemas = computed(() =>\n document.components\n ? getResolvedRef(document.components, mergeSiblingReferences).schemas\n : undefined,\n)\n\n/** Resolve a schema by name into the shape the shared Model component expects. */\nconst getModelSchema = (name: string) => getAsyncApiModelSchema(document, name)\n</script>\n\n<template>\n <Lazy\n v-for=\"entry in entries\"\n :id=\"entry.id\"\n :key=\"`${entry.id}-${options.layout}`\"\n :expanded=\"!!expandedItems[entry.id]\">\n <Channel\n v-if=\"isChannel(entry)\"\n :channel=\"entry\"\n :document=\"document\"\n :eventBus=\"eventBus\"\n :isCollapsed=\"!expandedItems[entry.id]\"\n :layout=\"options.layout\" />\n\n <Tag\n v-else-if=\"\n isTag(entry) || (isTagGroup(entry) && options.layout === 'classic')\n \"\n :eventBus=\"eventBus\"\n :isCollapsed=\"!expandedItems[entry.id]\"\n :isLoading=\"false\"\n :layout=\"options.layout\"\n :moreThanOneTag=\"entries.filter(isTag).length > 1\"\n :tag=\"entry\">\n <template v-if=\"entry.children?.length\">\n <AsyncApiTraversedEntry\n :document=\"document\"\n :entries=\"entry.children\"\n :eventBus=\"eventBus\"\n :expandedItems=\"expandedItems\"\n :level=\"level + 1\"\n :options=\"options\" />\n </template>\n </Tag>\n\n <AsyncApiTraversedEntry\n v-else-if=\"isTagGroup(entry)\"\n :document=\"document\"\n :entries=\"entry.children ?? []\"\n :eventBus=\"eventBus\"\n :expandedItems=\"expandedItems\"\n :level=\"level + 1\"\n :options=\"options\" />\n\n <!-- Models -->\n <ModelTag\n v-else-if=\"isModelsTag(entry) && componentSchemas\"\n :id=\"entry.id\"\n :eventBus=\"eventBus\"\n :isCollapsed=\"!expandedItems[entry.id]\"\n :layout=\"options.layout\"\n :modelsSectionLabel=\"options.modelsSectionLabel\">\n <AsyncApiTraversedEntry\n :document=\"document\"\n :entries=\"entry.children ?? []\"\n :eventBus=\"eventBus\"\n :expandedItems=\"expandedItems\"\n :level=\"level + 1\"\n :options=\"options\" />\n </ModelTag>\n\n <Model\n v-else-if=\"isModel(entry) && getModelSchema(entry.name)\"\n :id=\"entry.id\"\n :eventBus=\"eventBus\"\n :isCollapsed=\"!expandedItems[entry.id]\"\n :name=\"entry.name\"\n :options=\"options\"\n :schema=\"getModelSchema(entry.name)\" />\n </Lazy>\n</template>\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"AsyncApiTraversedEntry.vue.js","names":[],"sources":["../../../../src/components/Content/AsyncApi/AsyncApiTraversedEntry.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference'\nimport type { AsyncApiDocument } from '@scalar/types/asyncapi/3.1'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport {\n getResolvedRef,\n mergeSiblingReferences,\n} from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type {\n TraversedAsyncApiChannel,\n TraversedEntry,\n TraversedModels,\n TraversedSchema,\n TraversedTag,\n} from '@scalar/workspace-store/schemas/navigation'\nimport { computed } from 'vue'\n\nimport Model from '@/components/Content/Models/Model.vue'\nimport ModelTag from '@/components/Content/Models/ModelTag.vue'\nimport { Tag } from '@/components/Content/Tags'\nimport Lazy from '@/components/Lazy/Lazy.vue'\nimport { getAsyncApiModelSchema } from '@/helpers/get-async-api-model-schema'\n\nimport Channel from './Channel.vue'\n\nconst {\n entries,\n document,\n expandedItems,\n options,\n eventBus,\n level = 0,\n} = defineProps<{\n entries: TraversedEntry[]\n document: AsyncApiDocument\n expandedItems: Record<string, boolean>\n options: Pick<\n ApiReferenceConfigurationRaw,\n | 'layout'\n | 'expandAllSchemaProperties'\n | 'orderRequiredPropertiesFirst'\n | 'orderSchemaPropertiesBy'\n | 'hideModels'\n | 'modelsSectionLabel'\n >\n eventBus: WorkspaceEventBus\n level?: number\n}>()\n\nconst isTagGroup = (\n entry: TraversedEntry,\n): entry is TraversedTag & { isGroup: true } =>\n entry.type === 'tag' && entry.isGroup === true\n/**\n * Narrow to a regular (non-group) tag. Tag groups go through a separate branch\n * and must not inflate the sibling-tag count used for `moreThanOneTag`,\n * otherwise `ModernLayout` shows a \"Show more\" button for a lone tag whenever\n * it sits next to a tag group.\n */\nconst isTag = (\n entry: TraversedEntry,\n): entry is TraversedTag & { isGroup: false } =>\n entry.type === 'tag' && !isTagGroup(entry)\nconst isChannel = (entry: TraversedEntry): entry is TraversedAsyncApiChannel =>\n entry.type === 'asyncapi-channel'\n\n/** The top-level \"Models\" container that wraps individual schema entries. */\nconst isModelsTag = (entry: TraversedEntry): entry is TraversedModels =>\n entry.type === 'models'\n\n/** A single schema rendered as a model. */\nconst isModel = (entry: TraversedEntry): entry is TraversedSchema =>\n entry.type === 'model'\n\n/**\n * Reusable schemas live under `components.schemas`, the same place OpenAPI keeps them.\n * Resolve the wrapper once (merging `$ref` siblings) so the template can gate the Models section.\n */\nconst componentSchemas = computed(() =>\n document.components\n ? getResolvedRef(document.components, mergeSiblingReferences).schemas\n : undefined,\n)\n\n/** Resolve a schema by name into the shape the shared Model component expects. */\nconst getModelSchema = (name: string) => getAsyncApiModelSchema(document, name)\n</script>\n\n<template>\n <Lazy\n v-for=\"entry in entries\"\n :id=\"entry.id\"\n :key=\"`${entry.id}-${options.layout}`\"\n :expanded=\"!!expandedItems[entry.id]\">\n <Channel\n v-if=\"isChannel(entry)\"\n :channel=\"entry\"\n :document=\"document\"\n :eventBus=\"eventBus\"\n :isCollapsed=\"!expandedItems[entry.id]\"\n :layout=\"options.layout\"\n :options=\"options\" />\n\n <Tag\n v-else-if=\"\n isTag(entry) || (isTagGroup(entry) && options.layout === 'classic')\n \"\n :eventBus=\"eventBus\"\n :isCollapsed=\"!expandedItems[entry.id]\"\n :isLoading=\"false\"\n :layout=\"options.layout\"\n :moreThanOneTag=\"entries.filter(isTag).length > 1\"\n :tag=\"entry\">\n <template v-if=\"entry.children?.length\">\n <AsyncApiTraversedEntry\n :document=\"document\"\n :entries=\"entry.children\"\n :eventBus=\"eventBus\"\n :expandedItems=\"expandedItems\"\n :level=\"level + 1\"\n :options=\"options\" />\n </template>\n </Tag>\n\n <AsyncApiTraversedEntry\n v-else-if=\"isTagGroup(entry)\"\n :document=\"document\"\n :entries=\"entry.children ?? []\"\n :eventBus=\"eventBus\"\n :expandedItems=\"expandedItems\"\n :level=\"level + 1\"\n :options=\"options\" />\n\n <!-- Models -->\n <ModelTag\n v-else-if=\"isModelsTag(entry) && componentSchemas\"\n :id=\"entry.id\"\n :eventBus=\"eventBus\"\n :isCollapsed=\"!expandedItems[entry.id]\"\n :layout=\"options.layout\"\n :modelsSectionLabel=\"options.modelsSectionLabel\">\n <AsyncApiTraversedEntry\n :document=\"document\"\n :entries=\"entry.children ?? []\"\n :eventBus=\"eventBus\"\n :expandedItems=\"expandedItems\"\n :level=\"level + 1\"\n :options=\"options\" />\n </ModelTag>\n\n <Model\n v-else-if=\"isModel(entry) && getModelSchema(entry.name)\"\n :id=\"entry.id\"\n :eventBus=\"eventBus\"\n :isCollapsed=\"!expandedItems[entry.id]\"\n :name=\"entry.name\"\n :options=\"options\"\n :schema=\"getModelSchema(entry.name)\" />\n </Lazy>\n</template>\n"],"mappings":""}
|
|
@@ -52,13 +52,15 @@ var AsyncApiTraversedEntry_vue_vue_type_script_setup_true_lang_default = /* @__P
|
|
|
52
52
|
document: __props.document,
|
|
53
53
|
eventBus: __props.eventBus,
|
|
54
54
|
isCollapsed: !__props.expandedItems[entry.id],
|
|
55
|
-
layout: __props.options.layout
|
|
55
|
+
layout: __props.options.layout,
|
|
56
|
+
options: __props.options
|
|
56
57
|
}, null, 8, [
|
|
57
58
|
"channel",
|
|
58
59
|
"document",
|
|
59
60
|
"eventBus",
|
|
60
61
|
"isCollapsed",
|
|
61
|
-
"layout"
|
|
62
|
+
"layout",
|
|
63
|
+
"options"
|
|
62
64
|
])) : isTag(entry) || isTagGroup(entry) && __props.options.layout === "classic" ? (openBlock(), createBlock(unref(Tag_default), {
|
|
63
65
|
key: 1,
|
|
64
66
|
eventBus: __props.eventBus,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AsyncApiTraversedEntry.vue.script.js","names":[],"sources":["../../../../src/components/Content/AsyncApi/AsyncApiTraversedEntry.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference'\nimport type { AsyncApiDocument } from '@scalar/types/asyncapi/3.1'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport {\n getResolvedRef,\n mergeSiblingReferences,\n} from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type {\n TraversedAsyncApiChannel,\n TraversedEntry,\n TraversedModels,\n TraversedSchema,\n TraversedTag,\n} from '@scalar/workspace-store/schemas/navigation'\nimport { computed } from 'vue'\n\nimport Model from '@/components/Content/Models/Model.vue'\nimport ModelTag from '@/components/Content/Models/ModelTag.vue'\nimport { Tag } from '@/components/Content/Tags'\nimport Lazy from '@/components/Lazy/Lazy.vue'\nimport { getAsyncApiModelSchema } from '@/helpers/get-async-api-model-schema'\n\nimport Channel from './Channel.vue'\n\nconst {\n entries,\n document,\n expandedItems,\n options,\n eventBus,\n level = 0,\n} = defineProps<{\n entries: TraversedEntry[]\n document: AsyncApiDocument\n expandedItems: Record<string, boolean>\n options: Pick<\n ApiReferenceConfigurationRaw,\n | 'layout'\n | 'orderRequiredPropertiesFirst'\n | 'orderSchemaPropertiesBy'\n | 'hideModels'\n | 'modelsSectionLabel'\n >\n eventBus: WorkspaceEventBus\n level?: number\n}>()\n\nconst isTagGroup = (\n entry: TraversedEntry,\n): entry is TraversedTag & { isGroup: true } =>\n entry.type === 'tag' && entry.isGroup === true\n/**\n * Narrow to a regular (non-group) tag. Tag groups go through a separate branch\n * and must not inflate the sibling-tag count used for `moreThanOneTag`,\n * otherwise `ModernLayout` shows a \"Show more\" button for a lone tag whenever\n * it sits next to a tag group.\n */\nconst isTag = (\n entry: TraversedEntry,\n): entry is TraversedTag & { isGroup: false } =>\n entry.type === 'tag' && !isTagGroup(entry)\nconst isChannel = (entry: TraversedEntry): entry is TraversedAsyncApiChannel =>\n entry.type === 'asyncapi-channel'\n\n/** The top-level \"Models\" container that wraps individual schema entries. */\nconst isModelsTag = (entry: TraversedEntry): entry is TraversedModels =>\n entry.type === 'models'\n\n/** A single schema rendered as a model. */\nconst isModel = (entry: TraversedEntry): entry is TraversedSchema =>\n entry.type === 'model'\n\n/**\n * Reusable schemas live under `components.schemas`, the same place OpenAPI keeps them.\n * Resolve the wrapper once (merging `$ref` siblings) so the template can gate the Models section.\n */\nconst componentSchemas = computed(() =>\n document.components\n ? getResolvedRef(document.components, mergeSiblingReferences).schemas\n : undefined,\n)\n\n/** Resolve a schema by name into the shape the shared Model component expects. */\nconst getModelSchema = (name: string) => getAsyncApiModelSchema(document, name)\n</script>\n\n<template>\n <Lazy\n v-for=\"entry in entries\"\n :id=\"entry.id\"\n :key=\"`${entry.id}-${options.layout}`\"\n :expanded=\"!!expandedItems[entry.id]\">\n <Channel\n v-if=\"isChannel(entry)\"\n :channel=\"entry\"\n :document=\"document\"\n :eventBus=\"eventBus\"\n :isCollapsed=\"!expandedItems[entry.id]\"\n :layout=\"options.layout\" />\n\n <Tag\n v-else-if=\"\n isTag(entry) || (isTagGroup(entry) && options.layout === 'classic')\n \"\n :eventBus=\"eventBus\"\n :isCollapsed=\"!expandedItems[entry.id]\"\n :isLoading=\"false\"\n :layout=\"options.layout\"\n :moreThanOneTag=\"entries.filter(isTag).length > 1\"\n :tag=\"entry\">\n <template v-if=\"entry.children?.length\">\n <AsyncApiTraversedEntry\n :document=\"document\"\n :entries=\"entry.children\"\n :eventBus=\"eventBus\"\n :expandedItems=\"expandedItems\"\n :level=\"level + 1\"\n :options=\"options\" />\n </template>\n </Tag>\n\n <AsyncApiTraversedEntry\n v-else-if=\"isTagGroup(entry)\"\n :document=\"document\"\n :entries=\"entry.children ?? []\"\n :eventBus=\"eventBus\"\n :expandedItems=\"expandedItems\"\n :level=\"level + 1\"\n :options=\"options\" />\n\n <!-- Models -->\n <ModelTag\n v-else-if=\"isModelsTag(entry) && componentSchemas\"\n :id=\"entry.id\"\n :eventBus=\"eventBus\"\n :isCollapsed=\"!expandedItems[entry.id]\"\n :layout=\"options.layout\"\n :modelsSectionLabel=\"options.modelsSectionLabel\">\n <AsyncApiTraversedEntry\n :document=\"document\"\n :entries=\"entry.children ?? []\"\n :eventBus=\"eventBus\"\n :expandedItems=\"expandedItems\"\n :level=\"level + 1\"\n :options=\"options\" />\n </ModelTag>\n\n <Model\n v-else-if=\"isModel(entry) && getModelSchema(entry.name)\"\n :id=\"entry.id\"\n :eventBus=\"eventBus\"\n :isCollapsed=\"!expandedItems[entry.id]\"\n :name=\"entry.name\"\n :options=\"options\"\n :schema=\"getModelSchema(entry.name)\" />\n </Lazy>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"AsyncApiTraversedEntry.vue.script.js","names":[],"sources":["../../../../src/components/Content/AsyncApi/AsyncApiTraversedEntry.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference'\nimport type { AsyncApiDocument } from '@scalar/types/asyncapi/3.1'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport {\n getResolvedRef,\n mergeSiblingReferences,\n} from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type {\n TraversedAsyncApiChannel,\n TraversedEntry,\n TraversedModels,\n TraversedSchema,\n TraversedTag,\n} from '@scalar/workspace-store/schemas/navigation'\nimport { computed } from 'vue'\n\nimport Model from '@/components/Content/Models/Model.vue'\nimport ModelTag from '@/components/Content/Models/ModelTag.vue'\nimport { Tag } from '@/components/Content/Tags'\nimport Lazy from '@/components/Lazy/Lazy.vue'\nimport { getAsyncApiModelSchema } from '@/helpers/get-async-api-model-schema'\n\nimport Channel from './Channel.vue'\n\nconst {\n entries,\n document,\n expandedItems,\n options,\n eventBus,\n level = 0,\n} = defineProps<{\n entries: TraversedEntry[]\n document: AsyncApiDocument\n expandedItems: Record<string, boolean>\n options: Pick<\n ApiReferenceConfigurationRaw,\n | 'layout'\n | 'expandAllSchemaProperties'\n | 'orderRequiredPropertiesFirst'\n | 'orderSchemaPropertiesBy'\n | 'hideModels'\n | 'modelsSectionLabel'\n >\n eventBus: WorkspaceEventBus\n level?: number\n}>()\n\nconst isTagGroup = (\n entry: TraversedEntry,\n): entry is TraversedTag & { isGroup: true } =>\n entry.type === 'tag' && entry.isGroup === true\n/**\n * Narrow to a regular (non-group) tag. Tag groups go through a separate branch\n * and must not inflate the sibling-tag count used for `moreThanOneTag`,\n * otherwise `ModernLayout` shows a \"Show more\" button for a lone tag whenever\n * it sits next to a tag group.\n */\nconst isTag = (\n entry: TraversedEntry,\n): entry is TraversedTag & { isGroup: false } =>\n entry.type === 'tag' && !isTagGroup(entry)\nconst isChannel = (entry: TraversedEntry): entry is TraversedAsyncApiChannel =>\n entry.type === 'asyncapi-channel'\n\n/** The top-level \"Models\" container that wraps individual schema entries. */\nconst isModelsTag = (entry: TraversedEntry): entry is TraversedModels =>\n entry.type === 'models'\n\n/** A single schema rendered as a model. */\nconst isModel = (entry: TraversedEntry): entry is TraversedSchema =>\n entry.type === 'model'\n\n/**\n * Reusable schemas live under `components.schemas`, the same place OpenAPI keeps them.\n * Resolve the wrapper once (merging `$ref` siblings) so the template can gate the Models section.\n */\nconst componentSchemas = computed(() =>\n document.components\n ? getResolvedRef(document.components, mergeSiblingReferences).schemas\n : undefined,\n)\n\n/** Resolve a schema by name into the shape the shared Model component expects. */\nconst getModelSchema = (name: string) => getAsyncApiModelSchema(document, name)\n</script>\n\n<template>\n <Lazy\n v-for=\"entry in entries\"\n :id=\"entry.id\"\n :key=\"`${entry.id}-${options.layout}`\"\n :expanded=\"!!expandedItems[entry.id]\">\n <Channel\n v-if=\"isChannel(entry)\"\n :channel=\"entry\"\n :document=\"document\"\n :eventBus=\"eventBus\"\n :isCollapsed=\"!expandedItems[entry.id]\"\n :layout=\"options.layout\"\n :options=\"options\" />\n\n <Tag\n v-else-if=\"\n isTag(entry) || (isTagGroup(entry) && options.layout === 'classic')\n \"\n :eventBus=\"eventBus\"\n :isCollapsed=\"!expandedItems[entry.id]\"\n :isLoading=\"false\"\n :layout=\"options.layout\"\n :moreThanOneTag=\"entries.filter(isTag).length > 1\"\n :tag=\"entry\">\n <template v-if=\"entry.children?.length\">\n <AsyncApiTraversedEntry\n :document=\"document\"\n :entries=\"entry.children\"\n :eventBus=\"eventBus\"\n :expandedItems=\"expandedItems\"\n :level=\"level + 1\"\n :options=\"options\" />\n </template>\n </Tag>\n\n <AsyncApiTraversedEntry\n v-else-if=\"isTagGroup(entry)\"\n :document=\"document\"\n :entries=\"entry.children ?? []\"\n :eventBus=\"eventBus\"\n :expandedItems=\"expandedItems\"\n :level=\"level + 1\"\n :options=\"options\" />\n\n <!-- Models -->\n <ModelTag\n v-else-if=\"isModelsTag(entry) && componentSchemas\"\n :id=\"entry.id\"\n :eventBus=\"eventBus\"\n :isCollapsed=\"!expandedItems[entry.id]\"\n :layout=\"options.layout\"\n :modelsSectionLabel=\"options.modelsSectionLabel\">\n <AsyncApiTraversedEntry\n :document=\"document\"\n :entries=\"entry.children ?? []\"\n :eventBus=\"eventBus\"\n :expandedItems=\"expandedItems\"\n :level=\"level + 1\"\n :options=\"options\" />\n </ModelTag>\n\n <Model\n v-else-if=\"isModel(entry) && getModelSchema(entry.name)\"\n :id=\"entry.id\"\n :eventBus=\"eventBus\"\n :isCollapsed=\"!expandedItems[entry.id]\"\n :name=\"entry.name\"\n :options=\"options\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ACV,eAAe,QAAA;OACf,OAAO,QAAA,QAAK;OACZ,SAAS,QAAA;;;;;;;;;;;;;;;;WAKH,WAAW,MAAK,IAAA,WAAA,EAD7B,YAOuB,mCAAA;;MALpB,UAAU,QAAA;MACV,SAAS,MAAM,YAAQ,EAAA;MACvB,UAAU,QAAA;MACV,eAAe,QAAA;MACf,OAAO,QAAA,QAAK;MACZ,SAAS,QAAA;;;;;;;;WAIC,YAAY,MAAK,IAAK,iBAAA,SAAA,WAAA,EADnC,YAcW,kBAAA;;MAZR,IAAI,MAAM;MACV,UAAU,QAAA;MACV,aAAW,CAAG,QAAA,cAAc,MAAM;MAClC,QAAQ,QAAA,QAAQ;MAChB,oBAAoB,QAAA,QAAQ;;6BAON,CANvB,YAMuB,mCAAA;OALpB,UAAU,QAAA;OACV,SAAS,MAAM,YAAQ,EAAA;OACvB,UAAU,QAAA;OACV,eAAe,QAAA;OACf,OAAO,QAAA,QAAK;OACZ,SAAS,QAAA;;;;;;;;;;;;;;;;WAID,QAAQ,MAAK,IAAK,eAAe,MAAM,KAAI,IAAA,WAAA,EADxD,YAOyC,eAAA;;MALtC,IAAI,MAAM;MACV,UAAU,QAAA;MACV,aAAW,CAAG,QAAA,cAAc,MAAM;MAClC,MAAM,MAAM;MACZ,SAAS,QAAA;MACT,QAAQ,eAAe,MAAM,KAAI"}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
+
import type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference';
|
|
1
2
|
import type { AsyncApiDocument } from '@scalar/types/asyncapi/3.1';
|
|
2
3
|
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
3
4
|
import type { TraversedAsyncApiChannel } from '@scalar/workspace-store/schemas/navigation';
|
|
5
|
+
/** Subset of the configuration the shared `ParameterList` renderer needs. */
|
|
6
|
+
type ParameterListOptions = Pick<ApiReferenceConfigurationRaw, 'hideModels' | 'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy' | 'expandAllSchemaProperties'>;
|
|
4
7
|
type __VLS_Props = {
|
|
5
8
|
channel: TraversedAsyncApiChannel;
|
|
6
9
|
document: AsyncApiDocument;
|
|
7
10
|
layout: 'classic' | 'modern';
|
|
8
11
|
isCollapsed: boolean;
|
|
9
12
|
eventBus: WorkspaceEventBus | null;
|
|
13
|
+
options?: Partial<ParameterListOptions>;
|
|
10
14
|
};
|
|
11
15
|
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>;
|
|
12
16
|
declare const _default: typeof __VLS_export;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Channel.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/AsyncApi/Channel.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Channel.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/AsyncApi/Channel.vue"],"names":[],"mappings":"AAgLA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAA;AAC/E,OAAO,KAAK,EAEV,gBAAgB,EACjB,MAAM,4BAA4B,CAAA;AACnC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAKvE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4CAA4C,CAAA;AAgB1F,6EAA6E;AAC7E,KAAK,oBAAoB,GAAG,IAAI,CAC9B,4BAA4B,EAC1B,YAAY,GACZ,8BAA8B,GAC9B,yBAAyB,GACzB,2BAA2B,CAC9B,CAAA;AAED,KAAK,WAAW,GAAG;IACf,OAAO,EAAE,wBAAwB,CAAA;IACjC,QAAQ,EAAE,gBAAgB,CAAA;IAC1B,MAAM,EAAE,SAAS,GAAG,QAAQ,CAAA;IAC5B,WAAW,EAAE,OAAO,CAAA;IACpB,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,OAAO,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,CAAA;CACxC,CAAC;AA+VJ,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 Channel_vue_vue_type_script_setup_true_lang_default from "./Channel.vue.script.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
//#region src/components/Content/AsyncApi/Channel.vue
|
|
5
|
-
var Channel_default = /* @__PURE__ */ _plugin_vue_export_helper_default(Channel_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
5
|
+
var Channel_default = /* @__PURE__ */ _plugin_vue_export_helper_default(Channel_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-cb522e2e"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { Channel_default as default };
|
|
8
8
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Channel.vue.js","names":[],"sources":["../../../../src/components/Content/AsyncApi/Channel.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport type {\n AsyncApiChannelObject,\n AsyncApiDocument,\n} from '@scalar/types/asyncapi/3.1'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport {\n getResolvedRef,\n mergeSiblingReferences,\n} from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type { TraversedAsyncApiChannel } from '@scalar/workspace-store/schemas/navigation'\nimport { computed, useId } from 'vue'\n\nimport { Anchor } from '@/components/Anchor'\nimport {\n Section,\n SectionContainer,\n SectionContainerAccordion,\n SectionContent,\n SectionHeader,\n SectionHeaderTag,\n} from '@/components/Section'\n\nconst { channel, document, layout, isCollapsed, eventBus }
|
|
1
|
+
{"version":3,"file":"Channel.vue.js","names":[],"sources":["../../../../src/components/Content/AsyncApi/Channel.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference'\nimport type {\n AsyncApiChannelObject,\n AsyncApiDocument,\n} from '@scalar/types/asyncapi/3.1'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport {\n getResolvedRef,\n mergeSiblingReferences,\n} from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type { TraversedAsyncApiChannel } from '@scalar/workspace-store/schemas/navigation'\nimport { computed, useId } from 'vue'\n\nimport { Anchor } from '@/components/Anchor'\nimport {\n Section,\n SectionContainer,\n SectionContainerAccordion,\n SectionContent,\n SectionHeader,\n SectionHeaderTag,\n} from '@/components/Section'\nimport ParameterList from '@/features/Operation/components/ParameterList.vue'\n\nimport { adaptAsyncApiParameters } from './helpers/adapt-async-api-parameters'\n\n/** Subset of the configuration the shared `ParameterList` renderer needs. */\ntype ParameterListOptions = Pick<\n ApiReferenceConfigurationRaw,\n | 'hideModels'\n | 'orderRequiredPropertiesFirst'\n | 'orderSchemaPropertiesBy'\n | 'expandAllSchemaProperties'\n>\n\nconst { channel, document, layout, isCollapsed, eventBus, options } =\n defineProps<{\n channel: TraversedAsyncApiChannel\n document: AsyncApiDocument\n layout: 'classic' | 'modern'\n isCollapsed: boolean\n eventBus: WorkspaceEventBus | null\n options?: Partial<ParameterListOptions>\n }>()\n\nconst headerId = useId()\n\n/**\n * Resolve the channel from the document so we can read its description.\n * The navigation entry only carries the address and identifying keys.\n */\nconst resolvedChannel = computed<AsyncApiChannelObject | undefined>(() => {\n const node = document.channels?.[channel.channelName]\n return node ? getResolvedRef(node, mergeSiblingReferences) : undefined\n})\n\nconst description = computed(() => resolvedChannel.value?.description ?? '')\n\n/**\n * Heading shown above each channel section.\n *\n * Prefers the human-friendly `channel.title` when it is set, then falls back\n * to `channel.address`, and finally to the channel map key.\n * `channel.channelAddress` already encodes the address-or-key fallback during\n * navigation traversal, so we only need to overlay `title` on top of it.\n */\nconst headingText = computed(() => {\n const title = resolvedChannel.value?.title?.trim()\n return title || channel.channelAddress\n})\n\n/**\n * Channel address parameters mapped into the OpenAPI parameter shape so we can reuse the shared\n * `ParameterList` component instead of building a dedicated AsyncAPI renderer.\n */\nconst parameters = computed(() =>\n adaptAsyncApiParameters(resolvedChannel.value?.parameters),\n)\n\n/** Fill in defaults so the shared renderer always receives a complete options object. */\nconst parameterListOptions = computed<ParameterListOptions>(() => ({\n hideModels: options?.hideModels ?? false,\n orderRequiredPropertiesFirst: options?.orderRequiredPropertiesFirst ?? false,\n orderSchemaPropertiesBy: options?.orderSchemaPropertiesBy ?? 'preserve',\n expandAllSchemaProperties: options?.expandAllSchemaProperties ?? false,\n}))\n</script>\n\n<template>\n <SectionContainerAccordion\n v-if=\"layout === 'classic'\"\n :aria-label=\"headingText\"\n class=\"channel-section\"\n :modelValue=\"!isCollapsed\"\n @update:modelValue=\"\n (value) =>\n eventBus?.emit('toggle:nav-item', { id: channel.id, open: value })\n \">\n <template #title>\n <SectionHeader class=\"channel-name\">\n <Anchor\n @copyAnchorUrl=\"\n () => eventBus?.emit('copy-url:nav-item', { id: channel.id })\n \">\n <SectionHeaderTag :level=\"2\">\n {{ headingText }}\n </SectionHeaderTag>\n </Anchor>\n </SectionHeader>\n <ScalarMarkdown\n class=\"channel-description\"\n :value=\"description\"\n withImages />\n </template>\n <ParameterList\n v-if=\"parameters.length\"\n :eventBus=\"eventBus\"\n :options=\"parameterListOptions\"\n :parameters=\"parameters\">\n <template #title>Parameters</template>\n </ParameterList>\n </SectionContainerAccordion>\n\n <SectionContainer\n v-else\n :aria-labelledby=\"headerId\"\n role=\"region\">\n <Section\n :id=\"channel.id\"\n role=\"none\"\n @intersecting=\"\n () => eventBus?.emit('intersecting:nav-item', { id: channel.id })\n \">\n <SectionHeader>\n <Anchor\n @copyAnchorUrl=\"\n () => eventBus?.emit('copy-url:nav-item', { id: channel.id })\n \">\n <SectionHeaderTag\n :id=\"headerId\"\n :level=\"2\">\n {{ headingText }}\n </SectionHeaderTag>\n </Anchor>\n </SectionHeader>\n <SectionContent>\n <ScalarMarkdown\n :value=\"description\"\n withImages />\n <ParameterList\n v-if=\"parameters.length\"\n :eventBus=\"eventBus\"\n :options=\"parameterListOptions\"\n :parameters=\"parameters\">\n <template #title>Parameters</template>\n </ParameterList>\n </SectionContent>\n </Section>\n </SectionContainer>\n</template>\n\n<style scoped>\n.channel-section {\n margin-bottom: 48px;\n}\n.channel-description {\n padding-bottom: 4px;\n text-align: left;\n}\n</style>\n"],"mappings":""}
|
|
@@ -5,7 +5,9 @@ import SectionContent_default from "../../Section/SectionContent.vue.js";
|
|
|
5
5
|
import SectionHeader_default from "../../Section/SectionHeader.vue.js";
|
|
6
6
|
import SectionHeaderTag_default from "../../Section/SectionHeaderTag.vue.js";
|
|
7
7
|
import Anchor_default from "../../Anchor/Anchor.vue.js";
|
|
8
|
-
import
|
|
8
|
+
import ParameterList_default from "../../../features/Operation/components/ParameterList.vue.js";
|
|
9
|
+
import { adaptAsyncApiParameters } from "./helpers/adapt-async-api-parameters.js";
|
|
10
|
+
import { computed, createBlock, createCommentVNode, createTextVNode, createVNode, defineComponent, openBlock, toDisplayString, unref, useId, withCtx } from "vue";
|
|
9
11
|
import { ScalarMarkdown } from "@scalar/components/markdown";
|
|
10
12
|
import { getResolvedRef, mergeSiblingReferences } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
11
13
|
//#region src/components/Content/AsyncApi/Channel.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -16,7 +18,8 @@ var Channel_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ define
|
|
|
16
18
|
document: {},
|
|
17
19
|
layout: {},
|
|
18
20
|
isCollapsed: { type: Boolean },
|
|
19
|
-
eventBus: {}
|
|
21
|
+
eventBus: {},
|
|
22
|
+
options: {}
|
|
20
23
|
},
|
|
21
24
|
setup(__props) {
|
|
22
25
|
const headerId = useId();
|
|
@@ -40,6 +43,18 @@ var Channel_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ define
|
|
|
40
43
|
const headingText = computed(() => {
|
|
41
44
|
return resolvedChannel.value?.title?.trim() || __props.channel.channelAddress;
|
|
42
45
|
});
|
|
46
|
+
/**
|
|
47
|
+
* Channel address parameters mapped into the OpenAPI parameter shape so we can reuse the shared
|
|
48
|
+
* `ParameterList` component instead of building a dedicated AsyncAPI renderer.
|
|
49
|
+
*/
|
|
50
|
+
const parameters = computed(() => adaptAsyncApiParameters(resolvedChannel.value?.parameters));
|
|
51
|
+
/** Fill in defaults so the shared renderer always receives a complete options object. */
|
|
52
|
+
const parameterListOptions = computed(() => ({
|
|
53
|
+
hideModels: __props.options?.hideModels ?? false,
|
|
54
|
+
orderRequiredPropertiesFirst: __props.options?.orderRequiredPropertiesFirst ?? false,
|
|
55
|
+
orderSchemaPropertiesBy: __props.options?.orderSchemaPropertiesBy ?? "preserve",
|
|
56
|
+
expandAllSchemaProperties: __props.options?.expandAllSchemaProperties ?? false
|
|
57
|
+
}));
|
|
43
58
|
return (_ctx, _cache) => {
|
|
44
59
|
return __props.layout === "classic" ? (openBlock(), createBlock(unref(SectionContainerAccordion_default), {
|
|
45
60
|
key: 0,
|
|
@@ -65,6 +80,19 @@ var Channel_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ define
|
|
|
65
80
|
value: description.value,
|
|
66
81
|
withImages: ""
|
|
67
82
|
}, null, 8, ["value"])]),
|
|
83
|
+
default: withCtx(() => [parameters.value.length ? (openBlock(), createBlock(ParameterList_default, {
|
|
84
|
+
key: 0,
|
|
85
|
+
eventBus: __props.eventBus,
|
|
86
|
+
options: parameterListOptions.value,
|
|
87
|
+
parameters: parameters.value
|
|
88
|
+
}, {
|
|
89
|
+
title: withCtx(() => [..._cache[4] || (_cache[4] = [createTextVNode("Parameters", -1)])]),
|
|
90
|
+
_: 1
|
|
91
|
+
}, 8, [
|
|
92
|
+
"eventBus",
|
|
93
|
+
"options",
|
|
94
|
+
"parameters"
|
|
95
|
+
])) : createCommentVNode("", true)]),
|
|
68
96
|
_: 1
|
|
69
97
|
}, 8, ["aria-label", "modelValue"])) : (openBlock(), createBlock(unref(SectionContainer_default), {
|
|
70
98
|
key: 1,
|
|
@@ -92,7 +120,19 @@ var Channel_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ define
|
|
|
92
120
|
default: withCtx(() => [createVNode(unref(ScalarMarkdown), {
|
|
93
121
|
value: description.value,
|
|
94
122
|
withImages: ""
|
|
95
|
-
}, null, 8, ["value"])
|
|
123
|
+
}, null, 8, ["value"]), parameters.value.length ? (openBlock(), createBlock(ParameterList_default, {
|
|
124
|
+
key: 0,
|
|
125
|
+
eventBus: __props.eventBus,
|
|
126
|
+
options: parameterListOptions.value,
|
|
127
|
+
parameters: parameters.value
|
|
128
|
+
}, {
|
|
129
|
+
title: withCtx(() => [..._cache[5] || (_cache[5] = [createTextVNode("Parameters", -1)])]),
|
|
130
|
+
_: 1
|
|
131
|
+
}, 8, [
|
|
132
|
+
"eventBus",
|
|
133
|
+
"options",
|
|
134
|
+
"parameters"
|
|
135
|
+
])) : createCommentVNode("", true)]),
|
|
96
136
|
_: 1
|
|
97
137
|
})]),
|
|
98
138
|
_: 1
|