Every component is rebuilt on @base-ui/react with a single prop API, token-only colours and dark mode, and 28 new components are added. Components - New: Field, FeaturedTextArea, NumberInput, Combobox, CheckboxGroup, Slider, ToggleGroup/Toggle, IconButton, Dialog/Modal, AlertDialog, Drawer/Sheet, Popover, InfoTip, DropdownMenu, Tabs, Breadcrumb, Pagination, Toast (Toaster, useToast), Progress, Meter, Skeleton, CountBadge, Avatar/AvatarGroup, Kbd, Separator, Table - Rewritten: Button, Input, FeaturedInput, TextArea, Select, FeaturedSelect (real ARIA combobox), NativeSelect, Checkbox, Radio, Switch, Tooltip, Accordion, Alert, Spinner, Badge, Card - Removed TextField (use Input) and sonner (use Toast) Foundations - Semantic tokens (surfaces, text, borders, status ramps) in src/styles/tokens.css, with class-based dark mode - Visible focus rings, linked labels/descriptions/errors, alert roles by severity, keyboard support from Base UI - Fixed the Classic Blue ramp; Emerald, Amber and Teal 500 steps now carry white text at AA - Library build (per-component ES modules, types, tokens.css, exports) Quality - Vitest, Testing Library and axe tests for every component (289 tests) - scripts/check-stories.mjs renders every story in Chrome and fails on errors or axe violations, including contrast; all 423 stories pass in light and dark mode and in all seven palettes - Storybook: controls for every prop, open states for every popup, light/dark toolbar, Introduction guides, docs/CONVENTIONS.md BREAKING CHANGE: component props changed across the kit; see CHANGELOG.md.
Deploying Tansy UI to cPanel
One command replaces the old manual sequence. There is nothing to delete first and no manual overwrite: the cPanel-side script treats the uploaded archive as the complete truth for the docroot and prunes everything else.
Use
python3 scripts/deploy.py # build + package + upload + verify
python3 scripts/deploy.py --deploy-only # upload the existing build (must be built from HEAD)
python3 scripts/deploy.py --build-only # build and package, upload nothing
python3 scripts/deploy.py --dry-run # package and report, upload nothing
Commit before deploying. The script refuses to upload while the working tree
has uncommitted changes, so what is live always matches a commit. Pass
--allow-dirty to override.
One-time setup
cp scripts/deploy.env.example scripts/deploy.env
$EDITOR scripts/deploy.env # fill in CPANEL_PASS
chmod 600 scripts/deploy.env
scripts/deploy.env is gitignored. Every value can also come from the
environment instead, which is what CI should do.
How it works
npm ci,npm run lint,npm run build,npm run build-storybook- Stage
dist/at the root andstorybook-static/underdocs/, zip with Python'szipfile(there is nozipbinary on the build host), base64 it - Upload
scripts/cpanel-deploy.phpto the docroot over the cPanel UAPI - POST the base64 payload to it with a
Hostheader for the subdomain, pointed at the origin IP so Cloudflare is bypassed - The PHP extracts, then deletes anything the archive did not contain
- Rewrite the hardened
.htaccess(always, even if a step above failed), confirm PHP is off again, and verify the site, including/version.json
Caching
The root .htaccess sends Cache-Control: no-cache, so browsers revalidate
index.html, docs/index.json and Storybook's fixed-name manager bundles on
every visit. package() adds an .htaccess to assets/ and docs/assets/
that caches those content-hashed files for a year. Missing asset URLs return
404 instead of falling back to index.html. A stale page that asks for a pruned
bundle then fails visibly, instead of receiving HTML and rendering an empty
Storybook canvas.
Version stamp
Each deploy writes version.json at the docroot:
{ "version": "0.2.0", "commit": "abc1234", "dirty": false, "built_at": "…" }
verify() checks that the live stamp matches the one just uploaded. To see
what is running, open https://<your-subdomain>/version.json.
Why the archive can be authoritative
Vite and Storybook both emit content-hashed filenames
(index-DHOur7R8.js, Alert.stories-CL8ipgGJ.js), so a new build never
overwrites an old file. Without pruning, every deploy leaves its previous
bundles behind. The prune step is what keeps the docroot at exactly one
build.
KEEP_TOP in deploy.py lists the names the prune must never touch:
.htaccess, .user.ini, php.ini, cgi-bin, .well-known. cPanel owns
those; removing .htaccess would take the site down.
Traps this script works around
- PHP is disabled in the hardened
.htaccess. The deployer cannot run until it is lifted, so the script writes a PHP-enabled copy, deploys, then restores the hardened one. It verifies PHP executes before trusting the upload, and verifies PHP is off again afterwards. - A PHP parse error is nearly invisible. The server returns an empty
body and leaves
_deploy.phpon disk, which looks identical to "the upload was ignored". The real cause only shows up in/home/<CPANEL_USER>/logs/php.error.log. The script therefore runsphp -llocally before uploading and aborts if it fails. This is whyphp-cliandphp-zipare required on the build host. protectedis a reserved PHP keyword.const PROTECTED = [...]is a parse error. The constant isPRESERVE.- The
Hostheader is required. Without it the request hits the server's default vhost and cPanel answers with its own 404 page.
Verifying a change to the prune logic
The prune step deletes files, so test it against a fixture rather than
production. Build a fake docroot containing a previous build plus cPanel's
files, run the real script under php-cli, and assert that current files
survive, stale ones are gone, and the preserved names are untouched.
Wiring it into CI
scripts/deploy.py is the whole deploy; a workflow only has to supply
credentials and run it. Note that the Gitea runner's job timeout is 360 s
and npm ci plus a cold Storybook build is likely to exceed that, so either
raise runner.timeout in the runner config or run this from a machine that
already has node_modules.