@timekeeper-countdown/react 0.2.0 → 0.3.1
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.
- package/README.md +4 -7
- package/package.json +9 -4
package/README.md
CHANGED
|
@@ -100,6 +100,7 @@ interface UseCountdownResult {
|
|
|
100
100
|
```
|
|
101
101
|
|
|
102
102
|
- All control methods mirror the engine and return `false` for invalid transitions.
|
|
103
|
+
- `setSeconds(value)` and `reset(value)` validate their argument and **throw** on an invalid value (negative, non-integer, `NaN`, or `Infinity`), matching the engine.
|
|
103
104
|
- `snapshot` is stable per render; derive memoised values with `useMemo` if needed.
|
|
104
105
|
- `totalSeconds`, `parts`, `isRunning`, and `isCompleted` are re-exposed for convenience.
|
|
105
106
|
|
|
@@ -195,7 +196,7 @@ The core package ships several helpers under `@timekeeper-countdown/core/testing
|
|
|
195
196
|
- `assertRemainingSeconds(snapshot, expected, tolerance?, message?)` — throws if remaining seconds differ beyond tolerance.
|
|
196
197
|
- `TimerState` — re-exported for convenience (`IDLE`, `RUNNING`, `PAUSED`, `STOPPED`).
|
|
197
198
|
|
|
198
|
-
See the [core README](https://github.com/eagle-head/timekeeper-countdown/tree/main/packages/core#testing-utilities) or [API Reference](https://eagle-head.github.io/timekeeper-countdown
|
|
199
|
+
See the [core README](https://github.com/eagle-head/timekeeper-countdown/tree/main/packages/core#testing-utilities) or [API Reference](https://eagle-head.github.io/timekeeper-countdown/api-reference) for full signatures and examples.
|
|
199
200
|
|
|
200
201
|
---
|
|
201
202
|
|
|
@@ -236,13 +237,9 @@ function MultiStageTimer() {
|
|
|
236
237
|
|
|
237
238
|
## Contributing
|
|
238
239
|
|
|
239
|
-
|
|
240
|
+
We welcome contributions! Please read our [Contributing Guide](https://github.com/eagle-head/timekeeper-countdown/blob/main/CONTRIBUTING.md) to get started.
|
|
240
241
|
|
|
241
|
-
|
|
242
|
-
npm run lint --workspaces
|
|
243
|
-
npm run test --workspaces
|
|
244
|
-
npm run typecheck --workspaces
|
|
245
|
-
```
|
|
242
|
+
By participating in this project, you agree to abide by our [Code of Conduct](https://github.com/eagle-head/timekeeper-countdown/blob/main/CODE_OF_CONDUCT.md).
|
|
246
243
|
|
|
247
244
|
---
|
|
248
245
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@timekeeper-countdown/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "React adapter for the Timekeeper Countdown engine",
|
|
5
5
|
"author": "Eduardo Kohn",
|
|
6
6
|
"license": "MIT",
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
"test": "vitest run",
|
|
34
34
|
"test:ui": "vitest --ui",
|
|
35
35
|
"test:coverage": "vitest run --coverage",
|
|
36
|
+
"test:mutation": "stryker run",
|
|
36
37
|
"typecheck": "tsc --noEmit",
|
|
37
38
|
"lint": "eslint .",
|
|
38
39
|
"lint:fix": "eslint . --fix",
|
|
@@ -44,11 +45,12 @@
|
|
|
44
45
|
"react": ">=17.0.0"
|
|
45
46
|
},
|
|
46
47
|
"dependencies": {
|
|
47
|
-
"@timekeeper-countdown/core": "^0.
|
|
48
|
+
"@timekeeper-countdown/core": "^0.3.1"
|
|
48
49
|
},
|
|
49
50
|
"devDependencies": {
|
|
50
|
-
"@testing-library/
|
|
51
|
-
"@testing-library/
|
|
51
|
+
"@testing-library/dom": "^10.4.1",
|
|
52
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
53
|
+
"@testing-library/react": "^16.3.2",
|
|
52
54
|
"@types/react": "^18.2.55",
|
|
53
55
|
"@types/react-dom": "^18.2.19",
|
|
54
56
|
"react": "^18.3.1",
|
|
@@ -62,6 +64,9 @@
|
|
|
62
64
|
"typescript"
|
|
63
65
|
],
|
|
64
66
|
"sideEffects": false,
|
|
67
|
+
"engines": {
|
|
68
|
+
"node": ">=18"
|
|
69
|
+
},
|
|
65
70
|
"publishConfig": {
|
|
66
71
|
"registry": "https://registry.npmjs.org",
|
|
67
72
|
"access": "public"
|