diff --git a/apps/web-roo-code/src/components/blog/blog-analytics.tsx b/apps/web-roo-code/src/components/blog/blog-analytics.tsx index 026a9a3816..7fc1f23066 100644 --- a/apps/web-roo-code/src/components/blog/blog-analytics.tsx +++ b/apps/web-roo-code/src/components/blog/blog-analytics.tsx @@ -1,8 +1,13 @@ "use client" import { useEffect, useRef } from "react" -import type { BlogPost } from "@/lib/blog" -import { trackBlogIndexView, trackBlogPostView, trackBlogPostScrollDepth, trackBlogPostTimeSpent } from "@/lib/blog" +import type { BlogPost } from "@/lib/blog/types" +import { + trackBlogIndexView, + trackBlogPostView, + trackBlogPostScrollDepth, + trackBlogPostTimeSpent, +} from "@/lib/blog/analytics" interface BlogIndexAnalyticsProps { postCount: number diff --git a/apps/web-roo-code/src/types/gray-matter.d.ts b/apps/web-roo-code/src/types/gray-matter.d.ts new file mode 100644 index 0000000000..a1aaf87539 --- /dev/null +++ b/apps/web-roo-code/src/types/gray-matter.d.ts @@ -0,0 +1,40 @@ +/** + * Type declarations for gray-matter + * @see https://github.com/jonschlinkert/gray-matter + */ + +declare module "gray-matter" { + interface GrayMatterFile> { + /** The parsed frontmatter data */ + data: T + /** The content of the file without the frontmatter */ + content: string + /** The original input string */ + orig: string | Buffer + /** The language of the frontmatter */ + language: string + /** The raw frontmatter string (excluding delimiters) */ + matter: string + /** Whether the input string is empty */ + isEmpty: boolean + /** Alias for content */ + excerpt?: string + } + + interface GrayMatterOption { + /** Custom excerpt function or boolean */ + excerpt?: boolean | ((file: GrayMatterFile, options: GrayMatterOption) => void) + /** Custom separator for excerpt */ + excerpt_separator?: string + /** Custom engines for parsing */ + engines?: Record + /** Language to use for parsing */ + language?: string + /** Custom delimiters */ + delimiters?: string | [string, string] + } + + function matter>(input: string | Buffer, options?: GrayMatterOption): GrayMatterFile + + export = matter +}