Skip to content

Commit

Permalink
chore: use CF Turnstile flexible sizing for the widget
Browse files Browse the repository at this point in the history
bump deps to the latest version and patch `@marsidev/react-turnstile`
(using `bun patch`) to mark 'flexible' as a valid size for the widget

Signed-off-by: SoulHarsh007 <[email protected]>
  • Loading branch information
SoulHarsh007 committed Aug 15, 2024
1 parent 875a115 commit 938dabf
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 7 deletions.
Binary file modified bun.lockb
Binary file not shown.
3 changes: 2 additions & 1 deletion components/LoginForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,10 @@ export default function LoginForm({loggedIn}: Readonly<{loggedIn?: boolean}>) {
</SelectItem>
))}
</Select>
<p>Beep boop, boop beep?</p>
<Turnstile
className="mt-2 outline-none ring-0"
options={{appearance: 'always', theme: 'auto'}}
options={{appearance: 'always', theme: 'auto', size: 'flexible'}}
siteKey={process.env.NEXT_PUBLIC_TURNSTILE_SITE_KEY!}
/>
{redirectTo ? (
Expand Down
5 changes: 5 additions & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ const nextConfig = {
},
];
},
experimental: {
turbo: {
useSwcCss: true,
},
},
};

export default nextConfig;
15 changes: 9 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,27 @@
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-toastify": "10.0.5",
"rxdb": "15.30.2",
"rxdb": "15.31.0",
"rxdb-hooks": "5.0.2",
"sharp": "0.33.4",
"strip-ansi": "7.1.0"
},
"devDependencies": {
"@tailwindcss/forms": "0.5.7",
"@types/node": "^22.2.0",
"@types/node": "^22.3.0",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/validator": "13.12.0",
"autoprefixer": "10.4.20",
"eslint": "^9.9.0",
"eslint-config-next": "^14.2.5",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-perfectionist": "^3.1.3",
"eslint-plugin-perfectionist": "^3.2.0",
"eslint-plugin-prettier": "^5.2.1",
"postcss": "8.4.41",
"tailwindcss": "3.4.9",
"tailwindcss": "3.4.10",
"typescript": "5.5.4",
"typescript-eslint": "8.0.1"
"typescript-eslint": "8.1.0"
},
"name": "cachyos-builder-dashboard",
"private": true,
Expand All @@ -48,5 +48,8 @@
"start": "next start"
},
"version": "0.1.0",
"packageManager": "[email protected]"
"packageManager": "[email protected]",
"patchedDependencies": {
"@marsidev/[email protected]": "patches/@marsidev%[email protected]"
}
}
13 changes: 13 additions & 0 deletions patches/@marsidev%[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/dist/index.d.ts b/dist/index.d.ts
index f62283763102262676858ea080ce63d1a3f23ff7..762c388349d4e2ddf37a31e33cf4c3ae5c4f79e8 100644
--- a/dist/index.d.ts
+++ b/dist/index.d.ts
@@ -152,7 +152,7 @@ interface RenderOptions {
* The widget size. Can take the following values: `normal`, `compact`. The normal size is 300x65px, the compact size is 130x120px.
* @default `normal`
*/
- size?: 'normal' | 'compact';
+ size?: 'normal' | 'compact' | 'flexible';
/**
* Controls whether the widget should automatically retry to obtain a token if it did not succeed. The default is `'auto'`, which will retry automatically. This can be set to `'never'` to disable retry upon failure.
* @default `auto`

1 comment on commit 938dabf

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for builder-dashboard ready!

✅ Preview
https://builder-dashboard-4y9u031x6-vnepogodins-projects.vercel.app

Built with commit 938dabf.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.