Skip to content

Commit 348ad9d

Browse files
committed
fix: rename package name
1 parent d6ebc80 commit 348ad9d

File tree

7 files changed

+32
-32
lines changed

7 files changed

+32
-32
lines changed

README.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,23 @@ https://react-turnstile.vercel.app/
2020

2121
## Install
2222
1. First, [follow these steps](https://developers.cloudflare.com/turnstile/get-started/) to obtain a free site key and secret key from Cloudflare.
23-
2. Install `react.turnstile` into your React application.
23+
2. Install `@marsidev/react-turnstile` into your React application.
2424

2525
```bash
2626
# Whichever matches your package manager
27-
pnpm add react.turnstile
28-
npm install react.turnstile
29-
yarn add react.turnstile
27+
pnpm add @marsidev/react-turnstile
28+
npm install @marsidev/react-turnstile
29+
yarn add @marsidev/react-turnstile
3030
```
3131

3232
## Usage
3333

3434
The only required prop is the `siteKey`.
3535

3636
```jsx
37-
import { Turnstile } from 'react.turnstile'
37+
import { Turnstile } from '@marsidev/react-turnstile'
3838

39-
function TurnstileWidget() {
39+
function Widget() {
4040
return <Turnstile siteKey='1x00000000000000000000AA' />
4141
}
4242
```
@@ -81,18 +81,18 @@ function TurnstileWidget() {
8181

8282
### Rendering the widget:
8383
```jsx
84-
import { Turnstile } from 'react.turnstile'
84+
import { Turnstile } from '@marsidev/react-turnstile'
8585

86-
function TurnstileWidget() {
86+
function Widget() {
8787
return <Turnstile siteKey='1x00000000000000000000AA' />
8888
}
8989
```
9090

9191
### Rendering the widget with custom props:
9292
```jsx
93-
import { Turnstile } from 'react.turnstile'
93+
import { Turnstile } from '@marsidev/react-turnstile'
9494

95-
function TurnstileWidget() {
95+
function Widget() {
9696
return (
9797
<Turnstile
9898
siteKey='1x00000000000000000000AA'
@@ -112,9 +112,9 @@ function TurnstileWidget() {
112112
### Managing widget rendering status:
113113
```jsx
114114
import { useState } from 'react'
115-
import { Turnstile } from 'react.turnstile'
115+
import { Turnstile } from '@marsidev/react-turnstile'
116116

117-
function TurnstileWidget() {
117+
function Widget() {
118118
const [status, setStatus] = useState()
119119

120120
return (
@@ -131,9 +131,9 @@ function TurnstileWidget() {
131131
### Getting the token after solving the challenge:
132132
```jsx
133133
import { useState } from 'react'
134-
import { Turnstile } from 'react.turnstile'
134+
import { Turnstile } from '@marsidev/react-turnstile'
135135

136-
function TurnstileWidget() {
136+
function Widget() {
137137
const [token, setToken] = useState()
138138

139139
return (
@@ -148,9 +148,9 @@ function TurnstileWidget() {
148148
### Interacting with the widget:
149149
```jsx
150150
import { useRef } from 'react'
151-
import { Turnstile } from 'react.turnstile'
151+
import { Turnstile } from '@marsidev/react-turnstile'
152152

153-
function TurnstileWidget() {
153+
function Widget() {
154154
const ref = useRef(null)
155155

156156
return (
@@ -180,9 +180,9 @@ function TurnstileWidget() {
180180
### Interacting with the widget (using TypeScript):
181181
```jsx
182182
import { useRef } from 'react'
183-
import { Turnstile, type TurnstileInstance } from 'react.turnstile'
183+
import { Turnstile, type TurnstileInstance } from '@marsidev/react-turnstile'
184184

185-
function TurnstileWidget() {
185+
function Widget() {
186186
const ref = useRef<TurnstileInstance>(null)
187187

188188
return (
@@ -201,7 +201,7 @@ function TurnstileWidget() {
201201
```jsx
202202
// LoginForm.jsx
203203
import { useRef, useState } from 'react'
204-
import { Turnstile } from 'react.turnstile'
204+
import { Turnstile } from '@marsidev/react-turnstile'
205205

206206
export default function LoginForm() {
207207
const formRef = useRef(null)
@@ -295,15 +295,15 @@ Published under the [MIT License](./LICENCE).
295295
296296
<!-- Badges -->
297297
298-
[npm-version-src]: https://badgen.net/npm/v/react.turnstile?style=flat-square
299-
[npm-version-href]: https://npm.im/react.turnstile
300-
[npm-downloads-src]: https://badgen.net/npm/dm/react.turnstile?style=flat-square
301-
[npm-downloads-href]: https://npm.im/react.turnstile
298+
[npm-version-src]: https://badgen.net/npm/v/@marsidev/react-turnstile?style=flat-square
299+
[npm-version-href]: https://npm.im/@marsidev/react-turnstile
300+
[npm-downloads-src]: https://badgen.net/npm/dm/@marsidev/react-turnstile?style=flat-square
301+
[npm-downloads-href]: https://npm.im/@marsidev/react-turnstile
302302
<!-- [github-actions-src]: https://img.shields.io/github/workflow/status/danielroe/nuxt-turnstile/ci/main?style=flat-square -->
303303
<!-- [github-actions-href]: https://github.com/danielroe/nuxt-turnstile/actions?query=workflow%3Aci -->
304304
<!-- [codecov-src]: https://img.shields.io/codecov/c/gh/danielroe/nuxt-turnstile/main?style=flat-square -->
305305
<!-- [codecov-href]: https://codecov.io/gh/danielroe/nuxt-turnstile -->
306-
[packagephobia-src]: https://packagephobia.com/badge?p=react.turnstile
307-
[packagephobia-href]: https://packagephobia.com/result?p=react.turnstile
306+
[packagephobia-src]: https://packagephobia.com/badge?p=@marsidev/react-turnstile
307+
[packagephobia-href]: https://packagephobia.com/result?p=@marsidev/react-turnstile
308308
[prs-src]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square
309309
[tests-src]: https://img.shields.io/badge/Tests-missing-red.svg?style=flat-square

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "react.turnstile",
2+
"name": "@marsidev/react-turnstile",
33
"version": "0.0.1",
44
"packageManager": "[email protected]",
55
"description": "Cloudflare Turnstile integration for React.",

packages/example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"next": "12.3.1",
1616
"react": "18.2.0",
1717
"react-dom": "18.2.0",
18-
"react.turnstile": "workspace:*"
18+
"@marsidev/react-turnstile": "workspace:*"
1919
},
2020
"devDependencies": {
2121
"@types/node": "18.11.0",

packages/example/src/components/Demo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { useEffect, useRef, useState } from 'react'
2-
import { Turnstile, type TurnstileInstance } from 'react.turnstile'
2+
import { Turnstile, type TurnstileInstance } from '@marsidev/react-turnstile'
33
import ConfigForm from './ConfigForm'
44
import StateLabels from './StateLabels'
55
import WidgetMethods from './WidgetMethods'

packages/example/src/components/Footer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const Footer = () => {
44
return (
55
<footer className='text-white flex items-center flex-col'>
66
<div>
7-
<code>react.turnstile</code> source code{' '}
7+
<code>react-turnstile</code> source code{' '}
88
<Link href='https://github.com/marsidev/react.turnstile' label='here' />
99
</div>
1010

packages/example/src/components/WidgetMethods.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { TurnstileInstance } from 'react.turnstile'
1+
import type { TurnstileInstance } from '@marsidev/react-turnstile'
22

33
interface StateLabelsProps {
44
turnstile: React.MutableRefObject<TurnstileInstance | null>

pnpm-lock.yaml

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)