build: standardise on react 19 and deduplicate deps

Eliminates dual React ecosystems and reduces dependency
duplication by consolidating on a single React version and
expanding the pnpm workspace catalog.

- Upgrade all packages from React 18 to React 19
- Remove @types/react and @types/node overrides (no longer
  needed with single React version)
- Standardise @types/node to ^22 across all packages
- Add prisma-kysely>@prisma/internals override to eliminate
  old prisma 6.16.x subtree
- Fix React 19 type changes: useRef requires initial value,
  JSX namespace needs explicit import, RefObject includes null
- Expand catalog with 14 new entries (ai, dotenv, pino,
  playwright, prisma tooling, nodemailer, pdfjs-dist, etc.)
- Catalog radix-ui, next, lucide-react, postcss, and
  typescript for docs/openpage-api alignment
- Run pnpm dedupe to collapse peer-dep context duplicates
This commit is contained in:
Lucas Smith
2026-03-01 13:01:26 +11:00
parent 960217c78d
commit f66f01a09a
15 changed files with 10996 additions and 5001 deletions
@@ -1,7 +1,9 @@
import React from 'react';
import type { RecipientRole } from '@prisma/client';
import { BadgeCheck, Copy, Eye, PencilLine, User } from 'lucide-react';
export const ROLE_ICONS: Record<RecipientRole, JSX.Element> = {
export const ROLE_ICONS: Record<RecipientRole, React.ReactNode> = {
SIGNER: <PencilLine className="h-4 w-4" />,
APPROVER: <BadgeCheck className="h-4 w-4" />,
CC: <Copy className="h-4 w-4" />,
@@ -17,7 +17,7 @@ import { getSvgPathFromStroke } from './helper';
import { Point } from './point';
import { SignaturePadColorPicker } from './signature-pad-color-picker';
const checkSignatureValidity = (element: RefObject<HTMLCanvasElement>) => {
const checkSignatureValidity = (element: RefObject<HTMLCanvasElement | null>) => {
if (!element.current) {
return false;
}
@@ -291,10 +291,10 @@ export const SignaturePadDraw = ({
<SignaturePadColorPicker selectedColor={selectedColor} setSelectedColor={setSelectedColor} />
<div className="absolute bottom-3 right-3 flex gap-2">
<div className="absolute right-3 bottom-3 flex gap-2">
<button
type="button"
className="rounded-full p-0 text-[0.688rem] text-muted-foreground/60 ring-offset-background hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
className="text-muted-foreground/60 ring-offset-background hover:text-muted-foreground focus-visible:ring-ring rounded-full p-0 text-[0.688rem] focus-visible:ring-2 focus-visible:outline-none"
onClick={() => onClearClick()}
>
<Trans>Clear Signature</Trans>
@@ -303,7 +303,7 @@ export const SignaturePadDraw = ({
{isSignatureValid === false && (
<div className="absolute bottom-4 left-4 flex gap-2">
<span className="text-xs text-destructive">
<span className="text-destructive text-xs">
<Trans>Signature is too small</Trans>
</span>
</div>
@@ -314,7 +314,7 @@ export const SignaturePadDraw = ({
<button
type="button"
title="undo"
className="rounded-full p-0 text-[0.688rem] text-muted-foreground/60 ring-offset-background hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
className="text-muted-foreground/60 ring-offset-background hover:text-muted-foreground focus-visible:ring-ring rounded-full p-0 text-[0.688rem] focus-visible:ring-2 focus-visible:outline-none"
onClick={onUndoClick}
>
<Undo2 className="h-4 w-4" />