Repository navigation
This patch improves optional glass materials with live, shape-aware edge refraction in Chromium and clearer material previews.
- SVG edge refraction follows the surface's size and corner radii while foreground text and controls stay sharp and interactive. Navigation controls, toolbar groups, tab bars, menus, context menus, popovers and presentations share the renderer.
- Clear material uses less blur and tint. Sheets, alerts and confirmation dialogs inherit appearance preferences and default to regular material for legibility; large sheets favor opacity and automatic full-screen sheets remain opaque.
- Kitchensink improves Appearance panel spacing and adds a material selector and grid-backed preview. The Glass reference includes an interactive optics example and concise browser, SSR, CSP and performance requirements.
- Refraction maps load after hydration, share a bounded cache and rebuild after resize bursts settle. No new runtime dependencies, graphics engine or continuous animation loop are added.
npm install @swiftuijs/ui@0.1.4Requires React 18.2+ or 19, matching react-dom, and a bundler that supports CSS imports. Import @swiftuijs/ui/style/index.css once at the application root. Glass remains opt-in; use glass={{ renderer: 'css' }} to select CSS everywhere. Safari and Firefox retain CSS materials. SVG data images require CSP img-src data:; blocked images retain CSS. Reduced transparency, increased contrast and forced colors use opaque surfaces. This web approximation does not reproduce Apple's full native optical model or system vibrancy.
Only @swiftuijs/ui is published. The workspace, documentation and Storybook remain private.
Validation covers 440 UI unit tests, 37 documentation tests, 332 component checks, 20 Kitchensink checks and 36 documentation reading checks, plus packed types/CSS/SSR, React 18.2/18.3/19 hydration and interactions, and production performance budgets. Rendering acceptance uses Chromium; native Apple parity, other engines' visual parity and device FPS are not claimed.