import { ExtractPropTypes } from 'vue'; import { ISharedRenderlessFunctionParams } from './shared.type.js'; declare const anchorProps: { isAffix: { type: BooleanConstructor; default: boolean; }; links: { type: ArrayConstructor; default: () => never[]; }; containerId: { type: StringConstructor; default: string; }; markClass: { type: StringConstructor; default: string; }; type: { type: StringConstructor; default: string; }; offsetTop: { type: NumberConstructor; default: number; }; }; /** * Copyright (c) 2022 - present TinyVue Authors. * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. * * Use of this source code is governed by an MIT-style license. * * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. * */ declare const setFixAnchor: ({ vm, props }: Pick) => () => void; declare const setScrollContainer: ({ state, api }: Pick) => (cb?: Function | null) => void; declare const getCurrentAnchor: ({ vm, state, emit }: Pick) => (link: string) => void; declare const handleScroll: (state: IAnchorRenderlessParams['state']) => () => void; declare const getContainer: ({ props }: Pick) => () => Element; declare const mounted: ({ state, api, props, nextTick }: Pick) => () => void; declare const updated: ({ api }: Pick) => () => void; declare const unmounted: ({ state, api }: Pick) => () => void; declare const onItersectionObserver: ({ state, props, api, vm, emit }: Pick) => () => void; declare const linkClick: ({ state, vm, emit, props, api }: Pick) => (e: Event, item: IAnchorLinkItem) => void; type IAnchorObject = HTMLElement | null; interface IAnchorState { currentLink: string; observerLinks: object; expandLink: object; intersectionObserver: IAnchorObject; scrollContainer: IAnchorObject; currentHash: string; isScroll: boolean; scrollTimer: number; childOffsetTop: number; } type IAnchorProps = ExtractPropTypes; interface IAnchorLinkItem { key: string; link: string; title: string; } interface IAnchorApi { state: IAnchorState; mounted: ReturnType; updated: ReturnType; unmounted: ReturnType; getContainer: ReturnType; linkClick: ReturnType; onItersectionObserver: ReturnType; setScrollContainer: ReturnType; getCurrentAnchor: ReturnType; setFixAnchor: ReturnType; handleScroll: ReturnType; } type IAnchorRenderlessParams = ISharedRenderlessFunctionParams & { props: IAnchorProps; state: IAnchorState; api: IAnchorApi; }; export { IAnchorApi, IAnchorLinkItem, IAnchorProps, IAnchorRenderlessParams, IAnchorState };