Releases: vydimitrov/react-countdown-circle-timer
Releases · vydimitrov/react-countdown-circle-timer
v3.2.1
v3.2.0
v3.1.0
Features:
- Add viewBox prop to the svg element for the wen and mobile packages. The viewBox prop will make the countdown timer responsive and it will adjust its size according to the element outside.
v3.0.9
Fix
- Fix for #193. This is fix for the issue where types for the hook are referenced by the shared package, which is not exported. To solve the problem now we copy the types from the shared package and add them to each package when bundling the code. This is not the best solution but it is the simplest. Once we have a good way to bundle types from monorepo this can be changed.
v3.0.8
Fix
Draft a new release since the previous one did not include the type fix
v3.0.7
Fix
Extend strokeLinecap to support "butt" option
v3.0.6
This release includes fixes for issues that were found after the v3 release:
Fixes
- Fix README on both packages and sync up versions
- The animating path is visible when the animation is over on Android. To fix it we check if the elapsed time is equal the duration
- Upgrade use-elapsed-time to fix an issue where the newStartAt was not respected
- Accept a new argument from onComplete that can control the initialRemainingTime
- Move types close to the web and mobile packages since TypeScript can not reexport submodules. Issue microsoft/TypeScript#8305
- Add README to mobile package
- Add README for web package so it shows in NPM
v3.0.0
In v3 both packages - web and mobile are rewritten in TypeScript and bunch of improvements are added:
Improvements
- The Web and Mobile packages are now written in TypeScript
- PNPM is now used as package manager as well as to handle the monorepo
- Webpack is replaced by Esbuild to bundle the code and run dev server
- PropTypes are no longer required as peerDependencies. The component relays on the TypeScript types
- New prop
updateInterval
is added to control how often the timer should be updated - New prop
colorsTime
is added to handle the times when a color should switch to the next color. This was part of thecolors
prop before - New prop
isSmoothColorTransition
indicates if the colors should smoothly transition to the next color or just change the color when the time comes - New event handler
onUpdate
will fire every time the time changes - Reduce overall bundle size and provide ES module export for the Web package
Breaking changes
- IE is no longer supported
colors
prop now is either: Single color in any valid color format or URL to a gradient; Array of colors in HEX format. At least 2 colors should be provided.- Gradient is no longer supported out of the box and
isLinearGradient
andgradientUniqueKey
are now deprecated. The gradient can be set from outside of the component. Please refer to the recipes section. ariaLabel
andrenderAriaTime
are also deprecated. Refer to the recipes section to check how this can be implemented.children
prop now accepts only a render function and it does not take a React component as a children
React Native (mobile) changes
- The Mobile package does not rely on
AnimatedPath
to animate the SVG path but instead it uses the animation event loop fromuse-elapsed-time
. Thus now both packages - web and mobile share the same core logic to animate the path. Performance comparison shows that the later approach is much more performant.