constants.d.ts 596 B

12345678910111213141516171819
  1. import { UseNamespaceReturn } from "../../../hooks/use-namespace/index.js";
  2. import { InjectionKey, Ref } from "vue";
  3. //#region ../../packages/components/anchor/src/constants.d.ts
  4. interface AnchorLinkState {
  5. el: HTMLElement;
  6. href: string;
  7. }
  8. interface AnchorContext {
  9. ns: UseNamespaceReturn;
  10. direction: string;
  11. currentAnchor: Ref<string>;
  12. addLink(state: AnchorLinkState): void;
  13. removeLink(href: string): void;
  14. handleClick(e: MouseEvent, href?: string): void;
  15. }
  16. declare const anchorKey: InjectionKey<AnchorContext>;
  17. //#endregion
  18. export { AnchorContext, AnchorLinkState, anchorKey };