Fuaran.UI.StyleObserver 0.30.0

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Fuaran.UI.StyleObserver --version 0.30.0
                    
NuGet\Install-Package Fuaran.UI.StyleObserver -Version 0.30.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Fuaran.UI.StyleObserver" Version="0.30.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Fuaran.UI.StyleObserver" Version="0.30.0" />
                    
Directory.Packages.props
<PackageReference Include="Fuaran.UI.StyleObserver" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Fuaran.UI.StyleObserver --version 0.30.0
                    
#r "nuget: Fuaran.UI.StyleObserver, 0.30.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Fuaran.UI.StyleObserver@0.30.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Fuaran.UI.StyleObserver&version=0.30.0
                    
Install as a Cake Addin
#tool nuget:?package=Fuaran.UI.StyleObserver&version=0.30.0
                    
Install as a Cake Tool

Fuaran.UI.StyleObserver

Two concrete observers against Fuaran.UI.StyleObserver.Abstractions — the resolved-style read-back twin of Fuaran.UI.LayoutObserver:

  • BrowserStyleObserver (Fable / browser) — reads getComputedStyle per registered element, climbs ancestors to build the background-layer stack, folds it through the effective-background composite walk, derives WCAG contrast + the legibility flags, emits to subscribers per the configured debounce + change-detection policy. The shipping path for production Fuaran applications. Discovers nodes via [data-fuaran-node-id] and re-derives on class / style / data-fuaran-tone mutations (a theme toggle recolours the tree).
  • InMemoryStyleObserver (pure .NET) — accepts hand-authored StyleFixture snapshots; runs under Expecto; powers the test suite and the future eval gate. Identical flag-derivation logic — same input, same output as the browser observer.

The load-bearing algorithm — the effective-background composite walk (Flags.effectiveBackground) — composites a translucent background-layer stack down to the first opaque layer so the WCAG contrast denominator is the colour the text actually sits on. It lives in the Abstractions package and is shared by both observers, so a fixture-pinned contrast result is exactly what the browser produces from the same colours.

Manifest-aware verification (Phase 146)

When a Fuaran.UI.ThemeManifest is wired into an observer (create*WithManifest / the (options, manifest) constructor), each observation additionally carries the manifest-aware flags — render-time enforcement of a declared aesthetic-semantic budget, fed back in the manifest's own vocabulary (deterministic, no VLM in the verify path). ManifestFlags exposes the two surfaces:

  • Per-node (perNodeFlags, appended automatically by a manifest-wired observer): TokenResolutionFailed (an emitted tone bound to no host token — the emission fell through the CSS), OffPaletteColour (a toned fill that isn't in the palette), ContrastBelowDeclaredFloor (a per-role floor stricter than the manifest-free AA default).
  • Tree-level (verifyUsageBudgets): the area-weighted colour-distribution check (the 60-30-10 formalisation). It composes with Fuaran.UI.LayoutObserver — the caller joins each StyleObservation fill with the node's LayoutObservation.Width × Height area and passes (observation, areaPx²) pairs; per-token area share is compared to each UsageBudget invariant's targetPct ± tolerancePct, emitting UsageBudgetExceeded("token", declared%, observed%). This is the one flag that requires both observers — without LayoutObserver areas it degrades gracefully (no budget flags; the per-node fidelity flags still fire).

Custom-subtree policy — EXEMPT. Every per-node manifest check fires only for toned nodes (those carrying an EmittedTone). Custom / domain-SVG content never carries a Fuaran data-fuaran-tone, so OffPaletteColour cannot spuriously fire on a chart's series colours or a logo's gradients. With no manifest wired, only the manifest-free (Phase 144) flags fire.

Apache-2.0 licensed — see the repo LICENSE.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.46.0 0 8/28/2026
0.39.0 55 8/27/2026
0.35.0 84 8/24/2026
0.32.0 87 8/23/2026
0.31.0 88 8/21/2026
0.30.0 86 8/21/2026
0.29.0 89 8/19/2026
0.28.0 88 8/18/2026
0.27.0 84 8/18/2026
0.26.0 87 8/18/2026
0.18.0 99 8/10/2026
0.15.0 89 8/9/2026
0.12.0 102 7/31/2026
0.11.0 98 7/30/2026
0.10.0 105 7/29/2026
0.6.0 97 7/27/2026
0.4.0 102 7/26/2026
0.3.0 107 7/24/2026