From 4d127a038bf768eded68aae3cfa5c1b12241bdac Mon Sep 17 00:00:00 2001 From: Maze Winther Date: Fri, 27 Mar 2026 00:55:15 +0100 Subject: chore: normalize line endings --- apps/web/src/lib/guides/definitions/custom.tsx | 48 +- apps/web/src/lib/guides/definitions/platforms.tsx | 130 ++-- .../src/lib/guides/definitions/tiktok-layout.tsx | 670 ++++++++++----------- apps/web/src/lib/guides/index.ts | 26 +- apps/web/src/lib/guides/registry.tsx | 56 +- apps/web/src/lib/guides/types.ts | 40 +- 6 files changed, 485 insertions(+), 485 deletions(-) (limited to 'apps/web/src/lib/guides') diff --git a/apps/web/src/lib/guides/definitions/custom.tsx b/apps/web/src/lib/guides/definitions/custom.tsx index bc92cb84..fe7944cb 100644 --- a/apps/web/src/lib/guides/definitions/custom.tsx +++ b/apps/web/src/lib/guides/definitions/custom.tsx @@ -1,24 +1,24 @@ -import { PlusSignIcon, RulerIcon } from "@hugeicons/core-free-icons"; -import { HugeiconsIcon } from "@hugeicons/react"; -import { Button } from "@/components/ui/button"; -import type { GuideDefinition } from "@/lib/guides/types"; - -function CustomGuideOptions() { - return ( -
- -
- ); -} - -export const customGuide = { - id: "custom", - label: "Custom", - renderPreview: () => , - renderTriggerIcon: () => , - renderOverlay: () => null, - renderOptions: () => , -} as const satisfies GuideDefinition; +import { PlusSignIcon, RulerIcon } from "@hugeicons/core-free-icons"; +import { HugeiconsIcon } from "@hugeicons/react"; +import { Button } from "@/components/ui/button"; +import type { GuideDefinition } from "@/lib/guides/types"; + +function CustomGuideOptions() { + return ( +
+ +
+ ); +} + +export const customGuide = { + id: "custom", + label: "Custom", + renderPreview: () => , + renderTriggerIcon: () => , + renderOverlay: () => null, + renderOptions: () => , +} as const satisfies GuideDefinition; diff --git a/apps/web/src/lib/guides/definitions/platforms.tsx b/apps/web/src/lib/guides/definitions/platforms.tsx index ffeec1c0..8c403eb1 100644 --- a/apps/web/src/lib/guides/definitions/platforms.tsx +++ b/apps/web/src/lib/guides/definitions/platforms.tsx @@ -1,65 +1,65 @@ -import Image from "next/image"; -import type { GuideDefinition } from "@/lib/guides/types"; -import { TikTokLayout } from "./tiktok-layout"; - -function PlatformLogo({ - domain, - className = "size-4", -}: { - domain: string; - className?: string; -}) { - return ( - - ); -} - -function PlatformGuidePreview({ domain }: { domain: string }) { - return ; -} - -function platformGuide({ - id, - label, - domain, -}: { - id: string; - label: string; - domain: string; -}): GuideDefinition { - return { - id, - label, - renderPreview: () => , - renderTriggerIcon: () => , - renderOverlay: () => null, - }; -} - -export const tiktokGuide: GuideDefinition = { - ...platformGuide({ id: "tiktok", label: "TikTok", domain: "tiktok.com" }), - renderOverlay: () => , -}; -export const igReelsGuide = platformGuide({ - id: "ig-reels", - label: "Reels", - domain: "instagram.com", -}); -export const ytShortsGuide = platformGuide({ - id: "yt-shorts", - label: "Shorts", - domain: "youtube.com", -}); -export const spotlightGuide = platformGuide({ - id: "spotlight", - label: "Spotlight", - domain: "snapchat.com", -}); +import Image from "next/image"; +import type { GuideDefinition } from "@/lib/guides/types"; +import { TikTokLayout } from "./tiktok-layout"; + +function PlatformLogo({ + domain, + className = "size-4", +}: { + domain: string; + className?: string; +}) { + return ( + + ); +} + +function PlatformGuidePreview({ domain }: { domain: string }) { + return ; +} + +function platformGuide({ + id, + label, + domain, +}: { + id: string; + label: string; + domain: string; +}): GuideDefinition { + return { + id, + label, + renderPreview: () => , + renderTriggerIcon: () => , + renderOverlay: () => null, + }; +} + +export const tiktokGuide: GuideDefinition = { + ...platformGuide({ id: "tiktok", label: "TikTok", domain: "tiktok.com" }), + renderOverlay: () => , +}; +export const igReelsGuide = platformGuide({ + id: "ig-reels", + label: "Reels", + domain: "instagram.com", +}); +export const ytShortsGuide = platformGuide({ + id: "yt-shorts", + label: "Shorts", + domain: "youtube.com", +}); +export const spotlightGuide = platformGuide({ + id: "spotlight", + label: "Spotlight", + domain: "snapchat.com", +}); diff --git a/apps/web/src/lib/guides/definitions/tiktok-layout.tsx b/apps/web/src/lib/guides/definitions/tiktok-layout.tsx index 794d1379..b7513bac 100644 --- a/apps/web/src/lib/guides/definitions/tiktok-layout.tsx +++ b/apps/web/src/lib/guides/definitions/tiktok-layout.tsx @@ -1,335 +1,335 @@ -export function TikTokLayout() { - return ( - - TikTok Layout - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ); -} +export function TikTokLayout() { + return ( + + TikTok Layout + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ); +} diff --git a/apps/web/src/lib/guides/index.ts b/apps/web/src/lib/guides/index.ts index 007e6fda..9ea75631 100644 --- a/apps/web/src/lib/guides/index.ts +++ b/apps/web/src/lib/guides/index.ts @@ -1,13 +1,13 @@ -import { GUIDE_REGISTRY } from "./registry"; -import type { GuideDefinition } from "@/lib/guides/types"; - -export { GUIDE_REGISTRY, isGuideId } from "./registry"; -export type { GuideDefinition, GuideId, GuideRenderProps } from "./registry"; - -export function getGuideById(guideId: string | null): GuideDefinition | null { - if (!guideId) { - return null; - } - - return GUIDE_REGISTRY.find((guide) => guide.id === guideId) ?? null; -} +import { GUIDE_REGISTRY } from "./registry"; +import type { GuideDefinition } from "@/lib/guides/types"; + +export { GUIDE_REGISTRY, isGuideId } from "./registry"; +export type { GuideDefinition, GuideId, GuideRenderProps } from "./registry"; + +export function getGuideById(guideId: string | null): GuideDefinition | null { + if (!guideId) { + return null; + } + + return GUIDE_REGISTRY.find((guide) => guide.id === guideId) ?? null; +} diff --git a/apps/web/src/lib/guides/registry.tsx b/apps/web/src/lib/guides/registry.tsx index 60dec428..8000d989 100644 --- a/apps/web/src/lib/guides/registry.tsx +++ b/apps/web/src/lib/guides/registry.tsx @@ -1,28 +1,28 @@ -import type { GuideDefinition } from "@/lib/guides/types"; -import { gridGuide } from "./definitions/grid"; -// import { customGuide } from "./definitions/custom"; -import { - tiktokGuide, - igReelsGuide, - ytShortsGuide, - spotlightGuide, -} from "./definitions/platforms"; - -export type { GuideDefinition, GuideRenderProps } from "@/lib/guides/types"; - -export const GUIDE_REGISTRY = [ - gridGuide, - tiktokGuide, - igReelsGuide, - ytShortsGuide, - spotlightGuide, - - // todo: wire up custom guide fully, then uncomment this: - // customGuide, -] as const satisfies readonly GuideDefinition[]; - -export type GuideId = (typeof GUIDE_REGISTRY)[number]["id"]; - -export function isGuideId(value: string): value is GuideId { - return GUIDE_REGISTRY.some((guide) => guide.id === value); -} +import type { GuideDefinition } from "@/lib/guides/types"; +import { gridGuide } from "./definitions/grid"; +// import { customGuide } from "./definitions/custom"; +import { + tiktokGuide, + igReelsGuide, + ytShortsGuide, + spotlightGuide, +} from "./definitions/platforms"; + +export type { GuideDefinition, GuideRenderProps } from "@/lib/guides/types"; + +export const GUIDE_REGISTRY = [ + gridGuide, + tiktokGuide, + igReelsGuide, + ytShortsGuide, + spotlightGuide, + + // todo: wire up custom guide fully, then uncomment this: + // customGuide, +] as const satisfies readonly GuideDefinition[]; + +export type GuideId = (typeof GUIDE_REGISTRY)[number]["id"]; + +export function isGuideId(value: string): value is GuideId { + return GUIDE_REGISTRY.some((guide) => guide.id === value); +} diff --git a/apps/web/src/lib/guides/types.ts b/apps/web/src/lib/guides/types.ts index 340101ac..5b776090 100644 --- a/apps/web/src/lib/guides/types.ts +++ b/apps/web/src/lib/guides/types.ts @@ -1,20 +1,20 @@ -import type { ReactNode } from "react"; - -export interface GridConfig { - rows: number; - cols: number; -} - -export interface GuideRenderProps { - width: number; - height: number; -} - -export interface GuideDefinition { - id: string; - label: string; - renderPreview: () => ReactNode; - renderTriggerIcon: () => ReactNode; - renderOverlay: (props: GuideRenderProps) => ReactNode; - renderOptions?: () => ReactNode; -} +import type { ReactNode } from "react"; + +export interface GridConfig { + rows: number; + cols: number; +} + +export interface GuideRenderProps { + width: number; + height: number; +} + +export interface GuideDefinition { + id: string; + label: string; + renderPreview: () => ReactNode; + renderTriggerIcon: () => ReactNode; + renderOverlay: (props: GuideRenderProps) => ReactNode; + renderOptions?: () => ReactNode; +} -- cgit v1.3.1