- simplify imports

- update translations
- convert image to base64 before sending to printer
- update development docs
This commit is contained in:
Amruth Pillai
2026-01-22 15:46:09 +01:00
parent 5d73998f82
commit 0bc53b9c2a
165 changed files with 13246 additions and 13465 deletions
+1 -7
View File
@@ -1,13 +1,7 @@
import { Trans } from "@lingui/react/macro";
import { useRef } from "react";
import { useHotkeys } from "react-hotkeys-hook";
import {
Dialog,
DialogContent,
DialogDescription,
DialogHeader,
DialogTitle,
} from "@/components/animate-ui/components/radix/dialog";
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from "@/components/ui/dialog";
import { Command, CommandEmpty, CommandInput, CommandList } from "../ui/command";
import { NavigationCommandGroup } from "./pages/navigation";
import { PreferencesCommandGroup } from "./pages/preferences";
+1 -3
View File
@@ -1,8 +1,8 @@
import { EyedropperIcon } from "@phosphor-icons/react";
import { Slider as SliderPrimitive, Slot as SlotPrimitive } from "radix-ui";
import * as React from "react";
import { Button } from "@/components/animate-ui/components/buttons/button";
import { VisuallyHiddenInput } from "@/components/input/visually-hidden-input";
import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input";
import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover";
import {
@@ -826,6 +826,4 @@ export {
ColorPickerSwatch as Swatch,
ColorPickerEyeDropper as EyeDropper,
ColorPickerInput as Input,
//
useColorPickerStore as useColorPicker,
};
+1 -1
View File
@@ -1,7 +1,7 @@
import { t } from "@lingui/core/macro";
import { GithubLogoIcon, StarIcon } from "@phosphor-icons/react";
import { useQuery } from "@tanstack/react-query";
import { Button } from "@/components/animate-ui/components/buttons/button";
import { Button } from "@/components/ui/button";
import { orpc } from "@/integrations/orpc/client";
import { CountUp } from "../animation/count-up";
+1 -1
View File
@@ -3,7 +3,7 @@ import { ProhibitIcon } from "@phosphor-icons/react";
import Fuse from "fuse.js";
import { memo, useCallback, useMemo, useState } from "react";
import { type CellComponentProps, Grid } from "react-window";
import { Button } from "@/components/animate-ui/components/buttons/button";
import { Button } from "@/components/ui/button";
import { type IconName, icons } from "@/schema/icons";
import { cn } from "@/utils/style";
import { Input } from "../ui/input";
+2 -2
View File
@@ -52,7 +52,7 @@ import { useMemo } from "react";
import { toast } from "sonner";
import { match } from "ts-pattern";
import z from "zod";
import { Button } from "@/components/animate-ui/components/buttons/button";
import { Button } from "@/components/ui/button";
import {
DropdownMenu,
DropdownMenuCheckboxItem,
@@ -60,7 +60,7 @@ import {
DropdownMenuItem,
DropdownMenuSeparator,
DropdownMenuTrigger,
} from "@/components/animate-ui/components/radix/dropdown-menu";
} from "@/components/ui/dropdown-menu";
import { usePrompt } from "@/hooks/use-prompt";
import { isRTL } from "@/utils/locale";
import { sanitizeHtml } from "@/utils/sanitize";
+1 -1
View File
@@ -1,7 +1,7 @@
import { Trans } from "@lingui/react/macro";
import { ArrowClockwiseIcon, WarningIcon } from "@phosphor-icons/react";
import type { ErrorComponentProps } from "@tanstack/react-router";
import { Button } from "@/components/animate-ui/components/buttons/button";
import { Button } from "@/components/ui/button";
import { Alert, AlertDescription, AlertTitle } from "../ui/alert";
import { BrandIcon } from "../ui/brand-icon";
+1 -1
View File
@@ -1,7 +1,7 @@
import { Trans } from "@lingui/react/macro";
import { ArrowLeftIcon, WarningIcon } from "@phosphor-icons/react";
import { Link, type NotFoundRouteProps } from "@tanstack/react-router";
import { Button } from "@/components/animate-ui/components/buttons/button";
import { Button } from "@/components/ui/button";
import { Alert, AlertDescription, AlertTitle } from "../ui/alert";
import { BrandIcon } from "../ui/brand-icon";
+1 -1
View File
@@ -5,7 +5,7 @@ import type z from "zod";
import { levelDesignSchema } from "@/schema/resume/data";
import { Combobox, type ComboboxProps } from "../ui/combobox";
export type LevelType = z.infer<typeof levelDesignSchema>["type"];
type LevelType = z.infer<typeof levelDesignSchema>["type"];
type LevelTypeComboboxProps = Omit<ComboboxProps, "options">;
@@ -1,5 +1,5 @@
import { type HTMLMotionProps, motion } from "motion/react";
import { Slot, type WithAsChild } from "@/components/animate-ui/primitives/animate/slot";
import { Slot, type WithAsChild } from "@/components/primitives/slot";
type ButtonProps = WithAsChild<
Omit<HTMLMotionProps<"button">, "children"> & {
@@ -178,9 +178,7 @@ export function getSectionComponent(
if (visibleItems.length === 0) return null;
return (
<section
className={cn(`page-section page-section-custom page-section-${id} wrap-break-word`, sectionClassName)}
>
<section className={cn(`page-section page-section-custom page-section-${id}`, sectionClassName)}>
<h6 className="mb-1 text-(--page-primary-color)">{customSection.title}</h6>
<div
@@ -188,10 +186,7 @@ export function getSectionComponent(
style={{ gridTemplateColumns: `repeat(${customSection.columns}, 1fr)` }}
>
{visibleItems.map((item) => (
<div
key={item.id}
className={cn(`section-item section-item-${customSection.type} wrap-break-word *:space-y-1`)}
>
<div key={item.id} className={cn(`section-item section-item-${customSection.type} *:space-y-1`)}>
{renderItemByType(customSection.type, item, itemClassName)}
</div>
))}
+1 -1
View File
@@ -10,7 +10,7 @@ export function PageLink({ url, label, className }: Props) {
if (!url) return null;
return (
<a href={url} target="_blank" rel="noopener noreferrer" className={cn("block truncate", className)}>
<a href={url} target="_blank" rel="noopener noreferrer" className={cn("inline-block text-wrap", className)}>
{label || url}
</a>
);
@@ -26,7 +26,7 @@ export function PageSection<T extends SectionType>({ type, className, children }
style={{ gridTemplateColumns: `repeat(${section.columns}, 1fr)` }}
>
{items.map((item) => (
<div key={item.id} className={cn(`section-item section-item-${type} wrap-break-word *:space-y-1`)}>
<div key={item.id} className={cn(`section-item section-item-${type} *:space-y-1`)}>
{children(item)}
</div>
))}
@@ -13,7 +13,7 @@ export function PageSummary({ className }: PageSummaryProps) {
return (
<section
className={cn(
"page-section page-section-summary wrap-break-word",
"page-section page-section-summary",
section.hidden && "hidden",
section.content === "" && "hidden",
className,
+1 -1
View File
@@ -2,7 +2,7 @@ import { t } from "@lingui/core/macro";
import { MoonIcon, SunIcon } from "@phosphor-icons/react";
import { useCallback, useRef } from "react";
import { flushSync } from "react-dom";
import { Button } from "@/components/animate-ui/components/buttons/button";
import { Button } from "@/components/ui/button";
import { useTheme } from "./provider";
export function ThemeToggleButton(props: React.ComponentProps<typeof Button>) {
@@ -8,7 +8,7 @@ import {
type AccordionProps as AccordionPrimitiveProps,
AccordionTrigger as AccordionTriggerPrimitive,
type AccordionTriggerProps as AccordionTriggerPrimitiveProps,
} from "@/components/animate-ui/primitives/radix/accordion";
} from "@/components/primitives/accordion";
import { cn } from "@/utils/style";
type AccordionProps = AccordionPrimitiveProps;
@@ -20,7 +20,7 @@ function Accordion(props: AccordionProps) {
type AccordionItemProps = AccordionItemPrimitiveProps;
function AccordionItem({ className, ...props }: AccordionItemProps) {
return <AccordionItemPrimitive className={cn("border-b last:border-b-0", className)} {...props} />;
return <AccordionItemPrimitive className={cn(className)} {...props} />;
}
type AccordionTriggerProps = AccordionTriggerPrimitiveProps;
@@ -1,4 +1,3 @@
import { buttonVariants } from "@/components/animate-ui/components/buttons/button";
import {
AlertDialogAction as AlertDialogActionPrimitive,
type AlertDialogActionProps as AlertDialogActionPrimitiveProps,
@@ -21,7 +20,8 @@ import {
type AlertDialogTitleProps as AlertDialogTitlePrimitiveProps,
AlertDialogTrigger as AlertDialogTriggerPrimitive,
type AlertDialogTriggerProps as AlertDialogTriggerPrimitiveProps,
} from "@/components/animate-ui/primitives/radix/alert-dialog";
} from "@/components/primitives/alert-dialog";
import { buttonVariants } from "@/components/ui/button";
import { cn } from "@/utils/style";
type AlertDialogProps = AlertDialogPrimitiveProps;
+1 -1
View File
@@ -36,4 +36,4 @@ function Badge({
);
}
export { Badge, badgeVariants };
export { Badge };
+1 -1
View File
@@ -74,4 +74,4 @@ function ButtonGroupSeparator({
);
}
export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants };
export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText };
@@ -1,8 +1,5 @@
import { cva, type VariantProps } from "class-variance-authority";
import {
Button as ButtonPrimitive,
type ButtonProps as ButtonPrimitiveProps,
} from "@/components/animate-ui/primitives/buttons/button";
import { Button as ButtonPrimitive, type ButtonProps as ButtonPrimitiveProps } from "@/components/primitives/button";
import { cn } from "@/utils/style";
const buttonVariants = cva(
+1 -1
View File
@@ -1,7 +1,7 @@
import { t } from "@lingui/core/macro";
import { CaretUpDownIcon, CheckIcon } from "@phosphor-icons/react";
import * as React from "react";
import { Button } from "@/components/animate-ui/components/buttons/button";
import { Button } from "@/components/ui/button";
import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from "@/components/ui/command";
import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover";
import { useControlledState } from "@/hooks/use-controlled-state";
+1 -7
View File
@@ -1,13 +1,7 @@
import { CheckIcon, MagnifyingGlassIcon } from "@phosphor-icons/react";
import { Command as CommandPrimitive } from "cmdk";
import type * as React from "react";
import {
Dialog,
DialogContent,
DialogDescription,
DialogHeader,
DialogTitle,
} from "@/components/animate-ui/components/radix/dialog";
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from "@/components/ui/dialog";
import { InputGroup, InputGroupAddon } from "@/components/ui/input-group";
import { cn } from "@/utils/style";
@@ -18,7 +18,7 @@ import {
type DialogTitleProps as DialogTitlePrimitiveProps,
DialogTrigger as DialogTriggerPrimitive,
type DialogTriggerProps as DialogTriggerPrimitiveProps,
} from "@/components/animate-ui/primitives/radix/dialog";
} from "@/components/primitives/dialog";
import { cn } from "@/utils/style";
type DialogProps = DialogPrimitiveProps;
@@ -29,7 +29,7 @@ import {
type DropdownMenuSubTriggerProps as DropdownMenuSubTriggerPrimitiveProps,
DropdownMenuTrigger as DropdownMenuTriggerPrimitive,
type DropdownMenuTriggerProps as DropdownMenuTriggerPrimitiveProps,
} from "@/components/animate-ui/primitives/radix/dropdown-menu";
} from "@/components/primitives/dropdown-menu";
import { cn } from "@/utils/style";
type DropdownMenuProps = DropdownMenuPrimitiveProps;
+1 -1
View File
@@ -152,4 +152,4 @@ function FormMessage({ className, ...props }: React.ComponentProps<"p">) {
);
}
export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField };
export { Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField };
+1 -1
View File
@@ -1,6 +1,6 @@
import { cva, type VariantProps } from "class-variance-authority";
import type * as React from "react";
import { Button } from "@/components/animate-ui/components/buttons/button";
import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input";
import { Textarea } from "@/components/ui/textarea";
import { cn } from "@/utils/style";
+1 -1
View File
@@ -1,7 +1,7 @@
import { t } from "@lingui/core/macro";
import { CaretUpDownIcon, CheckIcon } from "@phosphor-icons/react";
import * as React from "react";
import { Button } from "@/components/animate-ui/components/buttons/button";
import { Button } from "@/components/ui/button";
import {
Command,
CommandEmpty,
+1 -1
View File
@@ -1,7 +1,7 @@
import { XIcon } from "@phosphor-icons/react";
import { Dialog as SheetPrimitive } from "radix-ui";
import type * as React from "react";
import { Button } from "@/components/animate-ui/components/buttons/button";
import { Button } from "@/components/ui/button";
import { cn } from "@/utils/style";
function Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>) {
+1 -1
View File
@@ -2,7 +2,7 @@ import { SidebarSimpleIcon } from "@phosphor-icons/react";
import { cva, type VariantProps } from "class-variance-authority";
import { Slot as SlotPrimitive } from "radix-ui";
import * as React from "react";
import { Button } from "@/components/animate-ui/components/buttons/button";
import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input";
import { Separator } from "@/components/ui/separator";
import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle } from "@/components/ui/sheet";
@@ -5,7 +5,7 @@ import {
Switch as SwitchPrimitive,
type SwitchProps as SwitchPrimitiveProps,
SwitchThumb as SwitchThumbPrimitive,
} from "@/components/animate-ui/primitives/radix/switch";
} from "@/components/primitives/switch";
import { cn } from "@/utils/style";
type SwitchProps = SwitchPrimitiveProps & {
+1 -1
View File
@@ -35,4 +35,4 @@ function Toggle({
);
}
export { Toggle, toggleVariants };
export { Toggle };
+2 -2
View File
@@ -4,6 +4,7 @@ import { Trans } from "@lingui/react/macro";
import { PaletteIcon, SignOutIcon, TranslateIcon } from "@phosphor-icons/react";
import { useRouter } from "@tanstack/react-router";
import { toast } from "sonner";
import { useTheme } from "@/components/theme/provider";
import {
DropdownMenu,
DropdownMenuContent,
@@ -16,8 +17,7 @@ import {
DropdownMenuSubContent,
DropdownMenuSubTrigger,
DropdownMenuTrigger,
} from "@/components/animate-ui/components/radix/dropdown-menu";
import { useTheme } from "@/components/theme/provider";
} from "@/components/ui/dropdown-menu";
import { authClient } from "@/integrations/auth/client";
import type { AuthSession } from "@/integrations/auth/types";
import { isLocale, loadLocale, localeMap, setLocaleServerFn } from "@/utils/locale";