UNPKG

@empathyco/x-components

Version:
75 lines 2.56 kB
/** * Extends the scroll making it able to sync the first visible element, and allowing * the children position to be restored. * * Each child element that wants to have this support must be wrapped in a {@link MainScrollItem} * component. * * @public */ declare const _default: import("vue").DefineComponent<{ /** * If `true`, sets this scroll instance to the main of the application. Being the main * scroll implies that features like restoring the scroll when the query changes, or storing * the scroll position in the URL will be enabled for this container. */ useWindow: { type: BooleanConstructor; default: boolean; }; /** * Timeout in milliseconds to abort trying to restore the scroll position to the target * element. */ restoreScrollTimeoutMs: { type: NumberConstructor; default: number; }; /** Intersection percentage to consider an element visible. */ threshold: { type: NumberConstructor; default: number; }; /** Adjusts the size of the scroll container bounds. */ margin: { type: StringConstructor; default: string; }; }, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, { [key: string]: any; }> | "", unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{ /** * If `true`, sets this scroll instance to the main of the application. Being the main * scroll implies that features like restoring the scroll when the query changes, or storing * the scroll position in the URL will be enabled for this container. */ useWindow: { type: BooleanConstructor; default: boolean; }; /** * Timeout in milliseconds to abort trying to restore the scroll position to the target * element. */ restoreScrollTimeoutMs: { type: NumberConstructor; default: number; }; /** Intersection percentage to consider an element visible. */ threshold: { type: NumberConstructor; default: number; }; /** Adjusts the size of the scroll container bounds. */ margin: { type: StringConstructor; default: string; }; }>>, { useWindow: boolean; restoreScrollTimeoutMs: number; threshold: number; margin: string; }, {}>; export default _default; //# sourceMappingURL=main-scroll.vue?vue&type=script&lang.d.ts.map