fix: resolve stylesheets' relative urls next to their real file
Stacked on #8007: this branch contains #8007's commits, the change itself is the last non-merge commit ("fix: resolve stylesheets' relative urls next to their real file").
Stylesheets from the assets directory are copied into .web/styles before the bundler sees them, so their relative url()s resolve against the copy:
/* site_package/css/site.css, linked to assets/external/site_package/css/site.css by rx.asset(shared=True) */
@font-face { font-family: Site; src: url(../fonts/x.woff2); }
Vite looks for .web/styles/external/site_package/fonts/x.woff2, finds nothing and leaves url(../fonts/x.woff2) in the bundle, which the browser requests as /fonts/x.woff2 and gets a 404. A shared asset links only the stylesheet, so its fonts and images never reach the assets directory. Plain stylesheets in assets/ are affected the same way: their relative URLs survive the build unresolved and only happen to work when the stylesheet's depth in assets/ matches the bundle's.
With this PR the styles directory links each stylesheet to its real file (the target of a shared asset's link) instead of copying it. Vite resolves the link, so relative URLs resolve next to the real file and the build bundles and fingerprints what they name:
@font-face{font-family:Site;src:url(/assets/x-Bl2irfN_.woff2)}
This covers App(stylesheets=...) and add_page(stylesheets=...), since both go through _compile_stylesheet_files. The link is made with the atomic replace rx.asset(shared=True) already uses; where symlinks are unavailable (Windows without the privilege) the stylesheet is copied as before, after removing a link an earlier compile left there so the copy cannot write through it into the source. Sass and SCSS are still compiled into the styles directory.
In dev, Vite serves files outside its root (.web) only from server.fs.allow, so a linked stylesheet's fonts were refused with a 403. The generated vite.config.js now allows the app root next to Vite's default, which matches what Vite allows for an ordinary project (its workspace root); server.fs.deny still refuses .env and key files. A shared stylesheet from an installed package outside the app root still builds correctly, but the dev server will not serve its relative assets.
Tests: unit tests for the link and the copy fallback, the fs.allow line, and a production build (tests/integration/test_prod_build_pipeline.py) of a shared stylesheet pair whose font and image end up as fingerprinted /assets/ files.
One thing I noticed but left alone: with TailwindV4Plugin, @tailwindcss/postcss inlines the stylesheets imported into the global stylesheet and rewrites their URLs relative to its base (.web), not to the importing stylesheet, so relative URLs in app stylesheets stay broken there. Page stylesheets are not affected.