@scalar/api-reference 1.57.5 → 1.59.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +112 -0
- package/dist/blocks/index.d.ts +1 -0
- package/dist/blocks/index.d.ts.map +1 -1
- package/dist/blocks/index.js +2 -1
- package/dist/blocks/scalar-asyncapi-server-selector-block/components/AsyncApiServerSelector.vue.d.ts +24 -0
- package/dist/blocks/scalar-asyncapi-server-selector-block/components/AsyncApiServerSelector.vue.d.ts.map +1 -0
- package/dist/blocks/scalar-asyncapi-server-selector-block/components/AsyncApiServerSelector.vue.js +7 -0
- package/dist/blocks/scalar-asyncapi-server-selector-block/components/AsyncApiServerSelector.vue.js.map +1 -0
- package/dist/blocks/scalar-asyncapi-server-selector-block/components/AsyncApiServerSelector.vue.script.js +80 -0
- package/dist/blocks/scalar-asyncapi-server-selector-block/components/AsyncApiServerSelector.vue.script.js.map +1 -0
- package/dist/blocks/scalar-asyncapi-server-selector-block/components/Selector.vue.d.ts +25 -0
- package/dist/blocks/scalar-asyncapi-server-selector-block/components/Selector.vue.d.ts.map +1 -0
- package/dist/blocks/scalar-asyncapi-server-selector-block/components/Selector.vue.js +7 -0
- package/dist/blocks/scalar-asyncapi-server-selector-block/components/Selector.vue.js.map +1 -0
- package/dist/blocks/scalar-asyncapi-server-selector-block/components/Selector.vue.script.js +76 -0
- package/dist/blocks/scalar-asyncapi-server-selector-block/components/Selector.vue.script.js.map +1 -0
- package/dist/blocks/scalar-asyncapi-server-selector-block/index.d.ts +2 -0
- package/dist/blocks/scalar-asyncapi-server-selector-block/index.d.ts.map +1 -0
- package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts +2 -3
- package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js +1 -1
- package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js.map +1 -1
- package/dist/blocks/scalar-client-selector-block/components/ClientDropdown.vue.script.js.map +1 -1
- package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.d.ts +2 -6
- package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.js +1 -1
- package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.js.map +1 -1
- package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.script.js +26 -36
- package/dist/blocks/scalar-client-selector-block/components/ClientSelector.vue.script.js.map +1 -1
- package/dist/blocks/scalar-client-selector-block/helpers/featured-clients.d.ts +1 -1
- package/dist/blocks/scalar-client-selector-block/helpers/featured-clients.d.ts.map +1 -1
- package/dist/blocks/scalar-client-selector-block/helpers/featured-clients.js.map +1 -1
- package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.d.ts +9 -0
- package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.d.ts.map +1 -0
- package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.js +9 -0
- package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.js.map +1 -0
- package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.script.js +225 -0
- package/dist/blocks/scalar-sdk-installation-instructions/components/SdkInstallationInstructions.vue.script.js.map +1 -0
- package/dist/blocks/scalar-sdk-installation-instructions/helpers/language-icon.d.ts +4 -0
- package/dist/blocks/scalar-sdk-installation-instructions/helpers/language-icon.d.ts.map +1 -0
- package/dist/blocks/scalar-sdk-installation-instructions/helpers/language-icon.js +59 -0
- package/dist/blocks/scalar-sdk-installation-instructions/helpers/language-icon.js.map +1 -0
- package/dist/blocks/scalar-sdk-installation-instructions/helpers/renderable-sdks.d.ts +19 -0
- package/dist/blocks/scalar-sdk-installation-instructions/helpers/renderable-sdks.d.ts.map +1 -0
- package/dist/blocks/scalar-sdk-installation-instructions/helpers/renderable-sdks.js +19 -0
- package/dist/blocks/scalar-sdk-installation-instructions/helpers/renderable-sdks.js.map +1 -0
- package/dist/blocks/scalar-sdk-installation-instructions/helpers/visible-tab-count.d.ts +16 -0
- package/dist/blocks/scalar-sdk-installation-instructions/helpers/visible-tab-count.d.ts.map +1 -0
- package/dist/blocks/scalar-sdk-installation-instructions/helpers/visible-tab-count.js +29 -0
- package/dist/blocks/scalar-sdk-installation-instructions/helpers/visible-tab-count.js.map +1 -0
- package/dist/blocks/scalar-sdk-installation-instructions/index.d.ts +3 -0
- package/dist/blocks/scalar-sdk-installation-instructions/index.d.ts.map +1 -0
- package/dist/blocks/scalar-server-selector-block/components/ServerSelector.vue.script.js +1 -1
- package/dist/browser/chunks/AgentScalarChatInterface-BXB1nZKJ.js +27 -0
- package/dist/browser/chunks/ScalarTextInput.vue-XkIzhvc0.js +27 -0
- package/dist/browser/chunks/basic-shape-diamond.svg-BTEOT1FL.js +15 -0
- package/dist/browser/chunks/basic-shape-hexagon.svg-BSPzaCgF.js +15 -0
- package/dist/browser/chunks/basic-shape-primary-circle-ellipse-round.svg-DKmZ8UUU.js +15 -0
- package/dist/browser/chunks/basic-shape-primary-square-rectangle.svg-n2YRykHD.js +15 -0
- package/dist/browser/chunks/basic-shape-shield.svg-Bec9cJDA.js +15 -0
- package/dist/browser/chunks/browser-67K6wmG9.js +129 -0
- package/dist/browser/chunks/computer-device-desktop-monitor.svg-m6j893Hb.js +15 -0
- package/dist/browser/chunks/computer-device-desktop.svg-Dk1VVO7k.js +15 -0
- package/dist/browser/chunks/computer-device-laptop.svg-BNGVUCYS.js +15 -0
- package/dist/browser/chunks/computer-device-mobile-phone-android-samsung-back.svg-CC4UUTFw.js +15 -0
- package/dist/browser/chunks/computer-device-mobile-phone-android-samsung.svg-D8ExpMpL.js +15 -0
- package/dist/browser/chunks/computer-device-mobile-phone-iphone-x-back.svg-CLm7sgMM.js +15 -0
- package/dist/browser/chunks/computer-device-mobile-phone-iphone-x.svg-Xrttg6_7.js +15 -0
- package/dist/browser/chunks/computer-device-mobile-tablet-touch.svg-DQ2oTvOG.js +15 -0
- package/dist/browser/chunks/computer-device-mobile-tablet.svg-DCr0XlRc.js +15 -0
- package/dist/browser/chunks/computer-device-network-ethernet-cat6.svg-AK9l0iOl.js +15 -0
- package/dist/browser/chunks/computer-device-network-lan-www.svg-gUIdFBlE.js +15 -0
- package/dist/browser/chunks/computer-device-network-wifi-connection.svg-Be-EMm4e.js +15 -0
- package/dist/browser/chunks/computer-device-network-wifi-router.svg-Dc2VzyqK.js +15 -0
- package/dist/browser/chunks/ecology-science-erlenmeyer-flask.svg-DHgy7Jfd.js +15 -0
- package/dist/browser/chunks/image-flash-lightning.svg-EETR_y1q.js +15 -0
- package/dist/browser/chunks/image-picture-flower.svg-DN1AYzJU.js +15 -0
- package/dist/browser/chunks/interface-alert-exclamation-diamond.svg-C5NozMV_.js +15 -0
- package/dist/browser/chunks/interface-alert-exclamation-triangle-warning.svg-DaAg2fF5.js +15 -0
- package/dist/browser/chunks/interface-alert-information-circle.svg-ckkkt9Mv.js +15 -0
- package/dist/browser/chunks/interface-award-crown.svg-pjvn9hY-.js +15 -0
- package/dist/browser/chunks/interface-bookmark-tag.svg-r2r-lQq4.js +15 -0
- package/dist/browser/chunks/interface-bookmark.svg-BK9HKQBT.js +15 -0
- package/dist/browser/chunks/interface-calendar-date-one.svg-DNnF0M1I.js +15 -0
- package/dist/browser/chunks/interface-content-book-open-pages.svg-CQj_w9Vp.js +15 -0
- package/dist/browser/chunks/interface-content-book-page.svg-DppoeJRe.js +15 -0
- package/dist/browser/chunks/interface-content-file.svg-CvcD7OiY.js +15 -0
- package/dist/browser/chunks/interface-content-folder.svg-BmtS5I9A.js +15 -0
- package/dist/browser/chunks/interface-copy-clipboard.svg-Be6EI50X.js +15 -0
- package/dist/browser/chunks/interface-edit-attachment.svg-G5TKzpWX.js +15 -0
- package/dist/browser/chunks/interface-edit-binocular.svg-jzL-DvGB.js +15 -0
- package/dist/browser/chunks/interface-edit-magic-wand.svg-BOTlymvp.js +15 -0
- package/dist/browser/chunks/interface-edit-tool-paint-roller.svg-s9dwryx7.js +15 -0
- package/dist/browser/chunks/interface-edit-tool-pencil.svg-C7v0dbB3.js +15 -0
- package/dist/browser/chunks/interface-favorite-award.svg-CYHUgUG0.js +15 -0
- package/dist/browser/chunks/interface-favorite-flag.svg-C10zlKOb.js +15 -0
- package/dist/browser/chunks/interface-favorite-heart.svg-eoduXxlz.js +15 -0
- package/dist/browser/chunks/interface-favorite-star.svg-BSmxJetr.js +15 -0
- package/dist/browser/chunks/interface-favorite-stars-sparkles.svg-JTFLj3Ls.js +15 -0
- package/dist/browser/chunks/interface-hierarchy-flowchart.svg-Cg_Wy0kN.js +15 -0
- package/dist/browser/chunks/interface-home-house.svg-DytoGRnv.js +15 -0
- package/dist/browser/chunks/interface-hyperlink.svg-CuEfmmQI.js +15 -0
- package/dist/browser/chunks/interface-lighting-brightness.svg-DSK0h_Pa.js +15 -0
- package/dist/browser/chunks/interface-lock-closed.svg-Cn6TaLYv.js +15 -0
- package/dist/browser/chunks/interface-lock-open-unlock.svg-CVkG5-9W.js +15 -0
- package/dist/browser/chunks/interface-login-key.svg-y-cwwXjN.js +15 -0
- package/dist/browser/chunks/interface-search.svg-S-puVFJB.js +15 -0
- package/dist/browser/chunks/interface-setting-cog.svg-CTH4_lLg.js +15 -0
- package/dist/browser/chunks/interface-share-megaphone-bullhorn.svg-Pbp39MyC.js +15 -0
- package/dist/browser/chunks/interface-share-rocket.svg-BgCsIRZO.js +15 -0
- package/dist/browser/chunks/interface-share-satellite.svg-DAMN9d5G.js +15 -0
- package/dist/browser/chunks/interface-share-space-ship.svg-Dt-Mejxk.js +15 -0
- package/dist/browser/chunks/interface-share.svg-vFYTXSti.js +15 -0
- package/dist/browser/chunks/interface-signal-square.svg-DNG4LpAe.js +15 -0
- package/dist/browser/chunks/interface-time-clock-circle.svg-Bpz-nLxo.js +15 -0
- package/dist/browser/chunks/interface-time-hour-glass.svg-D7agfKsH.js +15 -0
- package/dist/browser/chunks/interface-users-multiple.svg-CkPJBBnG.js +15 -0
- package/dist/browser/chunks/interface-weather-moon.svg-CaTZFMPO.js +15 -0
- package/dist/browser/chunks/mail-chat-bubble-square.svg-DC8RIihp.js +15 -0
- package/dist/browser/chunks/mail-send-email-paper-airplane.svg-D8OLs9jz.js +15 -0
- package/dist/browser/chunks/mail-send-envelope.svg-CV33h5Sx.js +15 -0
- package/dist/browser/chunks/modal-Bp9V4D2s.js +66 -0
- package/dist/browser/chunks/modal-CtAiwzwH.js +15 -0
- package/dist/browser/chunks/money-cashier-receipt.svg-CJL8C2gs.js +15 -0
- package/dist/browser/chunks/money-currency-dollar-pay.svg-VdBplCTx.js +15 -0
- package/dist/browser/chunks/money-graph-arrow-increase.svg-DcRov3zk.js +15 -0
- package/dist/browser/chunks/money-graph-bar-chart-increase.svg-Cc7KxjX-.js +15 -0
- package/dist/browser/chunks/nature-ecology-leaf.svg-DR3cTZxt.js +15 -0
- package/dist/browser/chunks/phone-telephone.svg-DyY0gUlk.js +15 -0
- package/dist/browser/chunks/programming-bug.svg-BHLT-Qhp.js +15 -0
- package/dist/browser/chunks/programming-cloud.svg-B6YW33ba.js +15 -0
- package/dist/browser/chunks/programming-computer-database-server.svg-B6o5Sdn-.js +15 -0
- package/dist/browser/chunks/programming-computer-database.svg-Cl7OVtpJ.js +15 -0
- package/dist/browser/chunks/programming-module-four-layout.svg-BQrerL1x.js +15 -0
- package/dist/browser/chunks/programming-module-three.svg-B2KTQzBM.js +15 -0
- package/dist/browser/chunks/programming-module.svg-CiID7kPm.js +15 -0
- package/dist/browser/chunks/programming-script-code.svg-D1M5rtkN.js +15 -0
- package/dist/browser/chunks/runtime-core.esm-bundler-Byrbbu5Q.js +17 -0
- package/dist/browser/chunks/shopping-cart.svg-BEegiIR9.js +15 -0
- package/dist/browser/chunks/shopping-gift-present.svg-BUHwuLix.js +15 -0
- package/dist/browser/chunks/shopping-shipping-box-parcel-package.svg-D6fxWdYx.js +15 -0
- package/dist/browser/chunks/tag-new-circle.svg-jsg1bGs0.js +15 -0
- package/dist/browser/chunks/travel-map-earth-globe.svg-ClbMiU-f.js +15 -0
- package/dist/browser/chunks/vendor-nugWm4eq.js +337 -0
- package/dist/browser/standalone.esm.js +1853 -0
- package/dist/browser/standalone.js +258 -255
- package/dist/components/ApiReference.vue.d.ts.map +1 -1
- package/dist/components/ApiReference.vue.js +1 -1
- package/dist/components/ApiReference.vue.js.map +1 -1
- package/dist/components/ApiReference.vue.script.js +79 -28
- package/dist/components/ApiReference.vue.script.js.map +1 -1
- package/dist/components/Content/AsyncApi/AsyncApiTraversedEntry.vue.d.ts +16 -0
- package/dist/components/Content/AsyncApi/AsyncApiTraversedEntry.vue.d.ts.map +1 -0
- package/dist/components/Content/AsyncApi/AsyncApiTraversedEntry.vue.js +7 -0
- package/dist/components/Content/AsyncApi/AsyncApiTraversedEntry.vue.js.map +1 -0
- package/dist/components/Content/AsyncApi/AsyncApiTraversedEntry.vue.script.js +166 -0
- package/dist/components/Content/AsyncApi/AsyncApiTraversedEntry.vue.script.js.map +1 -0
- package/dist/components/Content/AsyncApi/Channel.vue.d.ts +18 -0
- package/dist/components/Content/AsyncApi/Channel.vue.d.ts.map +1 -0
- package/dist/components/Content/AsyncApi/Channel.vue.js +9 -0
- package/dist/components/Content/AsyncApi/Channel.vue.js.map +1 -0
- package/dist/components/Content/AsyncApi/Channel.vue.script.js +148 -0
- package/dist/components/Content/AsyncApi/Channel.vue.script.js.map +1 -0
- package/dist/components/Content/AsyncApi/helpers/adapt-async-api-parameters.d.ts +14 -0
- package/dist/components/Content/AsyncApi/helpers/adapt-async-api-parameters.d.ts.map +1 -0
- package/dist/components/Content/AsyncApi/helpers/adapt-async-api-parameters.js +34 -0
- package/dist/components/Content/AsyncApi/helpers/adapt-async-api-parameters.js.map +1 -0
- package/dist/components/Content/AsyncApi/index.d.ts +2 -0
- package/dist/components/Content/AsyncApi/index.d.ts.map +1 -0
- package/dist/components/Content/Auth/Auth.vue.d.ts +1 -1
- package/dist/components/Content/Auth/Auth.vue.d.ts.map +1 -1
- package/dist/components/Content/Auth/Auth.vue.js.map +1 -1
- package/dist/components/Content/Auth/Auth.vue.script.js +2 -0
- package/dist/components/Content/Auth/Auth.vue.script.js.map +1 -1
- package/dist/components/Content/Content.vue.d.ts +3 -3
- package/dist/components/Content/Content.vue.d.ts.map +1 -1
- package/dist/components/Content/Content.vue.js.map +1 -1
- package/dist/components/Content/Content.vue.script.js +69 -9
- package/dist/components/Content/Content.vue.script.js.map +1 -1
- package/dist/components/Content/Models/Model.vue.d.ts +4 -2
- package/dist/components/Content/Models/Model.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/Model.vue.js.map +1 -1
- package/dist/components/Content/Models/Model.vue.script.js +6 -1
- package/dist/components/Content/Models/Model.vue.script.js.map +1 -1
- package/dist/components/Content/Models/ModelTag.vue.d.ts +2 -0
- package/dist/components/Content/Models/ModelTag.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/ModelTag.vue.js.map +1 -1
- package/dist/components/Content/Models/ModelTag.vue.script.js +11 -12
- package/dist/components/Content/Models/ModelTag.vue.script.js.map +1 -1
- package/dist/components/Content/Models/components/ClassicLayout.vue.d.ts +4 -2
- package/dist/components/Content/Models/components/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/components/ClassicLayout.vue.js +1 -1
- package/dist/components/Content/Models/components/ClassicLayout.vue.js.map +1 -1
- package/dist/components/Content/Models/components/ClassicLayout.vue.script.js +9 -2
- package/dist/components/Content/Models/components/ClassicLayout.vue.script.js.map +1 -1
- package/dist/components/Content/Models/components/ModernLayout.vue.d.ts +4 -1
- package/dist/components/Content/Models/components/ModernLayout.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/components/ModernLayout.vue.js.map +1 -1
- package/dist/components/Content/Models/components/ModernLayout.vue.script.js +5 -1
- package/dist/components/Content/Models/components/ModernLayout.vue.script.js.map +1 -1
- package/dist/components/Content/Operations/TraversedEntry.vue.d.ts +1 -1
- package/dist/components/Content/Operations/TraversedEntry.vue.d.ts.map +1 -1
- package/dist/components/Content/Operations/TraversedEntry.vue.js.map +1 -1
- package/dist/components/Content/Operations/TraversedEntry.vue.script.js +11 -4
- package/dist/components/Content/Operations/TraversedEntry.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.d.ts +6 -0
- package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.js +1 -1
- package/dist/components/Content/Schema/Schema.vue.js.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.script.js +32 -7
- package/dist/components/Content/Schema/Schema.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaComposition.vue.js.map +1 -1
- package/dist/components/Content/Schema/SchemaComposition.vue.script.js +16 -3
- package/dist/components/Content/Schema/SchemaComposition.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/SchemaObjectExampleCodeBlock.vue.script.js +1 -1
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.js.map +1 -1
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.script.js +11 -6
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +2 -0
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.js.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.script.js +17 -2
- package/dist/components/Content/Schema/SchemaProperty.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/helpers/get-compositions-to-render.d.ts +3 -2
- package/dist/components/Content/Schema/helpers/get-compositions-to-render.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/get-compositions-to-render.js +26 -1
- package/dist/components/Content/Schema/helpers/get-compositions-to-render.js.map +1 -1
- package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts +2 -1
- package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +40 -25
- package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js.map +1 -1
- package/dist/components/Content/Schema/helpers/schema-cycle.d.ts +31 -0
- package/dist/components/Content/Schema/helpers/schema-cycle.d.ts.map +1 -0
- package/dist/components/Content/Schema/helpers/schema-cycle.js +39 -0
- package/dist/components/Content/Schema/helpers/schema-cycle.js.map +1 -0
- package/dist/components/Content/Schema/types.d.ts +10 -0
- package/dist/components/Content/Schema/types.d.ts.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/features/Operation/Operation.vue.d.ts +1 -1
- package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
- package/dist/features/Operation/Operation.vue.js.map +1 -1
- package/dist/features/Operation/Operation.vue.script.js +4 -0
- package/dist/features/Operation/Operation.vue.script.js.map +1 -1
- package/dist/features/Operation/components/ContentTypeSelect.vue.script.js +1 -1
- package/dist/features/Operation/components/Header.vue.d.ts +4 -1
- package/dist/features/Operation/components/Header.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/Header.vue.js.map +1 -1
- package/dist/features/Operation/components/Header.vue.script.js +6 -2
- package/dist/features/Operation/components/Header.vue.script.js.map +1 -1
- package/dist/features/Operation/components/Headers.vue.d.ts +4 -1
- package/dist/features/Operation/components/Headers.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/Headers.vue.js +1 -1
- package/dist/features/Operation/components/Headers.vue.js.map +1 -1
- package/dist/features/Operation/components/Headers.vue.script.js +10 -4
- package/dist/features/Operation/components/Headers.vue.script.js.map +1 -1
- package/dist/features/Operation/components/OperationParameters.vue.d.ts +4 -2
- package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationParameters.vue.js.map +1 -1
- package/dist/features/Operation/components/OperationParameters.vue.script.js +12 -1
- package/dist/features/Operation/components/OperationParameters.vue.script.js.map +1 -1
- package/dist/features/Operation/components/OperationResponses.vue.d.ts +4 -2
- package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationResponses.vue.js.map +1 -1
- package/dist/features/Operation/components/OperationResponses.vue.script.js +3 -0
- package/dist/features/Operation/components/OperationResponses.vue.script.js.map +1 -1
- package/dist/features/Operation/components/ParameterList.vue.d.ts +4 -2
- package/dist/features/Operation/components/ParameterList.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterList.vue.js.map +1 -1
- package/dist/features/Operation/components/ParameterList.vue.script.js +3 -0
- package/dist/features/Operation/components/ParameterList.vue.script.js.map +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts +4 -2
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.js +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.js.map +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.script.js +8 -1
- package/dist/features/Operation/components/ParameterListItem.vue.script.js.map +1 -1
- package/dist/features/Operation/components/RequestBody.vue.d.ts +4 -1
- package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/RequestBody.vue.js +1 -1
- package/dist/features/Operation/components/RequestBody.vue.js.map +1 -1
- package/dist/features/Operation/components/RequestBody.vue.script.js +10 -3
- package/dist/features/Operation/components/RequestBody.vue.script.js.map +1 -1
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +4 -2
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/callbacks/Callback.vue.js +1 -1
- package/dist/features/Operation/components/callbacks/Callback.vue.js.map +1 -1
- package/dist/features/Operation/components/callbacks/Callback.vue.script.js +5 -0
- package/dist/features/Operation/components/callbacks/Callback.vue.script.js.map +1 -1
- package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts +4 -2
- package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/callbacks/Callbacks.vue.js.map +1 -1
- package/dist/features/Operation/components/callbacks/Callbacks.vue.script.js +3 -0
- package/dist/features/Operation/components/callbacks/Callbacks.vue.script.js.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +3 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.js +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.js.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.script.js +8 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.script.js.map +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +3 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.js +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.js.map +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.script.js +170 -176
- package/dist/features/Operation/layouts/ModernLayout.vue.script.js.map +1 -1
- package/dist/features/Search/components/SearchButton.vue.d.ts +4 -1
- package/dist/features/Search/components/SearchButton.vue.d.ts.map +1 -1
- package/dist/features/Search/components/SearchButton.vue.js.map +1 -1
- package/dist/features/Search/components/SearchButton.vue.script.js +20 -9
- package/dist/features/Search/components/SearchButton.vue.script.js.map +1 -1
- package/dist/features/Search/components/SearchModal.vue.d.ts +4 -1
- package/dist/features/Search/components/SearchModal.vue.d.ts.map +1 -1
- package/dist/features/Search/components/SearchModal.vue.js +1 -1
- package/dist/features/Search/components/SearchModal.vue.js.map +1 -1
- package/dist/features/Search/components/SearchModal.vue.script.js +7 -5
- package/dist/features/Search/components/SearchModal.vue.script.js.map +1 -1
- package/dist/features/Search/components/SearchResult.vue.d.ts +2 -0
- package/dist/features/Search/components/SearchResult.vue.d.ts.map +1 -1
- package/dist/features/Search/components/SearchResult.vue.js.map +1 -1
- package/dist/features/Search/components/SearchResult.vue.script.js +8 -6
- package/dist/features/Search/components/SearchResult.vue.script.js.map +1 -1
- package/dist/features/Search/helpers/create-search-index.d.ts +9 -1
- package/dist/features/Search/helpers/create-search-index.d.ts.map +1 -1
- package/dist/features/Search/helpers/create-search-index.js +27 -8
- package/dist/features/Search/helpers/create-search-index.js.map +1 -1
- package/dist/features/Search/hooks/useSearchIndex.d.ts +4 -2
- package/dist/features/Search/hooks/useSearchIndex.d.ts.map +1 -1
- package/dist/features/Search/hooks/useSearchIndex.js +4 -3
- package/dist/features/Search/hooks/useSearchIndex.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.d.ts +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.d.ts.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.script.js +11 -9
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue.script.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.script.js +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.d.ts.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.script.js +9 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.script.js.map +1 -1
- package/dist/features/example-responses/ExampleResponse.vue.d.ts.map +1 -1
- package/dist/features/example-responses/ExampleResponse.vue.js +1 -1
- package/dist/features/example-responses/ExampleResponse.vue.js.map +1 -1
- package/dist/features/example-responses/ExampleResponse.vue.script.js +6 -7
- package/dist/features/example-responses/ExampleResponse.vue.script.js.map +1 -1
- package/dist/features/example-responses/ExampleResponses.vue.script.js +1 -1
- package/dist/features/example-responses/ExampleSchema.vue.d.ts.map +1 -1
- package/dist/features/example-responses/ExampleSchema.vue.js.map +1 -1
- package/dist/features/example-responses/ExampleSchema.vue.script.js +6 -7
- package/dist/features/example-responses/ExampleSchema.vue.script.js.map +1 -1
- package/dist/features/info-object/Contact.vue.d.ts.map +1 -1
- package/dist/features/info-object/Contact.vue.js.map +1 -1
- package/dist/features/info-object/Contact.vue.script.js +15 -4
- package/dist/features/info-object/Contact.vue.script.js.map +1 -1
- package/dist/helpers/get-async-api-model-schema.d.ts +15 -0
- package/dist/helpers/get-async-api-model-schema.d.ts.map +1 -0
- package/dist/helpers/get-async-api-model-schema.js +32 -0
- package/dist/helpers/get-async-api-model-schema.js.map +1 -0
- package/dist/helpers/id-routing.d.ts +18 -0
- package/dist/helpers/id-routing.d.ts.map +1 -1
- package/dist/helpers/id-routing.js +41 -1
- package/dist/helpers/id-routing.js.map +1 -1
- package/dist/helpers/load-from-perssistance.d.ts +2 -1
- package/dist/helpers/load-from-perssistance.d.ts.map +1 -1
- package/dist/helpers/load-from-perssistance.js +4 -3
- package/dist/helpers/load-from-perssistance.js.map +1 -1
- package/dist/plugins/index.d.ts +1 -1
- package/dist/plugins/index.js +1 -1
- package/dist/plugins/{persistance-plugin.d.ts → persistence-plugin.d.ts} +2 -8
- package/dist/plugins/persistence-plugin.d.ts.map +1 -0
- package/dist/plugins/{persistance-plugin.js → persistence-plugin.js} +4 -13
- package/dist/plugins/persistence-plugin.js.map +1 -0
- package/dist/standalone/lib/html-api.d.ts.map +1 -1
- package/dist/standalone/lib/html-api.js +60 -2
- package/dist/standalone/lib/html-api.js.map +1 -1
- package/dist/standalone.esm.d.ts +4 -0
- package/dist/standalone.esm.d.ts.map +1 -0
- package/dist/style.css +665 -470
- package/dist/vue-styles.css +661 -463
- package/package.json +21 -19
- package/dist/browser/webpack-stats.json +0 -1
- package/dist/plugins/persistance-plugin.d.ts.map +0 -1
- package/dist/plugins/persistance-plugin.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiReferenceToolbarConfigLayoutOptions.vue.script.js","names":[],"sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarFormInputGroup } from '@scalar/components/form'\nimport { ScalarToggleInput } from '@scalar/components/toggle'\nimport type
|
|
1
|
+
{"version":3,"file":"ApiReferenceToolbarConfigLayoutOptions.vue.script.js","names":[],"sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarFormInputGroup } from '@scalar/components/form'\nimport { ScalarToggleInput } from '@scalar/components/toggle'\nimport {\n DEFAULT_MODELS_SECTION_LABEL,\n type ApiReferenceConfiguration,\n} from '@scalar/types/api-reference'\nimport { computed } from 'vue'\n\ntype LayoutOptions = {\n showSidebar?: boolean\n defaultOpenFirstTag?: boolean\n defaultOpenAllTags?: boolean\n expandAllModelSections?: boolean\n expandAllResponses?: boolean\n hideClientButton?: boolean\n hideDarkModeToggle?: boolean\n hideModels?: boolean\n hideSearch?: boolean\n hideTestRequestButton?: boolean\n showOperationId?: boolean\n}\n\nconst { configuration } = defineProps<{\n configuration?: Partial<ApiReferenceConfiguration>\n}>()\n\nconst model = defineModel<LayoutOptions>({\n default: {},\n})\n\nfunction getValue(key: keyof LayoutOptions, defaultValue: boolean = false) {\n return model.value[key] ?? configuration?.[key] ?? defaultValue\n}\n\nfunction setValue(\n key: keyof LayoutOptions,\n value: boolean,\n defaultValue: boolean = false,\n) {\n if (value !== defaultValue) {\n model.value = { ...model.value, [key]: value }\n } else {\n model.value = Object.fromEntries(\n Object.entries(model.value).filter(([k]) => key !== k),\n )\n }\n}\n\nconst modelsSectionLabel = computed(\n () => configuration?.modelsSectionLabel ?? DEFAULT_MODELS_SECTION_LABEL,\n)\n</script>\n<template>\n <ScalarFormInputGroup>\n <ScalarToggleInput\n :modelValue=\"getValue('showSidebar', true)\"\n @update:modelValue=\"(v) => setValue('showSidebar', !!v, true)\">\n Show Sidebar\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('defaultOpenFirstTag', true)\"\n @update:modelValue=\"(v) => setValue('defaultOpenFirstTag', !!v, true)\">\n Default Open First Tag\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('defaultOpenAllTags')\"\n @update:modelValue=\"(v) => setValue('defaultOpenAllTags', !!v)\">\n Default Open All Tags\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('expandAllModelSections')\"\n @update:modelValue=\"(v) => setValue('expandAllModelSections', !!v)\">\n Expand All {{ modelsSectionLabel }}\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('expandAllResponses')\"\n @update:modelValue=\"(v) => setValue('expandAllResponses', !!v)\">\n Expand All Responses\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('hideClientButton')\"\n @update:modelValue=\"(v) => setValue('hideClientButton', !!v)\">\n Hide Client Button\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('hideDarkModeToggle')\"\n @update:modelValue=\"(v) => setValue('hideDarkModeToggle', !!v)\">\n Hide Dark Mode Toggle\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('hideModels')\"\n @update:modelValue=\"(v) => setValue('hideModels', !!v)\">\n Hide {{ modelsSectionLabel }}\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('hideSearch')\"\n @update:modelValue=\"(v) => setValue('hideSearch', !!v)\">\n Hide Search\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('showOperationId')\"\n @update:modelValue=\"(v) => setValue('showOperationId', !!v)\">\n Show Operation ID\n </ScalarToggleInput>\n <ScalarToggleInput\n :modelValue=\"getValue('hideTestRequestButton')\"\n @update:modelValue=\"(v) => setValue('hideTestRequestButton', !!v)\">\n Hide Test Request Button\n </ScalarToggleInput>\n </ScalarFormInputGroup>\n</template>\n"],"mappings":"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"}
|
package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.script.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { computed, createBlock, createElementVNode, createVNode, defineComponent, normalizeClass, openBlock, toDisplayString, unref, useModel, withCtx } from "vue";
|
|
2
2
|
import { presets, themeIds, themeLabels } from "@scalar/themes";
|
|
3
3
|
import { ScalarIconCaretDown } from "@scalar/icons";
|
|
4
|
-
import { ScalarCombobox } from "@scalar/components/combobox";
|
|
5
4
|
import { ScalarListboxCheckbox } from "@scalar/components/listbox";
|
|
5
|
+
import { ScalarCombobox } from "@scalar/components/combobox";
|
|
6
6
|
import { ScalarFormInput } from "@scalar/components/form";
|
|
7
7
|
import { ScalarThemeSwatches } from "@scalar/components/theme-swatches";
|
|
8
8
|
//#region src/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue?vue&type=script&setup=true&lang.ts
|
package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiReferenceToolbarShareRegister.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ApiReferenceToolbarShareRegister.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue"],"names":[],"mappings":"AAqFA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAKpE,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,cAAc,CAAA;IACzB,YAAY,EAAE,YAAY,CAAA;CAC3B,CAAC;AAsGF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiReferenceToolbarShareRegister.vue.js","names":[],"sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport {\n ScalarIconBookOpen,\n ScalarIconBracketsCurly,\n ScalarIconCloud,\n ScalarIconFileMd,\n ScalarIconGitBranch,\n ScalarIconGlobeSimple,\n ScalarIconLockSimple,\n ScalarIconWarningOctagon,\n} from '@scalar/icons'\nimport { type ScalarIconComponent } from '@scalar/icons/types'\nimport type { ExternalUrls } from '@scalar/types/api-reference'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\n\nimport ApiReferenceToolbarBlurb from './ApiReferenceToolbarBlurb.vue'\nimport ApiReferenceToolbarRegisterButton from './ApiReferenceToolbarRegisterButton.vue'\n\nconst { workspace, externalUrls } = defineProps<{\n workspace: WorkspaceStore\n externalUrls: ExternalUrls\n}>()\n\nconst FEATURES = [\n { icon: ScalarIconLockSimple, label: 'Password Protection' },\n { icon: ScalarIconGlobeSimple, label: 'Custom Domains' },\n { icon: ScalarIconBookOpen, label: 'Free-form content' },\n { icon: ScalarIconCloud, label: 'CDN Infrastructure' },\n { icon: ScalarIconGitBranch, label: 'Pull from GitHub' },\n { icon: ScalarIconFileMd, label: 'Markdown/MDX' },\n { icon: ScalarIconWarningOctagon, label: 'Spectral Linting' },\n { icon: ScalarIconBracketsCurly, label: 'JSON Schema Hosting' },\n] as const satisfies ReadonlyArray<{\n icon: ScalarIconComponent\n label: string\n}>\n</script>\n<template>\n <ul class=\"text-c-2 mb-2 grid grid-cols-2 gap-2.5 font-medium\">\n <li\n v-for=\"feature in FEATURES\"\n :key=\"feature.label\"\n class=\"flex items-center gap-2\">\n <component\n :is=\"feature.icon\"\n class=\"text-c-3 size-3.5\"\n weight=\"bold\" />\n {{ feature.label }}\n </li>\n </ul>\n <ApiReferenceToolbarRegisterButton\n :externalUrls\n :workspace>\n Deploy on Scalar\n </ApiReferenceToolbarRegisterButton>\n <ApiReferenceToolbarBlurb>\n Deploy your documentation for free. <br />\n Additional features might require\n <a\n href=\"https://scalar.com/products/docs/getting-started\"\n target=\"_blank\"\n >Scalar Pro</a\n >.\n </ApiReferenceToolbarBlurb>\n</template>\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"ApiReferenceToolbarShareRegister.vue.js","names":[],"sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport {\n ScalarIconBookOpen,\n ScalarIconBracketsCurly,\n ScalarIconCloud,\n ScalarIconFileMd,\n ScalarIconGitBranch,\n ScalarIconGlobeSimple,\n ScalarIconLockSimple,\n ScalarIconPlugsConnected,\n ScalarIconSparkle,\n ScalarIconWarningOctagon,\n} from '@scalar/icons'\nimport { type ScalarIconComponent } from '@scalar/icons/types'\nimport type { ExternalUrls } from '@scalar/types/api-reference'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\n\nimport ApiReferenceToolbarBlurb from './ApiReferenceToolbarBlurb.vue'\nimport ApiReferenceToolbarRegisterButton from './ApiReferenceToolbarRegisterButton.vue'\n\nconst { workspace, externalUrls } = defineProps<{\n workspace: WorkspaceStore\n externalUrls: ExternalUrls\n}>()\n\nconst FEATURES = [\n { icon: ScalarIconLockSimple, label: 'Password Protection' },\n { icon: ScalarIconGlobeSimple, label: 'Custom Domains' },\n { icon: ScalarIconBookOpen, label: 'Free-form content' },\n { icon: ScalarIconCloud, label: 'CDN Infrastructure' },\n { icon: ScalarIconGitBranch, label: 'Pull from GitHub' },\n { icon: ScalarIconFileMd, label: 'Markdown/MDX' },\n { icon: ScalarIconWarningOctagon, label: 'Spectral Linting' },\n { icon: ScalarIconBracketsCurly, label: 'JSON Schema Hosting' },\n { icon: ScalarIconSparkle, label: 'Ask AI' },\n { icon: ScalarIconPlugsConnected, label: 'MCP Servers' },\n] as const satisfies ReadonlyArray<{\n icon: ScalarIconComponent\n label: string\n}>\n</script>\n<template>\n <ul class=\"text-c-2 mb-2 grid grid-cols-2 gap-2.5 font-medium\">\n <li\n v-for=\"feature in FEATURES\"\n :key=\"feature.label\"\n class=\"flex items-center gap-2\">\n <component\n :is=\"feature.icon\"\n class=\"text-c-3 size-3.5\"\n weight=\"bold\" />\n {{ feature.label }}\n </li>\n </ul>\n <ApiReferenceToolbarRegisterButton\n :externalUrls\n :workspace>\n Deploy on Scalar\n </ApiReferenceToolbarRegisterButton>\n <ApiReferenceToolbarBlurb>\n Deploy your documentation for free. <br />\n Additional features might require\n <a\n href=\"https://scalar.com/products/docs/getting-started\"\n target=\"_blank\"\n >Scalar Pro</a\n >.\n </ApiReferenceToolbarBlurb>\n</template>\n"],"mappings":""}
|
package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.script.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import ApiReferenceToolbarBlurb_default from "./ApiReferenceToolbarBlurb.vue.js";
|
|
2
2
|
import ApiReferenceToolbarRegisterButton_default from "./ApiReferenceToolbarRegisterButton.vue.js";
|
|
3
3
|
import { Fragment, createBlock, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, openBlock, renderList, resolveDynamicComponent, toDisplayString, withCtx } from "vue";
|
|
4
|
-
import { ScalarIconBookOpen, ScalarIconBracketsCurly, ScalarIconCloud, ScalarIconFileMd, ScalarIconGitBranch, ScalarIconGlobeSimple, ScalarIconLockSimple, ScalarIconWarningOctagon } from "@scalar/icons";
|
|
4
|
+
import { ScalarIconBookOpen, ScalarIconBracketsCurly, ScalarIconCloud, ScalarIconFileMd, ScalarIconGitBranch, ScalarIconGlobeSimple, ScalarIconLockSimple, ScalarIconPlugsConnected, ScalarIconSparkle, ScalarIconWarningOctagon } from "@scalar/icons";
|
|
5
5
|
//#region src/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue?vue&type=script&setup=true&lang.ts
|
|
6
6
|
var _hoisted_1 = { class: "text-c-2 mb-2 grid grid-cols-2 gap-2.5 font-medium" };
|
|
7
7
|
var ApiReferenceToolbarShareRegister_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
@@ -43,6 +43,14 @@ var ApiReferenceToolbarShareRegister_vue_vue_type_script_setup_true_lang_default
|
|
|
43
43
|
{
|
|
44
44
|
icon: ScalarIconBracketsCurly,
|
|
45
45
|
label: "JSON Schema Hosting"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
icon: ScalarIconSparkle,
|
|
49
|
+
label: "Ask AI"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
icon: ScalarIconPlugsConnected,
|
|
53
|
+
label: "MCP Servers"
|
|
46
54
|
}
|
|
47
55
|
];
|
|
48
56
|
return (_ctx, _cache) => {
|
package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.script.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiReferenceToolbarShareRegister.vue.script.js","names":[],"sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport {\n ScalarIconBookOpen,\n ScalarIconBracketsCurly,\n ScalarIconCloud,\n ScalarIconFileMd,\n ScalarIconGitBranch,\n ScalarIconGlobeSimple,\n ScalarIconLockSimple,\n ScalarIconWarningOctagon,\n} from '@scalar/icons'\nimport { type ScalarIconComponent } from '@scalar/icons/types'\nimport type { ExternalUrls } from '@scalar/types/api-reference'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\n\nimport ApiReferenceToolbarBlurb from './ApiReferenceToolbarBlurb.vue'\nimport ApiReferenceToolbarRegisterButton from './ApiReferenceToolbarRegisterButton.vue'\n\nconst { workspace, externalUrls } = defineProps<{\n workspace: WorkspaceStore\n externalUrls: ExternalUrls\n}>()\n\nconst FEATURES = [\n { icon: ScalarIconLockSimple, label: 'Password Protection' },\n { icon: ScalarIconGlobeSimple, label: 'Custom Domains' },\n { icon: ScalarIconBookOpen, label: 'Free-form content' },\n { icon: ScalarIconCloud, label: 'CDN Infrastructure' },\n { icon: ScalarIconGitBranch, label: 'Pull from GitHub' },\n { icon: ScalarIconFileMd, label: 'Markdown/MDX' },\n { icon: ScalarIconWarningOctagon, label: 'Spectral Linting' },\n { icon: ScalarIconBracketsCurly, label: 'JSON Schema Hosting' },\n] as const satisfies ReadonlyArray<{\n icon: ScalarIconComponent\n label: string\n}>\n</script>\n<template>\n <ul class=\"text-c-2 mb-2 grid grid-cols-2 gap-2.5 font-medium\">\n <li\n v-for=\"feature in FEATURES\"\n :key=\"feature.label\"\n class=\"flex items-center gap-2\">\n <component\n :is=\"feature.icon\"\n class=\"text-c-3 size-3.5\"\n weight=\"bold\" />\n {{ feature.label }}\n </li>\n </ul>\n <ApiReferenceToolbarRegisterButton\n :externalUrls\n :workspace>\n Deploy on Scalar\n </ApiReferenceToolbarRegisterButton>\n <ApiReferenceToolbarBlurb>\n Deploy your documentation for free. <br />\n Additional features might require\n <a\n href=\"https://scalar.com/products/docs/getting-started\"\n target=\"_blank\"\n >Scalar Pro</a\n >.\n </ApiReferenceToolbarBlurb>\n</template>\n"],"mappings":";;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"ApiReferenceToolbarShareRegister.vue.script.js","names":[],"sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport {\n ScalarIconBookOpen,\n ScalarIconBracketsCurly,\n ScalarIconCloud,\n ScalarIconFileMd,\n ScalarIconGitBranch,\n ScalarIconGlobeSimple,\n ScalarIconLockSimple,\n ScalarIconPlugsConnected,\n ScalarIconSparkle,\n ScalarIconWarningOctagon,\n} from '@scalar/icons'\nimport { type ScalarIconComponent } from '@scalar/icons/types'\nimport type { ExternalUrls } from '@scalar/types/api-reference'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\n\nimport ApiReferenceToolbarBlurb from './ApiReferenceToolbarBlurb.vue'\nimport ApiReferenceToolbarRegisterButton from './ApiReferenceToolbarRegisterButton.vue'\n\nconst { workspace, externalUrls } = defineProps<{\n workspace: WorkspaceStore\n externalUrls: ExternalUrls\n}>()\n\nconst FEATURES = [\n { icon: ScalarIconLockSimple, label: 'Password Protection' },\n { icon: ScalarIconGlobeSimple, label: 'Custom Domains' },\n { icon: ScalarIconBookOpen, label: 'Free-form content' },\n { icon: ScalarIconCloud, label: 'CDN Infrastructure' },\n { icon: ScalarIconGitBranch, label: 'Pull from GitHub' },\n { icon: ScalarIconFileMd, label: 'Markdown/MDX' },\n { icon: ScalarIconWarningOctagon, label: 'Spectral Linting' },\n { icon: ScalarIconBracketsCurly, label: 'JSON Schema Hosting' },\n { icon: ScalarIconSparkle, label: 'Ask AI' },\n { icon: ScalarIconPlugsConnected, label: 'MCP Servers' },\n] as const satisfies ReadonlyArray<{\n icon: ScalarIconComponent\n label: string\n}>\n</script>\n<template>\n <ul class=\"text-c-2 mb-2 grid grid-cols-2 gap-2.5 font-medium\">\n <li\n v-for=\"feature in FEATURES\"\n :key=\"feature.label\"\n class=\"flex items-center gap-2\">\n <component\n :is=\"feature.icon\"\n class=\"text-c-3 size-3.5\"\n weight=\"bold\" />\n {{ feature.label }}\n </li>\n </ul>\n <ApiReferenceToolbarRegisterButton\n :externalUrls\n :workspace>\n Deploy on Scalar\n </ApiReferenceToolbarRegisterButton>\n <ApiReferenceToolbarBlurb>\n Deploy your documentation for free. <br />\n Additional features might require\n <a\n href=\"https://scalar.com/products/docs/getting-started\"\n target=\"_blank\"\n >Scalar Pro</a\n >.\n </ApiReferenceToolbarBlurb>\n</template>\n"],"mappings":";;;;;;;;;;;;;EAyBA,MAAM,WAAW;GACf;IAAE,MAAM;IAAsB,OAAO;IAAuB;GAC5D;IAAE,MAAM;IAAuB,OAAO;IAAkB;GACxD;IAAE,MAAM;IAAoB,OAAO;IAAqB;GACxD;IAAE,MAAM;IAAiB,OAAO;IAAsB;GACtD;IAAE,MAAM;IAAqB,OAAO;IAAoB;GACxD;IAAE,MAAM;IAAkB,OAAO;IAAgB;GACjD;IAAE,MAAM;IAA0B,OAAO;IAAoB;GAC7D;IAAE,MAAM;IAAyB,OAAO;IAAuB;GAC/D;IAAE,MAAM;IAAmB,OAAO;IAAU;GAC5C;IAAE,MAAM;IAA0B,OAAO;IAAe;GACzD;;;IAMC,mBAWK,MAXL,YAWK,EAAA,WAAA,EAVH,mBASK,UAAA,MAAA,WARe,WAAX,YAAO;YADhB,mBASK,MAAA;MAPF,KAAK,QAAQ;MACd,OAAM;uBACN,YAGkB,wBAFX,QAAQ,KAAI,EAAA;MACjB,OAAM;MACN,QAAO;0BAAS,MAClB,gBAAG,QAAQ,MAAK,EAAA,EAAA,CAAA,CAAA;;IAGpB,YAIoC,2CAAA;KAHjC,cAAA,QAAA;KACA,WAAA,QAAA;;4BAEH,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAFa,sBAEb,GAAA,CAAA,EAAA,CAAA;;;IACA,YAQ2B,kCAAA,MAAA;4BAPW,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA;sBADZ,yCACY,GAAA;MAAA,mBAAM,MAAA,MAAA,MAAA,GAAA;sBAAA,uCAE1C,GAAA;MAAA,mBAIC,KAAA;OAHC,MAAK;OACL,QAAO;SACN,cAAU,GAAA;sBACZ,MACH,GAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExampleResponse.vue.d.ts","sourceRoot":"","sources":["../../../src/features/example-responses/ExampleResponse.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExampleResponse.vue.d.ts","sourceRoot":"","sources":["../../../src/features/example-responses/ExampleResponse.vue"],"names":[],"mappings":"AAgJA,OAAO,KAAK,EACV,aAAa,EACb,eAAe,EAEhB,MAAM,8DAA8D,CAAA;AAGrE,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,eAAe,GAAG,SAAS,CAAA;IACrC,OAAO,EAAE,aAAa,GAAG,SAAS,CAAA;CACnC,CAAC;AAwHF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -2,7 +2,7 @@ import _plugin_vue_export_helper_default from "../../_virtual/_plugin-vue_export
|
|
|
2
2
|
import ExampleResponse_vue_vue_type_script_setup_true_lang_default from "./ExampleResponse.vue.script.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
//#region src/features/example-responses/ExampleResponse.vue
|
|
5
|
-
var ExampleResponse_default = /* @__PURE__ */ _plugin_vue_export_helper_default(ExampleResponse_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
5
|
+
var ExampleResponse_default = /* @__PURE__ */ _plugin_vue_export_helper_default(ExampleResponse_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-da52ac9d"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { ExampleResponse_default as default };
|
|
8
8
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExampleResponse.vue.js","names":[],"sources":["../../../src/features/example-responses/ExampleResponse.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { getResolvedRefDeep } from '@scalar/api-client/blocks/operation-code-sample'\nimport { ScalarCodeBlock } from '@scalar/components/code-block'\nimport {
|
|
1
|
+
{"version":3,"file":"ExampleResponse.vue.js","names":[],"sources":["../../../src/features/example-responses/ExampleResponse.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { getResolvedRefDeep } from '@scalar/api-client/blocks/operation-code-sample'\nimport { ScalarCodeBlock } from '@scalar/components/code-block'\nimport { ScalarVirtualCodeBlock } from '@scalar/components/virtual-code-block'\nimport { prettyPrintJson } from '@scalar/helpers/json/pretty-print-json'\nimport { getExampleFromSchema } from '@scalar/workspace-store/request-example'\nimport type {\n ExampleObject,\n MediaTypeObject,\n SchemaObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nconst { example, response } = defineProps<{\n response: MediaTypeObject | undefined\n example: ExampleObject | undefined\n}>()\n\n/** Get content from the appropriate source */\nconst getContent = () => {\n if (example !== undefined) {\n return getResolvedRefDeep(example)?.value ?? ''\n }\n\n if (response?.schema) {\n return getExampleFromSchema(\n // Should be safe to deep resolve the schema here because we don't have to do any sibling resolution for example generation\n getResolvedRefDeep(response.schema) as SchemaObject,\n {\n emptyString: 'string',\n mode: 'read',\n },\n )\n }\n\n return undefined\n}\n\n/** Pre-pretty printed content string, avoids multiple pretty prints*/\nconst prettyPrintedContent = computed(() => {\n const content = getContent()\n if (content === undefined) {\n return undefined\n }\n return prettyPrintJson(content)\n})\n\nconst VIRTUALIZATION_THRESHOLD = 20_000\n\n// Virtualize the code block if it's too large\nconst shouldVirtualize = computed(() => {\n if (prettyPrintedContent.value === undefined) {\n return false\n }\n return prettyPrintedContent.value.length > VIRTUALIZATION_THRESHOLD\n})\n</script>\n<template>\n <!-- Example -->\n <ScalarCodeBlock\n v-if=\"prettyPrintedContent !== undefined && !shouldVirtualize\"\n class=\"bg-b-2\"\n lang=\"json\"\n :prettyPrintedContent=\"prettyPrintedContent\" />\n\n <ScalarVirtualCodeBlock\n v-else-if=\"prettyPrintedContent !== undefined && shouldVirtualize\"\n class=\"bg-b-2\"\n :content=\"prettyPrintedContent\"\n lang=\"json\" />\n\n <div\n v-else\n class=\"empty-state\">\n No Body\n </div>\n</template>\n\n<style scoped>\n.empty-state {\n margin: 10px 0 10px 12px;\n text-align: center;\n font-size: var(--scalar-mini);\n min-height: 56px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: var(--scalar-radius-lg);\n color: var(--scalar-color-2);\n}\n\n.rule-title {\n font-family: var(--scalar-font-code);\n color: var(--scalar-color-1);\n display: inline-block;\n margin: 12px 0 6px;\n border-radius: var(--scalar-radius);\n}\n\n.rule {\n margin: 0 12px 0;\n border-radius: var(--scalar-radius-lg);\n}\n\n.rule-items {\n counter-reset: list-number;\n display: flex;\n flex-direction: column;\n gap: 12px;\n border-left: 1px solid var(--scalar-border-color);\n padding: 12px 0 12px;\n}\n.rule-item {\n counter-increment: list-number;\n border: 1px solid var(--scalar-border-color);\n border-radius: var(--scalar-radius-lg);\n overflow: hidden;\n margin-left: 24px;\n}\n.rule-item:before {\n /* content: counter(list-number); */\n border: 1px solid var(--scalar-border-color);\n border-top: 0;\n border-right: 0;\n content: ' ';\n display: block;\n width: 24px;\n height: 6px;\n border-radius: 0 0 0 var(--scalar-radius-lg);\n margin-top: 6px;\n color: var(--scalar-color-2);\n transform: translateX(-25px);\n color: var(--scalar-color-1);\n position: absolute;\n}\n</style>\n"],"mappings":""}
|
|
@@ -2,7 +2,7 @@ import { computed, createBlock, createElementBlock, defineComponent, openBlock,
|
|
|
2
2
|
import { getExampleFromSchema } from "@scalar/workspace-store/request-example";
|
|
3
3
|
import { getResolvedRefDeep } from "@scalar/api-client/blocks/operation-code-sample";
|
|
4
4
|
import { ScalarCodeBlock } from "@scalar/components/code-block";
|
|
5
|
-
import {
|
|
5
|
+
import { ScalarVirtualCodeBlock } from "@scalar/components/virtual-code-block";
|
|
6
6
|
import { prettyPrintJson } from "@scalar/helpers/json/pretty-print-json";
|
|
7
7
|
//#region src/features/example-responses/ExampleResponse.vue?vue&type=script&setup=true&lang.ts
|
|
8
8
|
var _hoisted_1 = {
|
|
@@ -41,13 +41,12 @@ var ExampleResponse_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ *
|
|
|
41
41
|
class: "bg-b-2",
|
|
42
42
|
lang: "json",
|
|
43
43
|
prettyPrintedContent: prettyPrintedContent.value
|
|
44
|
-
}, null, 8, ["prettyPrintedContent"])) : prettyPrintedContent.value !== void 0 && shouldVirtualize.value ? (openBlock(), createBlock(unref(
|
|
44
|
+
}, null, 8, ["prettyPrintedContent"])) : prettyPrintedContent.value !== void 0 && shouldVirtualize.value ? (openBlock(), createBlock(unref(ScalarVirtualCodeBlock), {
|
|
45
45
|
key: 1,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}, null, 8, ["text"])) : (openBlock(), createElementBlock("div", _hoisted_1, " No Body "));
|
|
46
|
+
class: "bg-b-2",
|
|
47
|
+
content: prettyPrintedContent.value,
|
|
48
|
+
lang: "json"
|
|
49
|
+
}, null, 8, ["content"])) : (openBlock(), createElementBlock("div", _hoisted_1, " No Body "));
|
|
51
50
|
};
|
|
52
51
|
}
|
|
53
52
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExampleResponse.vue.script.js","names":[],"sources":["../../../src/features/example-responses/ExampleResponse.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { getResolvedRefDeep } from '@scalar/api-client/blocks/operation-code-sample'\nimport { ScalarCodeBlock } from '@scalar/components/code-block'\nimport {
|
|
1
|
+
{"version":3,"file":"ExampleResponse.vue.script.js","names":[],"sources":["../../../src/features/example-responses/ExampleResponse.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { getResolvedRefDeep } from '@scalar/api-client/blocks/operation-code-sample'\nimport { ScalarCodeBlock } from '@scalar/components/code-block'\nimport { ScalarVirtualCodeBlock } from '@scalar/components/virtual-code-block'\nimport { prettyPrintJson } from '@scalar/helpers/json/pretty-print-json'\nimport { getExampleFromSchema } from '@scalar/workspace-store/request-example'\nimport type {\n ExampleObject,\n MediaTypeObject,\n SchemaObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nconst { example, response } = defineProps<{\n response: MediaTypeObject | undefined\n example: ExampleObject | undefined\n}>()\n\n/** Get content from the appropriate source */\nconst getContent = () => {\n if (example !== undefined) {\n return getResolvedRefDeep(example)?.value ?? ''\n }\n\n if (response?.schema) {\n return getExampleFromSchema(\n // Should be safe to deep resolve the schema here because we don't have to do any sibling resolution for example generation\n getResolvedRefDeep(response.schema) as SchemaObject,\n {\n emptyString: 'string',\n mode: 'read',\n },\n )\n }\n\n return undefined\n}\n\n/** Pre-pretty printed content string, avoids multiple pretty prints*/\nconst prettyPrintedContent = computed(() => {\n const content = getContent()\n if (content === undefined) {\n return undefined\n }\n return prettyPrintJson(content)\n})\n\nconst VIRTUALIZATION_THRESHOLD = 20_000\n\n// Virtualize the code block if it's too large\nconst shouldVirtualize = computed(() => {\n if (prettyPrintedContent.value === undefined) {\n return false\n }\n return prettyPrintedContent.value.length > VIRTUALIZATION_THRESHOLD\n})\n</script>\n<template>\n <!-- Example -->\n <ScalarCodeBlock\n v-if=\"prettyPrintedContent !== undefined && !shouldVirtualize\"\n class=\"bg-b-2\"\n lang=\"json\"\n :prettyPrintedContent=\"prettyPrintedContent\" />\n\n <ScalarVirtualCodeBlock\n v-else-if=\"prettyPrintedContent !== undefined && shouldVirtualize\"\n class=\"bg-b-2\"\n :content=\"prettyPrintedContent\"\n lang=\"json\" />\n\n <div\n v-else\n class=\"empty-state\">\n No Body\n </div>\n</template>\n\n<style scoped>\n.empty-state {\n margin: 10px 0 10px 12px;\n text-align: center;\n font-size: var(--scalar-mini);\n min-height: 56px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: var(--scalar-radius-lg);\n color: var(--scalar-color-2);\n}\n\n.rule-title {\n font-family: var(--scalar-font-code);\n color: var(--scalar-color-1);\n display: inline-block;\n margin: 12px 0 6px;\n border-radius: var(--scalar-radius);\n}\n\n.rule {\n margin: 0 12px 0;\n border-radius: var(--scalar-radius-lg);\n}\n\n.rule-items {\n counter-reset: list-number;\n display: flex;\n flex-direction: column;\n gap: 12px;\n border-left: 1px solid var(--scalar-border-color);\n padding: 12px 0 12px;\n}\n.rule-item {\n counter-increment: list-number;\n border: 1px solid var(--scalar-border-color);\n border-radius: var(--scalar-radius-lg);\n overflow: hidden;\n margin-left: 24px;\n}\n.rule-item:before {\n /* content: counter(list-number); */\n border: 1px solid var(--scalar-border-color);\n border-top: 0;\n border-right: 0;\n content: ' ';\n display: block;\n width: 24px;\n height: 6px;\n border-radius: 0 0 0 var(--scalar-radius-lg);\n margin-top: 6px;\n color: var(--scalar-color-2);\n transform: translateX(-25px);\n color: var(--scalar-color-1);\n position: absolute;\n}\n</style>\n"],"mappings":";;;;;;;;;;;AA+CA,IAAM,2BAA2B;;;;;;;;;EA5BjC,MAAM,mBAAmB;AACvB,OAAI,QAAA,YAAY,KAAA,EACd,QAAO,mBAAmB,QAAA,QAAQ,EAAE,SAAS;AAG/C,OAAI,QAAA,UAAU,OACZ,QAAO,qBAEL,mBAAmB,QAAA,SAAS,OAAO,EACnC;IACE,aAAa;IACb,MAAM;IACP,CACH;;;EAOJ,MAAM,uBAAuB,eAAe;GAC1C,MAAM,UAAU,YAAW;AAC3B,OAAI,YAAY,KAAA,EACd;AAEF,UAAO,gBAAgB,QAAO;IAC/B;EAKD,MAAM,mBAAmB,eAAe;AACtC,OAAI,qBAAqB,UAAU,KAAA,EACjC,QAAO;AAET,UAAO,qBAAqB,MAAM,SAAS;IAC5C;;UAKS,qBAAA,UAAyB,KAAA,KAAS,CAAK,iBAAA,SAAA,WAAA,EAD/C,YAIiD,MAAA,gBAAA,EAAA;;IAF/C,OAAM;IACN,MAAK;IACJ,sBAAsB,qBAAA;4CAGZ,qBAAA,UAAyB,KAAA,KAAa,iBAAA,SAAA,WAAA,EADnD,YAIgB,MAAA,uBAAA,EAAA;;IAFd,OAAM;IACL,SAAS,qBAAA;IACV,MAAK;6CAEP,mBAIM,OAJN,YAEsB,YAEtB"}
|
|
@@ -10,8 +10,8 @@ import { useClipboard } from "@scalar/use-hooks/useClipboard";
|
|
|
10
10
|
import { getExample } from "@scalar/workspace-store/request-example";
|
|
11
11
|
import { ExamplePicker } from "@scalar/api-client/blocks/operation-code-sample";
|
|
12
12
|
import { ScalarMarkdown } from "@scalar/components/markdown";
|
|
13
|
-
import { ScalarIcon } from "@scalar/components/icon";
|
|
14
13
|
import { getResolvedRef } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
14
|
+
import { ScalarIcon } from "@scalar/components/icon";
|
|
15
15
|
import { objectKeys } from "@scalar/helpers/object/object-keys";
|
|
16
16
|
import { ScalarCard, ScalarCardFooter, ScalarCardSection } from "@scalar/components/card";
|
|
17
17
|
//#region src/features/example-responses/ExampleResponses.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExampleSchema.vue.d.ts","sourceRoot":"","sources":["../../../src/features/example-responses/ExampleSchema.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExampleSchema.vue.d.ts","sourceRoot":"","sources":["../../../src/features/example-responses/ExampleSchema.vue"],"names":[],"mappings":"AAkDA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uDAAuD,CAAA;AAC1F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oDAAoD,CAAA;AAGtF,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,aAAa,CAAC,YAAY,CAAC,CAAA;CACpC,CAAC;AAqFF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExampleSchema.vue.js","names":[],"sources":["../../../src/features/example-responses/ExampleSchema.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { getResolvedRefDeep } from '@scalar/api-client/blocks/operation-code-sample'\nimport { ScalarCodeBlock } from '@scalar/components/code-block'\nimport {
|
|
1
|
+
{"version":3,"file":"ExampleSchema.vue.js","names":[],"sources":["../../../src/features/example-responses/ExampleSchema.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { getResolvedRefDeep } from '@scalar/api-client/blocks/operation-code-sample'\nimport { ScalarCodeBlock } from '@scalar/components/code-block'\nimport { ScalarVirtualCodeBlock } from '@scalar/components/virtual-code-block'\nimport { prettyPrintJson } from '@scalar/helpers/json/pretty-print-json'\nimport type { ReferenceType } from '@scalar/workspace-store/schemas/v3.1/strict/reference'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/schema'\nimport { computed } from 'vue'\n\nconst { id, schema } = defineProps<{\n id: string\n schema: ReferenceType<SchemaObject>\n}>()\n\nconst schemaContent = computed(() => {\n if (!schema) {\n return undefined\n }\n\n return prettyPrintJson(getResolvedRefDeep(schema))\n})\n\nconst VIRTUALIZATION_THRESHOLD = 20_000\n\nconst shouldVirtualizeSchema = computed(() => {\n return (schemaContent.value?.length ?? 0) > VIRTUALIZATION_THRESHOLD\n})\n</script>\n\n<template>\n <ScalarCodeBlock\n v-if=\"!shouldVirtualizeSchema\"\n :id=\"id\"\n class=\"bg-b-2\"\n lang=\"json\"\n :prettyPrintedContent=\"schemaContent ?? ''\" />\n <ScalarVirtualCodeBlock\n v-else\n :id=\"id\"\n class=\"bg-b-2\"\n :content=\"schemaContent ?? ''\"\n lang=\"json\" />\n</template>\n"],"mappings":""}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { computed, createBlock, defineComponent, openBlock, unref } from "vue";
|
|
2
2
|
import { getResolvedRefDeep } from "@scalar/api-client/blocks/operation-code-sample";
|
|
3
3
|
import { ScalarCodeBlock } from "@scalar/components/code-block";
|
|
4
|
-
import {
|
|
4
|
+
import { ScalarVirtualCodeBlock } from "@scalar/components/virtual-code-block";
|
|
5
5
|
import { prettyPrintJson } from "@scalar/helpers/json/pretty-print-json";
|
|
6
6
|
//#region src/features/example-responses/ExampleSchema.vue?vue&type=script&setup=true&lang.ts
|
|
7
7
|
var VIRTUALIZATION_THRESHOLD = 2e4;
|
|
@@ -26,14 +26,13 @@ var ExampleSchema_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
|
|
|
26
26
|
class: "bg-b-2",
|
|
27
27
|
lang: "json",
|
|
28
28
|
prettyPrintedContent: schemaContent.value ?? ""
|
|
29
|
-
}, null, 8, ["id", "prettyPrintedContent"])) : (openBlock(), createBlock(unref(
|
|
29
|
+
}, null, 8, ["id", "prettyPrintedContent"])) : (openBlock(), createBlock(unref(ScalarVirtualCodeBlock), {
|
|
30
30
|
key: 1,
|
|
31
31
|
id: __props.id,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}, null, 8, ["id", "text"]));
|
|
32
|
+
class: "bg-b-2",
|
|
33
|
+
content: schemaContent.value ?? "",
|
|
34
|
+
lang: "json"
|
|
35
|
+
}, null, 8, ["id", "content"]));
|
|
37
36
|
};
|
|
38
37
|
}
|
|
39
38
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExampleSchema.vue.script.js","names":[],"sources":["../../../src/features/example-responses/ExampleSchema.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { getResolvedRefDeep } from '@scalar/api-client/blocks/operation-code-sample'\nimport { ScalarCodeBlock } from '@scalar/components/code-block'\nimport {
|
|
1
|
+
{"version":3,"file":"ExampleSchema.vue.script.js","names":[],"sources":["../../../src/features/example-responses/ExampleSchema.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { getResolvedRefDeep } from '@scalar/api-client/blocks/operation-code-sample'\nimport { ScalarCodeBlock } from '@scalar/components/code-block'\nimport { ScalarVirtualCodeBlock } from '@scalar/components/virtual-code-block'\nimport { prettyPrintJson } from '@scalar/helpers/json/pretty-print-json'\nimport type { ReferenceType } from '@scalar/workspace-store/schemas/v3.1/strict/reference'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/schema'\nimport { computed } from 'vue'\n\nconst { id, schema } = defineProps<{\n id: string\n schema: ReferenceType<SchemaObject>\n}>()\n\nconst schemaContent = computed(() => {\n if (!schema) {\n return undefined\n }\n\n return prettyPrintJson(getResolvedRefDeep(schema))\n})\n\nconst VIRTUALIZATION_THRESHOLD = 20_000\n\nconst shouldVirtualizeSchema = computed(() => {\n return (schemaContent.value?.length ?? 0) > VIRTUALIZATION_THRESHOLD\n})\n</script>\n\n<template>\n <ScalarCodeBlock\n v-if=\"!shouldVirtualizeSchema\"\n :id=\"id\"\n class=\"bg-b-2\"\n lang=\"json\"\n :prettyPrintedContent=\"schemaContent ?? ''\" />\n <ScalarVirtualCodeBlock\n v-else\n :id=\"id\"\n class=\"bg-b-2\"\n :content=\"schemaContent ?? ''\"\n lang=\"json\" />\n</template>\n"],"mappings":";;;;;;AAsBA,IAAM,2BAA2B;;;;;;;;EARjC,MAAM,gBAAgB,eAAe;AACnC,OAAI,CAAC,QAAA,OACH;AAGF,UAAO,gBAAgB,mBAAmB,QAAA,OAAO,CAAA;IAClD;EAID,MAAM,yBAAyB,eAAe;AAC5C,WAAQ,cAAc,OAAO,UAAU,KAAK;IAC7C;;WAKU,uBAAA,SAAA,WAAA,EADT,YAKgD,MAAA,gBAAA,EAAA;;IAH7C,IAAI,QAAA;IACL,OAAM;IACN,MAAK;IACJ,sBAAsB,cAAA,SAAa;gEACtC,YAKgB,MAAA,uBAAA,EAAA;;IAHb,IAAI,QAAA;IACL,OAAM;IACL,SAAS,cAAA,SAAa;IACvB,MAAK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Contact.vue.d.ts","sourceRoot":"","sources":["../../../src/features/info-object/Contact.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Contact.vue.d.ts","sourceRoot":"","sources":["../../../src/features/info-object/Contact.vue"],"names":[],"mappings":"AA2DA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8DAA8D,CAAA;AAWjG,KAAK,WAAW,GAAG;IACjB,KAAK,CAAC,EAAE,aAAa,CAAA;CACtB,CAAC;AAmGF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Contact.vue.js","names":[],"sources":["../../../src/features/info-object/Contact.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarIconEnvelopeSimple } from '@scalar/icons'\nimport { cva } from '@scalar/use-hooks/useBindCx'\nimport type { ContactObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nconst variants = cva({\n base: 'text-c-1 mr-2 flex min-h-7 min-w-7 items-center rounded-lg border px-2 py-1 group-last:mr-0 xl:border-none',\n variants: {\n link: {\n true: 'no-underline hover:bg-b-2',\n },\n },\n})\n\ndefineProps<{\n value?: ContactObject\n}>()\n</script>\n\n<template>\n <template v-if=\"value\">\n <div\n class=\"group flex items-center last:border-r-0 xl:border-r xl:first:ml-auto\">\n <a\n v-if=\"value
|
|
1
|
+
{"version":3,"file":"Contact.vue.js","names":[],"sources":["../../../src/features/info-object/Contact.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarIconEnvelopeSimple, ScalarIconLink } from '@scalar/icons'\nimport { cva } from '@scalar/use-hooks/useBindCx'\nimport type { ContactObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nconst variants = cva({\n base: 'text-c-1 mr-2 flex min-h-7 min-w-7 items-center rounded-lg border px-2 py-1 group-last:mr-0 xl:border-none',\n variants: {\n link: {\n true: 'no-underline hover:bg-b-2',\n },\n },\n})\n\ndefineProps<{\n value?: ContactObject\n}>()\n</script>\n\n<template>\n <template v-if=\"value\">\n <div\n class=\"group flex items-center last:border-r-0 xl:border-r xl:first:ml-auto\">\n <a\n v-if=\"value.email\"\n :class=\"variants({ link: true })\"\n :href=\"`mailto:${value.email}`\">\n <ScalarIconEnvelopeSimple\n weight=\"bold\"\n class=\"size-3 text-current\" />\n <span class=\"ml-1 empty:hidden\">{{ value.name }}</span>\n </a>\n <a\n v-if=\"value.url\"\n :class=\"variants({ link: true })\"\n :href=\"value.url\"\n rel=\"noopener noreferrer\"\n target=\"_blank\">\n <ScalarIconLink\n weight=\"bold\"\n class=\"size-3 text-current\" />\n <!-- Avoid repeating the name when the email link already shows it -->\n <span class=\"ml-1 empty:hidden\">{{\n value.email ? '' : value.name\n }}</span>\n </a>\n <span\n v-else-if=\"!value.email && value.name\"\n :class=\"variants({ link: false })\">\n {{ value.name }}\n </span>\n </div>\n </template>\n</template>\n"],"mappings":""}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, normalizeClass, openBlock, toDisplayString, unref } from "vue";
|
|
2
|
-
import { ScalarIconEnvelopeSimple } from "@scalar/icons";
|
|
2
|
+
import { ScalarIconEnvelopeSimple, ScalarIconLink } from "@scalar/icons";
|
|
3
3
|
import { cva } from "@scalar/use-hooks/useBindCx";
|
|
4
4
|
//#region src/features/info-object/Contact.vue?vue&type=script&setup=true&lang.ts
|
|
5
5
|
var _hoisted_1 = {
|
|
@@ -8,6 +8,8 @@ var _hoisted_1 = {
|
|
|
8
8
|
};
|
|
9
9
|
var _hoisted_2 = ["href"];
|
|
10
10
|
var _hoisted_3 = { class: "ml-1 empty:hidden" };
|
|
11
|
+
var _hoisted_4 = ["href"];
|
|
12
|
+
var _hoisted_5 = { class: "ml-1 empty:hidden" };
|
|
11
13
|
var Contact_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
12
14
|
__name: "Contact",
|
|
13
15
|
props: { value: {} },
|
|
@@ -17,15 +19,24 @@ var Contact_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ define
|
|
|
17
19
|
variants: { link: { true: "no-underline hover:bg-b-2" } }
|
|
18
20
|
});
|
|
19
21
|
return (_ctx, _cache) => {
|
|
20
|
-
return __props.value ? (openBlock(), createElementBlock("div", _hoisted_1, [__props.value
|
|
22
|
+
return __props.value ? (openBlock(), createElementBlock("div", _hoisted_1, [__props.value.email ? (openBlock(), createElementBlock("a", {
|
|
21
23
|
key: 0,
|
|
22
24
|
class: normalizeClass(unref(variants)({ link: true })),
|
|
23
|
-
href: `mailto:${__props.value
|
|
25
|
+
href: `mailto:${__props.value.email}`
|
|
24
26
|
}, [createVNode(unref(ScalarIconEnvelopeSimple), {
|
|
25
27
|
weight: "bold",
|
|
26
28
|
class: "size-3 text-current"
|
|
27
|
-
}), createElementVNode("span", _hoisted_3, toDisplayString(__props.value.name), 1)], 10, _hoisted_2)) : __props.value
|
|
29
|
+
}), createElementVNode("span", _hoisted_3, toDisplayString(__props.value.name), 1)], 10, _hoisted_2)) : createCommentVNode("", true), __props.value.url ? (openBlock(), createElementBlock("a", {
|
|
28
30
|
key: 1,
|
|
31
|
+
class: normalizeClass(unref(variants)({ link: true })),
|
|
32
|
+
href: __props.value.url,
|
|
33
|
+
rel: "noopener noreferrer",
|
|
34
|
+
target: "_blank"
|
|
35
|
+
}, [createVNode(unref(ScalarIconLink), {
|
|
36
|
+
weight: "bold",
|
|
37
|
+
class: "size-3 text-current"
|
|
38
|
+
}), createElementVNode("span", _hoisted_5, toDisplayString(__props.value.email ? "" : __props.value.name), 1)], 10, _hoisted_4)) : !__props.value.email && __props.value.name ? (openBlock(), createElementBlock("span", {
|
|
39
|
+
key: 2,
|
|
29
40
|
class: normalizeClass(unref(variants)({ link: false }))
|
|
30
41
|
}, toDisplayString(__props.value.name), 3)) : createCommentVNode("", true)])) : createCommentVNode("", true);
|
|
31
42
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Contact.vue.script.js","names":[],"sources":["../../../src/features/info-object/Contact.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarIconEnvelopeSimple } from '@scalar/icons'\nimport { cva } from '@scalar/use-hooks/useBindCx'\nimport type { ContactObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nconst variants = cva({\n base: 'text-c-1 mr-2 flex min-h-7 min-w-7 items-center rounded-lg border px-2 py-1 group-last:mr-0 xl:border-none',\n variants: {\n link: {\n true: 'no-underline hover:bg-b-2',\n },\n },\n})\n\ndefineProps<{\n value?: ContactObject\n}>()\n</script>\n\n<template>\n <template v-if=\"value\">\n <div\n class=\"group flex items-center last:border-r-0 xl:border-r xl:first:ml-auto\">\n <a\n v-if=\"value
|
|
1
|
+
{"version":3,"file":"Contact.vue.script.js","names":[],"sources":["../../../src/features/info-object/Contact.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarIconEnvelopeSimple, ScalarIconLink } from '@scalar/icons'\nimport { cva } from '@scalar/use-hooks/useBindCx'\nimport type { ContactObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nconst variants = cva({\n base: 'text-c-1 mr-2 flex min-h-7 min-w-7 items-center rounded-lg border px-2 py-1 group-last:mr-0 xl:border-none',\n variants: {\n link: {\n true: 'no-underline hover:bg-b-2',\n },\n },\n})\n\ndefineProps<{\n value?: ContactObject\n}>()\n</script>\n\n<template>\n <template v-if=\"value\">\n <div\n class=\"group flex items-center last:border-r-0 xl:border-r xl:first:ml-auto\">\n <a\n v-if=\"value.email\"\n :class=\"variants({ link: true })\"\n :href=\"`mailto:${value.email}`\">\n <ScalarIconEnvelopeSimple\n weight=\"bold\"\n class=\"size-3 text-current\" />\n <span class=\"ml-1 empty:hidden\">{{ value.name }}</span>\n </a>\n <a\n v-if=\"value.url\"\n :class=\"variants({ link: true })\"\n :href=\"value.url\"\n rel=\"noopener noreferrer\"\n target=\"_blank\">\n <ScalarIconLink\n weight=\"bold\"\n class=\"size-3 text-current\" />\n <!-- Avoid repeating the name when the email link already shows it -->\n <span class=\"ml-1 empty:hidden\">{{\n value.email ? '' : value.name\n }}</span>\n </a>\n <span\n v-else-if=\"!value.email && value.name\"\n :class=\"variants({ link: false })\">\n {{ value.name }}\n </span>\n </div>\n </template>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;EAKA,MAAM,WAAW,IAAI;GACnB,MAAM;GACN,UAAU,EACR,MAAM,EACJ,MAAM,6BACP,EACF;GACF,CAAA;;UAQiB,QAAA,SAAA,WAAA,EACd,mBA8BM,OA9BN,YA8BM,CA3BI,QAAA,MAAM,SAAA,WAAA,EADd,mBAQI,KAAA;;IAND,OAAK,eAAE,MAAA,SAAQ,CAAA,EAAA,MAAA,MAAA,CAAA,CAAA;IACf,MAAI,UAAY,QAAA,MAAM;OACvB,YAEgC,MAAA,yBAAA,EAAA;IAD9B,QAAO;IACP,OAAM;OACR,mBAAuD,QAAvD,YAAuD,gBAApB,QAAA,MAAM,KAAI,EAAA,EAAA,CAAA,EAAA,IAAA,WAAA,IAAA,mBAAA,IAAA,KAAA,EAGvC,QAAA,MAAM,OAAA,WAAA,EADd,mBAaI,KAAA;;IAXD,OAAK,eAAE,MAAA,SAAQ,CAAA,EAAA,MAAA,MAAA,CAAA,CAAA;IACf,MAAM,QAAA,MAAM;IACb,KAAI;IACJ,QAAO;OACP,YAEgC,MAAA,eAAA,EAAA;IAD9B,QAAO;IACP,OAAM;OAER,mBAES,QAFT,YAES,gBADP,QAAA,MAAM,QAAK,KAAQ,QAAA,MAAM,KAAI,EAAA,EAAA,CAAA,EAAA,IAAA,WAAA,IAAA,CAInB,QAAA,MAAM,SAAS,QAAA,MAAM,QAAA,WAAA,EADnC,mBAIO,QAAA;;IAFJ,OAAK,eAAE,MAAA,SAAQ,CAAA,EAAA,MAAA,OAAA,CAAA,CAAA;sBACb,QAAA,MAAM,KAAI,EAAA,EAAA,IAAA,mBAAA,IAAA,KAAA,CAAA,CAAA,IAAA,mBAAA,IAAA,KAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { AsyncApiDocument } from '@scalar/types/asyncapi/3.1';
|
|
2
|
+
import type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
3
|
+
/**
|
|
4
|
+
* Resolves a named schema from an AsyncAPI document's `components.schemas` into the `SchemaObject`
|
|
5
|
+
* shape the shared OpenAPI Model components and search indexing expect.
|
|
6
|
+
*
|
|
7
|
+
* AsyncAPI keeps reusable schemas in the same place OpenAPI does, but an entry may need extra handling:
|
|
8
|
+
* - `components` or the schema itself may be a `$ref`; siblings are merged so keys declared alongside
|
|
9
|
+
* a `$ref` are kept rather than dropped.
|
|
10
|
+
* - A Multi Format Schema Object (`schemaFormat` plus a nested `schema`) is unwrapped to its payload,
|
|
11
|
+
* so we index and render the inner JSON Schema rather than the wrapper.
|
|
12
|
+
* - Boolean (`true`/`false`) and non-JSON-Schema payloads are skipped.
|
|
13
|
+
*/
|
|
14
|
+
export declare const getAsyncApiModelSchema: (document: AsyncApiDocument, name: string) => SchemaObject | undefined;
|
|
15
|
+
//# sourceMappingURL=get-async-api-model-schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-async-api-model-schema.d.ts","sourceRoot":"","sources":["../../src/helpers/get-async-api-model-schema.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAElE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAShG;;;;;;;;;;GAUG;AACH,eAAO,MAAM,sBAAsB,GAAI,UAAU,gBAAgB,EAAE,MAAM,MAAM,KAAG,YAAY,GAAG,SAmBhG,CAAA"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { getResolvedRef, mergeSiblingReferences } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
2
|
+
import { isObject } from "@scalar/helpers/object/is-object";
|
|
3
|
+
//#region src/helpers/get-async-api-model-schema.ts
|
|
4
|
+
/**
|
|
5
|
+
* A resolved `components.schemas` entry may be a JSON Schema object, a boolean (`true`/`false`)
|
|
6
|
+
* schema, or a Multi Format Schema wrapper, so accept only plain objects and treat them as the
|
|
7
|
+
* `SchemaObject` the shared Model rendering and search helpers expect.
|
|
8
|
+
*/
|
|
9
|
+
var isSchemaObject = (value) => isObject(value);
|
|
10
|
+
/**
|
|
11
|
+
* Resolves a named schema from an AsyncAPI document's `components.schemas` into the `SchemaObject`
|
|
12
|
+
* shape the shared OpenAPI Model components and search indexing expect.
|
|
13
|
+
*
|
|
14
|
+
* AsyncAPI keeps reusable schemas in the same place OpenAPI does, but an entry may need extra handling:
|
|
15
|
+
* - `components` or the schema itself may be a `$ref`; siblings are merged so keys declared alongside
|
|
16
|
+
* a `$ref` are kept rather than dropped.
|
|
17
|
+
* - A Multi Format Schema Object (`schemaFormat` plus a nested `schema`) is unwrapped to its payload,
|
|
18
|
+
* so we index and render the inner JSON Schema rather than the wrapper.
|
|
19
|
+
* - Boolean (`true`/`false`) and non-JSON-Schema payloads are skipped.
|
|
20
|
+
*/
|
|
21
|
+
var getAsyncApiModelSchema = (document, name) => {
|
|
22
|
+
if (!document.components) return;
|
|
23
|
+
const entry = getResolvedRef(document.components, mergeSiblingReferences).schemas?.[name];
|
|
24
|
+
if (entry === void 0) return;
|
|
25
|
+
const resolved = getResolvedRef(entry);
|
|
26
|
+
const schema = isObject(resolved) && "schemaFormat" in resolved ? getResolvedRef(resolved.schema) : resolved;
|
|
27
|
+
return isSchemaObject(schema) ? schema : void 0;
|
|
28
|
+
};
|
|
29
|
+
//#endregion
|
|
30
|
+
export { getAsyncApiModelSchema };
|
|
31
|
+
|
|
32
|
+
//# sourceMappingURL=get-async-api-model-schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-async-api-model-schema.js","names":[],"sources":["../../src/helpers/get-async-api-model-schema.ts"],"sourcesContent":["import { isObject } from '@scalar/helpers/object/is-object'\nimport type { AsyncApiDocument } from '@scalar/types/asyncapi/3.1'\nimport { getResolvedRef, mergeSiblingReferences } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\n/**\n * A resolved `components.schemas` entry may be a JSON Schema object, a boolean (`true`/`false`)\n * schema, or a Multi Format Schema wrapper, so accept only plain objects and treat them as the\n * `SchemaObject` the shared Model rendering and search helpers expect.\n */\nconst isSchemaObject = (value: unknown): value is SchemaObject => isObject(value)\n\n/**\n * Resolves a named schema from an AsyncAPI document's `components.schemas` into the `SchemaObject`\n * shape the shared OpenAPI Model components and search indexing expect.\n *\n * AsyncAPI keeps reusable schemas in the same place OpenAPI does, but an entry may need extra handling:\n * - `components` or the schema itself may be a `$ref`; siblings are merged so keys declared alongside\n * a `$ref` are kept rather than dropped.\n * - A Multi Format Schema Object (`schemaFormat` plus a nested `schema`) is unwrapped to its payload,\n * so we index and render the inner JSON Schema rather than the wrapper.\n * - Boolean (`true`/`false`) and non-JSON-Schema payloads are skipped.\n */\nexport const getAsyncApiModelSchema = (document: AsyncApiDocument, name: string): SchemaObject | undefined => {\n if (!document.components) {\n return undefined\n }\n\n // Merge siblings at the components level so schemas declared alongside a `$ref` are kept.\n const components = getResolvedRef(document.components, mergeSiblingReferences)\n const entry = components.schemas?.[name]\n if (entry === undefined) {\n return undefined\n }\n\n // Resolve the schema itself the same way OpenAPI model rendering does (plain `$ref-value`).\n const resolved = getResolvedRef(entry)\n\n // Multi Format Schema Objects carry the real schema under `schema`; unwrap to that payload.\n const schema = isObject(resolved) && 'schemaFormat' in resolved ? getResolvedRef(resolved.schema) : resolved\n\n return isSchemaObject(schema) ? schema : undefined\n}\n"],"mappings":";;;;;;;;AAUA,IAAM,kBAAkB,UAA0C,SAAS,MAAM;;;;;;;;;;;;AAajF,IAAa,0BAA0B,UAA4B,SAA2C;AAC5G,KAAI,CAAC,SAAS,WACZ;CAKF,MAAM,QADa,eAAe,SAAS,YAAY,uBAAuB,CACrD,UAAU;AACnC,KAAI,UAAU,KAAA,EACZ;CAIF,MAAM,WAAW,eAAe,MAAM;CAGtC,MAAM,SAAS,SAAS,SAAS,IAAI,kBAAkB,WAAW,eAAe,SAAS,OAAO,GAAG;AAEpG,QAAO,eAAe,OAAO,GAAG,SAAS,KAAA"}
|
|
@@ -24,6 +24,24 @@ export declare const getIdFromUrl: (url: string | URL, basePath: string | undefi
|
|
|
24
24
|
* @param isMultiDocument - Whether the document is multi-document or single-document. Single-document documents will strip the document slug from the id
|
|
25
25
|
*/
|
|
26
26
|
export declare const makeUrlFromId: (_id: string, basePath: string | undefined, isMultiDocument: boolean) => URL | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Rewrite legacy `/model/<name>` URL segments to the current section's slug.
|
|
29
|
+
*
|
|
30
|
+
* Earlier versions hardcoded `model/` (singular) as the prefix for individual schema entries
|
|
31
|
+
* even though the section itself was `models/`. We now use the same plural slug for both,
|
|
32
|
+
* so old bookmarks like `#default/model/User` would 404. This rewrites them in place.
|
|
33
|
+
*
|
|
34
|
+
* The regex is anchored to the legacy structural shape so unrelated `/model/` occurrences
|
|
35
|
+
* inside operation paths (e.g. `POST /model/train` for an AI/ML API → `default/POST/model/train`)
|
|
36
|
+
* and a tag literally named "model" are left alone.
|
|
37
|
+
*
|
|
38
|
+
* Trade-off: in single-document mode the URL strips the document slug, which makes
|
|
39
|
+
* `#tag/<slug>/model/<name>` ambiguous with an operation under a tag named "model".
|
|
40
|
+
* Single-doc tagged-model bookmarks are not rewritten — only top-level models.
|
|
41
|
+
*
|
|
42
|
+
* Returns the canonicalized URL when a rewrite happens, or null otherwise.
|
|
43
|
+
*/
|
|
44
|
+
export declare const redirectLegacyModelUrl: (url: string | URL, modelsSectionSlug: string, documentSlug: string, isMultiDocument: boolean, basePath?: string) => URL | null;
|
|
27
45
|
/** Extracts the schema parameters from the id if they are present */
|
|
28
46
|
export declare const getSchemaParamsFromId: (id: string) => {
|
|
29
47
|
rawId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"id-routing.d.ts","sourceRoot":"","sources":["../../src/helpers/id-routing.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,GAAI,UAAU,MAAM,WAEhD,CAAA;AAwBD,mEAAmE;AACnE,eAAO,MAAM,aAAa,GAAI,UAAU,MAAM,GAAG,GAAG,EAAE,YAAY,MAAM,GAAG,SAAS,WAMnF,CAAA;AACD,mEAAmE;AACnE,eAAO,MAAM,aAAa,GAAI,UAAU,MAAM,GAAG,GAAG,EAAE,UAAU,MAAM,EAAE,YAAY,MAAM,GAAG,SAAS,WAqBrG,CAAA;AAED,2DAA2D;AAC3D,eAAO,MAAM,qBAAqB,GAAI,UAAU,MAAM,GAAG,GAAG,EAAE,UAAU,MAAM,EAAE,YAAY,MAAM,GAAG,SAAS,WAW7G,CAAA;AAED,8DAA8D;AAC9D,eAAO,MAAM,eAAe,GAAI,UAAU,MAAM,GAAG,GAAG,EAAE,UAAU,MAAM,YAiBvE,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,GAAI,KAAK,MAAM,GAAG,GAAG,EAAE,UAAU,MAAM,GAAG,SAAS,EAAE,YAAY,MAAM,GAAG,SAAS,WAQ3G,CAAA;AAmBD;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,GAAI,KAAK,MAAM,EAAE,UAAU,MAAM,GAAG,SAAS,EAAE,iBAAiB,OAAO,oBAsBhG,CAAA;AAED,qEAAqE;AACrE,eAAO,MAAM,qBAAqB,GAAI,IAAI,MAAM,KAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAajF,CAAA"}
|
|
1
|
+
{"version":3,"file":"id-routing.d.ts","sourceRoot":"","sources":["../../src/helpers/id-routing.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,GAAI,UAAU,MAAM,WAEhD,CAAA;AAwBD,mEAAmE;AACnE,eAAO,MAAM,aAAa,GAAI,UAAU,MAAM,GAAG,GAAG,EAAE,YAAY,MAAM,GAAG,SAAS,WAMnF,CAAA;AACD,mEAAmE;AACnE,eAAO,MAAM,aAAa,GAAI,UAAU,MAAM,GAAG,GAAG,EAAE,UAAU,MAAM,EAAE,YAAY,MAAM,GAAG,SAAS,WAqBrG,CAAA;AAED,2DAA2D;AAC3D,eAAO,MAAM,qBAAqB,GAAI,UAAU,MAAM,GAAG,GAAG,EAAE,UAAU,MAAM,EAAE,YAAY,MAAM,GAAG,SAAS,WAW7G,CAAA;AAED,8DAA8D;AAC9D,eAAO,MAAM,eAAe,GAAI,UAAU,MAAM,GAAG,GAAG,EAAE,UAAU,MAAM,YAiBvE,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,GAAI,KAAK,MAAM,GAAG,GAAG,EAAE,UAAU,MAAM,GAAG,SAAS,EAAE,YAAY,MAAM,GAAG,SAAS,WAQ3G,CAAA;AAmBD;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,GAAI,KAAK,MAAM,EAAE,UAAU,MAAM,GAAG,SAAS,EAAE,iBAAiB,OAAO,oBAsBhG,CAAA;AAID;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,sBAAsB,GACjC,KAAK,MAAM,GAAG,GAAG,EACjB,mBAAmB,MAAM,EACzB,cAAc,MAAM,EACpB,iBAAiB,OAAO,EACxB,WAAW,MAAM,KAChB,GAAG,GAAG,IAwCR,CAAA;AAED,qEAAqE;AACrE,eAAO,MAAM,qBAAqB,GAAI,IAAI,MAAM,KAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAajF,CAAA"}
|
|
@@ -89,6 +89,46 @@ var makeUrlFromId = (_id, basePath, isMultiDocument) => {
|
|
|
89
89
|
else url.hash = id;
|
|
90
90
|
return url;
|
|
91
91
|
};
|
|
92
|
+
var escapeRegex = (value) => value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
93
|
+
/**
|
|
94
|
+
* Rewrite legacy `/model/<name>` URL segments to the current section's slug.
|
|
95
|
+
*
|
|
96
|
+
* Earlier versions hardcoded `model/` (singular) as the prefix for individual schema entries
|
|
97
|
+
* even though the section itself was `models/`. We now use the same plural slug for both,
|
|
98
|
+
* so old bookmarks like `#default/model/User` would 404. This rewrites them in place.
|
|
99
|
+
*
|
|
100
|
+
* The regex is anchored to the legacy structural shape so unrelated `/model/` occurrences
|
|
101
|
+
* inside operation paths (e.g. `POST /model/train` for an AI/ML API → `default/POST/model/train`)
|
|
102
|
+
* and a tag literally named "model" are left alone.
|
|
103
|
+
*
|
|
104
|
+
* Trade-off: in single-document mode the URL strips the document slug, which makes
|
|
105
|
+
* `#tag/<slug>/model/<name>` ambiguous with an operation under a tag named "model".
|
|
106
|
+
* Single-doc tagged-model bookmarks are not rewritten — only top-level models.
|
|
107
|
+
*
|
|
108
|
+
* Returns the canonicalized URL when a rewrite happens, or null otherwise.
|
|
109
|
+
*/
|
|
110
|
+
var redirectLegacyModelUrl = (url, modelsSectionSlug, documentSlug, isMultiDocument, basePath) => {
|
|
111
|
+
if (!documentSlug) return null;
|
|
112
|
+
const next = typeof url === "string" ? new URL(url) : new URL(url.toString());
|
|
113
|
+
const escapedDoc = escapeRegex(documentSlug);
|
|
114
|
+
const tagPrefix = "(?:(?:tag-group\\/[^/]+\\/)?tag\\/[^/]+\\/)?";
|
|
115
|
+
const slugAnchoredHash = new RegExp(`^(#${escapedDoc}\\/${tagPrefix})model\\/`);
|
|
116
|
+
const replacement = `$1${modelsSectionSlug}/`;
|
|
117
|
+
let newHash = next.hash.replace(slugAnchoredHash, replacement);
|
|
118
|
+
if (newHash === next.hash && !isMultiDocument) newHash = next.hash.replace(/^(#)model\//, replacement);
|
|
119
|
+
let newPathname = next.pathname;
|
|
120
|
+
if (basePath !== void 0 && !basePath.startsWith("#")) {
|
|
121
|
+
const escapedBase = escapeRegex(sanitizeBasePath(basePath));
|
|
122
|
+
const basePrefix = escapedBase ? `\\/${escapedBase}` : "";
|
|
123
|
+
const slugAnchoredPath = new RegExp(`^(${basePrefix}\\/${escapedDoc}\\/${tagPrefix})model\\/`);
|
|
124
|
+
newPathname = next.pathname.replace(slugAnchoredPath, replacement);
|
|
125
|
+
if (newPathname === next.pathname && !isMultiDocument) newPathname = next.pathname.replace(new RegExp(`^(${basePrefix}\\/)model\\/`), replacement);
|
|
126
|
+
}
|
|
127
|
+
if (newHash === next.hash && newPathname === next.pathname) return null;
|
|
128
|
+
next.hash = newHash;
|
|
129
|
+
next.pathname = newPathname;
|
|
130
|
+
return next;
|
|
131
|
+
};
|
|
92
132
|
/** Extracts the schema parameters from the id if they are present */
|
|
93
133
|
var getSchemaParamsFromId = (id) => {
|
|
94
134
|
const matcher = id.match(/(.*)(\.body\.|\.path\.|\.query\.|\.header\.)(.*)/);
|
|
@@ -102,6 +142,6 @@ var getSchemaParamsFromId = (id) => {
|
|
|
102
142
|
};
|
|
103
143
|
};
|
|
104
144
|
//#endregion
|
|
105
|
-
export { getIdFromUrl, getSchemaParamsFromId, makeUrlFromId, matchesBasePath };
|
|
145
|
+
export { getIdFromUrl, getSchemaParamsFromId, makeUrlFromId, matchesBasePath, redirectLegacyModelUrl };
|
|
106
146
|
|
|
107
147
|
//# sourceMappingURL=id-routing.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"id-routing.js","names":[],"sources":["../../src/helpers/id-routing.ts"],"sourcesContent":["export const sanitizeBasePath = (basePath: string) => {\n return basePath.replace(/^\\/+|\\/+$/g, '')\n}\n\nconst isHashBasePath = (basePath: string) => basePath.startsWith('#')\n\nconst sanitizeHashBasePath = (basePath: string) => {\n return basePath.replace(/^#+/, '').replace(/\\/+$/g, '')\n}\n\nconst applySlugPrefix = (base: string, slugPrefix: string | undefined) => {\n return slugPrefix ? `${slugPrefix}${base ? '/' : ''}${base}` : base\n}\n\nconst stripBasePathPrefix = (value: string, basePath: string) => {\n if (value === basePath) {\n return ''\n }\n\n if (value.startsWith(`${basePath}/`)) {\n return value.slice(basePath.length + 1)\n }\n\n return null\n}\n\n/** Extracts an element id from the hash when using hash routing */\nexport const getIdFromHash = (location: string | URL, slugPrefix: string | undefined) => {\n const url = typeof location === 'string' ? new URL(location) : location\n\n const base = decodeURIComponent(url.hash.slice(1))\n\n return applySlugPrefix(base, slugPrefix)\n}\n/** Extracts an element id from the path when using path routing */\nexport const getIdFromPath = (location: string | URL, basePath: string, slugPrefix: string | undefined) => {\n const url = typeof location === 'string' ? new URL(location) : location\n const sanitized = sanitizeBasePath(basePath)\n\n // Construct the full basePath with leading slash and encode it for matching\n // We need to encode each segment separately to match how URLs encode pathnames\n const basePathWithSlash = sanitized\n ? `/${sanitized\n .split('/')\n .map((segment) => encodeURIComponent(segment))\n .join('/')}`\n : ''\n\n // Extract the portion after the basePath\n if (url.pathname.startsWith(basePathWithSlash)) {\n const remainder = url.pathname.slice(basePathWithSlash.length)\n const base = decodeURIComponent(remainder.startsWith('/') ? remainder.slice(1) : remainder)\n return applySlugPrefix(base, slugPrefix)\n }\n\n return slugPrefix ?? ''\n}\n\n/** Extracts an element id from a hash-prefixed basePath */\nexport const getIdFromHashBasePath = (location: string | URL, basePath: string, slugPrefix: string | undefined) => {\n const url = typeof location === 'string' ? new URL(location) : location\n const hash = decodeURIComponent(url.hash.slice(1))\n const sanitized = sanitizeHashBasePath(basePath)\n\n const remainder = stripBasePathPrefix(hash, sanitized)\n if (remainder !== null) {\n return applySlugPrefix(remainder, slugPrefix)\n }\n\n return slugPrefix ?? ''\n}\n\n/** Determines whether a URL matches the provided basePath. */\nexport const matchesBasePath = (location: string | URL, basePath: string) => {\n const url = typeof location === 'string' ? new URL(location) : location\n\n if (isHashBasePath(basePath)) {\n const hash = decodeURIComponent(url.hash)\n return hash === basePath || hash.startsWith(`${basePath}/`)\n }\n\n const sanitized = sanitizeBasePath(basePath)\n const basePathWithSlash = sanitized\n ? `/${sanitized\n .split('/')\n .map((segment) => encodeURIComponent(segment))\n .join('/')}`\n : ''\n\n return url.pathname === basePathWithSlash || url.pathname.startsWith(`${basePathWithSlash}/`)\n}\n\n/**\n * Extracts a navigation id from a URL based on the routing type\n *\n * @param url - The URL to extract the id from\n * @param basePath - The base path used in path routing\n * @param slugPrefix - If the document slug is not expected in the URL then we must prefix it\n */\nexport const getIdFromUrl = (url: string | URL, basePath: string | undefined, slugPrefix: string | undefined) => {\n if (typeof basePath !== 'string') {\n return getIdFromHash(url, slugPrefix)\n }\n\n return isHashBasePath(basePath)\n ? getIdFromHashBasePath(url, basePath, slugPrefix)\n : getIdFromPath(url, basePath, slugPrefix)\n}\n\n/**\n * Strips the first segment from an id and preserves trailing slashes\n * Used in single-document mode where the document slug is not needed in the URL\n *\n * @param id - The full id to process\n * @returns The id with the first segment removed, preserving trailing slash if present\n */\nconst stripFirstSegment = (id: string): string => {\n // For preserving trailing slash in the id\n const hasTrailingSlash = id.endsWith('/')\n const segments = id.split('/').filter(Boolean).slice(1)\n const result = segments.join('/')\n\n // Only preserve trailing slash if there's actual content\n return hasTrailingSlash && result ? `${result}/` : result\n}\n\n/**\n * Generate a new URL and applies the ID to the path or hash\n * depending on the type of routing used\n *\n * @param id - The id to apply to the URL\n * @param basePath - The base path used in path routing\n * @param isMultiDocument - Whether the document is multi-document or single-document. Single-document documents will strip the document slug from the id\n */\nexport const makeUrlFromId = (_id: string, basePath: string | undefined, isMultiDocument: boolean) => {\n if (typeof window === 'undefined') {\n return undefined\n }\n\n /** When there is only 1 document we don't need to include the document name in the URL */\n const id = isMultiDocument ? _id : stripFirstSegment(_id)\n const url = new URL(window.location.href)\n\n if (typeof basePath === 'string') {\n if (isHashBasePath(basePath)) {\n const base = sanitizeHashBasePath(basePath)\n url.hash = [base, id].filter(Boolean).join('/')\n } else {\n const base = sanitizeBasePath(basePath)\n url.pathname = `${base}/${id}`\n }\n } else {\n url.hash = id\n }\n\n return url\n}\n\n/** Extracts the schema parameters from the id if they are present */\nexport const getSchemaParamsFromId = (id: string): { rawId: string; params: string } => {\n const matcher = id.match(/(.*)(\\.body\\.|\\.path\\.|\\.query\\.|\\.header\\.)(.*)/)\n\n if (matcher && typeof matcher[1] === 'string' && typeof matcher[2] === 'string') {\n return {\n rawId: matcher[1],\n params: matcher[2].slice(1) + matcher[3],\n }\n }\n return {\n rawId: id,\n params: '',\n }\n}\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"id-routing.js","names":[],"sources":["../../src/helpers/id-routing.ts"],"sourcesContent":["export const sanitizeBasePath = (basePath: string) => {\n return basePath.replace(/^\\/+|\\/+$/g, '')\n}\n\nconst isHashBasePath = (basePath: string) => basePath.startsWith('#')\n\nconst sanitizeHashBasePath = (basePath: string) => {\n return basePath.replace(/^#+/, '').replace(/\\/+$/g, '')\n}\n\nconst applySlugPrefix = (base: string, slugPrefix: string | undefined) => {\n return slugPrefix ? `${slugPrefix}${base ? '/' : ''}${base}` : base\n}\n\nconst stripBasePathPrefix = (value: string, basePath: string) => {\n if (value === basePath) {\n return ''\n }\n\n if (value.startsWith(`${basePath}/`)) {\n return value.slice(basePath.length + 1)\n }\n\n return null\n}\n\n/** Extracts an element id from the hash when using hash routing */\nexport const getIdFromHash = (location: string | URL, slugPrefix: string | undefined) => {\n const url = typeof location === 'string' ? new URL(location) : location\n\n const base = decodeURIComponent(url.hash.slice(1))\n\n return applySlugPrefix(base, slugPrefix)\n}\n/** Extracts an element id from the path when using path routing */\nexport const getIdFromPath = (location: string | URL, basePath: string, slugPrefix: string | undefined) => {\n const url = typeof location === 'string' ? new URL(location) : location\n const sanitized = sanitizeBasePath(basePath)\n\n // Construct the full basePath with leading slash and encode it for matching\n // We need to encode each segment separately to match how URLs encode pathnames\n const basePathWithSlash = sanitized\n ? `/${sanitized\n .split('/')\n .map((segment) => encodeURIComponent(segment))\n .join('/')}`\n : ''\n\n // Extract the portion after the basePath\n if (url.pathname.startsWith(basePathWithSlash)) {\n const remainder = url.pathname.slice(basePathWithSlash.length)\n const base = decodeURIComponent(remainder.startsWith('/') ? remainder.slice(1) : remainder)\n return applySlugPrefix(base, slugPrefix)\n }\n\n return slugPrefix ?? ''\n}\n\n/** Extracts an element id from a hash-prefixed basePath */\nexport const getIdFromHashBasePath = (location: string | URL, basePath: string, slugPrefix: string | undefined) => {\n const url = typeof location === 'string' ? new URL(location) : location\n const hash = decodeURIComponent(url.hash.slice(1))\n const sanitized = sanitizeHashBasePath(basePath)\n\n const remainder = stripBasePathPrefix(hash, sanitized)\n if (remainder !== null) {\n return applySlugPrefix(remainder, slugPrefix)\n }\n\n return slugPrefix ?? ''\n}\n\n/** Determines whether a URL matches the provided basePath. */\nexport const matchesBasePath = (location: string | URL, basePath: string) => {\n const url = typeof location === 'string' ? new URL(location) : location\n\n if (isHashBasePath(basePath)) {\n const hash = decodeURIComponent(url.hash)\n return hash === basePath || hash.startsWith(`${basePath}/`)\n }\n\n const sanitized = sanitizeBasePath(basePath)\n const basePathWithSlash = sanitized\n ? `/${sanitized\n .split('/')\n .map((segment) => encodeURIComponent(segment))\n .join('/')}`\n : ''\n\n return url.pathname === basePathWithSlash || url.pathname.startsWith(`${basePathWithSlash}/`)\n}\n\n/**\n * Extracts a navigation id from a URL based on the routing type\n *\n * @param url - The URL to extract the id from\n * @param basePath - The base path used in path routing\n * @param slugPrefix - If the document slug is not expected in the URL then we must prefix it\n */\nexport const getIdFromUrl = (url: string | URL, basePath: string | undefined, slugPrefix: string | undefined) => {\n if (typeof basePath !== 'string') {\n return getIdFromHash(url, slugPrefix)\n }\n\n return isHashBasePath(basePath)\n ? getIdFromHashBasePath(url, basePath, slugPrefix)\n : getIdFromPath(url, basePath, slugPrefix)\n}\n\n/**\n * Strips the first segment from an id and preserves trailing slashes\n * Used in single-document mode where the document slug is not needed in the URL\n *\n * @param id - The full id to process\n * @returns The id with the first segment removed, preserving trailing slash if present\n */\nconst stripFirstSegment = (id: string): string => {\n // For preserving trailing slash in the id\n const hasTrailingSlash = id.endsWith('/')\n const segments = id.split('/').filter(Boolean).slice(1)\n const result = segments.join('/')\n\n // Only preserve trailing slash if there's actual content\n return hasTrailingSlash && result ? `${result}/` : result\n}\n\n/**\n * Generate a new URL and applies the ID to the path or hash\n * depending on the type of routing used\n *\n * @param id - The id to apply to the URL\n * @param basePath - The base path used in path routing\n * @param isMultiDocument - Whether the document is multi-document or single-document. Single-document documents will strip the document slug from the id\n */\nexport const makeUrlFromId = (_id: string, basePath: string | undefined, isMultiDocument: boolean) => {\n if (typeof window === 'undefined') {\n return undefined\n }\n\n /** When there is only 1 document we don't need to include the document name in the URL */\n const id = isMultiDocument ? _id : stripFirstSegment(_id)\n const url = new URL(window.location.href)\n\n if (typeof basePath === 'string') {\n if (isHashBasePath(basePath)) {\n const base = sanitizeHashBasePath(basePath)\n url.hash = [base, id].filter(Boolean).join('/')\n } else {\n const base = sanitizeBasePath(basePath)\n url.pathname = `${base}/${id}`\n }\n } else {\n url.hash = id\n }\n\n return url\n}\n\nconst escapeRegex = (value: string) => value.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')\n\n/**\n * Rewrite legacy `/model/<name>` URL segments to the current section's slug.\n *\n * Earlier versions hardcoded `model/` (singular) as the prefix for individual schema entries\n * even though the section itself was `models/`. We now use the same plural slug for both,\n * so old bookmarks like `#default/model/User` would 404. This rewrites them in place.\n *\n * The regex is anchored to the legacy structural shape so unrelated `/model/` occurrences\n * inside operation paths (e.g. `POST /model/train` for an AI/ML API → `default/POST/model/train`)\n * and a tag literally named \"model\" are left alone.\n *\n * Trade-off: in single-document mode the URL strips the document slug, which makes\n * `#tag/<slug>/model/<name>` ambiguous with an operation under a tag named \"model\".\n * Single-doc tagged-model bookmarks are not rewritten — only top-level models.\n *\n * Returns the canonicalized URL when a rewrite happens, or null otherwise.\n */\nexport const redirectLegacyModelUrl = (\n url: string | URL,\n modelsSectionSlug: string,\n documentSlug: string,\n isMultiDocument: boolean,\n basePath?: string,\n): URL | null => {\n if (!documentSlug) {\n return null\n }\n\n const next = typeof url === 'string' ? new URL(url) : new URL(url.toString())\n const escapedDoc = escapeRegex(documentSlug)\n // Optional `(tag-group/<n>/)?tag/<slug>/` block in front of `model/`.\n const tagPrefix = '(?:(?:tag-group\\\\/[^/]+\\\\/)?tag\\\\/[^/]+\\\\/)?'\n const slugAnchoredHash = new RegExp(`^(#${escapedDoc}\\\\/${tagPrefix})model\\\\/`)\n const replacement = `$1${modelsSectionSlug}/`\n\n // Always try the slug-anchored form first — old bookmarks may include the doc slug\n // even in single-document mode.\n let newHash = next.hash.replace(slugAnchoredHash, replacement)\n if (newHash === next.hash && !isMultiDocument) {\n // Single-doc fallback: URL omits the doc slug (`#model/<name>`). We can only\n // safely rewrite top-level models here — `#tag/<slug>/model/<name>` is\n // ambiguous with an operation under a tag literally named \"model\".\n newHash = next.hash.replace(/^(#)model\\//, replacement)\n }\n\n let newPathname = next.pathname\n if (basePath !== undefined && !basePath.startsWith('#')) {\n const escapedBase = escapeRegex(sanitizeBasePath(basePath))\n const basePrefix = escapedBase ? `\\\\/${escapedBase}` : ''\n const slugAnchoredPath = new RegExp(`^(${basePrefix}\\\\/${escapedDoc}\\\\/${tagPrefix})model\\\\/`)\n newPathname = next.pathname.replace(slugAnchoredPath, replacement)\n if (newPathname === next.pathname && !isMultiDocument) {\n newPathname = next.pathname.replace(new RegExp(`^(${basePrefix}\\\\/)model\\\\/`), replacement)\n }\n }\n\n if (newHash === next.hash && newPathname === next.pathname) {\n return null\n }\n\n next.hash = newHash\n next.pathname = newPathname\n return next\n}\n\n/** Extracts the schema parameters from the id if they are present */\nexport const getSchemaParamsFromId = (id: string): { rawId: string; params: string } => {\n const matcher = id.match(/(.*)(\\.body\\.|\\.path\\.|\\.query\\.|\\.header\\.)(.*)/)\n\n if (matcher && typeof matcher[1] === 'string' && typeof matcher[2] === 'string') {\n return {\n rawId: matcher[1],\n params: matcher[2].slice(1) + matcher[3],\n }\n }\n return {\n rawId: id,\n params: '',\n }\n}\n"],"mappings":"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"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { WorkspaceStore } from '@scalar/workspace-store/client';
|
|
2
2
|
/**
|
|
3
3
|
* Loads the default HTTP client from storage and applies it to the workspace.
|
|
4
|
-
* Only updates if no default client is already set.
|
|
4
|
+
* Only updates if no default client is already set. Accepts both built-in client
|
|
5
|
+
* ids and custom sample ids (e.g. `custom/python`) so a custom selection persists.
|
|
5
6
|
*/
|
|
6
7
|
export declare const loadClientFromStorage: (store: WorkspaceStore) => void;
|
|
7
8
|
/**
|