Skip to content

Commit 0a7ea2d

Browse files
committed
upgrade to react 19 and next 15
1 parent 5af9b91 commit 0a7ea2d

File tree

6 files changed

+977
-707
lines changed

6 files changed

+977
-707
lines changed

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
# Picture-Solver
22

3-
This is a next.js app that uses image recognition to parse and detect a Sudoku from a picture. Additionally it allows the user to step through the sudoku step by step to get additional hints of which number could have been found next.
4-
3+
This is a next.js app that uses image recognition to parse and detect a Sudoku from a picture. Additionally it allows
4+
the user to step through the sudoku step by step to get additional hints of which number could have been found next.
55

66
## Image recognition
77

8-
THe image recognition is done by using openCV for processing and trying to find a grid in a picture that resembles a Sudoku. Afterwards the sudoku is transposed and cut into 81 parts that are sent through the MNIST model for recognicing handwritten integers. All of this is purely done in the browser by using tensorflow JS and an openCV WebAssembly port.
8+
THe image recognition is done by using openCV for processing and trying to find a grid in a picture that resembles a
9+
Sudoku. Afterwards the sudoku is transposed and cut into 81 parts that are sent through the MNIST model for recognising
10+
handwritten integers.
911

12+
All of this is purely done in the browser by using tensorflow JS and an openCV WebAssembly port.
1013

1114
## Sudoku Solving
1215

13-
Currently the solving capabilities are quite limited and only work for "simple" cases. This could be improved in the future.
16+
Currently, the solving capabilities are quite limited and only work for "simple" cases. This could be improved in the
17+
future.
1418

1519
![Sudoku Solver](image.png)

next-env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
/// <reference types="next/image-types/global" />
33

44
// NOTE: This file should not be edited
5-
// see https://nextjs.org/docs/basic-features/typescript for more information.
5+
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.

next.config.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
module.exports = {
2-
webpack: (config) => {
3-
config.resolve.fallback = { fs: false };
4-
5-
return config;
6-
},
7-
};
2+
webpack: (config) => {
3+
config.resolve.fallback = { fs: false };
4+
return config;
5+
},
6+
};

package.json

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,28 @@
33
"version": "0.1.0",
44
"private": true,
55
"dependencies": {
6-
"@tensorflow/tfjs": "^4.17.0",
7-
"lucide-react": "^0.364.0",
8-
"next": "^14.1.4",
9-
"react": "^18.2.0",
10-
"react-dom": "^18.2.0"
6+
"@tensorflow/tfjs": "^4.22.0",
7+
"lucide-react": "^0.468.0",
8+
"next": "^15.0.4",
9+
"react": "^19.0.0",
10+
"react-dom": "^19.0.0"
1111
},
1212
"devDependencies": {
13-
"@types/node": "^20.12.4",
14-
"@types/react": "^18.0.24",
15-
"@types/react-dom": "^18.0.8",
16-
"autoprefixer": "^10.4.13",
17-
"eslint": "8.57.0",
18-
"eslint-config-next": "14.1.4",
13+
"@types/node": "^22.10.1",
14+
"@types/react": "^19.0.1",
15+
"@types/react-dom": "^19.0.1",
16+
"autoprefixer": "^10.4.20",
17+
"eslint": "9.16.0",
18+
"eslint-config-next": "15.0.4",
1919
"eslint-config-prettier": "^9.1.0",
20-
"eslint-plugin-prettier": "^5.1.3",
21-
"eslint-plugin-unused-imports": "^3.1.0",
20+
"eslint-plugin-prettier": "^5.2.1",
21+
"eslint-plugin-unused-imports": "^4.1.4",
2222
"mirada": "^0.0.15",
23-
"postcss": "^8.4.18",
24-
"prettier": "^3",
25-
"prettier-plugin-tailwindcss": "^0.5.13",
26-
"tailwindcss": "^3.2.1",
27-
"typescript": "^5.4.4"
23+
"postcss": "^8.4.49",
24+
"prettier": "^3.4.2",
25+
"prettier-plugin-tailwindcss": "^0.6.9",
26+
"tailwindcss": "^3.4.16",
27+
"typescript": "^5.7.2"
2828
},
2929
"scripts": {
3030
"dev": "next dev",

src/lib/hooks/useOnClickOutside.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React, { useEffect } from "react";
22
import assertIsNode from "../utils/nodeAssert";
33

44
function useOnClickOutside(
5-
ref: React.RefObject<HTMLDivElement>,
5+
ref: React.RefObject<HTMLDivElement | null>,
66
callback: () => any,
77
) {
88
useEffect(() => {

0 commit comments

Comments
 (0)