Skip to content

Commit a5359b7

Browse files
authored
Merge pull request #407 from complexdatacollective/next
Next
2 parents 736ef27 + 2aff6f2 commit a5359b7

4 files changed

Lines changed: 1678 additions & 1927 deletions

File tree

components/Link.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import NextLink, { type LinkProps, type LinkRestProps } from 'next/link';
1+
import NextLink from 'next/link';
22

3-
export default function Link(props: LinkProps<LinkRestProps>) {
3+
export default function Link(props: React.ComponentProps<typeof NextLink>) {
44
return (
55
<NextLink
66
className="text-link group font-semibold transition-all duration-300 ease-in-out"

hooks/useZodForm.ts

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,25 @@
1-
import { zodResolver } from '@hookform/resolvers/zod';
2-
import { useForm, type UseFormProps } from 'react-hook-form';
3-
import type { z } from 'zod';
1+
import { standardSchemaResolver } from '@hookform/resolvers/standard-schema';
2+
import {
3+
useForm as __useForm,
4+
type FieldValues,
5+
type UseFormProps,
6+
} from 'react-hook-form';
7+
import type { ZodType, ZodTypeDef } from 'zod/v3';
48

59
/**
610
* Reusable hook for zod + react-hook-form
711
*/
8-
export default function useZodForm<TSchema extends z.ZodType>(
9-
props: Omit<UseFormProps<TSchema['_input']>, 'resolver'> & {
10-
schema: TSchema;
12+
export default function useForm<
13+
TOut extends FieldValues,
14+
TIn extends FieldValues,
15+
>(
16+
props: Omit<UseFormProps<TIn, unknown, TOut>, 'resolver'> & {
17+
schema: ZodType<TOut, ZodTypeDef, TIn>;
1118
},
1219
) {
13-
const form = useForm<TSchema['_input']>({
20+
const form = __useForm<TIn, unknown, TOut>({
1421
...props,
15-
resolver: zodResolver(props.schema, undefined),
22+
resolver: standardSchemaResolver(props.schema, undefined),
1623
});
1724

1825
return form;

package.json

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "fresco",
3-
"version": "2.1.6",
3+
"version": "2.1.7",
44
"private": true,
55
"type": "module",
66
"packageManager": "pnpm@9.1.1+sha256.9551e803dcb7a1839fdf5416153a844060c7bce013218ce823410532504ac10b",
@@ -26,7 +26,7 @@
2626
"@codaco/analytics": "7.0.0",
2727
"@codaco/protocol-validation": "3.0.0",
2828
"@codaco/shared-consts": "^0.0.2",
29-
"@hookform/resolvers": "^5.0.1",
29+
"@hookform/resolvers": "^5.1.1",
3030
"@lucia-auth/adapter-prisma": "^3.0.2",
3131
"@paralleldrive/cuid2": "^2.2.2",
3232
"@radix-ui/react-alert-dialog": "^1.1.14",
@@ -60,25 +60,25 @@
6060
"csvtojson": "^2.0.10",
6161
"d3-interpolate-path": "^2.3.0",
6262
"dotenv": "^16.5.0",
63-
"es-toolkit": "^1.38.0",
63+
"es-toolkit": "^1.39.3",
6464
"fuse.js": "^7.1.0",
6565
"jssha": "^3.3.1",
6666
"jszip": "^3.10.1",
6767
"lucia": "^2.7.7",
68-
"lucide-react": "^0.511.0",
69-
"luxon": "^3.5.0",
70-
"motion": "^12.12.1",
71-
"next": "^14.2.26",
68+
"lucide-react": "^0.516.0",
69+
"luxon": "^3.6.1",
70+
"motion": "^12.18.1",
71+
"next": "^14.2.30",
7272
"nuqs": "^1.20.0",
7373
"ohash": "^1.1.4",
7474
"papaparse": "^5.5.3",
75-
"postcss": "^8.5.3",
75+
"postcss": "^8.5.6",
7676
"react": "18.3.1",
7777
"react-compound-slider": "^3.4.0",
7878
"react-dom": "18.3.1",
7979
"react-dropzone": "^14.3.8",
8080
"react-flip-toolkit": "^7.2.4",
81-
"react-hook-form": "^7.56.4",
81+
"react-hook-form": "^7.58.1",
8282
"react-markdown": "^9.0.3",
8383
"react-redux": "^8.1.3",
8484
"react-resize-aware": "^4.0.0",
@@ -98,53 +98,53 @@
9898
"scrollparent": "^2.1.0",
9999
"sharp": "^0.34.2",
100100
"strip-markdown": "^6.0.0",
101-
"tailwind-merge": "^3.3.0",
101+
"tailwind-merge": "^3.3.1",
102102
"uploadthing": "^7.7.2",
103103
"usehooks-ts": "^3.1.1",
104104
"uuid": "^11.1.0",
105-
"validator": "^13.15.0",
106-
"zod": "^3.25.16",
105+
"validator": "^13.15.15",
106+
"zod": "^3.25.67",
107107
"zod-form-data": "^2.0.7"
108108
},
109109
"devDependencies": {
110-
"@playwright/test": "^1.52.0",
111-
"@prisma/client": "^6.8.2",
112-
"@t3-oss/env-nextjs": "^0.13.4",
110+
"@playwright/test": "^1.53.0",
111+
"@prisma/client": "^6.10.0",
112+
"@t3-oss/env-nextjs": "^0.13.8",
113113
"@tailwindcss/aspect-ratio": "^0.4.2",
114114
"@tailwindcss/container-queries": "^0.1.1",
115115
"@tailwindcss/forms": "^0.5.10",
116-
"@tailwindcss/postcss": "4.1.7",
116+
"@tailwindcss/postcss": "4.1.10",
117117
"@tailwindcss/typography": "^0.5.16",
118118
"@total-typescript/ts-reset": "^0.6.1",
119119
"@types/archiver": "^6.0.3",
120120
"@types/async": "^3.2.24",
121121
"@types/d3-interpolate-path": "^2.0.3",
122122
"@types/eslint": "^8.56.12",
123-
"@types/jest": "^29.5.14",
123+
"@types/jest": "^30.0.0",
124124
"@types/node": "^22.13.9",
125125
"@types/papaparse": "^5.3.16",
126126
"@types/react": "^18.3.7",
127127
"@types/react-dom": "^18.3.1",
128128
"@types/redux-form": "^8.3.11",
129129
"@types/uuid": "^10.0.0",
130-
"@types/validator": "^13.15.1",
131-
"@typescript-eslint/eslint-plugin": "^8.32.1",
132-
"@typescript-eslint/parser": "^8.32.1",
133-
"@vitejs/plugin-react": "^4.4.1",
130+
"@types/validator": "^13.15.2",
131+
"@typescript-eslint/eslint-plugin": "^8.34.1",
132+
"@typescript-eslint/parser": "^8.34.1",
133+
"@vitejs/plugin-react": "^4.5.2",
134134
"eslint": "^8.57.1",
135-
"eslint-config-next": "^15.3.2",
135+
"eslint-config-next": "^15.3.3",
136136
"eslint-config-prettier": "^10.1.5",
137-
"jest": "^29.7.0",
137+
"jest": "^30.0.0",
138138
"jsdom": "^26.1.0",
139-
"knip": "^5.57.0",
139+
"knip": "^5.61.1",
140140
"prettier": "^3.5.3",
141-
"prettier-plugin-tailwindcss": "^0.6.11",
142-
"prisma": "^6.8.2",
143-
"sass": "^1.89.0",
144-
"tailwindcss": "4.1.7",
141+
"prettier-plugin-tailwindcss": "^0.6.12",
142+
"prisma": "^6.10.0",
143+
"sass": "^1.89.2",
144+
"tailwindcss": "4.1.10",
145145
"tailwindcss-animate": "^1.0.7",
146146
"typescript": "5.8.3",
147147
"vite-tsconfig-paths": "^5.1.4",
148-
"vitest": "^3.1.4"
148+
"vitest": "^3.2.4"
149149
}
150150
}

0 commit comments

Comments
 (0)