vuepress-theme-hope
Version:
A light vuepress theme with tons of features
26 lines (25 loc) • 715 B
TypeScript
import type { Article } from "@vuepress/plugin-blog/client";
import type { ComputedRef, InjectionKey } from "vue";
import type { ArticleInfoData } from "../../../shared/index.js";
export interface TimelineItem {
year: number;
items: {
date: string;
path: string;
info: ArticleInfoData;
}[];
}
export type TimelineRef = ComputedRef<{
path: string;
config: TimelineItem[];
items: Article<ArticleInfoData>[];
}>;
export declare const timelineSymbol: InjectionKey<TimelineRef>;
/**
* Inject timeline
*
* @returns Timeline global computed
*/
export declare const useTimeline: () => TimelineRef;
/** Provide timelines */
export declare const setupTimeline: () => void;