Fuaran.UI.StyleObserver
0.30.0
Prefix Reserved
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
<PackageReference Include="Fuaran.UI.StyleObserver" Version="0.30.0" />
<PackageVersion Include="Fuaran.UI.StyleObserver" Version="0.30.0" />
<PackageReference Include="Fuaran.UI.StyleObserver" />
paket add Fuaran.UI.StyleObserver --version 0.30.0
#r "nuget: Fuaran.UI.StyleObserver, 0.30.0"
#:package Fuaran.UI.StyleObserver@0.30.0
#addin nuget:?package=Fuaran.UI.StyleObserver&version=0.30.0
#tool nuget:?package=Fuaran.UI.StyleObserver&version=0.30.0
Fuaran.UI.StyleObserver
Two concrete observers against Fuaran.UI.StyleObserver.Abstractions — the resolved-style read-back twin of Fuaran.UI.LayoutObserver:
BrowserStyleObserver(Fable / browser) — readsgetComputedStyleper 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 onclass/style/data-fuaran-tonemutations (a theme toggle recolours the tree).InMemoryStyleObserver(pure .NET) — accepts hand-authoredStyleFixturesnapshots; 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 withFuaran.UI.LayoutObserver— the caller joins eachStyleObservationfill with the node'sLayoutObservation.Width × Heightarea and passes(observation, areaPx²)pairs; per-token area share is compared to eachUsageBudgetinvariant'stargetPct ± tolerancePct, emittingUsageBudgetExceeded("token", declared%, observed%). This is the one flag that requires both observers — withoutLayoutObserverareas 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 | Versions 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. |
-
net10.0
- Fable.Core (>= 5.0.0)
- FSharp.Core (>= 10.1.300)
- Fuaran.Core.Column (>= 0.6.0)
- Fuaran.Core.DataFrame (>= 0.6.0)
- Fuaran.Core.Tree (>= 0.6.0)
- Fuaran.Core.Validator (>= 0.6.0)
- Fuaran.Core.Wire (>= 0.6.0)
- Fuaran.UI.StyleObserver.Abstractions (>= 0.30.0)
- Fuaran.UI.ThemeManifest (>= 0.30.0)
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 |