@scalar/api-reference 1.62.9 → 1.64.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 +48 -0
- package/README.md +1 -1
- package/dist/blocks/index.d.ts +1 -0
- package/dist/blocks/index.d.ts.map +1 -1
- package/dist/blocks/index.js +3 -1
- package/dist/blocks/scalar-info-block/components/DownloadLink.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-info-block/components/DownloadLink.vue.js +1 -1
- package/dist/blocks/scalar-info-block/components/DownloadLink.vue.js.map +1 -1
- package/dist/blocks/scalar-info-block/components/DownloadLink.vue.script.js.map +1 -1
- package/dist/blocks/scalar-info-block/components/IntroductionCard.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-info-block/components/IntroductionCard.vue.js +1 -1
- package/dist/blocks/scalar-info-block/components/IntroductionCard.vue.js.map +1 -1
- package/dist/blocks/scalar-info-block/components/IntroductionCard.vue.script.js.map +1 -1
- package/dist/blocks/scalar-info-block/components/IntroductionLoading.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-info-block/components/IntroductionLoading.vue.js +1 -1
- package/dist/blocks/scalar-info-block/components/IntroductionLoading.vue.js.map +1 -1
- package/dist/blocks/scalar-info-block/components/IntroductionLoading.vue.script.js +4 -4
- package/dist/blocks/scalar-info-block/components/IntroductionLoading.vue.script.js.map +1 -1
- package/dist/browser/chunks/AgentScalarChatInterface-C8lX3RCo.js +27 -0
- package/dist/browser/chunks/ScalarTextInput.vue-Xf60Nwf-.js +27 -0
- package/dist/browser/chunks/basic-shape-diamond.svg-BTEOT1FL.js +1 -1
- package/dist/browser/chunks/basic-shape-hexagon.svg-BSPzaCgF.js +1 -1
- package/dist/browser/chunks/basic-shape-primary-circle-ellipse-round.svg-DKmZ8UUU.js +1 -1
- package/dist/browser/chunks/basic-shape-primary-square-rectangle.svg-n2YRykHD.js +1 -1
- package/dist/browser/chunks/basic-shape-shield.svg-Bec9cJDA.js +1 -1
- package/dist/browser/chunks/browser-67K6wmG9.js +1 -1
- package/dist/browser/chunks/computer-device-desktop-monitor.svg-m6j893Hb.js +1 -1
- package/dist/browser/chunks/computer-device-desktop.svg-Dk1VVO7k.js +1 -1
- package/dist/browser/chunks/computer-device-laptop.svg-BNGVUCYS.js +1 -1
- package/dist/browser/chunks/computer-device-mobile-phone-android-samsung-back.svg-CC4UUTFw.js +1 -1
- package/dist/browser/chunks/computer-device-mobile-phone-android-samsung.svg-D8ExpMpL.js +1 -1
- package/dist/browser/chunks/computer-device-mobile-phone-iphone-x-back.svg-CLm7sgMM.js +1 -1
- package/dist/browser/chunks/computer-device-mobile-phone-iphone-x.svg-Xrttg6_7.js +1 -1
- package/dist/browser/chunks/computer-device-mobile-tablet-touch.svg-DQ2oTvOG.js +1 -1
- package/dist/browser/chunks/computer-device-mobile-tablet.svg-DCr0XlRc.js +1 -1
- package/dist/browser/chunks/computer-device-network-ethernet-cat6.svg-AK9l0iOl.js +1 -1
- package/dist/browser/chunks/computer-device-network-lan-www.svg-gUIdFBlE.js +1 -1
- package/dist/browser/chunks/computer-device-network-wifi-connection.svg-Be-EMm4e.js +1 -1
- package/dist/browser/chunks/computer-device-network-wifi-router.svg-Dc2VzyqK.js +1 -1
- package/dist/browser/chunks/ecology-science-erlenmeyer-flask.svg-DHgy7Jfd.js +1 -1
- package/dist/browser/chunks/image-flash-lightning.svg-EETR_y1q.js +1 -1
- package/dist/browser/chunks/image-picture-flower.svg-DN1AYzJU.js +1 -1
- package/dist/browser/chunks/interface-alert-exclamation-diamond.svg-C5NozMV_.js +1 -1
- package/dist/browser/chunks/interface-alert-exclamation-triangle-warning.svg-DaAg2fF5.js +1 -1
- package/dist/browser/chunks/interface-alert-information-circle.svg-ckkkt9Mv.js +1 -1
- package/dist/browser/chunks/interface-award-crown.svg-pjvn9hY-.js +1 -1
- package/dist/browser/chunks/interface-bookmark-tag.svg-r2r-lQq4.js +1 -1
- package/dist/browser/chunks/interface-bookmark.svg-BK9HKQBT.js +1 -1
- package/dist/browser/chunks/interface-calendar-date-one.svg-DNnF0M1I.js +1 -1
- package/dist/browser/chunks/interface-content-book-open-pages.svg-CQj_w9Vp.js +1 -1
- package/dist/browser/chunks/interface-content-book-page.svg-DppoeJRe.js +1 -1
- package/dist/browser/chunks/interface-content-file.svg-CvcD7OiY.js +1 -1
- package/dist/browser/chunks/interface-content-folder.svg-BmtS5I9A.js +1 -1
- package/dist/browser/chunks/interface-copy-clipboard.svg-Be6EI50X.js +1 -1
- package/dist/browser/chunks/interface-edit-attachment.svg-G5TKzpWX.js +1 -1
- package/dist/browser/chunks/interface-edit-binocular.svg-jzL-DvGB.js +1 -1
- package/dist/browser/chunks/interface-edit-magic-wand.svg-BOTlymvp.js +1 -1
- package/dist/browser/chunks/interface-edit-tool-paint-roller.svg-s9dwryx7.js +1 -1
- package/dist/browser/chunks/interface-edit-tool-pencil.svg-C7v0dbB3.js +1 -1
- package/dist/browser/chunks/interface-favorite-award.svg-CYHUgUG0.js +1 -1
- package/dist/browser/chunks/interface-favorite-flag.svg-C10zlKOb.js +1 -1
- package/dist/browser/chunks/interface-favorite-heart.svg-eoduXxlz.js +1 -1
- package/dist/browser/chunks/interface-favorite-star.svg-BSmxJetr.js +1 -1
- package/dist/browser/chunks/interface-favorite-stars-sparkles.svg-JTFLj3Ls.js +1 -1
- package/dist/browser/chunks/interface-hierarchy-flowchart.svg-Cg_Wy0kN.js +1 -1
- package/dist/browser/chunks/interface-home-house.svg-DytoGRnv.js +1 -1
- package/dist/browser/chunks/interface-hyperlink.svg-CuEfmmQI.js +1 -1
- package/dist/browser/chunks/interface-lighting-brightness.svg-DSK0h_Pa.js +1 -1
- package/dist/browser/chunks/interface-lock-closed.svg-Cn6TaLYv.js +1 -1
- package/dist/browser/chunks/interface-lock-open-unlock.svg-CVkG5-9W.js +1 -1
- package/dist/browser/chunks/interface-login-key.svg-y-cwwXjN.js +1 -1
- package/dist/browser/chunks/interface-search.svg-S-puVFJB.js +1 -1
- package/dist/browser/chunks/interface-setting-cog.svg-CTH4_lLg.js +1 -1
- package/dist/browser/chunks/interface-share-megaphone-bullhorn.svg-Pbp39MyC.js +1 -1
- package/dist/browser/chunks/interface-share-rocket.svg-BgCsIRZO.js +1 -1
- package/dist/browser/chunks/interface-share-satellite.svg-DAMN9d5G.js +1 -1
- package/dist/browser/chunks/interface-share-space-ship.svg-Dt-Mejxk.js +1 -1
- package/dist/browser/chunks/interface-share.svg-vFYTXSti.js +1 -1
- package/dist/browser/chunks/interface-signal-square.svg-DNG4LpAe.js +1 -1
- package/dist/browser/chunks/interface-time-clock-circle.svg-Bpz-nLxo.js +1 -1
- package/dist/browser/chunks/interface-time-hour-glass.svg-D7agfKsH.js +1 -1
- package/dist/browser/chunks/interface-users-multiple.svg-CkPJBBnG.js +1 -1
- package/dist/browser/chunks/interface-weather-moon.svg-CaTZFMPO.js +1 -1
- package/dist/browser/chunks/mail-chat-bubble-square.svg-DC8RIihp.js +1 -1
- package/dist/browser/chunks/mail-send-email-paper-airplane.svg-D8OLs9jz.js +1 -1
- package/dist/browser/chunks/mail-send-envelope.svg-CV33h5Sx.js +1 -1
- package/dist/browser/chunks/{modal-BVUfMpuv.js → modal-B8Opb61-.js} +2 -2
- package/dist/browser/chunks/modal-Dcl-Y2Zk.js +99 -0
- package/dist/browser/chunks/money-cashier-receipt.svg-CJL8C2gs.js +1 -1
- package/dist/browser/chunks/money-currency-dollar-pay.svg-VdBplCTx.js +1 -1
- package/dist/browser/chunks/money-graph-arrow-increase.svg-DcRov3zk.js +1 -1
- package/dist/browser/chunks/money-graph-bar-chart-increase.svg-Cc7KxjX-.js +1 -1
- package/dist/browser/chunks/nature-ecology-leaf.svg-DR3cTZxt.js +1 -1
- package/dist/browser/chunks/phone-telephone.svg-DyY0gUlk.js +1 -1
- package/dist/browser/chunks/programming-bug.svg-BHLT-Qhp.js +1 -1
- package/dist/browser/chunks/programming-cloud.svg-B6YW33ba.js +1 -1
- package/dist/browser/chunks/programming-computer-database-server.svg-B6o5Sdn-.js +1 -1
- package/dist/browser/chunks/programming-computer-database.svg-Cl7OVtpJ.js +1 -1
- package/dist/browser/chunks/programming-module-four-layout.svg-BQrerL1x.js +1 -1
- package/dist/browser/chunks/programming-module-three.svg-B2KTQzBM.js +1 -1
- package/dist/browser/chunks/programming-module.svg-CiID7kPm.js +1 -1
- package/dist/browser/chunks/programming-script-code.svg-D1M5rtkN.js +1 -1
- package/dist/browser/chunks/runtime-core.esm-bundler-Byrbbu5Q.js +1 -1
- package/dist/browser/chunks/shopping-cart.svg-BEegiIR9.js +1 -1
- package/dist/browser/chunks/shopping-gift-present.svg-BUHwuLix.js +1 -1
- package/dist/browser/chunks/shopping-shipping-box-parcel-package.svg-D6fxWdYx.js +1 -1
- package/dist/browser/chunks/tag-new-circle.svg-jsg1bGs0.js +1 -1
- package/dist/browser/chunks/travel-map-earth-globe.svg-ClbMiU-f.js +1 -1
- package/dist/browser/chunks/vendor-CBP43oHJ.js +306 -0
- package/dist/browser/standalone.esm.js +24 -24
- package/dist/browser/standalone.js +308 -308
- 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 +94 -19
- package/dist/components/ApiReference.vue.script.js.map +1 -1
- package/dist/components/Badge/Badge.vue.d.ts.map +1 -1
- package/dist/components/Badge/Badge.vue.js +1 -1
- package/dist/components/Badge/Badge.vue.js.map +1 -1
- package/dist/components/Badge/Badge.vue.script.js +8 -8
- package/dist/components/Badge/Badge.vue.script.js.map +1 -1
- package/dist/components/Content/AsyncApi/Operation.vue.d.ts.map +1 -1
- package/dist/components/Content/AsyncApi/Operation.vue.js +1 -1
- package/dist/components/Content/AsyncApi/Operation.vue.js.map +1 -1
- package/dist/components/Content/AsyncApi/Operation.vue.script.js +5 -0
- package/dist/components/Content/AsyncApi/Operation.vue.script.js.map +1 -1
- package/dist/components/Content/AsyncApi/helpers/get-async-api-required-security.d.ts +17 -0
- package/dist/components/Content/AsyncApi/helpers/get-async-api-required-security.d.ts.map +1 -0
- package/dist/components/Content/AsyncApi/helpers/get-async-api-required-security.js +21 -0
- package/dist/components/Content/AsyncApi/helpers/get-async-api-required-security.js.map +1 -0
- package/dist/components/Content/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 +68 -33
- package/dist/components/Content/Schema/SchemaComposition.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/SchemaEnums.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaEnums.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaEnums.vue.js.map +1 -1
- package/dist/components/Content/Schema/SchemaEnums.vue.script.js +15 -7
- package/dist/components/Content/Schema/SchemaEnums.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.script.js +30 -20
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/helpers/optimize-value-for-display.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/optimize-value-for-display.js +1 -4
- package/dist/components/Content/Schema/helpers/optimize-value-for-display.js.map +1 -1
- package/dist/components/Content/Schema/helpers/partition-all-of-compositions.d.ts +32 -0
- package/dist/components/Content/Schema/helpers/partition-all-of-compositions.d.ts.map +1 -0
- package/dist/components/Content/Schema/helpers/partition-all-of-compositions.js +97 -0
- package/dist/components/Content/Schema/helpers/partition-all-of-compositions.js.map +1 -0
- package/dist/components/LinkList/LinkList.vue.js +1 -1
- package/dist/components/LinkList/LinkList.vue.js.map +1 -1
- package/dist/components/LinkList/LinkList.vue.script.js +1 -1
- package/dist/components/LinkList/LinkList.vue.script.js.map +1 -1
- package/dist/components/Section/CompactSection.vue.d.ts.map +1 -1
- package/dist/components/Section/CompactSection.vue.js +1 -1
- package/dist/components/Section/CompactSection.vue.js.map +1 -1
- package/dist/components/Section/CompactSection.vue.script.js +21 -5
- package/dist/components/Section/CompactSection.vue.script.js.map +1 -1
- package/dist/components/Section/SectionHeader.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionHeader.vue.js +1 -1
- package/dist/components/Section/SectionHeader.vue.js.map +1 -1
- package/dist/components/Section/SectionHeader.vue.script.js +1 -1
- package/dist/components/Section/SectionHeader.vue.script.js.map +1 -1
- package/dist/features/Operation/Operation.vue.script.js +1 -1
- package/dist/features/Operation/components/OperationScopes.vue.d.ts +8 -0
- package/dist/features/Operation/components/OperationScopes.vue.d.ts.map +1 -0
- package/dist/features/Operation/components/OperationScopes.vue.js +7 -0
- package/dist/features/Operation/components/OperationScopes.vue.js.map +1 -0
- package/dist/features/Operation/components/OperationScopes.vue.script.js +60 -0
- package/dist/features/Operation/components/OperationScopes.vue.script.js.map +1 -0
- package/dist/features/Operation/components/SecurityRequirementBadge.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/SecurityRequirementBadge.vue.js.map +1 -1
- package/dist/features/Operation/components/SecurityRequirementBadge.vue.script.js +89 -16
- package/dist/features/Operation/components/SecurityRequirementBadge.vue.script.js.map +1 -1
- package/dist/features/Operation/helpers/get-required-security.d.ts +13 -0
- package/dist/features/Operation/helpers/get-required-security.d.ts.map +1 -1
- package/dist/features/Operation/helpers/get-required-security.js +22 -1
- package/dist/features/Operation/helpers/get-required-security.js.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.js +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.js.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.script.js +15 -6
- package/dist/features/Operation/layouts/ClassicLayout.vue.script.js.map +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.js +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.js.map +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.script.js +2 -0
- package/dist/features/Operation/layouts/ModernLayout.vue.script.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue.d.ts +2 -2
- package/dist/features/developer-tools/components/ApiReferenceToolbarPopover.vue.script.js +1 -1
- package/dist/features/external-docs/ExternalDocs.vue.d.ts.map +1 -1
- package/dist/features/external-docs/ExternalDocs.vue.js.map +1 -1
- package/dist/features/external-docs/ExternalDocs.vue.script.js +6 -6
- package/dist/features/external-docs/ExternalDocs.vue.script.js.map +1 -1
- package/dist/features/info-object/Contact.vue.d.ts.map +1 -1
- package/dist/features/info-object/Contact.vue.js.map +1 -1
- package/dist/features/info-object/Contact.vue.script.js +8 -8
- package/dist/features/info-object/Contact.vue.script.js.map +1 -1
- package/dist/features/info-object/InfoLink.vue.d.ts.map +1 -1
- package/dist/features/info-object/InfoLink.vue.js.map +1 -1
- package/dist/features/info-object/InfoLink.vue.script.js +6 -6
- package/dist/features/info-object/InfoLink.vue.script.js.map +1 -1
- package/dist/features/info-object/License.vue.d.ts.map +1 -1
- package/dist/features/info-object/License.vue.js.map +1 -1
- package/dist/features/info-object/License.vue.script.js +2 -2
- package/dist/features/info-object/License.vue.script.js.map +1 -1
- package/dist/features/info-object/TermsOfService.vue.d.ts.map +1 -1
- package/dist/features/info-object/TermsOfService.vue.js.map +1 -1
- package/dist/features/info-object/TermsOfService.vue.script.js +2 -2
- package/dist/features/info-object/TermsOfService.vue.script.js.map +1 -1
- package/dist/features/localization/locales/ar.d.ts +1 -0
- package/dist/features/localization/locales/ar.d.ts.map +1 -1
- package/dist/features/localization/locales/ar.js +2 -1
- package/dist/features/localization/locales/ar.js.map +1 -1
- package/dist/features/localization/locales/de.d.ts +1 -0
- package/dist/features/localization/locales/de.d.ts.map +1 -1
- package/dist/features/localization/locales/de.js +2 -1
- package/dist/features/localization/locales/de.js.map +1 -1
- package/dist/features/localization/locales/en.d.ts +1 -0
- package/dist/features/localization/locales/en.d.ts.map +1 -1
- package/dist/features/localization/locales/en.js +2 -1
- package/dist/features/localization/locales/en.js.map +1 -1
- package/dist/features/localization/locales/es.d.ts +1 -0
- package/dist/features/localization/locales/es.d.ts.map +1 -1
- package/dist/features/localization/locales/es.js +2 -1
- package/dist/features/localization/locales/es.js.map +1 -1
- package/dist/features/localization/locales/fr.d.ts +1 -0
- package/dist/features/localization/locales/fr.d.ts.map +1 -1
- package/dist/features/localization/locales/fr.js +2 -1
- package/dist/features/localization/locales/fr.js.map +1 -1
- package/dist/features/localization/locales/ru.d.ts +1 -0
- package/dist/features/localization/locales/ru.d.ts.map +1 -1
- package/dist/features/localization/locales/ru.js +2 -1
- package/dist/features/localization/locales/ru.js.map +1 -1
- package/dist/features/localization/locales/zh-cn.d.ts +1 -0
- package/dist/features/localization/locales/zh-cn.d.ts.map +1 -1
- package/dist/features/localization/locales/zh-cn.js +2 -1
- package/dist/features/localization/locales/zh-cn.js.map +1 -1
- package/dist/features/localization/translations.d.ts +7 -0
- package/dist/features/localization/translations.d.ts.map +1 -1
- package/dist/helpers/storage.d.ts +21 -2
- package/dist/helpers/storage.d.ts.map +1 -1
- package/dist/standalone/lib/html-api.d.ts.map +1 -1
- package/dist/standalone/lib/html-api.js +11 -4
- package/dist/standalone/lib/html-api.js.map +1 -1
- package/dist/standalone/lib/load-plugins-from-urls.d.ts +13 -0
- package/dist/standalone/lib/load-plugins-from-urls.d.ts.map +1 -0
- package/dist/standalone/lib/load-plugins-from-urls.js +60 -0
- package/dist/standalone/lib/load-plugins-from-urls.js.map +1 -0
- package/dist/style.css +389 -351
- package/dist/styles/print.css +118 -0
- package/dist/styles/tailwind.config.css +16 -0
- package/dist/vue-styles.css +198 -224
- package/package.json +15 -15
- package/dist/browser/chunks/AgentScalarChatInterface-YU9KKgvZ.js +0 -27
- package/dist/browser/chunks/ScalarTextInput.vue-B-Nhpn0q.js +0 -27
- package/dist/browser/chunks/modal-WJ4Gcv8N.js +0 -99
- package/dist/browser/chunks/vendor-BqFs9NIb.js +0 -306
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiReference.vue.script.js","names":["$attrs","$slots"],"sources":["../../src/components/ApiReference.vue"],"sourcesContent":["<script lang=\"ts\">\n/* global PACKAGE_VERSION */\n// Injected by Vite at build time (see vite.config.ts and vite.standalone.config.ts).\n// Read via process.env so the constant is replaced inline without pulling package.json\n// into the TypeScript program — that would expand rootDir and emit declarations under dist/src/.\nconst version = PACKAGE_VERSION\n\nif (version && typeof window !== 'undefined') {\n console.info(`@scalar/api-reference@${version}`)\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { provideUseId } from '@headlessui/vue'\nimport { OpenApiClientButton } from '@scalar/api-client/blocks/operation-block'\nimport type { ApiClientModal } from '@scalar/api-client/modal'\nimport {\n ScalarColorModeToggleButton,\n ScalarColorModeToggleIcon,\n} from '@scalar/components/color-mode-toggle'\nimport { addScalarClassesToHeadless } from '@scalar/components/helpers'\nimport {\n ScalarSidebarFooter,\n ScalarSidebarSection,\n} from '@scalar/components/sidebar'\nimport { toJsonCompatible } from '@scalar/helpers/object/to-json-compatible'\nimport { slugify } from '@scalar/helpers/string/slugify'\nimport { isLocalUrl } from '@scalar/helpers/url/is-local-url'\nimport { apiReferenceConfigurationSchema } from '@scalar/schemas/api-reference'\nimport {\n createSidebarState,\n ScalarSidebar,\n scrollSidebarToTop,\n} from '@scalar/sidebar'\nimport { getThemeStyles, hasObtrusiveScrollbars } from '@scalar/themes'\nimport {\n DEFAULT_MODELS_SECTION_LABEL,\n type AnyApiReferenceConfiguration,\n type ApiReferenceConfiguration,\n type ApiReferenceConfigurationRaw,\n} from '@scalar/types/api-reference'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\nimport { useColorMode } from '@scalar/use-hooks/useColorMode'\nimport { ScalarToasts } from '@scalar/use-toasts'\nimport { coerce } from '@scalar/validation'\nimport { getAsyncApiServers } from '@scalar/workspace-store/channel-example'\nimport { createWorkspaceStore } from '@scalar/workspace-store/client'\nimport { createWorkspaceEventBus } from '@scalar/workspace-store/events'\nimport {\n getActiveEnvironment,\n getServers,\n} from '@scalar/workspace-store/request-example'\nimport type {\n TraversedEntry,\n TraversedTag,\n} from '@scalar/workspace-store/schemas/navigation'\nimport {\n isAsyncApiDocument,\n isOpenApiDocument,\n} from '@scalar/workspace-store/schemas/type-guards'\nimport { useScrollLock } from '@vueuse/core'\nimport diff from 'microdiff'\nimport {\n computed,\n onBeforeMount,\n onBeforeUnmount,\n onMounted,\n onServerPrefetch,\n provide,\n ref,\n useId,\n useTemplateRef,\n watch,\n} from 'vue'\n\nimport {\n AsyncApiSidebarFilters,\n filterAsyncApiNavigation,\n} from '@/blocks/scalar-asyncapi-sidebar-filters-block'\nimport {\n AgentScalarButton,\n AgentScalarDrawer,\n OpenMCPButton,\n} from '@/components/AgentScalar'\nimport ClassicHeader from '@/components/ClassicHeader.vue'\nimport Content from '@/components/Content/Content.vue'\nimport MobileHeader from '@/components/MobileHeader.vue'\nimport { DeveloperTools } from '@/features/developer-tools'\nimport {\n provideLocalization,\n resolveLocalization,\n} from '@/features/localization'\nimport DocumentSelector from '@/features/multiple-documents/DocumentSelector.vue'\nimport SearchButton from '@/features/Search/components/SearchButton.vue'\nimport { getSystemModePreference } from '@/helpers/color-mode'\nimport { downloadDocument } from '@/helpers/download'\nimport {\n getIdFromUrl,\n makeUrlFromId,\n matchesBasePath,\n redirectUrl,\n} from '@/helpers/id-routing'\nimport {\n INTRODUCTION_ENTRY_ID_SUFFIX,\n isIntroductionEntry,\n} from '@/helpers/is-introduction-entry'\nimport {\n scrollToLazy as _scrollToLazy,\n addToPriorityQueue,\n blockIntersection,\n intersectionEnabled,\n} from '@/helpers/lazy-bus'\nimport {\n loadAuthFromStorage,\n loadClientFromStorage,\n} from '@/helpers/load-from-perssistance'\nimport { mapConfigPlugins } from '@/helpers/map-config-plugins'\nimport { mapConfigToWorkspaceStore } from '@/helpers/map-config-to-workspace-store'\nimport {\n normalizeConfigurations,\n type NormalizedConfiguration,\n} from '@/helpers/normalize-configurations'\nimport { safeDeepClone } from '@/helpers/safe-deep-clone'\nimport { AGENT_CONTEXT_SYMBOL, useAgent } from '@/hooks/use-agent'\nimport { useIntersection } from '@/hooks/use-intersection'\nimport { createPluginManager, PLUGIN_MANAGER_SYMBOL } from '@/plugins'\nimport { persistencePlugin } from '@/plugins/persistence-plugin'\n\nconst props = defineProps<{\n /**\n * Configuration for the API reference.\n * Can be a single configuration or an array of configurations for multiple documents.\n */\n configuration?: AnyApiReferenceConfiguration\n}>()\n\ndefineSlots<{\n 'content-start'?(): { breadcrumb: string }\n 'content-end'?(): { breadcrumb: string }\n 'sidebar-start'?(): { breadcrumb: string }\n 'sidebar-end'?(): { breadcrumb: string }\n 'editor-placeholder'?(): { breadcrumb: string }\n footer?(): { breadcrumb: string }\n}>()\n\nconst { copyToClipboard } = useClipboard()\n\n/**\n * Used to inject the environment into built packages\n *\n * Primary use case is the open-in-client button\n */\nconst isDevelopment = import.meta.env.DEV\n\n/**\n * Whether scrollbars take up screen real estate.\n *\n * This defaults to `false` so the first client render matches the server (where\n * there is no DOM to measure). The real value is resolved in `onMounted` to\n * avoid a hydration mismatch on the root class.\n */\nconst obtrusiveScrollbars = ref(false)\nonMounted(() => {\n obtrusiveScrollbars.value = hasObtrusiveScrollbars()\n})\n\nconst eventBus = createWorkspaceEventBus({ debug: isDevelopment })\nconst isSidebarOpen = ref(false)\n\n/**\n * Due to a bug in headless UI, we need to set an ID here that can be shared across server/client\n * TODO remove this once the bug is fixed\n *\n * @see https://github.com/tailwindlabs/headlessui/issues/2979\n */\nprovideUseId(() => useId())\n\n// ---------------------------------------------------------------------------\n/**\n * Configuration Handling\n *\n * We will normalize the configurations and store them in a computed property.\n * The active configuration will be associated with the active document.\n */\nconst configList = computed(() => normalizeConfigurations(props.configuration))\n\nconst isMultiDocument = computed(() => Object.keys(configList.value).length > 1)\n\n/** Search for the source with a default attribute or use the first one */\nconst activeSlug = ref<string>(\n Object.values(configList.value).find((c) => c.default)?.slug ??\n configList.value[Object.keys(configList.value)?.[0] ?? '']?.slug ??\n '',\n)\n\n/**\n * On initial page load we need to determine if there is a valid document slug in the URL\n *\n * If there is we set the active slug to the document slug\n */\nif (typeof window !== 'undefined') {\n const url = new URL(window.location.href)\n\n // To handle legacy query parameter multi-document support we redirect\n // to the new path routing format\n const apiParam = url.searchParams.get('api')\n if (apiParam && configList.value[apiParam]) {\n activeSlug.value = apiParam\n const idFromUrl = getIdFromUrl(\n url,\n configList.value[apiParam].config.pathRouting?.basePath,\n apiParam,\n )\n const newUrl = makeUrlFromId(\n idFromUrl,\n configList.value[apiParam].config.pathRouting?.basePath,\n isMultiDocument.value,\n )\n if (newUrl) {\n newUrl.searchParams.delete('api')\n window.history.replaceState({}, '', newUrl.toString())\n }\n }\n\n /**\n * For path routing on initial load we do not know which basePath to check for\n * we need to search the configs to see if any of the base paths match the URL\n * and then use that basePath to get the initial id\n *\n * With this approach we cannot support multi-document mode with one of configs having\n * an empty basePath\n *\n * Other conflicts are possible.\n */\n const basePaths = Object.values(configList.value).map(\n (c) => c.config.pathRouting?.basePath,\n )\n\n const initialId = getIdFromUrl(\n url,\n basePaths.find((p) => (p ? matchesBasePath(url, p) : false)),\n isMultiDocument.value ? undefined : activeSlug.value,\n )\n const documentSlug = initialId.split('/')[0]\n\n if (documentSlug && configList.value[documentSlug]) {\n activeSlug.value = documentSlug\n }\n}\n\n/** Computed document options list for the selector logic */\nconst documentOptionList = computed(() =>\n Object.values(configList.value).map((c) => ({\n label: c.title,\n id: c.slug,\n })),\n)\n\n/**\n * AsyncAPI sidebar filters (protocol + server).\n *\n * These mirror the document picker: stacked dropdowns at the top of the sidebar\n * that narrow the visible operations. State resets whenever the active document\n * changes so a filter never leaks across documents.\n */\nconst selectedProtocol = ref<string>('')\nconst selectedServer = ref<string>('')\n\n/** The active document, narrowed to AsyncAPI (or `null` for OpenAPI documents). */\nconst activeAsyncApiDocument = computed(() => {\n const document = workspaceStore.workspace.activeDocument\n return isAsyncApiDocument(document) ? document : null\n})\n\n// Reset the filters when switching documents.\nwatch(activeSlug, () => {\n selectedProtocol.value = ''\n selectedServer.value = ''\n})\n\n/** Configuration overrides to apply to the selected document (from the localhost toolbar) */\nconst configurationOverrides = ref<\n Partial<Omit<ApiReferenceConfiguration, 'slug' | 'title' | ''>>\n>({})\n\nconst withLocalizedConfigurationDefaults = (\n config: ApiReferenceConfiguration,\n activeConfig: Partial<ApiReferenceConfiguration> | undefined,\n): ApiReferenceConfiguration => {\n const localization = resolveLocalization(config.localization)\n const configuredModelsSectionLabel =\n configurationOverrides.value.modelsSectionLabel ??\n (activeConfig?.modelsSectionLabel !== DEFAULT_MODELS_SECTION_LABEL\n ? activeConfig?.modelsSectionLabel\n : undefined)\n\n return {\n ...config,\n modelsSectionLabel:\n configuredModelsSectionLabel ??\n localization.translations.models.label ??\n DEFAULT_MODELS_SECTION_LABEL,\n }\n}\n\n/** Any dev toolbar modifications are merged with the active configuration */\nconst mergedConfig = computed<ApiReferenceConfiguration>(() => {\n const activeConfig = configList.value[activeSlug.value]?.config\n const merged = {\n // Provides a default set of values when the lookup fails\n ...coerce(apiReferenceConfigurationSchema, {}),\n // The active configuration based on the slug\n ...activeConfig,\n // Any overrides from the localhost toolbar\n ...configurationOverrides.value,\n }\n\n return withLocalizedConfigurationDefaults(merged, activeConfig)\n})\n\nconst apiReferenceLocalization = provideLocalization(\n () => mergedConfig.value.localization,\n)\n\nconst sidebarOptions = computed(() => ({\n ...mergedConfig.value,\n labels: {\n closeGroup: apiReferenceLocalization.translate('navigation.closeGroup'),\n httpMethod: apiReferenceLocalization.translate('common.httpMethod'),\n openGroup: apiReferenceLocalization.translate('navigation.openGroup'),\n },\n}))\n\n/**\n * Locale string for the `lang` attribute. We normalize underscores to hyphens so values like\n * `es_MX` become valid BCP-47 language tags (`es-MX`).\n */\nconst documentLang = computed(() =>\n apiReferenceLocalization.locale.value.replace('_', '-'),\n)\n\n/** Convenience break out var to determine which routing mode we are using */\nconst basePath = computed(() => mergedConfig.value.pathRouting?.basePath)\n\nconst themeStyle = computed(() =>\n getThemeStyles(mergedConfig.value.theme, {\n fonts: mergedConfig.value.withDefaultFonts,\n }),\n)\n\n/**\n * Custom CSS plus the theme styles, injected into a single `<style>` tag.\n *\n * This is rendered with `v-html` so the CSS is emitted verbatim. Interpolating\n * it as text content makes Vue HTML-escape characters like `\"` into `"` on\n * the server while the client keeps `\"`, which both breaks the CSS and causes a\n * hydration mismatch.\n */\nconst styleContent = computed(\n () => `${mergedConfig.value.customCss ?? ''}\\n${themeStyle.value}`,\n)\n\n// ---------------------------------------------------------------------------\n/** Navigation State Handling */\n\n// Rewrite outdated `model/` and `models/` schema URLs to the current models\n// section slug so bookmarks from before the slug changed keep resolving.\nif (typeof window !== 'undefined') {\n const canonical = redirectUrl(\n window.location.href,\n slugify(\n mergedConfig.value.modelsSectionLabel ?? DEFAULT_MODELS_SECTION_LABEL,\n ),\n activeSlug.value,\n isMultiDocument.value,\n mergedConfig.value.pathRouting?.basePath,\n )\n if (canonical) {\n window.history.replaceState({}, '', canonical.toString())\n }\n}\n\n// Front-end redirect\nif (mergedConfig.value.redirect && typeof window !== 'undefined') {\n const newPath = mergedConfig.value.redirect(\n (mergedConfig.value.pathRouting ? window.location.pathname : '') +\n window.location.hash,\n )\n if (newPath) {\n window.history.replaceState({}, '', newPath)\n }\n}\n\n/**\n * Sets the active slug and updates the URL with the selected document slug\n *\n * If an element ID is passed in we will configure the path or hash routing\n */\nfunction syncSlugAndUrlWithDocument(\n slug: string,\n elementId: string | undefined,\n config: ApiReferenceConfigurationRaw,\n) {\n // We create a new URL and go to the root element if an ID is not provided\n const url = makeUrlFromId(\n elementId || slug,\n config.pathRouting?.basePath,\n isMultiDocument.value,\n )\n\n if (url) {\n window.history.replaceState({}, '', url.toString())\n }\n\n // Update the active slug\n activeSlug.value = slug\n}\n\n// ---------------------------------------------------------------------------\n/** Workspace Store Initialization */\n\n/**\n * Initializes the new client workspace store.\n */\nconst workspaceStore = createWorkspaceStore({\n verbose: isDevelopment,\n})\n\n/**\n * We need to keep the client store separate from the workspace store\n * This is because we want the client store to be a playground where users can test out their requests without affecting the references store\n */\nconst clientStore = createWorkspaceStore({\n verbose: isDevelopment,\n plugins: [\n persistencePlugin({\n persistAuth: () => mergedConfig.value.persistAuth ?? false,\n }),\n ],\n})\n\n/**\n * Plugin injection is not reactive. All plugins must be provided at first render.\n *\n * Created after the client store so the auth accessor below can read from it — plugin `onInit`\n * hooks may call `auth` synchronously during `notifyInit`. The reference-side Authentication panel\n * (Content → Auth.vue) persists credentials into `clientStore.auth`, so plugins must read the same\n * store to see what the user entered.\n */\nconst pluginManager = createPluginManager({\n plugins: Object.values(configList.value).flatMap(\n (c) => c.config.plugins ?? [],\n ),\n /**\n * Read-only view of the global authentication state, so plugins can read stored secrets and\n * the selected security schemes without being able to mutate them. Wraps the client store's\n * auth methods (rather than passing the store directly) to keep the setters out of the plugin API.\n *\n * The getters return a deep copy (`export` already snapshots internally, the others go through\n * `toJsonCompatible`) so plugins receive plain data rather than the store's live reactive proxies —\n * mutating what they get back can never leak into the store.\n */\n auth: {\n export: () => clientStore.auth.export(),\n getAuthSecrets: (documentName, schemeName) =>\n toJsonCompatible(\n clientStore.auth.getAuthSecrets(documentName, schemeName),\n ),\n getAuthSelectedSchemas: (payload) =>\n toJsonCompatible(clientStore.auth.getAuthSelectedSchemas(payload)),\n },\n})\nprovide(PLUGIN_MANAGER_SYMBOL, pluginManager)\n\npluginManager.notifyInit(mergedConfig.value)\n\nwatch(mergedConfig, (config) => pluginManager.notifyConfigChange(config))\n\n// TODO: persistence should be hoisted into standalone\n// Client side integrations will want to handle dark mode externally\nconst { toggleColorMode, isDarkMode } = useColorMode({\n initialColorMode: {\n true: 'dark' as const,\n false: 'light' as const,\n undefined: 'system' as const,\n }[String(mergedConfig.value.darkMode)],\n overrideColorMode: mergedConfig.value.forceDarkModeState,\n})\n\n/**\n * The active document passed to the search modal. Both OpenAPI and AsyncAPI\n * documents are surfaced so the search index can pick up info.description\n * headings from either spec; AsyncAPI-specific entries (channels, operations,\n * messages) are not indexed yet.\n */\nconst activeSearchableDocument = computed(\n () => workspaceStore.workspace.activeDocument,\n)\n\n/**\n * Sidebar entries contributed by plugin views (content.start / content.end).\n *\n * Each entry reuses the same id as the rendered plugin component, so the existing\n * navigation and scroll-spy logic can scroll to and highlight it. Plugins are static for\n * the lifetime of the manager, so this only needs to be resolved once.\n */\nconst pluginSidebarEntries = computed(() =>\n pluginManager\n .getSidebarEntries(activeSlug.value)\n .reduce<Record<'content.start' | 'content.end', TraversedEntry[]>>(\n (grouped, entry) => {\n grouped[entry.viewName].push({\n id: entry.id,\n title: entry.label,\n type: 'text',\n })\n return grouped\n },\n { 'content.start': [], 'content.end': [] },\n ),\n)\n\n/**\n * Localize the synthetic labels we generate for the sidebar (introduction, webhooks, and the models\n * section). Entries are only cloned when a label actually changes, so the common English-default case\n * does not allocate a new navigation tree on every recompute.\n */\nconst localizeNavigationEntries = (\n entries: TraversedEntry[],\n): TraversedEntry[] => {\n const introductionTitle = apiReferenceLocalization.translate(\n 'navigation.introduction',\n )\n const webhooksTitle = apiReferenceLocalization.translate(\n 'navigation.webhooks',\n )\n const modelsSectionLabel =\n mergedConfig.value.modelsSectionLabel ?? DEFAULT_MODELS_SECTION_LABEL\n\n const localize = (list: TraversedEntry[]): TraversedEntry[] => {\n let changed = false\n\n const result = list.map((entry) => {\n let localized = entry\n\n if (isIntroductionEntry(entry) && entry.title !== introductionTitle) {\n localized = { ...entry, title: introductionTitle } as TraversedEntry\n } else if (\n entry.type === 'tag' &&\n entry.isWebhooks === true &&\n (entry.title !== webhooksTitle || entry.name !== webhooksTitle)\n ) {\n localized = {\n ...entry,\n title: webhooksTitle,\n name: webhooksTitle,\n } as TraversedEntry\n } else if (\n entry.type === 'models' &&\n (entry.title !== modelsSectionLabel ||\n entry.name !== modelsSectionLabel)\n ) {\n localized = {\n ...entry,\n title: modelsSectionLabel,\n name: modelsSectionLabel,\n } as TraversedEntry\n }\n\n if ('children' in entry && entry.children) {\n const localizedChildren = localize(entry.children)\n\n if (localizedChildren !== entry.children) {\n localized =\n localized === entry ? ({ ...entry } as TraversedEntry) : localized\n ;(localized as { children?: TraversedEntry[] }).children =\n localizedChildren\n }\n }\n\n if (localized !== entry) {\n changed = true\n }\n\n return localized\n })\n\n // Preserve the original reference when nothing changed to avoid downstream re-renders.\n return changed ? result : list\n }\n\n return localize(entries)\n}\n\n/**\n * Create top level sidebar entries for each document\n * This allows sharing a single sidebar state for across the workspace\n */\nconst itemsFromWorkspace = computed<TraversedEntry[]>(() => {\n return Object.entries(workspaceStore.workspace.documents).map(\n ([slug, document]) => {\n // Both OpenAPI and AsyncAPI documents carry an `x-scalar-navigation` tree.\n const children = document['x-scalar-navigation']?.children ?? []\n\n // Plugin views render once for the active document, so only surface their sidebar\n // entries there. `content.start` sits above the Introduction, `content.end` below.\n const childrenWithPlugins =\n slug === activeSlug.value\n ? [\n ...pluginSidebarEntries.value['content.start'],\n ...localizeNavigationEntries(children),\n ...pluginSidebarEntries.value['content.end'],\n ]\n : localizeNavigationEntries(children)\n\n return {\n id: slug,\n type: 'document',\n description: document.info.description,\n name: document.info.title ?? slug,\n title: document.info.title ?? slug,\n children: childrenWithPlugins,\n }\n },\n )\n})\n\n/** Initialize the sidebar */\nconst sidebarState = createSidebarState<TraversedEntry>(itemsFromWorkspace, {\n hooks: {},\n})\n\n/** Recursively set all children of the given items to open */\nconst setChildrenOpen = (items: TraversedEntry[]): void => {\n items.forEach((item) => {\n if (item.type === 'tag' || item.type === 'models') {\n sidebarState.setExpanded(item.id, true)\n }\n if ('children' in item && item.children) {\n setChildrenOpen(item.children)\n }\n })\n}\n\n/** We get the sub items for the sidebar based on the configuration/document slug */\nconst sidebarItems = computed<TraversedEntry[]>(() => {\n const config = mergedConfig.value\n\n if (!config) {\n return []\n }\n\n const rawDocItems =\n sidebarState.items.value.find(\n (item): item is TraversedTag => item.id === activeSlug.value,\n )?.children ?? []\n\n // Apply the AsyncAPI protocol/server filters to the sidebar tree. This is a no-op\n // for OpenAPI documents and when no filter is selected.\n const docItems = activeAsyncApiDocument.value\n ? filterAsyncApiNavigation(rawDocItems, activeAsyncApiDocument.value, {\n protocol: selectedProtocol.value,\n server: selectedServer.value,\n })\n : rawDocItems\n\n // When the default open all tags configuration is enabled we open all the children of the document\n if (config.defaultOpenAllTags) {\n setChildrenOpen(docItems)\n }\n\n // When the expand all model sections configuration is enabled we open all the children of the models tag\n if (config.expandAllModelSections) {\n const models = docItems.find(\n (item): item is TraversedTag => item.type === 'models',\n )\n if (models) {\n sidebarState.setExpanded(models.id, true)\n models.children?.forEach((child) => {\n sidebarState.setExpanded(child.id, true)\n })\n }\n }\n\n return docItems\n})\n\n/** Find the sidebar entry that represents the introduction section */\nconst infoSectionId = computed(\n () =>\n sidebarItems.value.find(isIntroductionEntry)?.id ??\n `${activeSlug.value}${INTRODUCTION_ENTRY_ID_SUFFIX}`,\n)\n\n/** User for mobile navigation */\nconst breadcrumb = ref('')\n\nconst slotProps = computed(() => ({\n breadcrumb: breadcrumb.value,\n}))\n\nconst setBreadcrumb = (id: string) => {\n const item = sidebarState.getEntryById(id)\n\n if (!item || item.type === 'document') {\n breadcrumb.value = ''\n } else {\n breadcrumb.value = item.title\n }\n}\n\nconst scrollToLazyElement = (id: string) => {\n setBreadcrumb(id)\n sidebarState.setSelected(id)\n _scrollToLazy(id, sidebarState.setExpanded, sidebarState.getEntryById)\n}\n\n/**\n * Updates the browser tab title via the user-provided `setPageTitle` callback.\n *\n * Called whenever the section in view changes — on sidebar clicks, on scroll, and\n * when switching documents — so the tab title always reflects what the reader sees.\n */\nconst updatePageTitle = (id: string) => {\n const setPageTitle = mergedConfig.value?.setPageTitle\n const entry = sidebarState.getEntryById(id)\n\n if (!setPageTitle || typeof document === 'undefined' || !entry?.title) {\n return\n }\n\n const activeDocument = workspaceStore.workspace.activeDocument\n\n document.title = setPageTitle({\n title: entry.title,\n document: {\n title: activeDocument?.info?.title ?? activeSlug.value,\n slug: activeSlug.value,\n },\n })\n}\n\n/** Maps some config values to the workspace store to keep it reactive */\nmapConfigToWorkspaceStore({\n config: () => mergedConfig.value,\n store: workspaceStore,\n isDarkMode,\n})\n\nmapConfigToWorkspaceStore({\n config: () => mergedConfig.value,\n store: clientStore,\n isDarkMode,\n})\n\n/** Merged environment variables from workspace and document levels */\nconst environment = computed(\n () =>\n getActiveEnvironment(\n workspaceStore,\n workspaceStore.workspace.activeDocument ?? null,\n ).environment,\n)\n\nif (typeof window !== 'undefined') {\n // @ts-expect-error - For debugging purposes expose the store\n window.dataDumpWorkspace = () => workspaceStore\n}\n\n// For testing\ndefineExpose({\n eventBus,\n workspaceStore,\n sidebarItems,\n})\n\n/**\n * Computes a mapping from model names to their sidebar entry IDs.\n * This is used for quick lookups and navigation within the sidebar.\n */\nconst modelsIndex = computed(() => {\n return sidebarItems.value\n .filter((item) => item.type === 'models')\n .flatMap((item) => item.children ?? [])\n .filter((item) => item.type === 'model')\n .reduce(\n (acc, item) => {\n acc[item.name] = item.id\n return acc\n },\n {} as Record<string, string>,\n )\n})\n\neventBus.on('scroll-to:model-by-name', ({ name }) => {\n /** Find the model in the models index */\n const model = modelsIndex.value[name]\n\n if (model) {\n scrollToLazyElement(model)\n }\n})\n\nconst addDocument: typeof workspaceStore.addDocument = async (\n input,\n navigationOptions,\n) => {\n const result = await workspaceStore.addDocument(input, navigationOptions)\n // Now add it to the client store\n const state = workspaceStore.exportWorkspace()\n clientStore.loadWorkspace({\n auth: {},\n documents: {\n [input.name]: safeDeepClone(state.documents[input.name]) ?? {\n 'openapi': '3.1.0',\n 'info': {\n title: '',\n version: '',\n },\n 'x-scalar-original-document-hash': '',\n },\n },\n intermediateDocuments: {},\n originalDocuments: {},\n overrides: {},\n history: {},\n meta: {},\n })\n return result\n}\n\n// ---------------------------------------------------------------------------\n// Document Management\n\n/**\n * Handle changing the active document\n *\n * 1. If the document has not be loaded to the workspace store we set it to empty and asynchronously load it\n * 2. If the document has been loaded to the workspace store we just set it to active\n * 3. If the content from the configuration has changes we need to update the document in the workspace store\n */\nconst changeSelectedDocument = async (\n slug: string,\n elementId?: string | undefined,\n) => {\n const normalized = configList.value[slug]\n\n if (!normalized) {\n console.warn(`Document ${slug} not found in configList`)\n return\n }\n\n const config = withLocalizedConfigurationDefaults(\n {\n ...normalized.config,\n ...configurationOverrides.value,\n },\n normalized.config,\n )\n\n // Store `onDocumentSelect` result to await its execution later, before calling `onLoaded`\n const onDocumentSelectPromise = config.onDocumentSelect?.()\n\n // Set the active slug and update any routing\n syncSlugAndUrlWithDocument(slug, elementId, config)\n\n // Update the document on the route as well, the method and path don't matter as we update them before opening\n apiClient.value?.route({\n documentSlug: slug,\n method: 'get',\n path: '/',\n })\n\n const isFirstLoad = !workspaceStore.workspace.documents[slug]\n\n // If the document is not in the store, we asynchronously load it\n if (isFirstLoad) {\n const result = await addDocument(\n normalized.source.url\n ? {\n name: slug,\n url: normalized.source.url,\n fetch: config.customFetch,\n }\n : {\n name: slug,\n document: normalized.source.content ?? {},\n },\n config,\n )\n\n const document = clientStore.workspace.documents[slug]\n\n // If the document does not have a selected server we set it to the first server\n if (\n result === true &&\n isOpenApiDocument(document) &&\n document['x-scalar-selected-server'] === undefined\n ) {\n // Set the active server if the document is loaded successfully\n const servers = getServers(\n normalized.config.servers ?? document.servers,\n {\n baseServerUrl: mergedConfig.value.baseServerURL,\n documentUrl: normalized.source.url,\n },\n )\n if (servers.length > 0) {\n clientStore.updateDocument(\n slug,\n 'x-scalar-selected-server',\n servers[0]!.url,\n )\n }\n }\n }\n\n // Always set it to active; if the document is null we show a loading state\n workspaceStore.update('x-scalar-active-document', slug)\n clientStore.update('x-scalar-active-document', slug)\n\n // If the document has persistence enabled we load the auth schemes from storage\n if (config.persistAuth) {\n loadAuthFromStorage(clientStore, slug)\n }\n\n // ensure that `onLoaded` hook doesn't block execution but is executed after `onDocumentSelect`\n void (async () => {\n await onDocumentSelectPromise\n void config.onLoaded?.(slug)\n })()\n\n // When loading to a specified element we need to freeze and scroll\n if (elementId && elementId !== slug) {\n scrollToLazyElement(elementId)\n }\n // If there is no child element of the document specified and defaultOpenFirstTag is enabled, we expand the first tag\n else if (config.defaultOpenFirstTag) {\n const firstTag = sidebarItems.value.find((item) => item.type === 'tag')\n if (firstTag) {\n sidebarState.setExpanded(firstTag.id, true)\n }\n }\n\n // Reflect the freshly selected document in the browser tab title\n updatePageTitle(elementId && elementId !== slug ? elementId : slug)\n}\n\n/**\n * TODO:Move this to a dedicated updateDocument function in the future and\n * away from vue-reactivity based updates\n */\nwatch(\n () => Object.values(configList.value),\n async (newConfigList, oldConfigList) => {\n /**\n * Handles replacing and updating documents within the workspace store\n * when we detect configuration changes.\n */\n const updateSource = async (\n updated: NormalizedConfiguration,\n previous: NormalizedConfiguration | undefined,\n ) => {\n const config = withLocalizedConfigurationDefaults(\n {\n ...updated.config,\n ...configurationOverrides.value,\n },\n updated.config,\n )\n\n /** If we have not loaded the document previously we don't need to handle any updates to store */\n if (!workspaceStore.workspace.documents[updated.slug]) {\n return\n }\n /** If the URL has changed we fetch and rebase */\n if (updated.source.url && updated.source.url !== previous?.source.url) {\n await addDocument(\n {\n name: updated.slug,\n url: updated.source.url,\n fetch: config.customFetch,\n },\n config,\n )\n\n return\n }\n\n // If the was not a URL change then we require a document to continue\n if (!updated.source.content) {\n return\n }\n\n /**\n * We need to deeply check for document changes. Parse documents and then only rebase\n * if we detect deep changes in the two sources\n */\n if (\n diff(\n updated.source.content,\n previous && 'content' in previous.source\n ? (previous.source.content ?? {})\n : {},\n ).length\n ) {\n await addDocument(\n {\n name: updated.slug,\n document: updated.source.content,\n },\n config,\n )\n }\n }\n\n newConfigList.forEach((newConfig, index) =>\n updateSource(newConfig, oldConfigList[index]),\n )\n\n const newSlugs = newConfigList.map((c) => c.slug)\n const oldSlugs = oldConfigList.map((c) => c.slug)\n\n // If the slugs have changed, we need to update the active document and the URL query param\n if (\n newSlugs.length !== oldSlugs.length ||\n !newSlugs.every((slug, index) => slug === oldSlugs[index])\n ) {\n await changeSelectedDocument(newSlugs[0] ?? '')\n }\n },\n {\n deep: true,\n },\n)\n\n/** Preload the first document during SSR */\nonServerPrefetch(() => changeSelectedDocument(activeSlug.value))\n\n/** Load the first document on page load */\nonBeforeMount(async () => {\n // We read the client from the client store so we need to set it to the client store\n loadClientFromStorage(clientStore)\n\n await changeSelectedDocument(\n activeSlug.value,\n getIdFromUrl(\n window.location.href,\n configList.value[activeSlug.value]?.config.pathRouting?.basePath,\n isMultiDocument.value ? undefined : activeSlug.value,\n ),\n )\n})\n\nconst documentUrl = computed(() => {\n return configList.value[activeSlug.value]?.source?.url\n})\n\n// --------------------------------------------------------------------------- */\n// Agent Scalar\n\n/**\n * Determines if Agent Scalar should be enabled based on the configuration and the current URL\n *\n * - If the agent is disabled in the configuration, it should not be enabled\n * - If the current URL is a local URL, it should be enabled\n * - If the agent key is set, it should be enabled\n */\nconst agent = useAgent({\n agentEnabled: computed(() => {\n const currentConfiguration = configList.value[activeSlug.value]\n\n if (currentConfiguration?.agent?.disabled) {\n return false\n }\n\n if (typeof window !== 'undefined' && isLocalUrl(window.location.href)) {\n return true\n }\n\n return Boolean(configList.value[activeSlug.value]?.agent?.key)\n }),\n})\nprovide(AGENT_CONTEXT_SYMBOL, agent)\n\n// --------------------------------------------------------------------------- */\n// Api Client Modal\n\n// Setup the ApiClient on mount.\n// The modal is dynamic-imported so its dependency graph (CodeMirror, the request\n// editor, the response viewer, etc.) becomes a separate chunk that loads\n// asynchronously after the API reference paints.\nconst modal = useTemplateRef<HTMLElement>('modal')\nconst apiClient = ref<ApiClientModal | null>(null)\nonMounted(async () => {\n if (!modal.value) {\n return\n }\n\n const { createApiClientModal } = await import('@scalar/api-client/modal')\n\n // Bail if the component unmounted while the chunk was loading.\n if (!modal.value) {\n return\n }\n\n apiClient.value = createApiClientModal({\n el: modal.value,\n eventBus,\n workspaceStore: clientStore,\n options: mergedConfig,\n plugins: [\n ...pluginManager.getApiClientPlugins(),\n ...mapConfigPlugins(mergedConfig, environment),\n ],\n })\n})\nonBeforeUnmount(() => {\n pluginManager.notifyDestroy()\n apiClient.value?.app.unmount()\n})\n\n// ---------------------------------------------------------------------------\n// Top level event handlers and user specified callbacks\n\n/** Ensure we call the onServerChange callback */\neventBus.on('server:update:selected', ({ url }) =>\n mergedConfig.value.onServerChange?.(url),\n)\n\n/**\n * AsyncAPI servers are keyed by name, so resolve the selected name to its\n * constructed connection URL before firing onServerChange, keeping the callback\n * payload consistent with OpenAPI (a URL string).\n */\neventBus.on('asyncapi-server:update:selected', ({ name }) => {\n const document = clientStore.workspace.activeDocument\n if (!isAsyncApiDocument(document)) {\n return\n }\n\n const server = getAsyncApiServers(document, { webSocketOnly: false }).find(\n (s) => s.name === name,\n )\n mergedConfig.value.onServerChange?.(server?.url ?? name)\n})\n\n/** Download the document from the store */\neventBus.on('ui:download:document', ({ format }) => {\n const document = workspaceStore.exportActiveDocument(format)\n\n if (!document) {\n console.error('No document found to download')\n return\n }\n\n void downloadDocument(document, activeSlug.value ?? 'openapi', format)\n})\n\n// ---------------------------------------------------------------------------\n// Local event and scroll handling\n\n/**\n * Handler for a direct navigation event such as a sidebar or search click\n *\n * Depending on the item type we handle a selection event differently:\n *\n * - Tag: If a tag is closed we open it and all its parents and scroll to it\n * If a tag is open we just close the tag\n * - Operation:\n * Open all parents and scroll to the operation\n */\nconst handleSelectSidebarEntry = (id: string, caller?: 'sidebar') => {\n const item = sidebarState.getEntryById(id)\n\n updatePageTitle(id)\n\n if (\n (item?.type === 'tag' ||\n item?.type === 'models' ||\n item?.type === 'text') &&\n sidebarState.isExpanded(id) && // Only close if the item is expanded\n sidebarState.selectedItem.value === id // Only close if the item is not the currently selected item\n ) {\n // hack until we fix intersection logic\n const unblock = blockIntersection()\n\n sidebarState.setExpanded(id, false)\n\n unblock()\n\n return\n }\n\n // Close the mobile menu upon selecting any item that's not a tag or model\n if (item?.type !== 'tag' && item?.type !== 'models') {\n isSidebarOpen.value = false\n }\n\n scrollToLazyElement(id)\n\n const url = makeUrlFromId(id, basePath.value, isMultiDocument.value)\n if (url) {\n window.history.pushState({}, '', url)\n\n // Trigger the onSidebarClick callback if the caller is sidebar\n if (caller === 'sidebar') {\n mergedConfig.value.onSidebarClick?.(url.toString())\n }\n }\n\n if (agent.showAgent.value) {\n agent.closeAgent()\n }\n}\n\n/** Handle a navigation item selection event */\neventBus.on('select:nav-item', ({ id }) => handleSelectSidebarEntry(id))\n\n/** Handle a scroll to navigation item event */\neventBus.on('scroll-to:nav-item', ({ id }) => handleSelectSidebarEntry(id))\n\n/** Handle an intersecting navigation item event */\neventBus.on('intersecting:nav-item', ({ id }) => {\n if (!intersectionEnabled.value) {\n return\n }\n\n sidebarState.setSelected(id)\n setBreadcrumb(id)\n\n // Keep the browser tab title in sync with the section scrolled into view\n updatePageTitle(id)\n\n // Scroll the sidebar to keep the selected element near the top\n scrollSidebarToTop(id)\n\n const url = makeUrlFromId(id, basePath.value, isMultiDocument.value)\n if (url && workspaceStore.workspace.activeDocument) {\n window.history.replaceState({}, '', url.toString())\n }\n})\n\neventBus.on('toggle:nav-item', ({ id, open }) => {\n if (open) {\n mergedConfig.value.onShowMore?.(id)\n\n // Pre-queue first child so it renders immediately when the tag expands\n const entry = sidebarState.getEntryById(id)\n if (entry && 'children' in entry && entry.children) {\n const first = entry.children[0]\n\n if (first) {\n addToPriorityQueue(first.id)\n }\n }\n }\n sidebarState.setExpanded(id, open ?? !sidebarState.isExpanded(id))\n})\n\neventBus.on('copy-url:nav-item', ({ id }) => {\n const url = makeUrlFromId(\n id,\n basePath.value,\n isMultiDocument.value,\n )?.toString()\n return url && copyToClipboard(url)\n})\n\n// ---------------------------------------------------------------------------\n// History and scroll restoration\n\nonBeforeMount(() => {\n window.history.scrollRestoration = 'manual'\n // Ensure we add our scalar wrapper class to the headless ui root, mounted is too late\n addScalarClassesToHeadless()\n\n // When we detect a back button press we scroll to the new id\n window.addEventListener('popstate', () => {\n const id = getIdFromUrl(\n window.location.href,\n mergedConfig.value.pathRouting?.basePath,\n isMultiDocument.value ? undefined : activeSlug.value,\n )\n if (id) {\n scrollToLazyElement(id)\n }\n })\n})\n\n// ---------------------------------------------------------------------------\n// Document start intersection observer\n\nconst documentStartRef = useTemplateRef<HTMLElement>('documentStartRef')\n\n/**\n * Uses `immediate` so the sentinel fires as soon as it enters the viewport (not just at the center strip).\n * When the user scrolls away from the top, both this observer and the first section's center-strip\n * observer are intersecting simultaneously, so the section observer does not re-fire on its own.\n * The `onExit` callback bridges that gap by finding whichever section is at the viewport center\n * and re-emitting the nav event for it.\n *\n * We emit the Introduction entry rather than the document slug so this sentinel and the Introduction\n * section's own intersection observer resolve to the same entry. Otherwise the two race at the top of\n * the document and the tab title flickers between the section title and the document title.\n */\nuseIntersection(\n documentStartRef,\n () => {\n eventBus.emit('intersecting:nav-item', { id: infoSectionId.value })\n },\n {\n onExit: () => {\n const centerY = window.innerHeight / 2\n const section = document\n .elementsFromPoint(window.innerWidth / 2, centerY)\n .find((el) => el.tagName === 'SECTION' && el.id)\n\n if (section?.id) {\n eventBus.emit('intersecting:nav-item', { id: section.id })\n }\n },\n immediate: true,\n },\n)\n\nconst colorMode = computed(() => {\n const mode = workspaceStore.workspace['x-scalar-color-mode']\n\n if (mode === 'system') {\n return getSystemModePreference()\n }\n\n return mode\n})\n\nconst bodyScrollLocked = useScrollLock(\n typeof document !== 'undefined' ? document.body : null,\n)\n\nwatch(agent.showAgent, () => (bodyScrollLocked.value = agent.showAgent.value))\n\nconst showMCPButton = computed(() => {\n if (mergedConfig.value.mcp?.disabled) {\n return false\n }\n\n if (typeof window !== 'undefined' && isLocalUrl(window.location.href)) {\n return true\n }\n\n if (mergedConfig.value.mcp) {\n return true\n }\n\n return false\n})\n</script>\n\n<template>\n <!-- SingleApiReference -->\n <div>\n <!-- Inject any custom CSS directly into a style tag -->\n <!-- eslint-disable vue/no-v-text-v-html-on-component -->\n <component\n :is=\"'style'\"\n v-html=\"styleContent\" />\n <!-- eslint-enable vue/no-v-text-v-html-on-component -->\n <div\n ref=\"documentEl\"\n class=\"scalar-app scalar-api-reference references-layout\"\n :class=\"[\n {\n 'scalar-api-references-standalone-mobile': mergedConfig.showSidebar,\n 'scalar-scrollbars-obtrusive': obtrusiveScrollbars,\n 'references-editable': mergedConfig.isEditable,\n 'references-sidebar': mergedConfig.showSidebar,\n 'references-sidebar-mobile-open': isSidebarOpen,\n 'references-classic': mergedConfig.layout === 'classic',\n },\n $attrs.class,\n ]\"\n :dir=\"apiReferenceLocalization.direction.value\"\n :lang=\"documentLang\">\n <!-- Agent Scalar -->\n <AgentScalarDrawer\n v-if=\"agent.agentEnabled.value\"\n :agentScalarConfiguration=\"configList[activeSlug]?.agent\"\n :externalUrls=\"mergedConfig.externalUrls\"\n :workspaceStore />\n\n <!-- Mobile Header and Sidebar when in modern layout -->\n\n <MobileHeader\n v-if=\"mergedConfig.layout === 'modern'\"\n :breadcrumb=\"breadcrumb\"\n :isSidebarOpen=\"isSidebarOpen\"\n :showSidebar=\"mergedConfig.showSidebar\"\n @toggleSidebar=\"() => (isSidebarOpen = !isSidebarOpen)\">\n <template #search>\n <SearchButton\n v-if=\"!mergedConfig.hideSearch\"\n class=\"my-2\"\n :document=\"activeSearchableDocument\"\n :eventBus=\"eventBus\"\n :hideModels=\"mergedConfig.hideModels\"\n :modelsSectionLabel=\"mergedConfig.modelsSectionLabel\"\n :searchHotKey=\"mergedConfig.searchHotKey\"\n :showSidebar=\"mergedConfig.showSidebar\" />\n </template>\n <template #sidebar=\"{ sidebarClasses }\">\n <ScalarSidebar\n v-if=\"mergedConfig.showSidebar && mergedConfig.layout === 'modern'\"\n :aria-label=\"\n apiReferenceLocalization.translate('navigation.sidebarFor', {\n name:\n workspaceStore.workspace.activeDocument?.info?.title ?? '',\n })\n \"\n class=\"t-doc__sidebar\"\n :class=\"sidebarClasses\"\n :isExpanded=\"sidebarState.isExpanded\"\n :isSelected=\"sidebarState.isSelected\"\n :items=\"sidebarItems\"\n layout=\"reference\"\n :options=\"sidebarOptions\"\n role=\"navigation\"\n @selectItem=\"(id) => handleSelectSidebarEntry(id, 'sidebar')\"\n @toggleGroup=\"\n (id: string) =>\n sidebarState.setExpanded(id, !sidebarState.isExpanded(id))\n \">\n <template #header>\n <!-- Wrap in a div when slot is filled -->\n <DocumentSelector\n v-if=\"documentOptionList.length > 1\"\n :modelValue=\"activeSlug\"\n :options=\"documentOptionList\"\n @update:modelValue=\"changeSelectedDocument\" />\n\n <!-- Search -->\n <div\n v-if=\"!mergedConfig.hideSearch\"\n class=\"flex gap-1.5 px-3 pt-3\">\n <SearchButton\n :document=\"activeSearchableDocument\"\n :eventBus=\"eventBus\"\n :hideModels=\"mergedConfig.hideModels\"\n :modelsSectionLabel=\"mergedConfig.modelsSectionLabel\"\n :searchHotKey=\"mergedConfig.searchHotKey\" />\n\n <AgentScalarButton v-if=\"agent.agentEnabled.value\" />\n </div>\n\n <!-- Sidebar Start -->\n <slot\n name=\"sidebar-start\"\n v-bind=\"slotProps\" />\n </template>\n <template #before>\n <!-- AsyncAPI protocol + server filters (only render with >1 choice) -->\n <AsyncApiSidebarFilters\n v-model:protocol=\"selectedProtocol\"\n v-model:server=\"selectedServer\"\n :document=\"activeAsyncApiDocument\" />\n <ScalarSidebarSection\n v-if=\"activeAsyncApiDocument\"\n class=\"asyncapi-sidebar-document-section\">\n Document\n </ScalarSidebarSection>\n </template>\n <template #footer>\n <slot\n name=\"sidebar-end\"\n v-bind=\"slotProps\">\n <!-- We default the sidebar footer to the standard scalar elements -->\n <ScalarSidebarFooter class=\"darklight-reference\">\n <OpenApiClientButton\n v-if=\"!mergedConfig.hideClientButton && !showMCPButton\"\n buttonSource=\"sidebar\"\n :integration=\"mergedConfig._integration\"\n :isDevelopment=\"isDevelopment\"\n :url=\"documentUrl\" />\n <OpenMCPButton\n v-if=\"showMCPButton\"\n :config=\"mergedConfig.mcp\"\n :externalUrls=\"mergedConfig.externalUrls\"\n :isDevelopment=\"isDevelopment\"\n :url=\"documentUrl\"\n :workspace=\"workspaceStore\" />\n <template #description>\n <a\n class=\"no-underline hover:underline\"\n href=\"https://www.scalar.com\"\n target=\"_blank\">\n {{\n apiReferenceLocalization.translate(\n 'footer.poweredByScalar',\n )\n }}\n </a>\n </template>\n <!-- Override the dark mode toggle slot to hide it -->\n <template #toggle>\n <ScalarColorModeToggleButton\n v-if=\"\n !mergedConfig.hideDarkModeToggle &&\n !mergedConfig.forceDarkModeState\n \"\n :modelValue=\"colorMode === 'dark'\"\n @update:modelValue=\"() => toggleColorMode()\" />\n <span v-else />\n </template>\n </ScalarSidebarFooter>\n </slot>\n </template>\n </ScalarSidebar>\n </template>\n </MobileHeader>\n\n <!-- Primary Content -->\n <main\n :aria-label=\"\n apiReferenceLocalization.translate('navigation.mainContent', {\n name: workspaceStore.workspace.activeDocument?.info?.title ?? '',\n })\n \"\n class=\"references-rendered\"\n :inert=\"agent.showAgent.value\">\n <Content\n :authStore=\"clientStore.auth\"\n :clientDocument=\"clientStore.workspace.activeDocument\"\n :document=\"workspaceStore.workspace.activeDocument\"\n :documentSlug=\"activeSlug\"\n :environment\n :eventBus\n :expandedItems=\"sidebarState.expandedItems.value\"\n :headingSlugGenerator=\"\n mergedConfig.generateHeadingSlug ??\n ((heading) => `${activeSlug}/description/${heading.slug}`)\n \"\n :infoSectionId\n :items=\"sidebarItems\"\n :options=\"mergedConfig\"\n :xScalarDefaultClient=\"\n clientStore.workspace['x-scalar-default-client']\n \"\n :xScalarDefaultExample=\"\n clientStore.workspace['x-scalar-default-example']\n \">\n <template #start>\n <!-- Placeholder intersection observer that emits an empty string to clear the hash when scrolled to the top -->\n <div ref=\"documentStartRef\" />\n\n <DeveloperTools\n v-if=\"workspaceStore.workspace.activeDocument\"\n v-model:overrides=\"configurationOverrides\"\n class=\"references-developer-tools\"\n :configuration=\"mergedConfig\"\n :externalUrls=\"mergedConfig.externalUrls\"\n :workspace=\"workspaceStore\" />\n\n <ClassicHeader v-if=\"mergedConfig.layout === 'classic'\">\n <div class=\"w-64 empty:hidden\">\n <DocumentSelector\n v-if=\"documentOptionList.length > 1\"\n :modelValue=\"activeSlug\"\n :options=\"documentOptionList\"\n @update:modelValue=\"changeSelectedDocument\" />\n </div>\n <SearchButton\n v-if=\"!mergedConfig.hideSearch\"\n class=\"t-doc__sidebar max-w-64\"\n :document=\"activeSearchableDocument\"\n :eventBus=\"eventBus\"\n :hideModels=\"mergedConfig.hideModels\"\n :modelsSectionLabel=\"mergedConfig.modelsSectionLabel\"\n :searchHotKey=\"mergedConfig.searchHotKey\" />\n <template #dark-mode-toggle>\n <ScalarColorModeToggleIcon\n v-if=\"\n !mergedConfig.hideDarkModeToggle &&\n !mergedConfig.forceDarkModeState\n \"\n class=\"text-c-2 hover:text-c-1\"\n :mode=\"colorMode\"\n style=\"transform: scale(1.4)\"\n variant=\"icon\"\n @click=\"() => toggleColorMode()\" />\n </template>\n </ClassicHeader>\n <slot\n name=\"content-start\"\n v-bind=\"slotProps\" />\n </template>\n <!-- TODO: Remove this; we no longer directly support an inline editor -->\n <template\n v-if=\"mergedConfig.isEditable\"\n #empty-state>\n <slot\n name=\"editor-placeholder\"\n v-bind=\"slotProps\" />\n </template>\n <template #end>\n <slot\n name=\"content-end\"\n v-bind=\"slotProps\" />\n </template>\n </Content>\n </main>\n <!-- Optional Footer -->\n <div\n v-if=\"$slots.footer\"\n class=\"references-footer\">\n <slot\n name=\"footer\"\n v-bind=\"slotProps\" />\n </div>\n <!-- Client Modal mount point -->\n <div ref=\"modal\" />\n </div>\n <ScalarToasts />\n </div>\n</template>\n\n<style>\n/* Add base styles to the body. Removed browser default margins for a better experience. */\n@layer scalar-base {\n body {\n margin: 0;\n background-color: var(--scalar-background-1);\n }\n}\n/** Used to check if css is loaded */\n:root {\n --scalar-loaded-api-reference: true;\n}\n\n.asyncapi-sidebar-document-section > .group\\/spacer-after {\n height: 0;\n}\n</style>\n<style scoped>\n/* Configurable Layout Variables */\n@layer scalar-config {\n .scalar-api-reference {\n /* The header height */\n --refs-header-height: calc(\n var(--scalar-custom-header-height, 0px) + var(--scalar-header-height, 0px)\n );\n /* The offset of visible references content (minus headers) */\n --refs-viewport-offset: calc(\n var(--refs-header-height, 0px) + var(--refs-content-offset, 0px)\n );\n /* The calculated height of visible references content (minus headers) */\n --refs-viewport-height: calc(\n var(--full-height, 100dvh) - var(--refs-viewport-offset, 0px)\n );\n /* The width of the sidebar */\n --refs-sidebar-width: var(--scalar-sidebar-width, 0px);\n /* The height of the sidebar */\n --refs-sidebar-height: calc(\n var(--full-height, 100dvh) - var(--refs-header-height, 0px)\n );\n /* The maximum width of the content column */\n --refs-content-max-width: var(--scalar-content-max-width, 1540px);\n }\n\n .scalar-api-reference.references-classic {\n /* Classic layout is wider */\n --refs-content-max-width: var(--scalar-content-max-width, 1420px);\n min-height: 100dvh;\n --refs-sidebar-width: 0;\n }\n}\n.t-doc__sidebar {\n z-index: 10;\n}\n\n/* ----------------------------------------------------- */\n/* References Layout */\n.references-layout {\n /* Try to fill the container */\n min-height: 100dvh;\n min-width: 100%;\n max-width: 100%;\n flex: 1;\n\n /*\n Calculated by a resize observer and set in the style attribute\n Falls back to the viewport height\n */\n --full-height: 100dvh;\n\n /* Grid layout */\n display: grid;\n grid-template-rows: var(--scalar-header-height, 0px) repeat(2, auto);\n grid-template-columns: auto 1fr;\n grid-template-areas:\n 'header header'\n 'navigation rendered'\n 'footer footer';\n\n background: var(--scalar-background-1);\n}\n\n.references-editor {\n grid-area: editor;\n display: flex;\n min-width: 0;\n background: var(--scalar-background-1);\n}\n\n.references-rendered {\n position: relative;\n grid-area: rendered;\n min-width: 0;\n background: var(--scalar-background-1);\n}\n.scalar-api-reference.references-classic,\n.references-classic .references-rendered {\n height: initial !important;\n max-height: initial !important;\n}\n\n@layer scalar-config {\n .references-sidebar {\n /* Set a default width if references are enabled */\n --refs-sidebar-width: var(--scalar-sidebar-width, 288px);\n }\n}\n\n/* Footer */\n.references-footer {\n grid-area: footer;\n}\n/* ----------------------------------------------------- */\n/* Responsive / Mobile Layout */\n\n/*\n * Stop just below the `lg` breakpoint (1000px). The sidebar visibility is driven\n * by Tailwind's `lg:` variant, which is `min-width: 1000px` and therefore treats\n * exactly 1000px as desktop. A `max-width: 1000px` query would make the grid\n * switch to the mobile (stacked) layout at the very same width, so the desktop\n * sidebar would render on top of the content. `width < 1000px` is the exact\n * complement of `lg:` (`width >= 1000px`), keeping the two in sync.\n */\n@media (width < 1000px) {\n /* Keep toolbar hidden on mobile without forcing desktop display mode. */\n .references-developer-tools {\n display: none;\n }\n\n /* Stack view on mobile */\n .references-layout {\n /* Adjust the sidebar height to the viewport height minus the header height */\n --refs-sidebar-height: calc(\n var(--full-height, 100dvh) - var(--scalar-custom-header-height, 0px)\n );\n\n grid-template-columns: 100%;\n grid-template-rows: var(--scalar-header-height, 0px) 0px auto auto;\n\n grid-template-areas:\n 'header'\n 'navigation'\n 'rendered'\n 'footer';\n }\n .references-editable {\n grid-template-areas:\n 'header'\n 'navigation'\n 'editor';\n }\n\n .references-rendered {\n position: static;\n }\n}\n</style>\n<style scoped>\n/**\n* Sidebar CSS for standalone\n* TODO: @brynn move this to the sidebar block OR the ApiReferenceStandalone component\n* when the new elements are available\n*/\n/* Match the layout breakpoint above so the mobile header height is only applied below `lg`. */\n@media (width < 1000px) {\n .scalar-api-references-standalone-mobile:not(.references-classic) {\n --scalar-header-height: 50px;\n }\n}\n</style>\n<style scoped>\n.darklight-reference {\n width: 100%;\n margin-top: auto;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,IAAM,UAAA;AAEN,IAAe,OA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AA,eAAA,mBAAb,UAAA,MAAS,CAAA,EAAA,KAAA,GAAA,KAAA,CAAA,CAAA;;SATb,aAAA,MAAa,aAAA;YAClB;wBAGsB,CAFvB,WAEuB,KAAA,QAAA,sBAAA,eAAA,mBAAb,UAAA,MAAS,CAAA,EAAA,KAAA,GAAA,KAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;KAWjBC,KAAAA,OAAO,UAAA,WAAA,EADf,mBAMM,OANN,YAMM,CAHJ,WAEuB,KAAA,QAAA,UAAA,eAAA,mBAAb,UAAA,MAAS,CAAA,EAAA,KAAA,GAAA,KAAA,CAAA,CAAA,IAAA,mBAAA,IAAA,KAAA;KAGrB,mBAAmB,OAAA;eAAV;MAAJ,KAAI;;;IAEX,YAAgB,MAAA,aAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"ApiReference.vue.script.js","names":["$attrs","$slots"],"sources":["../../src/components/ApiReference.vue"],"sourcesContent":["<script lang=\"ts\">\n/* global PACKAGE_VERSION */\n// Injected by Vite at build time (see vite.config.ts and vite.standalone.config.ts).\n// Read via process.env so the constant is replaced inline without pulling package.json\n// into the TypeScript program — that would expand rootDir and emit declarations under dist/src/.\nconst version = PACKAGE_VERSION\n\nif (version && typeof window !== 'undefined') {\n console.info(`@scalar/api-reference@${version}`)\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { provideUseId } from '@headlessui/vue'\nimport { OpenApiClientButton } from '@scalar/api-client/blocks/operation-block'\nimport type { ApiClientModal } from '@scalar/api-client/modal'\nimport {\n ScalarColorModeToggleButton,\n ScalarColorModeToggleIcon,\n} from '@scalar/components/color-mode-toggle'\nimport { addScalarClassesToHeadless } from '@scalar/components/helpers'\nimport {\n ScalarSidebarFooter,\n ScalarSidebarSection,\n} from '@scalar/components/sidebar'\nimport { toJsonCompatible } from '@scalar/helpers/object/to-json-compatible'\nimport { slugify } from '@scalar/helpers/string/slugify'\nimport { isLocalUrl } from '@scalar/helpers/url/is-local-url'\nimport { apiReferenceConfigurationSchema } from '@scalar/schemas/api-reference'\nimport {\n createSidebarState,\n ScalarSidebar,\n scrollSidebarToTop,\n} from '@scalar/sidebar'\nimport { getThemeStyles, hasObtrusiveScrollbars } from '@scalar/themes'\nimport {\n DEFAULT_MODELS_SECTION_LABEL,\n type AnyApiReferenceConfiguration,\n type ApiReferenceConfiguration,\n type ApiReferenceConfigurationRaw,\n} from '@scalar/types/api-reference'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\nimport { useColorMode } from '@scalar/use-hooks/useColorMode'\nimport { ScalarToasts } from '@scalar/use-toasts'\nimport { coerce } from '@scalar/validation'\nimport { getAsyncApiServers } from '@scalar/workspace-store/channel-example'\nimport { createWorkspaceStore } from '@scalar/workspace-store/client'\nimport { createWorkspaceEventBus } from '@scalar/workspace-store/events'\nimport {\n getActiveEnvironment,\n getServers,\n} from '@scalar/workspace-store/request-example'\nimport type {\n TraversedEntry,\n TraversedTag,\n} from '@scalar/workspace-store/schemas/navigation'\nimport {\n isAsyncApiDocument,\n isOpenApiDocument,\n} from '@scalar/workspace-store/schemas/type-guards'\nimport { useScrollLock } from '@vueuse/core'\nimport diff from 'microdiff'\nimport {\n computed,\n onBeforeMount,\n onBeforeUnmount,\n onMounted,\n onServerPrefetch,\n provide,\n ref,\n useId,\n useTemplateRef,\n watch,\n} from 'vue'\n\nimport {\n AsyncApiSidebarFilters,\n filterAsyncApiNavigation,\n} from '@/blocks/scalar-asyncapi-sidebar-filters-block'\nimport {\n AgentScalarButton,\n AgentScalarDrawer,\n OpenMCPButton,\n} from '@/components/AgentScalar'\nimport ClassicHeader from '@/components/ClassicHeader.vue'\nimport Content from '@/components/Content/Content.vue'\nimport MobileHeader from '@/components/MobileHeader.vue'\nimport { DeveloperTools } from '@/features/developer-tools'\nimport {\n provideLocalization,\n resolveLocalization,\n} from '@/features/localization'\nimport DocumentSelector from '@/features/multiple-documents/DocumentSelector.vue'\nimport SearchButton from '@/features/Search/components/SearchButton.vue'\nimport { getSystemModePreference } from '@/helpers/color-mode'\nimport { downloadDocument } from '@/helpers/download'\nimport {\n getIdFromUrl,\n makeUrlFromId,\n matchesBasePath,\n redirectUrl,\n} from '@/helpers/id-routing'\nimport {\n INTRODUCTION_ENTRY_ID_SUFFIX,\n isIntroductionEntry,\n} from '@/helpers/is-introduction-entry'\nimport {\n scrollToLazy as _scrollToLazy,\n addToPriorityQueue,\n blockIntersection,\n intersectionEnabled,\n} from '@/helpers/lazy-bus'\nimport {\n loadAuthFromStorage,\n loadClientFromStorage,\n} from '@/helpers/load-from-perssistance'\nimport { mapConfigPlugins } from '@/helpers/map-config-plugins'\nimport { mapConfigToWorkspaceStore } from '@/helpers/map-config-to-workspace-store'\nimport {\n normalizeConfigurations,\n type NormalizedConfiguration,\n} from '@/helpers/normalize-configurations'\nimport { safeDeepClone } from '@/helpers/safe-deep-clone'\nimport { AGENT_CONTEXT_SYMBOL, useAgent } from '@/hooks/use-agent'\nimport { useIntersection } from '@/hooks/use-intersection'\nimport { createPluginManager, PLUGIN_MANAGER_SYMBOL } from '@/plugins'\nimport { persistencePlugin } from '@/plugins/persistence-plugin'\n\nconst props = defineProps<{\n /**\n * Configuration for the API reference.\n * Can be a single configuration or an array of configurations for multiple documents.\n */\n configuration?: AnyApiReferenceConfiguration\n}>()\n\ndefineSlots<{\n 'content-start'?(): { breadcrumb: string }\n 'content-end'?(): { breadcrumb: string }\n 'sidebar-start'?(): { breadcrumb: string }\n 'sidebar-end'?(): { breadcrumb: string }\n 'editor-placeholder'?(): { breadcrumb: string }\n footer?(): { breadcrumb: string }\n}>()\n\nconst { copyToClipboard } = useClipboard()\n\n/**\n * Used to inject the environment into built packages\n *\n * Primary use case is the open-in-client button\n */\nconst isDevelopment = import.meta.env.DEV\n\n/**\n * Whether scrollbars take up screen real estate.\n *\n * This defaults to `false` so the first client render matches the server (where\n * there is no DOM to measure). The real value is resolved in `onMounted` to\n * avoid a hydration mismatch on the root class.\n */\nconst obtrusiveScrollbars = ref(false)\nonMounted(() => {\n obtrusiveScrollbars.value = hasObtrusiveScrollbars()\n})\n\nconst eventBus = createWorkspaceEventBus({ debug: isDevelopment })\nconst isSidebarOpen = ref(false)\n\n/**\n * Due to a bug in headless UI, we need to set an ID here that can be shared across server/client\n * TODO remove this once the bug is fixed\n *\n * @see https://github.com/tailwindlabs/headlessui/issues/2979\n */\nprovideUseId(() => useId())\n\n// ---------------------------------------------------------------------------\n/**\n * Configuration Handling\n *\n * We will normalize the configurations and store them in a computed property.\n * The active configuration will be associated with the active document.\n */\nconst configList = computed(() => normalizeConfigurations(props.configuration))\n\nconst isMultiDocument = computed(() => Object.keys(configList.value).length > 1)\n\n/** Search for the source with a default attribute or use the first one */\nconst activeSlug = ref<string>(\n Object.values(configList.value).find((c) => c.default)?.slug ??\n configList.value[Object.keys(configList.value)?.[0] ?? '']?.slug ??\n '',\n)\n\n/**\n * On initial page load we need to determine if there is a valid document slug in the URL\n *\n * If there is we set the active slug to the document slug\n */\nif (typeof window !== 'undefined') {\n const url = new URL(window.location.href)\n\n // To handle legacy query parameter multi-document support we redirect\n // to the new path routing format\n const apiParam = url.searchParams.get('api')\n if (apiParam && configList.value[apiParam]) {\n activeSlug.value = apiParam\n const idFromUrl = getIdFromUrl(\n url,\n configList.value[apiParam].config.pathRouting?.basePath,\n apiParam,\n )\n const newUrl = makeUrlFromId(\n idFromUrl,\n configList.value[apiParam].config.pathRouting?.basePath,\n isMultiDocument.value,\n )\n if (newUrl) {\n newUrl.searchParams.delete('api')\n window.history.replaceState({}, '', newUrl.toString())\n }\n }\n\n /**\n * For path routing on initial load we do not know which basePath to check for\n * we need to search the configs to see if any of the base paths match the URL\n * and then use that basePath to get the initial id\n *\n * With this approach we cannot support multi-document mode with one of configs having\n * an empty basePath\n *\n * Other conflicts are possible.\n */\n const basePaths = Object.values(configList.value).map(\n (c) => c.config.pathRouting?.basePath,\n )\n\n const initialId = getIdFromUrl(\n url,\n basePaths.find((p) => (p ? matchesBasePath(url, p) : false)),\n isMultiDocument.value ? undefined : activeSlug.value,\n )\n const documentSlug = initialId.split('/')[0]\n\n if (documentSlug && configList.value[documentSlug]) {\n activeSlug.value = documentSlug\n }\n}\n\n/** Computed document options list for the selector logic */\nconst documentOptionList = computed(() =>\n Object.values(configList.value).map((c) => ({\n label: c.title,\n id: c.slug,\n })),\n)\n\n/**\n * AsyncAPI sidebar filters (protocol + server).\n *\n * These mirror the document picker: stacked dropdowns at the top of the sidebar\n * that narrow the visible operations. State resets whenever the active document\n * changes so a filter never leaks across documents.\n */\nconst selectedProtocol = ref<string>('')\nconst selectedServer = ref<string>('')\n\n/** The active document, narrowed to AsyncAPI (or `null` for OpenAPI documents). */\nconst activeAsyncApiDocument = computed(() => {\n const document = workspaceStore.workspace.activeDocument\n return isAsyncApiDocument(document) ? document : null\n})\n\n// Reset the filters when switching documents.\nwatch(activeSlug, () => {\n selectedProtocol.value = ''\n selectedServer.value = ''\n})\n\n/** Configuration overrides to apply to the selected document (from the localhost toolbar) */\nconst configurationOverrides = ref<\n Partial<Omit<ApiReferenceConfiguration, 'slug' | 'title' | ''>>\n>({})\n\nconst withLocalizedConfigurationDefaults = (\n config: ApiReferenceConfiguration,\n activeConfig: Partial<ApiReferenceConfiguration> | undefined,\n): ApiReferenceConfiguration => {\n const localization = resolveLocalization(config.localization)\n const configuredModelsSectionLabel =\n configurationOverrides.value.modelsSectionLabel ??\n (activeConfig?.modelsSectionLabel !== DEFAULT_MODELS_SECTION_LABEL\n ? activeConfig?.modelsSectionLabel\n : undefined)\n\n return {\n ...config,\n modelsSectionLabel:\n configuredModelsSectionLabel ??\n localization.translations.models.label ??\n DEFAULT_MODELS_SECTION_LABEL,\n }\n}\n\n/** Any dev toolbar modifications are merged with the active configuration */\nconst mergedConfig = computed<ApiReferenceConfiguration>(() => {\n const activeConfig = configList.value[activeSlug.value]?.config\n const merged = {\n // Provides a default set of values when the lookup fails\n ...coerce(apiReferenceConfigurationSchema, {}),\n // The active configuration based on the slug\n ...activeConfig,\n // Any overrides from the localhost toolbar\n ...configurationOverrides.value,\n }\n\n return withLocalizedConfigurationDefaults(merged, activeConfig)\n})\n\nconst apiReferenceLocalization = provideLocalization(\n () => mergedConfig.value.localization,\n)\n\nconst sidebarOptions = computed(() => ({\n ...mergedConfig.value,\n labels: {\n closeGroup: apiReferenceLocalization.translate('navigation.closeGroup'),\n httpMethod: apiReferenceLocalization.translate('common.httpMethod'),\n openGroup: apiReferenceLocalization.translate('navigation.openGroup'),\n },\n}))\n\n/**\n * Locale string for the `lang` attribute. We normalize underscores to hyphens so values like\n * `es_MX` become valid BCP-47 language tags (`es-MX`).\n */\nconst documentLang = computed(() =>\n apiReferenceLocalization.locale.value.replace('_', '-'),\n)\n\n/** Convenience break out var to determine which routing mode we are using */\nconst basePath = computed(() => mergedConfig.value.pathRouting?.basePath)\n\nconst themeStyle = computed(() =>\n getThemeStyles(mergedConfig.value.theme, {\n fonts: mergedConfig.value.withDefaultFonts,\n }),\n)\n\n/**\n * Custom CSS plus the theme styles, injected into a single `<style>` tag.\n *\n * This is rendered with `v-html` so the CSS is emitted verbatim. Interpolating\n * it as text content makes Vue HTML-escape characters like `\"` into `"` on\n * the server while the client keeps `\"`, which both breaks the CSS and causes a\n * hydration mismatch.\n */\nconst styleContent = computed(\n () => `${mergedConfig.value.customCss ?? ''}\\n${themeStyle.value}`,\n)\n\n// ---------------------------------------------------------------------------\n/** Navigation State Handling */\n\n// Rewrite outdated `model/` and `models/` schema URLs to the current models\n// section slug so bookmarks from before the slug changed keep resolving.\nif (typeof window !== 'undefined') {\n const canonical = redirectUrl(\n window.location.href,\n slugify(\n mergedConfig.value.modelsSectionLabel ?? DEFAULT_MODELS_SECTION_LABEL,\n ),\n activeSlug.value,\n isMultiDocument.value,\n mergedConfig.value.pathRouting?.basePath,\n )\n if (canonical) {\n window.history.replaceState({}, '', canonical.toString())\n }\n}\n\n// Front-end redirect\nif (mergedConfig.value.redirect && typeof window !== 'undefined') {\n const newPath = mergedConfig.value.redirect(\n (mergedConfig.value.pathRouting ? window.location.pathname : '') +\n window.location.hash,\n )\n if (newPath) {\n window.history.replaceState({}, '', newPath)\n }\n}\n\n/**\n * Sets the active slug and updates the URL with the selected document slug\n *\n * If an element ID is passed in we will configure the path or hash routing\n */\nfunction syncSlugAndUrlWithDocument(\n slug: string,\n elementId: string | undefined,\n config: ApiReferenceConfigurationRaw,\n) {\n // We create a new URL and go to the root element if an ID is not provided\n const url = makeUrlFromId(\n elementId || slug,\n config.pathRouting?.basePath,\n isMultiDocument.value,\n )\n\n if (url) {\n window.history.replaceState({}, '', url.toString())\n }\n\n // Update the active slug\n activeSlug.value = slug\n}\n\n// ---------------------------------------------------------------------------\n/** Workspace Store Initialization */\n\n/**\n * Initializes the new client workspace store.\n */\nconst workspaceStore = createWorkspaceStore({\n verbose: isDevelopment,\n})\n\n/**\n * We need to keep the client store separate from the workspace store\n * This is because we want the client store to be a playground where users can test out their requests without affecting the references store\n */\nconst clientStore = createWorkspaceStore({\n verbose: isDevelopment,\n plugins: [\n persistencePlugin({\n persistAuth: () => mergedConfig.value.persistAuth ?? false,\n }),\n ],\n})\n\n/**\n * Plugin injection is not reactive. All plugins must be provided at first render.\n *\n * Created after the client store so the auth accessor below can read from it — plugin `onInit`\n * hooks may call `auth` synchronously during `notifyInit`. The reference-side Authentication panel\n * (Content → Auth.vue) persists credentials into `clientStore.auth`, so plugins must read the same\n * store to see what the user entered.\n */\nconst pluginManager = createPluginManager({\n plugins: Object.values(configList.value).flatMap(\n (c) => c.config.plugins ?? [],\n ),\n /**\n * Read-only view of the global authentication state, so plugins can read stored secrets and\n * the selected security schemes without being able to mutate them. Wraps the client store's\n * auth methods (rather than passing the store directly) to keep the setters out of the plugin API.\n *\n * The getters return a deep copy (`export` already snapshots internally, the others go through\n * `toJsonCompatible`) so plugins receive plain data rather than the store's live reactive proxies —\n * mutating what they get back can never leak into the store.\n */\n auth: {\n export: () => clientStore.auth.export(),\n getAuthSecrets: (documentName, schemeName) =>\n toJsonCompatible(\n clientStore.auth.getAuthSecrets(documentName, schemeName),\n ),\n getAuthSelectedSchemas: (payload) =>\n toJsonCompatible(clientStore.auth.getAuthSelectedSchemas(payload)),\n },\n})\nprovide(PLUGIN_MANAGER_SYMBOL, pluginManager)\n\npluginManager.notifyInit(mergedConfig.value)\n\nwatch(mergedConfig, (config) => pluginManager.notifyConfigChange(config))\n\n// TODO: persistence should be hoisted into standalone\n// Client side integrations will want to handle dark mode externally\nconst { toggleColorMode, isDarkMode } = useColorMode({\n initialColorMode: {\n true: 'dark' as const,\n false: 'light' as const,\n undefined: 'system' as const,\n }[String(mergedConfig.value.darkMode)],\n overrideColorMode: mergedConfig.value.forceDarkModeState,\n})\n\n/**\n * The active document passed to the search modal. Both OpenAPI and AsyncAPI\n * documents are surfaced so the search index can pick up info.description\n * headings from either spec; AsyncAPI-specific entries (channels, operations,\n * messages) are not indexed yet.\n */\nconst activeSearchableDocument = computed(\n () => workspaceStore.workspace.activeDocument,\n)\n\n/**\n * Sidebar entries contributed by plugin views (content.start / content.end).\n *\n * Each entry reuses the same id as the rendered plugin component, so the existing\n * navigation and scroll-spy logic can scroll to and highlight it. Plugins are static for\n * the lifetime of the manager, so this only needs to be resolved once.\n */\nconst pluginSidebarEntries = computed(() =>\n pluginManager\n .getSidebarEntries(activeSlug.value)\n .reduce<Record<'content.start' | 'content.end', TraversedEntry[]>>(\n (grouped, entry) => {\n grouped[entry.viewName].push({\n id: entry.id,\n title: entry.label,\n type: 'text',\n })\n return grouped\n },\n { 'content.start': [], 'content.end': [] },\n ),\n)\n\n/**\n * Localize the synthetic labels we generate for the sidebar (introduction, webhooks, and the models\n * section). Entries are only cloned when a label actually changes, so the common English-default case\n * does not allocate a new navigation tree on every recompute.\n */\nconst localizeNavigationEntries = (\n entries: TraversedEntry[],\n): TraversedEntry[] => {\n const introductionTitle = apiReferenceLocalization.translate(\n 'navigation.introduction',\n )\n const webhooksTitle = apiReferenceLocalization.translate(\n 'navigation.webhooks',\n )\n const modelsSectionLabel =\n mergedConfig.value.modelsSectionLabel ?? DEFAULT_MODELS_SECTION_LABEL\n\n const localize = (list: TraversedEntry[]): TraversedEntry[] => {\n let changed = false\n\n const result = list.map((entry) => {\n let localized = entry\n\n if (isIntroductionEntry(entry) && entry.title !== introductionTitle) {\n localized = { ...entry, title: introductionTitle } as TraversedEntry\n } else if (\n entry.type === 'tag' &&\n entry.isWebhooks === true &&\n (entry.title !== webhooksTitle || entry.name !== webhooksTitle)\n ) {\n localized = {\n ...entry,\n title: webhooksTitle,\n name: webhooksTitle,\n } as TraversedEntry\n } else if (\n entry.type === 'models' &&\n (entry.title !== modelsSectionLabel ||\n entry.name !== modelsSectionLabel)\n ) {\n localized = {\n ...entry,\n title: modelsSectionLabel,\n name: modelsSectionLabel,\n } as TraversedEntry\n }\n\n if ('children' in entry && entry.children) {\n const localizedChildren = localize(entry.children)\n\n if (localizedChildren !== entry.children) {\n localized =\n localized === entry ? ({ ...entry } as TraversedEntry) : localized\n ;(localized as { children?: TraversedEntry[] }).children =\n localizedChildren\n }\n }\n\n if (localized !== entry) {\n changed = true\n }\n\n return localized\n })\n\n // Preserve the original reference when nothing changed to avoid downstream re-renders.\n return changed ? result : list\n }\n\n return localize(entries)\n}\n\n/**\n * Create top level sidebar entries for each document\n * This allows sharing a single sidebar state for across the workspace\n */\nconst itemsFromWorkspace = computed<TraversedEntry[]>(() => {\n return Object.entries(workspaceStore.workspace.documents).map(\n ([slug, document]) => {\n // Both OpenAPI and AsyncAPI documents carry an `x-scalar-navigation` tree.\n const children = document['x-scalar-navigation']?.children ?? []\n\n // Plugin views render once for the active document, so only surface their sidebar\n // entries there. `content.start` sits above the Introduction, `content.end` below.\n const childrenWithPlugins =\n slug === activeSlug.value\n ? [\n ...pluginSidebarEntries.value['content.start'],\n ...localizeNavigationEntries(children),\n ...pluginSidebarEntries.value['content.end'],\n ]\n : localizeNavigationEntries(children)\n\n return {\n id: slug,\n type: 'document',\n description: document.info.description,\n name: document.info.title ?? slug,\n title: document.info.title ?? slug,\n children: childrenWithPlugins,\n }\n },\n )\n})\n\n/** Initialize the sidebar */\nconst sidebarState = createSidebarState<TraversedEntry>(itemsFromWorkspace, {\n hooks: {},\n})\n\n/** Recursively set all children of the given items to open */\nconst setChildrenOpen = (items: TraversedEntry[]): void => {\n items.forEach((item) => {\n if (item.type === 'tag' || item.type === 'models') {\n sidebarState.setExpanded(item.id, true)\n }\n if ('children' in item && item.children) {\n setChildrenOpen(item.children)\n }\n })\n}\n\n/** We get the sub items for the sidebar based on the configuration/document slug */\nconst sidebarItems = computed<TraversedEntry[]>(() => {\n const config = mergedConfig.value\n\n if (!config) {\n return []\n }\n\n const rawDocItems =\n sidebarState.items.value.find(\n (item): item is TraversedTag => item.id === activeSlug.value,\n )?.children ?? []\n\n // Apply the AsyncAPI protocol/server filters to the sidebar tree. This is a no-op\n // for OpenAPI documents and when no filter is selected.\n const docItems = activeAsyncApiDocument.value\n ? filterAsyncApiNavigation(rawDocItems, activeAsyncApiDocument.value, {\n protocol: selectedProtocol.value,\n server: selectedServer.value,\n })\n : rawDocItems\n\n // When the default open all tags configuration is enabled we open all the children of the document\n if (config.defaultOpenAllTags) {\n setChildrenOpen(docItems)\n }\n\n // When the expand all model sections configuration is enabled we open all the children of the models tag\n if (config.expandAllModelSections) {\n const models = docItems.find(\n (item): item is TraversedTag => item.type === 'models',\n )\n if (models) {\n sidebarState.setExpanded(models.id, true)\n models.children?.forEach((child) => {\n sidebarState.setExpanded(child.id, true)\n })\n }\n }\n\n return docItems\n})\n\n/** Find the sidebar entry that represents the introduction section */\nconst infoSectionId = computed(\n () =>\n sidebarItems.value.find(isIntroductionEntry)?.id ??\n `${activeSlug.value}${INTRODUCTION_ENTRY_ID_SUFFIX}`,\n)\n\n/** User for mobile navigation */\nconst breadcrumb = ref('')\n\nconst slotProps = computed(() => ({\n breadcrumb: breadcrumb.value,\n}))\n\nconst setBreadcrumb = (id: string) => {\n const item = sidebarState.getEntryById(id)\n\n if (!item || item.type === 'document') {\n breadcrumb.value = ''\n } else {\n breadcrumb.value = item.title\n }\n}\n\nconst scrollToLazyElement = (id: string) => {\n setBreadcrumb(id)\n sidebarState.setSelected(id)\n _scrollToLazy(id, sidebarState.setExpanded, sidebarState.getEntryById)\n}\n\n/**\n * Updates the browser tab title via the user-provided `setPageTitle` callback.\n *\n * Called whenever the section in view changes — on sidebar clicks, on scroll, and\n * when switching documents — so the tab title always reflects what the reader sees.\n */\nconst updatePageTitle = (id: string) => {\n const setPageTitle = mergedConfig.value?.setPageTitle\n const entry = sidebarState.getEntryById(id)\n\n if (!setPageTitle || typeof document === 'undefined' || !entry?.title) {\n return\n }\n\n const activeDocument = workspaceStore.workspace.activeDocument\n\n document.title = setPageTitle({\n title: entry.title,\n document: {\n title: activeDocument?.info?.title ?? activeSlug.value,\n slug: activeSlug.value,\n },\n })\n}\n\n/** Maps some config values to the workspace store to keep it reactive */\nmapConfigToWorkspaceStore({\n config: () => mergedConfig.value,\n store: workspaceStore,\n isDarkMode,\n})\n\nmapConfigToWorkspaceStore({\n config: () => mergedConfig.value,\n store: clientStore,\n isDarkMode,\n})\n\n/** Merged environment variables from workspace and document levels */\nconst environment = computed(\n () =>\n getActiveEnvironment(\n workspaceStore,\n workspaceStore.workspace.activeDocument ?? null,\n ).environment,\n)\n\nif (typeof window !== 'undefined') {\n // @ts-expect-error - For debugging purposes expose the store\n window.dataDumpWorkspace = () => workspaceStore\n}\n\n// For testing\ndefineExpose({\n eventBus,\n workspaceStore,\n sidebarItems,\n})\n\n/**\n * Computes a mapping from model names to their sidebar entry IDs.\n * This is used for quick lookups and navigation within the sidebar.\n */\nconst modelsIndex = computed(() => {\n return sidebarItems.value\n .filter((item) => item.type === 'models')\n .flatMap((item) => item.children ?? [])\n .filter((item) => item.type === 'model')\n .reduce(\n (acc, item) => {\n acc[item.name] = item.id\n return acc\n },\n {} as Record<string, string>,\n )\n})\n\neventBus.on('scroll-to:model-by-name', ({ name }) => {\n /** Find the model in the models index */\n const model = modelsIndex.value[name]\n\n if (model) {\n scrollToLazyElement(model)\n }\n})\n\nconst addDocument: typeof workspaceStore.addDocument = async (\n input,\n navigationOptions,\n) => {\n const result = await workspaceStore.addDocument(input, navigationOptions)\n // Now add it to the client store\n const state = workspaceStore.exportWorkspace()\n clientStore.loadWorkspace({\n auth: {},\n documents: {\n [input.name]: safeDeepClone(state.documents[input.name]) ?? {\n 'openapi': '3.1.0',\n 'info': {\n title: '',\n version: '',\n },\n 'x-scalar-original-document-hash': '',\n },\n },\n intermediateDocuments: {},\n originalDocuments: {},\n overrides: {},\n history: {},\n meta: {},\n })\n return result\n}\n\n// ---------------------------------------------------------------------------\n// Document Management\n\n/** In-flight document loads, so a background preload and a user selection never load the same document twice */\nconst documentLoadPromises = new Map<string, Promise<void>>()\n\n/**\n * Load a document into the workspace store by slug, fetching URL sources or using inline content.\n *\n * This does not change the active document, so it is safe to call in the background to warm up\n * documents the user has not selected yet. Repeated calls are deduplicated and it becomes a no-op\n * once the document is loaded.\n */\nconst ensureDocumentLoaded = (slug: string): Promise<void> => {\n // Already loaded, nothing to do\n if (workspaceStore.workspace.documents[slug]) {\n return Promise.resolve()\n }\n\n // A load is already in flight, reuse it\n const pending = documentLoadPromises.get(slug)\n if (pending) {\n return pending\n }\n\n const normalized = configList.value[slug]\n\n if (!normalized) {\n return Promise.resolve()\n }\n\n const config = withLocalizedConfigurationDefaults(\n {\n ...normalized.config,\n ...configurationOverrides.value,\n },\n normalized.config,\n )\n\n const promise = (async () => {\n const result = await addDocument(\n normalized.source.url\n ? {\n name: slug,\n url: normalized.source.url,\n fetch: config.customFetch,\n }\n : {\n name: slug,\n document: normalized.source.content ?? {},\n },\n config,\n )\n\n const document = clientStore.workspace.documents[slug]\n\n // If the document does not have a selected server we set it to the first server\n if (\n result === true &&\n isOpenApiDocument(document) &&\n document['x-scalar-selected-server'] === undefined\n ) {\n // Set the active server if the document is loaded successfully. Resolve relative servers\n // against this document's own base URL, not the active document's, so a background preload\n // does not derive its server from whichever document happens to be active.\n const servers = getServers(\n normalized.config.servers ?? document.servers,\n {\n baseServerUrl: config.baseServerURL,\n documentUrl: normalized.source.url,\n },\n )\n if (servers.length > 0) {\n clientStore.updateDocument(\n slug,\n 'x-scalar-selected-server',\n servers[0]!.url,\n )\n }\n }\n })().finally(() => {\n documentLoadPromises.delete(slug)\n })\n\n documentLoadPromises.set(slug, promise)\n\n return promise\n}\n\n/** Whether idle preloading has been stopped, for example when the component unmounts */\nlet isPreloadStopped = false\n/** Cancels the currently scheduled idle preload callback, if one is pending */\nlet cancelScheduledPreload: (() => void) | undefined\n\n/**\n * Stop any in-progress idle preloading. Without this, an orphaned instance (an Astro view\n * transition or a `createApiReference` remount) would keep fetching and parsing documents into\n * an abandoned store after unmount.\n */\nconst stopPreloadingDocuments = () => {\n isPreloadStopped = true\n cancelScheduledPreload?.()\n cancelScheduledPreload = undefined\n}\n\n/**\n * Warm up the documents the user has not selected yet while the browser is idle, so switching\n * between documents is instant. Runs on the client only and loads one document at a time to avoid\n * a burst of fetches and parsing work competing with the active document.\n */\nconst preloadDocumentsWhenIdle = () => {\n if (typeof window === 'undefined') {\n return\n }\n\n const pendingSlugs = Object.keys(configList.value).filter(\n (slug) => !workspaceStore.workspace.documents[slug],\n )\n\n const scheduleIdle = (callback: () => void) => {\n if (typeof window.requestIdleCallback === 'function') {\n const handle = window.requestIdleCallback(callback, { timeout: 1500 })\n cancelScheduledPreload = () => window.cancelIdleCallback(handle)\n } else {\n const handle = window.setTimeout(callback, 200)\n cancelScheduledPreload = () => window.clearTimeout(handle)\n }\n }\n\n const loadNext = () => {\n if (isPreloadStopped) {\n return\n }\n\n const slug = pendingSlugs.shift()\n\n if (!slug) {\n return\n }\n\n // Load one document, then queue the next once the browser is idle again\n void ensureDocumentLoaded(slug).finally(() => {\n if (!isPreloadStopped) {\n scheduleIdle(loadNext)\n }\n })\n }\n\n scheduleIdle(loadNext)\n}\n\n/**\n * Handle changing the active document\n *\n * 1. If the document has not be loaded to the workspace store we set it to empty and asynchronously load it\n * 2. If the document has been loaded to the workspace store we just set it to active\n * 3. If the content from the configuration has changes we need to update the document in the workspace store\n */\nconst changeSelectedDocument = async (\n slug: string,\n elementId?: string | undefined,\n) => {\n const normalized = configList.value[slug]\n\n if (!normalized) {\n console.warn(`Document ${slug} not found in configList`)\n return\n }\n\n const config = withLocalizedConfigurationDefaults(\n {\n ...normalized.config,\n ...configurationOverrides.value,\n },\n normalized.config,\n )\n\n // Store `onDocumentSelect` result to await its execution later, before calling `onLoaded`\n const onDocumentSelectPromise = config.onDocumentSelect?.()\n\n // Set the active slug and update any routing\n syncSlugAndUrlWithDocument(slug, elementId, config)\n\n // Update the document on the route as well, the method and path don't matter as we update them before opening\n apiClient.value?.route({\n documentSlug: slug,\n method: 'get',\n path: '/',\n })\n\n // Load the document if it is not in the store yet (a background preload may already be loading it)\n await ensureDocumentLoaded(slug)\n\n // Always set it to active; if the document is null we show a loading state\n workspaceStore.update('x-scalar-active-document', slug)\n clientStore.update('x-scalar-active-document', slug)\n\n // If the document has persistence enabled we load the auth schemes from storage\n if (config.persistAuth) {\n loadAuthFromStorage(clientStore, slug)\n }\n\n // ensure that `onLoaded` hook doesn't block execution but is executed after `onDocumentSelect`\n void (async () => {\n await onDocumentSelectPromise\n void config.onLoaded?.(slug)\n })()\n\n // When loading to a specified element we need to freeze and scroll\n if (elementId && elementId !== slug) {\n scrollToLazyElement(elementId)\n }\n // If there is no child element of the document specified and defaultOpenFirstTag is enabled, we expand the first tag\n else if (config.defaultOpenFirstTag) {\n const firstTag = sidebarItems.value.find((item) => item.type === 'tag')\n if (firstTag) {\n sidebarState.setExpanded(firstTag.id, true)\n }\n }\n\n // Reflect the freshly selected document in the browser tab title\n updatePageTitle(elementId && elementId !== slug ? elementId : slug)\n}\n\n/**\n * TODO:Move this to a dedicated updateDocument function in the future and\n * away from vue-reactivity based updates\n */\nwatch(\n () => Object.values(configList.value),\n async (newConfigList, oldConfigList) => {\n /**\n * Handles replacing and updating documents within the workspace store\n * when we detect configuration changes.\n */\n const updateSource = async (\n updated: NormalizedConfiguration,\n previous: NormalizedConfiguration | undefined,\n ) => {\n const config = withLocalizedConfigurationDefaults(\n {\n ...updated.config,\n ...configurationOverrides.value,\n },\n updated.config,\n )\n\n /**\n * A background preload may still be loading this document against the previous\n * configuration. Wait for it to finish so the update below rebases onto the loaded\n * document instead of being skipped, which would otherwise leave stale content in the store.\n */\n const pendingLoad = documentLoadPromises.get(updated.slug)\n if (pendingLoad) {\n await pendingLoad\n }\n\n /** If we have not loaded the document previously we don't need to handle any updates to store */\n if (!workspaceStore.workspace.documents[updated.slug]) {\n return\n }\n /** If the URL has changed we fetch and rebase */\n if (updated.source.url && updated.source.url !== previous?.source.url) {\n await addDocument(\n {\n name: updated.slug,\n url: updated.source.url,\n fetch: config.customFetch,\n },\n config,\n )\n\n return\n }\n\n // If the was not a URL change then we require a document to continue\n if (!updated.source.content) {\n return\n }\n\n /**\n * We need to deeply check for document changes. Parse documents and then only rebase\n * if we detect deep changes in the two sources\n */\n if (\n diff(\n updated.source.content,\n previous && 'content' in previous.source\n ? (previous.source.content ?? {})\n : {},\n ).length\n ) {\n await addDocument(\n {\n name: updated.slug,\n document: updated.source.content,\n },\n config,\n )\n }\n }\n\n newConfigList.forEach((newConfig, index) =>\n updateSource(newConfig, oldConfigList[index]),\n )\n\n const newSlugs = newConfigList.map((c) => c.slug)\n const oldSlugs = oldConfigList.map((c) => c.slug)\n\n // If the slugs have changed, we need to update the active document and the URL query param\n if (\n newSlugs.length !== oldSlugs.length ||\n !newSlugs.every((slug, index) => slug === oldSlugs[index])\n ) {\n await changeSelectedDocument(newSlugs[0] ?? '')\n }\n },\n {\n deep: true,\n },\n)\n\n/** Preload the first document during SSR */\nonServerPrefetch(() => changeSelectedDocument(activeSlug.value))\n\n/** Load the first document on page load */\nonBeforeMount(async () => {\n // We read the client from the client store so we need to set it to the client store\n loadClientFromStorage(clientStore)\n\n await changeSelectedDocument(\n activeSlug.value,\n getIdFromUrl(\n window.location.href,\n configList.value[activeSlug.value]?.config.pathRouting?.basePath,\n isMultiDocument.value ? undefined : activeSlug.value,\n ),\n )\n\n // Warm up the remaining documents in the background so switching between them is instant\n preloadDocumentsWhenIdle()\n})\n\nconst documentUrl = computed(() => {\n return configList.value[activeSlug.value]?.source?.url\n})\n\n// --------------------------------------------------------------------------- */\n// Agent Scalar\n\n/**\n * Determines if Agent Scalar should be enabled based on the configuration and the current URL\n *\n * - If the agent is disabled in the configuration, it should not be enabled\n * - If the current URL is a local URL, it should be enabled\n * - If the agent key is set, it should be enabled\n */\nconst agent = useAgent({\n agentEnabled: computed(() => {\n const currentConfiguration = configList.value[activeSlug.value]\n\n if (currentConfiguration?.agent?.disabled) {\n return false\n }\n\n if (typeof window !== 'undefined' && isLocalUrl(window.location.href)) {\n return true\n }\n\n return Boolean(configList.value[activeSlug.value]?.agent?.key)\n }),\n})\nprovide(AGENT_CONTEXT_SYMBOL, agent)\n\n// --------------------------------------------------------------------------- */\n// Api Client Modal\n\n// Setup the ApiClient on mount.\n// The modal is dynamic-imported so its dependency graph (CodeMirror, the request\n// editor, the response viewer, etc.) becomes a separate chunk that loads\n// asynchronously after the API reference paints.\nconst modal = useTemplateRef<HTMLElement>('modal')\nconst apiClient = ref<ApiClientModal | null>(null)\nonMounted(async () => {\n if (!modal.value) {\n return\n }\n\n const { createApiClientModal } = await import('@scalar/api-client/modal')\n\n // Bail if the component unmounted while the chunk was loading.\n if (!modal.value) {\n return\n }\n\n apiClient.value = createApiClientModal({\n el: modal.value,\n eventBus,\n workspaceStore: clientStore,\n options: mergedConfig,\n plugins: [\n ...pluginManager.getApiClientPlugins(),\n ...mapConfigPlugins(mergedConfig, environment),\n ],\n })\n})\nonBeforeUnmount(() => {\n stopPreloadingDocuments()\n pluginManager.notifyDestroy()\n apiClient.value?.app.unmount()\n})\n\n// ---------------------------------------------------------------------------\n// Top level event handlers and user specified callbacks\n\n/** Ensure we call the onServerChange callback */\neventBus.on('server:update:selected', ({ url }) =>\n mergedConfig.value.onServerChange?.(url),\n)\n\n/**\n * AsyncAPI servers are keyed by name, so resolve the selected name to its\n * constructed connection URL before firing onServerChange, keeping the callback\n * payload consistent with OpenAPI (a URL string).\n */\neventBus.on('asyncapi-server:update:selected', ({ name }) => {\n const document = clientStore.workspace.activeDocument\n if (!isAsyncApiDocument(document)) {\n return\n }\n\n const server = getAsyncApiServers(document, { webSocketOnly: false }).find(\n (s) => s.name === name,\n )\n mergedConfig.value.onServerChange?.(server?.url ?? name)\n})\n\n/** Download the document from the store */\neventBus.on('ui:download:document', ({ format }) => {\n const document = workspaceStore.exportActiveDocument(format)\n\n if (!document) {\n console.error('No document found to download')\n return\n }\n\n void downloadDocument(document, activeSlug.value ?? 'openapi', format)\n})\n\n// ---------------------------------------------------------------------------\n// Local event and scroll handling\n\n/**\n * Handler for a direct navigation event such as a sidebar or search click\n *\n * Depending on the item type we handle a selection event differently:\n *\n * - Tag: If a tag is closed we open it and all its parents and scroll to it\n * If a tag is open we just close the tag\n * - Operation:\n * Open all parents and scroll to the operation\n */\nconst handleSelectSidebarEntry = (id: string, caller?: 'sidebar') => {\n const item = sidebarState.getEntryById(id)\n\n updatePageTitle(id)\n\n if (\n (item?.type === 'tag' ||\n item?.type === 'models' ||\n item?.type === 'text') &&\n sidebarState.isExpanded(id) && // Only close if the item is expanded\n sidebarState.selectedItem.value === id // Only close if the item is not the currently selected item\n ) {\n // hack until we fix intersection logic\n const unblock = blockIntersection()\n\n sidebarState.setExpanded(id, false)\n\n unblock()\n\n return\n }\n\n // Close the mobile menu upon selecting any item that's not a tag or model\n if (item?.type !== 'tag' && item?.type !== 'models') {\n isSidebarOpen.value = false\n }\n\n scrollToLazyElement(id)\n\n const url = makeUrlFromId(id, basePath.value, isMultiDocument.value)\n if (url) {\n window.history.pushState({}, '', url)\n\n // Trigger the onSidebarClick callback if the caller is sidebar\n if (caller === 'sidebar') {\n mergedConfig.value.onSidebarClick?.(url.toString())\n }\n }\n\n if (agent.showAgent.value) {\n agent.closeAgent()\n }\n}\n\n/** Handle a navigation item selection event */\neventBus.on('select:nav-item', ({ id }) => handleSelectSidebarEntry(id))\n\n/** Handle a scroll to navigation item event */\neventBus.on('scroll-to:nav-item', ({ id }) => handleSelectSidebarEntry(id))\n\n/** Handle an intersecting navigation item event */\neventBus.on('intersecting:nav-item', ({ id }) => {\n if (!intersectionEnabled.value) {\n return\n }\n\n sidebarState.setSelected(id)\n setBreadcrumb(id)\n\n // Keep the browser tab title in sync with the section scrolled into view\n updatePageTitle(id)\n\n // Scroll the sidebar to keep the selected element near the top\n scrollSidebarToTop(id)\n\n const url = makeUrlFromId(id, basePath.value, isMultiDocument.value)\n if (url && workspaceStore.workspace.activeDocument) {\n window.history.replaceState({}, '', url.toString())\n }\n})\n\neventBus.on('toggle:nav-item', ({ id, open }) => {\n if (open) {\n mergedConfig.value.onShowMore?.(id)\n\n // Pre-queue first child so it renders immediately when the tag expands\n const entry = sidebarState.getEntryById(id)\n if (entry && 'children' in entry && entry.children) {\n const first = entry.children[0]\n\n if (first) {\n addToPriorityQueue(first.id)\n }\n }\n }\n sidebarState.setExpanded(id, open ?? !sidebarState.isExpanded(id))\n})\n\neventBus.on('copy-url:nav-item', ({ id }) => {\n const url = makeUrlFromId(\n id,\n basePath.value,\n isMultiDocument.value,\n )?.toString()\n return url && copyToClipboard(url)\n})\n\n// ---------------------------------------------------------------------------\n// History and scroll restoration\n\nonBeforeMount(() => {\n window.history.scrollRestoration = 'manual'\n // Ensure we add our scalar wrapper class to the headless ui root, mounted is too late\n addScalarClassesToHeadless()\n\n // When we detect a back button press we scroll to the new id\n window.addEventListener('popstate', () => {\n const id = getIdFromUrl(\n window.location.href,\n mergedConfig.value.pathRouting?.basePath,\n isMultiDocument.value ? undefined : activeSlug.value,\n )\n if (id) {\n scrollToLazyElement(id)\n }\n })\n})\n\n// ---------------------------------------------------------------------------\n// Document start intersection observer\n\nconst documentStartRef = useTemplateRef<HTMLElement>('documentStartRef')\n\n/**\n * Uses `immediate` so the sentinel fires as soon as it enters the viewport (not just at the center strip).\n * When the user scrolls away from the top, both this observer and the first section's center-strip\n * observer are intersecting simultaneously, so the section observer does not re-fire on its own.\n * The `onExit` callback bridges that gap by finding whichever section is at the viewport center\n * and re-emitting the nav event for it.\n *\n * We emit the Introduction entry rather than the document slug so this sentinel and the Introduction\n * section's own intersection observer resolve to the same entry. Otherwise the two race at the top of\n * the document and the tab title flickers between the section title and the document title.\n */\nuseIntersection(\n documentStartRef,\n () => {\n eventBus.emit('intersecting:nav-item', { id: infoSectionId.value })\n },\n {\n onExit: () => {\n const centerY = window.innerHeight / 2\n const section = document\n .elementsFromPoint(window.innerWidth / 2, centerY)\n .find((el) => el.tagName === 'SECTION' && el.id)\n\n if (section?.id) {\n eventBus.emit('intersecting:nav-item', { id: section.id })\n }\n },\n immediate: true,\n },\n)\n\nconst colorMode = computed(() => {\n const mode = workspaceStore.workspace['x-scalar-color-mode']\n\n if (mode === 'system') {\n return getSystemModePreference()\n }\n\n return mode\n})\n\nconst bodyScrollLocked = useScrollLock(\n typeof document !== 'undefined' ? document.body : null,\n)\n\nwatch(agent.showAgent, () => (bodyScrollLocked.value = agent.showAgent.value))\n\nconst showMCPButton = computed(() => {\n if (mergedConfig.value.mcp?.disabled) {\n return false\n }\n\n if (typeof window !== 'undefined' && isLocalUrl(window.location.href)) {\n return true\n }\n\n if (mergedConfig.value.mcp) {\n return true\n }\n\n return false\n})\n</script>\n\n<template>\n <!-- SingleApiReference -->\n <div>\n <!-- Inject any custom CSS directly into a style tag -->\n <!-- eslint-disable vue/no-v-text-v-html-on-component -->\n <component\n :is=\"'style'\"\n v-html=\"styleContent\" />\n <!-- eslint-enable vue/no-v-text-v-html-on-component -->\n <div\n ref=\"documentEl\"\n class=\"scalar-app scalar-api-reference references-layout\"\n :class=\"[\n {\n 'scalar-api-references-standalone-mobile': mergedConfig.showSidebar,\n 'scalar-scrollbars-obtrusive': obtrusiveScrollbars,\n 'references-editable': mergedConfig.isEditable,\n 'references-sidebar': mergedConfig.showSidebar,\n 'references-sidebar-mobile-open': isSidebarOpen,\n 'references-classic': mergedConfig.layout === 'classic',\n },\n $attrs.class,\n ]\"\n :dir=\"apiReferenceLocalization.direction.value\"\n :lang=\"documentLang\">\n <!-- Agent Scalar -->\n <AgentScalarDrawer\n v-if=\"agent.agentEnabled.value\"\n :agentScalarConfiguration=\"configList[activeSlug]?.agent\"\n :externalUrls=\"mergedConfig.externalUrls\"\n :workspaceStore />\n\n <!-- Mobile Header and Sidebar when in modern layout -->\n\n <MobileHeader\n v-if=\"mergedConfig.layout === 'modern'\"\n :breadcrumb=\"breadcrumb\"\n :isSidebarOpen=\"isSidebarOpen\"\n :showSidebar=\"mergedConfig.showSidebar\"\n @toggleSidebar=\"() => (isSidebarOpen = !isSidebarOpen)\">\n <template #search>\n <SearchButton\n v-if=\"!mergedConfig.hideSearch\"\n class=\"my-2\"\n :document=\"activeSearchableDocument\"\n :eventBus=\"eventBus\"\n :hideModels=\"mergedConfig.hideModels\"\n :modelsSectionLabel=\"mergedConfig.modelsSectionLabel\"\n :searchHotKey=\"mergedConfig.searchHotKey\"\n :showSidebar=\"mergedConfig.showSidebar\" />\n </template>\n <template #sidebar=\"{ sidebarClasses }\">\n <ScalarSidebar\n v-if=\"mergedConfig.showSidebar && mergedConfig.layout === 'modern'\"\n :aria-label=\"\n apiReferenceLocalization.translate('navigation.sidebarFor', {\n name:\n workspaceStore.workspace.activeDocument?.info?.title ?? '',\n })\n \"\n class=\"t-doc__sidebar\"\n :class=\"sidebarClasses\"\n :isExpanded=\"sidebarState.isExpanded\"\n :isSelected=\"sidebarState.isSelected\"\n :items=\"sidebarItems\"\n layout=\"reference\"\n :options=\"sidebarOptions\"\n role=\"navigation\"\n @selectItem=\"(id) => handleSelectSidebarEntry(id, 'sidebar')\"\n @toggleGroup=\"\n (id: string) =>\n sidebarState.setExpanded(id, !sidebarState.isExpanded(id))\n \">\n <template #header>\n <!-- Wrap in a div when slot is filled -->\n <DocumentSelector\n v-if=\"documentOptionList.length > 1\"\n :modelValue=\"activeSlug\"\n :options=\"documentOptionList\"\n @update:modelValue=\"changeSelectedDocument\" />\n\n <!-- Search -->\n <div\n v-if=\"!mergedConfig.hideSearch\"\n class=\"flex gap-1.5 px-3 pt-3\">\n <SearchButton\n :document=\"activeSearchableDocument\"\n :eventBus=\"eventBus\"\n :hideModels=\"mergedConfig.hideModels\"\n :modelsSectionLabel=\"mergedConfig.modelsSectionLabel\"\n :searchHotKey=\"mergedConfig.searchHotKey\" />\n\n <AgentScalarButton v-if=\"agent.agentEnabled.value\" />\n </div>\n\n <!-- Sidebar Start -->\n <slot\n name=\"sidebar-start\"\n v-bind=\"slotProps\" />\n </template>\n <template #before>\n <!-- AsyncAPI protocol + server filters (only render with >1 choice) -->\n <AsyncApiSidebarFilters\n v-model:protocol=\"selectedProtocol\"\n v-model:server=\"selectedServer\"\n :document=\"activeAsyncApiDocument\" />\n <ScalarSidebarSection\n v-if=\"activeAsyncApiDocument\"\n class=\"asyncapi-sidebar-document-section\">\n Document\n </ScalarSidebarSection>\n </template>\n <template #footer>\n <slot\n name=\"sidebar-end\"\n v-bind=\"slotProps\">\n <!-- We default the sidebar footer to the standard scalar elements -->\n <ScalarSidebarFooter class=\"darklight-reference\">\n <OpenApiClientButton\n v-if=\"!mergedConfig.hideClientButton && !showMCPButton\"\n buttonSource=\"sidebar\"\n :integration=\"mergedConfig._integration\"\n :isDevelopment=\"isDevelopment\"\n :url=\"documentUrl\" />\n <OpenMCPButton\n v-if=\"showMCPButton\"\n :config=\"mergedConfig.mcp\"\n :externalUrls=\"mergedConfig.externalUrls\"\n :isDevelopment=\"isDevelopment\"\n :url=\"documentUrl\"\n :workspace=\"workspaceStore\" />\n <template #description>\n <a\n class=\"no-underline hover:underline\"\n href=\"https://www.scalar.com\"\n target=\"_blank\">\n {{\n apiReferenceLocalization.translate(\n 'footer.poweredByScalar',\n )\n }}\n </a>\n </template>\n <!-- Override the dark mode toggle slot to hide it -->\n <template #toggle>\n <ScalarColorModeToggleButton\n v-if=\"\n !mergedConfig.hideDarkModeToggle &&\n !mergedConfig.forceDarkModeState\n \"\n :modelValue=\"colorMode === 'dark'\"\n @update:modelValue=\"() => toggleColorMode()\" />\n <span v-else />\n </template>\n </ScalarSidebarFooter>\n </slot>\n </template>\n </ScalarSidebar>\n </template>\n </MobileHeader>\n\n <!-- Primary Content -->\n <main\n :aria-label=\"\n apiReferenceLocalization.translate('navigation.mainContent', {\n name: workspaceStore.workspace.activeDocument?.info?.title ?? '',\n })\n \"\n class=\"references-rendered\"\n :inert=\"agent.showAgent.value\">\n <Content\n :authStore=\"clientStore.auth\"\n :clientDocument=\"clientStore.workspace.activeDocument\"\n :document=\"workspaceStore.workspace.activeDocument\"\n :documentSlug=\"activeSlug\"\n :environment\n :eventBus\n :expandedItems=\"sidebarState.expandedItems.value\"\n :headingSlugGenerator=\"\n mergedConfig.generateHeadingSlug ??\n ((heading) => `${activeSlug}/description/${heading.slug}`)\n \"\n :infoSectionId\n :items=\"sidebarItems\"\n :options=\"mergedConfig\"\n :xScalarDefaultClient=\"\n clientStore.workspace['x-scalar-default-client']\n \"\n :xScalarDefaultExample=\"\n clientStore.workspace['x-scalar-default-example']\n \">\n <template #start>\n <!-- Placeholder intersection observer that emits an empty string to clear the hash when scrolled to the top -->\n <div ref=\"documentStartRef\" />\n\n <DeveloperTools\n v-if=\"workspaceStore.workspace.activeDocument\"\n v-model:overrides=\"configurationOverrides\"\n class=\"references-developer-tools\"\n :configuration=\"mergedConfig\"\n :externalUrls=\"mergedConfig.externalUrls\"\n :workspace=\"workspaceStore\" />\n\n <ClassicHeader v-if=\"mergedConfig.layout === 'classic'\">\n <div class=\"w-64 empty:hidden\">\n <DocumentSelector\n v-if=\"documentOptionList.length > 1\"\n :modelValue=\"activeSlug\"\n :options=\"documentOptionList\"\n @update:modelValue=\"changeSelectedDocument\" />\n </div>\n <SearchButton\n v-if=\"!mergedConfig.hideSearch\"\n class=\"t-doc__sidebar max-w-64\"\n :document=\"activeSearchableDocument\"\n :eventBus=\"eventBus\"\n :hideModels=\"mergedConfig.hideModels\"\n :modelsSectionLabel=\"mergedConfig.modelsSectionLabel\"\n :searchHotKey=\"mergedConfig.searchHotKey\" />\n <template #dark-mode-toggle>\n <ScalarColorModeToggleIcon\n v-if=\"\n !mergedConfig.hideDarkModeToggle &&\n !mergedConfig.forceDarkModeState\n \"\n class=\"text-c-2 hover:text-c-1\"\n :mode=\"colorMode\"\n style=\"transform: scale(1.4)\"\n variant=\"icon\"\n @click=\"() => toggleColorMode()\" />\n </template>\n </ClassicHeader>\n <slot\n name=\"content-start\"\n v-bind=\"slotProps\" />\n </template>\n <!-- TODO: Remove this; we no longer directly support an inline editor -->\n <template\n v-if=\"mergedConfig.isEditable\"\n #empty-state>\n <slot\n name=\"editor-placeholder\"\n v-bind=\"slotProps\" />\n </template>\n <template #end>\n <slot\n name=\"content-end\"\n v-bind=\"slotProps\" />\n </template>\n </Content>\n </main>\n <!-- Optional Footer -->\n <div\n v-if=\"$slots.footer\"\n class=\"references-footer\">\n <slot\n name=\"footer\"\n v-bind=\"slotProps\" />\n </div>\n <!-- Client Modal mount point -->\n <div ref=\"modal\" />\n </div>\n <ScalarToasts />\n </div>\n</template>\n\n<style>\n/* Add base styles to the body. Removed browser default margins for a better experience. */\n@layer scalar-base {\n body {\n margin: 0;\n background-color: var(--scalar-background-1);\n }\n}\n/** Used to check if css is loaded */\n:root {\n --scalar-loaded-api-reference: true;\n}\n\n.asyncapi-sidebar-document-section > .group\\/spacer-after {\n height: 0;\n}\n</style>\n<style scoped>\n/* Configurable Layout Variables */\n@layer scalar-config {\n .scalar-api-reference {\n /* The header height */\n --refs-header-height: calc(\n var(--scalar-custom-header-height, 0px) + var(--scalar-header-height, 0px)\n );\n /* The offset of visible references content (minus headers) */\n --refs-viewport-offset: calc(\n var(--refs-header-height, 0px) + var(--refs-content-offset, 0px)\n );\n /* The calculated height of visible references content (minus headers) */\n --refs-viewport-height: calc(\n var(--full-height, 100dvh) - var(--refs-viewport-offset, 0px)\n );\n /* The width of the sidebar */\n --refs-sidebar-width: var(--scalar-sidebar-width, 0px);\n /* The height of the sidebar */\n --refs-sidebar-height: calc(\n var(--full-height, 100dvh) - var(--refs-header-height, 0px)\n );\n /* The maximum width of the content column */\n --refs-content-max-width: var(--scalar-content-max-width, 1540px);\n }\n\n .scalar-api-reference.references-classic {\n /* Classic layout is wider */\n --refs-content-max-width: var(--scalar-content-max-width, 1420px);\n min-height: 100dvh;\n --refs-sidebar-width: 0;\n }\n}\n.t-doc__sidebar {\n z-index: 10;\n}\n\n/* ----------------------------------------------------- */\n/* References Layout */\n.references-layout {\n /* Try to fill the container */\n min-height: 100dvh;\n min-width: 100%;\n max-width: 100%;\n flex: 1;\n\n /*\n Calculated by a resize observer and set in the style attribute\n Falls back to the viewport height\n */\n --full-height: 100dvh;\n\n /* Grid layout */\n display: grid;\n grid-template-rows: var(--scalar-header-height, 0px) repeat(2, auto);\n grid-template-columns: auto 1fr;\n grid-template-areas:\n 'header header'\n 'navigation rendered'\n 'footer footer';\n\n background: var(--scalar-background-1);\n}\n\n.references-editor {\n grid-area: editor;\n display: flex;\n min-width: 0;\n background: var(--scalar-background-1);\n}\n\n.references-rendered {\n position: relative;\n grid-area: rendered;\n min-width: 0;\n background: var(--scalar-background-1);\n}\n.scalar-api-reference.references-classic,\n.references-classic .references-rendered {\n height: initial !important;\n max-height: initial !important;\n}\n\n@layer scalar-config {\n .references-sidebar {\n /* Set a default width if references are enabled */\n --refs-sidebar-width: var(--scalar-sidebar-width, 288px);\n }\n}\n\n/* Footer */\n.references-footer {\n grid-area: footer;\n}\n/* ----------------------------------------------------- */\n/* Responsive / Mobile Layout */\n\n/*\n * Stop just below the `lg` breakpoint (1000px). The sidebar visibility is driven\n * by Tailwind's `lg:` variant, which is `min-width: 1000px` and therefore treats\n * exactly 1000px as desktop. A `max-width: 1000px` query would make the grid\n * switch to the mobile (stacked) layout at the very same width, so the desktop\n * sidebar would render on top of the content. `width < 1000px` is the exact\n * complement of `lg:` (`width >= 1000px`), keeping the two in sync.\n */\n@media (width < 1000px) {\n /* Keep toolbar hidden on mobile without forcing desktop display mode. */\n .references-developer-tools {\n display: none;\n }\n\n /* Stack view on mobile */\n .references-layout {\n /* Adjust the sidebar height to the viewport height minus the header height */\n --refs-sidebar-height: calc(\n var(--full-height, 100dvh) - var(--scalar-custom-header-height, 0px)\n );\n\n grid-template-columns: 100%;\n grid-template-rows: var(--scalar-header-height, 0px) 0px auto auto;\n\n grid-template-areas:\n 'header'\n 'navigation'\n 'rendered'\n 'footer';\n }\n .references-editable {\n grid-template-areas:\n 'header'\n 'navigation'\n 'editor';\n }\n\n .references-rendered {\n position: static;\n }\n}\n</style>\n<style scoped>\n/**\n* Sidebar CSS for standalone\n* TODO: @brynn move this to the sidebar block OR the ApiReferenceStandalone component\n* when the new elements are available\n*/\n/* Match the layout breakpoint above so the mobile header height is only applied below `lg`. */\n@media (width < 1000px) {\n .scalar-api-references-standalone-mobile:not(.references-classic) {\n --scalar-header-height: 50px;\n }\n}\n</style>\n<style scoped>\n.darklight-reference {\n width: 100%;\n margin-top: auto;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,IAAM,UAAA;AAEN,IAAe,OAAO,WAAW,YAC/B,SAAQ,KAAK,yBAAyB,UAAS;;;;;EAwHjD,MAAM,QAAQ;EAiBd,MAAM,EAAE,oBAAoB,cAAa;;;;;;EAOzC,MAAM,gBAAA;;;;;;;;EASN,MAAM,sBAAsB,IAAI,MAAK;AACrC,kBAAgB;AACd,uBAAoB,QAAQ,wBAAuB;IACpD;EAED,MAAM,WAAW,wBAAwB,EAAE,OAAO,eAAe,CAAA;EACjE,MAAM,gBAAgB,IAAI,MAAK;;;;;;;AAQ/B,qBAAmB,OAAO,CAAA;;;;;;;EAS1B,MAAM,aAAa,eAAe,wBAAwB,MAAM,cAAc,CAAA;EAE9E,MAAM,kBAAk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A,IAAA,mBAAA,IAAA,KAAA;KAGrB,mBAAmB,OAAA;eAAV;MAAJ,KAAI;;;IAEX,YAAgB,MAAA,aAAA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Badge/Badge.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Badge.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Badge/Badge.vue"],"names":[],"mappings":"AAgEA,KAAK,WAAW,GAAG;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAC;AA0DF,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAK/C,QAAA,MAAM,UAAU,kSAEd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -2,7 +2,7 @@ import _plugin_vue_export_helper_default from "../../_virtual/_plugin-vue_export
|
|
|
2
2
|
import Badge_vue_vue_type_script_setup_true_lang_default from "./Badge.vue.script.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
//#region src/components/Badge/Badge.vue
|
|
5
|
-
var Badge_default = /* @__PURE__ */ _plugin_vue_export_helper_default(Badge_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
5
|
+
var Badge_default = /* @__PURE__ */ _plugin_vue_export_helper_default(Badge_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-3f3e4ac3"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { Badge_default as default };
|
|
8
8
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.vue.js","names":[],"sources":["../../../src/components/Badge/Badge.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue'\n\nconst { color } = defineProps<{\n color?: string\n}>()\n\nconst badgeStyle = computed(() =>\n color\n ? {\n
|
|
1
|
+
{"version":3,"file":"Badge.vue.js","names":[],"sources":["../../../src/components/Badge/Badge.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { useBindCx } from '@scalar/use-hooks/useBindCx'\nimport { computed } from 'vue'\n\nconst { color } = defineProps<{\n color?: string\n}>()\n\n// Merge fallthrough classes via `cx` so consumer classes can override the base styles.\ndefineOptions({ inheritAttrs: false })\n\nconst { cx } = useBindCx()\n\nconst badgeStyle = computed(() =>\n color\n ? {\n backgroundColor: color,\n color: `color-mix(in srgb, ${color}, black 40%)`,\n }\n : undefined,\n)\n</script>\n\n<template>\n <div\n v-bind=\"\n cx(\n 'badge inline-block rounded-2xl border bg-b-2 px-1.5 py-0.5 text-c-2 text-sm',\n )\n \"\n :style=\"badgeStyle\">\n <slot />\n </div>\n</template>\n\n<style scoped>\n/* Colour variants are keyed on the `text-*` class a consumer passes in. */\n.badge.text-orange {\n background: color-mix(in srgb, var(--scalar-color-orange), transparent 90%);\n border: transparent;\n}\n.badge.text-yellow {\n background: color-mix(in srgb, var(--scalar-color-yellow), transparent 90%);\n border: transparent;\n}\n.badge.text-red {\n background: color-mix(in srgb, var(--scalar-color-red), transparent 90%);\n border: transparent;\n}\n.badge.text-purple {\n background: color-mix(in srgb, var(--scalar-color-purple), transparent 90%);\n border: transparent;\n}\n.badge.text-green {\n background: color-mix(in srgb, var(--scalar-color-green), transparent 90%);\n border: transparent;\n}\n</style>\n"],"mappings":""}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { computed, createElementBlock, defineComponent,
|
|
1
|
+
import { computed, createElementBlock, defineComponent, mergeProps, openBlock, renderSlot, unref } from "vue";
|
|
2
|
+
import { useBindCx } from "@scalar/use-hooks/useBindCx";
|
|
2
3
|
//#region src/components/Badge/Badge.vue?vue&type=script&setup=true&lang.ts
|
|
3
4
|
var Badge_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
5
|
+
inheritAttrs: false,
|
|
4
6
|
__name: "Badge",
|
|
5
7
|
props: { color: {} },
|
|
6
8
|
setup(__props) {
|
|
9
|
+
const { cx } = useBindCx();
|
|
7
10
|
const badgeStyle = computed(() => __props.color ? {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
} :
|
|
11
|
+
backgroundColor: __props.color,
|
|
12
|
+
color: `color-mix(in srgb, ${__props.color}, black 40%)`
|
|
13
|
+
} : void 0);
|
|
11
14
|
return (_ctx, _cache) => {
|
|
12
|
-
return openBlock(), createElementBlock("div", {
|
|
13
|
-
class: "badge",
|
|
14
|
-
style: normalizeStyle(badgeStyle.value)
|
|
15
|
-
}, [renderSlot(_ctx.$slots, "default", {}, void 0, true)], 4);
|
|
15
|
+
return openBlock(), createElementBlock("div", mergeProps(unref(cx)("badge inline-block rounded-2xl border bg-b-2 px-1.5 py-0.5 text-c-2 text-sm"), { style: badgeStyle.value }), [renderSlot(_ctx.$slots, "default", {}, void 0, true)], 16);
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
18
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.vue.script.js","names":[],"sources":["../../../src/components/Badge/Badge.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue'\n\nconst { color } = defineProps<{\n color?: string\n}>()\n\nconst badgeStyle = computed(() =>\n color\n ? {\n
|
|
1
|
+
{"version":3,"file":"Badge.vue.script.js","names":[],"sources":["../../../src/components/Badge/Badge.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { useBindCx } from '@scalar/use-hooks/useBindCx'\nimport { computed } from 'vue'\n\nconst { color } = defineProps<{\n color?: string\n}>()\n\n// Merge fallthrough classes via `cx` so consumer classes can override the base styles.\ndefineOptions({ inheritAttrs: false })\n\nconst { cx } = useBindCx()\n\nconst badgeStyle = computed(() =>\n color\n ? {\n backgroundColor: color,\n color: `color-mix(in srgb, ${color}, black 40%)`,\n }\n : undefined,\n)\n</script>\n\n<template>\n <div\n v-bind=\"\n cx(\n 'badge inline-block rounded-2xl border bg-b-2 px-1.5 py-0.5 text-c-2 text-sm',\n )\n \"\n :style=\"badgeStyle\">\n <slot />\n </div>\n</template>\n\n<style scoped>\n/* Colour variants are keyed on the `text-*` class a consumer passes in. */\n.badge.text-orange {\n background: color-mix(in srgb, var(--scalar-color-orange), transparent 90%);\n border: transparent;\n}\n.badge.text-yellow {\n background: color-mix(in srgb, var(--scalar-color-yellow), transparent 90%);\n border: transparent;\n}\n.badge.text-red {\n background: color-mix(in srgb, var(--scalar-color-red), transparent 90%);\n border: transparent;\n}\n.badge.text-purple {\n background: color-mix(in srgb, var(--scalar-color-purple), transparent 90%);\n border: transparent;\n}\n.badge.text-green {\n background: color-mix(in srgb, var(--scalar-color-green), transparent 90%);\n border: transparent;\n}\n</style>\n"],"mappings":";;;;;;;;EAWA,MAAM,EAAE,OAAO,WAAU;EAEzB,MAAM,aAAa,eACjB,QAAA,QACI;GACE,iBAAiB,QAAA;GACjB,OAAO,sBAAsB,QAAA,MAAM;GACrC,GACA,KAAA,EACN;;uBAIE,mBAQM,OARN,WACiB,MAAA,GAAE,CAAA,8EAAA,EAAA,EAKhB,OAAO,WAAA,OAAU,CAAA,EAAA,CAClB,WAAQ,KAAA,QAAA,WAAA,EAAA,EAAA,KAAA,GAAA,KAAA,CAAA,EAAA,GAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Operation.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/AsyncApi/Operation.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Operation.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/AsyncApi/Operation.vue"],"names":[],"mappings":"AAoLA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAClE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAEV,0BAA0B,EAC3B,MAAM,4CAA4C,CAAA;AAQnD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAA;AAOrF,gFAAgF;AAChF,KAAK,gBAAgB,GAAG,2BAA2B,CAAA;AAEnD,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,0BAA0B,CAAA;IACrC,QAAQ,EAAE,gBAAgB,CAAA;IAC1B,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,OAAO,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAA;IACnC,4EAA4E;IAC5E,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACxC,CAAC;AAwMF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -2,7 +2,7 @@ import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_exp
|
|
|
2
2
|
import Operation_vue_vue_type_script_setup_true_lang_default from "./Operation.vue.script.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
//#region src/components/Content/AsyncApi/Operation.vue
|
|
5
|
-
var Operation_default = /* @__PURE__ */ _plugin_vue_export_helper_default(Operation_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
5
|
+
var Operation_default = /* @__PURE__ */ _plugin_vue_export_helper_default(Operation_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-91a717db"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { Operation_default as default };
|
|
8
8
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Operation.vue.js","names":[],"sources":["../../../../src/components/Content/AsyncApi/Operation.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport type { AsyncApiDocument } from '@scalar/types/asyncapi/3.1'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type {\n TraversedAsyncApiMessage,\n TraversedAsyncApiOperation,\n} from '@scalar/workspace-store/schemas/navigation'\nimport { computed, useId, useTemplateRef } from 'vue'\n\nimport { Anchor } from '@/components/Anchor'\nimport { SectionHeaderTag } from '@/components/Section'\nimport { useIntersection } from '@/hooks/use-intersection'\n\nimport type { AsyncApiSchemaRenderOptions } from './helpers/async-api-render-options'\nimport { filterChildrenByType } from './helpers/filter-children-by-type'\nimport { pickHeading } from './helpers/pick-heading'\nimport { resolveAsyncApiOperation } from './helpers/resolve-async-api-nodes'\nimport Message from './Message.vue'\n\n/** Subset of the configuration the nested `Message`/`Schema` renderers need. */\ntype OperationOptions = AsyncApiSchemaRenderOptions\n\nconst {\n operation,\n document,\n eventBus,\n options,\n expandedItems = {},\n} = defineProps<{\n operation: TraversedAsyncApiOperation\n document: AsyncApiDocument\n eventBus: WorkspaceEventBus | null\n options?: Partial<OperationOptions>\n /** Map of navigation item id to expanded state, shared with the sidebar. */\n expandedItems?: Record<string, boolean>\n}>()\n\nconst headerId = useId()\nconst section = useTemplateRef<HTMLElement>('section')\n\nuseIntersection(section, () =>\n eventBus?.emit('intersecting:nav-item', { id: operation.id }),\n)\n\n/**\n * Resolve the operation from the document so we can read its summary/description.\n * Operation traits are merged in (matching the channel connection UI) so trait-only\n * fields render as part of the operation.\n */\nconst resolvedOperation = computed(() =>\n resolveAsyncApiOperation(document, operation.operationName),\n)\n\n/** Heading prefers title, then summary, then the operation map key. */\nconst headingText = computed(() =>\n pickHeading(\n resolvedOperation.value?.title,\n operation.title,\n operation.operationName,\n ),\n)\n\nconst description = computed(\n () =>\n resolvedOperation.value?.description ||\n resolvedOperation.value?.summary ||\n '',\n)\n\n/** Only the message children of this operation. */\nconst messages = computed(() =>\n filterChildrenByType<TraversedAsyncApiMessage>(\n operation.children,\n 'asyncapi-message',\n ),\n)\n</script>\n\n<template>\n <div\n :id=\"operation.id\"\n ref=\"section\"\n class=\"operation\"\n :class=\"`operation--${operation.action}`\">\n <div class=\"operation-header\">\n <span\n class=\"operation-action\"\n :class=\"`operation-action--${operation.action}`\">\n {{ operation.action }}\n </span>\n <Anchor\n @copyAnchorUrl=\"\n () => eventBus?.emit('copy-url:nav-item', { id: operation.id })\n \">\n <SectionHeaderTag\n :id=\"headerId\"\n class=\"operation-title\"\n :level=\"3\">\n {{ headingText }}\n </SectionHeaderTag>\n </Anchor>\n </div>\n\n <ScalarMarkdown\n v-if=\"description\"\n class=\"operation-description\"\n :value=\"description\"\n withImages />\n\n <Message\n v-for=\"message in messages\"\n :key=\"message.id\"\n :document=\"document\"\n :eventBus=\"eventBus\"\n :expandedItems=\"expandedItems\"\n :message=\"message\"\n :options=\"options\" />\n </div>\n</template>\n\n<style scoped>\n.operation {\n margin-top: 32px;\n scroll-margin-top: var(--refs-viewport-offset);\n}\n\n.operation-header {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n.operation-title {\n font-size: var(--scalar-heading-3);\n font-weight: var(--scalar-semibold);\n color: var(--scalar-color-1);\n}\n\n/* Filled, color-coded pill carries the primary send/receive signal. */\n.operation-action {\n text-transform: uppercase;\n font-size: var(--scalar-mini);\n font-weight: var(--scalar-semibold);\n letter-spacing: 0.05em;\n border-radius: 12px;\n padding: 2px 8px;\n display: inline-flex;\n align-items: center;\n}\n.operation-action--send {\n color: var(--scalar-color-blue);\n background: color-mix(in srgb, var(--scalar-color-blue), transparent 88%);\n}\n.operation-action--receive {\n color: var(--scalar-color-green);\n background: color-mix(in srgb, var(--scalar-color-green), transparent 88%);\n}\n\n.operation-description {\n text-align: left;\n margin-top: 4px;\n}\n/* Space the first message accordion away from the operation header/description. */\n.operation > :deep(.message) {\n margin-top: 12px;\n}\n</style>\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"Operation.vue.js","names":[],"sources":["../../../../src/components/Content/AsyncApi/Operation.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport type { AsyncApiDocument } from '@scalar/types/asyncapi/3.1'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type {\n TraversedAsyncApiMessage,\n TraversedAsyncApiOperation,\n} from '@scalar/workspace-store/schemas/navigation'\nimport { computed, useId, useTemplateRef } from 'vue'\n\nimport { Anchor } from '@/components/Anchor'\nimport { SectionHeaderTag } from '@/components/Section'\nimport OperationScopes from '@/features/Operation/components/OperationScopes.vue'\nimport { useIntersection } from '@/hooks/use-intersection'\n\nimport type { AsyncApiSchemaRenderOptions } from './helpers/async-api-render-options'\nimport { filterChildrenByType } from './helpers/filter-children-by-type'\nimport { getAsyncApiRequiredSecurity } from './helpers/get-async-api-required-security'\nimport { pickHeading } from './helpers/pick-heading'\nimport { resolveAsyncApiOperation } from './helpers/resolve-async-api-nodes'\nimport Message from './Message.vue'\n\n/** Subset of the configuration the nested `Message`/`Schema` renderers need. */\ntype OperationOptions = AsyncApiSchemaRenderOptions\n\nconst {\n operation,\n document,\n eventBus,\n options,\n expandedItems = {},\n} = defineProps<{\n operation: TraversedAsyncApiOperation\n document: AsyncApiDocument\n eventBus: WorkspaceEventBus | null\n options?: Partial<OperationOptions>\n /** Map of navigation item id to expanded state, shared with the sidebar. */\n expandedItems?: Record<string, boolean>\n}>()\n\nconst headerId = useId()\nconst section = useTemplateRef<HTMLElement>('section')\n\nuseIntersection(section, () =>\n eventBus?.emit('intersecting:nav-item', { id: operation.id }),\n)\n\n/**\n * Resolve the operation from the document so we can read its summary/description.\n * Operation traits are merged in (matching the channel connection UI) so trait-only\n * fields render as part of the operation.\n */\nconst resolvedOperation = computed(() =>\n resolveAsyncApiOperation(document, operation.operationName),\n)\n\n/** Heading prefers title, then summary, then the operation map key. */\nconst headingText = computed(() =>\n pickHeading(\n resolvedOperation.value?.title,\n operation.title,\n operation.operationName,\n ),\n)\n\nconst description = computed(\n () =>\n resolvedOperation.value?.description ||\n resolvedOperation.value?.summary ||\n '',\n)\n\n/** Only the message children of this operation. */\nconst messages = computed(() =>\n filterChildrenByType<TraversedAsyncApiMessage>(\n operation.children,\n 'asyncapi-message',\n ),\n)\n\n/** OAuth scopes required by this operation, rendered below the description. */\nconst requiredSecurity = computed(() =>\n getAsyncApiRequiredSecurity(document, resolvedOperation.value),\n)\n</script>\n\n<template>\n <div\n :id=\"operation.id\"\n ref=\"section\"\n class=\"operation\"\n :class=\"`operation--${operation.action}`\">\n <div class=\"operation-header\">\n <span\n class=\"operation-action\"\n :class=\"`operation-action--${operation.action}`\">\n {{ operation.action }}\n </span>\n <Anchor\n @copyAnchorUrl=\"\n () => eventBus?.emit('copy-url:nav-item', { id: operation.id })\n \">\n <SectionHeaderTag\n :id=\"headerId\"\n class=\"operation-title\"\n :level=\"3\">\n {{ headingText }}\n </SectionHeaderTag>\n </Anchor>\n </div>\n\n <ScalarMarkdown\n v-if=\"description\"\n class=\"operation-description\"\n :value=\"description\"\n withImages />\n\n <OperationScopes :requiredSecurity=\"requiredSecurity\" />\n\n <Message\n v-for=\"message in messages\"\n :key=\"message.id\"\n :document=\"document\"\n :eventBus=\"eventBus\"\n :expandedItems=\"expandedItems\"\n :message=\"message\"\n :options=\"options\" />\n </div>\n</template>\n\n<style scoped>\n.operation {\n margin-top: 32px;\n scroll-margin-top: var(--refs-viewport-offset);\n}\n\n.operation-header {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n.operation-title {\n font-size: var(--scalar-heading-3);\n font-weight: var(--scalar-semibold);\n color: var(--scalar-color-1);\n}\n\n/* Filled, color-coded pill carries the primary send/receive signal. */\n.operation-action {\n text-transform: uppercase;\n font-size: var(--scalar-mini);\n font-weight: var(--scalar-semibold);\n letter-spacing: 0.05em;\n border-radius: 12px;\n padding: 2px 8px;\n display: inline-flex;\n align-items: center;\n}\n.operation-action--send {\n color: var(--scalar-color-blue);\n background: color-mix(in srgb, var(--scalar-color-blue), transparent 88%);\n}\n.operation-action--receive {\n color: var(--scalar-color-green);\n background: color-mix(in srgb, var(--scalar-color-green), transparent 88%);\n}\n\n.operation-description {\n text-align: left;\n margin-top: 4px;\n}\n/* Space the first message accordion away from the operation header/description. */\n.operation > :deep(.message) {\n margin-top: 12px;\n}\n</style>\n"],"mappings":""}
|
|
@@ -4,6 +4,8 @@ import Anchor_default from "../../Anchor/Anchor.vue.js";
|
|
|
4
4
|
import { filterChildrenByType } from "./helpers/filter-children-by-type.js";
|
|
5
5
|
import { pickHeading } from "./helpers/pick-heading.js";
|
|
6
6
|
import { resolveAsyncApiOperation } from "./helpers/resolve-async-api-nodes.js";
|
|
7
|
+
import OperationScopes_default from "../../../features/Operation/components/OperationScopes.vue.js";
|
|
8
|
+
import { getAsyncApiRequiredSecurity } from "./helpers/get-async-api-required-security.js";
|
|
7
9
|
import Message_default from "./Message.vue.js";
|
|
8
10
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, normalizeClass, openBlock, renderList, toDisplayString, unref, useId, useTemplateRef, withCtx } from "vue";
|
|
9
11
|
import { ScalarMarkdown } from "@scalar/components/markdown";
|
|
@@ -34,6 +36,8 @@ var Operation_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defi
|
|
|
34
36
|
const description = computed(() => resolvedOperation.value?.description || resolvedOperation.value?.summary || "");
|
|
35
37
|
/** Only the message children of this operation. */
|
|
36
38
|
const messages = computed(() => filterChildrenByType(__props.operation.children, "asyncapi-message"));
|
|
39
|
+
/** OAuth scopes required by this operation, rendered below the description. */
|
|
40
|
+
const requiredSecurity = computed(() => getAsyncApiRequiredSecurity(__props.document, resolvedOperation.value));
|
|
37
41
|
return (_ctx, _cache) => {
|
|
38
42
|
return openBlock(), createElementBlock("div", {
|
|
39
43
|
id: __props.operation.id,
|
|
@@ -58,6 +62,7 @@ var Operation_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defi
|
|
|
58
62
|
value: description.value,
|
|
59
63
|
withImages: ""
|
|
60
64
|
}, null, 8, ["value"])) : createCommentVNode("", true),
|
|
65
|
+
createVNode(OperationScopes_default, { requiredSecurity: requiredSecurity.value }, null, 8, ["requiredSecurity"]),
|
|
61
66
|
(openBlock(true), createElementBlock(Fragment, null, renderList(messages.value, (message) => {
|
|
62
67
|
return openBlock(), createBlock(Message_default, {
|
|
63
68
|
key: message.id,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Operation.vue.script.js","names":[],"sources":["../../../../src/components/Content/AsyncApi/Operation.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport type { AsyncApiDocument } from '@scalar/types/asyncapi/3.1'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type {\n TraversedAsyncApiMessage,\n TraversedAsyncApiOperation,\n} from '@scalar/workspace-store/schemas/navigation'\nimport { computed, useId, useTemplateRef } from 'vue'\n\nimport { Anchor } from '@/components/Anchor'\nimport { SectionHeaderTag } from '@/components/Section'\nimport { useIntersection } from '@/hooks/use-intersection'\n\nimport type { AsyncApiSchemaRenderOptions } from './helpers/async-api-render-options'\nimport { filterChildrenByType } from './helpers/filter-children-by-type'\nimport { pickHeading } from './helpers/pick-heading'\nimport { resolveAsyncApiOperation } from './helpers/resolve-async-api-nodes'\nimport Message from './Message.vue'\n\n/** Subset of the configuration the nested `Message`/`Schema` renderers need. */\ntype OperationOptions = AsyncApiSchemaRenderOptions\n\nconst {\n operation,\n document,\n eventBus,\n options,\n expandedItems = {},\n} = defineProps<{\n operation: TraversedAsyncApiOperation\n document: AsyncApiDocument\n eventBus: WorkspaceEventBus | null\n options?: Partial<OperationOptions>\n /** Map of navigation item id to expanded state, shared with the sidebar. */\n expandedItems?: Record<string, boolean>\n}>()\n\nconst headerId = useId()\nconst section = useTemplateRef<HTMLElement>('section')\n\nuseIntersection(section, () =>\n eventBus?.emit('intersecting:nav-item', { id: operation.id }),\n)\n\n/**\n * Resolve the operation from the document so we can read its summary/description.\n * Operation traits are merged in (matching the channel connection UI) so trait-only\n * fields render as part of the operation.\n */\nconst resolvedOperation = computed(() =>\n resolveAsyncApiOperation(document, operation.operationName),\n)\n\n/** Heading prefers title, then summary, then the operation map key. */\nconst headingText = computed(() =>\n pickHeading(\n resolvedOperation.value?.title,\n operation.title,\n operation.operationName,\n ),\n)\n\nconst description = computed(\n () =>\n resolvedOperation.value?.description ||\n resolvedOperation.value?.summary ||\n '',\n)\n\n/** Only the message children of this operation. */\nconst messages = computed(() =>\n filterChildrenByType<TraversedAsyncApiMessage>(\n operation.children,\n 'asyncapi-message',\n ),\n)\n</script>\n\n<template>\n <div\n :id=\"operation.id\"\n ref=\"section\"\n class=\"operation\"\n :class=\"`operation--${operation.action}`\">\n <div class=\"operation-header\">\n <span\n class=\"operation-action\"\n :class=\"`operation-action--${operation.action}`\">\n {{ operation.action }}\n </span>\n <Anchor\n @copyAnchorUrl=\"\n () => eventBus?.emit('copy-url:nav-item', { id: operation.id })\n \">\n <SectionHeaderTag\n :id=\"headerId\"\n class=\"operation-title\"\n :level=\"3\">\n {{ headingText }}\n </SectionHeaderTag>\n </Anchor>\n </div>\n\n <ScalarMarkdown\n v-if=\"description\"\n class=\"operation-description\"\n :value=\"description\"\n withImages />\n\n <Message\n v-for=\"message in messages\"\n :key=\"message.id\"\n :document=\"document\"\n :eventBus=\"eventBus\"\n :expandedItems=\"expandedItems\"\n :message=\"message\"\n :options=\"options\" />\n </div>\n</template>\n\n<style scoped>\n.operation {\n margin-top: 32px;\n scroll-margin-top: var(--refs-viewport-offset);\n}\n\n.operation-header {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n.operation-title {\n font-size: var(--scalar-heading-3);\n font-weight: var(--scalar-semibold);\n color: var(--scalar-color-1);\n}\n\n/* Filled, color-coded pill carries the primary send/receive signal. */\n.operation-action {\n text-transform: uppercase;\n font-size: var(--scalar-mini);\n font-weight: var(--scalar-semibold);\n letter-spacing: 0.05em;\n border-radius: 12px;\n padding: 2px 8px;\n display: inline-flex;\n align-items: center;\n}\n.operation-action--send {\n color: var(--scalar-color-blue);\n background: color-mix(in srgb, var(--scalar-color-blue), transparent 88%);\n}\n.operation-action--receive {\n color: var(--scalar-color-green);\n background: color-mix(in srgb, var(--scalar-color-green), transparent 88%);\n}\n\n.operation-description {\n text-align: left;\n margin-top: 4px;\n}\n/* Space the first message accordion away from the operation header/description. */\n.operation > :deep(.message) {\n margin-top: 12px;\n}\n</style>\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Operation.vue.script.js","names":[],"sources":["../../../../src/components/Content/AsyncApi/Operation.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarMarkdown } from '@scalar/components/markdown'\nimport type { AsyncApiDocument } from '@scalar/types/asyncapi/3.1'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type {\n TraversedAsyncApiMessage,\n TraversedAsyncApiOperation,\n} from '@scalar/workspace-store/schemas/navigation'\nimport { computed, useId, useTemplateRef } from 'vue'\n\nimport { Anchor } from '@/components/Anchor'\nimport { SectionHeaderTag } from '@/components/Section'\nimport OperationScopes from '@/features/Operation/components/OperationScopes.vue'\nimport { useIntersection } from '@/hooks/use-intersection'\n\nimport type { AsyncApiSchemaRenderOptions } from './helpers/async-api-render-options'\nimport { filterChildrenByType } from './helpers/filter-children-by-type'\nimport { getAsyncApiRequiredSecurity } from './helpers/get-async-api-required-security'\nimport { pickHeading } from './helpers/pick-heading'\nimport { resolveAsyncApiOperation } from './helpers/resolve-async-api-nodes'\nimport Message from './Message.vue'\n\n/** Subset of the configuration the nested `Message`/`Schema` renderers need. */\ntype OperationOptions = AsyncApiSchemaRenderOptions\n\nconst {\n operation,\n document,\n eventBus,\n options,\n expandedItems = {},\n} = defineProps<{\n operation: TraversedAsyncApiOperation\n document: AsyncApiDocument\n eventBus: WorkspaceEventBus | null\n options?: Partial<OperationOptions>\n /** Map of navigation item id to expanded state, shared with the sidebar. */\n expandedItems?: Record<string, boolean>\n}>()\n\nconst headerId = useId()\nconst section = useTemplateRef<HTMLElement>('section')\n\nuseIntersection(section, () =>\n eventBus?.emit('intersecting:nav-item', { id: operation.id }),\n)\n\n/**\n * Resolve the operation from the document so we can read its summary/description.\n * Operation traits are merged in (matching the channel connection UI) so trait-only\n * fields render as part of the operation.\n */\nconst resolvedOperation = computed(() =>\n resolveAsyncApiOperation(document, operation.operationName),\n)\n\n/** Heading prefers title, then summary, then the operation map key. */\nconst headingText = computed(() =>\n pickHeading(\n resolvedOperation.value?.title,\n operation.title,\n operation.operationName,\n ),\n)\n\nconst description = computed(\n () =>\n resolvedOperation.value?.description ||\n resolvedOperation.value?.summary ||\n '',\n)\n\n/** Only the message children of this operation. */\nconst messages = computed(() =>\n filterChildrenByType<TraversedAsyncApiMessage>(\n operation.children,\n 'asyncapi-message',\n ),\n)\n\n/** OAuth scopes required by this operation, rendered below the description. */\nconst requiredSecurity = computed(() =>\n getAsyncApiRequiredSecurity(document, resolvedOperation.value),\n)\n</script>\n\n<template>\n <div\n :id=\"operation.id\"\n ref=\"section\"\n class=\"operation\"\n :class=\"`operation--${operation.action}`\">\n <div class=\"operation-header\">\n <span\n class=\"operation-action\"\n :class=\"`operation-action--${operation.action}`\">\n {{ operation.action }}\n </span>\n <Anchor\n @copyAnchorUrl=\"\n () => eventBus?.emit('copy-url:nav-item', { id: operation.id })\n \">\n <SectionHeaderTag\n :id=\"headerId\"\n class=\"operation-title\"\n :level=\"3\">\n {{ headingText }}\n </SectionHeaderTag>\n </Anchor>\n </div>\n\n <ScalarMarkdown\n v-if=\"description\"\n class=\"operation-description\"\n :value=\"description\"\n withImages />\n\n <OperationScopes :requiredSecurity=\"requiredSecurity\" />\n\n <Message\n v-for=\"message in messages\"\n :key=\"message.id\"\n :document=\"document\"\n :eventBus=\"eventBus\"\n :expandedItems=\"expandedItems\"\n :message=\"message\"\n :options=\"options\" />\n </div>\n</template>\n\n<style scoped>\n.operation {\n margin-top: 32px;\n scroll-margin-top: var(--refs-viewport-offset);\n}\n\n.operation-header {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n.operation-title {\n font-size: var(--scalar-heading-3);\n font-weight: var(--scalar-semibold);\n color: var(--scalar-color-1);\n}\n\n/* Filled, color-coded pill carries the primary send/receive signal. */\n.operation-action {\n text-transform: uppercase;\n font-size: var(--scalar-mini);\n font-weight: var(--scalar-semibold);\n letter-spacing: 0.05em;\n border-radius: 12px;\n padding: 2px 8px;\n display: inline-flex;\n align-items: center;\n}\n.operation-action--send {\n color: var(--scalar-color-blue);\n background: color-mix(in srgb, var(--scalar-color-blue), transparent 88%);\n}\n.operation-action--receive {\n color: var(--scalar-color-green);\n background: color-mix(in srgb, var(--scalar-color-green), transparent 88%);\n}\n\n.operation-description {\n text-align: left;\n margin-top: 4px;\n}\n/* Space the first message accordion away from the operation header/description. */\n.operation > :deep(.message) {\n margin-top: 12px;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;EAwCA,MAAM,WAAW,OAAM;EACvB,MAAM,UAAU,eAA4B,UAAS;AAErD,kBAAgB,eACd,QAAA,UAAU,KAAK,yBAAyB,EAAE,IAAI,QAAA,UAAU,IAAI,CAAC,CAC/D;;;;;;EAOA,MAAM,oBAAoB,eACxB,yBAAyB,QAAA,UAAU,QAAA,UAAU,cAAc,CAC7D;;EAGA,MAAM,cAAc,eAClB,YACE,kBAAkB,OAAO,OACzB,QAAA,UAAU,OACV,QAAA,UAAU,cACX,CACH;EAEA,MAAM,cAAc,eAEhB,kBAAkB,OAAO,eACzB,kBAAkB,OAAO,WACzB,GACJ;;EAGA,MAAM,WAAW,eACf,qBACE,QAAA,UAAU,UACV,mBACD,CACH;;EAGA,MAAM,mBAAmB,eACvB,4BAA4B,QAAA,UAAU,kBAAkB,MAAM,CAChE;;uBAIE,mBAwCM,OAAA;IAvCH,IAAI,QAAA,UAAU;aACX;IAAJ,KAAI;I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