Skip to content

Commit

Permalink
feat: update to turnstile-types v1.2.3 (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
ghostdevv authored Oct 26, 2024
1 parent 6a8c986 commit ece3aa9
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,21 @@ The only required prop is the `siteKey` which you can get from [adding a site he

## Props

| Prop | Type | Description | Required |
| ------------------- | --------------------------------------------- | ---------------------------------------------------------------------------------------------- | -------- |
| `siteKey` | `string` | sitekey for your website ||
| `theme` | `'light' \| 'dark' \| 'auto'` | colour theme of the widget (defaults to `auto`) | |
| `size` | `'normal' \| 'flexible' \| 'compact'` | size of the widget (defaults to `normal`) | |
| `action` | `string` | A string that can be used to differentiate widgets, returned on validation | |
| `cData` | `string` | A string that can attach customer data to a challange, returned on validation | |
| `tabIndex` | `number` | Used for accessibility (defaults to `0`) | |
| `responseField` | `boolean` | if true the response token will be a property on the form data (default `true`) | |
| `responseFieldName` | `string` | the `name` of the input which will appear on the form data (default `cf-turnstile-response`) | |
| `retry` | `'auto' \| 'never'` | should the widget automatically retry to obtain a token if it did not succeed (default `auto`) | |
| `retryInterval` | `number` | if `retry` is true, this controls the time between attempts in milliseconds (default `8000`) | |
| `language` | `SupportedLanguage \| 'auto'` | the language turnstile should use (default `auto`) | |
| `execution` | `'render' \| 'execute'` | controls when to obtain the token of the widget (default `render`) | |
| `appearance` | `'always' \| 'execute' \| 'interaction-only'` | controls when the widget is visible. (default `always`) | |
| Prop | Type | Description | Required |
| ------------------- | ---------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -------- |
| `siteKey` | `string` | sitekey for your website ||
| `theme` | `'light' \| 'dark' \| 'auto'` | colour theme of the widget (defaults to `auto`) | |
| `size` | `'normal' \| 'flexible' \| 'invisible' \| 'compact'` | size of the widget (defaults to `normal`) | |
| `action` | `string` | A string that can be used to differentiate widgets, returned on validation | |
| `cData` | `string` | A string that can attach customer data to a challange, returned on validation | |
| `tabIndex` | `number` | Used for accessibility (defaults to `0`) | |
| `responseField` | `boolean` | if true the response token will be a property on the form data (default `true`) | |
| `responseFieldName` | `string` | the `name` of the input which will appear on the form data (default `cf-turnstile-response`) | |
| `retry` | `'auto' \| 'never'` | should the widget automatically retry to obtain a token if it did not succeed (default `auto`) | |
| `retryInterval` | `number` | if `retry` is true, this controls the time between attempts in milliseconds (default `8000`) | |
| `language` | `SupportedLanguage \| 'auto'` | the language turnstile should use (default `auto`) | |
| `execution` | `'render' \| 'execute'` | controls when to obtain the token of the widget (default `render`) | |
| `appearance` | `'always' \| 'execute' \| 'interaction-only'` | controls when the widget is visible. (default `always`) | |

For more information about some of the props and a list of `SupportedLanguage`'s [checkout the Cloudflare Documentation](https://developers.cloudflare.com/turnstile/get-started/client-side-rendering/#configurations).

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"svelte": "^3.58.0 || ^4.0.0 || ^5.0.0"
},
"dependencies": {
"turnstile-types": "^1.2.2"
"turnstile-types": "^1.2.3"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/lib/Turnstile.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
export let theme: RenderParameters['theme'] = 'auto';
/**
* The widget size. Can be 'normal', 'flexible', or 'compact'.
* The widget size. Can be 'normal', 'flexible', 'invisible', or 'compact'.
* @default "normal"
*/
export let size: RenderParameters['size'] = 'normal';
Expand Down

0 comments on commit ece3aa9

Please sign in to comment.