@vitreajs/vitrea 0.16.0 → 0.18.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
@@ -486,7 +486,25 @@ type AnalysisQuality = "exact" | "hint" | "none";
486
486
  type GroupHealth = "ok" | "demoted";
487
487
  declare const DEMOTION_REASONS: readonly ["no-webgpu", "no-backdrop-filter", "tainted-source", "incompatible-texture", "no-texture-supplied", "device-lost", "probe-failed", "governor"];
488
488
  type DemotionReason = (typeof DEMOTION_REASONS)[number];
489
+ /** W28's actual per-surface response input. Dimensions disclose a downscaled source;
490
+ * level zero is the finest imported image, not necessarily the original raster. */
491
+ interface SurfaceBackdropToneAbscissa$1 {
492
+ readonly surfaceId: string;
493
+ readonly kind: "source" | "silhouette" | "hint";
494
+ readonly encodedLuminance: number;
495
+ readonly luminance: number;
496
+ readonly linearLuminance: number;
497
+ readonly color: readonly [number, number, number];
498
+ readonly sampleCount: number;
499
+ readonly level: number;
500
+ readonly sourceWidth: number;
501
+ readonly sourceHeight: number;
502
+ readonly sampledWidth: number;
503
+ readonly sampledHeight: number;
504
+ }
489
505
  interface GlassGroupState {
506
+ /** Latest actual reduction for the drawn surfaces, absent before it is observed. */
507
+ readonly backdropToneAbscissae?: readonly SurfaceBackdropToneAbscissa$1[];
490
508
  /** What the app declared — never mutated by the runtime. */
491
509
  readonly configuredSource: ConfiguredSource;
492
510
  /** What is actually drawing. */
@@ -2127,6 +2145,11 @@ interface MaterialOuterShadow {
2127
2145
  * Units: CSS px for distance, linear light for colour, viewport coordinates with
2128
2146
  * y pointing down for direction.
2129
2147
  */
2148
+ type BackdropToneKnotRow = readonly [number, number, number] | readonly [number, number, number, number];
2149
+ interface MaterialOcclusionLiftByPolicy {
2150
+ readonly reduceTransparency: number;
2151
+ readonly increaseContrast: number;
2152
+ }
2130
2153
  interface MaterialProfile {
2131
2154
  /** Per-variant optics. `clear` is persistently more transparent than `regular`. */
2132
2155
  readonly optics: Readonly<Record<MaterialVariant, MaterialOptics>>;
@@ -2881,6 +2904,8 @@ interface MaterialProfile {
2881
2904
  * both directions by `packages/calibration/test/tier-coherence.test.ts`.
2882
2905
  */
2883
2906
  readonly increasedOcclusionLift: number;
2907
+ /** Optional policy-specific levels. Absent keeps the shared lift exactly. */
2908
+ readonly increasedOcclusionLiftByPolicy?: MaterialOcclusionLiftByPolicy;
2884
2909
  readonly strongBorderRim: MaterialRim;
2885
2910
  readonly reducedTintAdaptation: number;
2886
2911
  /**
@@ -3161,9 +3186,13 @@ interface MaterialProfile {
3161
3186
  * extreme-dark region stays with the collapse constants that were fitted
3162
3187
  * on it.
3163
3188
  */
3164
- readonly backdropToneAnchorX: readonly [number, number, number];
3165
- readonly backdropToneResponseThin: readonly [number, number, number];
3166
- readonly backdropToneResponseThick: readonly [number, number, number];
3189
+ /** W28: absent/source preserves the source solve; silhouette reduces raw pixels per surface. */
3190
+ readonly backdropToneAbscissa?: "source" | {
3191
+ readonly kind: "silhouette";
3192
+ };
3193
+ readonly backdropToneAnchorX: BackdropToneKnotRow;
3194
+ readonly backdropToneResponseThin: BackdropToneKnotRow;
3195
+ readonly backdropToneResponseThick: BackdropToneKnotRow;
3167
3196
  /**
3168
3197
  * How much authority the response law has in THIS profile, 0…1 (W9).
3169
3198
  *
@@ -3270,6 +3299,7 @@ interface MaterialProfilePatch {
3270
3299
  readonly lensOvalizationSpanMax?: number;
3271
3300
  readonly reducedTransparencyFrost?: number;
3272
3301
  readonly increasedOcclusionLift?: number;
3302
+ readonly increasedOcclusionLiftByPolicy?: Readonly<Partial<MaterialOcclusionLiftByPolicy>>;
3273
3303
  readonly strongBorderRim?: Readonly<Partial<MaterialRim>>;
3274
3304
  readonly reducedTintAdaptation?: number;
3275
3305
  readonly tintShadeDark?: number;
@@ -3286,9 +3316,10 @@ interface MaterialProfilePatch {
3286
3316
  readonly rimCollapsed?: number;
3287
3317
  readonly rimCollapsedTinted?: number;
3288
3318
  readonly rimTintChroma?: number;
3289
- readonly backdropToneAnchorX?: readonly [number, number, number];
3290
- readonly backdropToneResponseThin?: readonly [number, number, number];
3291
- readonly backdropToneResponseThick?: readonly [number, number, number];
3319
+ readonly backdropToneAbscissa?: MaterialProfile["backdropToneAbscissa"];
3320
+ readonly backdropToneAnchorX?: BackdropToneKnotRow;
3321
+ readonly backdropToneResponseThin?: BackdropToneKnotRow;
3322
+ readonly backdropToneResponseThick?: BackdropToneKnotRow;
3292
3323
  readonly backdropToneResponseStrength?: number;
3293
3324
  readonly outerShadow?: Readonly<Partial<MaterialOuterShadow>>;
3294
3325
  readonly lightDirection?: readonly [number, number];
@@ -3693,6 +3724,8 @@ interface GroupRenderInput {
3693
3724
  * back to a level nobody measured.
3694
3725
  */
3695
3726
  readonly backdropTone?: Rgb;
3727
+ /** Author hints retain precedence over the silhouette reduction. */
3728
+ readonly backdropToneHint?: boolean;
3696
3729
  /**
3697
3730
  * The backdrop's ENCODED-space tone level (W9, claims §5.31–§5.34): the mean
3698
3731
  * taken in sRGB-encoded space, decoded once — the input the reference's tone
@@ -4245,6 +4278,22 @@ interface PyramidStore {
4245
4278
  destroy(): void;
4246
4279
  }
4247
4280
 
4281
+ /** Structural twin of core's readout: the renderer cannot import its parent package. */
4282
+ interface SurfaceBackdropToneAbscissa {
4283
+ readonly surfaceId: string;
4284
+ readonly kind: "source" | "silhouette" | "hint";
4285
+ readonly encodedLuminance: number;
4286
+ readonly luminance: number;
4287
+ readonly linearLuminance: number;
4288
+ readonly color: readonly [number, number, number];
4289
+ readonly sampleCount: number;
4290
+ readonly level: number;
4291
+ readonly sourceWidth: number;
4292
+ readonly sourceHeight: number;
4293
+ readonly sampledWidth: number;
4294
+ readonly sampledHeight: number;
4295
+ }
4296
+
4248
4297
  /**
4249
4298
  * The renderer: device, resources, and the frame.
4250
4299
  *
@@ -4426,6 +4475,8 @@ interface GlassRenderer {
4426
4475
  frameParticipant(): FrameParticipantView;
4427
4476
  /** Resolve any completed analysis readbacks into the adaptation drivers. */
4428
4477
  collectAdaptation(): Promise<number>;
4478
+ /** Actual GPU reduction, resolved asynchronously after the submitted draw. */
4479
+ backdropToneAbscissae(groupId: string): readonly SurfaceBackdropToneAbscissa[];
4429
4480
  destroy(): void;
4430
4481
  }
4431
4482
 
@@ -4497,4 +4548,4 @@ declare const VITREA_CONTRACTS: {
4497
4548
  declare const RENDERER_TIERS: readonly ["webgpu", "css"];
4498
4549
  type RendererTier = (typeof RENDERER_TIERS)[number];
4499
4550
 
4500
- 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 };
4551
+ 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 SurfaceBackdropToneAbscissa$1 as SurfaceBackdropToneAbscissa, 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 };
package/dist/index.js CHANGED
@@ -1092,7 +1092,7 @@ function isHealthy(state) {
1092
1092
 
1093
1093
  // src/renderer-seam.ts
1094
1094
  async function loadWebGPURendererModule() {
1095
- return import('./dist-C43H3RKY.js');
1095
+ return import('./dist-VQPRX7BX.js');
1096
1096
  }
1097
1097
  async function loadWebGPURenderer() {
1098
1098
  const { createWebGPURenderer } = await loadWebGPURendererModule();