@rific/timer 0.2.2 → 0.3.0

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/dist/index.d.mts CHANGED
@@ -1,4 +1,5 @@
1
- import React, { ReactNode } from 'react';
1
+ import * as react from 'react';
2
+ import { ReactNode } from 'react';
2
3
  import { ViewStyle } from 'react-native';
3
4
 
4
5
  type TimerProps = {
@@ -13,6 +14,6 @@ type TimerProps = {
13
14
  style?: ViewStyle;
14
15
  width?: number;
15
16
  };
16
- declare const Timer: ({ children, color, duration, onStart, onStop, radius, startProgress, started, style, width }: TimerProps) => React.JSX.Element;
17
+ declare const Timer: ({ children, color, duration, onStart, onStop, radius, startProgress, started, style, width }: TimerProps) => react.JSX.Element;
17
18
 
18
19
  export { Timer, type TimerProps };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- import React, { ReactNode } from 'react';
1
+ import * as react from 'react';
2
+ import { ReactNode } from 'react';
2
3
  import { ViewStyle } from 'react-native';
3
4
 
4
5
  type TimerProps = {
@@ -13,6 +14,6 @@ type TimerProps = {
13
14
  style?: ViewStyle;
14
15
  width?: number;
15
16
  };
16
- declare const Timer: ({ children, color, duration, onStart, onStop, radius, startProgress, started, style, width }: TimerProps) => React.JSX.Element;
17
+ declare const Timer: ({ children, color, duration, onStart, onStop, radius, startProgress, started, style, width }: TimerProps) => react.JSX.Element;
17
18
 
18
19
  export { Timer, type TimerProps };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rific/timer",
3
- "version": "0.2.2",
3
+ "version": "0.3.0",
4
4
  "description": "Animated SVG progress ring timer for React Native",
5
5
  "keywords": [
6
6
  "react-native",
@@ -34,6 +34,7 @@
34
34
  },
35
35
  "main": "dist/index.js",
36
36
  "module": "dist/index.mjs",
37
+ "react-native": "src/index.ts",
37
38
  "types": "dist/index.d.ts",
38
39
  "files": [
39
40
  "dist",
@@ -43,6 +44,7 @@
43
44
  ],
44
45
  "scripts": {
45
46
  "build": "tsup src/index.ts --format cjs,esm --dts --clean",
47
+ "build:watch": "tsup src/index.ts --format cjs,esm --dts --watch",
46
48
  "fix": "eslint --fix",
47
49
  "lint": "eslint",
48
50
  "prepublishOnly": "npm run build",
@@ -77,13 +79,13 @@
77
79
  "ts-jest": "^29.4.9",
78
80
  "ts-node": "^10.9.2",
79
81
  "tsup": "^8.0.0",
80
- "typescript": "^5.9.3",
82
+ "typescript": "^6.0.3",
81
83
  "typescript-eslint": "^8.59.3"
82
84
  },
83
85
  "peerDependencies": {
84
- "react": ">=18.0.0",
86
+ "react": ">=19.0.0",
85
87
  "react-native": ">=0.76.0",
86
- "react-native-svg": ">=13.0.0"
88
+ "react-native-svg": ">=15.0.0"
87
89
  },
88
90
  "publishConfig": {
89
91
  "access": "public"
package/src/Timer.tsx CHANGED
@@ -1,4 +1,4 @@
1
- import React, { type ReactNode, useCallback, useEffect, useRef } from 'react'
1
+ import { type ReactNode, useCallback, useEffect, useRef } from 'react'
2
2
  import { Animated, Easing, StyleSheet, View, ViewStyle } from 'react-native'
3
3
  import Svg, { Circle, G } from 'react-native-svg'
4
4