@vitreajs/vitrea 0.17.0 → 0.19.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/{dist-T7PRMUM4.js → dist-VQPRX7BX.js} +511 -32
- package/dist/dist-VQPRX7BX.js.map +1 -0
- package/dist/index.d.ts +80 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/dist-T7PRMUM4.js.map +0 -1
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. */
|
|
@@ -553,6 +571,42 @@ interface GlassGroupState {
|
|
|
553
571
|
* interior. Absent on a WebGPU-tier group and before the first frame resolves one.
|
|
554
572
|
*/
|
|
555
573
|
readonly cssShadow?: "layer" | "group" | "host";
|
|
574
|
+
/**
|
|
575
|
+
* Which measured material document this group is drawing (W29 G4).
|
|
576
|
+
*
|
|
577
|
+
* The material became a selection in 0.19.0 — a page draws macOS 27's material
|
|
578
|
+
* by default and can pin macOS 26.5 — so "which material drew" stopped being a
|
|
579
|
+
* constant of the build and became a resolved fact, and the honesty core says a
|
|
580
|
+
* resolved fact belongs on the state beside `cssBody`, `cssTint` and
|
|
581
|
+
* `cssShadow`. A capture cell, a readout and the demo's capabilities panel all
|
|
582
|
+
* read it from here rather than from whatever the page meant to pass.
|
|
583
|
+
*
|
|
584
|
+
* Resolved by the platform, like the three fields above and for the same
|
|
585
|
+
* reason: the material is a property of the root, which core's per-group
|
|
586
|
+
* resolver cannot see. Absent before the first frame resolves one.
|
|
587
|
+
*/
|
|
588
|
+
readonly materialDocument?: ResolvedMaterialDocument;
|
|
589
|
+
}
|
|
590
|
+
/**
|
|
591
|
+
* The material a group actually drew, named so it can be checked rather than
|
|
592
|
+
* assumed.
|
|
593
|
+
*
|
|
594
|
+
* `tuned` is the field that keeps the other three honest. A root may merge an
|
|
595
|
+
* app's own `materialProfile` or `cssTierMapping` over whatever the document
|
|
596
|
+
* selected, and a readout that named the document without saying so would report
|
|
597
|
+
* a digest over a material that is not on the screen.
|
|
598
|
+
*/
|
|
599
|
+
interface ResolvedMaterialDocument {
|
|
600
|
+
/** The document's name — the profile-key stem the material was measured under. */
|
|
601
|
+
readonly name: string;
|
|
602
|
+
/** Which macOS release it was measured on. */
|
|
603
|
+
readonly platform: string;
|
|
604
|
+
/** The endpoint drawn for this group's resolved scheme and window pose. */
|
|
605
|
+
readonly profileKey?: string;
|
|
606
|
+
/** That endpoint's digest over the material it resolves to. */
|
|
607
|
+
readonly resolvedMaterialSha256?: string;
|
|
608
|
+
/** True where the app merged a material or CSS-tier patch of its own over it. */
|
|
609
|
+
readonly tuned: boolean;
|
|
556
610
|
}
|
|
557
611
|
declare function isHealthy(state: GlassGroupState): boolean;
|
|
558
612
|
|
|
@@ -3168,6 +3222,10 @@ interface MaterialProfile {
|
|
|
3168
3222
|
* extreme-dark region stays with the collapse constants that were fitted
|
|
3169
3223
|
* on it.
|
|
3170
3224
|
*/
|
|
3225
|
+
/** W28: absent/source preserves the source solve; silhouette reduces raw pixels per surface. */
|
|
3226
|
+
readonly backdropToneAbscissa?: "source" | {
|
|
3227
|
+
readonly kind: "silhouette";
|
|
3228
|
+
};
|
|
3171
3229
|
readonly backdropToneAnchorX: BackdropToneKnotRow;
|
|
3172
3230
|
readonly backdropToneResponseThin: BackdropToneKnotRow;
|
|
3173
3231
|
readonly backdropToneResponseThick: BackdropToneKnotRow;
|
|
@@ -3294,6 +3352,7 @@ interface MaterialProfilePatch {
|
|
|
3294
3352
|
readonly rimCollapsed?: number;
|
|
3295
3353
|
readonly rimCollapsedTinted?: number;
|
|
3296
3354
|
readonly rimTintChroma?: number;
|
|
3355
|
+
readonly backdropToneAbscissa?: MaterialProfile["backdropToneAbscissa"];
|
|
3297
3356
|
readonly backdropToneAnchorX?: BackdropToneKnotRow;
|
|
3298
3357
|
readonly backdropToneResponseThin?: BackdropToneKnotRow;
|
|
3299
3358
|
readonly backdropToneResponseThick?: BackdropToneKnotRow;
|
|
@@ -3701,6 +3760,8 @@ interface GroupRenderInput {
|
|
|
3701
3760
|
* back to a level nobody measured.
|
|
3702
3761
|
*/
|
|
3703
3762
|
readonly backdropTone?: Rgb;
|
|
3763
|
+
/** Author hints retain precedence over the silhouette reduction. */
|
|
3764
|
+
readonly backdropToneHint?: boolean;
|
|
3704
3765
|
/**
|
|
3705
3766
|
* The backdrop's ENCODED-space tone level (W9, claims §5.31–§5.34): the mean
|
|
3706
3767
|
* taken in sRGB-encoded space, decoded once — the input the reference's tone
|
|
@@ -4253,6 +4314,22 @@ interface PyramidStore {
|
|
|
4253
4314
|
destroy(): void;
|
|
4254
4315
|
}
|
|
4255
4316
|
|
|
4317
|
+
/** Structural twin of core's readout: the renderer cannot import its parent package. */
|
|
4318
|
+
interface SurfaceBackdropToneAbscissa {
|
|
4319
|
+
readonly surfaceId: string;
|
|
4320
|
+
readonly kind: "source" | "silhouette" | "hint";
|
|
4321
|
+
readonly encodedLuminance: number;
|
|
4322
|
+
readonly luminance: number;
|
|
4323
|
+
readonly linearLuminance: number;
|
|
4324
|
+
readonly color: readonly [number, number, number];
|
|
4325
|
+
readonly sampleCount: number;
|
|
4326
|
+
readonly level: number;
|
|
4327
|
+
readonly sourceWidth: number;
|
|
4328
|
+
readonly sourceHeight: number;
|
|
4329
|
+
readonly sampledWidth: number;
|
|
4330
|
+
readonly sampledHeight: number;
|
|
4331
|
+
}
|
|
4332
|
+
|
|
4256
4333
|
/**
|
|
4257
4334
|
* The renderer: device, resources, and the frame.
|
|
4258
4335
|
*
|
|
@@ -4434,6 +4511,8 @@ interface GlassRenderer {
|
|
|
4434
4511
|
frameParticipant(): FrameParticipantView;
|
|
4435
4512
|
/** Resolve any completed analysis readbacks into the adaptation drivers. */
|
|
4436
4513
|
collectAdaptation(): Promise<number>;
|
|
4514
|
+
/** Actual GPU reduction, resolved asynchronously after the submitted draw. */
|
|
4515
|
+
backdropToneAbscissae(groupId: string): readonly SurfaceBackdropToneAbscissa[];
|
|
4437
4516
|
destroy(): void;
|
|
4438
4517
|
}
|
|
4439
4518
|
|
|
@@ -4505,4 +4584,4 @@ declare const VITREA_CONTRACTS: {
|
|
|
4505
4584
|
declare const RENDERER_TIERS: readonly ["webgpu", "css"];
|
|
4506
4585
|
type RendererTier = (typeof RENDERER_TIERS)[number];
|
|
4507
4586
|
|
|
4508
|
-
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 };
|
|
4587
|
+
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 ResolvedMaterialDocument, 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-
|
|
1095
|
+
return import('./dist-VQPRX7BX.js');
|
|
1096
1096
|
}
|
|
1097
1097
|
async function loadWebGPURenderer() {
|
|
1098
1098
|
const { createWebGPURenderer } = await loadWebGPURendererModule();
|