Switch to Cap invisible widget, add form drafts to middleware, and improve OTP

validation

Use the Cap client widget in the contact UI with status icons and auto-solve,
replacing the capwidget element. Normalize and tighten phone validation by
splitting
normalizePhone and isValidPhone in the Otp lib and use it in contact action
validation. Replace loose text validation with a character-stripper helper.
Also bump several dependencies and adjust middleware to save and restore form
data for
form actions.
This commit is contained in:
badblocks 2026-01-27 09:49:06 -08:00
parent f7bdfd3cb8
commit 8e35387841
No known key found for this signature in database
7 changed files with 261 additions and 222 deletions

View file

@ -18,15 +18,15 @@
"@astrojs/db": "^0.18.3",
"@astrojs/node": "^9.5.2",
"@astrojs/partytown": "^2.1.4",
"@astrojs/sitemap": "^3.6.0",
"@astrojs/sitemap": "^3.7.0",
"@astrojs/ts-plugin": "^1.10.6",
"@cap.js/server": "^4.0.5",
"@cap.js/widget": "^0.1.33",
"@cap.js/widget": "^0.1.34",
"@nurodev/astro-bun": "^2.1.2",
"@types/alpinejs": "^3.13.11",
"alpinejs": "^3.15.3",
"alpinejs": "^3.15.5",
"android-sms-gateway": "^3.0.0",
"astro": "^5.16.6",
"astro": "^5.16.15",
"astro-htmx": "^1.0.6",
"htmx.org": "^2.0.8",
"iconify-icon": "^3.0.2",
@ -35,7 +35,7 @@
"validator": "^13.15.26"
},
"devDependencies": {
"@types/bun": "^1.3.5",
"@types/bun": "^1.3.6",
"@types/validator": "^13.15.10",
"prettier": "^3.8.1",
"prettier-plugin-astro": "^0.14.1"