@vitreajs/vitrea 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -997,7 +997,7 @@ interface ZSlot {
997
997
  readonly order: number;
998
998
  }
999
999
  /** Viewport-space rectangle in CSS px, measured by platform-web and handed in as data. */
1000
- interface Rect {
1000
+ interface Rect$1 {
1001
1001
  readonly x: number;
1002
1002
  readonly y: number;
1003
1003
  readonly width: number;
@@ -1006,9 +1006,9 @@ interface Rect {
1006
1006
  /** Back-to-front ordering: every base node before every overlay node, then by `order`. */
1007
1007
  declare function compareZSlot(a: ZSlot, b: ZSlot): number;
1008
1008
  /** Smallest rect containing both. */
1009
- declare function unionRect(a: Rect, b: Rect): Rect;
1009
+ declare function unionRect(a: Rect$1, b: Rect$1): Rect$1;
1010
1010
  /** Grow a rect outwards on every side — how a group's proxy gets its padding. */
1011
- declare function inflateRect(rect: Rect, by: number): Rect;
1011
+ declare function inflateRect(rect: Rect$1, by: number): Rect$1;
1012
1012
  /**
1013
1013
  * The part of `rect` that survives every clip in the chain.
1014
1014
  *
@@ -1031,13 +1031,13 @@ declare function inflateRect(rect: Rect, by: number): Rect;
1031
1031
  * — an overlap check that over-reports warns about something real-ish, one that
1032
1032
  * under-reports misses a genuine double-filter.
1033
1033
  */
1034
- declare function clipRect(rect: Rect, clip: readonly Rect[] | undefined): Rect;
1034
+ declare function clipRect(rect: Rect$1, clip: readonly Rect$1[] | undefined): Rect$1;
1035
1035
  /**
1036
1036
  * Positive-area intersection. Touching edges are not an overlap — adjacent
1037
1037
  * surfaces in a toolbar are the common case and are legal. A degenerate rect
1038
1038
  * (an unmeasured or collapsed host) overlaps nothing.
1039
1039
  */
1040
- declare function rectsOverlap(a: Rect, b: Rect): boolean;
1040
+ declare function rectsOverlap(a: Rect$1, b: Rect$1): boolean;
1041
1041
 
1042
1042
  /**
1043
1043
  * The scene model (§Core model): the three registries and everything that
@@ -1236,9 +1236,9 @@ interface GlassNodeDescriptor {
1236
1236
  interface GlassNodeRecord {
1237
1237
  readonly descriptor: GlassNodeDescriptor;
1238
1238
  /** Measured by platform-web in the read phase; absent until then. */
1239
- readonly bounds?: Rect;
1239
+ readonly bounds?: Rect$1;
1240
1240
  /** Ancestor clip chain, viewport space. */
1241
- readonly clip?: readonly Rect[];
1241
+ readonly clip?: readonly Rect$1[];
1242
1242
  }
1243
1243
  /** One pyramid rebuild. `groupIds` is why there is one request and not one per group. */
1244
1244
  interface BackdropRebuildRequest {
@@ -1335,7 +1335,7 @@ interface GlassScene {
1335
1335
  glassNode(id: string): GlassNodeRecord | undefined;
1336
1336
  nodesOfGroup(groupId: string): readonly GlassNodeRecord[];
1337
1337
  /** Measured viewport geometry, from the read phase. */
1338
- setNodeBounds(id: string, bounds: Rect, clip?: readonly Rect[]): void;
1338
+ setNodeBounds(id: string, bounds: Rect$1, clip?: readonly Rect$1[]): void;
1339
1339
  /**
1340
1340
  * Scene-wide by default; per group when `groupId` is given.
1341
1341
  *
@@ -1747,11 +1747,12 @@ interface MaterialProfile {
1747
1747
  * substantial material. It casts deeper, richer shadows, has more pronounced
1748
1748
  * lensing and refraction effects, and a softer scattering of light" (S219). One
1749
1749
  * mechanism means one curve: `sizeThickness(span)` is a smoothstep from
1750
- * `sizeSpanMin` to `sizeSpanMax`, and **every** thickness-derived facet is a
1751
- * gain on it — the lens (`lensSizeGainMax`), the scattering
1752
- * (`sizeScatterGainMax`), the occlusion (`sizeOcclusionGain`) and the inner
1753
- * shadow (`sizeShadowGainMax`). Two curves would be two mechanisms, and the
1754
- * reference only has one.
1750
+ * `sizeSpanMin` to `sizeSpanMax`, and the thickness-derived facets are gains
1751
+ * on it — the lens (`lensSizeGainMax`), the occlusion (`sizeOcclusionGain`)
1752
+ * and the inner shadow (`sizeShadowGainMax`). The scattering was one of them
1753
+ * until W11c measured its curve to be a different one (a floor at small
1754
+ * spans, a band top past 96 — see `sizeScatterFloor`); it now rides its own,
1755
+ * from the same `sizeSpanMin`, and this band is untouched by it.
1755
1756
  *
1756
1757
  * A smoothstep rather than a straight ratio, so two surfaces of nearly the same
1757
1758
  * size never read as differently thick, and so every gain saturates instead of
@@ -1796,8 +1797,39 @@ interface MaterialProfile {
1796
1797
  * Both tiers carry it, from one function (`sizeScatterSigma`): the CSS tier
1797
1798
  * multiplies its `blur()` σ, and the GPU tier lerps its body sample toward the
1798
1799
  * chain level whose blur is that σ.
1800
+ *
1801
+ * MEASURED (W11c G1, claims §5.41), and no longer a gain on `sizeThickness`
1802
+ * alone — see `sizeScatterFloor` and `sizeScatterSpanMax` below for the curve
1803
+ * it rides. 8: the heavy component of the reference's interior sits near σ 10
1804
+ * CSS px against a body σ of 1.25, and the gain sweep has a clear minimum at
1805
+ * 8 (RMS 0.0164 against 0.0180 at 6 and 0.0191 at 10 on the probe bed).
1799
1806
  */
1800
1807
  readonly sizeScatterGainMax: number;
1808
+ /**
1809
+ * **The scattering facet's own curve** (W11c G1, claims §5.41).
1810
+ *
1811
+ * The reference's interior over structured content is two components, read
1812
+ * off the W9 probe bed across four checkerboard pitches and five spans: a
1813
+ * sharp one near σ 1.25 CSS px and a heavy one near σ 10, mixed by a share
1814
+ * that is already ≈ 0.4 at spans of 32–44 and still rising at 160 (0.52 at
1815
+ * 96, 0.64 at 128, 0.76 at 160). `sizeThickness` — zero at `sizeSpanMin` and
1816
+ * saturated at `sizeSpanMax` = 96 — can express neither the floor nor a band
1817
+ * top past 96, and moving `sizeSpanMax` would move the lens, the occlusion,
1818
+ * the inner shadow and W9's thin/thick response rows with it. So the scatter
1819
+ * mix rides its own curve:
1820
+ *
1821
+ * ```
1822
+ * kScatter = floor + (1 − floor) · smoothstep(sizeSpanMin, sizeScatterSpanMax, span) · fold
1823
+ * ```
1824
+ *
1825
+ * The floor is the material's own frost and is **not** folded under an
1826
+ * accessibility preference; the span-dependent rise is a depth effect and
1827
+ * folds like every other facet (`scatterThickness`). Fitted with `rrect-lg`
1828
+ * held out: floor 0.40 (0.0175 at 0.3, 0.0174 at 0.45), band top 256 (0.0182
1829
+ * at 224, 0.0174 at 320); the held-out cell's residual 0.0366 → 0.0174.
1830
+ */
1831
+ readonly sizeScatterFloor: number;
1832
+ readonly sizeScatterSpanMax: number;
1801
1833
  /**
1802
1834
  * The occlusion gain — "a larger size is more opaque. A smaller size is
1803
1835
  * clearer" (S284). The fraction of the *remaining* transparency the size law
@@ -1828,9 +1860,17 @@ interface MaterialProfile {
1828
1860
  * an outer `box-shadow` the reference does not cast at all (Decision Log #32(c)).
1829
1861
  */
1830
1862
  readonly sizeShadowGainMax: number;
1831
- /** Chain LOD per CSS px of lens depth, and how much sharper the rim samples. */
1832
- readonly lensBodyLodPerPx: number;
1833
- readonly lensRimLodBias: number;
1863
+ /**
1864
+ * The lens's magnitude: the contour displacement in lens depths (W11c G2).
1865
+ *
1866
+ * The shader reads the body from `lensDepth × lensRefractionGain × (1 − depth)²`
1867
+ * further inside, so the band is the plate folded back from that far in. The
1868
+ * two rim-LOD constants that used to sit here (`lensBodyLodPerPx`,
1869
+ * `lensRimLodBias`) are retired: the reference's band is not sharper than its
1870
+ * interior — W11c G2 measured σ 6 → 4 → 3 → the deep value across the band —
1871
+ * and the "sharper rim" was the fold, not a finer sample.
1872
+ */
1873
+ readonly lensRefractionGain: number;
1834
1874
  /**
1835
1875
  * What each accessibility regime does to the numbers above. The multipliers
1836
1876
  * match `platform-web`'s CSS tier so the two renderers degrade the same way
@@ -1859,28 +1899,39 @@ interface MaterialProfile {
1859
1899
  readonly strongBorderRim: MaterialRim;
1860
1900
  readonly reducedTintAdaptation: number;
1861
1901
  /**
1862
- * The author tint's tone map — Apple's "range of tones **mapped to content
1863
- * brightness underneath**" (S219), as four numbers.
1902
+ * The author tint's shade law (W10) — Apple's "range of tones **mapped to
1903
+ * content brightness underneath**" (S219), measured per pixel on the frozen
1904
+ * bed and the W9 probe (claims §5.36).
1864
1905
  *
1865
- * The seed the author gives is not the colour the material paints. It is the
1866
- * middle of a range: over a dark backdrop the material shows a shade of the
1867
- * seed (`tintToneFloor`, a multiple of it in linear light, so hue and
1868
- * chromaticity survive); over a bright one it shows the seed washed toward
1869
- * white (`tintToneCeilMix`), which is what Apple's "changing its hue,
1870
- * brightness and saturation… without deviating too much from the intended
1871
- * color" describes. `tintToneLow`/`tintToneHigh` are the backdrop luminances
1872
- * the two ends are reached at, crossed with a smoothstep for the same reason
1873
- * `lensSpanMin`/`lensSpanMax` are.
1906
+ * The tinted material is an OPAQUE, hue-preserving shade of the seed: the seed
1907
+ * times a scalar, and the scalar is linear in the luminance the untinted
1908
+ * material shows at the same pixel — `mix(tintShadeDark, tintShadeLight, u)`,
1909
+ * clamped so a shade is never brighter than the seed. Over black content the
1910
+ * reference shows about half the seed's light; over white it shows the seed
1911
+ * itself; over a checkerboard it shows both, cell by cell, with the seed's
1912
+ * chromaticity intact to three decimals at every pitch measured. That layer
1913
+ * composites over the material at the AUTHOR's opacity (the colour's alpha) in
1914
+ * the encoded space — the half-strength cell is the 0.501 encoded-space mix
1915
+ * of its untinted and full-tinted twins, per channel — so the material's own
1916
+ * alpha is not what a tinted surface shows.
1917
+ *
1918
+ * `tintShadeStrength` is the law's provenance gate: 1 where the constants were
1919
+ * measured (the light scheme), 0 where they were not — the dark scheme
1920
+ * renders the pure seed over every backdrop it was measured on, which is
1921
+ * consistent with "a shade relative to the material's own body level" but is
1922
+ * not yet separable from "no shading in the dark scheme". The collapse (W7)
1923
+ * folds the shade out the same way, because a collapsed material IS a dark
1924
+ * body and the reference renders the pure seed there too.
1874
1925
  *
1875
- * **Advisory and calibration-delegated**, like every other number in this
1876
- * profile: they are chosen so a tinted surface reads as coloured glass rather
1877
- * than as paint, and the tinted-capture extension fits them. Nothing here is
1878
- * measured yet, and no claim rests on these values.
1926
+ * MEASURED, both scales, twelve light-standard cells across three pitches:
1927
+ * fitted on the five probe cells only (17 700 px, RMS 0.0035) and refereed by
1928
+ * every canonical tinted row. Mirrored by `@vitreajs/vitrea-web`'s
1929
+ * `TINT_SHADE`, pinned in both directions by
1930
+ * `packages/calibration/test/tier-coherence.test.ts`.
1879
1931
  */
1880
- readonly tintToneFloor: number;
1881
- readonly tintToneCeilMix: number;
1882
- readonly tintToneLow: number;
1883
- readonly tintToneHigh: number;
1932
+ readonly tintShadeDark: number;
1933
+ readonly tintShadeLight: number;
1934
+ readonly tintShadeStrength: number;
1884
1935
  /**
1885
1936
  * **Backdrop tone adaptation (W7)** — the axis Apple's material has and this
1886
1937
  * one did not: over a dark enough backdrop the material stops being a lighter
@@ -1918,6 +1969,58 @@ interface MaterialProfile {
1918
1969
  readonly backdropToneLow: number;
1919
1970
  readonly backdropToneHigh: number;
1920
1971
  readonly backdropToneSizeBias: number;
1972
+ /**
1973
+ * **The backdrop tone response (W9)** — the law that owns the interior MEAN,
1974
+ * where the four constants above own texture collapse and nothing else.
1975
+ *
1976
+ * The W9 probe falsified the mix-toward-backdrop form outright (claims
1977
+ * §5.33): six cells need mix strengths outside [0, 1], because the
1978
+ * reference adapts toward the material's own light/dark appearance, which
1979
+ * coincides with the backdrop's tone only over `dark-solid` — the one
1980
+ * background the mix was fitted on. What the probe measured instead is a
1981
+ * LAW: at equal encoded-space backdrop mean the reference's settled
1982
+ * interior is the same number regardless of the backdrop's structure
1983
+ * (checker vs text rows, 0.81 both at input 0.69), so the interior level is
1984
+ * a function `R(encodedMean, thickness)` and these constants are that
1985
+ * function's anchors.
1986
+ *
1987
+ * `backdropToneAnchorX` is the three solid anchors' encoded-space means —
1988
+ * measured backdrop luminances, not tuned. `backdropToneResponseThin` and
1989
+ * `...Thick` are the reference's settled interior levels at those anchors
1990
+ * for a thin surface (`sizeThickness` 0, the 32 px rrect) and a thick one
1991
+ * (saturated, the 96 px+ rrects pooled — their residual spread ±0.012 is
1992
+ * the accepted cost of `sizeSpanMax` saturation, claims §5.33). Between
1993
+ * the rows: smoothstep in thickness; between the anchors: monotone
1994
+ * (Fritsch–Carlson) interpolation in the ENCODED input, the space the
1995
+ * probe validated to RMS 0.034 with zero fitting.
1996
+ *
1997
+ * Below the dark anchor the surface has no data (the probe's grid floor
1998
+ * is `dark-solid`), and the one validation cell down there —
1999
+ * `impulse__rrect-md`, backdrop 0.0039, reference 0.4358 — reads DARKER
2000
+ * than the dark anchor's thick row, so clamping would regress it. The
2001
+ * solve's authority fades to zero from the dark anchor downward
2002
+ * (smoothstep over the anchor's own lower half, no new constant); the
2003
+ * extreme-dark region stays with the collapse constants that were fitted
2004
+ * on it.
2005
+ */
2006
+ readonly backdropToneAnchorX: readonly [number, number, number];
2007
+ readonly backdropToneResponseThin: readonly [number, number, number];
2008
+ readonly backdropToneResponseThick: readonly [number, number, number];
2009
+ /**
2010
+ * How much authority the response law has in THIS profile, 0…1 (W9).
2011
+ *
2012
+ * The anchors above are measurements of the LIGHT reference's settled
2013
+ * appearance. The dark scheme's material settles at its own levels over the
2014
+ * same backdrops (0.809 light against 0.055 dark over one checkerboard,
2015
+ * §5.8), so a dark profile running the light response surface brightens the
2016
+ * dark material toward the wrong scheme's appearance — measured on the
2017
+ * canonical dark bed as ΔE p95 0.08 → 0.58 before this constant existed.
2018
+ * The dark profiles set it to 0: the collapse (whose target is the
2019
+ * backdrop, not a scheme's appearance) still runs there, and a dark
2020
+ * response surface is follow-up work that needs the dark reference probed,
2021
+ * not an assumption.
2022
+ */
2023
+ readonly backdropToneResponseStrength: number;
1921
2024
  /** The outer shadow (W8) — see `MaterialOuterShadow`. */
1922
2025
  readonly outerShadow: MaterialOuterShadow;
1923
2026
  /**
@@ -1950,22 +2053,26 @@ interface MaterialProfilePatch {
1950
2053
  readonly sizeSpanMax?: number;
1951
2054
  readonly lensSizeGainMax?: number;
1952
2055
  readonly sizeScatterGainMax?: number;
2056
+ readonly sizeScatterFloor?: number;
2057
+ readonly sizeScatterSpanMax?: number;
1953
2058
  readonly sizeOcclusionGain?: number;
1954
2059
  readonly sizeShadowGainMax?: number;
1955
- readonly lensBodyLodPerPx?: number;
1956
- readonly lensRimLodBias?: number;
2060
+ readonly lensRefractionGain?: number;
1957
2061
  readonly reducedTransparencyFrost?: number;
1958
2062
  readonly increasedOcclusionLift?: number;
1959
2063
  readonly strongBorderRim?: Readonly<Partial<MaterialRim>>;
1960
2064
  readonly reducedTintAdaptation?: number;
1961
- readonly tintToneFloor?: number;
1962
- readonly tintToneCeilMix?: number;
1963
- readonly tintToneLow?: number;
1964
- readonly tintToneHigh?: number;
2065
+ readonly tintShadeDark?: number;
2066
+ readonly tintShadeLight?: number;
2067
+ readonly tintShadeStrength?: number;
1965
2068
  readonly backdropToneMax?: number;
1966
2069
  readonly backdropToneLow?: number;
1967
2070
  readonly backdropToneHigh?: number;
1968
2071
  readonly backdropToneSizeBias?: number;
2072
+ readonly backdropToneAnchorX?: readonly [number, number, number];
2073
+ readonly backdropToneResponseThin?: readonly [number, number, number];
2074
+ readonly backdropToneResponseThick?: readonly [number, number, number];
2075
+ readonly backdropToneResponseStrength?: number;
1969
2076
  readonly outerShadow?: Readonly<Partial<MaterialOuterShadow>>;
1970
2077
  readonly lightDirection?: readonly [number, number];
1971
2078
  readonly sweepBandRadians?: number;
@@ -2189,137 +2296,6 @@ interface VideoProviderOptions {
2189
2296
  readonly generation?: number;
2190
2297
  }
2191
2298
 
2192
- /**
2193
- * Device ownership, loss teardown, and rebuild (§GPU device ownership).
2194
- *
2195
- * `platform-web` owns the *browser* half of the story — is there an adapter, get
2196
- * a device, notice when it goes away. This module owns the *resource* half: what
2197
- * has to be thrown away when a device dies, when it is safe to build again, and
2198
- * what core's capability inputs should read while that is in flight.
2199
- *
2200
- * ## The two ownership modes, and why they are not symmetric
2201
- *
2202
- * - **vitrea-owned** — this module can re-request a device by itself, so loss is
2203
- * a transient it recovers from: tear down, re-request, re-attach, rebuild.
2204
- * Every backdrop source is re-imported on the next frame because loss marks
2205
- * them all dirty, which routes recovery through the same
2206
- * one-rebuild-per-dirty-source-per-frame path a content change takes rather
2207
- * than through a special case.
2208
- * - **app-owned** — the app owns the resources that would have to be
2209
- * re-registered, so this module reports the loss, raises
2210
- * `replacementPending`, and **waits**. Groups stay demoted until
2211
- * `replaceDevice` arrives and the re-registration handshake completes. Inventing
2212
- * a device the app did not give us would break the one guarantee app-ownership
2213
- * exists for: that every texture the renderer samples came from the app's own
2214
- * device, because WebGPU has no cross-device sharing.
2215
- *
2216
- * `info.reason === "destroyed"` is our own teardown and is not recovered from —
2217
- * re-requesting there would resurrect a renderer the host just destroyed.
2218
- *
2219
- * ## Generations
2220
- *
2221
- * Every attach bumps a generation counter, and every GPU object this package
2222
- * holds is tagged with the generation it was made under. A resource from a lost
2223
- * device is unusable forever, and the failure mode is silent — bindings simply
2224
- * produce nothing — so "is this from the current device" has to be a cheap
2225
- * integer comparison somewhere. It is here.
2226
- */
2227
- /**
2228
- * Structurally identical to `vitrea`'s `WebGPUAvailability` (X2's K1
2229
- * amendment, Decision Log #21c). Declared here rather than imported because this
2230
- * package sits *below* core in the dependency graph — core reaches the renderer
2231
- * through a dynamic import, so an import back would close a cycle. A test pins
2232
- * the two unions to the same members.
2233
- */
2234
- type WebGPUAvailability = "not-requested" | "unavailable" | "available";
2235
- type DeviceOwnership = "vitrea" | "app";
2236
- interface RendererDeviceStatus {
2237
- /** Feeds core's `PlatformProbe.webgpu` unchanged. */
2238
- readonly webgpu: WebGPUAvailability;
2239
- readonly deviceHealth: "ok" | "lost";
2240
- readonly ownership: DeviceOwnership;
2241
- readonly device: GPUDevice | undefined;
2242
- /** Bumped on every attach. Tags every resource built under it. */
2243
- readonly generation: number;
2244
- /** True while an app-owned device is lost and no replacement has arrived. */
2245
- readonly replacementPending: boolean;
2246
- /** Why there is no device, when there is a reason worth reporting. */
2247
- readonly unavailableReason?: "no-adapter" | "device-request-failed" | "lost";
2248
- }
2249
- /** The capability facts a host folds into core's `PlatformProbe`. */
2250
- interface DeviceCapabilityInput {
2251
- readonly webgpu: WebGPUAvailability;
2252
- readonly deviceHealth: "ok" | "lost";
2253
- }
2254
-
2255
- /**
2256
- * The governor's knobs.
2257
- *
2258
- * §Performance envelope: "The governor degrades **within** a tier first
2259
- * (refraction resolution, adaptation cadence, edge analysis) and switches tiers
2260
- * only with long hysteresis and cooldown." Decision Log #19 adds that intra-tier
2261
- * degradation is **not a state change** — a group under `degrade-in-tier`
2262
- * pressure keeps `activeRenderer: "webgpu"` and its whole resolved state.
2263
- *
2264
- * So the split is: **the policy lives in core, the knobs live here.** This module
2265
- * exposes what can be turned and publishes a suggested ladder as *data*; it never
2266
- * decides to turn anything, never reads a clock, and never applies hysteresis.
2267
- * A governor that lived in the renderer would be a governor that could not see
2268
- * the scene it is governing.
2269
- *
2270
- * ## The three knobs, weakest cost first
2271
- *
2272
- * 1. **`fieldFamily`** — `rsupn` → `rsup`. S2 priced this at 29% of the field's
2273
- * cost for a bound that degrades from 0.170 px / 2.91° to 0.574 px / 4.26°.
2274
- * It is the *first* step because it is one uniform and one pipeline: no
2275
- * resolution change, so nothing resamples and nothing shimmers as it engages.
2276
- * **Conditional on the f32 cross-check** (Decision Log #20) — and the check
2277
- * has now been run, so the condition is met. See `FAMILY_C_CROSS_CHECK`.
2278
- * 2. **`refractionResolutionScale`** — the group's **field** targets are
2279
- * rasterised at a fraction of device resolution, and the optics and highlight
2280
- * passes filter them instead of indexing them (`passes.ts`, and the
2281
- * `fieldUpsampled` flag both shaders branch on). Quadratic saving on the pass
2282
- * that evaluates the pseudo-SDF union per pixel per member, and the most
2283
- * visible step, so it comes second.
2284
- *
2285
- * What it does **not** yet do is shrink the optics and highlight passes
2286
- * themselves: those still render at full device resolution into the plane
2287
- * canvases, because rendering them smaller means an offscreen target and a
2288
- * resolve pass rather than a change of extent. So rungs 2 and 3 deliver the
2289
- * field's quadratic saving and the cadence saving, not the full quadratic
2290
- * saving on both heavy passes. Recorded here rather than implied, because a
2291
- * ladder whose rungs are priced for savings they do not deliver is a ladder
2292
- * core's policy will walk too far down.
2293
- * 3. **`adaptationCadenceHz`** — how often analysis is reduced and read back.
2294
- * Cheapest of the three in visual terms because the values it feeds are
2295
- * already low-passed over hundreds of milliseconds; dropping the cadence
2296
- * mostly changes how quickly a scroll's new backdrop is noticed.
2297
- */
2298
- type FieldFamily = "rsupn" | "rsup";
2299
- interface GovernorKnobs {
2300
- /** Which pseudo-SDF family the field pass compiles. */
2301
- readonly fieldFamily: FieldFamily;
2302
- /**
2303
- * Device-resolution fraction the group's field targets are rasterised at,
2304
- * 0 < s <= 1. The optics and highlight passes upsample what they read. See the
2305
- * module note for what this does and does not save.
2306
- */
2307
- readonly refractionResolutionScale: number;
2308
- /** Analysis reduction + readback rate. 0 disables adaptation entirely. */
2309
- readonly adaptationCadenceHz: number;
2310
- }
2311
- interface Governor {
2312
- readonly knobs: GovernorKnobs;
2313
- /** True when `fieldFamily: "rsup"` is permitted to engage. */
2314
- readonly familyCVerified: boolean;
2315
- set(patch: Partial<GovernorKnobs>): GovernorKnobs;
2316
- /** Move to a rung of the suggested ladder. Out-of-range clamps to the ends. */
2317
- setLevel(level: number): GovernorKnobs;
2318
- reset(): GovernorKnobs;
2319
- /** Record that the cross-check passed, unlocking family C. */
2320
- recordFamilyCVerified(): void;
2321
- }
2322
-
2323
2299
  /**
2324
2300
  * What the renderer consumes each frame, and why it is declared here rather than
2325
2301
  * imported from `vitrea`.
@@ -2351,6 +2327,13 @@ interface Governor {
2351
2327
  * none in core.
2352
2328
  */
2353
2329
 
2330
+ /** Viewport-space rectangle in CSS px. Matches core's `Rect`. */
2331
+ interface Rect {
2332
+ readonly x: number;
2333
+ readonly y: number;
2334
+ readonly width: number;
2335
+ readonly height: number;
2336
+ }
2354
2337
  /** Motion-driver outputs for one surface. Every one is a value, never a time. */
2355
2338
  interface SurfaceChannels {
2356
2339
  /** `pressCompression`, 0..1. Scaled by motion's `pressCompressionScale`. */
@@ -2440,6 +2423,45 @@ interface GroupRenderInput {
2440
2423
  * back to a level nobody measured.
2441
2424
  */
2442
2425
  readonly backdropTone?: Rgb;
2426
+ /**
2427
+ * The backdrop's ENCODED-space tone level (W9, claims §5.31–§5.34): the mean
2428
+ * taken in sRGB-encoded space, decoded once — the input the reference's tone
2429
+ * response tracks, feeding the collapse band's argument and the response
2430
+ * curve. Distinct from `backdropTone` on any structured backdrop: the
2431
+ * COLOUR is the physical linear mean (what the collapse converges onto —
2432
+ * on the impulse grid the two differ 2.6×, and converging onto the encoded
2433
+ * reading was a measured ΔE p95 0.03 → 0.12 regression), while the LEVEL is
2434
+ * the encoded reading. Absent falls back to `backdropTone`'s own luminance.
2435
+ */
2436
+ readonly backdropToneLevel?: number;
2437
+ /**
2438
+ * The backdrop's LINEAR-space mean luminance, beside `backdropToneLevel`'s
2439
+ * encoded-space reading (W9, claims §5.31). The per-pixel tint-tone input
2440
+ * samples a chain that averages linearly, so the optics pass multiplies it by
2441
+ * `backdropToneLevel / backdropToneLinearLuminance` — locality is
2442
+ * preserved and the input's spatial mean matches the model exactly. Absent
2443
+ * (or equal to the tone's level) collapses the ratio to 1.
2444
+ */
2445
+ readonly backdropToneLinearLuminance?: number;
2446
+ /**
2447
+ * The material's tint and alpha for a group that samples NOTHING (W11a) — a
2448
+ * `css-backdrop` group whose blurred backdrop is a DOM proxy beneath the
2449
+ * canvas, or a `none` group over the page itself. Such a group's body is
2450
+ * not composited in the shader: the optics pass writes the material as a
2451
+ * premultiplied layer and the browser composites it over the DOM, in
2452
+ * encoded sRGB. A linear-light alpha written into that composite lands the
2453
+ * surface darker than the same material sampled on the GPU — the gap
2454
+ * `cssTintAlpha` closes for the CSS tier, at a declared reference level —
2455
+ * so the host, which owns that mapping, resolves the pair once and hands
2456
+ * the same numbers to both tiers. Linear light; the renderer folds the
2457
+ * accessibility policy over it exactly as over the profile's own. Ignored
2458
+ * wherever the group samples a backdrop; absent, the profile's pair is
2459
+ * written as it is (the golden harness, which has no host).
2460
+ */
2461
+ readonly unsampledMaterial?: {
2462
+ readonly tint: Rgb;
2463
+ readonly tintAlpha: number;
2464
+ };
2443
2465
  readonly variant?: MaterialVariant;
2444
2466
  /** Overrides the calibration-delegated union defaults. */
2445
2467
  readonly union?: GroupUnionParams;
@@ -2488,6 +2510,173 @@ interface FrameParticipantView {
2488
2510
  readonly render?: (context: FrameContextView) => void;
2489
2511
  }
2490
2512
 
2513
+ /**
2514
+ * Where a backdrop texture sits on the plane, and what that makes of a CSS px.
2515
+ *
2516
+ * The optics pass samples the backdrop through one uv transform on
2517
+ * viewport-normalised coordinates — `uv = viewport01 · scale + offset` — and
2518
+ * the pyramid converts the material's CSS-px σ into source texels once, at build.
2519
+ * Both numbers are functions of the same thing: the rectangle of the viewport the
2520
+ * texture's pixels actually occupy. This module is the one place that rectangle
2521
+ * turns into either.
2522
+ *
2523
+ * ## Placed
2524
+ *
2525
+ * A texture handed over from a DOM element — an `<img>`, a `<canvas>`, a
2526
+ * `<video>` — has a box the host measures every read phase, in CSS px relative
2527
+ * to the viewport, and that box IS the placement: a 320 px raster in the corner
2528
+ * of a 1440 px page maps the 320 px, not the page. The source's own extent is
2529
+ * still what the pyramid is built from; the placement only says where on the
2530
+ * plane its texels land, so one texel is `placement.width / sourceWidth` CSS px.
2531
+ *
2532
+ * Outside the placement the sampler clamps to the edge. A surface hanging past
2533
+ * the texture's box reads the nearest edge texel rather than nothing; the
2534
+ * unsampled layer (W11a) is not applied to partial overlap in this cut.
2535
+ *
2536
+ * ## Cover
2537
+ *
2538
+ * A source with no placement — an `ImageBitmap`, an `OffscreenCanvas`, an
2539
+ * element not in the document, or a renderer driven without a host at all —
2540
+ * keeps the original rule: the backdrop fills the viewport and the overflow is
2541
+ * cropped symmetrically. Every golden and every calibration capture was taken
2542
+ * with the texture the size of the stage, where the two rules coincide exactly;
2543
+ * the demo's reference panel is where they came apart (claims §5.47).
2544
+ */
2545
+
2546
+ /** A backdrop source's box on the plane, in CSS px relative to the viewport. */
2547
+ type BackdropPlacement = Rect;
2548
+
2549
+ /**
2550
+ * Device ownership, loss teardown, and rebuild (§GPU device ownership).
2551
+ *
2552
+ * `platform-web` owns the *browser* half of the story — is there an adapter, get
2553
+ * a device, notice when it goes away. This module owns the *resource* half: what
2554
+ * has to be thrown away when a device dies, when it is safe to build again, and
2555
+ * what core's capability inputs should read while that is in flight.
2556
+ *
2557
+ * ## The two ownership modes, and why they are not symmetric
2558
+ *
2559
+ * - **vitrea-owned** — this module can re-request a device by itself, so loss is
2560
+ * a transient it recovers from: tear down, re-request, re-attach, rebuild.
2561
+ * Every backdrop source is re-imported on the next frame because loss marks
2562
+ * them all dirty, which routes recovery through the same
2563
+ * one-rebuild-per-dirty-source-per-frame path a content change takes rather
2564
+ * than through a special case.
2565
+ * - **app-owned** — the app owns the resources that would have to be
2566
+ * re-registered, so this module reports the loss, raises
2567
+ * `replacementPending`, and **waits**. Groups stay demoted until
2568
+ * `replaceDevice` arrives and the re-registration handshake completes. Inventing
2569
+ * a device the app did not give us would break the one guarantee app-ownership
2570
+ * exists for: that every texture the renderer samples came from the app's own
2571
+ * device, because WebGPU has no cross-device sharing.
2572
+ *
2573
+ * `info.reason === "destroyed"` is our own teardown and is not recovered from —
2574
+ * re-requesting there would resurrect a renderer the host just destroyed.
2575
+ *
2576
+ * ## Generations
2577
+ *
2578
+ * Every attach bumps a generation counter, and every GPU object this package
2579
+ * holds is tagged with the generation it was made under. A resource from a lost
2580
+ * device is unusable forever, and the failure mode is silent — bindings simply
2581
+ * produce nothing — so "is this from the current device" has to be a cheap
2582
+ * integer comparison somewhere. It is here.
2583
+ */
2584
+ /**
2585
+ * Structurally identical to `vitrea`'s `WebGPUAvailability` (X2's K1
2586
+ * amendment, Decision Log #21c). Declared here rather than imported because this
2587
+ * package sits *below* core in the dependency graph — core reaches the renderer
2588
+ * through a dynamic import, so an import back would close a cycle. A test pins
2589
+ * the two unions to the same members.
2590
+ */
2591
+ type WebGPUAvailability = "not-requested" | "unavailable" | "available";
2592
+ type DeviceOwnership = "vitrea" | "app";
2593
+ interface RendererDeviceStatus {
2594
+ /** Feeds core's `PlatformProbe.webgpu` unchanged. */
2595
+ readonly webgpu: WebGPUAvailability;
2596
+ readonly deviceHealth: "ok" | "lost";
2597
+ readonly ownership: DeviceOwnership;
2598
+ readonly device: GPUDevice | undefined;
2599
+ /** Bumped on every attach. Tags every resource built under it. */
2600
+ readonly generation: number;
2601
+ /** True while an app-owned device is lost and no replacement has arrived. */
2602
+ readonly replacementPending: boolean;
2603
+ /** Why there is no device, when there is a reason worth reporting. */
2604
+ readonly unavailableReason?: "no-adapter" | "device-request-failed" | "lost";
2605
+ }
2606
+ /** The capability facts a host folds into core's `PlatformProbe`. */
2607
+ interface DeviceCapabilityInput {
2608
+ readonly webgpu: WebGPUAvailability;
2609
+ readonly deviceHealth: "ok" | "lost";
2610
+ }
2611
+
2612
+ /**
2613
+ * The governor's knobs.
2614
+ *
2615
+ * §Performance envelope: "The governor degrades **within** a tier first
2616
+ * (refraction resolution, adaptation cadence, edge analysis) and switches tiers
2617
+ * only with long hysteresis and cooldown." Decision Log #19 adds that intra-tier
2618
+ * degradation is **not a state change** — a group under `degrade-in-tier`
2619
+ * pressure keeps `activeRenderer: "webgpu"` and its whole resolved state.
2620
+ *
2621
+ * So the split is: **the policy lives in core, the knobs live here.** This module
2622
+ * exposes what can be turned and publishes a suggested ladder as *data*; it never
2623
+ * decides to turn anything, never reads a clock, and never applies hysteresis.
2624
+ * A governor that lived in the renderer would be a governor that could not see
2625
+ * the scene it is governing.
2626
+ *
2627
+ * ## The three knobs, weakest cost first
2628
+ *
2629
+ * 1. **`fieldFamily`** — `rsupn` → `rsup`. S2 priced this at 29% of the field's
2630
+ * cost for a bound that degrades from 0.170 px / 2.91° to 0.574 px / 4.26°.
2631
+ * It is the *first* step because it is one uniform and one pipeline: no
2632
+ * resolution change, so nothing resamples and nothing shimmers as it engages.
2633
+ * **Conditional on the f32 cross-check** (Decision Log #20) — and the check
2634
+ * has now been run, so the condition is met. See `FAMILY_C_CROSS_CHECK`.
2635
+ * 2. **`refractionResolutionScale`** — the group's **field** targets are
2636
+ * rasterised at a fraction of device resolution, and the optics and highlight
2637
+ * passes filter them instead of indexing them (`passes.ts`, and the
2638
+ * `fieldUpsampled` flag both shaders branch on). Quadratic saving on the pass
2639
+ * that evaluates the pseudo-SDF union per pixel per member, and the most
2640
+ * visible step, so it comes second.
2641
+ *
2642
+ * What it does **not** yet do is shrink the optics and highlight passes
2643
+ * themselves: those still render at full device resolution into the plane
2644
+ * canvases, because rendering them smaller means an offscreen target and a
2645
+ * resolve pass rather than a change of extent. So rungs 2 and 3 deliver the
2646
+ * field's quadratic saving and the cadence saving, not the full quadratic
2647
+ * saving on both heavy passes. Recorded here rather than implied, because a
2648
+ * ladder whose rungs are priced for savings they do not deliver is a ladder
2649
+ * core's policy will walk too far down.
2650
+ * 3. **`adaptationCadenceHz`** — how often analysis is reduced and read back.
2651
+ * Cheapest of the three in visual terms because the values it feeds are
2652
+ * already low-passed over hundreds of milliseconds; dropping the cadence
2653
+ * mostly changes how quickly a scroll's new backdrop is noticed.
2654
+ */
2655
+ type FieldFamily = "rsupn" | "rsup";
2656
+ interface GovernorKnobs {
2657
+ /** Which pseudo-SDF family the field pass compiles. */
2658
+ readonly fieldFamily: FieldFamily;
2659
+ /**
2660
+ * Device-resolution fraction the group's field targets are rasterised at,
2661
+ * 0 < s <= 1. The optics and highlight passes upsample what they read. See the
2662
+ * module note for what this does and does not save.
2663
+ */
2664
+ readonly refractionResolutionScale: number;
2665
+ /** Analysis reduction + readback rate. 0 disables adaptation entirely. */
2666
+ readonly adaptationCadenceHz: number;
2667
+ }
2668
+ interface Governor {
2669
+ readonly knobs: GovernorKnobs;
2670
+ /** True when `fieldFamily: "rsup"` is permitted to engage. */
2671
+ readonly familyCVerified: boolean;
2672
+ set(patch: Partial<GovernorKnobs>): GovernorKnobs;
2673
+ /** Move to a rung of the suggested ladder. Out-of-range clamps to the ends. */
2674
+ setLevel(level: number): GovernorKnobs;
2675
+ reset(): GovernorKnobs;
2676
+ /** Record that the cross-check passed, unlocking family C. */
2677
+ recordFamilyCVerified(): void;
2678
+ }
2679
+
2491
2680
  /**
2492
2681
  * Pass-by-pass timing, for the benchmark §Performance envelope pins the ~2 ms
2493
2682
  * hypothesis to.
@@ -2654,6 +2843,17 @@ interface PyramidResources {
2654
2843
  * from without knowing where the body already sits.
2655
2844
  */
2656
2845
  readonly bodySigmaTexels: number;
2846
+ /**
2847
+ * Source texels per CSS px the build converted `bodySigmaCss` with — the placed
2848
+ * density where the source had a placement, the cover ratio where it did not
2849
+ * (`backdrop-fit.ts`) — and the source extent it was computed from. Recorded so
2850
+ * a later request can tell whether the body it would produce differs from the
2851
+ * one on the chain: a static image never re-dirties, so a placement whose SIZE
2852
+ * moved is the only signal that the σ in texels has gone stale.
2853
+ */
2854
+ readonly texelsPerCss: number;
2855
+ readonly sourceWidth: number;
2856
+ readonly sourceHeight: number;
2657
2857
  }
2658
2858
  interface PyramidInstrumentation {
2659
2859
  /** Successful rebuilds since the store was created. */
@@ -2684,6 +2884,11 @@ interface PyramidBuildRequest {
2684
2884
  */
2685
2885
  readonly bodySigmaCss: number;
2686
2886
  readonly viewportCss: readonly [number, number];
2887
+ /**
2888
+ * Where the source sits on the plane, in CSS px relative to the viewport, if
2889
+ * the host measured one. Absent, the source is cover-fit to the viewport.
2890
+ */
2891
+ readonly placement?: BackdropPlacement;
2687
2892
  }
2688
2893
  type PyramidBuildOutcome = {
2689
2894
  readonly status: "built";
@@ -2868,6 +3073,16 @@ interface GlassRenderer {
2868
3073
  registerBackdrop(provider: BackdropProvider): void;
2869
3074
  unregisterBackdrop(sourceId: string): void;
2870
3075
  backdrop(sourceId: string): BackdropProvider | undefined;
3076
+ /**
3077
+ * Where a source's pixels sit on the plane, in CSS px relative to the viewport
3078
+ * (`backdrop-fit.ts`). Set every read phase by a host that measured the source
3079
+ * element's box; `undefined` (or never set) is the cover fit, the rule every
3080
+ * golden and calibration capture was taken under. Accepted before the provider
3081
+ * is registered and kept across device generations; cleared by
3082
+ * `unregisterBackdrop`.
3083
+ */
3084
+ setBackdropPlacement(sourceId: string, placement: BackdropPlacement | undefined): void;
3085
+ backdropPlacement(sourceId: string): BackdropPlacement | undefined;
2871
3086
  setViewport(viewport: ViewportState): void;
2872
3087
  readonly viewport: ViewportState;
2873
3088
  setGroup(input: GroupRenderInput): void;
@@ -2963,4 +3178,4 @@ declare const VITREA_CONTRACTS: {
2963
3178
  declare const RENDERER_TIERS: readonly ["webgpu", "css"];
2964
3179
  type RendererTier = (typeof RENDERER_TIERS)[number];
2965
3180
 
2966
- export { ACCESSIBILITY_BEHAVIOR_TABLE, ACCESSIBILITY_FLAGS, ACCESSIBILITY_PRECEDENCE, type AccessibilityConsequences, type AccessibilityFlag, type AccessibilityOverride, type AccessibilityOverrides, type ActiveRenderer, type AnalysisQuality, type BackdropEstimatorProvider, type BackdropHint, type BackdropHintRequest, type BackdropProvider, type BackdropRebuildRequest, type BackdropResolutionPolicy, type BackdropSourceDescriptor, type BackdropSourceRecord, type BackdropTone, type CapabilityInputs, type ConcentricParent, type ConfiguredSource, type CopyProviderOptions, type CornerProfile, type CornerRadii, type CornerReference, DEFAULT_BACKDROP_RESOLUTION, DEFAULT_CLEAR_DIMMING, DEFAULT_GROUP_SAMPLING, DEMOTION_REASONS, DEMOTION_RECOVERY, DIAGNOSTIC_CODES, type DemotionReason, type DescriptorPatch, type Diagnostic, type DiagnosticCode, type DiagnosticSeverity, type DiagnosticSink, type DiagnosticsChannel, type DiagnosticsChannelOptions, type DimmingPolicy, type DomBackdropSource, FOREGROUND_MODES, FRAME_PHASES, type ForegroundAdaptation, type ForegroundMode, type ForegroundResolutionOptions, type FrameContext, type FrameInfo, type FrameParticipant, type FramePhase, type FrameReport, type FrameScheduler, type FrameSchedulerOptions, GLASS_PLANES, GOVERNOR_PRESSURES, type GlassGroupDescriptor, type GlassGroupRecord, type GlassGroupState, type GlassNodeDescriptor, type GlassNodeRecord, type GlassPlane, type GlassRenderer, type GlassScene, GlassSceneError, type GlassSceneErrorCode, type GlassSceneOptions, type GlassTint, type GovernorPressure, type GroupHealth, type GroupSamplingGeometry, type GroupStateChange, HINT_AVAILABILITIES, type HintAvailability, type InteractionState, MATERIAL_VARIANTS$1 as MATERIAL_VARIANTS, type MaterialProfile$1 as MaterialProfile, type MaterialRequest, type MaterialVariant$1 as MaterialVariant, type MotionChannel, type MotionDriverKind, NOMINAL_ACCESSIBILITY_POLICY, OVERRIDABLE_ACCESSIBILITY_FLAGS, type OverridableAccessibilityFlag, type PlaneOverlap, type PlatformProbe, type ProxyOverlap, RENDERER_TIERS, type RecoveryContract, type RecoveryTrigger, type Rect, type RefractionQuality, type RendererTier, type ResolvedAccessibilityPolicy, type ResolvedBackdropHint, type ResolvedForegroundAdaptation, type ResolvedGroup, type ResolvedMaterial, type ResolvedMaterialPolicy, type ResolvedMotionPolicy, type ResolvedNode, SAMPLED_ASYNC_DEFAULTS, SAMPLED_ASYNC_RATE_LIMITS, type SamplingBackend, type SceneResolution, type ShapeChannels, type ShapeFamily, type SourceProbe, type StateChange, type SystemAccessibilityPreferences, type TextureBackdropSource, type TintColor, type TintMixingCheck, VITREA_CONTRACTS, type VariantMixingCheck, type Vec2, type VideoProviderOptions, WEBGPU_AVAILABILITIES, type WebGPUAvailability$1 as WebGPUAvailability, type WebGPURendererModule, type ZSlot, checkTintMixing, checkVariantMixing, classifyStateChange, clipRect, compareZSlot, createDiagnosticsChannel, createFrameScheduler, createGlassScene, defaultForegroundAdaptation, glassTint, inflateRect, isHealthy, loadWebGPURenderer, loadWebGPURendererModule, rectsOverlap, resolveAccessibilityPolicy, resolveBackdropHint, resolveForegroundAdaptation, resolveGlassGroupState, resolveMaterial, unionRect };
3181
+ export { ACCESSIBILITY_BEHAVIOR_TABLE, ACCESSIBILITY_FLAGS, ACCESSIBILITY_PRECEDENCE, type AccessibilityConsequences, type AccessibilityFlag, type AccessibilityOverride, type AccessibilityOverrides, type ActiveRenderer, type AnalysisQuality, type BackdropEstimatorProvider, type BackdropHint, type BackdropHintRequest, type BackdropProvider, type BackdropRebuildRequest, type BackdropResolutionPolicy, type BackdropSourceDescriptor, type BackdropSourceRecord, type BackdropTone, type CapabilityInputs, type ConcentricParent, type ConfiguredSource, type CopyProviderOptions, type CornerProfile, type CornerRadii, type CornerReference, DEFAULT_BACKDROP_RESOLUTION, DEFAULT_CLEAR_DIMMING, DEFAULT_GROUP_SAMPLING, DEMOTION_REASONS, DEMOTION_RECOVERY, DIAGNOSTIC_CODES, type DemotionReason, type DescriptorPatch, type Diagnostic, type DiagnosticCode, type DiagnosticSeverity, type DiagnosticSink, type DiagnosticsChannel, type DiagnosticsChannelOptions, type DimmingPolicy, type DomBackdropSource, FOREGROUND_MODES, FRAME_PHASES, type ForegroundAdaptation, type ForegroundMode, type ForegroundResolutionOptions, type FrameContext, type FrameInfo, type FrameParticipant, type FramePhase, type FrameReport, type FrameScheduler, type FrameSchedulerOptions, GLASS_PLANES, GOVERNOR_PRESSURES, type GlassGroupDescriptor, type GlassGroupRecord, type GlassGroupState, type GlassNodeDescriptor, type GlassNodeRecord, type GlassPlane, type GlassRenderer, type GlassScene, GlassSceneError, type GlassSceneErrorCode, type GlassSceneOptions, type GlassTint, type GovernorPressure, type GroupHealth, type GroupSamplingGeometry, type GroupStateChange, HINT_AVAILABILITIES, type HintAvailability, type InteractionState, MATERIAL_VARIANTS$1 as MATERIAL_VARIANTS, type MaterialProfile$1 as MaterialProfile, type MaterialRequest, type MaterialVariant$1 as MaterialVariant, type MotionChannel, type MotionDriverKind, NOMINAL_ACCESSIBILITY_POLICY, OVERRIDABLE_ACCESSIBILITY_FLAGS, type OverridableAccessibilityFlag, type PlaneOverlap, type PlatformProbe, type ProxyOverlap, RENDERER_TIERS, type RecoveryContract, type RecoveryTrigger, type Rect$1 as Rect, type RefractionQuality, type RendererTier, type ResolvedAccessibilityPolicy, type ResolvedBackdropHint, type ResolvedForegroundAdaptation, type ResolvedGroup, type ResolvedMaterial, type ResolvedMaterialPolicy, type ResolvedMotionPolicy, type ResolvedNode, SAMPLED_ASYNC_DEFAULTS, SAMPLED_ASYNC_RATE_LIMITS, type SamplingBackend, type SceneResolution, type ShapeChannels, type ShapeFamily, type SourceProbe, type StateChange, type SystemAccessibilityPreferences, type TextureBackdropSource, type TintColor, type TintMixingCheck, VITREA_CONTRACTS, type VariantMixingCheck, type Vec2, type VideoProviderOptions, WEBGPU_AVAILABILITIES, type WebGPUAvailability$1 as WebGPUAvailability, type WebGPURendererModule, type ZSlot, checkTintMixing, checkVariantMixing, classifyStateChange, clipRect, compareZSlot, createDiagnosticsChannel, createFrameScheduler, createGlassScene, defaultForegroundAdaptation, glassTint, inflateRect, isHealthy, loadWebGPURenderer, loadWebGPURendererModule, rectsOverlap, resolveAccessibilityPolicy, resolveBackdropHint, resolveForegroundAdaptation, resolveGlassGroupState, resolveMaterial, unionRect };