@scalar/api-reference 1.59.3 → 1.60.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 +16 -0
- package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.d.ts +4 -4
- package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.d.ts.map +1 -1
- package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.js +1 -1
- package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.js.map +1 -1
- package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.script.js +14 -17
- package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.script.js.map +1 -1
- package/dist/blocks/scalar-info-block/components/IntroductionLoading.vue.d.ts +12 -0
- package/dist/blocks/scalar-info-block/components/IntroductionLoading.vue.d.ts.map +1 -0
- package/dist/blocks/scalar-info-block/components/IntroductionLoading.vue.js +9 -0
- package/dist/blocks/scalar-info-block/components/IntroductionLoading.vue.js.map +1 -0
- package/dist/blocks/scalar-info-block/components/IntroductionLoading.vue.script.js +63 -0
- package/dist/blocks/scalar-info-block/components/IntroductionLoading.vue.script.js.map +1 -0
- package/dist/browser/chunks/AgentScalarChatInterface-CesFQ_Ax.js +27 -0
- package/dist/browser/chunks/ScalarTextInput.vue-C14zmVNI.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-BZzcBkVp.js +99 -0
- package/dist/browser/chunks/{modal-Bh68oUy_.js → modal-LBDjZSmM.js} +2 -2
- package/dist/browser/chunks/money-cashier-receipt.svg-CJL8C2gs.js +1 -1
- package/dist/browser/chunks/money-currency-dollar-pay.svg-VdBplCTx.js +1 -1
- package/dist/browser/chunks/money-graph-arrow-increase.svg-DcRov3zk.js +1 -1
- package/dist/browser/chunks/money-graph-bar-chart-increase.svg-Cc7KxjX-.js +1 -1
- package/dist/browser/chunks/nature-ecology-leaf.svg-DR3cTZxt.js +1 -1
- package/dist/browser/chunks/phone-telephone.svg-DyY0gUlk.js +1 -1
- package/dist/browser/chunks/programming-bug.svg-BHLT-Qhp.js +1 -1
- package/dist/browser/chunks/programming-cloud.svg-B6YW33ba.js +1 -1
- package/dist/browser/chunks/programming-computer-database-server.svg-B6o5Sdn-.js +1 -1
- package/dist/browser/chunks/programming-computer-database.svg-Cl7OVtpJ.js +1 -1
- package/dist/browser/chunks/programming-module-four-layout.svg-BQrerL1x.js +1 -1
- package/dist/browser/chunks/programming-module-three.svg-B2KTQzBM.js +1 -1
- package/dist/browser/chunks/programming-module.svg-CiID7kPm.js +1 -1
- package/dist/browser/chunks/programming-script-code.svg-D1M5rtkN.js +1 -1
- package/dist/browser/chunks/runtime-core.esm-bundler-Byrbbu5Q.js +1 -1
- package/dist/browser/chunks/shopping-cart.svg-BEegiIR9.js +1 -1
- package/dist/browser/chunks/shopping-gift-present.svg-BUHwuLix.js +1 -1
- package/dist/browser/chunks/shopping-shipping-box-parcel-package.svg-D6fxWdYx.js +1 -1
- package/dist/browser/chunks/tag-new-circle.svg-jsg1bGs0.js +1 -1
- package/dist/browser/chunks/travel-map-earth-globe.svg-ClbMiU-f.js +1 -1
- package/dist/browser/chunks/vendor-wW8jg8wN.js +306 -0
- package/dist/browser/standalone.esm.js +6 -6
- package/dist/browser/standalone.js +249 -248
- 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 +37 -9
- package/dist/components/ApiReference.vue.script.js.map +1 -1
- package/dist/components/Content/AsyncApi/AsyncApiTraversedEntry.vue.d.ts.map +1 -1
- package/dist/components/Content/AsyncApi/AsyncApiTraversedEntry.vue.js.map +1 -1
- package/dist/components/Content/AsyncApi/AsyncApiTraversedEntry.vue.script.js +0 -1
- package/dist/components/Content/AsyncApi/AsyncApiTraversedEntry.vue.script.js.map +1 -1
- package/dist/components/Content/Content.vue.d.ts +4 -2
- package/dist/components/Content/Content.vue.d.ts.map +1 -1
- package/dist/components/Content/Content.vue.js.map +1 -1
- package/dist/components/Content/Content.vue.script.js +18 -1
- package/dist/components/Content/Content.vue.script.js.map +1 -1
- package/dist/components/Content/Operations/TraversedEntry.vue.d.ts.map +1 -1
- package/dist/components/Content/Operations/TraversedEntry.vue.js.map +1 -1
- package/dist/components/Content/Operations/TraversedEntry.vue.script.js +0 -1
- package/dist/components/Content/Operations/TraversedEntry.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.js +1 -1
- package/dist/components/Content/Schema/Schema.vue.js.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.script.js +22 -2
- package/dist/components/Content/Schema/Schema.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +0 -6
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.js.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.script.js +16 -2
- package/dist/components/Content/Schema/SchemaProperty.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/helpers/should-display-description.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/should-display-description.js +1 -1
- package/dist/components/Content/Schema/helpers/should-display-description.js.map +1 -1
- package/dist/components/Content/Tags/Tag.vue.d.ts +0 -1
- package/dist/components/Content/Tags/Tag.vue.d.ts.map +1 -1
- package/dist/components/Content/Tags/Tag.vue.js.map +1 -1
- package/dist/components/Content/Tags/Tag.vue.script.js +0 -3
- package/dist/components/Content/Tags/Tag.vue.script.js.map +1 -1
- package/dist/components/Content/Tags/components/ModernLayout.vue.d.ts +0 -1
- package/dist/components/Content/Tags/components/ModernLayout.vue.d.ts.map +1 -1
- package/dist/components/Content/Tags/components/ModernLayout.vue.js +1 -1
- package/dist/components/Content/Tags/components/ModernLayout.vue.js.map +1 -1
- package/dist/components/Content/Tags/components/ModernLayout.vue.script.js +0 -3
- package/dist/components/Content/Tags/components/ModernLayout.vue.script.js.map +1 -1
- package/dist/components/Content/Tags/components/TagSection.vue.d.ts +0 -1
- package/dist/components/Content/Tags/components/TagSection.vue.d.ts.map +1 -1
- package/dist/components/Content/Tags/components/TagSection.vue.js.map +1 -1
- package/dist/components/Content/Tags/components/TagSection.vue.script.js +5 -6
- package/dist/components/Content/Tags/components/TagSection.vue.script.js.map +1 -1
- package/dist/components/RenderPlugins/RenderPluginView.vue.d.ts +11 -0
- package/dist/components/RenderPlugins/RenderPluginView.vue.d.ts.map +1 -0
- package/dist/components/RenderPlugins/RenderPluginView.vue.js +7 -0
- package/dist/components/RenderPlugins/RenderPluginView.vue.js.map +1 -0
- package/dist/components/RenderPlugins/RenderPluginView.vue.script.js +45 -0
- package/dist/components/RenderPlugins/RenderPluginView.vue.script.js.map +1 -0
- package/dist/components/RenderPlugins/RenderPlugins.vue.d.ts +5 -1
- package/dist/components/RenderPlugins/RenderPlugins.vue.d.ts.map +1 -1
- package/dist/components/RenderPlugins/RenderPlugins.vue.js.map +1 -1
- package/dist/components/RenderPlugins/RenderPlugins.vue.script.js +17 -22
- package/dist/components/RenderPlugins/RenderPlugins.vue.script.js.map +1 -1
- package/dist/components/Section/SectionContent.vue.d.ts +1 -6
- package/dist/components/Section/SectionContent.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionContent.vue.js +7 -2
- package/dist/components/Section/SectionContent.vue.js.map +1 -1
- package/dist/components/Section/SectionHeader.vue.d.ts +3 -4
- 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 +5 -10
- package/dist/components/Section/SectionHeader.vue.script.js.map +1 -1
- package/dist/helpers/lazy-bus.d.ts +10 -0
- package/dist/helpers/lazy-bus.d.ts.map +1 -1
- package/dist/helpers/lazy-bus.js +22 -1
- package/dist/helpers/lazy-bus.js.map +1 -1
- package/dist/plugins/index.d.ts +1 -1
- package/dist/plugins/index.d.ts.map +1 -1
- package/dist/plugins/plugin-manager.d.ts +27 -2
- package/dist/plugins/plugin-manager.d.ts.map +1 -1
- package/dist/plugins/plugin-manager.js +32 -2
- package/dist/plugins/plugin-manager.js.map +1 -1
- package/dist/style.css +424 -249
- package/dist/vue-styles.css +141 -143
- package/package.json +13 -13
- package/dist/browser/chunks/AgentScalarChatInterface-Dv0uBVU9.js +0 -27
- package/dist/browser/chunks/ScalarTextInput.vue-ZmlutrTU.js +0 -27
- package/dist/browser/chunks/modal-DHI6k89v.js +0 -66
- package/dist/browser/chunks/vendor-Cx_C-51y.js +0 -338
- package/dist/components/LoadingSkeleton.vue.d.ts +0 -9
- package/dist/components/LoadingSkeleton.vue.d.ts.map +0 -1
- package/dist/components/LoadingSkeleton.vue.js +0 -9
- package/dist/components/LoadingSkeleton.vue.js.map +0 -1
- package/dist/components/LoadingSkeleton.vue.script.js +0 -20
- package/dist/components/LoadingSkeleton.vue.script.js.map +0 -1
- package/dist/components/Section/SectionContent.vue.script.js +0 -23
- package/dist/components/Section/SectionContent.vue.script.js.map +0 -1
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import _plugin_vue_export_helper_default from "../../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
-
import SectionContent_vue_vue_type_script_setup_true_lang_default from "./SectionContent.vue.script.js";
|
|
3
2
|
/* empty css */
|
|
3
|
+
import { createElementBlock, openBlock, renderSlot } from "vue";
|
|
4
4
|
//#region src/components/Section/SectionContent.vue
|
|
5
|
-
var
|
|
5
|
+
var _sfc_main = {};
|
|
6
|
+
var _hoisted_1 = { class: "section-content" };
|
|
7
|
+
function _sfc_render(_ctx, _cache) {
|
|
8
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [renderSlot(_ctx.$slots, "default", {}, void 0, true)]);
|
|
9
|
+
}
|
|
10
|
+
var SectionContent_default = /* @__PURE__ */ _plugin_vue_export_helper_default(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-6101128d"]]);
|
|
6
11
|
//#endregion
|
|
7
12
|
export { SectionContent_default as default };
|
|
8
13
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SectionContent.vue.js","names":[],"sources":["../../../src/components/Section/SectionContent.vue"],"sourcesContent":["<
|
|
1
|
+
{"version":3,"file":"SectionContent.vue.js","names":[],"sources":["../../../src/components/Section/SectionContent.vue"],"sourcesContent":["<template>\n <div class=\"section-content\">\n <slot />\n </div>\n</template>\n\n<style scoped>\n@container narrow-references-container (max-width: 900px) {\n .section-content--with-columns {\n flex-direction: column;\n gap: 24px;\n }\n}\n</style>\n"],"mappings":";;;;;mBACO,OAAM,mBAAiB;;qBAA5B,mBAEM,OAFN,YAEM,CADJ,WAAQ,KAAA,QAAA,WAAA,EAAA,EAAA,KAAA,GAAA,KAAA,CAAA,CAAA"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
|
-
loading?: boolean;
|
|
3
2
|
tight?: boolean;
|
|
4
3
|
removeMargin?: boolean;
|
|
5
4
|
};
|
|
6
|
-
declare var
|
|
5
|
+
declare var __VLS_1: {}, __VLS_3: {};
|
|
7
6
|
type __VLS_Slots = {} & {
|
|
8
|
-
default?: (props: typeof
|
|
7
|
+
default?: (props: typeof __VLS_1) => any;
|
|
9
8
|
} & {
|
|
10
|
-
links?: (props: typeof
|
|
9
|
+
links?: (props: typeof __VLS_3) => any;
|
|
11
10
|
};
|
|
12
11
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
12
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SectionHeader.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Section/SectionHeader.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SectionHeader.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Section/SectionHeader.vue"],"names":[],"mappings":"AAmDA,KAAK,WAAW,GAAG;IACjB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,CAAC;AA0CF,QAAA,IAAI,OAAO,IAAU,EAAE,OAAO,IAAW,CAAE;AAC3C,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAC5C;IAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAK7C,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 SectionHeader_vue_vue_type_script_setup_true_lang_default from "./SectionHeader.vue.script.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
//#region src/components/Section/SectionHeader.vue
|
|
5
|
-
var SectionHeader_default = /* @__PURE__ */ _plugin_vue_export_helper_default(SectionHeader_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
5
|
+
var SectionHeader_default = /* @__PURE__ */ _plugin_vue_export_helper_default(SectionHeader_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-09a18ec6"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { SectionHeader_default as default };
|
|
8
8
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SectionHeader.vue.js","names":[],"sources":["../../../src/components/Section/SectionHeader.vue"],"sourcesContent":["<script setup lang=\"ts\">\
|
|
1
|
+
{"version":3,"file":"SectionHeader.vue.js","names":[],"sources":["../../../src/components/Section/SectionHeader.vue"],"sourcesContent":["<script setup lang=\"ts\">\nconst { tight, removeMargin = false } = defineProps<{\n tight?: boolean\n removeMargin?: boolean\n}>()\n</script>\n\n<template>\n <div class=\"section-header-wrapper xl:gap-12\">\n <div\n class=\"section-header\"\n :class=\"{ tight, 'mb-3': !removeMargin }\">\n <slot />\n </div>\n <slot\n v-if=\"$slots.links\"\n name=\"links\" />\n </div>\n</template>\n\n<style scoped>\n@reference \"@/style.css\";\n\n.section-header-wrapper {\n display: grid;\n grid-template-columns: 1fr;\n}\n\n@variant xl {\n .section-header-wrapper {\n grid-template-columns: repeat(2, 1fr);\n }\n}\n\n.section-header {\n font-size: var(--font-size, var(--scalar-heading-1));\n font-weight: var(--font-weight, var(--scalar-bold));\n /* prettier-ignore */\n color: var(--scalar-color-1);\n word-wrap: break-word;\n line-height: 1.45;\n margin-top: 0;\n}\n\n.section-header.tight {\n margin-bottom: 6px;\n}\n</style>\n"],"mappings":""}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { createBlock, createCommentVNode, createElementBlock, defineComponent, normalizeClass, openBlock, renderSlot } from "vue";
|
|
1
|
+
import { createCommentVNode, createElementBlock, createElementVNode, defineComponent, normalizeClass, openBlock, renderSlot } from "vue";
|
|
3
2
|
//#region src/components/Section/SectionHeader.vue?vue&type=script&setup=true&lang.ts
|
|
4
3
|
var _hoisted_1 = { class: "section-header-wrapper xl:gap-12" };
|
|
5
4
|
var SectionHeader_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
6
5
|
__name: "SectionHeader",
|
|
7
6
|
props: {
|
|
8
|
-
loading: { type: Boolean },
|
|
9
7
|
tight: { type: Boolean },
|
|
10
8
|
removeMargin: {
|
|
11
9
|
type: Boolean,
|
|
@@ -14,13 +12,10 @@ var SectionHeader_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
|
|
|
14
12
|
},
|
|
15
13
|
setup(__props) {
|
|
16
14
|
return (_ctx, _cache) => {
|
|
17
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"mb-3": !__props.removeMargin
|
|
22
|
-
}])
|
|
23
|
-
}, [renderSlot(_ctx.$slots, "default", {}, void 0, true)], 2)), _ctx.$slots.links ? renderSlot(_ctx.$slots, "links", { key: 2 }, void 0, true) : createCommentVNode("", true)]);
|
|
15
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [createElementVNode("div", { class: normalizeClass(["section-header", {
|
|
16
|
+
tight: __props.tight,
|
|
17
|
+
"mb-3": !__props.removeMargin
|
|
18
|
+
}]) }, [renderSlot(_ctx.$slots, "default", {}, void 0, true)], 2), _ctx.$slots.links ? renderSlot(_ctx.$slots, "links", { key: 0 }, void 0, true) : createCommentVNode("", true)]);
|
|
24
19
|
};
|
|
25
20
|
}
|
|
26
21
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SectionHeader.vue.script.js","names":["$slots"],"sources":["../../../src/components/Section/SectionHeader.vue"],"sourcesContent":["<script setup lang=\"ts\">\
|
|
1
|
+
{"version":3,"file":"SectionHeader.vue.script.js","names":["$slots"],"sources":["../../../src/components/Section/SectionHeader.vue"],"sourcesContent":["<script setup lang=\"ts\">\nconst { tight, removeMargin = false } = defineProps<{\n tight?: boolean\n removeMargin?: boolean\n}>()\n</script>\n\n<template>\n <div class=\"section-header-wrapper xl:gap-12\">\n <div\n class=\"section-header\"\n :class=\"{ tight, 'mb-3': !removeMargin }\">\n <slot />\n </div>\n <slot\n v-if=\"$slots.links\"\n name=\"links\" />\n </div>\n</template>\n\n<style scoped>\n@reference \"@/style.css\";\n\n.section-header-wrapper {\n display: grid;\n grid-template-columns: 1fr;\n}\n\n@variant xl {\n .section-header-wrapper {\n grid-template-columns: repeat(2, 1fr);\n }\n}\n\n.section-header {\n font-size: var(--font-size, var(--scalar-heading-1));\n font-weight: var(--font-weight, var(--scalar-bold));\n /* prettier-ignore */\n color: var(--scalar-color-1);\n word-wrap: break-word;\n line-height: 1.45;\n margin-top: 0;\n}\n\n.section-header.tight {\n margin-bottom: 6px;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;uBAQE,mBASM,OATN,YASM,CARJ,mBAIM,OAAA,EAHJ,OAAK,eAAA,CAAC,kBAAgB;IAAA,OACZ,QAAA;IAAK,QAAA,CAAW,QAAA;IAAY,CAAA,CAAA,EAAA,EAAA,CACtC,WAAQ,KAAA,QAAA,WAAA,EAAA,EAAA,KAAA,GAAA,KAAA,CAAA,EAAA,EAAA,EAGFA,KAAAA,OAAO,QADf,WAEiB,KAAA,QAAA,SAAA,EAAA,KAAA,GAAA,EAAA,KAAA,GAAA,KAAA,GAAA,mBAAA,IAAA,KAAA,CAAA,CAAA"}
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
/** Tracks when the initial load is complete. */
|
|
2
2
|
export declare const firstLazyLoadComplete: import("vue").Ref<boolean, boolean>;
|
|
3
|
+
/**
|
|
4
|
+
* The id of the element we are currently scrolling to (the anchor target).
|
|
5
|
+
*
|
|
6
|
+
* Schema properties live inside collapsible disclosures that are not part of the
|
|
7
|
+
* navigation tree, so the lazy bus cannot expand them the way it expands sidebar
|
|
8
|
+
* parents. Instead we publish the active target here and let each collapsible
|
|
9
|
+
* schema disclosure open itself when its breadcrumb is on the path to the target.
|
|
10
|
+
* This is what makes deep links to hidden (collapsed) schema properties work.
|
|
11
|
+
*/
|
|
12
|
+
export declare const scrollTargetId: import("vue").Ref<string, string>;
|
|
3
13
|
export declare const getLazyPlaceholderHeight: (id: string) => number | undefined;
|
|
4
14
|
export declare const setLazyPlaceholderHeight: (id: string, height: number) => void;
|
|
5
15
|
type UnblockFn = () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lazy-bus.d.ts","sourceRoot":"","sources":["../../src/helpers/lazy-bus.ts"],"names":[],"mappings":"AAuBA,gDAAgD;AAChD,eAAO,MAAM,qBAAqB,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helpers/lazy-bus.js
CHANGED
|
@@ -20,6 +20,24 @@ var isRunning = ref(false);
|
|
|
20
20
|
var SCROLL_RETRY_MS = 3e3;
|
|
21
21
|
/** Tracks when the initial load is complete. */
|
|
22
22
|
var firstLazyLoadComplete = ref(false);
|
|
23
|
+
/**
|
|
24
|
+
* The id of the element we are currently scrolling to (the anchor target).
|
|
25
|
+
*
|
|
26
|
+
* Schema properties live inside collapsible disclosures that are not part of the
|
|
27
|
+
* navigation tree, so the lazy bus cannot expand them the way it expands sidebar
|
|
28
|
+
* parents. Instead we publish the active target here and let each collapsible
|
|
29
|
+
* schema disclosure open itself when its breadcrumb is on the path to the target.
|
|
30
|
+
* This is what makes deep links to hidden (collapsed) schema properties work.
|
|
31
|
+
*/
|
|
32
|
+
var scrollTargetId = ref("");
|
|
33
|
+
/**
|
|
34
|
+
* Clears the scroll target once we are done with it, so a stale target cannot
|
|
35
|
+
* re-open a disclosure the user later collapsed (or that remounts). Guarded by
|
|
36
|
+
* the id so a newer navigation that started during the scroll retry is kept.
|
|
37
|
+
*/
|
|
38
|
+
var clearScrollTarget = (id) => {
|
|
39
|
+
if (scrollTargetId.value === id) scrollTargetId.value = "";
|
|
40
|
+
};
|
|
23
41
|
/** List of unique identifiers that are blocking intersection */
|
|
24
42
|
var intersectionBlockers = reactive(/* @__PURE__ */ new Set());
|
|
25
43
|
var onRenderComplete = /* @__PURE__ */ new Set();
|
|
@@ -163,6 +181,7 @@ var scrollToLazy = (id, setExpanded, getEntryById) => {
|
|
|
163
181
|
addLazyCompleteCallback(unfreeze);
|
|
164
182
|
const unblock = blockIntersection();
|
|
165
183
|
const { rawId } = getSchemaParamsFromId(id);
|
|
184
|
+
scrollTargetId.value = id;
|
|
166
185
|
addToPriorityQueue(id);
|
|
167
186
|
addToPriorityQueue(rawId);
|
|
168
187
|
if (item?.children) item.children.slice(0, 2).forEach((child) => addToPriorityQueue(child.id));
|
|
@@ -201,9 +220,11 @@ var tryScroll = (id, stopTime, onComplete, onFailure) => {
|
|
|
201
220
|
const element = document.getElementById(id);
|
|
202
221
|
if (element) {
|
|
203
222
|
element.scrollIntoView({ block: "start" });
|
|
223
|
+
clearScrollTarget(id);
|
|
204
224
|
onComplete();
|
|
205
225
|
} else if (Date.now() < stopTime) requestAnimationFrame(() => tryScroll(id, stopTime, onComplete, onFailure));
|
|
206
226
|
else {
|
|
227
|
+
clearScrollTarget(id);
|
|
207
228
|
onComplete();
|
|
208
229
|
onFailure?.();
|
|
209
230
|
}
|
|
@@ -225,6 +246,6 @@ var freeze = (id) => {
|
|
|
225
246
|
};
|
|
226
247
|
};
|
|
227
248
|
//#endregion
|
|
228
|
-
export { addToPriorityQueue, blockIntersection, firstLazyLoadComplete, getLazyPlaceholderHeight, intersectionEnabled, requestLazyRender, scheduleInitialLoadComplete, scrollToLazy, setLazyPlaceholderHeight, useLazyBus };
|
|
249
|
+
export { addToPriorityQueue, blockIntersection, firstLazyLoadComplete, getLazyPlaceholderHeight, intersectionEnabled, requestLazyRender, scheduleInitialLoadComplete, scrollTargetId, scrollToLazy, setLazyPlaceholderHeight, useLazyBus };
|
|
229
250
|
|
|
230
251
|
//# sourceMappingURL=lazy-bus.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lazy-bus.js","names":[],"sources":["../../src/helpers/lazy-bus.ts"],"sourcesContent":["import { watchDebounced } from '@vueuse/core'\nimport { nanoid } from 'nanoid'\nimport { computed, nextTick, onBeforeUnmount, reactive, ref } from 'vue'\n\nimport { getSchemaParamsFromId } from './id-routing'\n\n/**\n * List of items that are in the priority queue and will be rendered first (e.g. scroll target).\n */\nconst priorityQueue = reactive<Set<string>>(new Set())\n/** List of items that are pending to be loaded (in viewport overscan). */\nconst pendingQueue = reactive<Set<string>>(new Set())\n/** List of items that are already loaded and stay mounted (no eviction). */\nconst readyQueue = reactive<Set<string>>(new Set())\n/**\n * Flag to indicate if the lazy bus is currently running\n * Blocks ID changes while running\n */\nconst isRunning = ref(false)\n\n/** How long tryScroll keeps retrying to find the element (ms). */\nconst SCROLL_RETRY_MS = 3000\n\n/** Tracks when the initial load is complete. */\nexport const firstLazyLoadComplete = ref(false)\n\n/** List of unique identifiers that are blocking intersection */\nconst intersectionBlockers = reactive<Set<string>>(new Set())\n\nconst onRenderComplete = new Set<() => void>()\n\n/** Cached content heights so placeholders can match when not rendered. */\nconst lazyPlaceholderHeights = reactive<Map<string, number>>(new Map())\n\nexport const getLazyPlaceholderHeight = (id: string): number | undefined => lazyPlaceholderHeights.get(id)\n\nexport const setLazyPlaceholderHeight = (id: string, height: number): void => {\n if (!Number.isFinite(height) || height <= 0) {\n return\n }\n lazyPlaceholderHeights.set(id, Math.round(height))\n}\n\n/** Adds a one time callback to be executed when the lazy bus has finished loading */\nconst addLazyCompleteCallback = (callback: (() => void) | undefined) => {\n if (callback) {\n onRenderComplete.add(callback)\n }\n}\n\ntype UnblockFn = () => void\n\n/**\n * Blocks intersection until the returned unblock callback is run.\n * Prevents scroll jump while we render new lazy content.\n */\nexport const blockIntersection = (): UnblockFn => {\n const blockId = nanoid()\n intersectionBlockers.add(blockId)\n\n /** Unblock uses a small delay to ensure the scroll is complete before enabling intersection */\n return () => setTimeout(() => intersectionBlockers.delete(blockId), 100)\n}\n\n/** If there are any pending blocking operations we disable intersection */\nexport const intersectionEnabled = computed(() => intersectionBlockers.size === 0)\n\n/**\n * Processes the full queue: priority first, then pending. Blocks intersection while\n * rendering so the viewport does not jump. No eviction — items stay in readyQueue.\n */\nconst runLazyBus = () => {\n // We always render the lazy bus when the window is undefined (see useLazyBus)\n if (typeof window === 'undefined') {\n return\n }\n\n if (isRunning.value) {\n return\n }\n\n isRunning.value = true\n\n /**\n * Sets all the pending elements into the ready queue\n * After waiting for Vue to update the DOM we execute the callbacks and unblock intersection\n */\n const processQueue = async () => {\n const priorityIds = [...priorityQueue]\n const pendingIds = [...pendingQueue]\n\n if (priorityIds.length === 0 && pendingIds.length === 0) {\n onRenderComplete.forEach((fn) => fn())\n onRenderComplete.clear()\n isRunning.value = false\n firstLazyLoadComplete.value = true\n return\n }\n\n for (const id of priorityIds) {\n readyQueue.add(id)\n priorityQueue.delete(id)\n }\n for (const id of pendingIds) {\n readyQueue.add(id)\n pendingQueue.delete(id)\n }\n\n await nextTick()\n\n onRenderComplete.forEach((fn) => fn())\n onRenderComplete.clear()\n isRunning.value = false\n firstLazyLoadComplete.value = true\n }\n\n if (window.requestIdleCallback) {\n window.requestIdleCallback(processQueue, { timeout: 1500 })\n } else {\n // biome-ignore lint/nursery/noFloatingPromises: Expected floating promise\n nextTick(processQueue)\n }\n}\n\n/**\n * Run the lazy bus when the queue changes and is not currently running\n * Debounce so that multiple changes to the queue are batched together\n *\n * We must run when the priority queue changes because we rely on finish callbacks\n * anytime we request potentially lazy elements. If we don't run when the priority queue changes\n * we may not have a finish callback even though the element is set to load.\n */\nwatchDebounced(\n [() => pendingQueue.size, () => priorityQueue.size, () => isRunning.value],\n () => {\n if ((pendingQueue.size > 0 || priorityQueue.size > 0) && !isRunning.value) {\n runLazyBus()\n }\n },\n { debounce: 300, maxWait: 1500 },\n)\n\n/**\n * We only make elements pending if they are not already in the priority or ready queue\n */\nconst addToPendingQueue = (id: string | undefined) => {\n if (id && !readyQueue.has(id) && !priorityQueue.has(id)) {\n pendingQueue.add(id)\n }\n}\n\n/**\n * Add elements to the priority queue for immediate rendering.\n * We allow adding items already in readyQueue so that callbacks are still triggered,\n * but processQueue will skip actual re-rendering for items already ready.\n */\nexport const addToPriorityQueue = (id: string | undefined) => {\n if (id && !priorityQueue.has(id)) {\n priorityQueue.add(id)\n }\n}\n\n/**\n * Request an item to be rendered (e.g. when it re-enters the overscan zone).\n */\nexport const requestLazyRender = (id: string | undefined, priority = false): void => {\n if (!id || readyQueue.has(id)) {\n return\n }\n if (priority) {\n addToPriorityQueue(id)\n } else {\n addToPendingQueue(id)\n }\n if (!isRunning.value) {\n runLazyBus()\n }\n}\n\n/**\n * Schedules a single run of the lazy bus so that documents with no Lazy components\n * (e.g. no operations, tags, or models) still get firstLazyLoadComplete set and the\n * full-viewport placeholder can be hidden. Call from content root on mount.\n */\nexport const scheduleInitialLoadComplete = (): void => {\n if (typeof window === 'undefined') {\n return\n }\n const delay = 400\n window.setTimeout(() => runLazyBus(), delay)\n}\n\n/** When an element is unmounted we remove it from all queues */\nconst resetLazyElement = (id: string) => {\n priorityQueue.delete(id)\n pendingQueue.delete(id)\n readyQueue.delete(id)\n lazyPlaceholderHeights.delete(id)\n}\n\n// ---------------------------------------------------------------------------\n\n/**\n * Tracks the lazy loading state of an element.\n * Use isReady (or expanded) to decide whether to render the slot or show a placeholder.\n * The element is only added to the queue when it enters the viewport overscan (see Lazy.vue).\n */\nexport function useLazyBus(id: string) {\n onBeforeUnmount(() => {\n resetLazyElement(id)\n })\n\n return {\n isReady: computed(() => typeof window === 'undefined' || priorityQueue.has(id) || readyQueue.has(id)),\n }\n}\n\n/**\n * Scroll to a possibly lazy-loaded element. Expands parents and adds target (and\n * parents) to the priority queue, then scrolls after Vue has flushed.\n */\nexport const scrollToLazy = (\n id: string,\n setExpanded: (id: string, value: boolean) => void,\n getEntryById: (id: string) => { id: string; parent?: { id: string }; children?: { id: string }[] } | undefined,\n) => {\n const item = getEntryById(id)\n\n /**\n * If the element is lazy we must freeze the element so that it does not move until after the next lazy bus run\n * If the element never loads then the scroll onFailure callback will be run to unfreeze the element\n *\n * If the readyQueue does not have the item we must freeze it while it renders\n * If the item has lazy children we must freeze the item while the children are (potentially) loaded\n */\n const isLazy = !readyQueue.has(id) || item?.children?.some((child) => !readyQueue.has(child.id))\n\n const unfreeze = isLazy ? freeze(id) : undefined\n addLazyCompleteCallback(unfreeze)\n\n // Disable intersection while we scroll to the element\n const unblock = blockIntersection()\n const { rawId } = getSchemaParamsFromId(id)\n\n addToPriorityQueue(id)\n addToPriorityQueue(rawId)\n\n // When there are children we ensure the first 2 are loaded\n if (item?.children) {\n item.children.slice(0, 2).forEach((child) => addToPriorityQueue(child.id))\n }\n\n // When there are sibling items we attempt to load the next 2 to better fill the viewport\n if (item?.parent) {\n const parent = getEntryById(item.parent.id)\n const elementIdx = parent?.children?.findIndex((child) => child.id === id)\n if (elementIdx !== undefined && elementIdx >= 0) {\n parent?.children?.slice(elementIdx, elementIdx + 2).forEach((child) => addToPriorityQueue(child.id))\n }\n }\n\n setExpanded(rawId, true)\n /**\n * Recursively expand the parents and set them as a loading priority\n * This ensures all parents will be immediately loaded and open\n */\n const addParents = (currentId: string) => {\n const parent = getEntryById(currentId)?.parent\n if (parent) {\n addToPriorityQueue(parent.id)\n setExpanded(parent.id, true)\n addParents(parent.id)\n }\n }\n /** Must use the rawId as schema params are not in the navigation tree */\n addParents(rawId)\n\n void nextTick(() => {\n tryScroll(id, Date.now() + SCROLL_RETRY_MS, unblock, unfreeze)\n })\n}\n\n/**\n * Tiny wrapper around the scrollIntoView API\n * Retries up to the stopTime in case the element is not yet rendered\n *\n * @param id - The id of the element to scroll to\n * @param stopTime - The time to stop retrying in unix milliseconds\n */\nconst tryScroll = (id: string, stopTime: number, onComplete: UnblockFn, onFailure?: () => void): void => {\n const element = document.getElementById(id)\n if (element) {\n element.scrollIntoView({ block: 'start' })\n onComplete()\n } else if (Date.now() < stopTime) {\n requestAnimationFrame(() => tryScroll(id, stopTime, onComplete, onFailure))\n } else {\n // If the scroll has expired we enable intersection again\n onComplete()\n onFailure?.()\n }\n}\n\nconst freeze = (id: string): (() => void) => {\n let stop = false\n\n /**\n * Runs until the stop flag is set\n * Executes the final frame after stop changes to true\n */\n const runFrame = (stopAfterFrame: boolean) => {\n const element = document.getElementById(id)\n if (element) {\n element.scrollIntoView({ block: 'start' })\n }\n if (!stopAfterFrame) {\n requestAnimationFrame(() => runFrame(stop))\n }\n }\n\n runFrame(false)\n\n return () => {\n stop = true\n }\n}\n"],"mappings":";;;;;;;;AASA,IAAM,gBAAgB,yBAAsB,IAAI,KAAK,CAAC;;AAEtD,IAAM,eAAe,yBAAsB,IAAI,KAAK,CAAC;;AAErD,IAAM,aAA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Z,eAAa;;;AAIjB,IAAM,UAAU,OAA6B;CAC3C,IAAI,OAAO;;;;;CAMX,MAAM,YAAY,mBAA4B;EAC5C,MAAM,UAAU,SAAS,eAAe,GAAG;AAC3C,MAAI,QACF,SAAQ,eAAe,EAAE,OAAO,SAAS,CAAC;AAE5C,MAAI,CAAC,eACH,6BAA4B,SAAS,KAAK,CAAC;;AAI/C,UAAS,MAAM;AAEf,cAAa;AACX,SAAO"}
|
|
1
|
+
{"version":3,"file":"lazy-bus.js","names":[],"sources":["../../src/helpers/lazy-bus.ts"],"sourcesContent":["import { watchDebounced } from '@vueuse/core'\nimport { nanoid } from 'nanoid'\nimport { computed, nextTick, onBeforeUnmount, reactive, ref } from 'vue'\n\nimport { getSchemaParamsFromId } from './id-routing'\n\n/**\n * List of items that are in the priority queue and will be rendered first (e.g. scroll target).\n */\nconst priorityQueue = reactive<Set<string>>(new Set())\n/** List of items that are pending to be loaded (in viewport overscan). */\nconst pendingQueue = reactive<Set<string>>(new Set())\n/** List of items that are already loaded and stay mounted (no eviction). */\nconst readyQueue = reactive<Set<string>>(new Set())\n/**\n * Flag to indicate if the lazy bus is currently running\n * Blocks ID changes while running\n */\nconst isRunning = ref(false)\n\n/** How long tryScroll keeps retrying to find the element (ms). */\nconst SCROLL_RETRY_MS = 3000\n\n/** Tracks when the initial load is complete. */\nexport const firstLazyLoadComplete = ref(false)\n\n/**\n * The id of the element we are currently scrolling to (the anchor target).\n *\n * Schema properties live inside collapsible disclosures that are not part of the\n * navigation tree, so the lazy bus cannot expand them the way it expands sidebar\n * parents. Instead we publish the active target here and let each collapsible\n * schema disclosure open itself when its breadcrumb is on the path to the target.\n * This is what makes deep links to hidden (collapsed) schema properties work.\n */\nexport const scrollTargetId = ref<string>('')\n\n/**\n * Clears the scroll target once we are done with it, so a stale target cannot\n * re-open a disclosure the user later collapsed (or that remounts). Guarded by\n * the id so a newer navigation that started during the scroll retry is kept.\n */\nconst clearScrollTarget = (id: string): void => {\n if (scrollTargetId.value === id) {\n scrollTargetId.value = ''\n }\n}\n\n/** List of unique identifiers that are blocking intersection */\nconst intersectionBlockers = reactive<Set<string>>(new Set())\n\nconst onRenderComplete = new Set<() => void>()\n\n/** Cached content heights so placeholders can match when not rendered. */\nconst lazyPlaceholderHeights = reactive<Map<string, number>>(new Map())\n\nexport const getLazyPlaceholderHeight = (id: string): number | undefined => lazyPlaceholderHeights.get(id)\n\nexport const setLazyPlaceholderHeight = (id: string, height: number): void => {\n if (!Number.isFinite(height) || height <= 0) {\n return\n }\n lazyPlaceholderHeights.set(id, Math.round(height))\n}\n\n/** Adds a one time callback to be executed when the lazy bus has finished loading */\nconst addLazyCompleteCallback = (callback: (() => void) | undefined) => {\n if (callback) {\n onRenderComplete.add(callback)\n }\n}\n\ntype UnblockFn = () => void\n\n/**\n * Blocks intersection until the returned unblock callback is run.\n * Prevents scroll jump while we render new lazy content.\n */\nexport const blockIntersection = (): UnblockFn => {\n const blockId = nanoid()\n intersectionBlockers.add(blockId)\n\n /** Unblock uses a small delay to ensure the scroll is complete before enabling intersection */\n return () => setTimeout(() => intersectionBlockers.delete(blockId), 100)\n}\n\n/** If there are any pending blocking operations we disable intersection */\nexport const intersectionEnabled = computed(() => intersectionBlockers.size === 0)\n\n/**\n * Processes the full queue: priority first, then pending. Blocks intersection while\n * rendering so the viewport does not jump. No eviction — items stay in readyQueue.\n */\nconst runLazyBus = () => {\n // We always render the lazy bus when the window is undefined (see useLazyBus)\n if (typeof window === 'undefined') {\n return\n }\n\n if (isRunning.value) {\n return\n }\n\n isRunning.value = true\n\n /**\n * Sets all the pending elements into the ready queue\n * After waiting for Vue to update the DOM we execute the callbacks and unblock intersection\n */\n const processQueue = async () => {\n const priorityIds = [...priorityQueue]\n const pendingIds = [...pendingQueue]\n\n if (priorityIds.length === 0 && pendingIds.length === 0) {\n onRenderComplete.forEach((fn) => fn())\n onRenderComplete.clear()\n isRunning.value = false\n firstLazyLoadComplete.value = true\n return\n }\n\n for (const id of priorityIds) {\n readyQueue.add(id)\n priorityQueue.delete(id)\n }\n for (const id of pendingIds) {\n readyQueue.add(id)\n pendingQueue.delete(id)\n }\n\n await nextTick()\n\n onRenderComplete.forEach((fn) => fn())\n onRenderComplete.clear()\n isRunning.value = false\n firstLazyLoadComplete.value = true\n }\n\n if (window.requestIdleCallback) {\n window.requestIdleCallback(processQueue, { timeout: 1500 })\n } else {\n // biome-ignore lint/nursery/noFloatingPromises: Expected floating promise\n nextTick(processQueue)\n }\n}\n\n/**\n * Run the lazy bus when the queue changes and is not currently running\n * Debounce so that multiple changes to the queue are batched together\n *\n * We must run when the priority queue changes because we rely on finish callbacks\n * anytime we request potentially lazy elements. If we don't run when the priority queue changes\n * we may not have a finish callback even though the element is set to load.\n */\nwatchDebounced(\n [() => pendingQueue.size, () => priorityQueue.size, () => isRunning.value],\n () => {\n if ((pendingQueue.size > 0 || priorityQueue.size > 0) && !isRunning.value) {\n runLazyBus()\n }\n },\n { debounce: 300, maxWait: 1500 },\n)\n\n/**\n * We only make elements pending if they are not already in the priority or ready queue\n */\nconst addToPendingQueue = (id: string | undefined) => {\n if (id && !readyQueue.has(id) && !priorityQueue.has(id)) {\n pendingQueue.add(id)\n }\n}\n\n/**\n * Add elements to the priority queue for immediate rendering.\n * We allow adding items already in readyQueue so that callbacks are still triggered,\n * but processQueue will skip actual re-rendering for items already ready.\n */\nexport const addToPriorityQueue = (id: string | undefined) => {\n if (id && !priorityQueue.has(id)) {\n priorityQueue.add(id)\n }\n}\n\n/**\n * Request an item to be rendered (e.g. when it re-enters the overscan zone).\n */\nexport const requestLazyRender = (id: string | undefined, priority = false): void => {\n if (!id || readyQueue.has(id)) {\n return\n }\n if (priority) {\n addToPriorityQueue(id)\n } else {\n addToPendingQueue(id)\n }\n if (!isRunning.value) {\n runLazyBus()\n }\n}\n\n/**\n * Schedules a single run of the lazy bus so that documents with no Lazy components\n * (e.g. no operations, tags, or models) still get firstLazyLoadComplete set and the\n * full-viewport placeholder can be hidden. Call from content root on mount.\n */\nexport const scheduleInitialLoadComplete = (): void => {\n if (typeof window === 'undefined') {\n return\n }\n const delay = 400\n window.setTimeout(() => runLazyBus(), delay)\n}\n\n/** When an element is unmounted we remove it from all queues */\nconst resetLazyElement = (id: string) => {\n priorityQueue.delete(id)\n pendingQueue.delete(id)\n readyQueue.delete(id)\n lazyPlaceholderHeights.delete(id)\n}\n\n// ---------------------------------------------------------------------------\n\n/**\n * Tracks the lazy loading state of an element.\n * Use isReady (or expanded) to decide whether to render the slot or show a placeholder.\n * The element is only added to the queue when it enters the viewport overscan (see Lazy.vue).\n */\nexport function useLazyBus(id: string) {\n onBeforeUnmount(() => {\n resetLazyElement(id)\n })\n\n return {\n isReady: computed(() => typeof window === 'undefined' || priorityQueue.has(id) || readyQueue.has(id)),\n }\n}\n\n/**\n * Scroll to a possibly lazy-loaded element. Expands parents and adds target (and\n * parents) to the priority queue, then scrolls after Vue has flushed.\n */\nexport const scrollToLazy = (\n id: string,\n setExpanded: (id: string, value: boolean) => void,\n getEntryById: (id: string) => { id: string; parent?: { id: string }; children?: { id: string }[] } | undefined,\n) => {\n const item = getEntryById(id)\n\n /**\n * If the element is lazy we must freeze the element so that it does not move until after the next lazy bus run\n * If the element never loads then the scroll onFailure callback will be run to unfreeze the element\n *\n * If the readyQueue does not have the item we must freeze it while it renders\n * If the item has lazy children we must freeze the item while the children are (potentially) loaded\n */\n const isLazy = !readyQueue.has(id) || item?.children?.some((child) => !readyQueue.has(child.id))\n\n const unfreeze = isLazy ? freeze(id) : undefined\n addLazyCompleteCallback(unfreeze)\n\n // Disable intersection while we scroll to the element\n const unblock = blockIntersection()\n const { rawId } = getSchemaParamsFromId(id)\n\n // Publish the target so collapsible schema disclosures on the path can open\n // themselves. Schema properties are not in the navigation tree, so this is the\n // only way the scroll target inside a collapsed schema becomes reachable.\n scrollTargetId.value = id\n\n addToPriorityQueue(id)\n addToPriorityQueue(rawId)\n\n // When there are children we ensure the first 2 are loaded\n if (item?.children) {\n item.children.slice(0, 2).forEach((child) => addToPriorityQueue(child.id))\n }\n\n // When there are sibling items we attempt to load the next 2 to better fill the viewport\n if (item?.parent) {\n const parent = getEntryById(item.parent.id)\n const elementIdx = parent?.children?.findIndex((child) => child.id === id)\n if (elementIdx !== undefined && elementIdx >= 0) {\n parent?.children?.slice(elementIdx, elementIdx + 2).forEach((child) => addToPriorityQueue(child.id))\n }\n }\n\n setExpanded(rawId, true)\n /**\n * Recursively expand the parents and set them as a loading priority\n * This ensures all parents will be immediately loaded and open\n */\n const addParents = (currentId: string) => {\n const parent = getEntryById(currentId)?.parent\n if (parent) {\n addToPriorityQueue(parent.id)\n setExpanded(parent.id, true)\n addParents(parent.id)\n }\n }\n /** Must use the rawId as schema params are not in the navigation tree */\n addParents(rawId)\n\n void nextTick(() => {\n tryScroll(id, Date.now() + SCROLL_RETRY_MS, unblock, unfreeze)\n })\n}\n\n/**\n * Tiny wrapper around the scrollIntoView API\n * Retries up to the stopTime in case the element is not yet rendered\n *\n * @param id - The id of the element to scroll to\n * @param stopTime - The time to stop retrying in unix milliseconds\n */\nconst tryScroll = (id: string, stopTime: number, onComplete: UnblockFn, onFailure?: () => void): void => {\n const element = document.getElementById(id)\n if (element) {\n element.scrollIntoView({ block: 'start' })\n clearScrollTarget(id)\n onComplete()\n } else if (Date.now() < stopTime) {\n requestAnimationFrame(() => tryScroll(id, stopTime, onComplete, onFailure))\n } else {\n // If the scroll has expired we enable intersection again\n clearScrollTarget(id)\n onComplete()\n onFailure?.()\n }\n}\n\nconst freeze = (id: string): (() => void) => {\n let stop = false\n\n /**\n * Runs until the stop flag is set\n * Executes the final frame after stop changes to true\n */\n const runFrame = (stopAfterFrame: boolean) => {\n const element = document.getElementById(id)\n if (element) {\n element.scrollIntoView({ block: 'start' })\n }\n if (!stopAfterFrame) {\n requestAnimationFrame(() => runFrame(stop))\n }\n }\n\n runFrame(false)\n\n return () => {\n stop = true\n }\n}\n"],"mappings":";;;;;;;;AASA,IAAM,gBAAgB,yBAAsB,IAAI,KAAK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,YAAuB,cAAiC;CACvG,MAAM,UAAU,SAAS,eAAe,GAAG;AAC3C,KAAI,SAAS;AACX,UAAQ,eAAe,EAAE,OAAO,SAAS,CAAC;AAC1C,oBAAkB,GAAG;AACrB,cAAY;YACH,KAAK,KAAK,GAAG,SACtB,6BAA4B,UAAU,IAAI,UAAU,YAAY,UAAU,CAAC;MACtE;AAEL,oBAAkB,GAAG;AACrB,cAAY;AACZ,eAAa;;;AAIjB,IAAM,UAAU,OAA6B;CAC3C,IAAI,OAAO;;;;;CAMX,MAAM,YAAY,mBAA4B;EAC5C,MAAM,UAAU,SAAS,eAAe,GAAG;AAC3C,MAAI,QACF,SAAQ,eAAe,EAAE,OAAO,SAAS,CAAC;AAE5C,MAAI,CAAC,eACH,6BAA4B,SAAS,KAAK,CAAC;;AAI/C,UAAS,MAAM;AAEf,cAAa;AACX,SAAO"}
|
package/dist/plugins/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { PLUGIN_MANAGER_SYMBOL, usePluginManager } from '../plugins/hooks/usePluginManager.js';
|
|
2
|
-
export { type ApiReferencePlugin, type PluginManager, createPluginManager, } from '../plugins/plugin-manager.js';
|
|
2
|
+
export { type ApiReferencePlugin, type PluginManager, type PluginViewComponent, createPluginManager, } from '../plugins/plugin-manager.js';
|
|
3
3
|
export { persistencePlugin } from './persistence-plugin.js';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugins/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAA;AAC1F,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,mBAAmB,GACpB,MAAM,0BAA0B,CAAA;AAEjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugins/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAA;AAC1F,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,mBAAmB,GACpB,MAAM,0BAA0B,CAAA;AAEjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA"}
|
|
@@ -4,6 +4,19 @@ export type ApiReferencePlugin = OriginalApiReferencePlugin;
|
|
|
4
4
|
type CreatePluginManagerParams = {
|
|
5
5
|
plugins?: ApiReferencePlugin[];
|
|
6
6
|
};
|
|
7
|
+
/** Plugin view slots that can render custom components in the content area */
|
|
8
|
+
declare const PLUGIN_VIEW_NAMES: readonly ["content.start", "content.end"];
|
|
9
|
+
type PluginViewName = (typeof PLUGIN_VIEW_NAMES)[number];
|
|
10
|
+
/** A plugin view component paired with the stable id used for the DOM and sidebar navigation */
|
|
11
|
+
export type PluginViewComponent = ViewComponent & {
|
|
12
|
+
id: string;
|
|
13
|
+
};
|
|
14
|
+
/** A sidebar entry contributed by a plugin view */
|
|
15
|
+
type PluginSidebarEntry = {
|
|
16
|
+
id: string;
|
|
17
|
+
label: string;
|
|
18
|
+
viewName: PluginViewName;
|
|
19
|
+
};
|
|
7
20
|
/**
|
|
8
21
|
* Create the plugin manager store
|
|
9
22
|
*
|
|
@@ -15,9 +28,13 @@ export declare const createPluginManager: ({ plugins }: CreatePluginManagerParam
|
|
|
15
28
|
*/
|
|
16
29
|
getSpecificationExtensions: (name: `x-${string}`) => SpecificationExtension[];
|
|
17
30
|
/**
|
|
18
|
-
* Get all components for a specific view from registered plugins
|
|
31
|
+
* Get all components for a specific view from registered plugins.
|
|
32
|
+
*
|
|
33
|
+
* Each component carries a stable `id` (scoped to the active document slug) so the rendered
|
|
34
|
+
* DOM element and the sidebar entry (see `getSidebarEntries`) share the same id and stay in
|
|
35
|
+
* sync for scroll navigation and deep-linking.
|
|
19
36
|
*/
|
|
20
|
-
getViewComponents: (viewName:
|
|
37
|
+
getViewComponents: (viewName: PluginViewName, documentSlug: string) => PluginViewComponent[];
|
|
21
38
|
/**
|
|
22
39
|
* Notify all plugins that the API Reference has been initialized
|
|
23
40
|
*/
|
|
@@ -34,6 +51,14 @@ export declare const createPluginManager: ({ plugins }: CreatePluginManagerParam
|
|
|
34
51
|
* Get all client plugins provided by registered plugins
|
|
35
52
|
*/
|
|
36
53
|
getApiClientPlugins: () => ClientPlugin[];
|
|
54
|
+
/**
|
|
55
|
+
* Get all sidebar entries contributed by plugin views.
|
|
56
|
+
*
|
|
57
|
+
* Only views that opt in via `sidebar.show` are returned. Each entry's `id` matches the
|
|
58
|
+
* id of the rendered component (see `getViewComponents`), so the API Reference can add it
|
|
59
|
+
* to the sidebar navigation and scrolling/active-tracking work out of the box.
|
|
60
|
+
*/
|
|
61
|
+
getSidebarEntries: (documentSlug: string) => PluginSidebarEntry[];
|
|
37
62
|
};
|
|
38
63
|
export type PluginManager = ReturnType<typeof createPluginManager>;
|
|
39
64
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-manager.d.ts","sourceRoot":"","sources":["../../src/plugins/plugin-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,KAAK,EACV,kBAAkB,IAAI,0BAA0B,EAChD,sBAAsB,EACtB,aAAa,EACd,MAAM,6BAA6B,CAAA;AAEpC,MAAM,MAAM,kBAAkB,GAAG,0BAA0B,CAAA;AAE3D,KAAK,yBAAyB,GAAG;IAC/B,OAAO,CAAC,EAAE,kBAAkB,EAAE,CAAA;CAC/B,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,GAAI,aAAkB,yBAAyB;IAU3E;;OAEG;uCACgC,KAAK,MAAM,EAAE,KAAG,sBAAsB,EAAE;IAc3E
|
|
1
|
+
{"version":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AAU,CAAC,OAAO,mBAAmB,CAAC,CAAA"}
|
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
//#region src/plugins/plugin-manager.ts
|
|
2
|
+
/** Plugin view slots that can render custom components in the content area */
|
|
3
|
+
var PLUGIN_VIEW_NAMES = ["content.start", "content.end"];
|
|
4
|
+
/**
|
|
5
|
+
* Build a stable, unique id for a plugin view component.
|
|
6
|
+
*
|
|
7
|
+
* The same id is used as the DOM element id (so scroll navigation can find it) and as the
|
|
8
|
+
* sidebar navigation entry id (so clicking it scrolls to the element). Keeping both in sync
|
|
9
|
+
* is what lets plugin views participate in the existing scroll-spy and navigation logic.
|
|
10
|
+
*
|
|
11
|
+
* The id is prefixed with the document slug so it matches the navigation id convention. That is
|
|
12
|
+
* what lets URL deep-linking work: `getIdFromUrl` re-prepends the document slug on initial load,
|
|
13
|
+
* so a hash like `plugin-view/<plugin>/<view>/<index>` resolves back to this exact id.
|
|
14
|
+
*/
|
|
15
|
+
var getPluginViewId = (documentSlug, pluginName, viewName, index) => `${documentSlug}/plugin-view/${pluginName}/${viewName}/${index}`;
|
|
2
16
|
/**
|
|
3
17
|
* Create the plugin manager store
|
|
4
18
|
*
|
|
@@ -16,11 +30,16 @@ var createPluginManager = ({ plugins = [] }) => {
|
|
|
16
30
|
for (const plugin of registeredPlugins.values()) for (const extension of plugin.extensions) if (extension.name === name) extensions.push(extension);
|
|
17
31
|
return extensions;
|
|
18
32
|
},
|
|
19
|
-
getViewComponents: (viewName) => {
|
|
33
|
+
getViewComponents: (viewName, documentSlug) => {
|
|
20
34
|
const components = [];
|
|
21
35
|
for (const plugin of registeredPlugins.values()) {
|
|
22
36
|
const viewComponents = plugin.views?.[viewName];
|
|
23
|
-
if (viewComponents)
|
|
37
|
+
if (viewComponents) viewComponents.forEach((component, index) => {
|
|
38
|
+
components.push({
|
|
39
|
+
...component,
|
|
40
|
+
id: getPluginViewId(documentSlug, plugin.name, viewName, index)
|
|
41
|
+
});
|
|
42
|
+
});
|
|
24
43
|
}
|
|
25
44
|
return components;
|
|
26
45
|
},
|
|
@@ -37,6 +56,17 @@ var createPluginManager = ({ plugins = [] }) => {
|
|
|
37
56
|
const apiClientPlugins = [];
|
|
38
57
|
for (const plugin of registeredPlugins.values()) if (plugin.apiClientPlugins) apiClientPlugins.push(...plugin.apiClientPlugins);
|
|
39
58
|
return apiClientPlugins;
|
|
59
|
+
},
|
|
60
|
+
getSidebarEntries: (documentSlug) => {
|
|
61
|
+
const entries = [];
|
|
62
|
+
for (const plugin of registeredPlugins.values()) for (const viewName of PLUGIN_VIEW_NAMES) (plugin.views?.[viewName])?.forEach((component, index) => {
|
|
63
|
+
if (component.sidebar?.show && component.sidebar.label) entries.push({
|
|
64
|
+
id: getPluginViewId(documentSlug, plugin.name, viewName, index),
|
|
65
|
+
label: component.sidebar.label,
|
|
66
|
+
viewName
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
return entries;
|
|
40
70
|
}
|
|
41
71
|
};
|
|
42
72
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-manager.js","names":[],"sources":["../../src/plugins/plugin-manager.ts"],"sourcesContent":["import type { ClientPlugin } from '@scalar/oas-utils/helpers'\nimport type {\n ApiReferencePlugin as OriginalApiReferencePlugin,\n SpecificationExtension,\n ViewComponent,\n} from '@scalar/types/api-reference'\n\nexport type ApiReferencePlugin = OriginalApiReferencePlugin\n\ntype CreatePluginManagerParams = {\n plugins?: ApiReferencePlugin[]\n}\n\n/**\n * Create the plugin manager store\n *\n * This store manages all plugins registered with the API client\n */\nexport const createPluginManager = ({ plugins = [] }: CreatePluginManagerParams) => {\n const registeredPlugins = new Map<string, ReturnType<ApiReferencePlugin>>()\n\n // Register initial plugins\n plugins.forEach((plugin) => {\n const pluginInstance = plugin()\n registeredPlugins.set(pluginInstance.name, pluginInstance)\n })\n\n return {\n /**\n * Get all extensions with the given name from registered plugins\n */\n getSpecificationExtensions: (name: `x-${string}`): SpecificationExtension[] => {\n const extensions: SpecificationExtension[] = []\n\n for (const plugin of registeredPlugins.values()) {\n for (const extension of plugin.extensions) {\n if (extension.name === name) {\n extensions.push(extension)\n }\n }\n }\n\n return extensions\n },\n\n /**\n * Get all components for a specific view from registered plugins\n */\n getViewComponents: (viewName:
|
|
1
|
+
{"version":3,"file":"plugin-manager.js","names":[],"sources":["../../src/plugins/plugin-manager.ts"],"sourcesContent":["import type { ClientPlugin } from '@scalar/oas-utils/helpers'\nimport type {\n ApiReferencePlugin as OriginalApiReferencePlugin,\n SpecificationExtension,\n ViewComponent,\n} from '@scalar/types/api-reference'\n\nexport type ApiReferencePlugin = OriginalApiReferencePlugin\n\ntype CreatePluginManagerParams = {\n plugins?: ApiReferencePlugin[]\n}\n\n/** Plugin view slots that can render custom components in the content area */\nconst PLUGIN_VIEW_NAMES = ['content.start', 'content.end'] as const\n\ntype PluginViewName = (typeof PLUGIN_VIEW_NAMES)[number]\n\n/** A plugin view component paired with the stable id used for the DOM and sidebar navigation */\nexport type PluginViewComponent = ViewComponent & { id: string }\n\n/** A sidebar entry contributed by a plugin view */\ntype PluginSidebarEntry = {\n id: string\n label: string\n viewName: PluginViewName\n}\n\n/**\n * Build a stable, unique id for a plugin view component.\n *\n * The same id is used as the DOM element id (so scroll navigation can find it) and as the\n * sidebar navigation entry id (so clicking it scrolls to the element). Keeping both in sync\n * is what lets plugin views participate in the existing scroll-spy and navigation logic.\n *\n * The id is prefixed with the document slug so it matches the navigation id convention. That is\n * what lets URL deep-linking work: `getIdFromUrl` re-prepends the document slug on initial load,\n * so a hash like `plugin-view/<plugin>/<view>/<index>` resolves back to this exact id.\n */\nconst getPluginViewId = (documentSlug: string, pluginName: string, viewName: PluginViewName, index: number): string =>\n `${documentSlug}/plugin-view/${pluginName}/${viewName}/${index}`\n\n/**\n * Create the plugin manager store\n *\n * This store manages all plugins registered with the API client\n */\nexport const createPluginManager = ({ plugins = [] }: CreatePluginManagerParams) => {\n const registeredPlugins = new Map<string, ReturnType<ApiReferencePlugin>>()\n\n // Register initial plugins\n plugins.forEach((plugin) => {\n const pluginInstance = plugin()\n registeredPlugins.set(pluginInstance.name, pluginInstance)\n })\n\n return {\n /**\n * Get all extensions with the given name from registered plugins\n */\n getSpecificationExtensions: (name: `x-${string}`): SpecificationExtension[] => {\n const extensions: SpecificationExtension[] = []\n\n for (const plugin of registeredPlugins.values()) {\n for (const extension of plugin.extensions) {\n if (extension.name === name) {\n extensions.push(extension)\n }\n }\n }\n\n return extensions\n },\n\n /**\n * Get all components for a specific view from registered plugins.\n *\n * Each component carries a stable `id` (scoped to the active document slug) so the rendered\n * DOM element and the sidebar entry (see `getSidebarEntries`) share the same id and stay in\n * sync for scroll navigation and deep-linking.\n */\n getViewComponents: (viewName: PluginViewName, documentSlug: string): PluginViewComponent[] => {\n const components: PluginViewComponent[] = []\n\n for (const plugin of registeredPlugins.values()) {\n const viewComponents = plugin.views?.[viewName]\n if (viewComponents) {\n viewComponents.forEach((component: ViewComponent, index: number) => {\n components.push({ ...component, id: getPluginViewId(documentSlug, plugin.name, viewName, index) })\n })\n }\n }\n\n return components\n },\n\n /**\n * Notify all plugins that the API Reference has been initialized\n */\n notifyInit: (config: Record<string, unknown>): void => {\n for (const plugin of registeredPlugins.values()) {\n plugin.hooks?.onInit?.({ config })\n }\n },\n\n /**\n * Notify all plugins that the configuration has changed\n */\n notifyConfigChange: (config: Record<string, unknown>): void => {\n for (const plugin of registeredPlugins.values()) {\n plugin.hooks?.onConfigChange?.({ config })\n }\n },\n\n /**\n * Notify all plugins that the API Reference is being destroyed\n */\n notifyDestroy: (): void => {\n for (const plugin of registeredPlugins.values()) {\n plugin.hooks?.onDestroy?.()\n }\n },\n\n /**\n * Get all client plugins provided by registered plugins\n */\n getApiClientPlugins: (): ClientPlugin[] => {\n const apiClientPlugins: ClientPlugin[] = []\n\n for (const plugin of registeredPlugins.values()) {\n if (plugin.apiClientPlugins) {\n apiClientPlugins.push(...(plugin.apiClientPlugins as ClientPlugin[]))\n }\n }\n\n return apiClientPlugins\n },\n\n /**\n * Get all sidebar entries contributed by plugin views.\n *\n * Only views that opt in via `sidebar.show` are returned. Each entry's `id` matches the\n * id of the rendered component (see `getViewComponents`), so the API Reference can add it\n * to the sidebar navigation and scrolling/active-tracking work out of the box.\n */\n getSidebarEntries: (documentSlug: string): PluginSidebarEntry[] => {\n const entries: PluginSidebarEntry[] = []\n\n for (const plugin of registeredPlugins.values()) {\n for (const viewName of PLUGIN_VIEW_NAMES) {\n const viewComponents = plugin.views?.[viewName]\n viewComponents?.forEach((component: ViewComponent, index: number) => {\n if (component.sidebar?.show && component.sidebar.label) {\n entries.push({\n id: getPluginViewId(documentSlug, plugin.name, viewName, index),\n label: component.sidebar.label,\n viewName,\n })\n }\n })\n }\n }\n\n return entries\n },\n }\n}\n\nexport type PluginManager = ReturnType<typeof createPluginManager>\n"],"mappings":";;AAcA,IAAM,oBAAoB,CAAC,iBAAiB,cAAc;;;;;;;;;;;;AAyB1D,IAAM,mBAAmB,cAAsB,YAAoB,UAA0B,UAC3F,GAAG,aAAa,eAAe,WAAW,GAAG,SAAS,GAAG;;;;;;AAO3D,IAAa,uBAAuB,EAAE,UAAU,EAAE,OAAkC;CAClF,MAAM,oCAAoB,IAAI,KAA6C;AAG3E,SAAQ,SAAS,WAAW;EAC1B,MAAM,iBAAiB,QAAQ;AAC/B,oBAAkB,IAAI,eAAe,MAAM,eAAe;GAC1D;AAEF,QAAO;EAIL,6BAA6B,SAAkD;GAC7E,MAAM,aAAuC,EAAE;AAE/C,QAAK,MAAM,UAAU,kBAAkB,QAAQ,CAC7C,MAAK,MAAM,aAAa,OAAO,WAC7B,KAAI,UAAU,SAAS,KACrB,YAAW,KAAK,UAAU;AAKhC,UAAO;;EAUT,oBAAoB,UAA0B,iBAAgD;GAC5F,MAAM,aAAoC,EAAE;AAE5C,QAAK,MAAM,UAAU,kBAAkB,QAAQ,EAAE;IAC/C,MAAM,iBAAiB,OAAO,QAAQ;AACtC,QAAI,eACF,gBAAe,SAA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