@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":"Channel.vue.script.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.script.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":"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"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { AsyncApiChannelObject } from '@scalar/types/asyncapi/3.1';
|
|
2
|
+
import type { ParameterObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
3
|
+
/**
|
|
4
|
+
* Adapt AsyncAPI channel parameters into the OpenAPI `ParameterObject` shape so we can reuse the
|
|
5
|
+
* existing `ParameterList` rendering instead of building a separate component.
|
|
6
|
+
*
|
|
7
|
+
* AsyncAPI parameters are address placeholders (the `{param}` expressions in a channel address).
|
|
8
|
+
* They are string-only and, because every placeholder in the address must be supplied, always
|
|
9
|
+
* required. We therefore map them to `path` parameters (the closest OpenAPI analog) and fold the
|
|
10
|
+
* `enum`, `default`, and `examples` fields onto a synthetic string schema so the schema renderer
|
|
11
|
+
* can display them. The `location` runtime expression has no display equivalent and is dropped.
|
|
12
|
+
*/
|
|
13
|
+
export declare const adaptAsyncApiParameters: (parameters: AsyncApiChannelObject["parameters"]) => ParameterObject[];
|
|
14
|
+
//# sourceMappingURL=adapt-async-api-parameters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapt-async-api-parameters.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/AsyncApi/helpers/adapt-async-api-parameters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAA;AAEvE,OAAO,KAAK,EAAE,eAAe,EAAgB,MAAM,8DAA8D,CAAA;AAEjH;;;;;;;;;GASG;AACH,eAAO,MAAM,uBAAuB,GAAI,YAAY,qBAAqB,CAAC,YAAY,CAAC,KAAG,eAAe,EAgCxG,CAAA"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { getResolvedRef } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
2
|
+
//#region src/components/Content/AsyncApi/helpers/adapt-async-api-parameters.ts
|
|
3
|
+
/**
|
|
4
|
+
* Adapt AsyncAPI channel parameters into the OpenAPI `ParameterObject` shape so we can reuse the
|
|
5
|
+
* existing `ParameterList` rendering instead of building a separate component.
|
|
6
|
+
*
|
|
7
|
+
* AsyncAPI parameters are address placeholders (the `{param}` expressions in a channel address).
|
|
8
|
+
* They are string-only and, because every placeholder in the address must be supplied, always
|
|
9
|
+
* required. We therefore map them to `path` parameters (the closest OpenAPI analog) and fold the
|
|
10
|
+
* `enum`, `default`, and `examples` fields onto a synthetic string schema so the schema renderer
|
|
11
|
+
* can display them. The `location` runtime expression has no display equivalent and is dropped.
|
|
12
|
+
*/
|
|
13
|
+
var adaptAsyncApiParameters = (parameters) => {
|
|
14
|
+
if (!parameters) return [];
|
|
15
|
+
return Object.entries(parameters).map(([name, value]) => {
|
|
16
|
+
const parameter = getResolvedRef(value) ?? {};
|
|
17
|
+
const schema = { type: "string" };
|
|
18
|
+
if (parameter.enum) schema.enum = parameter.enum;
|
|
19
|
+
if (parameter.default !== void 0) schema.default = parameter.default;
|
|
20
|
+
if (parameter.examples) schema.examples = parameter.examples;
|
|
21
|
+
const result = {
|
|
22
|
+
name,
|
|
23
|
+
in: "path",
|
|
24
|
+
required: true,
|
|
25
|
+
schema
|
|
26
|
+
};
|
|
27
|
+
if (parameter.description) result.description = parameter.description;
|
|
28
|
+
return result;
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
//#endregion
|
|
32
|
+
export { adaptAsyncApiParameters };
|
|
33
|
+
|
|
34
|
+
//# sourceMappingURL=adapt-async-api-parameters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapt-async-api-parameters.js","names":[],"sources":["../../../../../src/components/Content/AsyncApi/helpers/adapt-async-api-parameters.ts"],"sourcesContent":["import type { AsyncApiChannelObject } from '@scalar/types/asyncapi/3.1'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type { ParameterObject, SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\n/**\n * Adapt AsyncAPI channel parameters into the OpenAPI `ParameterObject` shape so we can reuse the\n * existing `ParameterList` rendering instead of building a separate component.\n *\n * AsyncAPI parameters are address placeholders (the `{param}` expressions in a channel address).\n * They are string-only and, because every placeholder in the address must be supplied, always\n * required. We therefore map them to `path` parameters (the closest OpenAPI analog) and fold the\n * `enum`, `default`, and `examples` fields onto a synthetic string schema so the schema renderer\n * can display them. The `location` runtime expression has no display equivalent and is dropped.\n */\nexport const adaptAsyncApiParameters = (parameters: AsyncApiChannelObject['parameters']): ParameterObject[] => {\n if (!parameters) {\n return []\n }\n\n return Object.entries(parameters).map(([name, value]) => {\n // Fall back to an empty object so an unresolved `$ref` still renders the parameter name.\n const parameter = getResolvedRef(value) ?? {}\n\n const schema: SchemaObject = { type: 'string' }\n if (parameter.enum) {\n schema.enum = parameter.enum\n }\n if (parameter.default !== undefined) {\n schema.default = parameter.default\n }\n if (parameter.examples) {\n schema.examples = parameter.examples\n }\n\n const result: ParameterObject = {\n name,\n in: 'path',\n required: true,\n schema,\n }\n if (parameter.description) {\n result.description = parameter.description\n }\n\n return result\n })\n}\n"],"mappings":";;;;;;;;;;;;AAcA,IAAa,2BAA2B,eAAuE;AAC7G,KAAI,CAAC,WACH,QAAO,EAAE;AAGX,QAAO,OAAO,QAAQ,WAAW,CAAC,KAAK,CAAC,MAAM,WAAW;EAEvD,MAAM,YAAY,eAAe,MAAM,IAAI,EAAE;EAE7C,MAAM,SAAuB,EAAE,MAAM,UAAU;AAC/C,MAAI,UAAU,KACZ,QAAO,OAAO,UAAU;AAE1B,MAAI,UAAU,YAAY,KAAA,EACxB,QAAO,UAAU,UAAU;AAE7B,MAAI,UAAU,SACZ,QAAO,WAAW,UAAU;EAG9B,MAAM,SAA0B;GAC9B;GACA,IAAI;GACJ,UAAU;GACV;GACD;AACD,MAAI,UAAU,YACZ,QAAO,cAAc,UAAU;AAGjC,SAAO;GACP"}
|
|
@@ -6,7 +6,7 @@ import type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensi
|
|
|
6
6
|
import type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
7
7
|
import type { WorkspaceDocument } from '@scalar/workspace-store/schemas/workspace';
|
|
8
8
|
type __VLS_Props = {
|
|
9
|
-
options: Pick<ApiReferenceConfigurationRaw, 'authentication' | 'persistAuth' | 'proxyUrl'>;
|
|
9
|
+
options: Pick<ApiReferenceConfigurationRaw, 'authentication' | 'oauth2RedirectUri' | 'persistAuth' | 'proxyUrl'>;
|
|
10
10
|
authStore: AuthStore;
|
|
11
11
|
document: WorkspaceDocument | undefined;
|
|
12
12
|
eventBus: WorkspaceEventBus;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Auth.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Auth/Auth.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Auth.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Auth/Auth.vue"],"names":[],"mappings":"AAkFA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAA;AAC/E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAA;AACtE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,EAGL,KAAK,qBAAqB,EAC3B,MAAM,yCAAyC,CAAA;AAChD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AAEnH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAChG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAA;AAGlF,KAAK,WAAW,GAAG;IACf,OAAO,EAAE,IAAI,CACX,4BAA4B,EAC5B,gBAAgB,GAAG,mBAAmB,GAAG,aAAa,GAAG,UAAU,CACpE,CAAA;IACD,SAAS,EAAE,SAAS,CAAA;IACpB,QAAQ,EAAE,iBAAiB,GAAG,SAAS,CAAA;IACvC,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,eAAe,EAAE,qBAAqB,CAAA;IACtC,cAAc,EAAE,YAAY,GAAG,IAAI,CAAA;IACnC,WAAW,EAAE,kBAAkB,CAAA;CAChC,CAAC;AAoGJ,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Auth.vue.js","names":[],"sources":["../../../../src/components/Content/Auth/Auth.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { AuthSelector } from '@scalar/api-client/blocks/scalar-auth-selector-block'\nimport type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference'\nimport type { AuthStore } from '@scalar/workspace-store/entities/auth'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport {\n getSecurityRequirements,\n getSelectedSecurity,\n type MergedSecuritySchemes,\n} from '@scalar/workspace-store/request-example'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport { isOpenApiDocument } from '@scalar/workspace-store/schemas/type-guards'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport type { WorkspaceDocument } from '@scalar/workspace-store/schemas/workspace'\nimport { computed } from 'vue'\n\nconst { document, environment, eventBus, options, securitySchemes, authStore } =\n defineProps<{\n options: Pick<\n ApiReferenceConfigurationRaw,\n 'authentication' | 'persistAuth' | 'proxyUrl'\n >\n authStore: AuthStore\n document: WorkspaceDocument | undefined\n eventBus: WorkspaceEventBus\n securitySchemes: MergedSecuritySchemes\n selectedServer: ServerObject | null\n environment: XScalarEnvironment\n }>()\n\n/** Compute what the security requirements should be for the document */\nconst securityRequirements = computed(() =>\n getSecurityRequirements(\n isOpenApiDocument(document) ? document.security : undefined,\n ),\n)\n\n/** Grab the selected security for the document from the auth store */\nconst documentSelectedSecurity = computed(() =>\n authStore.getAuthSelectedSchemas({\n type: 'document',\n documentName: isOpenApiDocument(document)\n ? (document['x-scalar-navigation']?.name ?? '')\n : '',\n }),\n)\n\n/** The selected security keys for the document */\nconst selectedSecurity = computed(() =>\n getSelectedSecurity(\n documentSelectedSecurity.value,\n undefined,\n securityRequirements.value,\n securitySchemes,\n options.authentication?.preferredSecurityScheme,\n ),\n)\n</script>\n<template>\n <AuthSelector\n v-if=\"Object.keys(securitySchemes).length\"\n :createAnySecurityScheme=\"\n options.authentication?.createAnySecurityScheme ?? false\n \"\n :environment\n :eventBus\n isStatic\n layout=\"reference\"\n :meta=\"{ type: 'document' }\"\n :persistAuth=\"options.persistAuth\"\n :proxyUrl=\"options.proxyUrl ?? ''\"\n :securityRequirements\n :securitySchemes\n :selectedSecurity\n :server=\"selectedServer\"\n title=\"Authentication\" />\n</template>\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"Auth.vue.js","names":[],"sources":["../../../../src/components/Content/Auth/Auth.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { AuthSelector } from '@scalar/api-client/blocks/scalar-auth-selector-block'\nimport type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference'\nimport type { AuthStore } from '@scalar/workspace-store/entities/auth'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport {\n getSecurityRequirements,\n getSelectedSecurity,\n type MergedSecuritySchemes,\n} from '@scalar/workspace-store/request-example'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport { isOpenApiDocument } from '@scalar/workspace-store/schemas/type-guards'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport type { WorkspaceDocument } from '@scalar/workspace-store/schemas/workspace'\nimport { computed } from 'vue'\n\nconst { document, environment, eventBus, options, securitySchemes, authStore } =\n defineProps<{\n options: Pick<\n ApiReferenceConfigurationRaw,\n 'authentication' | 'oauth2RedirectUri' | 'persistAuth' | 'proxyUrl'\n >\n authStore: AuthStore\n document: WorkspaceDocument | undefined\n eventBus: WorkspaceEventBus\n securitySchemes: MergedSecuritySchemes\n selectedServer: ServerObject | null\n environment: XScalarEnvironment\n }>()\n\n/** Compute what the security requirements should be for the document */\nconst securityRequirements = computed(() =>\n getSecurityRequirements(\n isOpenApiDocument(document) ? document.security : undefined,\n ),\n)\n\n/** Grab the selected security for the document from the auth store */\nconst documentSelectedSecurity = computed(() =>\n authStore.getAuthSelectedSchemas({\n type: 'document',\n documentName: isOpenApiDocument(document)\n ? (document['x-scalar-navigation']?.name ?? '')\n : '',\n }),\n)\n\n/** The selected security keys for the document */\nconst selectedSecurity = computed(() =>\n getSelectedSecurity(\n documentSelectedSecurity.value,\n undefined,\n securityRequirements.value,\n securitySchemes,\n options.authentication?.preferredSecurityScheme,\n ),\n)\n</script>\n<template>\n <AuthSelector\n v-if=\"Object.keys(securitySchemes).length\"\n :createAnySecurityScheme=\"\n options.authentication?.createAnySecurityScheme ?? false\n \"\n :environment\n :eventBus\n isStatic\n layout=\"reference\"\n :meta=\"{ type: 'document' }\"\n :options=\"{ oauth2RedirectUri: options.oauth2RedirectUri }\"\n :persistAuth=\"options.persistAuth\"\n :proxyUrl=\"options.proxyUrl ?? ''\"\n :securityRequirements\n :securitySchemes\n :selectedSecurity\n :server=\"selectedServer\"\n title=\"Authentication\" />\n</template>\n"],"mappings":""}
|
|
@@ -33,6 +33,7 @@ var Auth_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCom
|
|
|
33
33
|
isStatic: "",
|
|
34
34
|
layout: "reference",
|
|
35
35
|
meta: { type: "document" },
|
|
36
|
+
options: { oauth2RedirectUri: __props.options.oauth2RedirectUri },
|
|
36
37
|
persistAuth: __props.options.persistAuth,
|
|
37
38
|
proxyUrl: __props.options.proxyUrl ?? "",
|
|
38
39
|
securityRequirements: securityRequirements.value,
|
|
@@ -44,6 +45,7 @@ var Auth_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCom
|
|
|
44
45
|
"createAnySecurityScheme",
|
|
45
46
|
"environment",
|
|
46
47
|
"eventBus",
|
|
48
|
+
"options",
|
|
47
49
|
"persistAuth",
|
|
48
50
|
"proxyUrl",
|
|
49
51
|
"securityRequirements",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Auth.vue.script.js","names":[],"sources":["../../../../src/components/Content/Auth/Auth.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { AuthSelector } from '@scalar/api-client/blocks/scalar-auth-selector-block'\nimport type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference'\nimport type { AuthStore } from '@scalar/workspace-store/entities/auth'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport {\n getSecurityRequirements,\n getSelectedSecurity,\n type MergedSecuritySchemes,\n} from '@scalar/workspace-store/request-example'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport { isOpenApiDocument } from '@scalar/workspace-store/schemas/type-guards'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport type { WorkspaceDocument } from '@scalar/workspace-store/schemas/workspace'\nimport { computed } from 'vue'\n\nconst { document, environment, eventBus, options, securitySchemes, authStore } =\n defineProps<{\n options: Pick<\n ApiReferenceConfigurationRaw,\n 'authentication' | 'persistAuth' | 'proxyUrl'\n >\n authStore: AuthStore\n document: WorkspaceDocument | undefined\n eventBus: WorkspaceEventBus\n securitySchemes: MergedSecuritySchemes\n selectedServer: ServerObject | null\n environment: XScalarEnvironment\n }>()\n\n/** Compute what the security requirements should be for the document */\nconst securityRequirements = computed(() =>\n getSecurityRequirements(\n isOpenApiDocument(document) ? document.security : undefined,\n ),\n)\n\n/** Grab the selected security for the document from the auth store */\nconst documentSelectedSecurity = computed(() =>\n authStore.getAuthSelectedSchemas({\n type: 'document',\n documentName: isOpenApiDocument(document)\n ? (document['x-scalar-navigation']?.name ?? '')\n : '',\n }),\n)\n\n/** The selected security keys for the document */\nconst selectedSecurity = computed(() =>\n getSelectedSecurity(\n documentSelectedSecurity.value,\n undefined,\n securityRequirements.value,\n securitySchemes,\n options.authentication?.preferredSecurityScheme,\n ),\n)\n</script>\n<template>\n <AuthSelector\n v-if=\"Object.keys(securitySchemes).length\"\n :createAnySecurityScheme=\"\n options.authentication?.createAnySecurityScheme ?? false\n \"\n :environment\n :eventBus\n isStatic\n layout=\"reference\"\n :meta=\"{ type: 'document' }\"\n :persistAuth=\"options.persistAuth\"\n :proxyUrl=\"options.proxyUrl ?? ''\"\n :securityRequirements\n :securitySchemes\n :selectedSecurity\n :server=\"selectedServer\"\n title=\"Authentication\" />\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;EA+BA,MAAM,uBAAuB,eAC3B,wBACE,kBAAkB,QAAA,SAAS,GAAG,QAAA,SAAS,WAAW,KAAA,EACnD,CACH;;EAGA,MAAM,2BAA2B,eAC/B,QAAA,UAAU,uBAAuB;GAC/B,MAAM;GACN,cAAc,kBAAkB,QAAA,SAAQ,GACnC,QAAA,SAAS,wBAAwB,QAAQ,KAC1C;GACL,CAAC,CACJ;;EAGA,MAAM,mBAAmB,eACvB,oBACE,yBAAyB,OACzB,KAAA,GACA,qBAAqB,OACrB,QAAA,iBACA,QAAA,QAAQ,gBAAgB,wBACzB,CACH;;UAIU,OAAO,KAAK,QAAA,gBAAe,CAAE,UAAA,WAAA,EADrC,
|
|
1
|
+
{"version":3,"file":"Auth.vue.script.js","names":[],"sources":["../../../../src/components/Content/Auth/Auth.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { AuthSelector } from '@scalar/api-client/blocks/scalar-auth-selector-block'\nimport type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference'\nimport type { AuthStore } from '@scalar/workspace-store/entities/auth'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport {\n getSecurityRequirements,\n getSelectedSecurity,\n type MergedSecuritySchemes,\n} from '@scalar/workspace-store/request-example'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport { isOpenApiDocument } from '@scalar/workspace-store/schemas/type-guards'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport type { WorkspaceDocument } from '@scalar/workspace-store/schemas/workspace'\nimport { computed } from 'vue'\n\nconst { document, environment, eventBus, options, securitySchemes, authStore } =\n defineProps<{\n options: Pick<\n ApiReferenceConfigurationRaw,\n 'authentication' | 'oauth2RedirectUri' | 'persistAuth' | 'proxyUrl'\n >\n authStore: AuthStore\n document: WorkspaceDocument | undefined\n eventBus: WorkspaceEventBus\n securitySchemes: MergedSecuritySchemes\n selectedServer: ServerObject | null\n environment: XScalarEnvironment\n }>()\n\n/** Compute what the security requirements should be for the document */\nconst securityRequirements = computed(() =>\n getSecurityRequirements(\n isOpenApiDocument(document) ? document.security : undefined,\n ),\n)\n\n/** Grab the selected security for the document from the auth store */\nconst documentSelectedSecurity = computed(() =>\n authStore.getAuthSelectedSchemas({\n type: 'document',\n documentName: isOpenApiDocument(document)\n ? (document['x-scalar-navigation']?.name ?? '')\n : '',\n }),\n)\n\n/** The selected security keys for the document */\nconst selectedSecurity = computed(() =>\n getSelectedSecurity(\n documentSelectedSecurity.value,\n undefined,\n securityRequirements.value,\n securitySchemes,\n options.authentication?.preferredSecurityScheme,\n ),\n)\n</script>\n<template>\n <AuthSelector\n v-if=\"Object.keys(securitySchemes).length\"\n :createAnySecurityScheme=\"\n options.authentication?.createAnySecurityScheme ?? false\n \"\n :environment\n :eventBus\n isStatic\n layout=\"reference\"\n :meta=\"{ type: 'document' }\"\n :options=\"{ oauth2RedirectUri: options.oauth2RedirectUri }\"\n :persistAuth=\"options.persistAuth\"\n :proxyUrl=\"options.proxyUrl ?? ''\"\n :securityRequirements\n :securitySchemes\n :selectedSecurity\n :server=\"selectedServer\"\n title=\"Authentication\" />\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;EA+BA,MAAM,uBAAuB,eAC3B,wBACE,kBAAkB,QAAA,SAAS,GAAG,QAAA,SAAS,WAAW,KAAA,EACnD,CACH;;EAGA,MAAM,2BAA2B,eAC/B,QAAA,UAAU,uBAAuB;GAC/B,MAAM;GACN,cAAc,kBAAkB,QAAA,SAAQ,GACnC,QAAA,SAAS,wBAAwB,QAAQ,KAC1C;GACL,CAAC,CACJ;;EAGA,MAAM,mBAAmB,eACvB,oBACE,yBAAyB,OACzB,KAAA,GACA,qBAAqB,OACrB,QAAA,iBACA,QAAA,QAAQ,gBAAgB,wBACzB,CACH;;UAIU,OAAO,KAAK,QAAA,gBAAe,CAAE,UAAA,WAAA,EADrC,YAiB2B,MAAA,aAAA,EAAA;;IAfxB,yBAAgC,QAAA,QAAQ,gBAAgB,2BAAuB;IAG/E,aAAA,QAAA;IACA,UAAA,QAAA;IACD,UAAA;IACA,QAAO;IACN,MAAM,EAAA,MAAA,YAAoB;IAC1B,SAAO,EAAA,mBAAuB,QAAA,QAAQ,mBAAiB;IACvD,aAAa,QAAA,QAAQ;IACrB,UAAU,QAAA,QAAQ,YAAQ;IAC1B,sBAAA,qBAAA;IACA,iBAAA,QAAA;IACA,kBAAA,iBAAA;IACA,QAAQ,QAAA;IACT,OAAM"}
|
|
@@ -8,7 +8,7 @@ import type { Workspace, WorkspaceDocument } from '@scalar/workspace-store/schem
|
|
|
8
8
|
type __VLS_Props = {
|
|
9
9
|
infoSectionId: string;
|
|
10
10
|
/** The subset of the configuration object required for the content component */
|
|
11
|
-
options: Pick<ApiReferenceConfigurationRaw, 'authentication' | 'baseServerURL' | 'documentDownloadType' | 'expandAllResponses' | 'hiddenClients' | 'hideTestRequestButton' | 'layout' | 'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy' | 'persistAuth' | 'proxyUrl' | 'servers' | 'showOperationId' | 'hideModels' | 'modelsSectionLabel'>;
|
|
11
|
+
options: Pick<ApiReferenceConfigurationRaw, 'authentication' | 'baseServerURL' | 'documentDownloadType' | 'expandAllResponses' | 'hiddenClients' | 'hideTestRequestButton' | 'layout' | 'oauth2RedirectUri' | 'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy' | 'expandAllSchemaProperties' | 'persistAuth' | 'proxyUrl' | 'servers' | 'showOperationId' | 'hideModels' | 'modelsSectionLabel'>;
|
|
12
12
|
document: WorkspaceDocument | undefined;
|
|
13
13
|
clientDocument: WorkspaceDocument | undefined;
|
|
14
14
|
authStore: AuthStore;
|
|
@@ -20,11 +20,11 @@ type __VLS_Props = {
|
|
|
20
20
|
/** Heading id generator for Markdown headings */
|
|
21
21
|
headingSlugGenerator: (heading: Heading) => string;
|
|
22
22
|
};
|
|
23
|
-
declare var __VLS_6: {},
|
|
23
|
+
declare var __VLS_6: {}, __VLS_109: {};
|
|
24
24
|
type __VLS_Slots = {} & {
|
|
25
25
|
start?: (props: typeof __VLS_6) => any;
|
|
26
26
|
} & {
|
|
27
|
-
end?: (props: typeof
|
|
27
|
+
end?: (props: typeof __VLS_109) => any;
|
|
28
28
|
};
|
|
29
29
|
declare const __VLS_base: 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>;
|
|
30
30
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Content.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Content/Content.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Content.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Content/Content.vue"],"names":[],"mappings":"AAyUA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAA;AAC/E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAKnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAA;AACtE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAMvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,cAAc,IAAI,kBAAkB,EAAE,MAAM,4CAA4C,CAAA;AAMtG,OAAO,KAAK,EACV,SAAS,EACT,iBAAiB,EAClB,MAAM,2CAA2C,CAAA;AAuBlD,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,MAAM,CAAA;IACrB,gFAAgF;IAChF,OAAO,EAAE,IAAI,CACX,4BAA4B,EAC1B,gBAAgB,GAChB,eAAe,GACf,sBAAsB,GACtB,oBAAoB,GACpB,eAAe,GACf,uBAAuB,GACvB,QAAQ,GACR,mBAAmB,GACnB,8BAA8B,GAC9B,yBAAyB,GACzB,2BAA2B,GAC3B,aAAa,GACb,UAAU,GACV,SAAS,GACT,iBAAiB,GACjB,YAAY,GACZ,oBAAoB,CACvB,CAAA;IACD,QAAQ,EAAE,iBAAiB,GAAG,SAAS,CAAA;IACvC,cAAc,EAAE,iBAAiB,GAAG,SAAS,CAAA;IAC7C,SAAS,EAAE,SAAS,CAAA;IACpB,oBAAoB,EAAE,SAAS,CAAC,yBAAyB,CAAC,CAAA;IAC1D,KAAK,EAAE,kBAAkB,EAAE,CAAA;IAC3B,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACtC,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,WAAW,EAAE,kBAAkB,CAAA;IAC/B,iDAAiD;IACjD,oBAAoB,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,MAAM,CAAA;CACnD,CAAC;AA6fF,QAAA,IAAI,OAAO,IAAU,EAAE,SAAS,IAAa,CAAE;AAC/C,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAC1C;IAAE,GAAG,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,SAAS,KAAK,GAAG,CAAA;CAAE,CAAC;AAG7C,QAAA,MAAM,UAAU,kSAEd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Content.vue.js","names":[],"sources":["../../../src/components/Content/Content.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { generateClientOptions } from '@scalar/api-client/blocks/operation-code-sample'\nimport { mapHiddenClientsConfig } from '@scalar/api-client/modal/map-hidden-clients-config'\nimport { ScalarErrorBoundary } from '@scalar/components/error-boundary'\nimport type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference'\nimport type { Heading } from '@scalar/types/legacy'\nimport type { AuthStore } from '@scalar/workspace-store/entities/auth'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport {\n getSelectedServer,\n getServers,\n mergeSecurity,\n} from '@scalar/workspace-store/request-example'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport type { TraversedEntry as TraversedEntryType } from '@scalar/workspace-store/schemas/navigation'\nimport {\n getDocumentType,\n isAsyncApiDocument,\n isOpenApiDocument,\n} from '@scalar/workspace-store/schemas/type-guards'\nimport type {\n Workspace,\n WorkspaceDocument,\n} from '@scalar/workspace-store/schemas/workspace'\nimport { computed, onMounted } from 'vue'\n\nimport { ClientSelector } from '@/blocks/scalar-client-selector-block'\nimport { InfoBlock } from '@/blocks/scalar-info-block'\nimport { IntroductionCardItem } from '@/blocks/scalar-info-block/'\nimport { ServerSelector } from '@/blocks/scalar-server-selector-block'\nimport { AsyncApiTraversedEntry } from '@/components/Content/AsyncApi'\nimport { Auth } from '@/components/Content/Auth'\nimport TraversedEntry from '@/components/Content/Operations/TraversedEntry.vue'\nimport { RenderPlugins } from '@/components/RenderPlugins'\nimport { SectionFlare } from '@/components/SectionFlare'\nimport { getXKeysFromObject } from '@/features/specification-extension'\nimport {\n firstLazyLoadComplete,\n scheduleInitialLoadComplete,\n} from '@/helpers/lazy-bus'\n\nconst {\n document,\n clientDocument,\n items,\n environment,\n eventBus,\n options,\n authStore,\n} = defineProps<{\n infoSectionId: string\n /** The subset of the configuration object required for the content component */\n options: Pick<\n ApiReferenceConfigurationRaw,\n | 'authentication'\n | 'baseServerURL'\n | 'documentDownloadType'\n | 'expandAllResponses'\n | 'hiddenClients'\n | 'hideTestRequestButton'\n | 'layout'\n | 'orderRequiredPropertiesFirst'\n | 'orderSchemaPropertiesBy'\n | 'persistAuth'\n | 'proxyUrl'\n | 'servers'\n | 'showOperationId'\n | 'hideModels'\n | 'modelsSectionLabel'\n >\n document: WorkspaceDocument | undefined\n clientDocument: WorkspaceDocument | undefined\n authStore: AuthStore\n xScalarDefaultClient: Workspace['x-scalar-default-client']\n items: TraversedEntryType[]\n expandedItems: Record<string, boolean>\n eventBus: WorkspaceEventBus\n environment: XScalarEnvironment\n /** Heading id generator for Markdown headings */\n headingSlugGenerator: (heading: Heading) => string\n}>()\n\n/** Generate all client options so that it can be shared between the top client picker and the operations */\nconst clientOptions = computed(() =>\n generateClientOptions(mapHiddenClientsConfig(options.hiddenClients)),\n)\n\n/**\n * Narrow the (possibly AsyncAPI) documents to OpenAPI documents. api-reference\n * is OpenAPI-native, so AsyncAPI fields surface as undefined/empty.\n */\nconst openApiDocument = computed(() =>\n isOpenApiDocument(document) ? document : undefined,\n)\nconst openApiClientDocument = computed(() =>\n isOpenApiDocument(clientDocument) ? clientDocument : undefined,\n)\n\n/** AsyncAPI narrow, used to render the (currently channel-only) AsyncAPI content tree. */\nconst asyncApiDocument = computed(() =>\n isAsyncApiDocument(document) ? document : undefined,\n)\n\nconst documentType = computed(() => getDocumentType(document))\n\nconst specificationVersion = computed(() => {\n if (isAsyncApiDocument(document)) {\n return document['x-original-aas-version'] ?? document.asyncapi\n }\n return openApiDocument.value?.['x-original-oas-version']\n})\n\n/** Computed property to get all OpenAPI extension fields from the root document object */\nconst documentExtensions = computed(() => getXKeysFromObject(document))\n\n/** Computed property to get all OpenAPI extension fields from the document's info object */\nconst infoExtensions = computed(() => getXKeysFromObject(document?.info))\n\n/** Compute the servers for the document */\nconst servers = computed(() =>\n getServers(options?.servers ?? openApiClientDocument.value?.servers, {\n baseServerUrl: options?.baseServerURL,\n documentUrl: clientDocument?.['x-scalar-original-source-url'],\n }),\n)\n\n/** Compute the selected server for the document only (for now) */\nconst selectedServer = computed(() =>\n getSelectedServer(\n openApiClientDocument.value ?? null,\n null,\n null,\n servers.value,\n ),\n)\n\n/** Merge authentication config with the document security schemes */\nconst securitySchemes = computed(() =>\n mergeSecurity(\n openApiClientDocument.value?.components?.securitySchemes,\n options.authentication?.securitySchemes,\n authStore,\n openApiClientDocument.value?.['x-scalar-navigation']?.name ?? '',\n ),\n)\n\n/** Ensures firstLazyLoadComplete is set for documents with no Lazy sections (e.g. no operations/tags/models). */\nonMounted(() => {\n scheduleInitialLoadComplete()\n})\n</script>\n<template>\n <SectionFlare />\n\n <div class=\"narrow-references-container\">\n <slot name=\"start\" />\n\n <!-- Introduction -->\n\n <InfoBlock\n :id=\"infoSectionId\"\n :documentDownloadType=\"options.documentDownloadType\"\n :documentExtensions\n :documentType\n :documentUrl=\"document?.['x-scalar-original-source-url']\"\n :eventBus\n :externalDocs=\"openApiDocument?.externalDocs\"\n :headingSlugGenerator\n :info=\"document?.info\"\n :infoExtensions\n :layout=\"options.layout\"\n :specificationVersion>\n <template #selectors>\n <!-- Server Selector -->\n <ScalarErrorBoundary>\n <IntroductionCardItem\n v-if=\"servers?.length\"\n class=\"scalar-reference-intro-server scalar-client introduction-card-item text-base leading-normal [--scalar-address-bar-height:0px]\">\n <ServerSelector\n :eventBus\n :selectedServer\n :servers />\n </IntroductionCardItem>\n </ScalarErrorBoundary>\n\n <!-- Auth selector -->\n <ScalarErrorBoundary>\n <IntroductionCardItem\n v-if=\"document && !options.hideTestRequestButton\"\n class=\"scalar-reference-intro-auth scalar-client introduction-card-item leading-normal\">\n <Auth\n :authStore\n :document=\"clientDocument\"\n :environment\n :eventBus\n :options\n :securitySchemes\n :selectedServer />\n </IntroductionCardItem>\n </ScalarErrorBoundary>\n\n <!-- Client selector -->\n <ScalarErrorBoundary>\n <IntroductionCardItem\n v-if=\"clientOptions.length\"\n class=\"introduction-card-item scalar-reference-intro-clients\">\n <ClientSelector\n class=\"introduction-card-item scalar-reference-intro-clients\"\n :clientOptions\n :eventBus\n :selectedClient=\"xScalarDefaultClient\"\n :xScalarSdkInstallation=\"\n openApiDocument?.info?.['x-scalar-sdk-installation']\n \" />\n </IntroductionCardItem>\n </ScalarErrorBoundary>\n </template>\n </InfoBlock>\n\n <!-- Render traversed operations and webhooks -->\n <!-- Use recursive component for cleaner rendering -->\n <TraversedEntry\n v-if=\"items.length && openApiDocument\"\n :authStore\n :clientOptions\n :document=\"openApiDocument\"\n :entries=\"items\"\n :eventBus\n :expandedItems\n :options\n :securitySchemes\n :selectedClient=\"xScalarDefaultClient\"\n :selectedServer>\n </TraversedEntry>\n\n <!-- AsyncAPI: render channels grouped by tag, mirroring the sidebar order. -->\n <AsyncApiTraversedEntry\n v-else-if=\"items.length && asyncApiDocument\"\n :document=\"asyncApiDocument\"\n :entries=\"items\"\n :eventBus\n :expandedItems\n :options />\n\n <!-- Render plugins at content.end view -->\n <RenderPlugins\n :options\n viewName=\"content.end\" />\n\n <slot name=\"end\" />\n <!-- Placeholder content to allow the active item to be scrolled to the top while the rest of the content is lazy loaded -->\n <div\n v-if=\"!firstLazyLoadComplete\"\n class=\"h-dvh\"></div>\n </div>\n</template>\n\n<style>\n.narrow-references-container {\n container-name: narrow-references-container;\n container-type: inline-size;\n}\n</style>\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"Content.vue.js","names":[],"sources":["../../../src/components/Content/Content.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { generateClientOptions } from '@scalar/api-client/blocks/operation-code-sample'\nimport { mapHiddenClientsConfig } from '@scalar/api-client/modal/map-hidden-clients-config'\nimport { ScalarErrorBoundary } from '@scalar/components/error-boundary'\nimport type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference'\nimport type { Heading } from '@scalar/types/legacy'\nimport {\n getAsyncApiServers,\n getSelectedAsyncApiServer,\n} from '@scalar/workspace-store/channel-example'\nimport type { AuthStore } from '@scalar/workspace-store/entities/auth'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport {\n getSelectedServer,\n getServers,\n mergeSecurity,\n} from '@scalar/workspace-store/request-example'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport type { TraversedEntry as TraversedEntryType } from '@scalar/workspace-store/schemas/navigation'\nimport {\n getDocumentType,\n isAsyncApiDocument,\n isOpenApiDocument,\n} from '@scalar/workspace-store/schemas/type-guards'\nimport type {\n Workspace,\n WorkspaceDocument,\n} from '@scalar/workspace-store/schemas/workspace'\nimport { computed, onMounted } from 'vue'\n\nimport { AsyncApiServerSelector } from '@/blocks/scalar-asyncapi-server-selector-block'\nimport { ClientSelector } from '@/blocks/scalar-client-selector-block'\nimport { InfoBlock } from '@/blocks/scalar-info-block'\nimport { IntroductionCardItem } from '@/blocks/scalar-info-block/'\nimport {\n getRenderableSdks,\n SdkInstallationInstructions,\n} from '@/blocks/scalar-sdk-installation-instructions'\nimport { ServerSelector } from '@/blocks/scalar-server-selector-block'\nimport { AsyncApiTraversedEntry } from '@/components/Content/AsyncApi'\nimport { Auth } from '@/components/Content/Auth'\nimport TraversedEntry from '@/components/Content/Operations/TraversedEntry.vue'\nimport { RenderPlugins } from '@/components/RenderPlugins'\nimport { SectionFlare } from '@/components/SectionFlare'\nimport { getXKeysFromObject } from '@/features/specification-extension'\nimport {\n firstLazyLoadComplete,\n scheduleInitialLoadComplete,\n} from '@/helpers/lazy-bus'\n\nconst {\n document,\n clientDocument,\n items,\n environment,\n eventBus,\n options,\n authStore,\n} = defineProps<{\n infoSectionId: string\n /** The subset of the configuration object required for the content component */\n options: Pick<\n ApiReferenceConfigurationRaw,\n | 'authentication'\n | 'baseServerURL'\n | 'documentDownloadType'\n | 'expandAllResponses'\n | 'hiddenClients'\n | 'hideTestRequestButton'\n | 'layout'\n | 'oauth2RedirectUri'\n | 'orderRequiredPropertiesFirst'\n | 'orderSchemaPropertiesBy'\n | 'expandAllSchemaProperties'\n | 'persistAuth'\n | 'proxyUrl'\n | 'servers'\n | 'showOperationId'\n | 'hideModels'\n | 'modelsSectionLabel'\n >\n document: WorkspaceDocument | undefined\n clientDocument: WorkspaceDocument | undefined\n authStore: AuthStore\n xScalarDefaultClient: Workspace['x-scalar-default-client']\n items: TraversedEntryType[]\n expandedItems: Record<string, boolean>\n eventBus: WorkspaceEventBus\n environment: XScalarEnvironment\n /** Heading id generator for Markdown headings */\n headingSlugGenerator: (heading: Heading) => string\n}>()\n\n/** Generate all client options so that it can be shared between the top client picker and the operations */\nconst clientOptions = computed(() =>\n generateClientOptions(mapHiddenClientsConfig(options.hiddenClients)),\n)\n\n/**\n * Custom SDK installation instructions that actually have something to render.\n * Entries with only a `lang` are ignored so we can fall back to the client\n * selector instead of showing an empty card.\n */\nconst sdkInstallation = computed(() =>\n getRenderableSdks(openApiDocument.value?.info?.['x-scalar-sdk-installation']),\n)\n\n/**\n * Narrow the (possibly AsyncAPI) documents to OpenAPI documents. api-reference\n * is OpenAPI-native, so AsyncAPI fields surface as undefined/empty.\n */\nconst openApiDocument = computed(() =>\n isOpenApiDocument(document) ? document : undefined,\n)\nconst openApiClientDocument = computed(() =>\n isOpenApiDocument(clientDocument) ? clientDocument : undefined,\n)\n\n/** AsyncAPI narrow, used to render the (currently channel-only) AsyncAPI content tree. */\nconst asyncApiDocument = computed(() =>\n isAsyncApiDocument(document) ? document : undefined,\n)\n\n/** AsyncAPI narrow of the client document, where server selection/variables are persisted. */\nconst asyncApiClientDocument = computed(() =>\n isAsyncApiDocument(clientDocument) ? clientDocument : undefined,\n)\n\nconst documentType = computed(() => getDocumentType(document))\n\nconst specificationVersion = computed(() => {\n if (isAsyncApiDocument(document)) {\n return document['x-original-aas-version'] ?? document.asyncapi\n }\n return openApiDocument.value?.['x-original-oas-version']\n})\n\n/** Computed property to get all OpenAPI extension fields from the root document object */\nconst documentExtensions = computed(() => getXKeysFromObject(document))\n\n/** Computed property to get all OpenAPI extension fields from the document's info object */\nconst infoExtensions = computed(() => getXKeysFromObject(document?.info))\n\n/** Compute the servers for the document */\nconst servers = computed(() =>\n getServers(options?.servers ?? openApiClientDocument.value?.servers, {\n baseServerUrl: options?.baseServerURL,\n documentUrl: clientDocument?.['x-scalar-original-source-url'],\n }),\n)\n\n/** Compute the selected server for the document only (for now) */\nconst selectedServer = computed(() =>\n getSelectedServer(\n openApiClientDocument.value ?? null,\n null,\n null,\n servers.value,\n ),\n)\n\n/**\n * Compute the AsyncAPI servers (all protocols, not just WebSocket) for the\n * document-level server selector.\n */\nconst asyncApiServers = computed(() =>\n asyncApiClientDocument.value\n ? getAsyncApiServers(asyncApiClientDocument.value, { webSocketOnly: false })\n : [],\n)\n\n/** Compute the selected AsyncAPI server for the document */\nconst asyncApiSelectedServer = computed(() =>\n getSelectedAsyncApiServer(\n asyncApiClientDocument.value ?? null,\n asyncApiServers.value,\n ),\n)\n\n/** Merge authentication config with the document security schemes */\nconst securitySchemes = computed(() =>\n mergeSecurity(\n openApiClientDocument.value?.components?.securitySchemes,\n options.authentication?.securitySchemes,\n authStore,\n openApiClientDocument.value?.['x-scalar-navigation']?.name ?? '',\n options.oauth2RedirectUri,\n ),\n)\n\n/** Ensures firstLazyLoadComplete is set for documents with no Lazy sections (e.g. no operations/tags/models). */\nonMounted(() => {\n scheduleInitialLoadComplete()\n})\n</script>\n<template>\n <SectionFlare />\n\n <div class=\"narrow-references-container\">\n <slot name=\"start\" />\n\n <!-- Introduction -->\n\n <InfoBlock\n :id=\"infoSectionId\"\n :documentDownloadType=\"options.documentDownloadType\"\n :documentExtensions\n :documentType\n :documentUrl=\"document?.['x-scalar-original-source-url']\"\n :eventBus\n :externalDocs=\"openApiDocument?.externalDocs\"\n :headingSlugGenerator\n :info=\"document?.info\"\n :infoExtensions\n :layout=\"options.layout\"\n :specificationVersion>\n <template #selectors>\n <!-- Server Selector -->\n <ScalarErrorBoundary>\n <IntroductionCardItem\n v-if=\"servers?.length\"\n class=\"scalar-reference-intro-server scalar-client introduction-card-item text-base leading-normal [--scalar-address-bar-height:0px]\">\n <ServerSelector\n :eventBus\n :selectedServer\n :servers />\n </IntroductionCardItem>\n </ScalarErrorBoundary>\n\n <!-- AsyncAPI Server Selector -->\n <ScalarErrorBoundary>\n <IntroductionCardItem\n v-if=\"asyncApiServers.length\"\n class=\"scalar-reference-intro-server scalar-client introduction-card-item text-base leading-normal [--scalar-address-bar-height:0px]\">\n <AsyncApiServerSelector\n :eventBus\n :selectedServer=\"asyncApiSelectedServer\"\n :servers=\"asyncApiServers\" />\n </IntroductionCardItem>\n </ScalarErrorBoundary>\n\n <!-- Auth selector -->\n <ScalarErrorBoundary>\n <IntroductionCardItem\n v-if=\"document && !options.hideTestRequestButton\"\n class=\"scalar-reference-intro-auth scalar-client introduction-card-item leading-normal\">\n <Auth\n :authStore\n :document=\"clientDocument\"\n :environment\n :eventBus\n :options\n :securitySchemes\n :selectedServer />\n </IntroductionCardItem>\n </ScalarErrorBoundary>\n\n <!-- Custom SDK installation instructions, or the generic client selector -->\n <ScalarErrorBoundary>\n <IntroductionCardItem\n v-if=\"sdkInstallation.length\"\n class=\"introduction-card-item scalar-reference-intro-clients\">\n <SdkInstallationInstructions\n class=\"introduction-card-item scalar-reference-intro-clients\"\n :xScalarSdkInstallation=\"sdkInstallation\" />\n </IntroductionCardItem>\n <IntroductionCardItem\n v-else-if=\"clientOptions.length && !asyncApiDocument\"\n class=\"introduction-card-item scalar-reference-intro-clients\">\n <ClientSelector\n class=\"introduction-card-item scalar-reference-intro-clients\"\n :clientOptions\n :eventBus\n :selectedClient=\"xScalarDefaultClient\" />\n </IntroductionCardItem>\n </ScalarErrorBoundary>\n </template>\n </InfoBlock>\n\n <!-- Render traversed operations and webhooks -->\n <!-- Use recursive component for cleaner rendering -->\n <TraversedEntry\n v-if=\"items.length && openApiDocument\"\n :authStore\n :clientOptions\n :document=\"openApiDocument\"\n :entries=\"items\"\n :eventBus\n :expandedItems\n :options\n :securitySchemes\n :selectedClient=\"xScalarDefaultClient\"\n :selectedServer>\n </TraversedEntry>\n\n <!-- AsyncAPI: render channels grouped by tag, mirroring the sidebar order. -->\n <AsyncApiTraversedEntry\n v-else-if=\"items.length && asyncApiDocument\"\n :document=\"asyncApiDocument\"\n :entries=\"items\"\n :eventBus\n :expandedItems\n :options />\n\n <!-- Render plugins at content.end view -->\n <RenderPlugins\n :options\n viewName=\"content.end\" />\n\n <slot name=\"end\" />\n <!-- Placeholder content to allow the active item to be scrolled to the top while the rest of the content is lazy loaded -->\n <div\n v-if=\"!firstLazyLoadComplete\"\n class=\"h-dvh\"></div>\n </div>\n</template>\n\n<style>\n.narrow-references-container {\n container-name: narrow-references-container;\n container-type: inline-size;\n}\n</style>\n"],"mappings":""}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import AsyncApiServerSelector_default from "../../blocks/scalar-asyncapi-server-selector-block/components/AsyncApiServerSelector.vue.js";
|
|
1
2
|
import ClientSelector_default from "../../blocks/scalar-client-selector-block/components/ClientSelector.vue.js";
|
|
2
3
|
import { getXKeysFromObject } from "../../features/specification-extension/helpers.js";
|
|
3
4
|
import InfoBlock_default from "../../blocks/scalar-info-block/components/InfoBlock.vue.js";
|
|
4
5
|
import IntroductionCardItem_default from "../../blocks/scalar-info-block/components/IntroductionCardItem.vue.js";
|
|
6
|
+
import { getRenderableSdks } from "../../blocks/scalar-sdk-installation-instructions/helpers/renderable-sdks.js";
|
|
7
|
+
import SdkInstallationInstructions_default from "../../blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.js";
|
|
5
8
|
import ServerSelector_default from "../../blocks/scalar-server-selector-block/components/ServerSelector.vue.js";
|
|
6
9
|
import { firstLazyLoadComplete, scheduleInitialLoadComplete } from "../../helpers/lazy-bus.js";
|
|
7
10
|
import AsyncApiTraversedEntry_default from "./AsyncApi/AsyncApiTraversedEntry.vue.js";
|
|
@@ -10,6 +13,7 @@ import TraversedEntry_default from "./Operations/TraversedEntry.vue.js";
|
|
|
10
13
|
import RenderPlugins_default from "../RenderPlugins/RenderPlugins.vue.js";
|
|
11
14
|
import SectionFlare_default from "../SectionFlare/SectionFlare.vue.js";
|
|
12
15
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, onMounted, openBlock, renderSlot, unref, withCtx } from "vue";
|
|
16
|
+
import { getAsyncApiServers, getSelectedAsyncApiServer } from "@scalar/workspace-store/channel-example";
|
|
13
17
|
import { getSelectedServer, getServers, mergeSecurity } from "@scalar/workspace-store/request-example";
|
|
14
18
|
import { getDocumentType, isAsyncApiDocument, isOpenApiDocument } from "@scalar/workspace-store/schemas/type-guards";
|
|
15
19
|
import { generateClientOptions } from "@scalar/api-client/blocks/operation-code-sample";
|
|
@@ -40,6 +44,12 @@ var Content_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ define
|
|
|
40
44
|
/** Generate all client options so that it can be shared between the top client picker and the operations */
|
|
41
45
|
const clientOptions = computed(() => generateClientOptions(mapHiddenClientsConfig(__props.options.hiddenClients)));
|
|
42
46
|
/**
|
|
47
|
+
* Custom SDK installation instructions that actually have something to render.
|
|
48
|
+
* Entries with only a `lang` are ignored so we can fall back to the client
|
|
49
|
+
* selector instead of showing an empty card.
|
|
50
|
+
*/
|
|
51
|
+
const sdkInstallation = computed(() => getRenderableSdks(openApiDocument.value?.info?.["x-scalar-sdk-installation"]));
|
|
52
|
+
/**
|
|
43
53
|
* Narrow the (possibly AsyncAPI) documents to OpenAPI documents. api-reference
|
|
44
54
|
* is OpenAPI-native, so AsyncAPI fields surface as undefined/empty.
|
|
45
55
|
*/
|
|
@@ -47,6 +57,8 @@ var Content_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ define
|
|
|
47
57
|
const openApiClientDocument = computed(() => isOpenApiDocument(__props.clientDocument) ? __props.clientDocument : void 0);
|
|
48
58
|
/** AsyncAPI narrow, used to render the (currently channel-only) AsyncAPI content tree. */
|
|
49
59
|
const asyncApiDocument = computed(() => isAsyncApiDocument(__props.document) ? __props.document : void 0);
|
|
60
|
+
/** AsyncAPI narrow of the client document, where server selection/variables are persisted. */
|
|
61
|
+
const asyncApiClientDocument = computed(() => isAsyncApiDocument(__props.clientDocument) ? __props.clientDocument : void 0);
|
|
50
62
|
const documentType = computed(() => getDocumentType(__props.document));
|
|
51
63
|
const specificationVersion = computed(() => {
|
|
52
64
|
if (isAsyncApiDocument(__props.document)) return __props.document["x-original-aas-version"] ?? __props.document.asyncapi;
|
|
@@ -63,8 +75,15 @@ var Content_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ define
|
|
|
63
75
|
}));
|
|
64
76
|
/** Compute the selected server for the document only (for now) */
|
|
65
77
|
const selectedServer = computed(() => getSelectedServer(openApiClientDocument.value ?? null, null, null, servers.value));
|
|
78
|
+
/**
|
|
79
|
+
* Compute the AsyncAPI servers (all protocols, not just WebSocket) for the
|
|
80
|
+
* document-level server selector.
|
|
81
|
+
*/
|
|
82
|
+
const asyncApiServers = computed(() => asyncApiClientDocument.value ? getAsyncApiServers(asyncApiClientDocument.value, { webSocketOnly: false }) : []);
|
|
83
|
+
/** Compute the selected AsyncAPI server for the document */
|
|
84
|
+
const asyncApiSelectedServer = computed(() => getSelectedAsyncApiServer(asyncApiClientDocument.value ?? null, asyncApiServers.value));
|
|
66
85
|
/** Merge authentication config with the document security schemes */
|
|
67
|
-
const securitySchemes = computed(() => mergeSecurity(openApiClientDocument.value?.components?.securitySchemes, __props.options.authentication?.securitySchemes, __props.authStore, openApiClientDocument.value?.["x-scalar-navigation"]?.name ?? ""));
|
|
86
|
+
const securitySchemes = computed(() => mergeSecurity(openApiClientDocument.value?.components?.securitySchemes, __props.options.authentication?.securitySchemes, __props.authStore, openApiClientDocument.value?.["x-scalar-navigation"]?.name ?? "", __props.options.oauth2RedirectUri));
|
|
68
87
|
/** Ensures firstLazyLoadComplete is set for documents with no Lazy sections (e.g. no operations/tags/models). */
|
|
69
88
|
onMounted(() => {
|
|
70
89
|
scheduleInitialLoadComplete();
|
|
@@ -105,6 +124,24 @@ var Content_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ define
|
|
|
105
124
|
})) : createCommentVNode("", true)]),
|
|
106
125
|
_: 1
|
|
107
126
|
}),
|
|
127
|
+
createVNode(unref(ScalarErrorBoundary), null, {
|
|
128
|
+
default: withCtx(() => [asyncApiServers.value.length ? (openBlock(), createBlock(unref(IntroductionCardItem_default), {
|
|
129
|
+
key: 0,
|
|
130
|
+
class: "scalar-reference-intro-server scalar-client introduction-card-item text-base leading-normal [--scalar-address-bar-height:0px]"
|
|
131
|
+
}, {
|
|
132
|
+
default: withCtx(() => [createVNode(unref(AsyncApiServerSelector_default), {
|
|
133
|
+
eventBus: __props.eventBus,
|
|
134
|
+
selectedServer: asyncApiSelectedServer.value,
|
|
135
|
+
servers: asyncApiServers.value
|
|
136
|
+
}, null, 8, [
|
|
137
|
+
"eventBus",
|
|
138
|
+
"selectedServer",
|
|
139
|
+
"servers"
|
|
140
|
+
])]),
|
|
141
|
+
_: 1
|
|
142
|
+
})) : createCommentVNode("", true)]),
|
|
143
|
+
_: 1
|
|
144
|
+
}),
|
|
108
145
|
createVNode(unref(ScalarErrorBoundary), null, {
|
|
109
146
|
default: withCtx(() => [__props.document && !__props.options.hideTestRequestButton ? (openBlock(), createBlock(unref(IntroductionCardItem_default), {
|
|
110
147
|
key: 0,
|
|
@@ -132,21 +169,28 @@ var Content_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ define
|
|
|
132
169
|
_: 1
|
|
133
170
|
}),
|
|
134
171
|
createVNode(unref(ScalarErrorBoundary), null, {
|
|
135
|
-
default: withCtx(() => [
|
|
172
|
+
default: withCtx(() => [sdkInstallation.value.length ? (openBlock(), createBlock(unref(IntroductionCardItem_default), {
|
|
136
173
|
key: 0,
|
|
137
174
|
class: "introduction-card-item scalar-reference-intro-clients"
|
|
175
|
+
}, {
|
|
176
|
+
default: withCtx(() => [createVNode(unref(SdkInstallationInstructions_default), {
|
|
177
|
+
class: "introduction-card-item scalar-reference-intro-clients",
|
|
178
|
+
xScalarSdkInstallation: sdkInstallation.value
|
|
179
|
+
}, null, 8, ["xScalarSdkInstallation"])]),
|
|
180
|
+
_: 1
|
|
181
|
+
})) : clientOptions.value.length && !asyncApiDocument.value ? (openBlock(), createBlock(unref(IntroductionCardItem_default), {
|
|
182
|
+
key: 1,
|
|
183
|
+
class: "introduction-card-item scalar-reference-intro-clients"
|
|
138
184
|
}, {
|
|
139
185
|
default: withCtx(() => [createVNode(unref(ClientSelector_default), {
|
|
140
186
|
class: "introduction-card-item scalar-reference-intro-clients",
|
|
141
187
|
clientOptions: clientOptions.value,
|
|
142
188
|
eventBus: __props.eventBus,
|
|
143
|
-
selectedClient: __props.xScalarDefaultClient
|
|
144
|
-
xScalarSdkInstallation: openApiDocument.value?.info?.["x-scalar-sdk-installation"]
|
|
189
|
+
selectedClient: __props.xScalarDefaultClient
|
|
145
190
|
}, null, 8, [
|
|
146
191
|
"clientOptions",
|
|
147
192
|
"eventBus",
|
|
148
|
-
"selectedClient"
|
|
149
|
-
"xScalarSdkInstallation"
|
|
193
|
+
"selectedClient"
|
|
150
194
|
])]),
|
|
151
195
|
_: 1
|
|
152
196
|
})) : createCommentVNode("", true)]),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Content.vue.script.js","names":[],"sources":["../../../src/components/Content/Content.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { generateClientOptions } from '@scalar/api-client/blocks/operation-code-sample'\nimport { mapHiddenClientsConfig } from '@scalar/api-client/modal/map-hidden-clients-config'\nimport { ScalarErrorBoundary } from '@scalar/components/error-boundary'\nimport type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference'\nimport type { Heading } from '@scalar/types/legacy'\nimport type { AuthStore } from '@scalar/workspace-store/entities/auth'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport {\n getSelectedServer,\n getServers,\n mergeSecurity,\n} from '@scalar/workspace-store/request-example'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport type { TraversedEntry as TraversedEntryType } from '@scalar/workspace-store/schemas/navigation'\nimport {\n getDocumentType,\n isAsyncApiDocument,\n isOpenApiDocument,\n} from '@scalar/workspace-store/schemas/type-guards'\nimport type {\n Workspace,\n WorkspaceDocument,\n} from '@scalar/workspace-store/schemas/workspace'\nimport { computed, onMounted } from 'vue'\n\nimport { ClientSelector } from '@/blocks/scalar-client-selector-block'\nimport { InfoBlock } from '@/blocks/scalar-info-block'\nimport { IntroductionCardItem } from '@/blocks/scalar-info-block/'\nimport { ServerSelector } from '@/blocks/scalar-server-selector-block'\nimport { AsyncApiTraversedEntry } from '@/components/Content/AsyncApi'\nimport { Auth } from '@/components/Content/Auth'\nimport TraversedEntry from '@/components/Content/Operations/TraversedEntry.vue'\nimport { RenderPlugins } from '@/components/RenderPlugins'\nimport { SectionFlare } from '@/components/SectionFlare'\nimport { getXKeysFromObject } from '@/features/specification-extension'\nimport {\n firstLazyLoadComplete,\n scheduleInitialLoadComplete,\n} from '@/helpers/lazy-bus'\n\nconst {\n document,\n clientDocument,\n items,\n environment,\n eventBus,\n options,\n authStore,\n} = defineProps<{\n infoSectionId: string\n /** The subset of the configuration object required for the content component */\n options: Pick<\n ApiReferenceConfigurationRaw,\n | 'authentication'\n | 'baseServerURL'\n | 'documentDownloadType'\n | 'expandAllResponses'\n | 'hiddenClients'\n | 'hideTestRequestButton'\n | 'layout'\n | 'orderRequiredPropertiesFirst'\n | 'orderSchemaPropertiesBy'\n | 'persistAuth'\n | 'proxyUrl'\n | 'servers'\n | 'showOperationId'\n | 'hideModels'\n | 'modelsSectionLabel'\n >\n document: WorkspaceDocument | undefined\n clientDocument: WorkspaceDocument | undefined\n authStore: AuthStore\n xScalarDefaultClient: Workspace['x-scalar-default-client']\n items: TraversedEntryType[]\n expandedItems: Record<string, boolean>\n eventBus: WorkspaceEventBus\n environment: XScalarEnvironment\n /** Heading id generator for Markdown headings */\n headingSlugGenerator: (heading: Heading) => string\n}>()\n\n/** Generate all client options so that it can be shared between the top client picker and the operations */\nconst clientOptions = computed(() =>\n generateClientOptions(mapHiddenClientsConfig(options.hiddenClients)),\n)\n\n/**\n * Narrow the (possibly AsyncAPI) documents to OpenAPI documents. api-reference\n * is OpenAPI-native, so AsyncAPI fields surface as undefined/empty.\n */\nconst openApiDocument = computed(() =>\n isOpenApiDocument(document) ? document : undefined,\n)\nconst openApiClientDocument = computed(() =>\n isOpenApiDocument(clientDocument) ? clientDocument : undefined,\n)\n\n/** AsyncAPI narrow, used to render the (currently channel-only) AsyncAPI content tree. */\nconst asyncApiDocument = computed(() =>\n isAsyncApiDocument(document) ? document : undefined,\n)\n\nconst documentType = computed(() => getDocumentType(document))\n\nconst specificationVersion = computed(() => {\n if (isAsyncApiDocument(document)) {\n return document['x-original-aas-version'] ?? document.asyncapi\n }\n return openApiDocument.value?.['x-original-oas-version']\n})\n\n/** Computed property to get all OpenAPI extension fields from the root document object */\nconst documentExtensions = computed(() => getXKeysFromObject(document))\n\n/** Computed property to get all OpenAPI extension fields from the document's info object */\nconst infoExtensions = computed(() => getXKeysFromObject(document?.info))\n\n/** Compute the servers for the document */\nconst servers = computed(() =>\n getServers(options?.servers ?? openApiClientDocument.value?.servers, {\n baseServerUrl: options?.baseServerURL,\n documentUrl: clientDocument?.['x-scalar-original-source-url'],\n }),\n)\n\n/** Compute the selected server for the document only (for now) */\nconst selectedServer = computed(() =>\n getSelectedServer(\n openApiClientDocument.value ?? null,\n null,\n null,\n servers.value,\n ),\n)\n\n/** Merge authentication config with the document security schemes */\nconst securitySchemes = computed(() =>\n mergeSecurity(\n openApiClientDocument.value?.components?.securitySchemes,\n options.authentication?.securitySchemes,\n authStore,\n openApiClientDocument.value?.['x-scalar-navigation']?.name ?? '',\n ),\n)\n\n/** Ensures firstLazyLoadComplete is set for documents with no Lazy sections (e.g. no operations/tags/models). */\nonMounted(() => {\n scheduleInitialLoadComplete()\n})\n</script>\n<template>\n <SectionFlare />\n\n <div class=\"narrow-references-container\">\n <slot name=\"start\" />\n\n <!-- Introduction -->\n\n <InfoBlock\n :id=\"infoSectionId\"\n :documentDownloadType=\"options.documentDownloadType\"\n :documentExtensions\n :documentType\n :documentUrl=\"document?.['x-scalar-original-source-url']\"\n :eventBus\n :externalDocs=\"openApiDocument?.externalDocs\"\n :headingSlugGenerator\n :info=\"document?.info\"\n :infoExtensions\n :layout=\"options.layout\"\n :specificationVersion>\n <template #selectors>\n <!-- Server Selector -->\n <ScalarErrorBoundary>\n <IntroductionCardItem\n v-if=\"servers?.length\"\n class=\"scalar-reference-intro-server scalar-client introduction-card-item text-base leading-normal [--scalar-address-bar-height:0px]\">\n <ServerSelector\n :eventBus\n :selectedServer\n :servers />\n </IntroductionCardItem>\n </ScalarErrorBoundary>\n\n <!-- Auth selector -->\n <ScalarErrorBoundary>\n <IntroductionCardItem\n v-if=\"document && !options.hideTestRequestButton\"\n class=\"scalar-reference-intro-auth scalar-client introduction-card-item leading-normal\">\n <Auth\n :authStore\n :document=\"clientDocument\"\n :environment\n :eventBus\n :options\n :securitySchemes\n :selectedServer />\n </IntroductionCardItem>\n </ScalarErrorBoundary>\n\n <!-- Client selector -->\n <ScalarErrorBoundary>\n <IntroductionCardItem\n v-if=\"clientOptions.length\"\n class=\"introduction-card-item scalar-reference-intro-clients\">\n <ClientSelector\n class=\"introduction-card-item scalar-reference-intro-clients\"\n :clientOptions\n :eventBus\n :selectedClient=\"xScalarDefaultClient\"\n :xScalarSdkInstallation=\"\n openApiDocument?.info?.['x-scalar-sdk-installation']\n \" />\n </IntroductionCardItem>\n </ScalarErrorBoundary>\n </template>\n </InfoBlock>\n\n <!-- Render traversed operations and webhooks -->\n <!-- Use recursive component for cleaner rendering -->\n <TraversedEntry\n v-if=\"items.length && openApiDocument\"\n :authStore\n :clientOptions\n :document=\"openApiDocument\"\n :entries=\"items\"\n :eventBus\n :expandedItems\n :options\n :securitySchemes\n :selectedClient=\"xScalarDefaultClient\"\n :selectedServer>\n </TraversedEntry>\n\n <!-- AsyncAPI: render channels grouped by tag, mirroring the sidebar order. -->\n <AsyncApiTraversedEntry\n v-else-if=\"items.length && asyncApiDocument\"\n :document=\"asyncApiDocument\"\n :entries=\"items\"\n :eventBus\n :expandedItems\n :options />\n\n <!-- Render plugins at content.end view -->\n <RenderPlugins\n :options\n viewName=\"content.end\" />\n\n <slot name=\"end\" />\n <!-- Placeholder content to allow the active item to be scrolled to the top while the rest of the content is lazy loaded -->\n <div\n v-if=\"!firstLazyLoadComplete\"\n class=\"h-dvh\"></div>\n </div>\n</template>\n\n<style>\n.narrow-references-container {\n container-name: narrow-references-container;\n container-type: inline-size;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmFA,MAAM,gBAAgB,eACpB,sBAAsB,uBAAuB,QAAA,QAAQ,cAAc,CAAC,CACtE;;;;;EAMA,MAAM,kBAAkB,eACtB,kBAAkB,QAAA,SAAS,GAAG,QAAA,WAAW,KAAA,EAC3C;EACA,MAAM,wBAAwB,eAC5B,kBAAkB,QAAA,eAAe,GAAG,QAAA,iBAAiB,KAAA,EACvD;;EAGA,MAAM,mBAAmB,eACvB,mBAAmB,QAAA,SAAS,GAAG,QAAA,WAAW,KAAA,EAC5C;EAEA,MAAM,eAAe,eAAe,gBAAgB,QAAA,SAAS,CAAA;EAE7D,MAAM,uBAAuB,eAAe;AAC1C,OAAI,mBAAmB,QAAA,SAAS,CAC9B,QAAO,QAAA,SAAS,6BAA6B,QAAA,SAAS;AAExD,UAAO,gBAAgB,QAAQ;IAChC;;EAGD,MAAM,qBAAqB,eAAe,mBAAmB,QAAA,SAAS,CAAA;;EAGtE,MAAM,iBAAiB,eAAe,mBAAmB,QAAA,UAAU,KAAK,CAAA;;EAGxE,MAAM,UAAU,eACd,WAAW,QAAA,SAAS,WAAW,sBAAsB,OAAO,SAAS;GACnE,eAAe,QAAA,SAAS;GACxB,aAAa,QAAA,iBAAiB;GAC/B,CAAC,CACJ;;EAGA,MAAM,iBAAiB,eACrB,kBACE,sBAAsB,SAAS,MAC/B,MACA,MACA,QAAQ,MACT,CACH;;EAGA,MAAM,kBAAkB,eACtB,cACE,sBAAsB,OAAO,YAAY,iBACzC,QAAA,QAAQ,gBAAgB,iBACxB,QAAA,WACA,sBAAsB,QAAQ,wBAAwB,QAAQ,GAC/D,CACH;;AAGA,kBAAgB;AACd,gCAA4B;IAC7B;;2DAGC,YAAgB,MAAA,qBAAA,CAAA,EAEhB,mBAoGM,OApGN,YAoGM;IAnGJ,WAAqB,KAAA,QAAA,QAAA;IAIrB,YA0DY,MAAA,kBAAA,EAAA;KAzDT,IAAI,QAAA;KACJ,sBAAsB,QAAA,QAAQ;KAC9B,oBAAA,mBAAA;KACA,cAAA,aAAA;KACA,aAAa,QAAA,WAAQ;KACrB,UAAA,QAAA;KACA,cAAc,gBAAA,OAAiB;KAC/B,sBAAA,QAAA;KACA,MAAM,QAAA,UAAU;KAChB,gBAAA,eAAA;KACA,QAAQ,QAAA,QAAQ;KAChB,sBAAA,qBAAA;;KACU,WAAS,cAWI;MATtB,YASsB,MAAA,oBAAA,EAAA,MAAA;8BADG,CANf,QAAA,OAAS,UAAA,WAAA,EADjB,YAOuB,MAAA,6BAAA,EAAA;;QALrB,OAAM;;+BAIO,CAHb,YAGa,MAAA,uBAAA,EAAA;SAFV,UAAA,QAAA;SACA,gBAAA,eAAA;SACA,SAAA,QAAA;;;;;;;;;;MAKP,YAasB,MAAA,oBAAA,EAAA,MAAA;8BADG,CAVf,QAAA,YAAQ,CAAK,QAAA,QAAQ,yBAAA,WAAA,EAD7B,YAWuB,MAAA,6BAAA,EAAA;;QATrB,OAAM;;+BAQc,CAPpB,YAOoB,MAAA,aAAA,EAAA;SANjB,WAAA,QAAA;SACA,UAAU,QAAA;SACV,aAAA,QAAA;SACA,UAAA,QAAA;SACA,SAAA,QAAA;SACA,iBAAA,gBAAA;SACA,gBAAA,eAAA;;;;;;;;;;;;;;MAKP,YAasB,MAAA,oBAAA,EAAA,MAAA;8BADG,CAVf,cAAA,MAAc,UAAA,WAAA,EADtB,YAWuB,MAAA,6BAAA,EAAA;;QATrB,OAAM;;+BAQA,CAPN,YAOM,MAAA,uBAAA,EAAA;SANJ,OAAM;SACL,eAAA,cAAA;SACA,UAAA,QAAA;SACA,gBAAgB,QAAA;SAChB,wBAAyC,gBAAA,OAAiB,OAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;IAWjE,QAAA,MAAM,UAAU,gBAAA,SAAA,WAAA,EADxB,YAYiB,wBAAA;;KAVd,WAAA,QAAA;KACA,eAAA,cAAA;KACA,UAAU,gBAAA;KACV,SAAS,QAAA;KACT,UAAA,QAAA;KACA,eAAA,QAAA;KACA,SAAA,QAAA;KACA,iBAAA,gBAAA;KACA,gBAAgB,QAAA;KAChB,gBAAA,eAAA;;;;;;;;;;;;UAKU,QAAA,MAAM,UAAU,iBAAA,SAAA,WAAA,EAD7B,YAMa,MAAA,+BAAA,EAAA;;KAJV,UAAU,iBAAA;KACV,SAAS,QAAA;KACT,UAAA,QAAA;KACA,eAAA,QAAA;KACA,SAAA,QAAA;;;;;;;;IAGH,YAE2B,MAAA,sBAAA,EAAA;KADxB,SAAA,QAAA;KACD,UAAS;;IAEX,WAAmB,KAAA,QAAA,MAAA;KAGV,MAAA,sBAAqB,IAAA,WAAA,EAD9B,mBAEsB,OAFtB,WAEsB,IAAA,mBAAA,IAAA,KAAA"}
|
|
1
|
+
{"version":3,"file":"Content.vue.script.js","names":[],"sources":["../../../src/components/Content/Content.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { generateClientOptions } from '@scalar/api-client/blocks/operation-code-sample'\nimport { mapHiddenClientsConfig } from '@scalar/api-client/modal/map-hidden-clients-config'\nimport { ScalarErrorBoundary } from '@scalar/components/error-boundary'\nimport type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference'\nimport type { Heading } from '@scalar/types/legacy'\nimport {\n getAsyncApiServers,\n getSelectedAsyncApiServer,\n} from '@scalar/workspace-store/channel-example'\nimport type { AuthStore } from '@scalar/workspace-store/entities/auth'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport {\n getSelectedServer,\n getServers,\n mergeSecurity,\n} from '@scalar/workspace-store/request-example'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport type { TraversedEntry as TraversedEntryType } from '@scalar/workspace-store/schemas/navigation'\nimport {\n getDocumentType,\n isAsyncApiDocument,\n isOpenApiDocument,\n} from '@scalar/workspace-store/schemas/type-guards'\nimport type {\n Workspace,\n WorkspaceDocument,\n} from '@scalar/workspace-store/schemas/workspace'\nimport { computed, onMounted } from 'vue'\n\nimport { AsyncApiServerSelector } from '@/blocks/scalar-asyncapi-server-selector-block'\nimport { ClientSelector } from '@/blocks/scalar-client-selector-block'\nimport { InfoBlock } from '@/blocks/scalar-info-block'\nimport { IntroductionCardItem } from '@/blocks/scalar-info-block/'\nimport {\n getRenderableSdks,\n SdkInstallationInstructions,\n} from '@/blocks/scalar-sdk-installation-instructions'\nimport { ServerSelector } from '@/blocks/scalar-server-selector-block'\nimport { AsyncApiTraversedEntry } from '@/components/Content/AsyncApi'\nimport { Auth } from '@/components/Content/Auth'\nimport TraversedEntry from '@/components/Content/Operations/TraversedEntry.vue'\nimport { RenderPlugins } from '@/components/RenderPlugins'\nimport { SectionFlare } from '@/components/SectionFlare'\nimport { getXKeysFromObject } from '@/features/specification-extension'\nimport {\n firstLazyLoadComplete,\n scheduleInitialLoadComplete,\n} from '@/helpers/lazy-bus'\n\nconst {\n document,\n clientDocument,\n items,\n environment,\n eventBus,\n options,\n authStore,\n} = defineProps<{\n infoSectionId: string\n /** The subset of the configuration object required for the content component */\n options: Pick<\n ApiReferenceConfigurationRaw,\n | 'authentication'\n | 'baseServerURL'\n | 'documentDownloadType'\n | 'expandAllResponses'\n | 'hiddenClients'\n | 'hideTestRequestButton'\n | 'layout'\n | 'oauth2RedirectUri'\n | 'orderRequiredPropertiesFirst'\n | 'orderSchemaPropertiesBy'\n | 'expandAllSchemaProperties'\n | 'persistAuth'\n | 'proxyUrl'\n | 'servers'\n | 'showOperationId'\n | 'hideModels'\n | 'modelsSectionLabel'\n >\n document: WorkspaceDocument | undefined\n clientDocument: WorkspaceDocument | undefined\n authStore: AuthStore\n xScalarDefaultClient: Workspace['x-scalar-default-client']\n items: TraversedEntryType[]\n expandedItems: Record<string, boolean>\n eventBus: WorkspaceEventBus\n environment: XScalarEnvironment\n /** Heading id generator for Markdown headings */\n headingSlugGenerator: (heading: Heading) => string\n}>()\n\n/** Generate all client options so that it can be shared between the top client picker and the operations */\nconst clientOptions = computed(() =>\n generateClientOptions(mapHiddenClientsConfig(options.hiddenClients)),\n)\n\n/**\n * Custom SDK installation instructions that actually have something to render.\n * Entries with only a `lang` are ignored so we can fall back to the client\n * selector instead of showing an empty card.\n */\nconst sdkInstallation = computed(() =>\n getRenderableSdks(openApiDocument.value?.info?.['x-scalar-sdk-installation']),\n)\n\n/**\n * Narrow the (possibly AsyncAPI) documents to OpenAPI documents. api-reference\n * is OpenAPI-native, so AsyncAPI fields surface as undefined/empty.\n */\nconst openApiDocument = computed(() =>\n isOpenApiDocument(document) ? document : undefined,\n)\nconst openApiClientDocument = computed(() =>\n isOpenApiDocument(clientDocument) ? clientDocument : undefined,\n)\n\n/** AsyncAPI narrow, used to render the (currently channel-only) AsyncAPI content tree. */\nconst asyncApiDocument = computed(() =>\n isAsyncApiDocument(document) ? document : undefined,\n)\n\n/** AsyncAPI narrow of the client document, where server selection/variables are persisted. */\nconst asyncApiClientDocument = computed(() =>\n isAsyncApiDocument(clientDocument) ? clientDocument : undefined,\n)\n\nconst documentType = computed(() => getDocumentType(document))\n\nconst specificationVersion = computed(() => {\n if (isAsyncApiDocument(document)) {\n return document['x-original-aas-version'] ?? document.asyncapi\n }\n return openApiDocument.value?.['x-original-oas-version']\n})\n\n/** Computed property to get all OpenAPI extension fields from the root document object */\nconst documentExtensions = computed(() => getXKeysFromObject(document))\n\n/** Computed property to get all OpenAPI extension fields from the document's info object */\nconst infoExtensions = computed(() => getXKeysFromObject(document?.info))\n\n/** Compute the servers for the document */\nconst servers = computed(() =>\n getServers(options?.servers ?? openApiClientDocument.value?.servers, {\n baseServerUrl: options?.baseServerURL,\n documentUrl: clientDocument?.['x-scalar-original-source-url'],\n }),\n)\n\n/** Compute the selected server for the document only (for now) */\nconst selectedServer = computed(() =>\n getSelectedServer(\n openApiClientDocument.value ?? null,\n null,\n null,\n servers.value,\n ),\n)\n\n/**\n * Compute the AsyncAPI servers (all protocols, not just WebSocket) for the\n * document-level server selector.\n */\nconst asyncApiServers = computed(() =>\n asyncApiClientDocument.value\n ? getAsyncApiServers(asyncApiClientDocument.value, { webSocketOnly: false })\n : [],\n)\n\n/** Compute the selected AsyncAPI server for the document */\nconst asyncApiSelectedServer = computed(() =>\n getSelectedAsyncApiServer(\n asyncApiClientDocument.value ?? null,\n asyncApiServers.value,\n ),\n)\n\n/** Merge authentication config with the document security schemes */\nconst securitySchemes = computed(() =>\n mergeSecurity(\n openApiClientDocument.value?.components?.securitySchemes,\n options.authentication?.securitySchemes,\n authStore,\n openApiClientDocument.value?.['x-scalar-navigation']?.name ?? '',\n options.oauth2RedirectUri,\n ),\n)\n\n/** Ensures firstLazyLoadComplete is set for documents with no Lazy sections (e.g. no operations/tags/models). */\nonMounted(() => {\n scheduleInitialLoadComplete()\n})\n</script>\n<template>\n <SectionFlare />\n\n <div class=\"narrow-references-container\">\n <slot name=\"start\" />\n\n <!-- Introduction -->\n\n <InfoBlock\n :id=\"infoSectionId\"\n :documentDownloadType=\"options.documentDownloadType\"\n :documentExtensions\n :documentType\n :documentUrl=\"document?.['x-scalar-original-source-url']\"\n :eventBus\n :externalDocs=\"openApiDocument?.externalDocs\"\n :headingSlugGenerator\n :info=\"document?.info\"\n :infoExtensions\n :layout=\"options.layout\"\n :specificationVersion>\n <template #selectors>\n <!-- Server Selector -->\n <ScalarErrorBoundary>\n <IntroductionCardItem\n v-if=\"servers?.length\"\n class=\"scalar-reference-intro-server scalar-client introduction-card-item text-base leading-normal [--scalar-address-bar-height:0px]\">\n <ServerSelector\n :eventBus\n :selectedServer\n :servers />\n </IntroductionCardItem>\n </ScalarErrorBoundary>\n\n <!-- AsyncAPI Server Selector -->\n <ScalarErrorBoundary>\n <IntroductionCardItem\n v-if=\"asyncApiServers.length\"\n class=\"scalar-reference-intro-server scalar-client introduction-card-item text-base leading-normal [--scalar-address-bar-height:0px]\">\n <AsyncApiServerSelector\n :eventBus\n :selectedServer=\"asyncApiSelectedServer\"\n :servers=\"asyncApiServers\" />\n </IntroductionCardItem>\n </ScalarErrorBoundary>\n\n <!-- Auth selector -->\n <ScalarErrorBoundary>\n <IntroductionCardItem\n v-if=\"document && !options.hideTestRequestButton\"\n class=\"scalar-reference-intro-auth scalar-client introduction-card-item leading-normal\">\n <Auth\n :authStore\n :document=\"clientDocument\"\n :environment\n :eventBus\n :options\n :securitySchemes\n :selectedServer />\n </IntroductionCardItem>\n </ScalarErrorBoundary>\n\n <!-- Custom SDK installation instructions, or the generic client selector -->\n <ScalarErrorBoundary>\n <IntroductionCardItem\n v-if=\"sdkInstallation.length\"\n class=\"introduction-card-item scalar-reference-intro-clients\">\n <SdkInstallationInstructions\n class=\"introduction-card-item scalar-reference-intro-clients\"\n :xScalarSdkInstallation=\"sdkInstallation\" />\n </IntroductionCardItem>\n <IntroductionCardItem\n v-else-if=\"clientOptions.length && !asyncApiDocument\"\n class=\"introduction-card-item scalar-reference-intro-clients\">\n <ClientSelector\n class=\"introduction-card-item scalar-reference-intro-clients\"\n :clientOptions\n :eventBus\n :selectedClient=\"xScalarDefaultClient\" />\n </IntroductionCardItem>\n </ScalarErrorBoundary>\n </template>\n </InfoBlock>\n\n <!-- Render traversed operations and webhooks -->\n <!-- Use recursive component for cleaner rendering -->\n <TraversedEntry\n v-if=\"items.length && openApiDocument\"\n :authStore\n :clientOptions\n :document=\"openApiDocument\"\n :entries=\"items\"\n :eventBus\n :expandedItems\n :options\n :securitySchemes\n :selectedClient=\"xScalarDefaultClient\"\n :selectedServer>\n </TraversedEntry>\n\n <!-- AsyncAPI: render channels grouped by tag, mirroring the sidebar order. -->\n <AsyncApiTraversedEntry\n v-else-if=\"items.length && asyncApiDocument\"\n :document=\"asyncApiDocument\"\n :entries=\"items\"\n :eventBus\n :expandedItems\n :options />\n\n <!-- Render plugins at content.end view -->\n <RenderPlugins\n :options\n viewName=\"content.end\" />\n\n <slot name=\"end\" />\n <!-- Placeholder content to allow the active item to be scrolled to the top while the rest of the content is lazy loaded -->\n <div\n v-if=\"!firstLazyLoadComplete\"\n class=\"h-dvh\"></div>\n </div>\n</template>\n\n<style>\n.narrow-references-container {\n container-name: narrow-references-container;\n container-type: inline-size;\n}\n</style>\n"],"mappings":"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"}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference';
|
|
2
2
|
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
3
|
-
import type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
3
|
+
import type { OpenApiDocument, SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
4
4
|
type __VLS_Props = {
|
|
5
5
|
id: string;
|
|
6
6
|
name: string;
|
|
7
|
-
options: Pick<ApiReferenceConfigurationRaw, 'layout' | 'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy' | 'hideModels'>;
|
|
7
|
+
options: Pick<ApiReferenceConfigurationRaw, 'layout' | 'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy' | 'expandAllSchemaProperties' | 'hideModels'>;
|
|
8
8
|
schema: SchemaObject | undefined;
|
|
9
9
|
isCollapsed: boolean;
|
|
10
10
|
eventBus: WorkspaceEventBus;
|
|
11
|
+
/** The document the model belongs to, used to resolve schema references for display */
|
|
12
|
+
document?: OpenApiDocument;
|
|
11
13
|
};
|
|
12
14
|
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>;
|
|
13
15
|
declare const _default: typeof __VLS_export;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Model.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Models/Model.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Model.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Models/Model.vue"],"names":[],"mappings":"AA+DA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAA;AAC/E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EACb,MAAM,8DAA8D,CAAA;AAQrE,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,IAAI,CACX,4BAA4B,EAC1B,QAAQ,GACR,8BAA8B,GAC9B,yBAAyB,GACzB,2BAA2B,GAC3B,YAAY,CACf,CAAA;IACD,MAAM,EAAE,YAAY,GAAG,SAAS,CAAA;IAChC,WAAW,EAAE,OAAO,CAAA;IACpB,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,uFAAuF;IACvF,QAAQ,CAAC,EAAE,eAAe,CAAA;CAC3B,CAAC;AA4EF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Model.vue.js","names":[],"sources":["../../../../src/components/Content/Models/Model.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type {
|
|
1
|
+
{"version":3,"file":"Model.vue.js","names":[],"sources":["../../../../src/components/Content/Models/Model.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type {\n OpenApiDocument,\n SchemaObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { useTemplateRef } from 'vue'\n\nimport { useIntersection } from '@/hooks/use-intersection'\n\nimport ClassicLayout from './components/ClassicLayout.vue'\nimport ModernLayout from './components/ModernLayout.vue'\n\nconst { schema, isCollapsed, id, options, eventBus, document } = defineProps<{\n id: string\n name: string\n options: Pick<\n ApiReferenceConfigurationRaw,\n | 'layout'\n | 'orderRequiredPropertiesFirst'\n | 'orderSchemaPropertiesBy'\n | 'expandAllSchemaProperties'\n | 'hideModels'\n >\n schema: SchemaObject | undefined\n isCollapsed: boolean\n eventBus: WorkspaceEventBus\n /** The document the model belongs to, used to resolve schema references for display */\n document?: OpenApiDocument\n}>()\n\nconst section = useTemplateRef<HTMLElement>('section')\n\nuseIntersection(section, () => eventBus?.emit('intersecting:nav-item', { id }))\n</script>\n<template>\n <div\n v-if=\"schema\"\n ref=\"section\">\n <ClassicLayout\n v-if=\"options.layout === 'classic'\"\n :id\n :document\n :eventBus\n :isCollapsed\n :name\n :options\n :schema />\n <ModernLayout\n v-else\n :id\n :document\n :eventBus\n :isCollapsed\n :name\n :options\n :schema />\n </div>\n</template>\n"],"mappings":""}
|
|
@@ -11,7 +11,8 @@ var Model_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
11
11
|
options: {},
|
|
12
12
|
schema: {},
|
|
13
13
|
isCollapsed: { type: Boolean },
|
|
14
|
-
eventBus: {}
|
|
14
|
+
eventBus: {},
|
|
15
|
+
document: {}
|
|
15
16
|
},
|
|
16
17
|
setup(__props) {
|
|
17
18
|
const section = useTemplateRef("section");
|
|
@@ -24,6 +25,7 @@ var Model_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
24
25
|
}, [__props.options.layout === "classic" ? (openBlock(), createBlock(ClassicLayout_default, {
|
|
25
26
|
key: 0,
|
|
26
27
|
id: __props.id,
|
|
28
|
+
document: __props.document,
|
|
27
29
|
eventBus: __props.eventBus,
|
|
28
30
|
isCollapsed: __props.isCollapsed,
|
|
29
31
|
name: __props.name,
|
|
@@ -31,6 +33,7 @@ var Model_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
31
33
|
schema: __props.schema
|
|
32
34
|
}, null, 8, [
|
|
33
35
|
"id",
|
|
36
|
+
"document",
|
|
34
37
|
"eventBus",
|
|
35
38
|
"isCollapsed",
|
|
36
39
|
"name",
|
|
@@ -39,6 +42,7 @@ var Model_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
39
42
|
])) : (openBlock(), createBlock(ModernLayout_default, {
|
|
40
43
|
key: 1,
|
|
41
44
|
id: __props.id,
|
|
45
|
+
document: __props.document,
|
|
42
46
|
eventBus: __props.eventBus,
|
|
43
47
|
isCollapsed: __props.isCollapsed,
|
|
44
48
|
name: __props.name,
|
|
@@ -46,6 +50,7 @@ var Model_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
46
50
|
schema: __props.schema
|
|
47
51
|
}, null, 8, [
|
|
48
52
|
"id",
|
|
53
|
+
"document",
|
|
49
54
|
"eventBus",
|
|
50
55
|
"isCollapsed",
|
|
51
56
|
"name",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Model.vue.script.js","names":[],"sources":["../../../../src/components/Content/Models/Model.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type {
|
|
1
|
+
{"version":3,"file":"Model.vue.script.js","names":[],"sources":["../../../../src/components/Content/Models/Model.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type {\n OpenApiDocument,\n SchemaObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { useTemplateRef } from 'vue'\n\nimport { useIntersection } from '@/hooks/use-intersection'\n\nimport ClassicLayout from './components/ClassicLayout.vue'\nimport ModernLayout from './components/ModernLayout.vue'\n\nconst { schema, isCollapsed, id, options, eventBus, document } = defineProps<{\n id: string\n name: string\n options: Pick<\n ApiReferenceConfigurationRaw,\n | 'layout'\n | 'orderRequiredPropertiesFirst'\n | 'orderSchemaPropertiesBy'\n | 'expandAllSchemaProperties'\n | 'hideModels'\n >\n schema: SchemaObject | undefined\n isCollapsed: boolean\n eventBus: WorkspaceEventBus\n /** The document the model belongs to, used to resolve schema references for display */\n document?: OpenApiDocument\n}>()\n\nconst section = useTemplateRef<HTMLElement>('section')\n\nuseIntersection(section, () => eventBus?.emit('intersecting:nav-item', { id }))\n</script>\n<template>\n <div\n v-if=\"schema\"\n ref=\"section\">\n <ClassicLayout\n v-if=\"options.layout === 'classic'\"\n :id\n :document\n :eventBus\n :isCollapsed\n :name\n :options\n :schema />\n <ModernLayout\n v-else\n :id\n :document\n :eventBus\n :isCollapsed\n :name\n :options\n :schema />\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;EAgCA,MAAM,UAAU,eAA4B,UAAS;AAErD,kBAAgB,eAAe,QAAA,UAAU,KAAK,yBAAyB,EAAE,IAAC,QAAA,IAAG,CAAC,CAAA;;UAIpE,QAAA,UAAA,WAAA,EADR,mBAqBM,OAAA;;aAnBA;IAAJ,KAAI;OAEI,QAAA,QAAQ,WAAM,aAAA,WAAA,EADtB,YAQY,uBAAA;;IANT,IAAA,QAAA;IACA,UAAA,QAAA;IACA,UAAA,QAAA;IACA,aAAA,QAAA;IACA,MAAA,QAAA;IACA,SAAA,QAAA;IACA,QAAA,QAAA;;;;;;;;;uBACH,YAQY,sBAAA;;IANT,IAAA,QAAA;IACA,UAAA,QAAA;IACA,UAAA,QAAA;IACA,aAAA,QAAA;IACA,MAAA,QAAA;IACA,SAAA,QAAA;IACA,QAAA,QAAA"}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference';
|
|
2
2
|
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
3
|
-
import type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
3
|
+
import type { OpenApiDocument, SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
4
4
|
type __VLS_Props = {
|
|
5
5
|
id: string;
|
|
6
6
|
name: string;
|
|
7
7
|
schema: SchemaObject;
|
|
8
8
|
isCollapsed: boolean;
|
|
9
9
|
eventBus: WorkspaceEventBus;
|
|
10
|
-
|
|
10
|
+
/** The document the model belongs to, used to resolve schema references for display */
|
|
11
|
+
document?: OpenApiDocument;
|
|
12
|
+
options: Pick<ApiReferenceConfigurationRaw, 'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy' | 'expandAllSchemaProperties' | 'hideModels'>;
|
|
11
13
|
};
|
|
12
14
|
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>;
|
|
13
15
|
declare const _default: typeof __VLS_export;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClassicLayout.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Models/components/ClassicLayout.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ClassicLayout.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Models/components/ClassicLayout.vue"],"names":[],"mappings":"AA+FA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAA;AAC/E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EACb,MAAM,8DAA8D,CAAA;AAOrE,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,YAAY,CAAA;IACpB,WAAW,EAAE,OAAO,CAAA;IACpB,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,uFAAuF;IACvF,QAAQ,CAAC,EAAE,eAAe,CAAA;IAC1B,OAAO,EAAE,IAAI,CACX,4BAA4B,EAC1B,8BAA8B,GAC9B,yBAAyB,GACzB,2BAA2B,GAC3B,YAAY,CACf,CAAA;CACF,CAAC;AA0KF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -2,7 +2,7 @@ import _plugin_vue_export_helper_default from "../../../../_virtual/_plugin-vue_
|
|
|
2
2
|
import ClassicLayout_vue_vue_type_script_setup_true_lang_default from "./ClassicLayout.vue.script.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
//#region src/components/Content/Models/components/ClassicLayout.vue
|
|
5
|
-
var ClassicLayout_default = /* @__PURE__ */ _plugin_vue_export_helper_default(ClassicLayout_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
5
|
+
var ClassicLayout_default = /* @__PURE__ */ _plugin_vue_export_helper_default(ClassicLayout_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-f3ae088e"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { ClassicLayout_default as default };
|
|
8
8
|
|