@sudobility/sudojo_lib 0.0.101 → 0.0.102

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +55 -0
  2. package/package.json +9 -9
package/README.md ADDED
@@ -0,0 +1,55 @@
1
+ # @sudobility/sudojo_lib
2
+
3
+ Business logic library for Sudojo with React hooks for game state, hints, and Sudoku operations.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ bun add @sudobility/sudojo_lib
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```typescript
14
+ import { useBoard, useHint, useGameSession } from '@sudobility/sudojo_lib';
15
+
16
+ function GameComponent() {
17
+ const { board, setCell, clearCell } = useBoard(initialPuzzle);
18
+ const { getHint, isLoading } = useHint();
19
+ const { startGame, endGame, timer } = useGameSession();
20
+ }
21
+ ```
22
+
23
+ ```typescript
24
+ import { validateBoard, isBoardComplete, getCandidates } from '@sudobility/sudojo_lib';
25
+
26
+ const isValid = validateBoard(board);
27
+ const candidates = getCandidates(board, row, col);
28
+ ```
29
+
30
+ ## API
31
+
32
+ - **Hooks**: `useBoard`, `useHint`, `useGameSession`, `useSudoku` (replaces deprecated `useGame`)
33
+ - **Utilities**: `validateBoard`, `isBoardComplete`, `getCandidates`, and more
34
+ - Shared between web (`sudojo_app`) and mobile (`sudojo_app_rn`) apps
35
+
36
+ ## Development
37
+
38
+ ```bash
39
+ bun run build # Build to dist/
40
+ bun run test # Run Vitest
41
+ bun run test:run # Run tests once
42
+ bun run typecheck # TypeScript check
43
+ bun run lint # ESLint
44
+ bun run check-all # Lint + typecheck + tests
45
+ ```
46
+
47
+ ## Related Packages
48
+
49
+ - `@sudobility/sudojo_client` -- API client hooks (peer dependency)
50
+ - `@sudobility/sudojo_types` -- Type definitions
51
+ - `sudojo_app` / `sudojo_app_rn` -- Consumer apps
52
+
53
+ ## License
54
+
55
+ BUSL-1.1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sudobility/sudojo_lib",
3
- "version": "0.0.101",
3
+ "version": "0.0.102",
4
4
  "description": "Business logic library for Sudojo app",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -46,10 +46,10 @@
46
46
  "author": "Sudobility team",
47
47
  "license": "BUSL-1.1",
48
48
  "devDependencies": {
49
- "@sudobility/di": "^1.5.43",
50
- "@sudobility/sudojo_client": "^0.0.85",
51
- "@sudobility/sudojo_types": "^1.2.36",
52
- "@sudobility/types": "^1.9.55",
49
+ "@sudobility/di": "^1.5.45",
50
+ "@sudobility/sudojo_client": "^0.0.86",
51
+ "@sudobility/sudojo_types": "^1.2.37",
52
+ "@sudobility/types": "^1.9.57",
53
53
  "@tanstack/react-query": "^5.90.11",
54
54
  "@testing-library/dom": "^10.4.1",
55
55
  "@testing-library/react": "^16.3.0",
@@ -72,10 +72,10 @@
72
72
  "zustand": "^5.0.9"
73
73
  },
74
74
  "peerDependencies": {
75
- "@sudobility/di": "^1.5.43",
76
- "@sudobility/sudojo_client": "^0.0.85",
77
- "@sudobility/sudojo_types": "^1.2.36",
78
- "@sudobility/types": "^1.9.55",
75
+ "@sudobility/di": "^1.5.45",
76
+ "@sudobility/sudojo_client": "^0.0.86",
77
+ "@sudobility/sudojo_types": "^1.2.37",
78
+ "@sudobility/types": "^1.9.57",
79
79
  "@tanstack/react-query": ">=5.0.0",
80
80
  "react": ">=18.0.0",
81
81
  "zustand": ">=5.0.0"