react-turnstile

Cloudflare Turnstile integration for React.

MIT License

Downloads
349.4K
Stars
381
Committers
11

Bot releases are visible (Hide)

react-turnstile - v1.0.2 Latest Release

Published by github-actions[bot] about 2 months ago

   🐞 Bug Fixes

  • Add default exports  -  by @marsidev (2271b)
    View changes on GitHub
react-turnstile - v1.0.1

Published by github-actions[bot] about 2 months ago

   🐞 Bug Fixes

  • 'use client'; banner that was no longer being output  -  by @faiare (54f90)
    View changes on GitHub
react-turnstile - v1.0.0

Published by github-actions[bot] 2 months ago

🚨 Breaking Changes

  • Now we ship ESM-only code, this will decrease the bundle size significantly.
    If you are a CommonJS user, I suggest you to keep using the version 0.7.2 or upgrade your project to ESM.

  • Removed "auto" widget size due to is not even a valid size for Cloudflare Turnstile.
    We have been sending undefined when the size was "auto", so if you were using this size, then you can simply remove it.

  • Peer dependencies for react and react-dom have been updated to 17.x and above.

🚀 Features

  • Added callback onTimeout
  • Added render options refreshTimeout and feedbackEnabled (Closes #82)
  • Added new "flexible" widget size (Closes #82)

🐛 Fixes

  • Updated "compact" widget size to 150x140 (Closes #85)

🛠 Misc

Build

  • We migrated from unbuild to tsup
  • The generated build is now minified, this will decrease the bundle size significantly.

TypeScript

  • Improved type definitions. Now we expose these types: AppearanceMode, ExecutionMode, FailureRetryMode, RefreshExpiredMode, RefreshTimeoutMode, WidgetSize. Inspired by @types/cloudflare-turnstile

Other

  • Updated dependencies
  • Updated docs
  • Added issue templates and policies
    View changes on GitHub
react-turnstile - v0.7.2

Published by github-actions[bot] 4 months ago

   🐞 Bug Fixes

  • Resetting widgets solved ref back to false on widget unmount  -  by @kkatsi (77f36)
    View changes on GitHub
react-turnstile - v0.7.1

Published by github-actions[bot] 5 months ago

   🐞 Bug Fixes

  • Set proper error code type  -  by @marsidev (3f7f9)
    View changes on GitHub
react-turnstile - v0.7.0

Published by github-actions[bot] 5 months ago

   🐞 Bug Fixes

  • Change script injection method to prevent multiple scripts console warning  -  by @marsidev (66f85)
    • Now we always use a single Turnstile script
    • Now is not mandatory to set unique IDs when using multiple widgets, but it's still suggested for semantic reasons
    • The new logic for the script injection was inspired by this other library: Le0Developer/react-turnstile 🙌

   🚀 Features

  • Add "auto" size option  -  by @harrygr (8a8a7)
    View changes on GitHub
react-turnstile - v0.6.1

Published by github-actions[bot] 6 months ago

   🐞 Bug Fixes

  • Fix type definition for onError callback  -  by @marsidev (3b140)
    View changes on GitHub
react-turnstile - v0.6.0

Published by marsidev 6 months ago

What's Changed

Bug Fixes

Minor changes

Full Changelog: https://github.com/marsidev/react-turnstile/compare/v0.5.4...v0.6.0

react-turnstile - v0.5.4

Published by github-actions[bot] 7 months ago

   🐞 Bug Fixes

  • Fix useImperativeHandle not grabbing window.turnstile  -  by @Cretezy (d9da706)
    View changes on GitHub
react-turnstile - v0.5.3

Published by github-actions[bot] 8 months ago

   🐞 Bug Fixes

  • Update server validation response types  -  by @jinsley8 (d26b7)
    View changes on GitHub
react-turnstile - v0.5.2

Published by github-actions[bot] 8 months ago

   🐞 Bug Fixes

  • Collapse container height when appearance set to interaction-only  -  by @jinsley8 (c2cf5)
    View changes on GitHub
react-turnstile - v0.5.1

Published by github-actions[bot] 9 months ago

   🐞 Bug Fixes

  • Remove nullish coalescing operator (??) to improve compatibility with old browsers  -  by @marsidev (80f61)
    View changes on GitHub
react-turnstile - v0.5.0

Published by github-actions[bot] 9 months ago

   🚀 Features

  • Add getResponsePromise  -  by @marsidev (61308)
    View changes on GitHub
react-turnstile - v0.4.1

Published by github-actions[bot] 10 months ago

   🚀 Features

  • Add onWidgetLoad callback  -  by @marsidev (6811b)
    View changes on GitHub
react-turnstile - v0.4.0

Published by github-actions[bot] 11 months ago

   🚀 Features

  • Add crossOrigin to scriptOptions  -  by @kaichii (a588b)
  • Add onLoadScript callback  -  by @marsidev (4e5bc)
  • Add support for isExpired() method  -  by @marsidev (7daca)
    View changes on GitHub
react-turnstile - v0.3.2

Published by github-actions[bot] 12 months ago

🚀 Features

  • Add onError to scriptOptions - by @IanVS (0d38987)
    View changes on GitHub
react-turnstile - v0.3.1

Published by github-actions[bot] about 1 year ago

   🚀 Features

  • Expose TurnstileTheme and TurnstileLangCode types  -  by @marsidev (1ddb8) - Thanks @Zerebokep for the suggestion!
    View changes on GitHub
react-turnstile - v0.3.0

Published by github-actions[bot] about 1 year ago

   🐞 Bug Fixes

  • Fix script injection issues  -  by @marsidev (56fe7)
  • Minimize cloudflare warnings  -  by @marsidev (abc4b)

Soft Change

  • The scriptId and onLoadCallbackName now includes the containerId (e.g. cf-turnstile-script__cf-turnstile -> {SCRIPT_ID_PREFIX}__{CONTAINER_ID})
    View changes on GitHub
react-turnstile - v0.2.4

Published by github-actions[bot] about 1 year ago

   🐞 Bug Fixes

  • 🐛 clean up  -  by @futantan (a6699)
    View changes on GitHub
react-turnstile - v0.2.3

Published by github-actions[bot] about 1 year ago

   🐞 Bug Fixes

  • Set automatic height on interaction-only widgets  -  by @marsidev (673db)
    View changes on GitHub