Open-source status page, incident response and uptime monitoring
TypeScript alertingincident-managementmcpmcp-servermonitoringmonitoring-as-codeobservabilityon-callopen-sourcesrestatus-pagestatuspagesynthetic-monitoringterraformtinybirdtursouptimeuptime-checkeruptime-monitor
π prettier (#195)
Thibault Le Ouay70cba9556493
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.ymlindex a602fb0c7..800a0e7cf 100644--- a/.github/workflows/lint.yml+++ b/.github/workflows/lint.yml@@ -66,4 +66,4 @@ jobs:run: pnpm install- name: π Prettier check- run: pnpm format+ run: pnpm format:checkdiff --git a/apps/docs/theme.config.tsx b/apps/docs/theme.config.tsxindex d6d3b4468..8331db5d9 100644--- a/apps/docs/theme.config.tsx+++ b/apps/docs/theme.config.tsx@@ -8,7 +8,8 @@ const config: DocsThemeConfig = {chat: {link: "https://discord.com/invite/dHD4JtSfsn",},- docsRepositoryBase: "https://github.com/openstatusHQ/openstatus/tree/main/apps/docs",+ docsRepositoryBase:+ "https://github.com/openstatusHQ/openstatus/tree/main/apps/docs",footer: {text: "OpenStatus Documentation",},diff --git a/apps/web/README.md b/apps/web/README.mdindex 4fae62aff..d6d3a6f4d 100644--- a/apps/web/README.md+++ b/apps/web/README.md@@ -3,28 +3,31 @@First, run the development server:```bash-yarn dev+pnpm dev```-Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.--You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file.--[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`.--The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.+Open [http://localhost:3000](http://localhost:3000) with your browser to see the+result.## Learn MoreTo learn more about Next.js, take a look at the following resources:-- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.-- [Learn Next.js](https://nextjs.org/learn/foundations/about-nextjs) - an interactive Next.js tutorial.+- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js+ features and API.+- [Learn Next.js](https://nextjs.org/learn/foundations/about-nextjs) - an+ interactive Next.js tutorial.-You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!+You can check out+[the Next.js GitHub repository](https://github.com/vercel/next.js/) - your+feedback and contributions are welcome!## Deploy on Vercel-The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_source=github.com&utm_medium=referral&utm_campaign=turborepo-readme) from the creators of Next.js.+The easiest way to deploy your Next.js app is to use the+[Vercel Platform](https://vercel.com/new?utm_source=github.com&utm_medium=referral&utm_campaign=turborepo-readme)+from the creators of Next.js.-Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.+Check out our+[Next.js deployment documentation](https://nextjs.org/docs/deployment) for more+details.diff --git a/apps/web/contentlayer.config.ts b/apps/web/contentlayer.config.tsindex 4d1baa1ee..e34c9ee2d 100644--- a/apps/web/contentlayer.config.ts+++ b/apps/web/contentlayer.config.ts@@ -1,17 +1,17 @@-import { makeSource } from "contentlayer/source-files";-import rehypeSlug from "rehype-slug";-import remarkGfm from "remark-gfm";--import { LegalPost } from "./src/contentlayer/documents/legal";-import { Post } from "./src/contentlayer/documents/post";-import autolinkHeadings from "./src/contentlayer/plugins/autolink-headings";-import prettyCode from "./src/contentlayer/plugins/pretty-code";--export default makeSource({- contentDirPath: "src/content/",- documentTypes: [Post, LegalPost],- mdx: {- remarkPlugins: [remarkGfm],- rehypePlugins: [rehypeSlug, prettyCode, autolinkHeadings],- },-});+import { makeSource } from "contentlayer/source-files";+import rehypeSlug from "rehype-slug";+import remarkGfm from "remark-gfm";++import { LegalPost } from "./src/contentlayer/documents/legal";+import { Post } from "./src/contentlayer/documents/post";+import autolinkHeadings from "./src/contentlayer/plugins/autolink-headings";+import prettyCode from "./src/contentlayer/plugins/pretty-code";++export default makeSource({+ contentDirPath: "src/content/",+ documentTypes: [Post, LegalPost],+ mdx: {+ remarkPlugins: [remarkGfm],+ rehypePlugins: [rehypeSlug, prettyCode, autolinkHeadings],+ },+});diff --git a/apps/web/src/app/_components/background.tsx b/apps/web/src/app/_components/background.tsxindex 364c00cde..2b184e68f 100644--- a/apps/web/src/app/_components/background.tsx+++ b/apps/web/src/app/_components/background.tsx@@ -13,8 +13,8 @@ export default function Background({useMouseMove();return (<>- <div className="fixed top-0 left-0 -z-50">- <div className="sticky top-0 left-0 h-screen w-screen overflow-hidden">+ <div className="fixed left-0 top-0 -z-50">+ <div className="sticky left-0 top-0 h-screen w-screen overflow-hidden"><div className="bg-muted-foreground/20 absolute inset-0 z-[-1]" /><div className="bg-gradient-radial from-muted-foreground/80 absolute left-[--x] top-[--y] z-[-1] h-56 w-56 -translate-x-1/2 -translate-y-1/2 rounded-full from-0% to-transparent to-90% blur-md" /><svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%">diff --git a/apps/web/src/app/blog/[slug]/page.tsx b/apps/web/src/app/blog/[slug]/page.tsxindex ec52479a7..72c46ba01 100644--- a/apps/web/src/app/blog/[slug]/page.tsx+++ b/apps/web/src/app/blog/[slug]/page.tsx@@ -1,99 +1,99 @@-import type { Metadata } from "next";-import { notFound } from "next/navigation";-import { allPosts } from "contentlayer/generated";--import { Mdx } from "@/components/content/mdx";-import { Shell } from "@/components/dashboard/shell";-import { BackButton } from "@/components/layout/back-button";-import { formatDate } from "@/lib/utils";--export const dynamic = "force-static";--export async function generateStaticParams() {- return allPosts.map((post) => ({- slug: post.slug,- }));-}--export async function generateMetadata({- params,-}: {- params: { slug: string };-}): Promise<Metadata | void> {- const post = allPosts.find((post) => post.slug === params.slug);- if (!post) {- return;- }- const { title, publishedAt: publishedTime, description, slug, image } = post;-- return {- title,- description,- openGraph: {- title,- description,- type: "article",- publishedTime,- url: `https://www.openstatus.dev/blog/${slug}`,- images: [- {- url: `https://openstatus.dev/api/og/post?title=${title}&description=${description}&image=${image}`,- },- ],- },- twitter: {- card: "summary_large_image",- title,- description,- images: [- `https://openstatus.dev/api/og/post?title=${title}&description=${description}&image=${image}`,- ],- },- };-}--export default function PostPage({ params }: { params: { slug: string } }) {- const post = allPosts.find((post) => post.slug === params.slug);-- if (!post) {- notFound();- }-- // TODO: add author.avatar and author.url- return (- <>- <BackButton href="/blog" />- <Shell className="sm:py-8 md:py-12">- <article className="grid gap-8">- <div className="mx-auto grid w-full max-w-prose gap-3">- <h1 className="font-cal mb-5 text-3xl">{post.title}</h1>- <div className="border-border relative h-64 w-full overflow-hidden rounded-lg border">- {/* <Image- src={post.image}- fill={true}- alt={post.title}- className="object-cover"- /> */}- {/* HOTFIX: plain `img` */}- <img- src={post.image}- alt={post.title}- className="h-full w-full object-cover"- />- </div>- <p className="text-muted-foreground text-sm font-light">- {post.author.name}- <span className="text-muted-foreground/70 mx-1">•</span>- {formatDate(new Date(post.publishedAt))}- <span className="text-muted-foreground/70 mx-1">•</span>- {post.readingTime}- </p>- </div>- <div className="mx-auto max-w-prose">- <Mdx code={post.body.code} />- </div>- </article>- </Shell>- </>- );-}+import type { Metadata } from "next";+import { notFound } from "next/navigation";+import { allPosts } from "contentlayer/generated";++import { Mdx } from "@/components/content/mdx";+import { Shell } from "@/components/dashboard/shell";+import { BackButton } from "@/components/layout/back-button";+import { formatDate } from "@/lib/utils";++export const dynamic = "force-static";++export async function generateStaticParams() {+ return allPosts.map((post) => ({+ slug: post.slug,+ }));+}++export async function generateMetadata({+ params,+}: {+ params: { slug: string };+}): Promise<Metadata | void> {+ const post = allPosts.find((post) => post.slug === params.slug);+ if (!post) {+ return;+ }+ const { title, publishedAt: publishedTime, description, slug, image } = post;++ return {+ title,+ description,+ openGraph: {+ title,+ description,+ type: "article",+ publishedTime,+ url: `https://www.openstatus.dev/blog/${slug}`,+ images: [+ {+ url: `https://openstatus.dev/api/og/post?title=${title}&description=${description}&image=${image}`,+ },+ ],+ },+ twitter: {+ card: "summary_large_image",+ title,+ description,+ images: [+ `https://openstatus.dev/api/og/post?title=${title}&description=${description}&image=${image}`,+ ],+ },+ };+}++export default function PostPage({ params }: { params: { slug: string } }) {+ const post = allPosts.find((post) => post.slug === params.slug);++ if (!post) {+ notFound();+ }++ // TODO: add author.avatar and author.url+ return (+ <>+ <BackButton href="/blog" />+ <Shell className="sm:py-8 md:py-12">+ <article className="grid gap-8">+ <div className="mx-auto grid w-full max-w-prose gap-3">+ <h1 className="font-cal mb-5 text-3xl">{post.title}</h1>+ <div className="border-border relative h-64 w-full overflow-hidden rounded-lg border">+ {/* <Image+ src={post.image}+ fill={true}+ alt={post.title}+ className="object-cover"+ /> */}+ {/* HOTFIX: plain `img` */}+ <img+ src={post.image}+ alt={post.title}+ className="h-full w-full object-cover"+ />+ </div>+ <p className="text-muted-foreground text-sm font-light">+ {post.author.name}+ <span className="text-muted-foreground/70 mx-1">•</span>+ {formatDate(new Date(post.publishedAt))}+ <span className="text-muted-foreground/70 mx-1">•</span>+ {post.readingTime}+ </p>+ </div>+ <div className="mx-auto max-w-prose">+ <Mdx code={post.body.code} />+ </div>+ </article>+ </Shell>+ </>+ );+}diff --git a/apps/web/src/app/blog/page.tsx b/apps/web/src/app/blog/page.tsxindex f1ca7de6f..f58c8674c 100644--- a/apps/web/src/app/blog/page.tsx+++ b/apps/web/src/app/blog/page.tsx@@ -1,39 +1,39 @@-import Link from "next/link";-import { allPosts } from "contentlayer/generated";--import { Shell } from "@/components/dashboard/shell";-import { formatDate } from "@/lib/utils";--export default async function Post() {- const posts = allPosts.sort(- (a, b) =>- new Date(b.publishedAt).getTime() - new Date(a.publishedAt).getTime(),- );-- return (- <Shell>- <div className="grid gap-8">- <h1 className="text-foreground font-cal text-4xl">Blog</h1>- <div>- {posts.map((post) => (- <Link href={`/blog/${post.slug}`} key={post.slug}>- <section>- <p className="text-foreground font-cal text-2xl">- {post.title}- </p>- <p className="text-muted-foreground">{post.description}</p>- <p className="text-muted-foreground mt-1 text-xs">- {post.author.name}- <span className="text-muted-foreground/70 mx-1">•</span>- {formatDate(new Date(post.publishedAt))}- <span className="text-muted-foreground/70 mx-1">•</span>- {post.readingTime}- </p>- </section>- </Link>- ))}- </div>- </div>- </Shell>- );-}+import Link from "next/link";+import { allPosts } from "contentlayer/generated";++import { Shell } from "@/components/dashboard/shell";+import { formatDate } from "@/lib/utils";++export default async function Post() {+ const posts = allPosts.sort(+ (a, b) =>+ new Date(b.publishedAt).getTime() - new Date(a.publishedAt).getTime(),+ );++ return (+ <Shell>+ <div className="grid gap-8">+ <h1 className="text-foreground font-cal text-4xl">Blog</h1>+ <div>+ {posts.map((post) => (+ <Link href={`/blog/${post.slug}`} key={post.slug}>+ <section>+ <p className="text-foreground font-cal text-2xl">+ {post.title}+ </p>+ <p className="text-muted-foreground">{post.description}</p>+ <p className="text-muted-foreground mt-1 text-xs">+ {post.author.name}+ <span className="text-muted-foreground/70 mx-1">•</span>+ {formatDate(new Date(post.publishedAt))}+ <span className="text-muted-foreground/70 mx-1">•</span>+ {post.readingTime}+ </p>+ </section>+ </Link>+ ))}+ </div>+ </div>+ </Shell>+ );+}diff --git a/apps/web/src/app/play/@modal/(..)monitor/[id]/page.tsx b/apps/web/src/app/play/@modal/(..)monitor/[id]/page.tsxindex 9ad4e4fb5..6866c2fbd 100644--- a/apps/web/src/app/play/@modal/(..)monitor/[id]/page.tsx+++ b/apps/web/src/app/play/@modal/(..)monitor/[id]/page.tsx@@ -29,8 +29,8 @@ export default async function Monitor({}) {const search = searchParamsSchema.safeParse(searchParams);const data = search.success- // TODO: lets hard-code our `monitorId` here- ? await getResponseListData({ monitorId: params.id, ...search.data })+ ? // TODO: lets hard-code our `monitorId` here+ await getResponseListData({ monitorId: params.id, ...search.data }): await getResponseListData({ monitorId: params.id });if (!data) return <div>Something went wrong</div>;diff --git a/apps/web/src/components/content/mdx-components.tsx b/apps/web/src/components/content/mdx-components.tsxindex 16f487426..fb378c02e 100644--- a/apps/web/src/components/content/mdx-components.tsx+++ b/apps/web/src/components/content/mdx-components.tsx@@ -1,38 +1,38 @@-import * as React from "react";-import Link from "next/link";-import type { TweetProps } from "react-tweet";-import { Tweet } from "react-tweet";--export const components = {- a: ({- href = "",- ...props- }: React.AnchorHTMLAttributes<HTMLAnchorElement>) => {- if (href.startsWith("http")) {- return (- <a- className="text-foreground underline underline-offset-4 hover:no-underline"- href={href}- target="_blank"- rel="noopener noreferrer"- {...props}- />- );- }-- return (- <Link- href={href}- className="text-foreground underline underline-offset-4 hover:no-underline"- {...props}- />- );- },- Tweet: (props: TweetProps) => {- return (- <div data-theme="light" className="not-prose [&>div]:mx-auto">- <Tweet {...props} />- </div>- );- },-};+import * as React from "react";+import Link from "next/link";+import type { TweetProps } from "react-tweet";+import { Tweet } from "react-tweet";++export const components = {+ a: ({+ href = "",+ ...props+ }: React.AnchorHTMLAttributes<HTMLAnchorElement>) => {+ if (href.startsWith("http")) {+ return (+ <a+ className="text-foreground underline underline-offset-4 hover:no-underline"+ href={href}+ target="_blank"+ rel="noopener noreferrer"+ {...props}+ />+ );+ }++ return (+ <Link+ href={href}+ className="text-foreground underline underline-offset-4 hover:no-underline"+ {...props}+ />+ );+ },+ Tweet: (props: TweetProps) => {+ return (+ <div data-theme="light" className="not-prose [&>div]:mx-auto">+ <Tweet {...props} />+ </div>+ );+ },+};diff --git a/apps/web/src/components/content/mdx.tsx b/apps/web/src/components/content/mdx.tsxindex b681b79dc..0f4084308 100644--- a/apps/web/src/components/content/mdx.tsx+++ b/apps/web/src/components/content/mdx.tsx@@ -1,18 +1,18 @@-import { getMDXComponent } from "next-contentlayer/hooks";--import { components } from "./mdx-components";--interface MdxProps {- code: string;-}--export function Mdx({ code }: MdxProps) {- const MDXComponent = getMDXComponent(code);-- return (- // FIXME: weird behaviour when `prose-headings:font-cal` and on mouse movement font gets bigger- <div className="prose prose-neutral dark:prose-invert prose-pre:border prose-pre:border-border prose-pre:rounded-lg prose-img:rounded-lg prose-img:border prose-img:border-border">- <MDXComponent components={{ ...components }} />- </div>- );-}+import { getMDXComponent } from "next-contentlayer/hooks";++import { components } from "./mdx-components";++interface MdxProps {+ code: string;+}++export function Mdx({ code }: MdxProps) {+ const MDXComponent = getMDXComponent(code);++ return (+ // FIXME: weird behaviour when `prose-headings:font-cal` and on mouse movement font gets bigger+ <div className="prose prose-neutral dark:prose-invert prose-pre:border prose-pre:border-border prose-pre:rounded-lg prose-img:rounded-lg prose-img:border prose-img:border-border">+ <MDXComponent components={{ ...components }} />+ </div>+ );+}diff --git a/apps/web/src/components/tracker.tsx b/apps/web/src/components/tracker.tsxindex e497b0eb3..d3b2c1303 100644--- a/apps/web/src/components/tracker.tsx+++ b/apps/web/src/components/tracker.tsx@@ -70,7 +70,7 @@ export function Tracker({{count: 0,ok: 0,- }+ },);const uptime =@@ -83,7 +83,9 @@ export function Tracker({<div className="mb-1 flex justify-between text-sm sm:mb-2"><div className="flex items-center gap-2"><p className="text-foreground font-semibold">{name}</p>- { description ? <MoreInfo {...{ url, id, context, description }} /> : null }+ {description ? (+ <MoreInfo {...{ url, id, context, description }} />+ ) : null}</div><p className="text-muted-foreground font-light">{uptime}</p></div>@@ -208,7 +210,7 @@ const Bar = ({// FIXME this is a temporary solutionconst getStatus = (- ratio: number+ ratio: number,): { label: string; variant: "up" | "degraded" | "down" } => {if (ratio >= 0.98) return { label: "Operational", variant: "up" };if (ratio >= 0.5) return { label: "Degraded", variant: "degraded" };diff --git a/apps/web/src/components/ui/accordion.tsx b/apps/web/src/components/ui/accordion.tsxindex 937620af2..1d54a9e9a 100644--- a/apps/web/src/components/ui/accordion.tsx+++ b/apps/web/src/components/ui/accordion.tsx@@ -1,12 +1,12 @@-"use client"+"use client";-import * as React from "react"-import * as AccordionPrimitive from "@radix-ui/react-accordion"-import { ChevronDown } from "lucide-react"+import * as React from "react";+import * as AccordionPrimitive from "@radix-ui/react-accordion";+import { ChevronDown } from "lucide-react";-import { cn } from "@/lib/utils"+import { cn } from "@/lib/utils";-const Accordion = AccordionPrimitive.Root+const Accordion = AccordionPrimitive.Root;const AccordionItem = React.forwardRef<React.ElementRef<typeof AccordionPrimitive.Item>,@@ -17,8 +17,8 @@ const AccordionItem = React.forwardRef<className={cn("border-b", className)}{...props}/>-))-AccordionItem.displayName = "AccordionItem"+));+AccordionItem.displayName = "AccordionItem";const AccordionTrigger = React.forwardRef<React.ElementRef<typeof AccordionPrimitive.Trigger>,@@ -29,7 +29,7 @@ const AccordionTrigger = React.forwardRef<ref={ref}className={cn("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",- className+ className,)}{...props}>@@ -37,8 +37,8 @@ const AccordionTrigger = React.forwardRef<<ChevronDown className="h-4 w-4 shrink-0 transition-transform duration-200" /></AccordionPrimitive.Trigger></AccordionPrimitive.Header>-))-AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName+));+AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;const AccordionContent = React.forwardRef<React.ElementRef<typeof AccordionPrimitive.Content>,@@ -47,14 +47,14 @@ const AccordionContent = React.forwardRef<<AccordionPrimitive.Contentref={ref}className={cn(- "overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",- className+ "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm transition-all",+ className,)}{...props}><div className="pb-4 pt-0">{children}</div></AccordionPrimitive.Content>-))-AccordionContent.displayName = AccordionPrimitive.Content.displayName+));+AccordionContent.displayName = AccordionPrimitive.Content.displayName;-export { Accordion, AccordionItem, AccordionTrigger, AccordionContent }+export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };diff --git a/apps/web/src/components/ui/alert-dialog.tsx b/apps/web/src/components/ui/alert-dialog.tsxindex 9e20534c5..ec7131525 100644--- a/apps/web/src/components/ui/alert-dialog.tsx+++ b/apps/web/src/components/ui/alert-dialog.tsx@@ -1,22 +1,22 @@-"use client"+"use client";-import * as React from "react"-import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog"+import * as React from "react";+import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";-import { cn } from "@/lib/utils"-import { buttonVariants } from "@/components/ui/button"+import { buttonVariants } from "@/components/ui/button";+import { cn } from "@/lib/utils";-const AlertDialog = AlertDialogPrimitive.Root+const AlertDialog = AlertDialogPrimitive.Root;-const AlertDialogTrigger = AlertDialogPrimitive.Trigger+const AlertDialogTrigger = AlertDialogPrimitive.Trigger;const AlertDialogPortal = ({className,...props}: AlertDialogPrimitive.AlertDialogPortalProps) => (<AlertDialogPrimitive.Portal className={cn(className)} {...props} />-)-AlertDialogPortal.displayName = AlertDialogPrimitive.Portal.displayName+);+AlertDialogPortal.displayName = AlertDialogPrimitive.Portal.displayName;const AlertDialogOverlay = React.forwardRef<React.ElementRef<typeof AlertDialogPrimitive.Overlay>,@@ -24,14 +24,14 @@ const AlertDialogOverlay = React.forwardRef<>(({ className, children, ...props }, ref) => (<AlertDialogPrimitive.OverlayclassName={cn(- "fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",- className+ "bg-background/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 backdrop-blur-sm",+ className,)}{...props}ref={ref}/>-))-AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName+));+AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;const AlertDialogContent = React.forwardRef<React.ElementRef<typeof AlertDialogPrimitive.Content>,@@ -42,14 +42,14 @@ const AlertDialogContent = React.forwardRef<<AlertDialogPrimitive.Contentref={ref}className={cn(- "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",- className+ "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg md:w-full",+ className,)}{...props}/></AlertDialogPortal>-))-AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName+));+AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;const AlertDialogHeader = ({className,@@ -58,12 +58,12 @@ const AlertDialogHeader = ({<divclassName={cn("flex flex-col space-y-2 text-center sm:text-left",- className+ className,)}{...props}/>-)-AlertDialogHeader.displayName = "AlertDialogHeader"+);+AlertDialogHeader.displayName = "AlertDialogHeader";const AlertDialogFooter = ({className,@@ -72,12 +72,12 @@ const AlertDialogFooter = ({<divclassName={cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",- className+ className,)}{...props}/>-)-AlertDialogFooter.displayName = "AlertDialogFooter"+);+AlertDialogFooter.displayName = "AlertDialogFooter";const AlertDialogTitle = React.forwardRef<React.ElementRef<typeof AlertDialogPrimitive.Title>,@@ -88,8 +88,8 @@ const AlertDialogTitle = React.forwardRef<className={cn("text-lg font-semibold", className)}{...props}/>-))-AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName+));+AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;const AlertDialogDescription = React.forwardRef<React.ElementRef<typeof AlertDialogPrimitive.Description>,@@ -97,12 +97,12 @@ const AlertDialogDescription = React.forwardRef<>(({ className, ...props }, ref) => (<AlertDialogPrimitive.Descriptionref={ref}- className={cn("text-sm text-muted-foreground", className)}+ className={cn("text-muted-foreground text-sm", className)}{...props}/>-))+));AlertDialogDescription.displayName =- AlertDialogPrimitive.Description.displayName+ AlertDialogPrimitive.Description.displayName;const AlertDialogAction = React.forwardRef<React.ElementRef<typeof AlertDialogPrimitive.Action>,@@ -113,8 +113,8 @@ const AlertDialogAction = React.forwardRef<className={cn(buttonVariants(), className)}{...props}/>-))-AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName+));+AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;const AlertDialogCancel = React.forwardRef<React.ElementRef<typeof AlertDialogPrimitive.Cancel>,@@ -125,12 +125,12 @@ const AlertDialogCancel = React.forwardRef<className={cn(buttonVariants({ variant: "outline" }),"mt-2 sm:mt-0",- className+ className,)}{...props}/>-))-AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName+));+AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;export {AlertDialog,@@ -142,4 +142,4 @@ export {AlertDialogDescription,AlertDialogAction,AlertDialogCancel,-}+};diff --git a/apps/web/src/components/ui/dropdown-menu.tsx b/apps/web/src/components/ui/dropdown-menu.tsxindex f69a0d64c..4db3487a7 100644--- a/apps/web/src/components/ui/dropdown-menu.tsx+++ b/apps/web/src/components/ui/dropdown-menu.tsx@@ -1,44 +1,44 @@-"use client"+"use client";-import * as React from "react"-import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu"-import { Check, ChevronRight, Circle } from "lucide-react"+import * as React from "react";+import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";+import { Check, ChevronRight, Circle } from "lucide-react";-import { cn } from "@/lib/utils"+import { cn } from "@/lib/utils";-const DropdownMenu = DropdownMenuPrimitive.Root+const DropdownMenu = DropdownMenuPrimitive.Root;-const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger+const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;-const DropdownMenuGroup = DropdownMenuPrimitive.Group+const DropdownMenuGroup = DropdownMenuPrimitive.Group;-const DropdownMenuPortal = DropdownMenuPrimitive.Portal+const DropdownMenuPortal = DropdownMenuPrimitive.Portal;-const DropdownMenuSub = DropdownMenuPrimitive.Sub+const DropdownMenuSub = DropdownMenuPrimitive.Sub;-const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup+const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;const DropdownMenuSubTrigger = React.forwardRef<React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {- inset?: boolean+ inset?: boolean;}>(({ className, inset, children, ...props }, ref) => (<DropdownMenuPrimitive.SubTriggerref={ref}className={cn(- "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",+ "focus:bg-accent data-[state=open]:bg-accent flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none",inset && "pl-8",- className+ className,)}{...props}>{children}<ChevronRight className="ml-auto h-4 w-4" /></DropdownMenuPrimitive.SubTrigger>-))+));DropdownMenuSubTrigger.displayName =- DropdownMenuPrimitive.SubTrigger.displayName+ DropdownMenuPrimitive.SubTrigger.displayName;const DropdownMenuSubContent = React.forwardRef<React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,@@ -47,14 +47,14 @@ const DropdownMenuSubContent = React.forwardRef<<DropdownMenuPrimitive.SubContentref={ref}className={cn(- "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",- className+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-lg",+ className,)}{...props}/>-))+));DropdownMenuSubContent.displayName =- DropdownMenuPrimitive.SubContent.displayName+ DropdownMenuPrimitive.SubContent.displayName;const DropdownMenuContent = React.forwardRef<React.ElementRef<typeof DropdownMenuPrimitive.Content>,@@ -65,32 +65,32 @@ const DropdownMenuContent = React.forwardRef<ref={ref}sideOffset={sideOffset}className={cn(- "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",- className+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-md",+ className,)}{...props}/></DropdownMenuPrimitive.Portal>-))-DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName+));+DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;const DropdownMenuItem = React.forwardRef<React.ElementRef<typeof DropdownMenuPrimitive.Item>,React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {- inset?: boolean+ inset?: boolean;}>(({ className, inset, ...props }, ref) => (<DropdownMenuPrimitive.Itemref={ref}className={cn(- "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",+ "focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50",inset && "pl-8",- className+ className,)}{...props}/>-))-DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName+));+DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;const DropdownMenuCheckboxItem = React.forwardRef<React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,@@ -99,8 +99,8 @@ const DropdownMenuCheckboxItem = React.forwardRef<<DropdownMenuPrimitive.CheckboxItemref={ref}className={cn(- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",- className+ "focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50",+ className,)}checked={checked}{...props}@@ -112,9 +112,9 @@ const DropdownMenuCheckboxItem = React.forwardRef<</span>{children}</DropdownMenuPrimitive.CheckboxItem>-))+));DropdownMenuCheckboxItem.displayName =- DropdownMenuPrimitive.CheckboxItem.displayName+ DropdownMenuPrimitive.CheckboxItem.displayName;const DropdownMenuRadioItem = React.forwardRef<React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,@@ -123,8 +123,8 @@ const DropdownMenuRadioItem = React.forwardRef<<DropdownMenuPrimitive.RadioItemref={ref}className={cn(- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",- className+ "focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50",+ className,)}{...props}>@@ -135,13 +135,13 @@ const DropdownMenuRadioItem = React.forwardRef<</span>{children}</DropdownMenuPrimitive.RadioItem>-))-DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName+));+DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;const DropdownMenuLabel = React.forwardRef<React.ElementRef<typeof DropdownMenuPrimitive.Label>,React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {- inset?: boolean+ inset?: boolean;}>(({ className, inset, ...props }, ref) => (<DropdownMenuPrimitive.Label@@ -149,12 +149,12 @@ const DropdownMenuLabel = React.forwardRef<className={cn("px-2 py-1.5 text-sm font-semibold",inset && "pl-8",- className+ className,)}{...props}/>-))-DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName+));+DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;const DropdownMenuSeparator = React.forwardRef<React.ElementRef<typeof DropdownMenuPrimitive.Separator>,@@ -162,11 +162,11 @@ const DropdownMenuSeparator = React.forwardRef<>(({ className, ...props }, ref) => (<DropdownMenuPrimitive.Separatorref={ref}- className={cn("-mx-1 my-1 h-px bg-muted", className)}+ className={cn("bg-muted -mx-1 my-1 h-px", className)}{...props}/>-))-DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName+));+DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;const DropdownMenuShortcut = ({className,@@ -177,9 +177,9 @@ const DropdownMenuShortcut = ({className={cn("ml-auto text-xs tracking-widest opacity-60", className)}{...props}/>- )-}-DropdownMenuShortcut.displayName = "DropdownMenuShortcut"+ );+};+DropdownMenuShortcut.displayName = "DropdownMenuShortcut";export {DropdownMenu,@@ -197,4 +197,4 @@ export {DropdownMenuSubContent,DropdownMenuSubTrigger,DropdownMenuRadioGroup,-}+};diff --git a/apps/web/src/components/ui/hover-card.tsx b/apps/web/src/components/ui/hover-card.tsxindex e54d91cf8..62053b782 100644--- a/apps/web/src/components/ui/hover-card.tsx+++ b/apps/web/src/components/ui/hover-card.tsx@@ -1,13 +1,13 @@-"use client"+"use client";-import * as React from "react"-import * as HoverCardPrimitive from "@radix-ui/react-hover-card"+import * as React from "react";+import * as HoverCardPrimitive from "@radix-ui/react-hover-card";-import { cn } from "@/lib/utils"+import { cn } from "@/lib/utils";-const HoverCard = HoverCardPrimitive.Root+const HoverCard = HoverCardPrimitive.Root;-const HoverCardTrigger = HoverCardPrimitive.Trigger+const HoverCardTrigger = HoverCardPrimitive.Trigger;const HoverCardContent = React.forwardRef<React.ElementRef<typeof HoverCardPrimitive.Content>,@@ -18,12 +18,12 @@ const HoverCardContent = React.forwardRef<align={align}sideOffset={sideOffset}className={cn(- "z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",- className+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 rounded-md border p-4 shadow-md outline-none",+ className,)}{...props}/>-))-HoverCardContent.displayName = HoverCardPrimitive.Content.displayName+));+HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;-export { HoverCard, HoverCardTrigger, HoverCardContent }+export { HoverCard, HoverCardTrigger, HoverCardContent };diff --git a/apps/web/src/components/ui/select.tsx b/apps/web/src/components/ui/select.tsxindex 16429d668..bb709c9f1 100644--- a/apps/web/src/components/ui/select.tsx+++ b/apps/web/src/components/ui/select.tsx@@ -1,16 +1,16 @@-"use client"+"use client";-import * as React from "react"-import * as SelectPrimitive from "@radix-ui/react-select"-import { Check, ChevronDown } from "lucide-react"+import * as React from "react";+import * as SelectPrimitive from "@radix-ui/react-select";+import { Check, ChevronDown } from "lucide-react";-import { cn } from "@/lib/utils"+import { cn } from "@/lib/utils";-const Select = SelectPrimitive.Root+const Select = SelectPrimitive.Root;-const SelectGroup = SelectPrimitive.Group+const SelectGroup = SelectPrimitive.Group;-const SelectValue = SelectPrimitive.Value+const SelectValue = SelectPrimitive.Value;const SelectTrigger = React.forwardRef<React.ElementRef<typeof SelectPrimitive.Trigger>,@@ -19,8 +19,8 @@ const SelectTrigger = React.forwardRef<<SelectPrimitive.Triggerref={ref}className={cn(- "flex h-10 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",- className+ "border-input ring-offset-background placeholder:text-muted-foreground focus:ring-ring flex h-10 w-full items-center justify-between rounded-md border bg-transparent px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",+ className,)}{...props}>@@ -29,8 +29,8 @@ const SelectTrigger = React.forwardRef<<ChevronDown className="h-4 w-4 opacity-50" /></SelectPrimitive.Icon></SelectPrimitive.Trigger>-))-SelectTrigger.displayName = SelectPrimitive.Trigger.displayName+));+SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;const SelectContent = React.forwardRef<React.ElementRef<typeof SelectPrimitive.Content>,@@ -40,10 +40,10 @@ const SelectContent = React.forwardRef<<SelectPrimitive.Contentref={ref}className={cn(- "relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 min-w-[8rem] overflow-hidden rounded-md border shadow-md",position === "popper" &&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",- className+ className,)}position={position}{...props}@@ -52,15 +52,15 @@ const SelectContent = React.forwardRef<className={cn("p-1",position === "popper" &&- "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"+ "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]",)}>{children}</SelectPrimitive.Viewport></SelectPrimitive.Content></SelectPrimitive.Portal>-))-SelectContent.displayName = SelectPrimitive.Content.displayName+));+SelectContent.displayName = SelectPrimitive.Content.displayName;const SelectLabel = React.forwardRef<React.ElementRef<typeof SelectPrimitive.Label>,@@ -71,8 +71,8 @@ const SelectLabel = React.forwardRef<className={cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className)}{...props}/>-))-SelectLabel.displayName = SelectPrimitive.Label.displayName+));+SelectLabel.displayName = SelectPrimitive.Label.displayName;const SelectItem = React.forwardRef<React.ElementRef<typeof SelectPrimitive.Item>,@@ -81,8 +81,8 @@ const SelectItem = React.forwardRef<<SelectPrimitive.Itemref={ref}className={cn(- "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",- className+ "focus:bg-accent focus:text-accent-foreground relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",+ className,)}{...props}>@@ -94,8 +94,8 @@ const SelectItem = React.forwardRef<<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText></SelectPrimitive.Item>-))-SelectItem.displayName = SelectPrimitive.Item.displayName+));+SelectItem.displayName = SelectPrimitive.Item.displayName;const SelectSeparator = React.forwardRef<React.ElementRef<typeof SelectPrimitive.Separator>,@@ -103,11 +103,11 @@ const SelectSeparator = React.forwardRef<>(({ className, ...props }, ref) => (<SelectPrimitive.Separatorref={ref}- className={cn("-mx-1 my-1 h-px bg-muted", className)}+ className={cn("bg-muted -mx-1 my-1 h-px", className)}{...props}/>-))-SelectSeparator.displayName = SelectPrimitive.Separator.displayName+));+SelectSeparator.displayName = SelectPrimitive.Separator.displayName;export {Select,@@ -118,4 +118,4 @@ export {SelectLabel,SelectItem,SelectSeparator,-}+};diff --git a/apps/web/src/components/ui/tooltip.tsx b/apps/web/src/components/ui/tooltip.tsxindex 30fc44d90..1062109d3 100644--- a/apps/web/src/components/ui/tooltip.tsx+++ b/apps/web/src/components/ui/tooltip.tsx@@ -1,15 +1,15 @@-"use client"+"use client";-import * as React from "react"-import * as TooltipPrimitive from "@radix-ui/react-tooltip"+import * as React from "react";+import * as TooltipPrimitive from "@radix-ui/react-tooltip";-import { cn } from "@/lib/utils"+import { cn } from "@/lib/utils";-const TooltipProvider = TooltipPrimitive.Provider+const TooltipProvider = TooltipPrimitive.Provider;-const Tooltip = TooltipPrimitive.Root+const Tooltip = TooltipPrimitive.Root;-const TooltipTrigger = TooltipPrimitive.Trigger+const TooltipTrigger = TooltipPrimitive.Trigger;const TooltipContent = React.forwardRef<React.ElementRef<typeof TooltipPrimitive.Content>,@@ -19,12 +19,12 @@ const TooltipContent = React.forwardRef<ref={ref}sideOffset={sideOffset}className={cn(- "z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",- className+ "bg-popover text-popover-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 overflow-hidden rounded-md border px-3 py-1.5 text-sm shadow-md",+ className,)}{...props}/>-))-TooltipContent.displayName = TooltipPrimitive.Content.displayName+));+TooltipContent.displayName = TooltipPrimitive.Content.displayName;-export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }+export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };diff --git a/apps/web/src/contentlayer/documents/post.ts b/apps/web/src/contentlayer/documents/post.tsindex c045c8610..54e1a0c0f 100644--- a/apps/web/src/contentlayer/documents/post.ts+++ b/apps/web/src/contentlayer/documents/post.ts@@ -1,50 +1,50 @@-import {- defineDocumentType,- defineNestedType,-} from "contentlayer/source-files";-import readingTime from "reading-time";--const Author = defineNestedType(() => ({- name: "Author",- fields: {- name: { type: "string", required: true },- url: { type: "string" },- avatar: { type: "string" },- },-}));--export const Post = defineDocumentType(() => ({- name: "Post",- contentType: "mdx",- filePathPattern: "posts/*.mdx",- fields: {- title: {- type: "string",- required: true,- },- description: {- type: "string",- required: true,- },- image: {- type: "string",- required: true,- },- publishedAt: { type: "date", required: true },- author: {- type: "nested", // TODO: allow list of authors- of: Author,- required: true,- },- },- computedFields: {- slug: {- type: "string",- resolve: (post) => post._raw.sourceFileName.replace(/\.mdx$/, ""),- },- readingTime: {- type: "string",- resolve: (post) => readingTime(post.body.raw).text,- },- },-}));+import {+ defineDocumentType,+ defineNestedType,+} from "contentlayer/source-files";+import readingTime from "reading-time";++const Author = defineNestedType(() => ({+ name: "Author",+ fields: {+ name: { type: "string", required: true },+ url: { type: "string" },+ avatar: { type: "string" },+ },+}));++export const Post = defineDocumentType(() => ({+ name: "Post",+ contentType: "mdx",+ filePathPattern: "posts/*.mdx",+ fields: {+ title: {+ type: "string",+ required: true,+ },+ description: {+ type: "string",+ required: true,+ },+ image: {+ type: "string",+ required: true,+ },+ publishedAt: { type: "date", required: true },+ author: {+ type: "nested", // TODO: allow list of authors+ of: Author,+ required: true,+ },+ },+ computedFields: {+ slug: {+ type: "string",+ resolve: (post) => post._raw.sourceFileName.replace(/\.mdx$/, ""),+ },+ readingTime: {+ type: "string",+ resolve: (post) => readingTime(post.body.raw).text,+ },+ },+}));diff --git a/apps/web/src/contentlayer/plugins/pretty-code.ts b/apps/web/src/contentlayer/plugins/pretty-code.tsindex fd6c14caf..2b9da8976 100644--- a/apps/web/src/contentlayer/plugins/pretty-code.ts+++ b/apps/web/src/contentlayer/plugins/pretty-code.ts@@ -1,29 +1,29 @@-import rehypePrettyCode from "rehype-pretty-code";-import type * as unified from "unified";--const prettyCode: unified.Pluggable<any[]> = [- rehypePrettyCode,- {- // prepacked themes- // https://github.com/shikijs/shiki/blob/main/docs/themes.md- theme: "github-light",-- // https://stackoverflow.com/questions/76549262/onvisithighlightedline-cannot-push-classname-using-rehype-pretty-code- // FIXME: maybe properly type this- onVisitLine(node: any) {- // Prevent lines from collapsing in `display: grid` mode, and- // allow empty lines to be copy/pasted- if (node.children.length === 0) {- node.children = [{ type: "text", value: " " }];- }- node.properties.className = ["line"]; // add 'line' class to each line in the code block- },-- // FIXME: maybe properly type this- onVisitHighlightedLine(node: any) {- node.properties.className?.push("line--highlighted");- },- },-];--export default prettyCode;+import rehypePrettyCode from "rehype-pretty-code";+import type * as unified from "unified";++const prettyCode: unified.Pluggable<any[]> = [+ rehypePrettyCode,+ {+ // prepacked themes+ // https://github.com/shikijs/shiki/blob/main/docs/themes.md+ theme: "github-light",++ // https://stackoverflow.com/questions/76549262/onvisithighlightedline-cannot-push-classname-using-rehype-pretty-code+ // FIXME: maybe properly type this+ onVisitLine(node: any) {+ // Prevent lines from collapsing in `display: grid` mode, and+ // allow empty lines to be copy/pasted+ if (node.children.length === 0) {+ node.children = [{ type: "text", value: " " }];+ }+ node.properties.className = ["line"]; // add 'line' class to each line in the code block+ },++ // FIXME: maybe properly type this+ onVisitHighlightedLine(node: any) {+ node.properties.className?.push("line--highlighted");+ },+ },+];++export default prettyCode;